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: 7
Joined: 2019-02-15T07:09:18-07:00
Authentication code: 1152

get .psd layer (x,y) positions

Post by mylastgg »

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: 7
Joined: 2019-02-15T07:09:18-07:00
Authentication code: 1152

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

Post by mylastgg »

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: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

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

Post by dlemstra »

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: 7
Joined: 2019-02-15T07:09:18-07:00
Authentication code: 1152

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

Post by mylastgg »

thanks! it worked!
Post Reply