ImageGear Professional DLL v17.1 for Windows Accusoft
IG_IP_color_separate
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_color_separate

Glossary Item Box

This function is the reverse of IG_IP_color_combine_ex().

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_IP_color_separate (
        HIGEAR hIGearOrig,  
        LPHIGEAR lphIGear1,
        LPHIGEAR lphIGear2, 
        LPHIGEAR lphIGear3,
        LPHIGEAR lphIGear4, 
        AT_MODE nColorSpace 
);

Arguments:

hIGearOrig HIGEAR handle of the original image to be separated.
lphIGear1 Far pointer to an object of type HIGEAR to receive the handle of the separated channel 1 image.
lphIGear2 Far pointer to receive handle of channel 2 image.
lphIGear3 Far pointer to receive handle of channel 3 image.
lphIGear4 Far pointer to receive handle of channel 4 image.
nColorSpace A constant such as IG_COLOR_SPACE_RGB or IG_COLOR_SPACE_CMYK describing how the individual channels are to be separated or extracted.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear Professional.

Sample:

Color

Example:

  Copy Code
HIGEAR hIGear,    /* HIGEAR handle of input image  */
 hIGearRed, /* Handle of Red output image,   */
 hIGearGreen, hIGearBlue,   /* Green, Blue output images */
 hIGearNULL;    /* (Not used when IG_COLOR_SPACE_RGB)   */
AT_ERRCOUNT nErrcount;  /* Returned count of errors */
nErrcount = IG_IP_color_separate ( hIGear, &hIGearRed, &hIGearGreen, &hIGearBlue,
&hIGearNull, IG_COLOR_SPACE_RGB );

Remarks:

This function is the reverse of IG_IP_color_combine_ex(). See the description of that function. Each of the output images created by this function (lphIGear1, etc.) will be grayscale. That is, each will have a grayscale palette. The pixel values will be those obtained from the input image.

©2012. Accusoft Corporation. All Rights Reserved.