IWICBitmapScaler::Initialize method

Initializes the bitmap scaler with the provided parameters.

Syntax


HRESULT Initialize(
  [in] IWICBitmapSource           *pISource,
  [in] UINT                       uiWidth,
  [in] UINT                       uiHeight,
  [in] WICBitmapInterpolationMode mode
);

Parameters

pISource [in]

Type: IWICBitmapSource*

The input bitmap source.

uiWidth [in]

Type: UINT

The destination width.

uiHeight [in]

Type: UINT

The desination height.

mode [in]

Type: WICBitmapInterpolationMode

The WICBitmapInterpolationMode to use when scaling.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

IWICBitmapScaler can't be initialized multiple times. For example, when scaling every frame in a multi-frame image, a new IWICBitmapScaler must be created and initialized for each frame.

Examples

For an example using an IWICBitmapScaler, see the How to Scale a Bitmap Source topic.

Requirements

Minimum supported client

Windows XP with SP2, Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Wincodec.h

IDL

Wincodec.idl

Library

Windowscodecs.lib

DLL

Windowscodecs.dll

 

 

Show: