Lines Matching refs:im

48 extern int _gdGetColors(gdIOCtx * in, gdImagePtr im, int gd2xFlag);
49 extern void _gdPutColors(gdImagePtr im, gdIOCtx * out);
167 gdImagePtr im; in _gd2CreateFromFile() local
175 im = gdImageCreateTrueColor(*sx, *sy); in _gd2CreateFromFile()
177 im = gdImageCreate(*sx, *sy); in _gd2CreateFromFile()
179 if (im == NULL) { in _gd2CreateFromFile()
184 if (!_gdGetColors(in, im, (*vers) == 2)) { in _gd2CreateFromFile()
188 GD2_DBG(php_gd_error("Image palette completed: %d colours", im->colorsTotal)); in _gd2CreateFromFile()
190 return im; in _gd2CreateFromFile()
193 gdImageDestroy(im); in _gd2CreateFromFile()
230 gdImagePtr im; in gdImageCreateFromGd2() local
232 im = gdImageCreateFromGd2Ctx(in); in gdImageCreateFromGd2()
236 return im; in gdImageCreateFromGd2()
241 gdImagePtr im; in gdImageCreateFromGd2Ptr() local
243 im = gdImageCreateFromGd2Ctx(in); in gdImageCreateFromGd2Ptr()
246 return im; in gdImageCreateFromGd2Ptr()
266 gdImagePtr im; in gdImageCreateFromGd2Ctx() local
269 if (!(im = _gd2CreateFromFile(in, &sx, &sy, &cs, &vers, &fmt, &ncx, &ncy, &chunkIdx))) { in gdImageCreateFromGd2Ctx()
273 bytesPerPixel = im->trueColor ? 4 : 1; in gdImageCreateFromGd2Ctx()
302 if (yhi > im->sy) { in gdImageCreateFromGd2Ctx()
303 yhi = im->sy; in gdImageCreateFromGd2Ctx()
322 if (xhi > im->sx) { in gdImageCreateFromGd2Ctx()
323 xhi = im->sx; in gdImageCreateFromGd2Ctx()
328 if (im->trueColor) { in gdImageCreateFromGd2Ctx()
329 if (!gdGetInt(&im->tpixels[y][x], in)) { in gdImageCreateFromGd2Ctx()
330 im->tpixels[y][x] = 0; in gdImageCreateFromGd2Ctx()
337 im->pixels[y][x] = ch; in gdImageCreateFromGd2Ctx()
342 if (im->trueColor) { in gdImageCreateFromGd2Ctx()
348 im->tpixels[y][x] = a + r + g + b; in gdImageCreateFromGd2Ctx()
350 im->pixels[y][x] = chunkBuf[chunkPos++]; in gdImageCreateFromGd2Ctx()
373 return im; in gdImageCreateFromGd2Ctx()
376 gdImageDestroy(im); in gdImageCreateFromGd2Ctx()
392 gdImagePtr im; in gdImageCreateFromGd2PartPtr() local
394 im = gdImageCreateFromGd2PartCtx(in, srcx, srcy, w, h); in gdImageCreateFromGd2PartPtr()
397 return im; in gdImageCreateFromGd2PartPtr()
402 gdImagePtr im; in gdImageCreateFromGd2Part() local
405 im = gdImageCreateFromGd2PartCtx(in, srcx, srcy, w, h); in gdImageCreateFromGd2Part()
409 return im; in gdImageCreateFromGd2Part()
431 gdImagePtr im; in gdImageCreateFromGd2PartCtx() local
449 im = gdImageCreateTrueColor(w, h); in gdImageCreateFromGd2PartCtx()
451 im = gdImageCreate(w, h); in gdImageCreateFromGd2PartCtx()
453 if (im == NULL) { in gdImageCreateFromGd2PartCtx()
457 if (!_gdGetColors(in, im, vers == 2)) { in gdImageCreateFromGd2PartCtx()
460 GD2_DBG(php_gd_error("Image palette completed: %d colours", im->colorsTotal)); in gdImageCreateFromGd2PartCtx()
475 if (im->trueColor) { in gdImageCreateFromGd2PartCtx()
531 if (im->trueColor) { in gdImageCreateFromGd2PartCtx()
560 if (im->trueColor) { in gdImageCreateFromGd2PartCtx()
571 if (im->trueColor) { in gdImageCreateFromGd2PartCtx()
583 if (im->trueColor) { in gdImageCreateFromGd2PartCtx()
584 im->tpixels[y - srcy][x - srcx] = ch; in gdImageCreateFromGd2PartCtx()
586 im->pixels[y - srcy][x - srcx] = ch; in gdImageCreateFromGd2PartCtx()
604 return im; in gdImageCreateFromGd2PartCtx()
607 gdImageDestroy(im); in gdImageCreateFromGd2PartCtx()
622 static void _gd2PutHeader (gdImagePtr im, gdIOCtx * out, int cs, int fmt, int cx, int cy) in _gd2PutHeader() argument
634 gdPutWord(im->sx, out); in _gd2PutHeader()
635 gdPutWord(im->sy, out); in _gd2PutHeader()
642 static void _gdImageGd2 (gdImagePtr im, gdIOCtx * out, int cs, int fmt) in _gdImageGd2() argument
655 int bytesPerPixel = im->trueColor ? 4 : 1; in _gdImageGd2()
660 fmt = im->trueColor ? GD2_FMT_TRUECOLOR_COMPRESSED : GD2_FMT_COMPRESSED; in _gdImageGd2()
662 if (im->trueColor) { in _gdImageGd2()
679 ncx = im->sx / cs + 1; in _gdImageGd2()
680 ncy = im->sy / cs + 1; in _gdImageGd2()
683 _gd2PutHeader (im, out, cs, fmt, ncx, ncy); in _gdImageGd2()
715 _gdPutColors (im, out); in _gdImageGd2()
717 GD2_DBG(php_gd_error("Size: %dx%d", im->sx, im->sy)); in _gdImageGd2()
724 if (yhi > im->sy) { in _gdImageGd2()
725 yhi = im->sy; in _gdImageGd2()
734 if (xhi > im->sx) { in _gdImageGd2()
735 xhi = im->sx; in _gdImageGd2()
741 if (im->trueColor) { in _gdImageGd2()
742 int p = im->tpixels[y][x]; in _gdImageGd2()
748 chunkData[chunkLen++] = im->pixels[y][x]; in _gdImageGd2()
755 if (im->trueColor) { in _gdImageGd2()
756 gdPutInt(im->tpixels[y][x], out); in _gdImageGd2()
758 gdPutC((unsigned char) im->pixels[y][x], out); in _gdImageGd2()
810 void gdImageGd2 (gdImagePtr im, FILE * outFile, int cs, int fmt) in gdImageGd2() argument
814 _gdImageGd2(im, out, cs, fmt); in gdImageGd2()
819 void *gdImageGd2Ptr (gdImagePtr im, int cs, int fmt, int *size) in gdImageGd2Ptr() argument
824 _gdImageGd2(im, out, cs, fmt); in gdImageGd2Ptr()