Export (0) Print
Expand All

BrightnessContrastParams structure

Applies to: desktop apps only

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.

  1. Create and initialize a BrightnessContrastParams structure.
  2. Pass the address of the BrightnessContrastParams structure to the BrightnessContrast::SetParameters method of a BrightnessContrast object.
  3. Pass the address of the BrightnessContrast object to the Graphics::DrawImage method or to the Bitmap::ApplyEffect method.

Syntax

typedef struct {
  INT brightnessLevel;
  INT contrastLevel;
} BrightnessContrastParams;

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

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Product

GDI+ 1.1

Header

Gdipluseffects.h (include Gdiplus.h)

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show:
© 2014 Microsoft