[C++] How to get "Transparent color"
Posted: 2006-10-23T13:24:45-07:00
Hey Everybody!
Does anyone know how to get the "Transparent Color" from an image? I know how to get the alpha channel, it's the mask color I need.
IM's identify utility gives the following output for my test image:
I need to get the last parameter, Transparent color: black, using Magick++ code.
Now, according to the Magick::Image Class online documentation page, the matte() function is described as follows:
But when I call Image::matte(), it returns false on my image.
Any help/ideas would be greatly appreciated.
Thanks as always,
sanderton
Does anyone know how to get the "Transparent Color" from an image? I know how to get the alpha channel, it's the mask color I need.
IM's identify utility gives the following output for my test image:
Code: Select all
Image: C:\testing\TIFF\Jazz.tif
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 1582x2252
Type: TrueColor
Endianess: MSB
Colorspace: RGB
Channel depth:
Red: 8-bit
Green: 8-bit
Blue: 8-bit
Channel statistics:
...
Colors: 247685
Rendering intent: Undefined
Resolution: 300x300
Units: PixelsPerInch
Filesize: 17.8355mb
Interlace: None
Background color: white
Border color: #DFDFDF
Matte color: grey74
Transparent color: black
...
Now, according to the Magick::Image Class online documentation page, the matte() function is described as follows:
True if the image has transparency.
But when I call Image::matte(), it returns false on my image.
Any help/ideas would be greatly appreciated.
Thanks as always,
sanderton