I'm having some trouble getting the colormap from a paletted matte TIFF image.
I get the following output from identify -verbose:
Image: C:\testing\TIFF\TIFF_RGB_ICC_mask.tif
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 504x360
Type: PaletteMatte
Endianess: MSB
Colorspace: RGB
Channel depth:
Red: 8-bit
Green: 7-bit
Blue: 1-bit
Alpha: 8-bit
Channel statistics:
... (removed for relevancy)
Alpha: ( 0, 0, 0,255) #000000FF
Colors: 222
Histogram:
... (removed for relevancy)
Rendering intent: Undefined
Resolution: 72x72
Units: PixelsPerInch
Filesize: 735.742kb
Interlace: None
Background color: white
Border color: #DFDFDF00
Matte color: grey74
Transparent color: none
Page geometry: 504x360+0+0
Dispose: Undefined
Iterations: 0
Compression: None
Orientation: TopLeft
Signature: bd96be9993d1428126b02b19abcb3c3b5a504f237f2843029968d5bb5be80a40
Software: Adobe Photoshop CS2 Windows
Timestamp: 2006:05:30 10:37:26
... (profiles removed for relevancy)
Tainted: False
User time: 0.031u
Elapsed time: 0:01
Pixels per second: 5.58156mb
Version: ImageMagick 6.2.9 08/21/06 Q8 http://www.imagemagick.org
However, when I open this file from my C++ code, using the Image::read() function, here is what the image object contains (only the relevant members are shown):
- _image 0x07563028
storage_class DirectClass
colorspace RGBColorspace
compression NoCompression
quality 0
orientation TopLeftOrientation
taint MagickFalse
matte MagickTrue
columns 504
rows 360
depth 8
colors 0
+ colormap 0x00000000
x_resolution 72.000000000000000
y_resolution 72.000000000000000
+ filename 0x075631e8 "C:\testing\TIFF\TIFF_RGB_ICC_mask.TIF"
+ magick_filename 0x075641e8 "C:\testing\TIFF\TIFF_RGB_ICC_mask.TIF"
+ magick 0x075651e8 "TIFF"
magick_columns 504
magick_rows 360
debug MagickFalse
reference_count 1
signature 2880220587
Does anyone have any idea why the colors member is 0 and the colormap is NULL, when the identify -verbose indicates otherwise? Or have I really misunderstood something?! I'd really appreciate any ideas here.
Thanks!
sanderton