NTrace
GPU ray tracing framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
lodepng.h File Reference
#include <string.h>

Go to the source code of this file.

Classes

struct  LodePNG_DecompressSettings
 
struct  LodePNG_CompressSettings
 
struct  LodePNG_InfoColor
 
struct  LodePNG_Time
 
struct  LodePNG_Text
 
struct  LodePNG_IText
 
struct  LodePNG_UnknownChunks
 
struct  LodePNG_InfoPng
 
struct  LodePNG_InfoRaw
 
struct  LodePNG_DecodeSettings
 
struct  LodePNG_Decoder
 
struct  LodePNG_EncodeSettings
 
struct  LodePNG_Encoder
 

Macros

#define LODEPNG_COMPILE_ZLIB
 
#define LODEPNG_COMPILE_PNG
 
#define LODEPNG_COMPILE_DECODER
 
#define LODEPNG_COMPILE_ENCODER
 
#define LODEPNG_COMPILE_DISK
 
#define LODEPNG_COMPILE_ANCILLARY_CHUNKS
 
#define LODEPNG_COMPILE_UNKNOWN_CHUNKS
 
#define LODEPNG_COMPILE_ERROR_TEXT
 
#define LCT_GREY   0 /*PNG color type greyscale*/
 
#define LCT_RGB   2 /*PNG color type RGB*/
 
#define LCT_PALETTE   3 /*PNG color type palette*/
 
#define LCT_GREY_ALPHA   4 /*PNG color type greyscale with alpha*/
 
#define LCT_RGBA   6 /*PNG color type RGB with alpha*/
 

Typedefs

typedef struct
LodePNG_DecompressSettings 
LodePNG_DecompressSettings
 
typedef struct
LodePNG_CompressSettings 
LodePNG_CompressSettings
 
typedef struct LodePNG_InfoColor LodePNG_InfoColor
 
typedef struct LodePNG_Time LodePNG_Time
 
typedef struct LodePNG_Text LodePNG_Text
 
typedef struct LodePNG_IText LodePNG_IText
 
typedef struct
LodePNG_UnknownChunks 
LodePNG_UnknownChunks
 
typedef struct LodePNG_InfoPng LodePNG_InfoPng
 
typedef struct LodePNG_InfoRaw LodePNG_InfoRaw
 
typedef struct
LodePNG_DecodeSettings 
LodePNG_DecodeSettings
 
typedef struct LodePNG_Decoder LodePNG_Decoder
 
typedef struct
LodePNG_EncodeSettings 
LodePNG_EncodeSettings
 
typedef struct LodePNG_Encoder LodePNG_Encoder
 

Functions

unsigned LodePNG_decode (unsigned char **out, unsigned *w, unsigned *h, const unsigned char *in, size_t insize, unsigned 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, unsigned 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)
 
unsigned LodePNG_encode (unsigned char **out, size_t *outsize, const unsigned char *image, unsigned w, unsigned h, unsigned 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, unsigned 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)
 
const char * LodePNG_error_text (unsigned code)
 
void LodePNG_DecompressSettings_init (LodePNG_DecompressSettings *settings)
 
void LodePNG_CompressSettings_init (LodePNG_CompressSettings *settings)
 
void LodePNG_InfoColor_init (LodePNG_InfoColor *info)
 
void LodePNG_InfoColor_cleanup (LodePNG_InfoColor *info)
 
unsigned LodePNG_InfoColor_copy (LodePNG_InfoColor *dest, const LodePNG_InfoColor *source)
 
void LodePNG_InfoColor_clearPalette (LodePNG_InfoColor *info)
 
unsigned LodePNG_InfoColor_addPalette (LodePNG_InfoColor *info, unsigned char r, unsigned char g, unsigned char b, unsigned char a)
 
unsigned LodePNG_InfoColor_getBpp (const LodePNG_InfoColor *info)
 
unsigned LodePNG_InfoColor_getChannels (const LodePNG_InfoColor *info)
 
unsigned LodePNG_InfoColor_isGreyscaleType (const LodePNG_InfoColor *info)
 
unsigned LodePNG_InfoColor_isAlphaType (const LodePNG_InfoColor *info)
 
unsigned LodePNG_InfoColor_isPaletteType (const LodePNG_InfoColor *info)
 
unsigned LodePNG_InfoColor_hasPaletteAlpha (const LodePNG_InfoColor *info)
 
unsigned LodePNG_InfoColor_canHaveAlpha (const LodePNG_InfoColor *info)
 
void LodePNG_Text_init (LodePNG_Text *text)
 
void LodePNG_Text_cleanup (LodePNG_Text *text)
 
unsigned LodePNG_Text_copy (LodePNG_Text *dest, const LodePNG_Text *source)
 
void LodePNG_Text_clear (LodePNG_Text *text)
 
unsigned LodePNG_Text_add (LodePNG_Text *text, const char *key, const char *str)
 
void LodePNG_IText_init (LodePNG_IText *text)
 
void LodePNG_IText_cleanup (LodePNG_IText *text)
 
unsigned LodePNG_IText_copy (LodePNG_IText *dest, const LodePNG_IText *source)
 
void LodePNG_IText_clear (LodePNG_IText *text)
 
unsigned LodePNG_IText_add (LodePNG_IText *text, const char *key, const char *langtag, const char *transkey, const char *str)
 
void LodePNG_UnknownChunks_init (LodePNG_UnknownChunks *chunks)
 
void LodePNG_UnknownChunks_cleanup (LodePNG_UnknownChunks *chunks)
 
unsigned LodePNG_UnknownChunks_copy (LodePNG_UnknownChunks *dest, const LodePNG_UnknownChunks *src)
 
void LodePNG_InfoPng_init (LodePNG_InfoPng *info)
 
void LodePNG_InfoPng_cleanup (LodePNG_InfoPng *info)
 
unsigned LodePNG_InfoPng_copy (LodePNG_InfoPng *dest, const LodePNG_InfoPng *source)
 
void LodePNG_InfoRaw_init (LodePNG_InfoRaw *info)
 
void LodePNG_InfoRaw_cleanup (LodePNG_InfoRaw *info)
 
unsigned LodePNG_InfoRaw_copy (LodePNG_InfoRaw *dest, const LodePNG_InfoRaw *source)
 
unsigned LodePNG_convert (unsigned char *out, const unsigned char *in, LodePNG_InfoColor *infoOut, LodePNG_InfoColor *infoIn, unsigned w, unsigned h)
 
void LodePNG_DecodeSettings_init (LodePNG_DecodeSettings *settings)
 
void LodePNG_Decoder_init (LodePNG_Decoder *decoder)
 
void LodePNG_Decoder_cleanup (LodePNG_Decoder *decoder)
 
void LodePNG_Decoder_copy (LodePNG_Decoder *dest, const LodePNG_Decoder *source)
 
void LodePNG_Decoder_decode (LodePNG_Decoder *decoder, unsigned char **out, size_t *outsize, const unsigned char *in, size_t insize)
 
void LodePNG_Decoder_inspect (LodePNG_Decoder *decoder, const unsigned char *in, size_t insize)
 
void LodePNG_EncodeSettings_init (LodePNG_EncodeSettings *settings)
 
void LodePNG_Encoder_init (LodePNG_Encoder *encoder)
 
void LodePNG_Encoder_cleanup (LodePNG_Encoder *encoder)
 
void LodePNG_Encoder_copy (LodePNG_Encoder *dest, const LodePNG_Encoder *source)
 
void LodePNG_Encoder_encode (LodePNG_Encoder *encoder, unsigned char **out, size_t *outsize, const unsigned char *image, unsigned w, unsigned h)
 
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_critical (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_append_chunk (unsigned char **out, size_t *outlength, const unsigned char *chunk)
 
unsigned LodePNG_create_chunk (unsigned char **out, size_t *outlength, unsigned length, const char *type, const unsigned char *data)
 
unsigned LodePNG_zlib_decompress (unsigned char **out, size_t *outsize, const unsigned char *in, size_t insize, const LodePNG_DecompressSettings *settings)
 
unsigned LodePNG_zlib_compress (unsigned char **out, size_t *outsize, const unsigned char *in, size_t insize, const LodePNG_CompressSettings *settings)
 
unsigned LodePNG_loadFile (unsigned char **out, size_t *outsize, const char *filename)
 
unsigned LodePNG_saveFile (const unsigned char *buffer, size_t buffersize, const char *filename)
 

Variables

const LodePNG_DecompressSettings LodePNG_defaultDecompressSettings
 
const LodePNG_CompressSettings LodePNG_defaultCompressSettings
 

Macro Definition Documentation

#define LCT_GREY   0 /*PNG color type greyscale*/

Definition at line 77 of file lodepng.h.

#define LCT_GREY_ALPHA   4 /*PNG color type greyscale with alpha*/

Definition at line 80 of file lodepng.h.

#define LCT_PALETTE   3 /*PNG color type palette*/

Definition at line 79 of file lodepng.h.

#define LCT_RGB   2 /*PNG color type RGB*/

Definition at line 78 of file lodepng.h.

#define LCT_RGBA   6 /*PNG color type RGB with alpha*/

Definition at line 81 of file lodepng.h.

#define LODEPNG_COMPILE_ANCILLARY_CHUNKS

Definition at line 59 of file lodepng.h.

#define LODEPNG_COMPILE_DECODER

Definition at line 53 of file lodepng.h.

#define LODEPNG_COMPILE_DISK

Definition at line 57 of file lodepng.h.

#define LODEPNG_COMPILE_ENCODER

Definition at line 55 of file lodepng.h.

#define LODEPNG_COMPILE_ERROR_TEXT

Definition at line 63 of file lodepng.h.

#define LODEPNG_COMPILE_PNG

Definition at line 51 of file lodepng.h.

#define LODEPNG_COMPILE_UNKNOWN_CHUNKS

Definition at line 61 of file lodepng.h.

#define LODEPNG_COMPILE_ZLIB

Definition at line 49 of file lodepng.h.

Typedef Documentation

typedef struct LodePNG_IText LodePNG_IText
typedef struct LodePNG_Text LodePNG_Text
typedef struct LodePNG_Time LodePNG_Time

Function Documentation

unsigned LodePNG_append_chunk ( unsigned char **  out,
size_t *  outlength,
const unsigned char *  chunk 
)

Definition at line 2361 of file lodepng.cpp.

unsigned LodePNG_chunk_check_crc ( const unsigned char *  chunk)

Definition at line 2332 of file lodepng.cpp.

unsigned char LodePNG_chunk_critical ( const unsigned char *  chunk)

Definition at line 2307 of file lodepng.cpp.

unsigned char* LodePNG_chunk_data ( unsigned char *  chunk)

Definition at line 2322 of file lodepng.cpp.

const unsigned char* LodePNG_chunk_data_const ( const unsigned char *  chunk)

Definition at line 2327 of file lodepng.cpp.

void LodePNG_chunk_generate_crc ( unsigned char *  chunk)

Definition at line 2342 of file lodepng.cpp.

unsigned LodePNG_chunk_length ( const unsigned char *  chunk)

Definition at line 2289 of file lodepng.cpp.

unsigned char* LodePNG_chunk_next ( unsigned char *  chunk)

Definition at line 2349 of file lodepng.cpp.

const unsigned char* LodePNG_chunk_next_const ( const unsigned char *  chunk)

Definition at line 2355 of file lodepng.cpp.

unsigned char LodePNG_chunk_private ( const unsigned char *  chunk)

Definition at line 2312 of file lodepng.cpp.

unsigned char LodePNG_chunk_safetocopy ( const unsigned char *  chunk)

Definition at line 2317 of file lodepng.cpp.

void LodePNG_chunk_type ( char  type[5],
const unsigned char *  chunk 
)

Definition at line 2294 of file lodepng.cpp.

unsigned char LodePNG_chunk_type_equals ( const unsigned char *  chunk,
const char *  type 
)

Definition at line 2301 of file lodepng.cpp.

void LodePNG_CompressSettings_init ( LodePNG_CompressSettings settings)

Definition at line 2165 of file lodepng.cpp.

unsigned LodePNG_convert ( unsigned char *  out,
const unsigned char *  in,
LodePNG_InfoColor infoOut,
LodePNG_InfoColor infoIn,
unsigned  w,
unsigned  h 
)

Definition at line 3257 of file lodepng.cpp.

unsigned LodePNG_create_chunk ( unsigned char **  out,
size_t *  outlength,
unsigned  length,
const char *  type,
const unsigned char *  data 
)

Definition at line 2380 of file lodepng.cpp.

unsigned LodePNG_decode ( unsigned char **  out,
unsigned *  w,
unsigned *  h,
const unsigned char *  in,
size_t  insize,
unsigned  colorType,
unsigned  bitDepth 
)

Definition at line 4114 of file lodepng.cpp.

unsigned LodePNG_decode24 ( unsigned char **  out,
unsigned *  w,
unsigned *  h,
const unsigned char *  in,
size_t  insize 
)

Definition at line 4136 of file lodepng.cpp.

unsigned LodePNG_decode24_file ( unsigned char **  out,
unsigned *  w,
unsigned *  h,
const char *  filename 
)

Definition at line 4159 of file lodepng.cpp.

unsigned LodePNG_decode32 ( unsigned char **  out,
unsigned *  w,
unsigned *  h,
const unsigned char *  in,
size_t  insize 
)

Definition at line 4131 of file lodepng.cpp.

unsigned LodePNG_decode32_file ( unsigned char **  out,
unsigned *  w,
unsigned *  h,
const char *  filename 
)

Definition at line 4154 of file lodepng.cpp.

unsigned LodePNG_decode_file ( unsigned char **  out,
unsigned *  w,
unsigned *  h,
const char *  filename,
unsigned  colorType,
unsigned  bitDepth 
)

Definition at line 4142 of file lodepng.cpp.

void LodePNG_Decoder_cleanup ( LodePNG_Decoder decoder)

Definition at line 4186 of file lodepng.cpp.

void LodePNG_Decoder_copy ( LodePNG_Decoder dest,
const LodePNG_Decoder source 
)

Definition at line 4192 of file lodepng.cpp.

void LodePNG_Decoder_decode ( LodePNG_Decoder decoder,
unsigned char **  out,
size_t *  outsize,
const unsigned char *  in,
size_t  insize 
)

Definition at line 4068 of file lodepng.cpp.

void LodePNG_Decoder_init ( LodePNG_Decoder decoder)

Definition at line 4178 of file lodepng.cpp.

void LodePNG_Decoder_inspect ( LodePNG_Decoder decoder,
const unsigned char *  in,
size_t  insize 
)

Definition at line 3359 of file lodepng.cpp.

void LodePNG_DecodeSettings_init ( LodePNG_DecodeSettings settings)

Definition at line 4165 of file lodepng.cpp.

void LodePNG_DecompressSettings_init ( LodePNG_DecompressSettings settings)

Definition at line 2179 of file lodepng.cpp.

unsigned LodePNG_encode ( unsigned char **  out,
size_t *  outsize,
const unsigned char *  image,
unsigned  w,
unsigned  h,
unsigned  colorType,
unsigned  bitDepth 
)

Definition at line 5142 of file lodepng.cpp.

unsigned LodePNG_encode24 ( unsigned char **  out,
size_t *  outsize,
const unsigned char *  image,
unsigned  w,
unsigned  h 
)

Definition at line 5163 of file lodepng.cpp.

unsigned LodePNG_encode24_file ( const char *  filename,
const unsigned char *  image,
unsigned  w,
unsigned  h 
)

Definition at line 5185 of file lodepng.cpp.

unsigned LodePNG_encode32 ( unsigned char **  out,
size_t *  outsize,
const unsigned char *  image,
unsigned  w,
unsigned  h 
)

Definition at line 5158 of file lodepng.cpp.

unsigned LodePNG_encode32_file ( const char *  filename,
const unsigned char *  image,
unsigned  w,
unsigned  h 
)

Definition at line 5180 of file lodepng.cpp.

unsigned LodePNG_encode_file ( const char *  filename,
const unsigned char *  image,
unsigned  w,
unsigned  h,
unsigned  colorType,
unsigned  bitDepth 
)

Definition at line 5169 of file lodepng.cpp.

void LodePNG_Encoder_cleanup ( LodePNG_Encoder encoder)

Definition at line 5211 of file lodepng.cpp.

void LodePNG_Encoder_copy ( LodePNG_Encoder dest,
const LodePNG_Encoder source 
)

Definition at line 5217 of file lodepng.cpp.

void LodePNG_Encoder_encode ( LodePNG_Encoder encoder,
unsigned char **  out,
size_t *  outsize,
const unsigned char *  image,
unsigned  w,
unsigned  h 
)

Definition at line 4938 of file lodepng.cpp.

void LodePNG_Encoder_init ( LodePNG_Encoder encoder)

Definition at line 5203 of file lodepng.cpp.

void LodePNG_EncodeSettings_init ( LodePNG_EncodeSettings settings)

Definition at line 5191 of file lodepng.cpp.

const char* LodePNG_error_text ( unsigned  code)

Definition at line 5239 of file lodepng.cpp.

unsigned LodePNG_InfoColor_addPalette ( LodePNG_InfoColor info,
unsigned char  r,
unsigned char  g,
unsigned char  b,
unsigned char  a 
)

Definition at line 2472 of file lodepng.cpp.

unsigned LodePNG_InfoColor_canHaveAlpha ( const LodePNG_InfoColor info)

Definition at line 2530 of file lodepng.cpp.

void LodePNG_InfoColor_cleanup ( LodePNG_InfoColor info)

Definition at line 2461 of file lodepng.cpp.

void LodePNG_InfoColor_clearPalette ( LodePNG_InfoColor info)

Definition at line 2466 of file lodepng.cpp.

unsigned LodePNG_InfoColor_copy ( LodePNG_InfoColor dest,
const LodePNG_InfoColor source 
)

Definition at line 2787 of file lodepng.cpp.

unsigned LodePNG_InfoColor_getBpp ( const LodePNG_InfoColor info)

Definition at line 2494 of file lodepng.cpp.

unsigned LodePNG_InfoColor_getChannels ( const LodePNG_InfoColor info)

Definition at line 2500 of file lodepng.cpp.

unsigned LodePNG_InfoColor_hasPaletteAlpha ( const LodePNG_InfoColor info)

Definition at line 2520 of file lodepng.cpp.

void LodePNG_InfoColor_init ( LodePNG_InfoColor info)

Definition at line 2451 of file lodepng.cpp.

unsigned LodePNG_InfoColor_isAlphaType ( const LodePNG_InfoColor info)

Definition at line 2510 of file lodepng.cpp.

unsigned LodePNG_InfoColor_isGreyscaleType ( const LodePNG_InfoColor info)

Definition at line 2505 of file lodepng.cpp.

unsigned LodePNG_InfoColor_isPaletteType ( const LodePNG_InfoColor info)

Definition at line 2515 of file lodepng.cpp.

void LodePNG_InfoPng_cleanup ( LodePNG_InfoPng info)

Definition at line 2748 of file lodepng.cpp.

unsigned LodePNG_InfoPng_copy ( LodePNG_InfoPng dest,
const LodePNG_InfoPng source 
)

Definition at line 2760 of file lodepng.cpp.

void LodePNG_InfoPng_init ( LodePNG_InfoPng info)

Definition at line 2726 of file lodepng.cpp.

void LodePNG_InfoRaw_cleanup ( LodePNG_InfoRaw info)

Definition at line 2803 of file lodepng.cpp.

unsigned LodePNG_InfoRaw_copy ( LodePNG_InfoRaw dest,
const LodePNG_InfoRaw source 
)

Definition at line 2808 of file lodepng.cpp.

void LodePNG_InfoRaw_init ( LodePNG_InfoRaw info)

Definition at line 2798 of file lodepng.cpp.

unsigned LodePNG_IText_add ( LodePNG_IText text,
const char *  key,
const char *  langtag,
const char *  transkey,
const char *  str 
)

Definition at line 2688 of file lodepng.cpp.

void LodePNG_IText_cleanup ( LodePNG_IText text)

Definition at line 2650 of file lodepng.cpp.

void LodePNG_IText_clear ( LodePNG_IText text)

Definition at line 2672 of file lodepng.cpp.

unsigned LodePNG_IText_copy ( LodePNG_IText dest,
const LodePNG_IText source 
)

Definition at line 2655 of file lodepng.cpp.

void LodePNG_IText_init ( LodePNG_IText text)

Definition at line 2641 of file lodepng.cpp.

unsigned LodePNG_loadFile ( unsigned char **  out,
size_t *  outsize,
const char *  filename 
)

Definition at line 393 of file lodepng.cpp.

unsigned LodePNG_saveFile ( const unsigned char *  buffer,
size_t  buffersize,
const char *  filename 
)

Definition at line 421 of file lodepng.cpp.

unsigned LodePNG_Text_add ( LodePNG_Text text,
const char *  key,
const char *  str 
)

Definition at line 2615 of file lodepng.cpp.

void LodePNG_Text_cleanup ( LodePNG_Text text)

Definition at line 2584 of file lodepng.cpp.

void LodePNG_Text_clear ( LodePNG_Text text)

Definition at line 2603 of file lodepng.cpp.

unsigned LodePNG_Text_copy ( LodePNG_Text dest,
const LodePNG_Text source 
)

Definition at line 2589 of file lodepng.cpp.

void LodePNG_Text_init ( LodePNG_Text text)

Definition at line 2577 of file lodepng.cpp.

void LodePNG_UnknownChunks_cleanup ( LodePNG_UnknownChunks chunks)

Definition at line 2551 of file lodepng.cpp.

unsigned LodePNG_UnknownChunks_copy ( LodePNG_UnknownChunks dest,
const LodePNG_UnknownChunks src 
)

Definition at line 2557 of file lodepng.cpp.

void LodePNG_UnknownChunks_init ( LodePNG_UnknownChunks chunks)

Definition at line 2544 of file lodepng.cpp.

unsigned LodePNG_zlib_compress ( unsigned char **  out,
size_t *  outsize,
const unsigned char *  in,
size_t  insize,
const LodePNG_CompressSettings settings 
)

Definition at line 2086 of file lodepng.cpp.

unsigned LodePNG_zlib_decompress ( unsigned char **  out,
size_t *  outsize,
const unsigned char *  in,
size_t  insize,
const LodePNG_DecompressSettings settings 
)

Definition at line 2032 of file lodepng.cpp.

Variable Documentation

const LodePNG_CompressSettings LodePNG_defaultCompressSettings

Definition at line 2173 of file lodepng.cpp.

const LodePNG_DecompressSettings LodePNG_defaultDecompressSettings

Definition at line 2184 of file lodepng.cpp.