Hi,
I'm trying to convert PSD with gray color scheme to jpeg or something else, but always getting it wrong.
IM version is 6.8.6-6
Here the sample picture and output result(1.jpg):
https://www.dropbox.com/s/fg2vw3ga747be ... sample.zip
Thank you for looking into it.
Can not convert gray PSD file to another format correctly
-
- Posts: 2
- Joined: 2013-09-16T11:47:00-07:00
- Authentication code: 6789
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Can not convert gray PSD file to another format correctl
With a variety of IM version, "identify GRAY_sample.psd" crashes.
Gimp opens the file without complaint.
Gimp opens the file without complaint.
snibgo's IM pages: im.snibgo.com
-
- Posts: 2
- Joined: 2013-09-16T11:47:00-07:00
- Authentication code: 6789
Re: Can not convert gray PSD file to another format correctl
it works on my machine(Macos Lion):
identify /temp/gray_sample.psd
/temp/gray_sample.psd PSD 1236x2968 1236x2968+0+0 16-bit Gray 256c 7.358MB 0.040u 0:00.039
The file saved from Adobe Photoshop CS6
identify /temp/gray_sample.psd
/temp/gray_sample.psd PSD 1236x2968 1236x2968+0+0 16-bit Gray 256c 7.358MB 0.040u 0:00.039
The file saved from Adobe Photoshop CS6
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Can not convert gray PSD file to another format correctl
I get the same bad jpg result using
convert GRAY_sample.psd -strip +profile "*" -depth 8 -type grayscale tmp.jpg
on IM 6.8.6.9 Q16 Mac OSX Snow Leopard.
It works fine if you expert the PSD as 8-bit grayscale and then use
convert GRAY_sample_8bit.psd tmp.jpg
It does look to me like a bug in IM decoding 16-bit grayscale PSD.
convert GRAY_sample.psd -strip +profile "*" -depth 8 -type grayscale tmp.jpg
on IM 6.8.6.9 Q16 Mac OSX Snow Leopard.
It works fine if you expert the PSD as 8-bit grayscale and then use
convert GRAY_sample_8bit.psd tmp.jpg
It does look to me like a bug in IM decoding 16-bit grayscale PSD.
Re: Can not convert gray PSD file to another format correctl
I can confirm this is a bug in ImageMagick. When I make the change below to line 854 of psd.c the problem seems to be fixed.
Line 660 of psd.c can use an index that is higher then 256 and this will result in a crash. I am not sure of this is the correct way to solve the issue so I will let magick commit the change.
Code: Select all
if (AcquireImageColormap(image, psd_info.depth != 16 ? 256 : 65536) == MagickFalse)
Re: Can not convert gray PSD file to another format correctl
We'll get a patch in ImageMagick Subversion trunk by sometime tomorrow. Thanks.