BrightnessContrastParams structure (gdipluseffects.h)
A BrightnessContrastParams structure contains members that specify the nature of a brightness or contrast adjustment.
You can change the brightness or contrast (or both) of a bitmap by following these steps.
- Create and initialize a BrightnessContrastParams structure.
- Pass the address of the BrightnessContrastParams structure to the BrightnessContrast::SetParameters method of a BrightnessContrast object.
- Pass the address of the BrightnessContrast object to the Graphics::DrawImage method or to the Bitmap::ApplyEffect method.
Syntax
struct BrightnessContrastParams {
INT brightnessLevel;
INT contrastLevel;
};
Members
brightnessLevel
Type: INT
Integer in the range -255 through 255 that specifies the brightness level. If the value is 0, the brightness remains the same. As the value moves from 0 to 255, the brightness of the image increases. As the value moves from 0 to -255, the brightness of the image decreases.
contrastLevel
Type: INT
Integer in the range -100 through 100 that specifies the contrast level. If the value is 0, the contrast remains the same. As the value moves from 0 to 100, the contrast of the image increases. As the value moves from 0 to -100, the contrast of the image decreases.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Header | gdipluseffects.h (include Gdiplus.h) |