6 Replies Latest reply on Jun 20, 2017 9:21 PM by JJMack

    I *know* this should be simple: aligning logo




      I know I am likely being thick here, but I have hunted for how to do this for a while and I can't figger it out:


      1. I have a nice bunch of 2450x1750-pixel JPGs to which I would like to add a logo close to the the lower-left corner, offset a little from the corner.


      2. I have a nice 2450x1750-pixel PSD file, transparent except for a logo in the lower-left corner, placed just where I would like it to appear on the JPGs.


      3. With the PSD logo file open I select-all and Ctl-C to copy to clipboard.


      4. I go to a JPG and Ctl-V to paste.


      Problem:  the logo always appears in the dead-center of the frame.


      Messing with align-layer controls doesn't help, as the logo itself then gets aligned with various frame-edges.  I need the whole layer aligned, so that it preserves the placement of the logo relative to the edges of the frame.


      In short, it seems that Photoshop is deciding for itself that since all the other pixels in the layer are transparent, they are irrelevant and it just plops my logo in the middle when I paste.


      Can anyone suggest how I can have my logo appear in the right spot when it's pasted, so I don't have to drag it manually for each JPG?


      Thanks for any and all help!



        • 2. Re: I *know* this should be simple: aligning logo
          Barbara Ash Adobe Community Professional

          Open the file that is transparent and has a logo in the lower corner. Also open the file you want to add the logo to.

          Window > Arrange > 2-up Vertical.

          Select the Move tool. Hold the Move tool down on the logo (not the transparent area).

          Keep the mouse down and drag the logo over the other file. Once the cursor is over the other file, hold down the Shift key and then release the mouse. The Shift key will maintain the same position.


          • 3. Re: I *know* this should be simple: aligning logo
            Barbara Ash Adobe Community Professional

            As Chuck suggested, Paste in Place is another method. To use Paste in Place, Select > All in the logo file. Choose Edit > Copy Merged. Activate the file you want to add the logo to, and choose Edit > Paste Special > Paste in Place.

            There is yet a third method. With both files open, you can use the Move tool to hold down on the logo and drag it to the title bar of the image you want to add it to. With the mouse still down, hold down Shift as you release the mouse in the image to which you are adding the logo.

            • 4. Re: I *know* this should be simple: aligning logo
              owene19373808 Level 1

              Thanks so much, both Barbara and Chuck.


              Both your answers taught me useful stuff - I'm going to use the Ctrl-Shift-V (Paste in place) option, since I can have multiple target files open and using only the keyboard, paste-merge-close each file quickly then move to the next.


              Again, thank you both very much for taking the time to help.





              • 5. Re: I *know* this should be simple: aligning logo
                Barbara Ash Adobe Community Professional

                You're most welcome, Owen!

                • 6. Re: I *know* this should be simple: aligning logo
                  JJMack Most Valuable Participant

                  IMO the best way to do it is with a script.  A script can resize you logo to an appropriate size for the image receiving the logo. And Aligned to where you want it aligned. The script I have posted is easy to modify for your logo and the size you want but I chose to align the logo to the bottom right.   I have also posted had yo do ir with and action.  The action dos align the custom logo to the bottom left.


                  Crafting Actions Package UPDATED Aug 10, 2014 Added Conditional Action steps to Action Palette Tips.





                  My Script PlaceWatermark.jsx

                  #target photoshop;  
                  var logoFile = "~/Desktop/JJMack.png"; // Watermark file should be large for resize down works better than up
                  var LogoSize = 10; // percent of document height to resize Watermark to
                  var LogoMargin = 1;                                         // percent of Document height the Watermark should have as a margin
                  placeWatermark(logoFile, LogoSize, LogoMargin);             // Place Watermark  into the bottom right of document
                  function placeWatermark(Image,Size,Margin){  
                    if(!documents.length) return;   // if no document return
                    var doc = app.activeDocument; // set Doc object to active document
                    app.displayDialogs = DialogModes.NO; // Dialog off 
                    var strtRulerUnits = app.preferences.rulerUnits; // Save Users ruler units 
                    var strtTypeUnits = app.preferences.typeUnits; // Save Users Type units 
                    app.preferences.rulerUnits = Units.PIXELS; // work with pixels 
                    app.preferences.typeUnits = TypeUnits.PIXELS; // work with pixels 
                    var fileObj = new File(Image);                 // the passed file
                    if(!fileObj.exists){   // If file does not exits tell user 
                    alert(fileObj.name  + " does not exist!");  
                    placeFile(fileObj); // Place in file the Watermark png file
                    activeDocument.activeLayer.resize(100 ,100,AnchorPosition.MIDDLECENTER); // Insure Place did not scale layer  
                    var SB = activeDocument.activeLayer.bounds; // get layers bounds 
                    var layerHeight = SB[3] - SB[1]; // get layers height  
                    var resizePercent = (100/layerHeight)*(Size/100*doc.height.value); // Percent to resize by 
                    activeDocument.activeLayer.resize(resizePercent ,resizePercent,AnchorPosition.MIDDLECENTER);  // Resize width and height by percentage 
                    SB = activeDocument.activeLayer.bounds; // get resized layers bounds  
                    activeDocument.activeLayer.translate(-SB[0].value,-SB[1].value); // Move resized layer to top left canvas corner 
                    var LayerWidth = (SB[2].value - SB[0].value);  
                    var LayerHeight = (SB[3].value - SB[1].value);  
                    marginSize = Margin/100*doc.height.value; // move resized watermark into the document lower right corner with some margin
                    activeDocument.activeLayer.translate((doc.width.value -marginSize - LayerWidth),( doc.height.value -marginSize - LayerHeight));
                    catch(e) { alert(e + ': on line ' + e.line); } // inform user of error  
                    app.preferences.rulerUnits = strtRulerUnits; // Restore user ruler units  
                    app.preferences.typeUnits = strtTypeUnits; // Restore user type units    
                  function placeFile(placeFile) {  
                      var desc21 = new ActionDescriptor();  
                      desc21.putPath( charIDToTypeID('null'), new File(placeFile) );  
                      desc21.putEnumerated( charIDToTypeID('FTcs'), charIDToTypeID('QCSt'), charIDToTypeID('Qcsa') );  
                      var desc22 = new ActionDescriptor();  
                      desc22.putUnitDouble( charIDToTypeID('Hrzn'), charIDToTypeID('#Pxl'), 0.000000 );  
                      desc22.putUnitDouble( charIDToTypeID('Vrtc'), charIDToTypeID('#Pxl'), 0.000000 );  
                      desc21.putObject( charIDToTypeID('Ofst'), charIDToTypeID('Ofst'), desc22 );  
                      executeAction( charIDToTypeID('Plc '), desc21, DialogModes.NO );