Conversion of 8-bit grayscale PSD images fails

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
eschjott

Conversion of 8-bit grayscale PSD images fails

Post by eschjott »

IM seems to have a problem converting 8-bit grayscale PSD images. For testing I created a sample 8-bit, grayscale image in Photoshop and saved as PSD. Then I executed the command:

convert psdgray.psd psdgray.png

The resulting png image is no longer grayscale, but RGB and has a strange cyan'ish color.

I'm using ImageMagick 6.5.7-0 on a Mac, but I've tested the Windows version as well with the same result.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Conversion of 8-bit grayscale PSD images fails

Post by magick »

What happens if you add -colorspace rgb to your command line?
eschjott

Re: Conversion of 8-bit grayscale PSD images fails

Post by eschjott »

I tried the command

convert -colorspace RGB psdgray.psd psdgray.png

but with the same result. If I save the psdgray.psd in 16-bit, it works fine.

Another problem is that the ICC profile saved by ImageMagick seems to be invalid. I get this message from Photoshop CS4, when opening the .png file:

"The embedded ICC profile cannot be used because the ICC profile is invalid. Ignoring the profile."

I tried saving the .psd file without an ICC profile to see if that what the problem, but still I get the same "cyan"ish image out of ImageMagick.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Conversion of 8-bit grayscale PSD images fails

Post by fmw42 »

suggestion:check your version of IM and ghostscript and perhaps upgrade if old
x3Ray

Re: Conversion of 8-bit grayscale PSD images fails

Post by x3Ray »

Exactly the same problem here. I have a PSD file (saved with Photoshop CS 2 for Mac) and want to convert it to TIF file (using recent IM command line version for Windows). There is no color profile embedded in the psd file.

Converting results in an image with just cyan colors instead of grey; I tried all of the colorspace params but only "Gray" (and Rec601Luma / Rec709LumA) resulted in something that is kind of what it should be (but way too pale).

Here is an example of the three images, from left to right:
1. original PSD file with grey colors
2. the image using "convert image.psd image.tif"
3. the image using "convert -colorspace Gray image.psd image.tif"

Image

It is possible to open the PSD file with Gimp and then save it as a TIF file, and everything is fine. But it would be much better if I could do that conversion with IM. :)

Any idea what could cause that problem and how to solve it?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Conversion of 8-bit grayscale PSD images fails

Post by magick »

Post a URL to your original PSD image. We need to download it and reproduce the problem before we can offer any help.
x3Ray

Re: Conversion of 8-bit grayscale PSD images fails

Post by x3Ray »

I hope you don't mind for uploading the file to a filehoster (original file is about 21 MB, used winrar to reduce the size a bit):
http://www.filefactory.com/file/a22e8cb/n/522.rar

Download link is on bottom of that page.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Conversion of 8-bit grayscale PSD images fails

Post by magick »

We can reproduce the problem you posted and will have a fix in ImageMagick 6.5.9-3 Beta by sometime tomorrow. Thanks.
Post Reply