Chameleon

Chameleon Svn Source Tree

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

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

Archive Download this file

Revision: 2006