--- parser3/src/lib/gd/gif.C 2004/02/11 15:33:15 1.2 +++ parser3/src/lib/gd/gif.C 2004/03/25 11:50:57 1.4 @@ -14,7 +14,7 @@ can incorporate them into new versions. */ -static const char * const IDENT_GIF_C="$Date: 2004/02/11 15:33:15 $"; +static const char * const IDENT_GIF_C="$Date: 2004/03/25 11:50:57 $"; #include "gif.h" @@ -112,6 +112,11 @@ int gdImage::Color(unsigned int rgb){ unsigned int b=rgb, g=b>>8, r=g>>8; return ColorRGB(r & 0xFF,g & 0xFF,b & 0xFF); } +unsigned int gdImage::DecodeColor(int color) { + if(color<0) + return color; + return (((red[color]<<8) + green[color])<<8)+blue[color]; +} void gdImage::ColorDeallocate(int color) { @@ -154,7 +159,7 @@ void gdImage::SetPixel(int x, int y, int int gdImage::GetPixel(int x, int y) { - return BoundsSafe(x, y) ? pixels[x][y]:0; + return BoundsSafe(x, y) ? pixels[x][y]:-1; } /* Bresenham as presented in Foley & Van Dam */