Description
Creates a Bitmap object based on an array of bytes along with
size and format information.
Syntax
GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(
INT width,
INT height,
INT stride,
PixelFormat
format,
BYTE* scan0,
GpBitmap**
bitmap
);
PowerBASIC Syntax
DECLARE FUNCTION GdipCreateBitmapFromScan0 ( _
BYVAL nWidth AS
LONG, _
BYVAL nHeight
AS LONG, _
BYVAL stride AS
LONG, _
BYVAL
PixelFormat AS LONG, _
BYREF Scan0 AS
ANY, _
BYREF pbitmap
AS DWORD _
) AS LONG
Note
The scan0 parameter is treated as a byte array
Parameters
width
[in] Long integer value that specifies the width, in pixels, of the
bitmap.
height
[in] Long integer value that specifies the height, in pixels, of the
bitmap.
stride
[in] Long integer value that specifies the byte offset between the
beginning of one scan line and the next. This is usually (but not necessarily)
the number of bytes in the pixel format (for example, 2 for 16 bits per pixel)
multiplied by the width of the bitmap. The value passed to this parameter must
be a multiple of four.
format
[in] Long integer value that specifies the pixel format of the
bitmap.
scan0
[in] Pointer to an array of bytes that contains the pixel data. The
caller is responsible for allocating and freeing the block of memory pointed to
by this parameter.
bitmap
[out] Pointer to a DWORD variable that recives a pointer to a Bitmap
object.
|