Page 1 of 1

cannot extract a jpeg from some 16 bit psd files

Posted: 2009-08-13T13:08:59-07:00
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?

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

Posted: 2009-08-14T00:31:13-07:00
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?

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

Posted: 2009-08-14T11:37:06-07:00
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.

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

Posted: 2009-08-14T11:51:27-07:00
by fmw42
try

display -depth 8 imagefile

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

Posted: 2009-08-14T12:16:31-07:00
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.