ImageGear for C and C++ on Windows v20.5 - Updated
IG_IP_RGB_to_hue
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.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPIIG_IP_RGB_to_hue (
        const LPAT_RGB lpRGB, 
        LPDOUBLE lpHue 
);

Arguments:

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.

Return Value:

Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.

Supported Raster Image Formats:

RGB – 24 bpp.

Sample:

None

Example:

See the example for IG_FX_chroma_key() function.

Remarks:

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.

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