ImageGear for C and C++ on Linux v20.0 - Updated
API Reference Guide > PDF Component API Reference > PDF Component Objects Reference > Page Editing Objects and Elements > HIG_PDE_IMAGE > IG_PDE_image_get_color_mask

Use this function to obtain the Mask entry from the image dictionary.


Copy Code
AT_ERRCOUNT ACCUAPI IG_PDE_image_get_color_mask(
        HIG_PDE_IMAGE hImage,
        LPLONG lpMask,
        LPUINT lpnLen


Name Type Description
hImage HIG_PDE_IMAGE The image object whose color mask is obtained.
lpMask LPLONG A pointer to the array of LONG values to fill with color mask values. lpMask must contain enough values to hold the entire color mask array.
lpnLen LPUINT The number of color mask elements obtained by the method - size of lpMask array.

Return Value:

Error count.

Supported Raster Image Formats:

This function does not process image pixels.


The mask entry is an array specifying a range of colors to be masked out. Samples in the image that fall within this range are not painted, allowing the existing background to show through. The effect is similar to that of the video technique known as chroma-key.

The value of each Mask entry is an array of 2n integers, [min1 max1 ... minn maxn], where n is the number of color components in the image's color space. Each integer must be in the range 0 to (2^BitsPerComponent - 1), representing color values before decoding with the Decode array. An image sample is masked (not painted) if all of its color components before decoding,, fall within the specified ranges.

Is this page helpful?
Yes No
Thanks for your feedback.