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. |
Error count.
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, c1...cn, fall within the specified ranges.