IBasicBitmapOps::AdjustContrast (Windows CE 5.0)

Send Feedback

This method adjusts the contrast of a bitmap image.

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 Values

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

OS Versions: Windows CE 5.0 and later.
Header: Imaging.h.
Link Library: Imaging.lib.

See Also

IBasicBitmapOps

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.