This function takes contrast (dblContrast), brightness (dblBrightness) and gamma (dblGamma) parameters and calculates look-up tables accordingly and sets them into the corresponding options.
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ACCUAPI IG_dspl_gamma_correction_set( [IN] HIGEAR hIGear, [IN] DWORD dwGrpID, [IN] AT_MODE nFlags, [IN] DOUBLE dblContrast, [IN] DOUBLE dblBrightness, [IN] DOUBLE dblGamma ); |
Arguments:
Name | Type | Description | ||||
hIGear | HIGEAR | ImageGear handle of image. | ||||
dwGrpID | DWORD | Identifier of group in which to set look-up tables. | ||||
nFlags | AT_MODE |
Specify which look-up tables to set. Possible values are 0 or a combination of these flags:
|
||||
dblContrast | DOUBLE | Contrast value to use in calculations. You can use any value. | ||||
dblBrightness | DOUBLE | Brightness value to use in calculations. Must be in the range from -255.0 to +255.0. | ||||
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. |
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:
MFC
Example:
Copy Code | |
---|---|
HIGEAR hIGear; /* HIGEAR handle of image */ DWORD nGrpID; /* display group identifier */ ... IG_dspl_gamma_correction_set( hIGear, nGrpID, IG_DSPL_ALL_CHANNELS, 2.0, 120.0, 2.0 ); ... |
Remarks:
All look-up tables specified in the nFlagsparameter are initialized with the same value based on the dblContrast, dblBrightness, and dblGamma values.