imageformats.png

Members

Functions

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

Reads an 8-bit or 16-bit PNG image and returns it as an 8-bit image. req_chans defines the format of returned image (you can use ColFmt here).

read_png16
IFImage16 read_png16(in char[] filename, long req_chans = 0)

Reads an 8-bit or 16-bit PNG image and returns it as a 16-bit image. req_chans defines the format of returned image (you can use ColFmt here).

read_png16_from_mem
IFImage16 read_png16_from_mem(in ubyte[] source, long req_chans = 0)

Reads an 8-bit or 16-bit PNG image from a buffer and returns it as a 16-bit image. req_chans defines the format of returned image (you can use ColFmt here).

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

Reads an 8-bit or 16-bit PNG image from a buffer and returns it as an 8-bit image. req_chans defines the format of returned image (you can use ColFmt here).

read_png_header
PNG_Header read_png_header(in char[] filename)

Returns the header of a PNG file.

read_png_header_from_mem
PNG_Header read_png_header_from_mem(in ubyte[] source)

Returns the header of the image in the buffer.

read_png_info
void read_png_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_png_info_from_mem
void read_png_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_png
void write_png(in char[] file, long w, long h, in ubyte[] data, long tgt_chans = 0)

Writes a PNG image into a file.

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

Writes a PNG image into a buffer.

Structs

PNG_Header
struct PNG_Header

Header of a PNG file.

Meta