Chameleon

Chameleon Svn Source Tree

Root/branches/meklort/i386/modules/GUI/picopng.h

Source at commit 735 created 13 years 2 months ago.
By meklort, GUI module bugfixes. Kext Patcher additions.
1#ifndef _PICOPNG_H
2#define _PICOPNG_H
3
4#include <stdint.h>
5
6typedef struct {
7uint32_t *data;
8size_t size;
9size_t allocsize;
10} vector32_t;
11
12typedef struct {
13uint8_t *data;
14size_t size;
15size_t allocsize;
16} vector8_t;
17
18typedef struct {
19uint32_t width, height;
20uint32_t colorType, bitDepth;
21uint32_t compressionMethod, filterMethod, interlaceMethod;
22uint32_t key_r, key_g, key_b;
23bool key_defined; // is a transparent color key given?
24vector8_t *palette;
25vector8_t *image;
26} PNG_info_t;
27
28PNG_info_t *PNG_decode(const uint8_t *in, uint32_t size);
29void png_alloc_free_all();
30
31extern int PNG_error;
32
33
34int loadPngImage(const char *filename, uint16_t *width, uint16_t *height,
35 uint8_t **imageData);
36int loadEmbeddedPngImage(uint8_t *pngData, int pngSize, uint16_t *width, uint16_t *height, uint8_t **imageData);
37
38
39#endif
40

Archive Download this file

Revision: 735