Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

WICCreateBitmapFromSection function

Returns a IWICBitmapSource that is backed by the pixels of a Windows Graphics Device Interface (GDI) section handle.

Syntax


HRESULT WICCreateBitmapFromSection(
  _In_   UINT width,
  _In_   UINT height,
  REFWICPixelFormatGUID pixelFormat,
  _In_   HANDLE hSection,
  _In_   UINT stride,
  _In_   UINT offset,
  _Out_  IWICBitmap **pIBitmap
);

Parameters

width [in]

Type: UINT

The width of the bitmap pixels.

height [in]

Type: UINT

The height of the bitmap pixels.

pixelFormat

Type: REFWICPixelFormatGUID

The pixel format of the bitmap.

hSection [in]

Type: HANDLE

The section handle. This is a file mapping object handle returned by the CreateFileMapping function.

stride [in]

Type: UINT

The byte count of each scanline.

offset [in]

Type: UINT

The offset into the section.

pIBitmap [out]

Type: IWICBitmap**

A pointer that receives the bitmap.

Return value

Type: HRESULT

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

Remarks

The WICCreateBitmapFromSection function calls the WICCreateBitmapFromSectionEx function with the desiredAccessLevel parameter set to WICSectionAccessLevelRead.

Windows Phone 8.1: This API is supported.

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

DLL

Windowscodecs.dll;
Wincodec.lib

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.