PSD transparency incorrectly detected and handled

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
lepidosteus
Posts: 2
Joined: 2014-05-26T05:43:33-07:00
Authentication code: 6789

PSD transparency incorrectly detected and handled

Post 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 ?
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: PSD transparency incorrectly detected and handled

Post 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.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
lepidosteus
Posts: 2
Joined: 2014-05-26T05:43:33-07:00
Authentication code: 6789

Re: PSD transparency incorrectly detected and handled

Post by lepidosteus »

Thanks, the issue is fixed in latest source from beta
blue-j
Posts: 68
Joined: 2007-06-12T14:03:18-07:00

Re: PSD transparency incorrectly detected and handled

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: PSD transparency incorrectly detected and handled

Post by snibgo »

IM has only one alpha channel. If an input has more than one, others will be ignored.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: PSD transparency incorrectly detected and handled

Post 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.
Post Reply