API Reference Guide > Core Component API Reference > Core Component Functions Reference > Image Processing Functions > IG_IP_RGB_to_hue |
This function will convert a 24-bit RGB value to a hue value.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPIIG_IP_RGB_to_hue (
const LPAT_RGB lpRGB,
LPDOUBLE lpHue
);
|
Name | Type | Description |
---|---|---|
lpRGB | const LPAT_RGB | A long pointer to a structure of type AT_RGB containing three bytes of color information. |
lpHue | LPDOUBLE | A long pointer to a double containing the hue value that corresponds to the color specified by lpRGB. |
Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.
RGB – 24 bpp.
None
See the example for IG_FX_chroma_key() function.
You pass it a pointer to the AT_RGB structure of your choice, and it returns the hue angle (0.0 to 360) to you. This is useful before calling IG_FX_chroma_key() which requires a hue angle as one of its arguments. (ImageGear's pixel access functions only read and write RGB values.) You can use them to read the RGB value of a "background" pixel in the image which you wish to make transparent.