get .psd layer (x,y) positions

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
mylastgg
Posts: 6
Joined: 2019-02-15T07:09:18-07:00
Authentication code: 1152

get .psd layer (x,y) positions

Post by mylastgg » 2019-02-15T07:13:16-07:00

Hello everyone!

I'm writing my first bash script with ImageMagick.
I have a .psd file with multiple layers. I'd like to extract and 'store' (in a file, or pass to another script) the X and Y positions of the layers.

Is this possible with ImageMagick?

Best

mylastgg
Posts: 6
Joined: 2019-02-15T07:09:18-07:00
Authentication code: 1152

Re: get .psd layer (x,y) positions

Post by mylastgg » 2019-02-15T07:46:20-07:00

I've found that identify prints something like

banana.png PNG 248x161 248x161+733+471 8-bit sRGB 193392B 0.000u 0:00.009

I'm guessing that 248x161+733+471 (Geometry) is what I'm looking for?

User avatar
dlemstra
Posts: 1567
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: get .psd layer (x,y) positions

Post by dlemstra » 2019-02-16T01:59:34-07:00

Yes that is what you are looking for. And you should skip the first image because that is the merged image and not a layer.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

mylastgg
Posts: 6
Joined: 2019-02-15T07:09:18-07:00
Authentication code: 1152

Re: get .psd layer (x,y) positions

Post by mylastgg » 2019-02-18T03:34:17-07:00

thanks! it worked!

Post Reply