ImageGear Professional > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Image Processing Functions > 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.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_IP_color_promote( HIGEAR hIGear, AT_MODE nPromoteTo ); |
Name | Type | Description |
hIGear | HIGEAR | HIGEAR handle of image. |
nPromoteTo | AT_MODE | Specifies the depth to which to promote. See enumIGPromotionModes for possible values. |
All pixel formats supported by ImageGear Professional.
For Indexed images, bit depth should be no less than the depth specified by the nPromoteTo parameter. |
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); } |
This function is only kept for backward compatibility reasons. Please use IG_image_colorspace_convert and IG_image_channel_depths_change instead.