How to handle tiff with 2 channels only
Posted: 2010-08-13T03:22:54-07:00
I would like to use IM to work on some tiff images that were extracted from a multipage microscopy file (.lsm, Zeiss format, tiff based). The problem I think I am having is that there are 2 channels only on the tiff files (see below) and IM can't quite work with that. For example,
% convert -separate -channel R image.tif foo.pgm
convert: Sorry, can not handle RGB image with Color channels=2. `image.tif' @ tiff.c/TIFFErrors/493.
generates 'foo.pgm' with correct bit depth and size but it doesn't really copy pixel values (foo.pgm is a total black image).
Is there a proper way of extracting each channel of such images with IM ? I don't like the fact that image.tif is tagged as a RGB color image but only comes with 2 samples per pixel, but that's what I have to deal with.
- Alex.
alex [208] : tiffinfo image.tif
TIFF Directory at offset 0x441008 (4460552)
Subfile Type: (0 = 0x0)
Image Width: 1056 Image Length: 1056
Bits/Sample: 16
Compression Scheme: LZW
Photometric Interpretation: RGB color
Samples/Pixel: 2
Planar Configuration: separate image planes
Predictor: horizontal differencing 2 (0x2)
% convert -separate -channel R image.tif foo.pgm
convert: Sorry, can not handle RGB image with Color channels=2. `image.tif' @ tiff.c/TIFFErrors/493.
generates 'foo.pgm' with correct bit depth and size but it doesn't really copy pixel values (foo.pgm is a total black image).
Is there a proper way of extracting each channel of such images with IM ? I don't like the fact that image.tif is tagged as a RGB color image but only comes with 2 samples per pixel, but that's what I have to deal with.
- Alex.
alex [208] : tiffinfo image.tif
TIFF Directory at offset 0x441008 (4460552)
Subfile Type: (0 = 0x0)
Image Width: 1056 Image Length: 1056
Bits/Sample: 16
Compression Scheme: LZW
Photometric Interpretation: RGB color
Samples/Pixel: 2
Planar Configuration: separate image planes
Predictor: horizontal differencing 2 (0x2)