Share via


IBasicBitmapOps::AdjustContrast (Compact 2013)

3/26/2014

This feature is being deprecated for this release. Refer to this component: Windows Imaging Component.

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

See Also

Reference

IBasicBitmapOps