imageformats

Modules

bmp
module imageformats.bmp
jpeg
module imageformats.jpeg
png
module imageformats.png
tga
module imageformats.tga

Members

Classes

ImageIOException
class ImageIOException

Thrown from all the functions...

Enums

ColFmt
enum ColFmt

Color format which you can pass to the read and write functions.

Functions

read_image
IFImage read_image(in char[] file, long req_chans = 0)

Reads an image from file. req_chans defines the format of returned image (you can use ColFmt here).

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

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

read_image_info
void read_image_info(in char[] file, out int w, out int h, out int chans)

Returns width, height and color format information via w, h and chans. If number of channels is unknown chans is set to zero, otherwise chans values map to those of ColFmt.

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

Writes an image to file. req_chans defines the format the image is saved in (you can use ColFmt here).

Structs

IFImage
struct IFImage

Image with 8-bit channels.

IFImage16
struct IFImage16

Image with 16-bit channels.

Meta