PaintGamma property (Main Control)

C++ Builder example

Delphi example

 

Builder Syntax

Cardinal PaintGamma

Delphi Syntax

PaintGamma: Cardinal

Overview

Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Gamma correction value used by painting operations.

Setting the gamma correction that is used for painting lets you adjust the displayed brightness of all images without changing the bitmap data.

Intensity values ideally follow a logarithmic progression, because the eye perceives changes in intensity as being equal when the ratio of change is equal. For example, we would see a change from 0.1 to 0.2 as being equal to a change from 0.2 to 0.4.

Gamma is a standard constant that is used to calculate the progression. For most CRTs the gamma constant is in the range of 2.2 to 2.5.

Because this property is an unsigned integer, it is 100 times the actual gamma value. For example, use 235 to set a gamma value of 2.35.

When applying contrast, gamma, and intensity changes to an image, LEAD applies the changes in the following order:

Contrast

Intensity

Gamma

See Also

Elements:

BackErase property, BitonalScaling property, PaintDither property, PaintEffect property, PaintPalette property, PaintROP3 property, PaintIntensity property, PaintContrast property

Topics:

Raster Images: Displaying Images

 

Changing Brightness and Contrast