image->SetMask(FALSE);
// Set the palette
+ // Palette creation not yet implemented on wxGTK
+#ifndef __WXGTK__
if (pal)
{
unsigned char* r = new unsigned char[256];
image->SetPalette(wxPalette(256, r, g, b));
delete[] r; delete[] g; delete[] b;
}
+#endif
/* copy image data */
for (i = 0; i < (GetWidth() * GetHeight()); i++, src++)
//
int wxGIFDecoder::dgif(GIFImage *img, int interl, int bits)
{
+#ifdef __WXMAC__
+ int *ab_prefix = new int[4096]; /* alphabet (prefixes) */
+ int *ab_tail = new int[4096]; /* alphabet (tails) */
+ int *stack = new int[4096]; /* decompression stack */
+#else
int ab_prefix[4096]; /* alphabet (prefixes) */
int ab_tail[4096]; /* alphabet (tails) */
int stack[4096]; /* decompression stack */
-
+#endif
int ab_clr; /* clear code */
int ab_fin; /* end of info code */
int ab_bits; /* actual symbol width, in bits */
}
while (code != ab_fin);
+#ifdef __WXMAC__
+ delete [] ab_prefix ;
+ delete [] ab_tail ;
+ delete [] stack ;
+#endif
return 0;
}
int ncolors, bits, interl, transparent, disposal, i;
long size;
long delay;
- unsigned char type;
+ unsigned char type = 0;
unsigned char pal[768];
unsigned char buf[16];
GIFImage **ppimg, *pimg, *pprev;