Bug with the layers in PSD

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
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Bug with the layers in PSD

Post by Drarakel »

It seems that the current IM can't read correctly some PSD files (files with only two layers - one 'normal' layer, and the composite layer).

Take this file: PSD (Edit: File now removed.)
(You could also take the PSD files that you find in that thread.)

Code: Select all

identify +ping logo1.psd
With my old ImageMagick v6.5.8-5, the file's alright and the result is:
logo1.psd[0] PSD 267x136 267x136+0+0 8-bit DirectClass 830KB 0.141u 0:00.156
logo1.psd[1] PSD 194x116 194x116+35+6 8-bit DirectClass 830KB 0.141u 0:00.156

With IM v6.6.3-7, there's only one layer - but at least the composite layer, so it still works somehow:
logo1.psd PSD 267x136 267x136+0+0 8-bit DirectClass 830KB 0.000u 0:00.000

But with the current version 6.6.8-0 (Q16, on WinXP), IM only sees the second layer:
logo1.psd PSD 194x116 194x116+35+6 8-bit DirectClass 830KB 0.000u 0:00.000

So, the canvas, and also the other effects (shadow) from the composite layer are missing.
Last edited by Drarakel on 2011-03-05T18:20:56-07:00, edited 1 time in total.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Bug with the layers in PSD

Post by magick »

We can reproduce the problem you posted and have a patch in ImageMagick 6.6.8-1 Beta available by sometime tomorrow. Thanks.
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: Bug with the layers in PSD

Post by Drarakel »

It works. Thank you!


A small question regarding the handling of PSDs.. Is it supposed to be like that now (with the current IM):

Code: Select all

identify logo1.psd
logo1.psd[0] PSD 267x136 267x136+0+0 8-bit DirectClass 830KB 0.000u 0:00.000
logo1.psd[1] PSD 194x116 194x116+35+6 8-bit DirectClass 830KB 0.000u 0:00.000

Code: Select all

identify -format "%wx%h" logo1.psd
267x136194x116
(PSD file now deleted - but you can get it again, if you need it.)
That's of course 'normal', if there are multiple images in one file.. But in older ImageMagick versions, PSDs were handled a bit differently - as a plain "identify" or a "identify -format" command only reported the properties of the first (composite) layer - which sort of makes sense for PSDs. And only with an additional "+ping", the properties of every single layer were reported. With IM v6.5.8-5:

Code: Select all

identify -format "%wx%h" logo1.psd
267x136

No big problem, of course...
Post Reply