Import std.image.bitmap
Bmp
struct
Public Struct Bmp
What reads and writes BMP images, in its Static Methods.
Examples
Local image = Image(2, 2)
image.Fill(Color32.Blue)
Local back = Try Bmp.Decode(Bmp.Encode(image))
Expect(back[0, 0] == Color32.Blue)-
@PanicsAtCaller Public Static Method Decode(data: UInt8[], limit: Int = MOST_PIXELS): Image Throws IOErrorstatic method #The image in
data, a BMP of 1, 4, 8, 16, 24, or 32 bits a pixel. Throws an IOError of INVALID_DATA when thedataisn't a BMP or is broken, and OTHER when it's run-length encoded, which stb_image doesn't read, or the image has more pixels thanlimit. Panics when thelimitis negative. -
The BMP of the
image, 32 bits a pixel, with its alpha. Panics when it has no pixels.
Report an issue with this page or with FutureBlitz on GitHub.