ImageGear for C and C++ on Windows v20.0 - Updated
IG_load_color_reduction_set
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Load Functions > IG_load_color_reduction_set

This function instructs ImageGear to perform color reduction to reduce the number of Bits Per Pixel whenever loading an image whose bit depth is greater than that specified by nColorReduceMode.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_load_color_reduction_set(
   UINT nColorReduceMode
);

Arguments:

Name Type Description
nColorReduceMode UINT One of enumLoadColor enumeration values. IG_LOAD_COLOR_DEFAULT means that no color reduction is wanted.

Return Value:

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

Supported Raster Image Formats:

This function does not process image pixels.

Sample:

None

Example:

 
Copy Code
/* Reduce 24-bit images to 8-bit when loading: */
AT_ERRCOUNT nErrCount = IG_load_color_reduction_set ( IG_LOAD_COLOR_8 );

Remarks:

The bit depth is reduced to 8, 4, or 1 as specified. Call with nColorReduceMode = IG_LOAD_COLOR_DEFAULT to disable color reduction.

 See also IG_load_color_reduction_get() function.
Is this page helpful?
Yes No
Thanks for your feedback.