Page 1 of 1

Convert PSD with 2 alpha channels to TIFF

Posted: 2018-08-08T03:10:38-07:00
by pepelaz
Hi All,

I have some input.psd file containing 2 alpha channels within it. This is how it looks when open in Photoshop
https://www.dropbox.com/s/8f2bwcwvwn6jxer/1.png?dl=0
It has 2 alpha channels - Spot1 and Spot2

I use the following command to covert it to tiff:

Code: Select all

magick convert input.psd output.tiff
This is how output.tiff file looks in Photoshop
https://www.dropbox.com/s/nleg9xf3kd295vc/2.png?dl=0

So, it's seen that Spot2 is lost, while Spot1 is merged into CMYK channels.

Is this possible using ImageMagick to convert it so that output file looks in Photoshop indentically to input?
Here is input.psd file
https://www.dropbox.com/s/helsicng6eshb ... t.psd?dl=0

Thanks in advance!

Regards,
Vladimir

Re: Convert PSD with 2 alpha channels to TIFF

Posted: 2018-08-08T06:30:48-07:00
by snibgo
Currently, IM can recognise and process only one alpha channel.

Re: Convert PSD with 2 alpha channels to TIFF

Posted: 2018-08-08T08:05:33-07:00
by pepelaz
snibgo wrote: 2018-08-08T06:30:48-07:00 Currently, IM can recognise and process only one alpha channel.
Thanks for response. But is there a way to make this one alpha channel to look in Photoshop as separated channel, not merged into CMYK channels?
And will multiple alpha channels will be supported in the future?

Re: Convert PSD with 2 alpha channels to TIFF

Posted: 2018-08-08T09:01:56-07:00
by snibgo
pepelaz wrote:But is there a way to make this one alpha channel to look in Photoshop as separated channel, not merged into CMYK channels?
Well, you can do things like this:

Code: Select all

magick input.psd ( +clone -alpha extract ) -alpha off x.tiff
Then x.tiff contains two images: the coloured background, and "Spot1" in white on a black background.
pepelaz wrote:And will multiple alpha channels will be supported in the future?
I don't know.

Re: Convert PSD with 2 alpha channels to TIFF

Posted: 2018-08-08T18:28:58-07:00
by pepelaz
Well, thanks, indeed it is. After executing this command output tiff contains 2 images, like you describe. But that's not what I need. I don't need multipage tiff, but instead I need one page tiff with alpha as separate channel in open in Photoshop. Can I achieve this using ImageMagick?

Re: Convert PSD with 2 alpha channels to TIFF

Posted: 2018-08-08T20:10:30-07:00
by snibgo
Sorry, I don't use Photoshop.

Re: Convert PSD with 2 alpha channels to TIFF

Posted: 2018-08-08T21:04:48-07:00
by fmw42
This will work to get Spot 1 as the only alpha with the background image.

Code: Select all

convert input.psd -profile /Users/fred/images/profiles/sRGB.icc \
\( -clone 0 -alpha extract \) \
-alpha off -compose copy_opacity -composite \
-define tiff:alpha=unspecified result.tif
Your image is CMYK with two alpha channels. If I do it without converting to sRGB, it does show only 1 alpha (Spot 1), but the CMYK is messed up. I do not know how to get the second alpha (Spot 2).

Using IM 6.9.10.9 Q16 Mac OSX with Photoshop CC 2018.

At this time Imagemagick cannot handles more than 1 extra channel (CMYKA or RGBA). Though that may change at some later time. It can handle it internally, but there is no interface, yet, for saving to TIF or PSD or any other format.

Re: Convert PSD with 2 alpha channels to TIFF

Posted: 2018-08-08T21:33:40-07:00
by pepelaz
Thanks a lot, this seems to be working!

Actually I'm using Magick.NET library (https://github.com/dlemstra/Magick.NET) to perform such conversion within .NET application. How can I translate with script to .NET code?

Re: Convert PSD with 2 alpha channels to TIFF

Posted: 2018-08-08T22:12:39-07:00
by fmw42
You will have to ask on the Magick.NET forum. I do not use that. I only use the command line. I will move this post that forum.