cannot extract a jpeg from some 16 bit psd files

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
graemeNPS
Posts: 64
Joined: 2009-01-12T14:25:55-07:00

cannot extract a jpeg from some 16 bit psd files

Post by graemeNPS »

Our client has some 16bit PSD files that cannot be converted correctly by ImageMagick 6.4.6 SDK or displayed correctly by IMDisplay (6.5.4.Q8). The resulting images have incorrect colors, and chunks appears in the wrong places. However, other 16bit PSDs can be converted/displayed correctly. We have still not determined what is the determining factor.

If we resave the offending images with ICC Profile: Adode RGB (1968) turned off, ImageMagick can convert/display the resaved file.

We use imagemagick to extract from most image file types smaller jpegs for thumbnails. We use a generic convert command in our code and insert the source and output file names when needed:
"convert -auto-orient -size 2800x3528 ???\My Documents\TScopeTestMedia\psd\DEF0000030653\ClientFile.psd[0]
-alpha Off -resize 512x512 -profile CMYK.icc -profile sRGB.icm +profile "*" ???\LOCALS~1\Temp\4860viewx.jpg "

We have code to process the possibility of exceptions "ColorspaceColorProfileMismatch" or "Color profile operates on another colorspace"

I have tried other command lines combos without luck, but the fact that IMDisplay does not display the files correctly suggests ImageMagick cannot handle the original files.

I have no idea why resaving the psd with ICC Profile: Adode RGB (1968) turned off makes a difference.

Our client will not release to a third party the files I am testing with; I will try to get a sample to demo the problem ASAP.

Any thoughts?
Heiler81
Posts: 63
Joined: 2009-03-12T01:52:24-07:00
Authentication code: 8675309
Location: Germany, Stuttgart

Re: cannot extract a jpeg from some 16 bit psd files

Post by Heiler81 »

You are using a Q8 = 8 Bit Color Version and you want to convert a 16 Bit Color File. Did you try to use a Q16 Verison?
graemeNPS
Posts: 64
Joined: 2009-01-12T14:25:55-07:00

Re: cannot extract a jpeg from some 16 bit psd files

Post by graemeNPS »

I initially tested with an IMDisplay Q16 version, but got the same results. I switched to IMDisplay (6.5.4.Q8) to see if it would make a difference.

Today I have noticed that if I resave the file as a copy, it also works correctly in ImageMagick, both in our code and in IMDisplay.

I am using Adobe Photoshop CS2.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: cannot extract a jpeg from some 16 bit psd files

Post by fmw42 »

try

display -depth 8 imagefile
graemeNPS
Posts: 64
Joined: 2009-01-12T14:25:55-07:00

Re: cannot extract a jpeg from some 16 bit psd files

Post by graemeNPS »

For (eg) the fish.psd file from photoshop samples files directory, if I use this command line:
>display fish.psd
I get a Windows message box:
display: unable to open X server @ display.c/DisplayImageCommand/420[No such file or directory]

The following works OK, so my installation is OK:
>convert fish.psd fish.jpg

BTW, in our build of the libraries, in magick-config.h we have:
#define MAGICKCORE_QUANTUM_DEPTH 8
because performance was too slow when we had it at the default of 16.
Post Reply