Page 1 of 1

converting gray image to color.

Posted: 2015-10-01T06:38:04-07:00
by hirofumi
I'm totally new to imagemagick, please help.
I need jpeg files in TrueColor, 3 channels with no exif info. so I converted gray image with command below,
convert gray.jpg -strip -colorspace YCbCr -type TrueColor result.jpg

GIMP recognized it was 3 channel RGB color.
but identify command below says it's grayscale.
identify -verbose result.jpg

which is true or command was something wrong?
versions are:
- imagemagick 6.9.1-6
- libjpeg v9a
- GIMP 2.8.14

With imagemagick 6.7.8.9, identified it sRGB in same commands above.
Images converted by 6.7.8.9 was identified grayscale by 6.9.1-6.

Thanks for any help.

Re: converting gray image to color.

Posted: 2015-10-01T07:53:10-07:00
by snibgo
"identify" tells you what the image is, after it has been read from the file. It doesn't tell you the type of data that is in the file.

Re: converting gray image to color.

Posted: 2015-10-01T08:49:09-07:00
by fmw42
IM was changing colorspace and grayscale during the 6.7.x series. So I would trust more the 6.9.x series. However, if the image has all 3 channels the same, then IM will say grayscale, while other software may still say RGB.

Re: converting gray image to color.

Posted: 2015-10-01T23:51:20-07:00
by hirofumi
Thanks snibgo and fmw42!
I understood how identify command behaves.
and decided to use IM 6.9.x series.