Copy link to clipboard
Copied
Hello there,
I posted a previous question, though I need to be more specific,
I need to collect the bottom anchor position of an image layer (y value) on a psd document, so I can resize the main psd bottom center anchor (y) size to match this.
Once again, any info is greatly appreciated
This will get the layer bounds..
var LB = activeDocument.activeLayer.bounds;
alert("Top = " +LB[1].as('px')+ " Bottom = " +LB[3].as('px')+ " Right = " +LB[2].as('px')+ " Left = " +LB[0].as('px'));
Copy link to clipboard
Copied
This will get the layer bounds..
var LB = activeDocument.activeLayer.bounds;
alert("Top = " +LB[1].as('px')+ " Bottom = " +LB[3].as('px')+ " Right = " +LB[2].as('px')+ " Left = " +LB[0].as('px'));
Copy link to clipboard
Copied
great, now is there any easy way to adjust / move the top layer bound of an image layer? Thanks.
Copy link to clipboard
Copied
I highly recommend reading the JS Ref Guide sections for ArtLayer and Document in detail. Every entry.
The method you are looking for, in this case, is probably ArtLayer.translate().
-X
Copy link to clipboard
Copied
aye, will do a scan through, thank you.