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()
182 static gdImagePtr _gd2CreateFromFile (gdIOCtxPtr in, int *sx, int *sy, int *cs, int *vers, int *fmt… in _gd2CreateFromFile() argument
186 if (_gd2GetHeader (in, sx, sy, cs, vers, fmt, ncx, ncy, cidx) != 1) { in _gd2CreateFromFile()
270 int ncx, ncy, nc, cs, cx, cy; in gdImageCreateFromGd2Ctx() local
286 if (!(im = _gd2CreateFromFile(in, &sx, &sy, &cs, &vers, &fmt, &ncx, &ncy, &chunkIdx))) { in gdImageCreateFromGd2Ctx()
304 chunkMax = cs * bytesPerPixel * cs; in gdImageCreateFromGd2Ctx()
317 ylo = cy * cs; in gdImageCreateFromGd2Ctx()
318 yhi = ylo + cs; in gdImageCreateFromGd2Ctx()
337 xlo = cx * cs; in gdImageCreateFromGd2Ctx()
338 xhi = xlo + cs; in gdImageCreateFromGd2Ctx()
436 int nc, ncx, ncy, cs, cx, cy; in gdImageCreateFromGd2PartCtx() local
462 if (_gd2GetHeader(in, &fsx, &fsy, &cs, &vers, &fmt, &ncx, &ncy, &chunkIdx) != 1) { in gdImageCreateFromGd2PartCtx()
497 chunkMax = cs * cs * 4; in gdImageCreateFromGd2PartCtx()
499 chunkMax = cs * cs; in gdImageCreateFromGd2PartCtx()
510 scx = srcx / cs; in gdImageCreateFromGd2PartCtx()
511 scy = srcy / cs; in gdImageCreateFromGd2PartCtx()
519 ecx = (srcx + w) / cs; in gdImageCreateFromGd2PartCtx()
520 ecy = (srcy + h) / cs; in gdImageCreateFromGd2PartCtx()
534 ylo = cy * cs; in gdImageCreateFromGd2PartCtx()
535 yhi = ylo + cs; in gdImageCreateFromGd2PartCtx()
542 xlo = cx * cs; in gdImageCreateFromGd2PartCtx()
543 xhi = xlo + cs; in gdImageCreateFromGd2PartCtx()
553 dpos = (cy * (cs * fsx) * 4 + cx * cs * (yhi - ylo) * 4) + dstart; in gdImageCreateFromGd2PartCtx()
555 dpos = cy * (cs * fsx) + cx * cs * (yhi - ylo) + dstart; in gdImageCreateFromGd2PartCtx()
643 static void _gd2PutHeader (gdImagePtr im, gdIOCtx * out, int cs, int fmt, int cx, int cy) in _gd2PutHeader() argument
657 gdPutWord(cs, out); in _gd2PutHeader()
663 static void _gdImageGd2 (gdImagePtr im, gdIOCtx * out, int cs, int fmt) in _gdImageGd2() argument
691 if (cs == 0) { in _gdImageGd2()
692 cs = GD2_CHUNKSIZE; in _gdImageGd2()
693 } else if (cs < GD2_CHUNKSIZE_MIN) { in _gdImageGd2()
694 cs = GD2_CHUNKSIZE_MIN; in _gdImageGd2()
695 } else if (cs > GD2_CHUNKSIZE_MAX) { in _gdImageGd2()
696 cs = GD2_CHUNKSIZE_MAX; in _gdImageGd2()
700 ncx = (im->sx + cs - 1) / cs; in _gdImageGd2()
701 ncy = (im->sy + cs - 1) / cs; in _gdImageGd2()
704 _gd2PutHeader (im, out, cs, fmt, ncx, ncy); in _gdImageGd2()
714 compMax = (int)(cs * bytesPerPixel * cs * 1.02f) + 12; in _gdImageGd2()
717 chunkData = safe_emalloc(cs * bytesPerPixel, cs, 0); in _gdImageGd2()
718 memset(chunkData, 0, cs * bytesPerPixel * cs); in _gdImageGd2()
743 ylo = cy * cs; in _gdImageGd2()
744 yhi = ylo + cs; in _gdImageGd2()
753 xlo = cx * cs; in _gdImageGd2()
754 xhi = xlo + cs; in _gdImageGd2()
831 void gdImageGd2 (gdImagePtr im, FILE * outFile, int cs, int fmt) in gdImageGd2() argument
835 _gdImageGd2(im, out, cs, fmt); in gdImageGd2()
840 void *gdImageGd2Ptr (gdImagePtr im, int cs, int fmt, int *size) in gdImageGd2Ptr() argument
845 _gdImageGd2(im, out, cs, fmt); in gdImageGd2Ptr()