arsd.bmp

Basic .bmp file format implementation for arsd.color.MemoryImage. Compare with arsd.png basic functionality.

Members

Functions

readBmp
MemoryImage readBmp(string filename)

Reads a .bmp file from the given filename

readBmp
MemoryImage readBmp(ubyte[] data)

Reads a bitmap out of an in-memory array of data. For example, that returned from std.file.read.

readBmpIndirect
MemoryImage readBmpIndirect(void delegate(void*, size_t) fread)

Reads using a delegate to read instead of assuming a direct file

writeBmp
void writeBmp(MemoryImage img, string filename)

Writes the img out to filename, in .bmp format. Writes TrueColorImage out as a 24 bmp and IndexedImage out as an 8 bit bmp. Drops transparency information.

Meta