IM does not open a psd file

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
graemeNPS
Posts: 64
Joined: 2009-01-12T14:25:55-07:00

IM does not open a psd file

Post by graemeNPS »

We use ImageMagick with static libs, 8 bit (based on ImageMagick-6.5.9) in a dll to convert a variety of image formats to jpg for use as thumbnails.

We have a PSD file that ImageMagick will not open via our dll. It also cannot be displayed correctly in imdisplay.exe (6.6.1-Q8). It opens fine in Photoshop CS4. Could you please advise as to what is wrong with the file or if there is a fix needed in IM?

Our client has agreed to share the file with the IM community, please treat the file with confidentiality.

I have posted the file (Image_01D.psd) to our ftp site in this directory: /ImageMagick/

Try using the following credentials:

ftp.northplains.com
User name: publicforum
Password: 543publicforum123

graeme
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: IM does not open a psd file

Post by snibgo »

It sounds as if you are on Windows. On Windows 7, running a fairly recent IM (6.6.2-4), I can't find any problems. Specifically:

identify says Image_01D.psd has multiple CYMKA images. The comand

Code: Select all

convert Image_01D.psd imd.png
make the files imd-0.png, imd-1.png, imd-2.png, imd-3.png. Looking at these with Gimp, the first of these is transparent except for a gray strip on the left edge. The other three are photos of a bed.

"imdisplay Image_01D.psd" shows the same as Gimp on imd-0.png.

I conclude that if you upgrade, all may be okay.
snibgo's IM pages: im.snibgo.com
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: IM does not open a psd file

Post by magick »

Your image displayed properly with ImageMagick 6.6.2-6, the latest release.
graemeNPS
Posts: 64
Joined: 2009-01-12T14:25:55-07:00

Re: IM does not open a psd file

Post by graemeNPS »

In 6.5.9 this value is defined:
#define MaxPSDChannels 24
so the sample image (which has 42 channels) was failing in this code:
psd_info.channels=ReadBlobMSBShort(image);
if (psd_info.channels > MaxPSDChannels)
ThrowReaderException(CorruptImageError,"MaximumChannelsExceeded");

In 6.6.3, the maximum channels has been boosted:
#define MaxPSDChannels 56
so the file now opens.

Thanks,
Graeme
Post Reply