5454#ifndef PNG_MAX_BUFFERED_PIXELS
5555#define PNG_MAX_BUFFERED_PIXELS ((320 *4 + 1 )*2 )
5656#endif
57+
58+ #ifndef __PNGENC__
5759// PNG filter type
5860enum {
5961 PNG_FILTER_NONE=0 ,
@@ -78,16 +80,6 @@ enum {
7880 PNG_PIXEL_GRAY_ALPHA=4 ,
7981 PNG_PIXEL_TRUECOLOR_ALPHA=6
8082};
81- // RGB565 endianness
82- enum {
83- PNG_RGB565_LITTLE_ENDIAN = 0 ,
84- PNG_RGB565_BIG_ENDIAN
85- };
86-
87- enum {
88- PNG_MEM_RAM=0 ,
89- PNG_MEM_FLASH
90- };
9183
9284// Error codes returned by getLastError()
9385enum {
@@ -102,6 +94,27 @@ enum {
10294 PNG_QUIT_EARLY
10395};
10496
97+ typedef struct png_file_tag
98+ {
99+ int32_t iPos; // current file position
100+ int32_t iSize; // file size
101+ uint8_t *pData; // memory file pointer
102+ void * fHandle ; // class pointer to File/SdFat or whatever you want
103+ } PNGFILE;
104+
105+ #endif // !__PNGENC__
106+
107+ // RGB565 endianness
108+ enum {
109+ PNG_RGB565_LITTLE_ENDIAN = 0 ,
110+ PNG_RGB565_BIG_ENDIAN
111+ };
112+
113+ enum {
114+ PNG_MEM_RAM=0 ,
115+ PNG_MEM_FLASH
116+ };
117+
105118typedef struct png_draw_tag
106119{
107120 int y; // starting x,y of this line
@@ -116,14 +129,6 @@ typedef struct png_draw_tag
116129 uint8_t *pPixels;
117130} PNGDRAW;
118131
119- typedef struct png_file_tag
120- {
121- int32_t iPos; // current file position
122- int32_t iSize; // file size
123- uint8_t *pData; // memory file pointer
124- void * fHandle ; // class pointer to File/SdFat or whatever you want
125- } PNGFILE;
126-
127132// Callback function prototypes
128133typedef int32_t (PNG_READ_CALLBACK)(PNGFILE *pFile, uint8_t *pBuf, int32_t iLen);
129134typedef int32_t (PNG_SEEK_CALLBACK)(PNGFILE *pFile, int32_t iPosition);
0 commit comments