lib/gifcodes.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Copyright (C) 2000 Jim Kent.  This source code may be freely used         *
00003  * for personal, academic, and non-profit purposes.  Commercial use          *
00004  * permitted only by explicit agreement with Jim Kent (jim_kent@pacbell.net) *
00005  *****************************************************************************/
00006 struct gif_header
00007         {
00008         char giftype[6];
00009         unsigned char wlo,whi;
00010         unsigned char hlo,hhi;
00011         unsigned char colpix;   /* flags */
00012         unsigned char bgcolor;
00013         unsigned char reserved;
00014         };
00015 
00016 #define COLTAB  0x80
00017 #define COLMASK 0x70
00018 #define COLSHIFT 4
00019 #define PIXMASK 7
00020 #define COLPIXVGA13 (COLTAB | (5<<COLSHIFT) | 7)
00021 
00022 struct gif_image
00023         {
00024         unsigned char xlo,xhi;
00025         unsigned char ylo,yhi;
00026         unsigned char wlo,whi;
00027         unsigned char hlo,hhi;
00028         unsigned char flags;
00029         };
00030 #define ITLV_BIT 0x40
00031 
00032 /* Various error codes used by decoder
00033  * and my own routines...   It's okay
00034  * for you to define whatever you want,
00035  * as long as it's negative...  It will be
00036  * returned intact up the various subroutine
00037  * levels...
00038  */
00039 #define OUT_OF_MEMORY -10
00040 #define BAD_CODE_SIZE -20
00041 #define READ_ERROR -1
00042 #define WRITE_ERROR -2
00043 #define OPEN_ERROR -3
00044 #define CREATE_ERROR -4
00045 #define TOO_HIGH        -5
00046 
00047 short gif_compress_data(int min_code_size, unsigned char *pt, long size, FILE *out);
00048 int gif_decoder(int linewidth);

Generated on Tue Dec 25 18:39:31 2007 for blat by  doxygen 1.5.2