< prev index next >

lib/gif_lib.h

Print this page


























   1 /******************************************************************************
   2  
   3 gif_lib.h - service library for decoding and encoding GIF images
   4                                                                              
   5 *****************************************************************************/
   6 
   7 #ifndef _GIF_LIB_H_
   8 #define _GIF_LIB_H_ 1
   9 
  10 #ifdef __cplusplus
  11 extern "C" {
  12 #endif /* __cplusplus */
  13 
  14 #define GIFLIB_MAJOR 5
  15 #define GIFLIB_MINOR 1
  16 #define GIFLIB_RELEASE 1
  17 
  18 #define GIF_ERROR   0
  19 #define GIF_OK      1
  20 
  21 #include <stddef.h>
  22 #include <stdbool.h>






  23 
  24 #define GIF_STAMP "GIFVER"          /* First chars in file - GIF stamp.  */
  25 #define GIF_STAMP_LEN sizeof(GIF_STAMP) - 1
  26 #define GIF_VERSION_POS 3           /* Version first character in stamp. */
  27 #define GIF87_STAMP "GIF87a"        /* First chars in file - GIF stamp.  */
  28 #define GIF89_STAMP "GIF89a"        /* First chars in file - GIF stamp.  */
  29 
  30 typedef unsigned char GifPixelType;
  31 typedef unsigned char *GifRowType;
  32 typedef unsigned char GifByteType;
  33 typedef unsigned int GifPrefixType;
  34 typedef int GifWord;
  35 
  36 typedef struct GifColorType {
  37     GifByteType Red, Green, Blue;
  38 } GifColorType;
  39 
  40 typedef struct ColorMapObject {
  41     int ColorCount;
  42     int BitsPerPixel;


   1 /*
   2  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   3  *
   4  * This code is free software; you can redistribute it and/or modify it
   5  * under the terms of the GNU General Public License version 2 only, as
   6  * published by the Free Software Foundation.  Oracle designates this
   7  * particular file as subject to the "Classpath" exception as provided
   8  * by Oracle in the LICENSE file that accompanied this code.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  */
  24 
  25 /******************************************************************************
  26  
  27 gif_lib.h - service library for decoding and encoding GIF images
  28                                                                              
  29 *****************************************************************************/
  30 
  31 #ifndef _GIF_LIB_H_
  32 #define _GIF_LIB_H_ 1
  33 
  34 #ifdef __cplusplus
  35 extern "C" {
  36 #endif /* __cplusplus */
  37 
  38 #define GIFLIB_MAJOR 5
  39 #define GIFLIB_MINOR 1
  40 #define GIFLIB_RELEASE 1
  41 
  42 #define GIF_ERROR   0
  43 #define GIF_OK      1
  44 
  45 #include <stddef.h>
  46 
  47 #ifdef bool
  48 #undef bool
  49 #endif
  50 typedef int bool;
  51 #define false 0
  52 #define true 1
  53 
  54 #define GIF_STAMP "GIFVER"          /* First chars in file - GIF stamp.  */
  55 #define GIF_STAMP_LEN sizeof(GIF_STAMP) - 1
  56 #define GIF_VERSION_POS 3           /* Version first character in stamp. */
  57 #define GIF87_STAMP "GIF87a"        /* First chars in file - GIF stamp.  */
  58 #define GIF89_STAMP "GIF89a"        /* First chars in file - GIF stamp.  */
  59 
  60 typedef unsigned char GifPixelType;
  61 typedef unsigned char *GifRowType;
  62 typedef unsigned char GifByteType;
  63 typedef unsigned int GifPrefixType;
  64 typedef int GifWord;
  65 
  66 typedef struct GifColorType {
  67     GifByteType Red, Green, Blue;
  68 } GifColorType;
  69 
  70 typedef struct ColorMapObject {
  71     int ColorCount;
  72     int BitsPerPixel;


< prev index next >