imageformats.bmp

Members

Functions

read_bmp
IFImage read_bmp(in char[] filename, long req_chans = 0)

Reads a BMP image. req_chans defines the format of returned image (you can use ColFmt here).

read_bmp_from_mem
IFImage read_bmp_from_mem(in ubyte[] source, long req_chans = 0)

Reads an image from a buffer containing a BMP image. req_chans defines the format of returned image (you can use ColFmt here).

read_bmp_header
BMP_Header read_bmp_header(in char[] filename)

Returns the header of a BMP file.

read_bmp_header_from_mem
BMP_Header read_bmp_header_from_mem(in ubyte[] source)

Reads the image header from a buffer containing a BMP image.

read_bmp_info
void read_bmp_info(in char[] filename, out int w, out int h, out int chans)

Returns width, height and color format information via w, h and chans.

read_bmp_info_from_mem
void read_bmp_info_from_mem(in ubyte[] source, out int w, out int h, out int chans)

Returns width, height and color format information via w, h and chans.

write_bmp
void write_bmp(in char[] file, long w, long h, in ubyte[] data, long tgt_chans = 0)

Writes a BMP image into a file.

write_bmp_to_mem
ubyte[] write_bmp_to_mem(long w, long h, in ubyte[] data, long tgt_chans = 0)

Writes a BMP image into a buffer.

Structs

BMP_Header
struct BMP_Header

Header of a BMP file.

DibV1
struct DibV1

Part of BMP header, not always present.

DibV2
struct DibV2

Part of BMP header, not always present.

DibV4
struct DibV4

Part of BMP header, not always present.

DibV5
struct DibV5

Part of BMP header, not always present.

Meta