7 Replies Latest reply on Dec 23, 2017 7:30 PM by JJMack

    How to make a layer size adaptable to different image sizes?

    omars29422587

      I am using PS CS6 and I am trying to insert a certain design as a watermark which is a box 0.5 inches from the edges and the Logo at the bottom of that box. I am trying to insert this design to hundreds of photos with different sizes so a script won't do it. Is there a way to make the a layer adaptable to the image size or is there another program that can do that?

        • 1. Re: How to make a layer size adaptable to different image sizes?
          JJMack Most Valuable Participant

          Can you explain why you think a script can not do that?  IMO a script can do what you want. However if you want your design box's aspect ration to change to match the document aspect ratio without distortion its scaled version would need to be masked to that aspect ratio and you would lose some of your design content.   You design box should match your logo aspect ratio. Why do you need a design under you logo even. You are talking two layers here you design layer and your logo layer.

          • 2. Re: How to make a layer size adaptable to different image sizes?
            Mylenium Most Valuable Participant

            Why do you think a script couldn't do it? Or are you simply mixing up scripts and actions? Of course an action will be too limited, but a genuine script, of which several exist out there, can easily do it.

             

            Mylenium

            • 3. Re: How to make a layer size adaptable to different image sizes?
              JJMack Most Valuable Participant

              If you design box  aspect ratio match you logo it would  be simple to do.  You would just need to place in a document that is a combined design and  logo.  Scale and position it.   If the document is a AI file like .ai or .svg  the smart object layer content will be a vector smart object.   If you do not use illustrator just create the file with Photoshop Large for scaling down works much better the scaling up in size.  You will find a large png will work great.    The .5" margin could be programmed easily.   However in the watermarking script posted I chose to make the bottom and side margin relative to the document height and also scale the watermark relative to the document height.

              I did the to keep the script easy for the Watermark height relative to the height would be a good size for the document  as would the margins.  I also felt the watermark width would most likely fit within the document  I was not planning to watermark vertical panoramas where height is huge compared to the width.  A landscape extremely wide panorama watermark print size would be a good height its width would just be small relative to the image's width.

               

              Here is a link to my script it is coded for my logo, sizes are my choices as is position.   It is very easy to change these for your use just change the first 4 vars.

              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

              var BottomLetf = false;                              // false = Bottom Right true Bottom Left

               

              http://www.mouseprints.net/old/dpr/PlaceWatermark.jsx

              1 person found this helpful
              • 4. Re: How to make a layer size adaptable to different image sizes?
                omars29422587 Level 1

                Can you please elaborate how can I mask the aspect ratio of the photo with the aspect ratio of the layer? I am merging the layer of the box and the layer of the logo into one.

                • 5. Re: How to make a layer size adaptable to different image sizes?
                  JJMack Most Valuable Participant

                  If you want to be able to work on you watermark why would you merge layer.

                   

                  You create an aspect ration selection  where you want the watermark to be and add it to the watermatk layer as a layer mask.  Even if the placed watermark object is a layered object like a PSD file as a smart object its a single layer.   You could also mask a  group of layers that make up your watermark. Layers are useful.  Layer masks can be any shape and even add partial transparency.  Your final output image if saved as Jpeg or png will have a single layer.

                   

                  All image in this collage have different aspect ratio sizes and resolutions.  When places into the collage all are the same resolution and are scaled to fit the area and then masked so they have the correct aspect ratio and shape.  Scripts can do all of that.

                  http://www.mouseprints.net/old/dpr/Populate911_720p.mp4

                   

                  All layer added are either smart object image layers or text layers the Collage Scripts cam alsy att hile name stamps on images. Thet layers and be tweak usinf Photoshop.  Image compsition adjusted text layers aedit and noved a place in logo could also be adjusted.   When yot satiafied  you can save out a jpeg which is onle a background layer like this one.

                  Capture.jpg 

                  • 6. Re: How to make a layer size adaptable to different image sizes?
                    omars29422587 Level 1

                    Okay so I tried what you've said but I guess I am not getting it right.

                     

                    Sorry I am not professional in Photoshop but here is an example of what I want to do, a frame and logo that are adaptable to different image sizes. I hope you can clarify with steps how is this possible. Thank you.

                    sample2.jpg

                    • 7. Re: How to make a layer size adaptable to different image sizes?
                      JJMack Most Valuable Participant

                      To me different Image sized means any images aspect ratio and any size canvas from under 1MP to hundreds of MP.  Do you want your composite for the web or for print.  Will any aspect ratio be acceptable.

                       

                      You can find or write Photoshop scripts to frame images and scripts to resize image and scripts watermark images with a logo.   To do exactly what you want to do.   You first need to decide what you want. Then code your own custom script.  Action can not deal with  different sizes well Scripts can.

                       

                      There are some Scripts on the web and shipped with Photoshop the you may want to look at their source or use them.  For example you may want to use Adobe's Plug-in Script "Fit Image.jsx" to resize images to fit within some size pixel area. You may want to look at the source of my Place Watermark script and change it to center the watermark.  you may want to look at the FrameShop Script to learn how to add canvas for a frame and add a frame.

                       

                      http://www.mouseprints.net/old/dpr/PlaceWatermark.jsx

                       

                      FrameShop – A Framing Script for Adobe® Photoshop®

                       

                      The first thing is to come up with what specifications your composite. What you wrote is to vague covers an image the fit on a pin head and one to wallpaper  New York Empire state Building from top to bottom. Keep in mind cropping to soma aspect ratio will change the composition of an image resizing to som Aspect ratio will distort the images's contents.

                       

                      You could also simply create a template the size you want the contains the Frame and Logo and fit yot images to the template.  The image composition would look like a resized centered aspect ratio crop resized to fill the Frame's image area.  The script in my Photo Collage Toolkit can be used for that.

                      Free Photoshop Photo Collage Toolkit

                       

                      If you do not know Photoshop well you must first learn the basics....