1 #ifndef __L4PNG_WRAP_H__
2 #define __L4PNG_WRAP_H__
8 #define ARGB_BUF_TO_SMALL -2
10 #define EDAMAGEDPNG -4;
13 * \brief Get the dimension of an PNG picture.
14 * \return 0 on success, negative on error
16 int png_get_size_mem(void *png_data, int png_data_size, int *width, int *height);
17 int png_get_size_file(const char *fp, int *width, int *height);
19 /** CONVERT PNG TO A ARGB-BUFFER (ALPHA, RED, GREEN, BLUE) **/
20 int png_convert_ARGB_mem(void *png_data, void *argb_buf,
21 int png_data_size, unsigned argb_max_size);
22 int png_convert_ARGB_file(const char *filename, void *argb_buf,
23 unsigned argb_max_size);
24 int png_convert_RGB16bit_mem(void *png_data, void *argb_buf,
25 int png_data_size, unsigned argb_max_size,
27 int png_convert_RGB16bit_file(const char *filename, void *argb_buf,
28 unsigned argb_max_size,
33 #endif /* ! __L4PNG_WRAP_H__ */