|
static void | uivector_cleanup (void *p) |
|
static unsigned | uivector_reserve (uivector *p, size_t allocsize) |
|
static unsigned | uivector_resize (uivector *p, size_t size) |
|
static unsigned | uivector_resizev (uivector *p, size_t size, unsigned value) |
|
static void | uivector_init (uivector *p) |
|
static unsigned | uivector_push_back (uivector *p, unsigned c) |
|
static unsigned | uivector_copy (uivector *p, const uivector *q) |
|
static void | ucvector_cleanup (void *p) |
|
static unsigned | ucvector_reserve (ucvector *p, size_t allocsize) |
|
static unsigned | ucvector_resize (ucvector *p, size_t size) |
|
static void | ucvector_init (ucvector *p) |
|
static unsigned | ucvector_resizev (ucvector *p, size_t size, unsigned char value) |
|
static void | ucvector_init_buffer (ucvector *p, unsigned char *buffer, size_t size) |
|
static unsigned | ucvector_push_back (ucvector *p, unsigned char c) |
|
static void | string_cleanup (char **out) |
|
static unsigned | string_resize (char **out, size_t size) |
|
static void | string_init (char **out) |
|
static void | string_set (char **out, const char *in) |
|
static unsigned | lodepng_read32bitInt (const unsigned char *buffer) |
|
static void | lodepng_set32bitInt (unsigned char *buffer, unsigned value) |
|
static int | lodepng_add32bitInt (ucvector *buffer, unsigned value) |
|
unsigned | lodepng_load_file (unsigned char **out, size_t *outsize, const char *filename) |
|
unsigned | lodepng_save_file (const unsigned char *buffer, size_t buffersize, const char *filename) |
|
static int | addBitToStream (size_t *bitpointer, ucvector *bitstream, unsigned char bit) |
|
static void | addBitsToStream (size_t *bitpointer, ucvector *bitstream, unsigned value, size_t nbits) |
|
static void | addBitsToStreamReversed (size_t *bitpointer, ucvector *bitstream, unsigned value, size_t nbits) |
|
static unsigned char | readBitFromStream (size_t *bitpointer, const unsigned char *bitstream) |
|
static unsigned | readBitsFromStream (size_t *bitpointer, const unsigned char *bitstream, size_t nbits) |
|
static void | HuffmanTree_init (HuffmanTree *tree) |
|
static void | HuffmanTree_cleanup (HuffmanTree *tree) |
|
static unsigned | HuffmanTree_make2DTree (HuffmanTree *tree) |
|
static unsigned | HuffmanTree_makeFromLengths2 (HuffmanTree *tree) |
|
static unsigned | HuffmanTree_makeFromLengths (HuffmanTree *tree, const unsigned *bitlen, size_t numcodes, unsigned maxbitlen) |
|
static void | coin_init (Coin *c) |
|
static void | coin_cleanup (void *c) |
|
static void | coin_copy (Coin *c1, const Coin *c2) |
|
static void | add_coins (Coin *c1, const Coin *c2) |
|
static void | init_coins (Coin *coins, size_t num) |
|
static void | cleanup_coins (Coin *coins, size_t num) |
|
static int | coin_compare (const void *a, const void *b) |
|
static unsigned | append_symbol_coins (Coin *coins, const unsigned *frequencies, unsigned numcodes, size_t sum) |
|
unsigned | lodepng_huffman_code_lengths (unsigned *lengths, const unsigned *frequencies, size_t numcodes, unsigned maxbitlen) |
|
static unsigned | HuffmanTree_makeFromFrequencies (HuffmanTree *tree, const unsigned *frequencies, size_t mincodes, size_t numcodes, unsigned maxbitlen) |
|
static unsigned | HuffmanTree_getCode (const HuffmanTree *tree, unsigned index) |
|
static unsigned | HuffmanTree_getLength (const HuffmanTree *tree, unsigned index) |
|
static unsigned | generateFixedLitLenTree (HuffmanTree *tree) |
|
static unsigned | generateFixedDistanceTree (HuffmanTree *tree) |
|
static unsigned | huffmanDecodeSymbol (const unsigned char *in, size_t *bp, const HuffmanTree *codetree, size_t inbitlength) |
|
static int | getTreeInflateFixed (HuffmanTree *tree_ll, HuffmanTree *tree_d) |
|
static unsigned | getTreeInflateDynamic (HuffmanTree *tree_ll, HuffmanTree *tree_d, const unsigned char *in, size_t *bp, size_t inlength) |
|
static unsigned | inflateHuffmanBlock (ucvector *out, const unsigned char *in, size_t *bp, size_t *pos, size_t inlength, unsigned btype) |
|
static unsigned | inflateNoCompression (ucvector *out, const unsigned char *in, size_t *bp, size_t *pos, size_t inlength) |
|
static unsigned | lodepng_inflatev (ucvector *out, const unsigned char *in, size_t insize, const LodePNGDecompressSettings *settings) |
|
unsigned | lodepng_inflate (unsigned char **out, size_t *outsize, const unsigned char *in, size_t insize, const LodePNGDecompressSettings *settings) |
|
static unsigned | inflate (unsigned char **out, size_t *outsize, const unsigned char *in, size_t insize, const LodePNGDecompressSettings *settings) |
|
static void | addHuffmanSymbol (size_t *bp, ucvector *compressed, unsigned code, unsigned bitlen) |
|
static size_t | searchCodeIndex (const unsigned *array, size_t array_size, size_t value) |
|
static void | addLengthDistance (uivector *values, size_t length, size_t distance) |
|
static unsigned | hash_init (Hash *hash, unsigned windowsize) |
|
static void | hash_cleanup (Hash *hash) |
|
static unsigned | getHash (const unsigned char *data, size_t size, size_t pos) |
|
static unsigned | countZeros (const unsigned char *data, size_t size, size_t pos) |
|
static void | updateHashChain (Hash *hash, size_t wpos, unsigned hashval, unsigned short numzeros) |
|
static unsigned | encodeLZ77 (uivector *out, Hash *hash, const unsigned char *in, size_t inpos, size_t insize, unsigned windowsize, unsigned minmatch, unsigned nicematch, unsigned lazymatching) |
|
static unsigned | deflateNoCompression (ucvector *out, const unsigned char *data, size_t datasize) |
|
static void | writeLZ77data (size_t *bp, ucvector *out, const uivector *lz77_encoded, const HuffmanTree *tree_ll, const HuffmanTree *tree_d) |
|
static unsigned | deflateDynamic (ucvector *out, size_t *bp, Hash *hash, const unsigned char *data, size_t datapos, size_t dataend, const LodePNGCompressSettings *settings, unsigned final) |
|
static unsigned | deflateFixed (ucvector *out, size_t *bp, Hash *hash, const unsigned char *data, size_t datapos, size_t dataend, const LodePNGCompressSettings *settings, unsigned final) |
|
static unsigned | lodepng_deflatev (ucvector *out, const unsigned char *in, size_t insize, const LodePNGCompressSettings *settings) |
|
unsigned | lodepng_deflate (unsigned char **out, size_t *outsize, const unsigned char *in, size_t insize, const LodePNGCompressSettings *settings) |
|
static unsigned | deflate (unsigned char **out, size_t *outsize, const unsigned char *in, size_t insize, const LodePNGCompressSettings *settings) |
|
static unsigned | update_adler32 (unsigned adler, const unsigned char *data, unsigned len) |
|
static unsigned | adler32 (const unsigned char *data, unsigned len) |
|
unsigned | lodepng_zlib_decompress (unsigned char **out, size_t *outsize, const unsigned char *in, size_t insize, const LodePNGDecompressSettings *settings) |
|
static unsigned | zlib_decompress (unsigned char **out, size_t *outsize, const unsigned char *in, size_t insize, const LodePNGDecompressSettings *settings) |
|
unsigned | lodepng_zlib_compress (unsigned char **out, size_t *outsize, const unsigned char *in, size_t insize, const LodePNGCompressSettings *settings) |
|
static unsigned | zlib_compress (unsigned char **out, size_t *outsize, const unsigned char *in, size_t insize, const LodePNGCompressSettings *settings) |
|
void | lodepng_compress_settings_init (LodePNGCompressSettings *settings) |
|
void | lodepng_decompress_settings_init (LodePNGDecompressSettings *settings) |
|
unsigned | lodepng_crc32 (const unsigned char *buf, size_t len) |
|
static unsigned char | readBitFromReversedStream (size_t *bitpointer, const unsigned char *bitstream) |
|
static unsigned | readBitsFromReversedStream (size_t *bitpointer, const unsigned char *bitstream, size_t nbits) |
|
static void | setBitOfReversedStream0 (size_t *bitpointer, unsigned char *bitstream, unsigned char bit) |
|
static void | setBitOfReversedStream (size_t *bitpointer, unsigned char *bitstream, unsigned char bit) |
|
unsigned | lodepng_chunk_length (const unsigned char *chunk) |
|
void | lodepng_chunk_type (char type[5], const unsigned char *chunk) |
|
unsigned char | lodepng_chunk_type_equals (const unsigned char *chunk, const char *type) |
|
unsigned char | lodepng_chunk_ancillary (const unsigned char *chunk) |
|
unsigned char | lodepng_chunk_private (const unsigned char *chunk) |
|
unsigned char | lodepng_chunk_safetocopy (const unsigned char *chunk) |
|
unsigned char * | lodepng_chunk_data (unsigned char *chunk) |
|
const unsigned char * | lodepng_chunk_data_const (const unsigned char *chunk) |
|
unsigned | lodepng_chunk_check_crc (const unsigned char *chunk) |
|
void | lodepng_chunk_generate_crc (unsigned char *chunk) |
|
unsigned char * | lodepng_chunk_next (unsigned char *chunk) |
|
const unsigned char * | lodepng_chunk_next_const (const unsigned char *chunk) |
|
unsigned | lodepng_chunk_append (unsigned char **out, size_t *outlength, const unsigned char *chunk) |
|
unsigned | lodepng_chunk_create (unsigned char **out, size_t *outlength, unsigned length, const char *type, const unsigned char *data) |
|
static unsigned | checkColorValidity (LodePNGColorType colortype, unsigned bd) |
|
static unsigned | getNumColorChannels (LodePNGColorType colortype) |
|
static unsigned | lodepng_get_bpp_lct (LodePNGColorType colortype, unsigned bitdepth) |
|
void | lodepng_color_mode_init (LodePNGColorMode *info) |
|
void | lodepng_color_mode_cleanup (LodePNGColorMode *info) |
|
unsigned | lodepng_color_mode_copy (LodePNGColorMode *dest, const LodePNGColorMode *source) |
|
static int | lodepng_color_mode_equal (const LodePNGColorMode *a, const LodePNGColorMode *b) |
|
void | lodepng_palette_clear (LodePNGColorMode *info) |
|
unsigned | lodepng_palette_add (LodePNGColorMode *info, unsigned char r, unsigned char g, unsigned char b, unsigned char a) |
|
unsigned | lodepng_get_bpp (const LodePNGColorMode *info) |
|
unsigned | lodepng_get_channels (const LodePNGColorMode *info) |
|
unsigned | lodepng_is_greyscale_type (const LodePNGColorMode *info) |
|
unsigned | lodepng_is_alpha_type (const LodePNGColorMode *info) |
|
unsigned | lodepng_is_palette_type (const LodePNGColorMode *info) |
|
unsigned | lodepng_has_palette_alpha (const LodePNGColorMode *info) |
|
unsigned | lodepng_can_have_alpha (const LodePNGColorMode *info) |
|
size_t | lodepng_get_raw_size (unsigned w, unsigned h, const LodePNGColorMode *color) |
|
static size_t | lodepng_get_raw_size_idat (unsigned w, unsigned h, const LodePNGColorMode *color) |
|
static void | LodePNGUnknownChunks_init (LodePNGInfo *info) |
|
static void | LodePNGUnknownChunks_cleanup (LodePNGInfo *info) |
|
static unsigned | LodePNGUnknownChunks_copy (LodePNGInfo *dest, const LodePNGInfo *src) |
|
static void | LodePNGText_init (LodePNGInfo *info) |
|
static void | LodePNGText_cleanup (LodePNGInfo *info) |
|
static unsigned | LodePNGText_copy (LodePNGInfo *dest, const LodePNGInfo *source) |
|
void | lodepng_clear_text (LodePNGInfo *info) |
|
unsigned | lodepng_add_text (LodePNGInfo *info, const char *key, const char *str) |
|
static void | LodePNGIText_init (LodePNGInfo *info) |
|
static void | LodePNGIText_cleanup (LodePNGInfo *info) |
|
static unsigned | LodePNGIText_copy (LodePNGInfo *dest, const LodePNGInfo *source) |
|
void | lodepng_clear_itext (LodePNGInfo *info) |
|
unsigned | lodepng_add_itext (LodePNGInfo *info, const char *key, const char *langtag, const char *transkey, const char *str) |
|
void | lodepng_info_init (LodePNGInfo *info) |
|
void | lodepng_info_cleanup (LodePNGInfo *info) |
|
unsigned | lodepng_info_copy (LodePNGInfo *dest, const LodePNGInfo *source) |
|
static void | addColorBits (unsigned char *out, size_t index, unsigned bits, unsigned in) |
|
static void | color_tree_init (ColorTree *tree) |
|
static void | color_tree_cleanup (ColorTree *tree) |
|
static int | color_tree_get (ColorTree *tree, unsigned char r, unsigned char g, unsigned char b, unsigned char a) |
|
static int | color_tree_has (ColorTree *tree, unsigned char r, unsigned char g, unsigned char b, unsigned char a) |
|
static void | color_tree_add (ColorTree *tree, unsigned char r, unsigned char g, unsigned char b, unsigned char a, unsigned index) |
|
static unsigned | rgba8ToPixel (unsigned char *out, size_t i, const LodePNGColorMode *mode, ColorTree *tree, unsigned char r, unsigned char g, unsigned char b, unsigned char a) |
|
static void | rgba16ToPixel (unsigned char *out, size_t i, const LodePNGColorMode *mode, unsigned short r, unsigned short g, unsigned short b, unsigned short a) |
|
static void | getPixelColorRGBA8 (unsigned char *r, unsigned char *g, unsigned char *b, unsigned char *a, const unsigned char *in, size_t i, const LodePNGColorMode *mode) |
|
static void | getPixelColorsRGBA8 (unsigned char *buffer, size_t numpixels, unsigned has_alpha, const unsigned char *in, const LodePNGColorMode *mode) |
|
static void | getPixelColorRGBA16 (unsigned short *r, unsigned short *g, unsigned short *b, unsigned short *a, const unsigned char *in, size_t i, const LodePNGColorMode *mode) |
|
unsigned | lodepng_convert (unsigned char *out, const unsigned char *in, LodePNGColorMode *mode_out, const LodePNGColorMode *mode_in, unsigned w, unsigned h) |
|
void | lodepng_color_profile_init (LodePNGColorProfile *profile) |
|
static unsigned | getValueRequiredBits (unsigned char value) |
|
unsigned | get_color_profile (LodePNGColorProfile *profile, const unsigned char *in, unsigned w, unsigned h, const LodePNGColorMode *mode) |
|
unsigned | lodepng_auto_choose_color (LodePNGColorMode *mode_out, const unsigned char *image, unsigned w, unsigned h, const LodePNGColorMode *mode_in) |
|
static unsigned char | paethPredictor (short a, short b, short c) |
|
static void | Adam7_getpassvalues (unsigned passw[7], unsigned passh[7], size_t filter_passstart[8], size_t padded_passstart[8], size_t passstart[8], unsigned w, unsigned h, unsigned bpp) |
|
unsigned | lodepng_inspect (unsigned *w, unsigned *h, LodePNGState *state, const unsigned char *in, size_t insize) |
|
static unsigned | unfilterScanline (unsigned char *recon, const unsigned char *scanline, const unsigned char *precon, size_t bytewidth, unsigned char filterType, size_t length) |
|
static unsigned | unfilter (unsigned char *out, const unsigned char *in, unsigned w, unsigned h, unsigned bpp) |
|
static void | Adam7_deinterlace (unsigned char *out, const unsigned char *in, unsigned w, unsigned h, unsigned bpp) |
|
static void | removePaddingBits (unsigned char *out, const unsigned char *in, size_t olinebits, size_t ilinebits, unsigned h) |
|
static unsigned | postProcessScanlines (unsigned char *out, unsigned char *in, unsigned w, unsigned h, const LodePNGInfo *info_png) |
|
static unsigned | readChunk_PLTE (LodePNGColorMode *color, const unsigned char *data, size_t chunkLength) |
|
static unsigned | readChunk_tRNS (LodePNGColorMode *color, const unsigned char *data, size_t chunkLength) |
|
static unsigned | readChunk_bKGD (LodePNGInfo *info, const unsigned char *data, size_t chunkLength) |
|
static unsigned | readChunk_tEXt (LodePNGInfo *info, const unsigned char *data, size_t chunkLength) |
|
static unsigned | readChunk_zTXt (LodePNGInfo *info, const LodePNGDecompressSettings *zlibsettings, const unsigned char *data, size_t chunkLength) |
|
static unsigned | readChunk_iTXt (LodePNGInfo *info, const LodePNGDecompressSettings *zlibsettings, const unsigned char *data, size_t chunkLength) |
|
static unsigned | readChunk_tIME (LodePNGInfo *info, const unsigned char *data, size_t chunkLength) |
|
static unsigned | readChunk_pHYs (LodePNGInfo *info, const unsigned char *data, size_t chunkLength) |
|
static void | decodeGeneric (unsigned char **out, unsigned *w, unsigned *h, LodePNGState *state, const unsigned char *in, size_t insize) |
|
unsigned | lodepng_decode (unsigned char **out, unsigned *w, unsigned *h, LodePNGState *state, const unsigned char *in, size_t insize) |
|
unsigned | lodepng_decode_memory (unsigned char **out, unsigned *w, unsigned *h, const unsigned char *in, size_t insize, LodePNGColorType colortype, unsigned bitdepth) |
|
unsigned | lodepng_decode32 (unsigned char **out, unsigned *w, unsigned *h, const unsigned char *in, size_t insize) |
|
unsigned | lodepng_decode24 (unsigned char **out, unsigned *w, unsigned *h, const unsigned char *in, size_t insize) |
|
unsigned | lodepng_decode_file (unsigned char **out, unsigned *w, unsigned *h, const char *filename, LodePNGColorType colortype, unsigned bitdepth) |
|
unsigned | lodepng_decode32_file (unsigned char **out, unsigned *w, unsigned *h, const char *filename) |
|
unsigned | lodepng_decode24_file (unsigned char **out, unsigned *w, unsigned *h, const char *filename) |
|
void | lodepng_decoder_settings_init (LodePNGDecoderSettings *settings) |
|
void | lodepng_state_init (LodePNGState *state) |
|
void | lodepng_state_cleanup (LodePNGState *state) |
|
void | lodepng_state_copy (LodePNGState *dest, const LodePNGState *source) |
|
static unsigned | addChunk (ucvector *out, const char *chunkName, const unsigned char *data, size_t length) |
|
static unsigned | writeSignature (ucvector *out) |
|
static unsigned | addChunk_IHDR (ucvector *out, unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth, unsigned interlace_method) |
|
static unsigned | addChunk_PLTE (ucvector *out, const LodePNGColorMode *info) |
|
static unsigned | addChunk_tRNS (ucvector *out, const LodePNGColorMode *info) |
|
static unsigned | addChunk_IDAT (ucvector *out, const unsigned char *data, size_t datasize, LodePNGCompressSettings *zlibsettings) |
|
static unsigned | addChunk_IEND (ucvector *out) |
|
static unsigned | addChunk_tEXt (ucvector *out, const char *keyword, const char *textstring) |
|
static unsigned | addChunk_zTXt (ucvector *out, const char *keyword, const char *textstring, LodePNGCompressSettings *zlibsettings) |
|
static unsigned | addChunk_iTXt (ucvector *out, unsigned compressed, const char *keyword, const char *langtag, const char *transkey, const char *textstring, LodePNGCompressSettings *zlibsettings) |
|
static unsigned | addChunk_bKGD (ucvector *out, const LodePNGInfo *info) |
|
static unsigned | addChunk_tIME (ucvector *out, const LodePNGTime *time) |
|
static unsigned | addChunk_pHYs (ucvector *out, const LodePNGInfo *info) |
|
static void | filterScanline (unsigned char *out, const unsigned char *scanline, const unsigned char *prevline, size_t length, size_t bytewidth, unsigned char filterType) |
|
static float | flog2 (float f) |
|
static unsigned | filter (unsigned char *out, const unsigned char *in, unsigned w, unsigned h, const LodePNGColorMode *info, const LodePNGEncoderSettings *settings) |
|
static void | addPaddingBits (unsigned char *out, const unsigned char *in, size_t olinebits, size_t ilinebits, unsigned h) |
|
static void | Adam7_interlace (unsigned char *out, const unsigned char *in, unsigned w, unsigned h, unsigned bpp) |
|
static unsigned | preProcessScanlines (unsigned char **out, size_t *outsize, const unsigned char *in, unsigned w, unsigned h, const LodePNGInfo *info_png, const LodePNGEncoderSettings *settings) |
|
static unsigned | getPaletteTranslucency (const unsigned char *palette, size_t palettesize) |
|
static unsigned | addUnknownChunks (ucvector *out, unsigned char *data, size_t datasize) |
|
unsigned | lodepng_encode (unsigned char **out, size_t *outsize, const unsigned char *image, unsigned w, unsigned h, LodePNGState *state) |
|
unsigned | lodepng_encode_memory (unsigned char **out, size_t *outsize, const unsigned char *image, unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth) |
|
unsigned | lodepng_encode32 (unsigned char **out, size_t *outsize, const unsigned char *image, unsigned w, unsigned h) |
|
unsigned | lodepng_encode24 (unsigned char **out, size_t *outsize, const unsigned char *image, unsigned w, unsigned h) |
|
unsigned | lodepng_encode_file (const char *filename, const unsigned char *image, unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth) |
|
unsigned | lodepng_encode32_file (const char *filename, const unsigned char *image, unsigned w, unsigned h) |
|
unsigned | lodepng_encode24_file (const char *filename, const unsigned char *image, unsigned w, unsigned h) |
|
void | lodepng_encoder_settings_init (LodePNGEncoderSettings *settings) |
|
const char * | lodepng_error_text (unsigned code) |
|