Lines Matching defs:depth

4612    int depth;
4650 static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color)
4652 int bytes = (depth == 16? 2 : 1);
4667 if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG");
4668 img_width_bytes = (((img_n * x * depth) + 7) >> 3);
4684 if (depth < 8) {
4708 if (depth == 8) {
4714 } else if (depth == 16) {
4729 if (depth < 8 || img_n == out_n) {
4765 if (depth == 16) {
4777 if (depth < 8) {
4783 stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range
4791 if (depth == 4) {
4797 } else if (depth == 2) {
4807 } else if (depth == 1) {
4846 } else if (depth == 16) {
4862 static int stbi__create_png_image(stbi__png *a, stbi_uc *image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced)
4864 int bytes = (depth == 16 ? 2 : 1);
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);
4884 stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y;
4885 if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) {
5112 z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only","PNG not supported: 1/2/4/8/16-bit only");
5114 if (color == 3 && z->depth == 16) return stbi__err("bad ctype","Corrupt PNG");
5163 if (z->depth == 16) {
5166 for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger
5204 bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component
5213 if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0;
5215 if (z->depth == 16) {
5267 if (p->depth <= 8)
5269 else if (p->depth == 16)
5272 return stbi__errpuc("bad bits_per_channel", "PNG not supported: unsupported color depth");
5334 if (p.depth != 16) {
6158 // Make sure the depth is 8 bits.
6161 return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit");
7366 int channelCount, dummy, depth;
7386 depth = stbi__get16be(s);
7387 if (depth != 8 && depth != 16) {
7401 int channelCount, depth;
7418 depth = stbi__get16be(s);
7419 if (depth != 16) {