PSD to PNG layer issue

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
schtorch
Posts: 12
Joined: 2013-05-16T11:21:04-07:00
Authentication code: 6789

PSD to PNG layer issue

Post by schtorch » 2018-01-05T04:57:48-07:00

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.

Bonzo
Posts: 2963
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: PSD to PNG layer issue

Post by Bonzo » 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

schtorch
Posts: 12
Joined: 2013-05-16T11:21:04-07:00
Authentication code: 6789

Re: PSD to PNG layer issue

Post by schtorch » 2018-01-05T09:13:35-07:00

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!

User avatar
magick
Site Admin
Posts: 10791
Joined: 2003-05-31T11:32:55-07:00

Re: PSD to PNG layer issue

Post by magick » 2018-01-05T12:34:51-07:00

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;

Post Reply