Lines Matching defs:width

141 //    // ... x = width, y = height, n = # 8-bit components per pixel ...
147 // int *x -- outputs image width in pixels
183 // To query the width, height and component count of an image without having to
360 // than that size (in either width or height) without further processing.
3269 s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width","Corrupt JPEG"); // JPEG requires
3325 // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't
4661 int width = x;
4685 if (img_width_bytes > x) return stbi__err("invalid width","Corrupt PNG");
4688 width = img_width_bytes;
4730 int nk = (width - 1)*filter_bytes;
4782 // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop
5535 int psize=0,i,j,width;
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;
5613 pad = (-width)&3;
5658 if (info.bpp == 24) width = 3 * s->img_x;
5659 else if (info.bpp == 16) width = 2*s->img_x;
5660 else /* bpp = 32 and pad = 0 */ width=0;
5661 pad = (-width) & 3;
5789 return 0; // test width
5837 if ( stbi__get16le(s) < 1 ) goto errorEnd; // test width
6389 static stbi_uc *stbi__pic_load_core(stbi__context *s,int width,int height,int *comp, stbi_uc *result)
6422 stbi_uc *dest = result+y*width*4;
6431 for(x=0;x<width;++x, dest+=4)
6439 int left=width, i;
6460 int left=width;
6864 // if the width of the specified rectangle is 0, that means
7168 int width, height;
7191 // Parse width and height
7200 width = (int) strtol(token, NULL, 10);
7203 if (width > STBI_MAX_DIMENSIONS) return stbi__errpf("too large","Very large image (corrupt?)");
7205 *x = width;
7211 if (!stbi__mad4sizes_valid(width, height, req_comp, sizeof(float), 0))
7215 hdr_data = (float *) stbi__malloc_mad4(width, height, req_comp, sizeof(float), 0);
7221 if ( width < 8 || width >= 32768) {
7224 for (i=0; i < width; ++i) {
7228 stbi__hdr_convert(hdr_data + j * width * req_comp + i * req_comp, rgbe, req_comp);
7255 if (len != width) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("invalid decoded scanline length", "corrupt HDR"); }
7257 scanline = (stbi_uc *) stbi__malloc_mad2(width, 4, 0);
7267 while ((nleft = width - i) > 0) {
7284 for (i=0; i < width; ++i)
7285 stbi__hdr_convert(hdr_data+(j*width + i)*req_comp, scanline + i*4, req_comp);
7610 *x = stbi__pnm_getinteger(s, &c); // read width
7612 return stbi__err("invalid width", "PPM image header had zero or overflowing width");
7617 return stbi__err("invalid width", "PPM image header had zero or overflowing width");