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