X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3ca6a5f04692678cd2d9f3ea0843fc3f5a0b254f..fb20fa43a07ce52feb43a4b26514fc7a6a11a6f5:/src/common/gifdecod.cpp diff --git a/src/common/gifdecod.cpp b/src/common/gifdecod.cpp index a45cb5ab37..c08bf1fdf6 100644 --- a/src/common/gifdecod.cpp +++ b/src/common/gifdecod.cpp @@ -127,6 +127,8 @@ bool wxGIFDecoder::ConvertToImage(wxImage *image) const image->SetMask(FALSE); // Set the palette + // Palette creation not yet implemented on wxGTK +#ifndef __WXGTK__ if (pal) { unsigned char* r = new unsigned char[256]; @@ -141,6 +143,7 @@ bool wxGIFDecoder::ConvertToImage(wxImage *image) const 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++) @@ -333,10 +336,15 @@ int wxGIFDecoder::getcode(int bits, int ab_fin) // 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 */ @@ -460,6 +468,11 @@ int wxGIFDecoder::dgif(GIFImage *img, int interl, int bits) } while (code != ab_fin); +#ifdef __WXMAC__ + delete [] ab_prefix ; + delete [] ab_tail ; + delete [] stack ; +#endif return 0; }