-#include <wx/wx.h>
-
-#include <wx/image.h>
-#include <wx/wfstream.h>
-#include <wx/module.h>
-
-#include <wx/imaggif.h>
-
-/*
-
-FOLLOWING CODE IS BY G.R.G. :
-(except wxInputStream stuff)
-
-*/
-
-/************************************************************************
- READGIF.H - Leer un archivo GIF de 8 bits
- ------------------------------------------------------------------------
- Tratamiento Digital de la Imagen
- ------------------------------------------------------------------------
- Guillermo Rodriguez Garcia
- <guille@iies.es>
-
- Version: 2.0
-*************************************************************************/
-
-typedef struct
-{
- int w; /* width */
- int h; /* height */
- unsigned char *p; /* bitmap */
- unsigned char *pal; /* palette */
-} IMAGEN;
-
-
-/************************************************************************
- READGIF.C - Lee un archivo GIF de 256 colores
- ------------------------------------------------------------------------
- Tratamiento Digital de la Imagen
- ------------------------------------------------------------------------
- Guillermo Rodriguez Garcia
- <guille@iies.es>
-
- Version: 2.0
-*************************************************************************/
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-
-/* error codes */
-#define E_OK 0 /* everything was OK */
-#define E_ARCHIVO -1 /* error opening file */
-#define E_FORMATO -2 /* error in gif header */
-#define E_MEMORIA -3 /* error allocating memory */
-
-
-/* This class binding is by VS, so all bugs in it are mine ;-) */
-
-class gifDecoder
-{
- private:
- /* globals */
- int restbits; /* remaining valid bits */
- unsigned int restbyte; /* remaining bytes in this block */
- unsigned int lastbyte; /* last byte read */
-
- unsigned char* file; /* input file in memory */
- unsigned int file_pos, file_size; /* position & size in it */
-
- int fgetc();
- void fread(void *ptr, size_t size, size_t nmemb);
- void fseekcur(int rel_pos);
-
- public:
- gifDecoder(unsigned char* mem, int sz) {file = mem; file_pos = 0; file_size = sz;}
- int getcode(int bits);
- int dgif(IMAGEN *img, int interl, int bits);
- int readgif(IMAGEN *img);
-};
-
-
-int gifDecoder::fgetc()
-{
- if (file_pos < file_size) return file[file_pos++];
- else return EOF;
-}