gd_gif_in.c (libgd-2.3.1) | : | gd_gif_in.c (libgd-2.3.2) | ||
---|---|---|---|---|
skipping to change at line 318 | skipping to change at line 318 | |||
im->interlace = BitSet(buf[8], INTERLACE); | im->interlace = BitSet(buf[8], INTERLACE); | |||
if(!useGlobalColormap) { | if(!useGlobalColormap) { | |||
if(ReadColorMap(fd, bitPixel, localColorMap)) { | if(ReadColorMap(fd, bitPixel, localColorMap)) { | |||
gdImageDestroy(im); | gdImageDestroy(im); | |||
return 0; | return 0; | |||
} | } | |||
ReadImage(im, fd, width, height, localColorMap, BitSet(bu f[8], INTERLACE), &ZeroDataBlock); | ReadImage(im, fd, width, height, localColorMap, BitSet(bu f[8], INTERLACE), &ZeroDataBlock); | |||
} else { | } else { | |||
if(!haveGlobalColormap) { | if(!haveGlobalColormap) { | |||
gdImageDestroy(im); | // Still a valid gif, apply simple default palett | |||
return 0; | e as per spec | |||
ColorMap[CM_RED][1] = 0xff; | ||||
ColorMap[CM_GREEN][1] = 0xff; | ||||
ColorMap[CM_BLUE][1] = 0xff; | ||||
} | } | |||
ReadImage(im, fd, width, height, ColorMap, BitSet(buf[8], INTERLACE), &ZeroDataBlock); | ReadImage(im, fd, width, height, ColorMap, BitSet(buf[8], INTERLACE), &ZeroDataBlock); | |||
} | } | |||
if(Transparent != (-1)) { | if(Transparent != (-1)) { | |||
gdImageColorTransparent(im, Transparent); | gdImageColorTransparent(im, Transparent); | |||
} | } | |||
goto terminated; | goto terminated; | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 5 lines changed or added |