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.
jn0101
Posts: 40 Joined: 2007-06-16T01:36:07-07:00
Post
by jn0101 » 2009-06-29T06:24:40-07:00
Using ImageMagick 6.4.5 2009-06-04 Q16 OpenMP on Ubuntu Linux and a PSD file with 3 layers:
(availabable at
http://javabog.dk/filer/psd/nem_154049_fc_JNSMALL.psd )
$ convert nem_154049_fc_JNSMALL.psd x.psd
$ convert x.psd y.psd
convert: maximum channels exceeded `x.psd' @ coders/psd.c/ReadPSDImage/858.
convert: missing an image filename `y.psd' @ wand/convert.c/ConvertImageCommand/2710.
$
Identify correctly shows the 3 layers:
$ identify nem_154049_fc_JNSMALL.psd
nem_154049_fc_JNSMALL.psd[0] PSD 248x239 248x239+0+0 8-bit DirectClass 346kb 0.190u 0:02
nem_154049_fc_JNSMALL.psd[1] PSD 248x239 248x239+0+0 8-bit DirectClass 346kb 0.190u 0:02
nem_154049_fc_JNSMALL.psd[2] PSD 24x14 24x14+158+200 8-bit DirectClass 346kb 0.180u 0:02
I can also extract each as tiff and view them in any tool. So reading is OK.
Ive just checked out the latest SVN version. Same result:
$ /usr/local/im/im6.5.4/bin/convert nem_154049_fc_JNSMALL.psd x.psd
$ /usr/local/im/im6.5.4/bin/convert x.psd y.psd
convert: maximum channels exceeded `x.psd' @ psd.c/ReadPSDImage/856.
convert: missing an image filename `y.psd' @ convert.c/ConvertImageCommand/2772.
However, it seems reading is broken in newest version: The layers are not found:
$ /usr/local/im/im6.5.4/bin/identify nem_154049_fc_JNSMALL.psd
nem_154049_fc_JNSMALL.psd PSD 248x239 248x239+0+0 8-bit DirectClass 346kb
I might be of interest to you that open source GIMP seems to be able to handle layers in PSD files.
Thanks for a great tool!
Jacob
magick
Site Admin
Posts: 11064 Joined: 2003-05-31T11:32:55-07:00
Post
by magick » 2009-07-02T13:08:19-07:00
The default is to ping the image which is quite efficient but only gets attributes from the first image. To get all the layers, type
identify +ping nem_154049_fc_JNSMALL.psd
jn0101
Posts: 40 Joined: 2007-06-16T01:36:07-07:00
Post
by jn0101 » 2009-07-02T16:16:38-07:00
Thanks for your reply.
You are absolutely right, using +ping makes newest IM also identify all 3 layers in the original file.
Code: Select all
$ /usr/local/im/im6.5.4/bin/identify +ping nem_154049_fc_JNSMALL.psd
nem_154049_fc_JNSMALL.psd[0] PSD 248x239 248x239+0+0 8-bit DirectClass 346kb
nem_154049_fc_JNSMALL.psd[1] PSD 248x239 248x239+0+0 8-bit DirectClass 346kb
nem_154049_fc_JNSMALL.psd[2] PSD 24x14 24x14+158+200 8-bit DirectClass 346kb
Thus, "only" remains that IM can read its own PSD files
Code: Select all
$ /usr/local/im/im6.5.4/bin/identify x.psd
x.psd PSD 248x239 248x239+0+0 8-bit DirectClass 388kb
(I suppose this is becaurs the extra layers are not examined when not using +ping)
Using +ping gives the same error as in the older 6.4.5:
Code: Select all
$ /usr/local/im/im6.5.4/bin/identify +ping x.psd
identify: maximum channels exceeded `x.psd' @ psd.c/ReadPSDImage/856.
magick
Site Admin
Posts: 11064 Joined: 2003-05-31T11:32:55-07:00
Post
by magick » 2009-07-02T16:50:15-07:00
Thus, "only" remains that IM can read its own PSD files
\
We're working on the problem. We'll have a fix within a day or two.