Lines Matching refs:fd
94 static int ReadColorMap (gdIOCtx *fd, int number, unsigned char (*buffer)[256]);
95 static int DoExtension (gdIOCtx *fd, int label, int *Transparent, int *ZeroDataBlockP);
96 static int GetDataBlock (gdIOCtx *fd, unsigned char *buf, int *ZeroDataBlockP);
97 static int GetCode (gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroDataBlock…
98 static int LWZReadByte (gdIOCtx *fd, LZW_STATIC_DATA *sd, char flag, int input_code_size, int *Zero…
100 static void ReadImage (gdImagePtr im, gdIOCtx *fd, int len, int height, unsigned char (*cmap)[256],…
117 gdIOCtx *fd = gdNewFileCtx(fdFile); in gdImageCreateFromGif() local
120 im = gdImageCreateFromGifCtx(fd); in gdImageCreateFromGif()
122 fd->gd_free(fd); in gdImageCreateFromGif()
128 gdImagePtr gdImageCreateFromGifCtx(gdIOCtxPtr fd) /* {{{ */ in gdImageCreateFromGifCtx() argument
155 if (! ReadOK(fd,buf,6)) { in gdImageCreateFromGifCtx()
170 if (! ReadOK(fd,buf,7)) { in gdImageCreateFromGifCtx()
185 if (ReadColorMap(fd, BitPixel, ColorMap)) { in gdImageCreateFromGifCtx()
194 if (! ReadOK(fd,&c,1)) { in gdImageCreateFromGifCtx()
202 if (! ReadOK(fd,&c,1)) { in gdImageCreateFromGifCtx()
205 DoExtension(fd, c, &Transparent, &ZeroDataBlock); in gdImageCreateFromGifCtx()
215 if (! ReadOK(fd,buf,9)) { in gdImageCreateFromGifCtx()
239 if (ReadColorMap(fd, bitPixel, localColorMap)) { in gdImageCreateFromGifCtx()
243 ReadImage(im, fd, width, height, localColorMap, in gdImageCreateFromGifCtx()
250 ReadImage(im, fd, width, height, in gdImageCreateFromGifCtx()
283 static int ReadColorMap(gdIOCtx *fd, int number, unsigned char (*buffer)[256]) /* {{{ */ in ReadColorMap() argument
290 if (! ReadOK(fd, rgb, sizeof(rgb))) { in ReadColorMap()
304 DoExtension(gdIOCtx *fd, int label, int *Transparent, int *ZeroDataBlockP) in DoExtension() argument
311 (void) GetDataBlock(fd, (unsigned char*) buf, ZeroDataBlockP); in DoExtension()
320 while (GetDataBlock(fd, (unsigned char*) buf, ZeroDataBlockP) > 0); in DoExtension()
325 while (GetDataBlock(fd, (unsigned char*) buf, ZeroDataBlockP) > 0) in DoExtension()
333 GetDataBlock_(gdIOCtx *fd, unsigned char *buf, int *ZeroDataBlockP) in GetDataBlock_() argument
337 if (! ReadOK(fd,&count,1)) { in GetDataBlock_()
343 if ((count != 0) && (! ReadOK(fd, buf, count))) { in GetDataBlock_()
352 GetDataBlock(gdIOCtx *fd, unsigned char *buf, int *ZeroDataBlockP) in GetDataBlock() argument
357 rv = GetDataBlock_(fd,buf, ZeroDataBlockP); in GetDataBlock()
376 GetCode_(gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroDataBlockP) in GetCode_() argument
399 if ((count = GetDataBlock(fd, &scd->buf[2], ZeroDataBlockP)) <= 0) in GetCode_()
421 GetCode(gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroDataBlockP) in GetCode() argument
425 rv = GetCode_(fd, scd, code_size,flag, ZeroDataBlockP); in GetCode()
432 LWZReadByte_(gdIOCtx *fd, LZW_STATIC_DATA *sd, char flag, int input_code_size, int *ZeroDataBlockP) in LWZReadByte_() argument
444 GetCode(fd, &sd->scd, 0, TRUE, ZeroDataBlockP); in LWZReadByte_()
462 GetCode(fd, &sd->scd, sd->code_size, FALSE, ZeroDataBlockP); in LWZReadByte_()
470 while ((code = GetCode(fd, &sd->scd, sd->code_size, FALSE, ZeroDataBlockP)) >= 0) { in LWZReadByte_()
483 GetCode(fd, &sd->scd, sd->code_size, FALSE, ZeroDataBlockP); in LWZReadByte_()
492 while ((count = GetDataBlock(fd, buf, ZeroDataBlockP)) > 0) in LWZReadByte_()
546 LWZReadByte(gdIOCtx *fd, LZW_STATIC_DATA *sd, char flag, int input_code_size, int *ZeroDataBlockP) in LWZReadByte() argument
550 rv = LWZReadByte_(fd, sd, flag, input_code_size, ZeroDataBlockP); in LWZReadByte()
557 ReadImage(gdImagePtr im, gdIOCtx *fd, int len, int height, unsigned char (*cmap)[256], int interlac… in ReadImage() argument
569 if (! ReadOK(fd,&c,1)) { in ReadImage()
586 if (LWZReadByte(fd, &sd, TRUE, c, ZeroDataBlockP) < 0) { in ReadImage()
600 while ((v = LWZReadByte(fd, &sd, FALSE, c, ZeroDataBlockP)) >= 0) { in ReadImage()
645 if (LWZReadByte(fd, &sd, FALSE, c, ZeroDataBlockP) >=0) { in ReadImage()