Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WICCreateBitmapFromSectionEx function

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

Syntax


HRESULT WICCreateBitmapFromSectionEx(
  _In_  UINT                  width,
  _In_  UINT                  height,
        REFWICPixelFormatGUID pixelFormat,
  _In_  HANDLE                hSection,
  _In_  UINT                  stride,
  _In_  UINT                  offset,
  _In_  WICSectionAccessLevel desiredAccessLevel,
  _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.

desiredAccessLevel [in]

Type: WICSectionAccessLevel

The desired access level.

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.

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1

Header

Wincodec.h

DLL

Windowscodecs.dll;
Wincodec.lib

 

 

Show:
© 2016 Microsoft