Export (0) Print
Expand All

IWICImagingFactory::CreateBitmap method

Creates an IWICBitmap object.

Syntax


HRESULT CreateBitmap(
  [in]  UINT                       uiWidth,
  [in]  UINT                       uiHeight,
  [in]  REFWICPixelFormatGUID      pixelFormat,
  [in]  WICBitmapCreateCacheOption option,
  [out] IWICBitmap                 **ppIBitmap
);

Parameters

uiWidth [in]

Type: UINT

The width of the new bitmap .

uiHeight [in]

Type: UINT

The height of the new bitmap.

pixelFormat [in]

Type: REFWICPixelFormatGUID

The pixel format of the new bitmap.

option [in]

Type: WICBitmapCreateCacheOption

The cache creation options of the new bitmap. This can be one of the values in the WICBitmapCreateCacheOption enumeration.

ValueMeaning
WICBitmapCacheOnDemand

Allocates system memory for the bitmap at initialization.

WICBitmapCacheOnLoad

Allocates system memory for the bitmap when the bitmap is first used.

WICBitmapNoCache

This option is not valid for this method and should not be used.

 

ppIBitmap [out]

Type: IWICBitmap**

A pointer that receives a pointer to the new bitmap.

Return value

Type: HRESULT

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

Remarks

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

See also

IWICImagingFactory
Native Pixel Formats

 

 

Community Additions

ADD
Show:
© 2015 Microsoft