Lines Matching refs:cs

55 static int _gd2GetHeader(gdIOCtxPtr in, int *sx, int *sy, int *cs, int *vers, int *fmt, int *ncx, i…  in _gd2GetHeader()  argument
106 if (gdGetWord(cs, in) != 1) { in _gd2GetHeader()
109 GD2_DBG(gd_error("ChunkSize: %d", *cs)); in _gd2GetHeader()
111 if ((*cs < GD2_CHUNKSIZE_MIN) || (*cs > GD2_CHUNKSIZE_MAX)) { in _gd2GetHeader()
112 GD2_DBG(gd_error("Bad chunk size: %d", *cs)); in _gd2GetHeader()
183 static gdImagePtr _gd2CreateFromFile (gdIOCtxPtr in, int *sx, int *sy, int *cs, int *vers, int *fmt… in _gd2CreateFromFile() argument
187 if (_gd2GetHeader (in, sx, sy, cs, vers, fmt, ncx, ncy, cidx) != 1) { in _gd2CreateFromFile()
271 int ncx, ncy, nc, cs, cx, cy; in gdImageCreateFromGd2Ctx() local
287 if (!(im = _gd2CreateFromFile(in, &sx, &sy, &cs, &vers, &fmt, &ncx, &ncy, &chunkIdx))) { in gdImageCreateFromGd2Ctx()
305 chunkMax = cs * bytesPerPixel * cs; in gdImageCreateFromGd2Ctx()
318 ylo = cy * cs; in gdImageCreateFromGd2Ctx()
319 yhi = ylo + cs; in gdImageCreateFromGd2Ctx()
338 xlo = cx * cs; in gdImageCreateFromGd2Ctx()
339 xhi = xlo + cs; in gdImageCreateFromGd2Ctx()
437 int nc, ncx, ncy, cs, cx, cy; in gdImageCreateFromGd2PartCtx() local
463 if (_gd2GetHeader(in, &fsx, &fsy, &cs, &vers, &fmt, &ncx, &ncy, &chunkIdx) != 1) { in gdImageCreateFromGd2PartCtx()
498 chunkMax = cs * cs * 4; in gdImageCreateFromGd2PartCtx()
500 chunkMax = cs * cs; in gdImageCreateFromGd2PartCtx()
511 scx = srcx / cs; in gdImageCreateFromGd2PartCtx()
512 scy = srcy / cs; in gdImageCreateFromGd2PartCtx()
520 ecx = (srcx + w) / cs; in gdImageCreateFromGd2PartCtx()
521 ecy = (srcy + h) / cs; in gdImageCreateFromGd2PartCtx()
535 ylo = cy * cs; in gdImageCreateFromGd2PartCtx()
536 yhi = ylo + cs; in gdImageCreateFromGd2PartCtx()
543 xlo = cx * cs; in gdImageCreateFromGd2PartCtx()
544 xhi = xlo + cs; in gdImageCreateFromGd2PartCtx()
554 dpos = (cy * (cs * fsx) * 4 + cx * cs * (yhi - ylo) * 4) + dstart; in gdImageCreateFromGd2PartCtx()
556 dpos = cy * (cs * fsx) + cx * cs * (yhi - ylo) + dstart; in gdImageCreateFromGd2PartCtx()
644 static void _gd2PutHeader (gdImagePtr im, gdIOCtx * out, int cs, int fmt, int cx, int cy) in _gd2PutHeader() argument
658 gdPutWord(cs, out); in _gd2PutHeader()
664 static void _gdImageGd2 (gdImagePtr im, gdIOCtx * out, int cs, int fmt) in _gdImageGd2() argument
692 if (cs == 0) { in _gdImageGd2()
693 cs = GD2_CHUNKSIZE; in _gdImageGd2()
694 } else if (cs < GD2_CHUNKSIZE_MIN) { in _gdImageGd2()
695 cs = GD2_CHUNKSIZE_MIN; in _gdImageGd2()
696 } else if (cs > GD2_CHUNKSIZE_MAX) { in _gdImageGd2()
697 cs = GD2_CHUNKSIZE_MAX; in _gdImageGd2()
701 ncx = (im->sx + cs - 1) / cs; in _gdImageGd2()
702 ncy = (im->sy + cs - 1) / cs; in _gdImageGd2()
705 _gd2PutHeader (im, out, cs, fmt, ncx, ncy); in _gdImageGd2()
715 compMax = (int)(cs * bytesPerPixel * cs * 1.02f) + 12; in _gdImageGd2()
718 chunkData = safe_emalloc(cs * bytesPerPixel, cs, 0); in _gdImageGd2()
719 memset(chunkData, 0, cs * bytesPerPixel * cs); in _gdImageGd2()
744 ylo = cy * cs; in _gdImageGd2()
745 yhi = ylo + cs; in _gdImageGd2()
754 xlo = cx * cs; in _gdImageGd2()
755 xhi = xlo + cs; in _gdImageGd2()
832 void gdImageGd2 (gdImagePtr im, FILE * outFile, int cs, int fmt) in gdImageGd2() argument
836 _gdImageGd2(im, out, cs, fmt); in gdImageGd2()
841 void *gdImageGd2Ptr (gdImagePtr im, int cs, int fmt, int *size) in gdImageGd2Ptr() argument
846 _gdImageGd2(im, out, cs, fmt); in gdImageGd2Ptr()