Cannot read properly simple psd file with ImageMagick 6.9.1-7

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
246246
Posts: 190
Joined: 2015-07-06T07:38:22-07:00
Authentication code: 1151

Cannot read properly simple psd file with ImageMagick 6.9.1-7

Post by 246246 »

Input image is here: https://www.dropbox.com/s/swc28z9jtrcey ... o.psd?dl=0
It should show text "Hello!" on transparent background. The file can be read properly with Gimp 2.8.10 and Photoshop CS6.

Here shows the warnings from Windows command:

Code: Select all

C:>identify -version
Version: ImageMagick 6.9.1--7 Q16 x86 2015-07-04 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP
Delegates (built-in): bzlib cairo freetype jng jp2 jpeg lcms lqr openexr pangoca
iro png ps rsvg tiff webp xml zlib

C:>identify -verbose Hello.psd | find /I "warning"
identify.exe: CompressionNotSupported '8239' @ warning/psd.c/ReadPSDChannel/1098.
identify.exe: CompressionNotSupported '15420' @ warning/psd.c/ReadPSDChannel/1098.
identify.exe: CompressionNotSupported '65280' @ warning/psd.c/ReadPSDChannel/1098.
There are no warning/error output with the same command above from IM 6.9.1-6 on Windows and 6.9.1-3 in Cygwin - using grep instead, both of which show properly the image with display command.

Best wishes,
Last edited by 246246 on 2015-07-09T05:26:39-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Cannot read properly simple psd file with ImageMagick 6.9.1-7

Post by fmw42 »

Those are only warning messages. However, the image is corrupted when displayed in Imagemagick 6.9.1.7. It does open fine in PS (CS). If I save it from PS without any changes, then it displays fine in IM. Did you save with maximum compatibility?
246246
Posts: 190
Joined: 2015-07-06T07:38:22-07:00
Authentication code: 1151

Re: Cannot read properly simple psd file with ImageMagick 6.9.1-7

Post by 246246 »

Thank you for your reply. Oddly, It corrupts like the following:

6.9.1-6 result of display
Image
6.9.1-7 result of display
Image

As you said, when I resave it as another file with PS (with maximum compatibility option), it can be read fine also with 6.9.1-7, but still output the same warnings (that are not produced when using IM 6.9.1-6).
Last edited by 246246 on 2015-07-09T05:27:53-07:00, edited 2 times in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Cannot read properly simple psd file with ImageMagick 6.9.1-7

Post by fmw42 »

The warnings do not mean anything significant to the processing of the image. As long as they are warnings and not errors. I do not know what has been upgraded in I 6.9.1.7 from 6.9.1.6. The IM developers would have to comment. But PSD and TIFF have been improved to add new features in the last few releases. See the changelog at http://www.imagemagick.org/script/changelog.php, which seems to be missing the 6.9.1.7 changes.
246246
Posts: 190
Joined: 2015-07-06T07:38:22-07:00
Authentication code: 1151

Re: Cannot read properly simple psd file with ImageMagick 6.9.1-7

Post by 246246 »

At a glance, something has changed to in reading layers.
http://fossies.org/diffs/ImageMagick/6. ... -diff.html
Removing call of DiscardBlobBytes() might cause this problem, but I have no debugging environment now. So it's just a guess.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Cannot read properly simple psd file with ImageMagick 6.9.1-7

Post by fmw42 »

I see nothing in the changelog now regarding changes to PSD files. But changes could have been made and not commented in the changelog or were a ramification of some other changes elsewhere. I think the IM developers will need to comment and check this out.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Cannot read properly simple psd file with ImageMagick 6.9.1-7

Post by dlemstra »

This is indeed a problem with the PSD reader and it will be resolved in 6.9.1-8. Its happening due to the change of 'if (length > 0)'. This has been fixed in the latest beta.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Post Reply