Import std.image.bitmap
std.image.bitmap
The formats of plain bitmaps: BMP and TGA, as stb_image reads and stb_image_write writes them, and QOI, the Quite OK Image format, which the runtime reads and writes itself. Each one keeps every pixel as it is, alpha too.
std/image/bitmap.fb
Types
Bmp
struct
Public Struct Bmp
What reads and writes BMP images, in its Static Methods.
-
@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.
Tga
struct
Public Struct Tga
What reads and writes TGA images, in its Static Methods.
-
@PanicsAtCaller Public Static Method Decode(data: UInt8[], limit: Int = MOST_PIXELS): Image Throws IOErrorstatic method #The image in
data, a TGA of a palette, gray, or colors, run-length encoded or not. Throws an IOError of INVALID_DATA when thedataisn't a TGA or is broken, and OTHER when the image has more pixels thanlimit. Panics when thelimitis negative. -
The TGA of the
image, 32 bits a pixel, with its alpha, run-length encoded. Panics when it has no pixels or a side longer than 65535.
Qoi
struct
Public Struct Qoi
What reads and writes QOI images, in its Static Methods.
-
@PanicsAtCaller Public Static Method Decode(data: UInt8[], limit: Int = MOST_PIXELS): Image Throws IOErrorstatic method #The image in
data, a QOI of 3 or 4 channels. Throws an IOError of INVALID_DATA when thedataisn't a QOI or is broken, UNEXPECTED_END when it ends before its pixels do, and OTHER when the image has more pixels thanlimit. Panics when thelimitis negative. -
The QOI of the
image, 4 channels, in sRGB. Panics when it has no pixels.
Report an issue with this page or with FutureBlitz on GitHub.