Page 1 of 1

PSD conversions not maintaining transparency

Posted: 2014-03-26T02:52:52-07:00
by Carter J
Hi,

We are trying to change resolution of PSD files, But the output PSD files background is turning into black.

Command used:
convert -alpha off -units pixelsperinch -resample 72 InputPSDFile.psd outputPSDFile.psd

input PSD FIle:
https://www.dropbox.com/s/6xp7ydegrv3wq ... SDFile.psd

Imagemagick version:
Version: ImageMagick 6.8.8-9 Q16

Ghost Script Version:
9.10

OS:
Windows 7

And,

Is there anyway to know how many layers present in a PSD file

Re: PSD conversions not maintaining transparency

Posted: 2014-03-26T03:50:41-07:00
by dlemstra
A psd file is not read by Ghostscript, we use our internal reader. It is not a vector image. Why do you need to add -alpha off when you want to keep transparency? I get the correct image with the following command:

Code: Select all

convert InputPSDFile.psd -units pixelsperinch -resample 72 outputPSDFile.psd

Re: PSD conversions not maintaining transparency

Posted: 2014-03-26T06:02:20-07:00
by Carter J
dlemstra wrote:A psd file is not read by Ghostscript, we use our internal reader. It is not a vector image. Why do you need to add -alpha off when you want to keep transparency? I get the correct image with the following command:

Code: Select all

convert InputPSDFile.psd -units pixelsperinch -resample 72 outputPSDFile.psd

Thanks, It worked.


Is there a way to know how many layers present in a PSD file ?

Re: PSD conversions not maintaining transparency

Posted: 2014-03-26T08:20:57-07:00
by dlemstra
You can get the number of layers like this:

Code: Select all

D:\Test\psd>identify -format "%n" InputPSDFile.psd
1
D:\Test\psd>identify -verbose -format "%n" InputPSDFile.psd
2
The first example will show you the incorrect number of layers but I just added this to my todo list to fix this. The second value is the number of 'images', this works because of the -verbose option that was added. The is the number of layers + the merged image. So this image contains only 1 layer.