Lines Matching refs:fd
93 static int ReadColorMap (gdIOCtx *fd, int number, unsigned char (*buffer)[256]);
94 static int DoExtension (gdIOCtx *fd, int label, int *Transparent, int *ZeroDataBlockP);
95 static int GetDataBlock (gdIOCtx *fd, unsigned char *buf, int *ZeroDataBlockP);
96 static int GetCode (gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroDataBlock…
97 static int LWZReadByte (gdIOCtx *fd, LZW_STATIC_DATA *sd, char flag, int input_code_size, int *Zero…
99 static void ReadImage (gdImagePtr im, gdIOCtx *fd, int len, int height, unsigned char (*cmap)[256],…
116 gdIOCtx *fd = gdNewFileCtx(fdFile); in gdImageCreateFromGif() local
119 im = gdImageCreateFromGifCtx(fd); in gdImageCreateFromGif()
121 fd->gd_free(fd); in gdImageCreateFromGif()
127 gdImagePtr gdImageCreateFromGifCtx(gdIOCtxPtr fd) /* {{{ */ in gdImageCreateFromGifCtx() argument
151 if (! ReadOK(fd,buf,6)) { in gdImageCreateFromGifCtx()
166 if (! ReadOK(fd,buf,7)) { in gdImageCreateFromGifCtx()
181 if (ReadColorMap(fd, BitPixel, ColorMap)) { in gdImageCreateFromGifCtx()
190 if (! ReadOK(fd,&c,1)) { in gdImageCreateFromGifCtx()
198 if (! ReadOK(fd,&c,1)) { in gdImageCreateFromGifCtx()
201 DoExtension(fd, c, &Transparent, &ZeroDataBlock); in gdImageCreateFromGifCtx()
211 if (! ReadOK(fd,buf,9)) { in gdImageCreateFromGifCtx()
235 if (ReadColorMap(fd, bitPixel, localColorMap)) { in gdImageCreateFromGifCtx()
239 ReadImage(im, fd, width, height, localColorMap, in gdImageCreateFromGifCtx()
246 ReadImage(im, fd, width, height, in gdImageCreateFromGifCtx()
279 static int ReadColorMap(gdIOCtx *fd, int number, unsigned char (*buffer)[256]) /* {{{ */ in ReadColorMap() argument
286 if (! ReadOK(fd, rgb, sizeof(rgb))) { in ReadColorMap()
300 DoExtension(gdIOCtx *fd, int label, int *Transparent, int *ZeroDataBlockP) in DoExtension() argument
307 (void) GetDataBlock(fd, (unsigned char*) buf, ZeroDataBlockP); in DoExtension()
316 while (GetDataBlock(fd, (unsigned char*) buf, ZeroDataBlockP) > 0); in DoExtension()
321 while (GetDataBlock(fd, (unsigned char*) buf, ZeroDataBlockP) > 0) in DoExtension()
329 GetDataBlock_(gdIOCtx *fd, unsigned char *buf, int *ZeroDataBlockP) in GetDataBlock_() argument
333 if (! ReadOK(fd,&count,1)) { in GetDataBlock_()
339 if ((count != 0) && (! ReadOK(fd, buf, count))) { in GetDataBlock_()
348 GetDataBlock(gdIOCtx *fd, unsigned char *buf, int *ZeroDataBlockP) in GetDataBlock() argument
353 rv = GetDataBlock_(fd,buf, ZeroDataBlockP); in GetDataBlock()
372 GetCode_(gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroDataBlockP) in GetCode_() argument
395 if ((count = GetDataBlock(fd, &scd->buf[2], ZeroDataBlockP)) <= 0) in GetCode_()
417 GetCode(gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroDataBlockP) in GetCode() argument
421 rv = GetCode_(fd, scd, code_size,flag, ZeroDataBlockP); in GetCode()
428 LWZReadByte_(gdIOCtx *fd, LZW_STATIC_DATA *sd, char flag, int input_code_size, int *ZeroDataBlockP) in LWZReadByte_() argument
440 GetCode(fd, &sd->scd, 0, TRUE, ZeroDataBlockP); in LWZReadByte_()
458 GetCode(fd, &sd->scd, sd->code_size, FALSE, ZeroDataBlockP); in LWZReadByte_()
466 while ((code = GetCode(fd, &sd->scd, sd->code_size, FALSE, ZeroDataBlockP)) >= 0) { in LWZReadByte_()
479 GetCode(fd, &sd->scd, sd->code_size, FALSE, ZeroDataBlockP); in LWZReadByte_()
488 while ((count = GetDataBlock(fd, buf, ZeroDataBlockP)) > 0) in LWZReadByte_()
542 LWZReadByte(gdIOCtx *fd, LZW_STATIC_DATA *sd, char flag, int input_code_size, int *ZeroDataBlockP) in LWZReadByte() argument
546 rv = LWZReadByte_(fd, sd, flag, input_code_size, ZeroDataBlockP); in LWZReadByte()
553 ReadImage(gdImagePtr im, gdIOCtx *fd, int len, int height, unsigned char (*cmap)[256], int interlac… in ReadImage() argument
565 if (! ReadOK(fd,&c,1)) { in ReadImage()
582 if (LWZReadByte(fd, &sd, TRUE, c, ZeroDataBlockP) < 0) { in ReadImage()
596 while ((v = LWZReadByte(fd, &sd, FALSE, c, ZeroDataBlockP)) >= 0) { in ReadImage()
641 if (LWZReadByte(fd, &sd, FALSE, c, ZeroDataBlockP) >=0) { in ReadImage()