1 Reply Latest reply on Oct 25, 2015 9:51 AM by JJMack

    How to get and set the length and width of layer content?

    Wate.R

      How to get and set the length and width of layer content

        • 1. Re: How to get and set the length and width of layer content?
          JJMack Most Valuable Participant

          All layer are not crated equal. some layer like adjustment have no bounds. Smart object layer may have two different sizes. The size of the object and the size the object may be transformed to. All smart object layers have an associated transform. To transform a smart object layers you must work with the object size the pixels generated fot the layer. Text layer can be resized with a transform or by changing the font size. Raster layers are resize  via a transform.  The scripting method is resize.  When you resize the number of pixelsits done via interpolation. You can specify what method to use or set Photoshop preference default interpolation. 

           

          There is also a bug in Photoshop scripting if you suspend history stated make a selection and use resize. Photoshop will incorrectly back up to one state prior to where you suspended history. This bug seen to be in all versions of Photoshop.

           

          If you look ate the script in my bug report you should get a good idea of how to resize a layer.

          Photoshop: Script bug resize layer back document up one history state