Share via


IBasicBitmapOps::AdjustContrast

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method adjusts the contrast of a bitmap image.

Syntax

HRESULT AdjustContrast(
  FLOAT shadow,
  FLOAT highlight
);

Parameters

  • shadow
    [in] A FLOAT value that defines the value for pixels that are currently 0.
  • highlight
    [in] A FLOAT value that defines the value for pixels that are currently 1.

Return Value

This method returns S_OK if successful.

This method returns E_INVALIDARG if shadow > highlight.

Remarks

This method adjusts the contrast of an image by rescaling the pixel values in the range from 0 to 1 to the new range from shadow to highlight.

The old pixel value 0 is mapped to the new pixel value of shadow and the old pixel value 1 is mapped to the new pixel value of highlight. All other old pixel values are mapped into the new range through linear interpolation.

Requirements

Header imaging.h
Library Imaging.lib
Windows Embedded CE Windows CE 5.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

IBasicBitmapOps