colormap is NULL on Palette Matte TIFF

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
sanderton

colormap is NULL on Palette Matte TIFF

Post by sanderton »

Hello again!

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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

The most recent version of ImageMagick returns a type of TrueColor indicating there is no colormap. Previously it reported that the image could potentially be colormapped because the image had less than 256 unique colors.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 10 guests