ImageGear Professional DLL v17.1 for Windows Accusoft
IG_IP_RGB_to_hue
Send Feedback  
ImageGear Professional DLL v17.1 for Windows > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Image Processing Effects Functions > IG_IP_RGB_to_hue

Glossary Item Box

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:

lpRGB A long pointer to a structure of type AT_RGB containing three bytes of color information.
lpHue 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.

©2012. Accusoft Corporation. All Rights Reserved.