Lines Matching defs:img_x

822    uint32 img_x, img_y;
1686 s->img_x = get16(s); if (s->img_x == 0) return e("0 width","Corrupt JPEG"); // JPEG requires
1710 if ((1 << 30) / s->img_x / s->img_n < s->img_y) return e("too large", "Image too large to decode");
1722 z->img_mcu_x = (s->img_x + z->img_mcu_w-1) / z->img_mcu_w;
1727 z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max-1) / h_max;
1998 z->img_comp[k].linebuf = MALLOC(z->s.img_x + 3);
2004 r->w_lores = (z->s.img_x + r->hs-1) / r->hs;
2016 output = MALLOC(n * z->s.img_x * z->s.img_y + 1);
2021 uint8 *out = output + n * z->s.img_x * j;
2040 stbi_YCbCr_installed(out, y, coutput[1], coutput[2], z->s.img_x, n);
2042 YCbCr_to_RGB_row(out, y, coutput[1], coutput[2], z->s.img_x, n);
2045 for (i=0; i < z->s.img_x; ++i) {
2053 for (i=0; i < z->s.img_x; ++i) out[i] = y[i];
2055 for (i=0; i < z->s.img_x; ++i) *out++ = y[i], *out++ = 255;
2059 *out_x = z->s.img_x;
2105 if (x) *x = j->s.img_x;
2719 if (s->img_x == x && s->img_y == y) {
2805 return create_png_image_raw(a, raw, raw_len, out_n, a->s.img_x, a->s.img_y);
2810 final = MALLOC(a->s.img_x * a->s.img_y * out_n);
2818 x = (a->s.img_x - xorig[p] + xspc[p]-1) / xspc[p];
2827 memcpy(final + (j*yspc[p]+yorig[p])*a->s.img_x*out_n + (i*xspc[p]+xorig[p])*out_n,
2843 uint32 i, pixel_count = s->img_x * s->img_y;
2867 uint32 i, pixel_count = a->s.img_x * a->s.img_y;
2917 uint32 i, pixel_count = s->img_x * s->img_y;
2980 s->img_x = get32(s); if (s->img_x > (1 << 24)) return e("too large","Very large image (corrupt?)");
2988 if (!s->img_x || !s->img_y) return e("0-pixel image","Corrupt PNG");
2991 if ((1 << 30) / s->img_x / s->img_n < s->img_y) return e("too large", "Image too large to decode");
2997 if ((1 << 30) / s->img_x / 4 < s->img_y) return e("too large","Corrupt PNG");
3116 result = convert_format(result, p->s.img_out_n, req_comp, p->s.img_x, p->s.img_y);
3120 *x = p->s.img_x;
3180 if (x) *x = p->s.img_x;
3306 s->img_x = get16le(s);
3309 s->img_x = get32le(s);
3378 out = MALLOC(target * s->img_x * s->img_y);
3391 if (bpp == 4) width = (s->img_x + 1) >> 1;
3392 else if (bpp == 8) width = s->img_x;
3396 for (i=0; i < (int) s->img_x; i += 2) {
3406 if (i+1 == (int) s->img_x) break;
3420 if (bpp == 24) width = 3 * s->img_x;
3421 else if (bpp == 16) width = 2*s->img_x;
3443 for (i=0; i < (int) s->img_x; ++i) {
3453 for (i=0; i < (int) s->img_x; ++i) {
3469 stbi_uc *p1 = out + j *s->img_x*target;
3470 stbi_uc *p2 = out + (s->img_y-1-j)*s->img_x*target;
3471 for (i=0; i < (int) s->img_x*target; ++i) {
3478 out = convert_format(out, target, req_comp, s->img_x, s->img_y);
3482 *x = s->img_x;