ImageGear for C and C++ on Windows v19.10 - Updated
IG_dspl_gamma_correction_LUT_build
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Display Functions > IG_dspl_gamma_correction_LUT_build

This function builds look-up tables from given contrast, brightness and gamma values.

Declaration:

 
Copy Code
AT_ERRCOUNT  ACCUAPI  IG_dspl_gamma_correction_LUT_build(
        [IN] DOUBLE dblContrast,
        [IN] DOUBLE dblBrightness,
        [IN] DOUBLE dblGamma,
        [OUT] LPBYTE lpLUT
);

Arguments:

Name Type Description
dblContrast DOUBLE Contrast value to use in calculations. You can use any value.
dblBrightness DOUBLE Brightness value to use in calculations. Must be within the -255.0 to +255.0 range.
dblGamma DOUBLE Gamma value to use in calculations. Must be greater than 0.0, however the most useful values are in the range from 1.8 to 2.2.
lpLUT LPBYTE Pointer to 256 byte array in which to calculate the look-up table.

Return Value:

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

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Sample:

MFC

Example:

 
Copy Code
BYTE lut[256];    /* lookup array  */
 ...
IG_dspl_gamma_correction_LUT_build( 2.0, 120.0, 2.0, lut );