Newb PSD layer Question

Magick.NET is an object-oriented C# interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick.NET
Post Reply
hp0104
Posts: 3
Joined: 2017-08-30T08:24:40-07:00
Authentication code: 1151

Newb PSD layer Question

Post by hp0104 » 2017-08-30T08:28:07-07:00

Is there a way of reading the layer information in a psd file?
Thanks

User avatar
fmw42
Posts: 22081
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: Newb PSD layer Question

Post by fmw42 » 2017-08-30T09:41:46-07:00

hp0104 wrote:
2017-08-30T08:28:07-07:00
Is there a way of reading the layer information in a psd file?
Thanks
And doing what with it?

IM can copy or extract the layer from one PSD to another file, but there is no current way that I know to just read the layer names and report that. But dlemstra is the PSD expert on this forum, so he can give your further information or correct me if I am wrong.

hp0104
Posts: 3
Joined: 2017-08-30T08:24:40-07:00
Authentication code: 1151

Re: Newb PSD layer Question

Post by hp0104 » 2017-08-30T14:35:07-07:00

I'd like to extract the name, contents and save each layer out as a separate image file if it's an image, or extract the text if it contains text. Is this possible?

User avatar
fmw42
Posts: 22081
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: Newb PSD layer Question

Post by fmw42 » 2017-08-30T15:53:05-07:00

hp0104 wrote:
2017-08-30T14:35:07-07:00
I'd like to extract the name, contents and save each layer out as a separate image file if it's an image, or extract the text if it contains text. Is this possible?
ImageMagick does not know about layer names as far as I know. But you can export each layer, so long as they are simple layers and not adjustment layer and such. ImageMagick cannot extract vector text that you type into your PSD file. It is a raster processor and knows only a little about PSD files.

But again, dlemstra, know more about this than I do. So I hope he replies to confirm or correct my statements.

hp0104
Posts: 3
Joined: 2017-08-30T08:24:40-07:00
Authentication code: 1151

Re: Newb PSD layer Question

Post by hp0104 » 2017-08-31T09:27:34-07:00

Hi
Thanks, I'd like to be able to use the magicknet api with an app to process the file rather than through the imagemagick application.
Thx

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

Re: Newb PSD layer Question

Post by dlemstra » 2017-08-31T11:12:54-07:00

Fred is correct you can only get the image data and and not just the text. You will need to use a MagickImageCollection to get all the layers. And each MagickImage in that collection contains a Label property that will contain the name of the layer.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

Post Reply