ImageGear Professional for Linux
IG_IP_color_promote

This function promotes an image to the common pixel formats of 4-bit Indexed, 8-bit Indexed, 24-bit RGB, or 32-bit CMYK.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_IP_color_promote(
   HIGEAR hIGear,
   AT_MODE nPromoteTo
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle of image.
nPromoteTo AT_MODE Specifies the depth to which to promote. See enumIGPromotionModes for possible values.

Return Value:

Returns 0 if successful. Otherwise, returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear Professional.

For Indexed images, bit depth should be no less than the depth specified by the nPromoteTo parameter.

Example:

 
Copy Code
HIGEAR hIGear;            // HIGEAR handle of the image
AT_ERRCOUNT nErrcount;    // Count of errs on stack upon ret from func

// Load image file "picture.tif", 1 bpp, from working directory
nErrcount = IG_load_file("picture.tif", &hIGear);
if(nErrcount == 0)
{
    // Promote to RGB 24
    nErrcount = IG_IP_color_promote(hIGear, IG_PROMOTE_TO_24);
    // ...
    // Destroy the image
    IG_image_delete(hIGear);
}

Remarks:

This function is only kept for backward compatibility reasons. Please use IG_image_colorspace_convert and IG_image_channel_depths_change instead.

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback