Page 1 of 1

convert black PNG to JPG forces a wrong colorspace (grayscal

Posted: 2007-07-19T03:31:52-07:00
by Kenan
When I try to convert a PNG file (completely black, but as RGB 24bit)
I always get a JPG in grayscale:

my command line:

convert test.PNG -type TrueColor test.JPG

I also tried:
convert test.PNG -colorspace RGB test.JPG

IM 6.3.5 Q16 on WinXP / WinXP64


The verbose line:

test.png=>Z:\test.jpg PNG 4096x4096 4096x4096+0+0 DirectClass 8-bit 64.1563kb 1.188u 0:02

Is this a bug, or am I to stupid to figure out the right options for the conversion?

Re: convert black PNG to JPG forces a wrong colorspace (grayscal

Posted: 2007-07-20T00:24:37-07:00
by anthony
No IM is just trying to be 'smart'. Perhaps too smart when a -type has been defined!

Re: convert black PNG to JPG forces a wrong colorspace (grayscal

Posted: 2007-07-25T10:22:18-07:00
by Kenan
.. and is there a way to bring IM to do what I want ?

Re: convert black PNG to JPG forces a wrong colorspace (grayscal

Posted: 2007-07-25T18:32:37-07:00
by magick
We include logic to produce a JPEG RGB image type when the -type option is used but we had an extraneous break statement probably due to a cut-n-paste error that prevented the code from being exercised. The problem is fixed in ImageMagick 6.3.5-4 Beta available sometime tommorrow.