Lines Matching refs:cs

54 static int _gd2GetHeader(gdIOCtxPtr in, int *sx, int *sy, int *cs, int *vers, int *fmt, int *ncx, i…  in _gd2GetHeader()  argument
105 if (gdGetWord(cs, in) != 1) { in _gd2GetHeader()
108 GD2_DBG(php_gd_error("ChunkSize: %d", *cs)); in _gd2GetHeader()
110 if ((*cs < GD2_CHUNKSIZE_MIN) || (*cs > GD2_CHUNKSIZE_MAX)) { in _gd2GetHeader()
111 GD2_DBG(php_gd_error("Bad chunk size: %d", *cs)); in _gd2GetHeader()
165 static gdImagePtr _gd2CreateFromFile (gdIOCtxPtr in, int *sx, int *sy, int *cs, int *vers, int *fmt… in _gd2CreateFromFile() argument
169 if (_gd2GetHeader (in, sx, sy, cs, vers, fmt, ncx, ncy, cidx) != 1) { in _gd2CreateFromFile()
253 int ncx, ncy, nc, cs, cx, cy; in gdImageCreateFromGd2Ctx() local
269 if (!(im = _gd2CreateFromFile(in, &sx, &sy, &cs, &vers, &fmt, &ncx, &ncy, &chunkIdx))) { in gdImageCreateFromGd2Ctx()
287 chunkMax = cs * bytesPerPixel * cs; in gdImageCreateFromGd2Ctx()
300 ylo = cy * cs; in gdImageCreateFromGd2Ctx()
301 yhi = ylo + cs; in gdImageCreateFromGd2Ctx()
320 xlo = cx * cs; in gdImageCreateFromGd2Ctx()
321 xhi = xlo + cs; in gdImageCreateFromGd2Ctx()
415 int nc, ncx, ncy, cs, cx, cy; in gdImageCreateFromGd2PartCtx() local
441 if (_gd2GetHeader(in, &fsx, &fsy, &cs, &vers, &fmt, &ncx, &ncy, &chunkIdx) != 1) { in gdImageCreateFromGd2PartCtx()
476 chunkMax = cs * cs * 4; in gdImageCreateFromGd2PartCtx()
478 chunkMax = cs * cs; in gdImageCreateFromGd2PartCtx()
489 scx = srcx / cs; in gdImageCreateFromGd2PartCtx()
490 scy = srcy / cs; in gdImageCreateFromGd2PartCtx()
498 ecx = (srcx + w) / cs; in gdImageCreateFromGd2PartCtx()
499 ecy = (srcy + h) / cs; in gdImageCreateFromGd2PartCtx()
513 ylo = cy * cs; in gdImageCreateFromGd2PartCtx()
514 yhi = ylo + cs; in gdImageCreateFromGd2PartCtx()
521 xlo = cx * cs; in gdImageCreateFromGd2PartCtx()
522 xhi = xlo + cs; in gdImageCreateFromGd2PartCtx()
532 dpos = (cy * (cs * fsx) * 4 + cx * cs * (yhi - ylo) * 4) + dstart; in gdImageCreateFromGd2PartCtx()
534 dpos = cy * (cs * fsx) + cx * cs * (yhi - ylo) + dstart; in gdImageCreateFromGd2PartCtx()
622 static void _gd2PutHeader (gdImagePtr im, gdIOCtx * out, int cs, int fmt, int cx, int cy) in _gd2PutHeader() argument
636 gdPutWord(cs, out); in _gd2PutHeader()
642 static void _gdImageGd2 (gdImagePtr im, gdIOCtx * out, int cs, int fmt) in _gdImageGd2() argument
670 if (cs == 0) { in _gdImageGd2()
671 cs = GD2_CHUNKSIZE; in _gdImageGd2()
672 } else if (cs < GD2_CHUNKSIZE_MIN) { in _gdImageGd2()
673 cs = GD2_CHUNKSIZE_MIN; in _gdImageGd2()
674 } else if (cs > GD2_CHUNKSIZE_MAX) { in _gdImageGd2()
675 cs = GD2_CHUNKSIZE_MAX; 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()
693 compMax = (int)(cs * bytesPerPixel * cs * 1.02f) + 12; in _gdImageGd2()
696 chunkData = safe_emalloc(cs * bytesPerPixel, cs, 0); in _gdImageGd2()
697 memset(chunkData, 0, cs * bytesPerPixel * cs); in _gdImageGd2()
722 ylo = cy * cs; in _gdImageGd2()
723 yhi = ylo + cs; in _gdImageGd2()
732 xlo = cx * cs; in _gdImageGd2()
733 xhi = xlo + cs; 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()