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.

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.

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]

Minimum supported phone

Windows Phone 8.1

Header

Wincodec.h

DLL

Windowscodecs.dll;
Wincodec.lib

 

 

Show:
© 2016 Microsoft