Quantcast
Channel: Adobe Community: Message List - Photoshop Scripting
Viewing all articles
Browse latest Browse all 27456

Re: Calculating width height in script

$
0
0

I think part of the problem may be that you do not fully understand that Photoshop is a document editor and can save documents in image files. You may have knowldge about your PSD files that you have not shared. In which case all possibilities would need to be programmed in.  Some image file formats do not support all Photoshop features.  Only PSB, PSD and  Tiff can be used to store all things Photoshop.  A layer document has a Canvas size and layers  that can be any size except the a special optional  layer know as Photoshop background layer.  The can only be one background layer which is the bottom layer and it is always canvas size for the background layer does not support transparency. It transparency is always lock and is 100% opaque. The background layer is always canvas size adding or removing canvas changes the background lay sizes other layer sizes do not change.  There are many types of layers.   Layers can be any size however the documents canvas size acts as a clipping mask.  Any pixels not over the canvas area are masked off however they do exists. Its even possible that a layer may exist that has pixels but none are over the canvas area. Layer bounds can have large negative values and very large positive values. The document canvas upper left corner is position 0,0  and the bottom right is width,height.  Layer the same size could [-width,-height 0,0]  and  [width,height 2Xwidth,2Xheight] only two pixels would be over the canvas. Layer bounds can have any aspect ratio and size however layer can have any shape.

 

You may have PSD files that  you have created to have a particular structure known to you.  You may know that there are no layers that have pixels that are  not over the canvas etc.


Viewing all articles
Browse latest Browse all 27456


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>