Bitmap.from_buffer


Description:

public Bitmap.from_buffer (Buffer buffer, PixelFormat format, int width, int height, int rowstride, int offset)

Wraps some image data that has been uploaded into a Buffer as a Bitmap.

The data is not copied in this process.

Parameters:

buffer

A Buffer containing image data

format

The PixelFormat defining the format of the image data in the given buffer .

width

The width of the image data in the given buffer.

height

The height of the image data in the given buffer.

rowstride

The rowstride in bytes of the image data in the given buffer.

offset

The offset into the given buffer to the first pixel that should be considered part of the Bitmap.

Returns:

a Bitmap encapsulating the given buffer.