Page 1 of 1

PSD transparency incorrectly detected and handled

Posted: 2014-05-26T16:47:21-07:00
by lepidosteus
After an update to the version of image magick, I've come across an issue where PSD with transparency are incorrectly detected as having none, leading notably to a loss of any transparency when converting to another format supporting it such as PNG

Code: Select all

$ convert -version
Version: ImageMagick 6.8.9-0 Q8 x86_64 2014-04-30 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
$ convert test.psd[0] -format "width=%w height=%h transparent=%A colorspace=%[colorspace]" info:
width=1128 height=994 transparent=False colorspace=sRGB
$ identify -verbose test.psd[0]
Transparent color: black
Older version of image magick used to detect and handle it properly

Code: Select all

$ convert -version
Version: ImageMagick 6.7.7-10 2014-03-06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
$ convert test.psd[0] -format "width=%w height=%h transparent=%A colorspace=%[colorspace]" info:
width=1128 height=994 transparent=True colorspace=sRGB
$ identify -verbose test.psd[0]
Transparent color: none
Two sample PSD exhibiting the issue (the image displayed is a PNG, to get the PSD please click "Download" at the top right):
http://sta.sh/01u41zwkjp8e
http://sta.sh/065xxj5jjnp

(additionally you can see the issue in question in those preview png, with the background as black instead of transparent)


Is this is a known issue, or is there any workaround ?

Re: PSD transparency incorrectly detected and handled

Posted: 2014-05-26T22:26:23-07:00
by dlemstra
I have made some fixes to the PSD read last year but it seems I also broke something during my refactoring. I will submit a patch to our SVN repository later today and it should be available in ImageMagick 6.8.9-2 Beta by sometime tomorrow.

Re: PSD transparency incorrectly detected and handled

Posted: 2014-05-29T06:20:25-07:00
by lepidosteus
Thanks, the issue is fixed in latest source from beta

Re: PSD transparency incorrectly detected and handled

Posted: 2014-09-08T17:48:18-07:00
by blue-j
Hi there, and big thanks as always to the developers and community. I'm writing to check on the overall support of transparency in PSD/PSB/Adobe TIFFs.

Last I knew, IM did not support recognition of background transparency in these file types and multiple alpha channels were also not handled properly. Is this still the case? I see this thread and expect perhaps there has been some movement in this regard that I wasn't aware of.

Thank you for your time!
J

Re: PSD transparency incorrectly detected and handled

Posted: 2014-09-08T17:52:24-07:00
by snibgo
IM has only one alpha channel. If an input has more than one, others will be ignored.

Re: PSD transparency incorrectly detected and handled

Posted: 2014-09-08T18:02:11-07:00
by fmw42
I believe that IM now detects either background or alpha transparency. But I do not think it can handle multiple transparencies, yet.

IM 7 will support multiple transparecies, but I do not know if the PSD/TIFF reader can deal with it yet.