dplug.graphics.pngload

D translation of stb_image-1.33 (http://nothings.org/stb_image.c)

This port only supports:

  • PNG 8-bit-per-channel only.

Members

Enums

F_none
anonymousenum F_none
Undocumented in source.
SCAN_load
anonymousenum SCAN_load
Undocumented in source.
STBI_default
anonymousenum STBI_default
Undocumented in source.

Functions

PNG_TYPE
uint PNG_TYPE(ubyte a, ubyte b, ubyte c, ubyte d)
Undocumented in source. Be warned that the author may not have intended to support it.
at_eof
int at_eof(stbi* s)
Undocumented in source. Be warned that the author may not have intended to support it.
bit_reverse
int bit_reverse(int v, int bits)
Undocumented in source. Be warned that the author may not have intended to support it.
bitreverse16
int bitreverse16(int n)
Undocumented in source. Be warned that the author may not have intended to support it.
compute_huffman_codes
int compute_huffman_codes(zbuf* a)
Undocumented in source. Be warned that the author may not have intended to support it.
compute_y
ubyte compute_y(int r, int g, int b)
Undocumented in source. Be warned that the author may not have intended to support it.
convert_format
ubyte* convert_format(ubyte* data, int img_n, int req_comp, uint x, uint y)
Undocumented in source. Be warned that the author may not have intended to support it.
create_png_image
int create_png_image(png* a, ubyte* raw, uint raw_len, int out_n, int interlaced)
Undocumented in source. Be warned that the author may not have intended to support it.
do_png
ubyte* do_png(png* p, int* x, int* y, int* n, int req_comp)
Undocumented in source. Be warned that the author may not have intended to support it.
do_zlib
int do_zlib(zbuf* a, ubyte* obuf, int olen, int exp, int parse_header)
Undocumented in source. Be warned that the author may not have intended to support it.
expand
int expand(zbuf* z, int n)
Undocumented in source. Be warned that the author may not have intended to support it.
expand_palette
int expand_palette(png* a, ubyte* palette, int len, int pal_img_n)
Undocumented in source. Be warned that the author may not have intended to support it.
fill_bits
void fill_bits(zbuf* z)
Undocumented in source. Be warned that the author may not have intended to support it.
get16
int get16(stbi* s)
Undocumented in source. Be warned that the author may not have intended to support it.
get16le
int get16le(stbi* s)
Undocumented in source. Be warned that the author may not have intended to support it.
get32
uint get32(stbi* s)
Undocumented in source. Be warned that the author may not have intended to support it.
get32le
uint get32le(stbi* s)
Undocumented in source. Be warned that the author may not have intended to support it.
get8
int get8(stbi* s)
Undocumented in source. Be warned that the author may not have intended to support it.
get8u
ubyte get8u(stbi* s)
Undocumented in source. Be warned that the author may not have intended to support it.
get_chunk_header
chunk get_chunk_header(stbi* s)
Undocumented in source. Be warned that the author may not have intended to support it.
getn
int getn(stbi* s, ubyte* buffer, int n)
Undocumented in source. Be warned that the author may not have intended to support it.
init_defaults
void init_defaults()
Undocumented in source. Be warned that the author may not have intended to support it.
parse_huffman_block
int parse_huffman_block(zbuf* a)
Undocumented in source. Be warned that the author may not have intended to support it.
parse_png_file
int parse_png_file(png* z, int scan, int req_comp)
Undocumented in source. Be warned that the author may not have intended to support it.
parse_uncompressed_block
int parse_uncompressed_block(zbuf* a)
Undocumented in source. Be warned that the author may not have intended to support it.
parse_zlib
int parse_zlib(zbuf* a, int parse_header)
Undocumented in source. Be warned that the author may not have intended to support it.
parse_zlib_header
int parse_zlib_header(zbuf* a)
Undocumented in source. Be warned that the author may not have intended to support it.
skip
void skip(stbi* s, int n)
Undocumented in source. Be warned that the author may not have intended to support it.
start_mem
void start_mem(stbi* s, const(ubyte)* buffer, int len)
Undocumented in source. Be warned that the author may not have intended to support it.
stbi_load_png_from_memory
ubyte* stbi_load_png_from_memory(const(void)[] buffer, int width, int height, int components, int requestedComponents)

Loads an image from memory.

stbi_png_load
ubyte* stbi_png_load(stbi* s, int* x, int* y, int* comp, int req_comp)
Undocumented in source. Be warned that the author may not have intended to support it.
stbi_zlib_decode_buffer
int stbi_zlib_decode_buffer(ubyte* obuffer, int olen, const(ubyte)* ibuffer, int ilen)
Undocumented in source. Be warned that the author may not have intended to support it.
stbi_zlib_decode_malloc
ubyte* stbi_zlib_decode_malloc(const(ubyte)* buffer, int len, int* outlen)
Undocumented in source. Be warned that the author may not have intended to support it.
stbi_zlib_decode_malloc_guesssize
ubyte* stbi_zlib_decode_malloc_guesssize(const(ubyte)* buffer, int len, int initial_size, int* outlen)
Undocumented in source. Be warned that the author may not have intended to support it.
stbi_zlib_decode_malloc_guesssize_headerflag
ubyte* stbi_zlib_decode_malloc_guesssize_headerflag(const(ubyte)* buffer, int len, int initial_size, int* outlen, int parse_header)
Undocumented in source. Be warned that the author may not have intended to support it.
stbi_zlib_decode_noheader_buffer
int stbi_zlib_decode_noheader_buffer(ubyte* obuffer, int olen, const(ubyte)* ibuffer, int ilen)
Undocumented in source. Be warned that the author may not have intended to support it.
stbi_zlib_decode_noheader_malloc
ubyte* stbi_zlib_decode_noheader_malloc(const(ubyte)* buffer, int len, int* outlen)
Undocumented in source. Be warned that the author may not have intended to support it.
zbuild_huffman
int zbuild_huffman(zhuffman* z, ubyte* sizelist, int num)
Undocumented in source. Be warned that the author may not have intended to support it.
zget8
int zget8(zbuf* z)
Undocumented in source. Be warned that the author may not have intended to support it.
zhuffman_decode
int zhuffman_decode(zbuf* a, zhuffman* z)
Undocumented in source. Be warned that the author may not have intended to support it.
zreceive
uint zreceive(zbuf* z, int n)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

STBI_VERSION
enum STBI_VERSION;
Undocumented in source.
ZFAST_BITS
enum ZFAST_BITS;
Undocumented in source.
ZFAST_MASK
enum ZFAST_MASK;
Undocumented in source.

Static functions

check_png_header
int check_png_header(stbi* s)
Undocumented in source. Be warned that the author may not have intended to support it.
compute_transparency
int compute_transparency(png* z, ubyte[3] tc, int out_n)
Undocumented in source. Be warned that the author may not have intended to support it.
create_png_image_raw
int create_png_image_raw(png* a, ubyte* raw, uint raw_len, int out_n, uint x, uint y)
Undocumented in source. Be warned that the author may not have intended to support it.
paeth
int paeth(int a, int b, int c)
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

default_distance
ubyte[32] default_distance;
Undocumented in source.
default_length
ubyte[288] default_length;
Undocumented in source.
dist_base
int[32] dist_base;
Undocumented in source.
dist_extra
int[32] dist_extra;
Undocumented in source.
first_row_filter
ubyte[5] first_row_filter;
Undocumented in source.
length_base
int[31] length_base;
Undocumented in source.
length_extra
int[31] length_extra;
Undocumented in source.
stbi_png_partial
int stbi_png_partial;
Undocumented in source.

Structs

chunk
struct chunk
Undocumented in source.
png
struct png
Undocumented in source.
stbi
struct stbi
Undocumented in source.
zbuf
struct zbuf
Undocumented in source.
zhuffman
struct zhuffman
Undocumented in source.

Meta