tiff -> jpeg colorspace issue (-type option ignored)
Posted: 2012-11-28T09:45:36-07:00
The input image is a grayscale TIFF file. I am trying to convert it to a 3 channel RGB JPEG.
Reproducible in these two versions on both Darwin and Linux:
Input image:
Convert command:
Output image:
The colorspace should be RGB with 3 channels, but instead it is still grayscale.
If I convert it to another tiff with -type TrueColor, it produces the expected RGB image with 3 channels.
Reproducible in these two versions on both Darwin and Linux:
Code: Select all
Darwin 12.1.0 Darwin Kernel Version 12.1.0: root:xnu-2050.9.2~1/RELEASE_X86_64 x86_64
Version: ImageMagick 6.8.0-2 2012-11-27 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenCL
Code: Select all
Linux 2.6.39-gentoo-r3-ps #3 SMP x86_64 Intel(R) Xeon(R) CPU E31220 @ 3.10GHz GenuineIntel GNU/Linu
Version: ImageMagick 6.7.8-7 2012-07-31 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
Input image:
Code: Select all
Image: in.tif
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 4781x3942+0+0
Resolution: 500x500
Print size: 9.562x7.884
Units: PixelsPerInch
Type: Grayscale
Base type: Grayscale
Endianess: MSB
Colorspace: Gray
Depth: 8-bit
Channel depth:
gray: 8-bit
Code: Select all
convert in.tif -type truecolor out.jpg
Code: Select all
Image: out.jpg
Format: JPEG (Joint Photographic Experts Group JFIF format)
Class: PseudoClass
Geometry: 4781x3942+0+0
Resolution: 500x500
Print size: 9.562x7.884
Units: PixelsPerInch
Type: Grayscale
Base type: Grayscale
Endianess: Undefined
Colorspace: Gray
Depth: 8-bit
Channel depth:
gray: 8-bit
If I convert it to another tiff with -type TrueColor, it produces the expected RGB image with 3 channels.