ImageMagick6 icon indicating copy to clipboard operation
ImageMagick6 copied to clipboard

PSD to PNG: No transparency even with alpha channel

Open luisfdgon opened this issue 3 years ago • 3 comments

ImageMagick version

6.9.12-29

Operating system

Linux

Operating system, version and so on

Ubuntu 18 and Ubuntu 20

Description

Hi there,

I'm facing an issue when converting a PSD to PNG, it gets converted without background transparency even if an alpha channel is present.

I've tested with a couple of examples and this only occurs for a particular condition which is: PSD file has level and curve layers. If I delete those layers then the PNG gets correctly generated with transparency. I've tried with Ubuntu 18 and 20 systems with a simple "convert testimage.psd testimage.png"

Please note: I also tried with IM7 (7.1.0-14) and the behaviour is exactly the same.

I'm attaching the file so that someone can validate if this is a bug. I guess that if it is, then you'll need also to port it to IM7.

Thanks in advance!

Steps to Reproduce

testimage.psd.zip

convert testimage.psd testimage.png

Images

testimage.psd.zip

luisfdgon avatar Nov 17 '21 16:11 luisfdgon

What is expected? We get two images both with green backgrounds. This is the same results we get with other PSD applications. We do not have access to Photoshop to compare the results.

urban-warrior avatar Nov 21 '21 13:11 urban-warrior

Because this has an alpha channel, first image should be transparent. At least that is the behaviour in 6.9.7-10. And, as I said before, if I remove the color correction layers (curves and levels), then the first image gets generated with transparency. Seems that the curve and levels layers are somehow messing up with alpha channel transparency.

luisfdgon avatar Nov 26 '21 17:11 luisfdgon

Why should the PNG file have transparency after removing the levels and curves layers when the PSD file still shows a green background?

fmw42 avatar Jan 15 '22 23:01 fmw42