Page 1 of 1

PSD to PNG layer issue

Posted: 2018-01-05T04:57:48-07:00
by schtorch
Hi,

i have a test PSD that I convert to PNG using ImageMagick. When using -flatten, the result is a complete red image. When not flattening it, I get three files and one is correct.

Command that produces the red only image:

Code: Select all

convert psd_test.psd -flatten -verbose -version test.png
Version: ImageMagick 7.0.7-16 Q16 x86_64 20171224 http://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules 
Delegates (built-in): bzlib cairo djvu fftw flif fontconfig fpx freetype gvc jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png raw rsvg tiff webp wmf x xml zlib
psd_test.psd=>test.png PSD 5100x6600 5100x6600+0+0 8-bit sRGB 60589B 2.730u 0:02.839
Command that produces three images, test-0.png is correct (so ImageMagick can do it) and I assumed to get it with the command above:

Code: Select all

convert psd_test.psd -verbose -version test.png
Version: ImageMagick 7.0.7-16 Q16 x86_64 20171224 http://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules 
Delegates (built-in): bzlib cairo djvu fftw flif fontconfig fpx freetype gvc jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png raw rsvg tiff webp wmf x xml zlib
psd_test.psd=>test.png[0] PSD 5100x6600 5100x6600+0+0 8-bit sRGB 204086B 2.890u 0:03.160
psd_test.psd=>test.png[1] PSD 5100x6600 5100x6600+0+0 8-bit sRGB 5554B 3.400u 0:03.669
psd_test.psd=>test.png[2] PSD 2451x737 2451x737+1030+2586 8-bit sRGB 28056B 3.480u 0:03.750
Link to the PSD file:
https://www.dropbox.com/s/9l733ig27bh2x ... t.psd?dl=0

Any help is appreciated.

Re: PSD to PNG layer issue

Posted: 2018-01-05T05:42:42-07:00
by Bonzo
A PSD file still contains all the layers and the first layer is the completed image. So try:

Code: Select all

convert psd_test.psd[0] test.png

Re: PSD to PNG layer issue

Posted: 2018-01-05T09:13:35-07:00
by schtorch
Bonzo wrote: 2018-01-05T05:42:42-07:00 A PSD file still contains all the layers and the first layer is the completed image. So try:

Code: Select all

convert psd_test.psd[0] test.png
Thank you this worked!

Re: PSD to PNG layer issue

Posted: 2018-01-05T12:34:51-07:00
by magick
The problem seems to be that the second layer is lettering for "600 dpi" in red so when you flatten the layers, it blends with the red background. If the second layer was white, like it is in the composite, you would get expected results, i.e. 600 dpi in white lettering written on a red background;