WICCreateBitmapFromSection-Funktion (wincodec.h)

Gibt eine IWICBitmapSource zurück, die von den Pixeln eines GDI-Abschnittshandles (Windows Graphics Device Interface) unterstützt wird.

Syntax

HRESULT WICCreateBitmapFromSection(
  [in]  UINT                  width,
  [in]  UINT                  height,
        REFWICPixelFormatGUID pixelFormat,
  [in]  HANDLE                hSection,
  [in]  UINT                  stride,
  [in]  UINT                  offset,
  [out] IWICBitmap            **ppIBitmap
);

Parameter

[in] width

Typ: UINT

Die Breite der Bitmappixel.

[in] height

Typ: UINT

Die Höhe der Bitmappixel.

pixelFormat

Typ: REFWICPixelFormatGUID

Das Pixelformat der Bitmap.

[in] hSection

Typ: HANDLE

Das Abschnittshandle. Dies ist ein Dateizuordnungsobjekthandle, das von der CreateFileMapping-Funktion zurückgegeben wird.

[in] stride

Typ: UINT

Die Byteanzahl jeder Scanlinie.

[in] offset

Typ: UINT

Der Offset im Abschnitt.

[out] ppIBitmap

Typ: IWICBitmap**

Ein Zeiger, der die Bitmap empfängt.

Rückgabewert

Typ: HRESULT

Wenn diese Funktion erfolgreich ist, gibt sie S_OK zurück. Andernfalls wird ein Fehlercode HRESULT zurückgegeben.

Hinweise

Die WICCreateBitmapFromSection-Funktion ruft die WICCreateBitmapFromSectionEx-Funktion auf, wobei der DesiredAccessLevel-Parameter auf WICSectionAccessLevelRead festgelegt ist.

Anforderungen

Anforderung Wert
Unterstützte Mindestversion (Client) Windows XP mit SP2, Windows Vista [Desktop-Apps | UWP-Apps]
Unterstützte Mindestversion (Server) Windows Server 2008 [Desktop-Apps | UWP-Apps]
Zielplattform Windows
Kopfzeile wincodec.h
Bibliothek Windowscodecs.lib
DLL Windowscodecs.dll