10 Replies Latest reply on Jul 12, 2010 2:40 PM by JJMack

    Layer Style Effect Size using a relative Size Values

    JJMack Most Valuable Participant

      Today Layer Style dialog for Layer Style Effects currently only support Absolute PX sizing.  This make adding properly size layer style effect hard in Actions for they can not use logic like retrieving document resolution or pixel size and using this information in the action.  An action can scale a image to 8" wide without resampling  what changes is the Images Resolution which the action can not retrieve and use. The Action can Resample the image and Loose Image quality and know the width pixel size but that is not desirable. So an Action can set the image size 8" wide and know it want to add a Layer style effect that is 1/8 inch in size but can't because it has no idea of what the images resolution is. It would be very helpful to be able to set a layer style effect using a relative size like 1/8 inch where Photoshop would look at the images resolution and use the proper number of pixels.   Today all an action can do is to set a layer style for a print size resolution like 240 DPI where 1/8 Inch would be 24 pixels. Then leave the Layer and Layer Style intact so the user can rescale the layer style after the action runs if the image resolution is other the 240 DPI.  IMO this change would be a desirable Photoshop improvement.

        • 1. Re: Layer Style Effect Size using a relative Size Values
          Reynolds (Mark) Level 4

          Hmm your post is not that easy to understand.


          But from what I can make out you are missing this checkbox…

          Picture 6.png


          Which will record a step similar to this in your Action …


          Picture 5.png

          • 2. Re: Layer Style Effect Size using a relative Size Values
            JJMack Most Valuable Participant

            I'm  sorry I was unable to make my request clear to you.  I do not like to resample images which changes the number of pixel in an image for every time you resample you loose some image quality.   It is easy to deal with images that may be any size in actions  and add text and size shape layers and place logo on them by first scaling an image to a known width. This does not resample the image all that changes is the images DPI setting.  Once one know that a image is  lets say 8" wide it is easy add test logo and shape relative to the size and to you can record sizes in % or in inches or points and when you do Photoshop will use the images current DPI Resolution to figure out how many pixels to use for the units being used,  If I add canvas by by the inch the same is true if I add a mat Photoshop let me do the relatively.  If I want that mat to cast a shadow or have a stroke  1/3" wide I can not for I can only use absolute pixel size in layer styles and I as the action creator has no way of knowing what resolution Photoshop calculated when the image was scaled to 8" wide.


            I wrote a simple script for actions that an action can run twice the first time it runs it saves the images DPI resolution so the action scale an image to do its thing then the run the script a second tome. The second time the script is run it retrieves the original image resolution and restores the image to that resolution. Along with all the was added by the action scaled  then to the images original resolution preserving the perspective of the 8" embellished image. Even if layer styles rescale the action could not add them correctly in the first place.  All the action author can do is make a wild guess that the image was a print size  image and printed at 8" wide the DPI resolution would be near 300 DPI  and for 1/3" use 100 px which is most likely not the case.  I can not just record 1/3" in the Layer style dialog and have Photoshop do the calculation for the Layer style dialog only accepts px values.


            Also when you scale an image with image size with resample NOT checked Scaling Layer Styles is not available the option is grayed out.  Grayed however it may be checked or un-checked what ever state it was in remains but does nothing which is what should happen. The Constrain option will always be get  checked and be grayed out so you can't change it. Of course the image aspect ratio will remain the same for not a single image pixel is changed and the layer style print size will change right along with the images print size for the DPI changes.

            • 3. Re: Layer Style Effect Size using a relative Size Values
              Reynolds (Mark) Level 4

              Somthing you may also have missed … Layer > Layer Styles > Scale Effects - allows precise scaling of all Styles within a document.


              Within an Action its possible to use "Insert menu item" to bring up this dialog, just allowing you to scale the style how you want instantly.

              • 4. Re: Layer Style Effect Size using a relative Size Values
                JJMack Most Valuable Participant

                The question is not is it possible to scale layers styles that is clearly possible.  The question is how can one a set new layer style  effect type to be the proper size when all the action author knows  is  the size they want the effect to have in inches but they have no idea what the images current dpi resolution is. The new layer style effect type dialog can not be set with a relative size like a fraction of an inch.  If can only be set in terms of absolute pixel size.  The action creator would need to know the images current DPI resolution so they can calculate  the number of pixel needed. The action creator can know the DPI of the document being used to record the action. However the action can be played on any pixel size Photoshop document and when the action scale the image to have an 8" wide print size without resampling Photoshop will calculate what the DPI resolution needs to be and will set it. The current images 8" wide DPI resolution  may or may not be the same as the image that was used to record the action with.

                • 5. Re: Layer Style Effect Size using a relative Size Values
                  Reynolds (Mark) Level 4

                  Ok, you could probably Script this - I suggest you ask in the Scripting forum with an accurate, and well worded description of what you need to do.




                  …And also why you want to do it. Why you are intent on using inches for layer styles, when you have variable resolutions. Which on the surface appears that there may be a lack of understanding about the importance of resolution, versus pixel dimensions in print.

                  • 6. Re: Layer Style Effect Size using a relative Size Values
                    JJMack Most Valuable Participant

                    Yes it could be done in a script but compared to actions scripts are hard to create labor intensive and a one needs to be a programmer with a lot of knowledge.


                    Why would I want to do something like that is easy to answer.   How about a simple example.  I have many digital cameras they have different resolutions and aspect ratios.   I wind up with a large collections of images that differ in pixel size and aspect ratio and some are portrait some Landscape and others made by stitching images had other aspect ratios.  Now I would like to put a simple text water mark in the lower right hand side of each that would appear the have the same relative size, placement and style in all my images.   I can do relative size and place in an action style is an other matter.

                    • 7. Re: Layer Style Effect Size using a relative Size Values
                      Reynolds (Mark) Level 4

                      Yes its still possible. You make up your text in a draft document, with the ideal Style size or thickness relative to the text. Then you RESAMPLE this draft document using 'scale styles' I pointed to above. Scaling text (which is vector) and Layer Styles in this way is completely non destructive. This scaling is dependent on your destination documents of course. Then you move it to the destination documents.


                      You can pretty quickly make up a series of different Actions for different destination formats, or script it to adapt automatically.    

                      • 8. Re: Layer Style Effect Size using a relative Size Values
                        JJMack Most Valuable Participant

                        Yes but you missed my first point I do not want to resample image change their pixel size lowing their image quality I wish to retain my cameras pixels and image quality.  If I resize images to some pixel width image quality will suffer to a different degree for each camera and picture orientation and all my stitching will have been for naught.   However I could handle layer styles for I know images pixel width size size.  I rather keep my image quality for I can always re-adjust Layer Styles after an action runs if the action leaves the layer it added layer styles to intact. It is very hard to do what you suggested and batch process all images the would need to be scripted.   You suggestion requires the input images be grouped in sized  and each size batched with an action for that size image. In which case I do not need to create a draft text document for I know image size.. There is also no problem scaling text relative to document size. Scaling the image to a known print width without resampling will take care of that all you have to do is use a text point size that will be good for a print that wide. Photoshop will scale the text size according to its current image dpi resolution. The problem is adding a layer style to that text layer for you have no idea of what the images current dpi resolution is.

                        • 9. Re: Layer Style Effect Size using a relative Size Values
                          Reynolds (Mark) Level 4

                          You missed my point - I'm not suggesting that you resample the image at all.

                          • 10. Re: Layer Style Effect Size using a relative Size Values
                            JJMack Most Valuable Participant

                            You suggested creating a different action for each of my different document sizes which would be a lot of work for I have quite a few stitches images each of which is a different image size.  I would then have to group my images by document size somehow  and process these groups is batches instead of processing all my images in my jpeg picture tree in a single Image Processor run like I can do now. The layer styles don't look all that bad for all images are large in the 3MP to 100MP range the Layer styles only look off on the large stitched image which have much more resolution then my 3, 4, 5, 6, and 8MP camera images do.