imageformats.tga

Members

Functions

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

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

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

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

read_tga_header
TGA_Header read_tga_header(in char[] filename)

Returns the header of a TGA file.

read_tga_header_from_mem
TGA_Header read_tga_header_from_mem(in ubyte[] source)

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

read_tga_info
void read_tga_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_tga_info_from_mem
void read_tga_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_tga
void write_tga(in char[] file, long w, long h, in ubyte[] data, long tgt_chans = 0)

Writes a TGA image into a file.

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

Writes a TGA image into a buffer.

Structs

TGA_Header
struct TGA_Header

Header of a TGA file.

Meta