Page 1 of 1

Bug with the layers in PSD

Posted: 2011-03-05T17:41:53-07:00
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.

Re: Bug with the layers in PSD

Posted: 2011-03-05T18:13:12-07:00
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.

Re: Bug with the layers in PSD

Posted: 2011-03-09T21:57:08-07:00
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...