Creates a Direct2D bitmap from a pointer to in-memory source data.
HRESULT CreateBitmap( D2D1_SIZE_U size, const void *srcData, UINT32 pitch, const D2D1_BITMAP_PROPERTIES & bitmapProperties, ID2D1Bitmap **bitmap );
The dimensions of the bitmap to create in pixels.
A pointer to the memory location of the image data, or NULL to create an uninitialized bitmap.
The byte count of each scanline, which is equal to (the image width in pixels × the number of bytes per pixel) + memory padding. If srcData is NULL, this value is ignored. (Note that pitch is also sometimes called stride.)
Type: const D2D1_BITMAP_PROPERTIES
The pixel format and dots per inch (DPI) of the bitmap to create.
When this method returns, contains a pointer to a pointer to the new bitmap. This parameter is passed uninitialized.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
|Minimum supported client||Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps]|