This function colors all pixels in an 8-bit gray level image whose values are outside the range nLow to nHigh.
|
Copy Code
|
|
|---|---|
AT_ERRCOUNT ACCUAPI IG_IP_pseudocolor_limits (
HIGEAR hIGear,
LPAT_RGB lpRGB_Low,
LPAT_RGB lpRGB_High,
AT_PIXEL nLow,
AT_PIXEL nHigh
);
|
|
| Name | Type | Description |
|---|---|---|
| hIGear | HIGEAR | HIGEAR handle of 8-bit grayscale image to be colored. |
| lpRGB_Low | LPAT_RGB | Far pointer to an AT_RGB struct (note: B-G-R) specifying the color to apply to all pixels below the nLow value. |
| lpRGB_High | LPAT_RGB | Far pointer to an AT_RGB struct (note: B-G-R) specifying the color to apply to all pixels above the nHigh value. |
| nLow | AT_PIXEL | All pixels below this value are colored. |
| nHigh | AT_PIXEL | All pixels above this value are colored. |
Returns the number of ImageGear errors that occurred during this function call.
Grayscale – 8-16 bpp.
None
|
Copy Code
|
|
|---|---|
HIGEAR hIGear; /* HIGEAR handle of image */ AT_RGB cLowColor, cHighColor; /* The colors to apply */ AT_PIXEL nLow, nHigh; /* Where to apply them */ cLowColor.b = cLowColor.g = 0; cLowColor.r = 255; /* bright red */ cHighColor.b = cHighColor.r = 0; cHighColor.g = 255; /* bright green*/ /* Retain image colors for pixel values 25 through 225: */ nLow = 25; nHigh = 225; IG_IP_pseudocolor_limits ( hIGear, &cLowColor, &cHighColor, nLow, nHigh ); |
|
Those values above the range receive the color pointed to by lpRGB_High, and those below the range receive the color pointed to by lpRGB_Low. This function can be used to see how much of the image is saturated or unsaturated.