Layermask in PSD file

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
pherms
Posts: 1
Joined: 2018-06-28T07:07:46-07:00
Authentication code: 1152

Layermask in PSD file

Post by pherms »

Hi,

I have several PSD files, which contain 1 layer with a layermask on it.

Now I would like to use imagemagick v7.0.8 to generate a new image which only contains that part of the image which is visible when this layermask is applied.
For some reason though I cannot get it to work. The only result is that I get the alpha channel, but that's not what I want.

I have tried this command:
magick composite 15364.psd -alpha off -compose copy_opacity 15364-alpha.png. This only gives me the alpha channel, so I get a transparent background.

I'm kind of stuck on this and I hope somebody can help me with this problem.

Thank you in advance.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Layermask in PSD file

Post by snibgo »

pherms wrote:...which only contains that part of the image which is visible when this layermask is applied.
Okay, but what do you want in the other parts of the result? If your command makes the other pixels transparent, you can then flatten against any colour you want.

The results of your command will depend on how many images ImageMagick finds in the PSD file, and their order. I think IM can't read PSD layermasks.

If you upload the PSD to somewhere and paste a link, perhaps we can advise further.
snibgo's IM pages: im.snibgo.com
Post Reply