Description This function will compute gamma correction on the input DIB. The input DIB must be 24 bit per pixel. Gamma correction of an image means non-linear scaling of the pixel values. The factor of the scaling can be specified separately to the three color channel. Gamma correction is processed to the red channel by the following equation (and similarly to the other channels):
.
Examples
The original 460 x 555 pixel color image and the gamma corrected image with 130 valued factor for all color channels.
Syntax RetVal = [BIImage.]GammaCorrection hDib nRed nGreen nBlue bShowProgress hParent
Returns RetVal LONGLONG The handle of new converted DIB, 0 if an error occurred. If any error occurs the GetLastColorConvertError function will be retrieves the error code.
Remarks hDib LONGLONG Handle of the image to convert.
nRed Long The gamma-factor of the red channel. See the description and examples above for further information and a possible value.
nGreen Long The gamma-factor of the green channel. See the description and examples above for further information and a possible value.
nBlue Long The gamma-factor of the blue channel. See the description and examples above for further information and a possible value.
bShowProgress BOOL This parameter specifies the displaying of the progressbar.
hParent LONGLONG Handler of the parent window.
See Also