Lines Matching refs:img_x
805 stbi__uint32 img_x, img_y;
3269 s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width","Corrupt JPEG"); // JPEG requires
3271 if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)");
3296 if (!stbi__mad3sizes_valid(s->img_x, s->img_y, s->img_n, 0)) return stbi__err("too large", "Image too large to decode");
3316 z->img_mcu_x = (s->img_x + z->img_mcu_w-1) / z->img_mcu_w;
3321 z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max-1) / h_max;
3902 z->img_comp[k].linebuf = (stbi_uc *) stbi__malloc(z->s->img_x + 3);
3908 r->w_lores = (z->s->img_x + r->hs-1) / r->hs;
3920 output = (stbi_uc *) stbi__malloc_mad3(n, z->s->img_x, z->s->img_y, 1);
3925 stbi_uc *out = output + n * z->s->img_x * j;
3944 for (i=0; i < z->s->img_x; ++i) {
3952 z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n);
3956 for (i=0; i < z->s->img_x; ++i) {
3965 z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n);
3966 for (i=0; i < z->s->img_x; ++i) {
3974 z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n);
3977 for (i=0; i < z->s->img_x; ++i) {
3985 for (i=0; i < z->s->img_x; ++i)
3988 for (i=0; i < z->s->img_x; ++i, out += 2) {
3994 for (i=0; i < z->s->img_x; ++i) {
4004 for (i=0; i < z->s->img_x; ++i) {
4012 for (i=0; i < z->s->img_x; ++i) out[i] = y[i];
4014 for (i=0; i < z->s->img_x; ++i) { *out++ = y[i]; *out++ = 255; }
4019 *out_x = z->s->img_x;
4060 if (x) *x = j->s->img_x;
4869 return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color);
4872 final = (stbi_uc *) stbi__malloc_mad3(a->s->img_x, a->s->img_y, out_bytes, 0);
4881 x = (a->s->img_x - xorig[p] + xspc[p]-1) / xspc[p];
4893 memcpy(final + out_y*a->s->img_x*out_bytes + out_x*out_bytes,
4910 stbi__uint32 i, pixel_count = s->img_x * s->img_y;
4935 stbi__uint32 i, pixel_count = s->img_x * s->img_y;
4959 stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y;
5037 stbi__uint32 i, pixel_count = s->img_x * s->img_y;
5108 s->img_x = stbi__get32be(s);
5111 if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)");
5119 if (!s->img_x || !s->img_y) return stbi__err("0-pixel image","Corrupt PNG");
5122 if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode");
5127 if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large","Corrupt PNG");
5204 bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component
5277 result = stbi__convert_format((unsigned char *) result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y);
5279 result = stbi__convert_format16((stbi__uint16 *) result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y);
5283 *x = p->s->img_x;
5315 if (x) *x = p->s->img_x;
5463 s->img_x = stbi__get16le(s);
5466 s->img_x = stbi__get32le(s);
5548 if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)");
5593 if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0))
5596 out = (stbi_uc *) stbi__malloc_mad3(target, s->img_x, s->img_y, 0);
5609 if (info.bpp == 1) width = (s->img_x + 7) >> 3;
5610 else if (info.bpp == 4) width = (s->img_x + 1) >> 1;
5611 else if (info.bpp == 8) width = s->img_x;
5617 for (i=0; i < (int) s->img_x; ++i) {
5623 if (i+1 == (int) s->img_x) break;
5633 for (i=0; i < (int) s->img_x; i += 2) {
5643 if (i+1 == (int) s->img_x) break;
5658 if (info.bpp == 24) width = 3 * s->img_x;
5659 else if (info.bpp == 16) width = 2*s->img_x;
5679 for (i=0; i < (int) s->img_x; ++i) {
5691 for (i=0; i < (int) s->img_x; ++i) {
5708 for (i=4*s->img_x*s->img_y-1; i >= 0; i -= 4)
5714 stbi_uc *p1 = out + j *s->img_x*target;
5715 stbi_uc *p2 = out + (s->img_y-1-j)*s->img_x*target;
5716 for (i=0; i < (int) s->img_x*target; ++i) {
5723 out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y);
5727 *x = s->img_x;
7351 if (x) *x = s->img_x;
7516 ri->bits_per_channel = stbi__pnm_info(s, (int *)&s->img_x, (int *)&s->img_y, (int *)&s->img_n);
7521 if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)");
7523 *x = s->img_x;
7527 if (!stbi__mad4sizes_valid(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0))
7530 out = (stbi_uc *) stbi__malloc_mad4(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0);
7532 if (!stbi__getn(s, out, s->img_n * s->img_x * s->img_y * (ri->bits_per_channel / 8))) {
7539 out = (stbi_uc *) stbi__convert_format16((stbi__uint16 *) out, s->img_n, req_comp, s->img_x, s->img_y);
7541 out = stbi__convert_format(out, s->img_n, req_comp, s->img_x, s->img_y);