• Home
  • Raw
  • Download

Lines Matching refs:bitdepth

2516 static unsigned lodepng_get_bpp_lct(LodePNGColorType colortype, unsigned bitdepth)  in lodepng_get_bpp_lct()  argument
2519 return getNumColorChannels(colortype) * bitdepth; in lodepng_get_bpp_lct()
2529 info->bitdepth = 8; in lodepng_color_mode_init()
2557 if(a->bitdepth != b->bitdepth) return 0; in lodepng_color_mode_equal()
2604 return lodepng_get_bpp_lct(info->colortype, info->bitdepth); in lodepng_get_bpp()
2649 …e_t lodepng_get_raw_size_lct(unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth) in lodepng_get_raw_size_lct() argument
2651 return (w * h * lodepng_get_bpp_lct(colortype, bitdepth) + 7) / 8; in lodepng_get_raw_size_lct()
2989 if(mode->bitdepth == 8) out[i] = grey; in rgba8ToPixel()
2990 else if(mode->bitdepth == 16) out[i * 2 + 0] = out[i * 2 + 1] = grey; in rgba8ToPixel()
2994 grey = (grey >> (8 - mode->bitdepth)) & ((1 << mode->bitdepth) - 1); in rgba8ToPixel()
2995 addColorBits(out, i, mode->bitdepth, grey); in rgba8ToPixel()
3000 if(mode->bitdepth == 8) in rgba8ToPixel()
3017 if(mode->bitdepth == 8) out[i] = index; in rgba8ToPixel()
3018 else addColorBits(out, i, mode->bitdepth, index); in rgba8ToPixel()
3023 if(mode->bitdepth == 8) in rgba8ToPixel()
3028 else if(mode->bitdepth == 16) in rgba8ToPixel()
3036 if(mode->bitdepth == 8) in rgba8ToPixel()
3060 if(mode->bitdepth != 16) return 85; /*must be 16 for this function*/ in rgba16ToPixel()
3108 if(mode->bitdepth == 8) in getPixelColorRGBA8()
3114 else if(mode->bitdepth == 16) in getPixelColorRGBA8()
3122 … unsigned highest = ((1U << mode->bitdepth) - 1U); /*highest possible value for this bit depth*/ in getPixelColorRGBA8()
3123 size_t j = i * mode->bitdepth; in getPixelColorRGBA8()
3124 unsigned value = readBitsFromReversedStream(&j, in, mode->bitdepth); in getPixelColorRGBA8()
3132 if(mode->bitdepth == 8) in getPixelColorRGBA8()
3152 if(mode->bitdepth == 8) index = in[i]; in getPixelColorRGBA8()
3155 size_t j = i * mode->bitdepth; in getPixelColorRGBA8()
3156 index = readBitsFromReversedStream(&j, in, mode->bitdepth); in getPixelColorRGBA8()
3162 if(!fix_png) return (mode->bitdepth == 8 ? 46 : 47); /*index out of palette*/ in getPixelColorRGBA8()
3176 if(mode->bitdepth == 8) in getPixelColorRGBA8()
3189 if(mode->bitdepth == 8) in getPixelColorRGBA8()
3222 if(mode->bitdepth == 8) in getPixelColorsRGBA8()
3230 else if(mode->bitdepth == 16) in getPixelColorsRGBA8()
3240 … unsigned highest = ((1U << mode->bitdepth) - 1U); /*highest possible value for this bit depth*/ in getPixelColorsRGBA8()
3244 unsigned value = readBitsFromReversedStream(&j, in, mode->bitdepth); in getPixelColorsRGBA8()
3252 if(mode->bitdepth == 8) in getPixelColorsRGBA8()
3283 if(mode->bitdepth == 8) index = in[i]; in getPixelColorsRGBA8()
3284 else index = readBitsFromReversedStream(&j, in, mode->bitdepth); in getPixelColorsRGBA8()
3289 if(!fix_png) return (mode->bitdepth == 8 ? 46 : 47); /*index out of palette*/ in getPixelColorsRGBA8()
3304 if(mode->bitdepth == 8) in getPixelColorsRGBA8()
3323 if(mode->bitdepth == 8) in getPixelColorsRGBA8()
3353 if(mode->bitdepth != 16) return 85; /*error: this function only supports 16-bit input*/ in getPixelColorRGBA16()
3411 size_t palsize = 1 << mode_out->bitdepth; in lodepng_convert()
3421 if(mode_in->bitdepth == 16 && mode_out->bitdepth == 16) in lodepng_convert()
3432 else if(mode_out->bitdepth == 8 && mode_out->colortype == LCT_RGBA) in lodepng_convert()
3436 else if(mode_out->bitdepth == 8 && mode_out->colortype == LCT_RGB) in lodepng_convert()
3492 profile->sixteenbit_done = mode->bitdepth == 16 ? 0 : 1; in color_profile_init()
3562 if(mode->bitdepth == 16) in get_color_profile()
3735 if(mode->bitdepth < 16) in get_color_profile()
3746 …olorKeyFrom16bit(LodePNGColorMode* mode_out, unsigned r, unsigned g, unsigned b, unsigned bitdepth) in setColorKeyFrom16bit() argument
3748 unsigned mask = (1 << bitdepth) - 1; in setColorKeyFrom16bit()
3786 …y) setColorKeyFrom16bit(mode_out, profile.key_r, profile.key_g, profile.key_b, mode_out->bitdepth); in lodepng_auto_choose_color()
3795 mode_out->bitdepth = 16; in lodepng_auto_choose_color()
3803 …y) setColorKeyFrom16bit(mode_out, profile.key_r, profile.key_g, profile.key_b, mode_out->bitdepth); in lodepng_auto_choose_color()
3819 mode_out->bitdepth = profile.greybits; in lodepng_auto_choose_color()
3820 if(profile.key) setColorKeyFrom16bit(mode_out, grey, grey, grey, mode_out->bitdepth); in lodepng_auto_choose_color()
3836 mode_out->bitdepth = palettebits; in lodepng_auto_choose_color()
3841 mode_out->bitdepth = 8; in lodepng_auto_choose_color()
3849 …y) setColorKeyFrom16bit(mode_out, profile.key_r, profile.key_g, profile.key_b, mode_out->bitdepth); in lodepng_auto_choose_color()
3867 if(no_nibbles && mode_out->bitdepth < 8) in lodepng_auto_choose_color()
3870 mode_out->bitdepth = 8; in lodepng_auto_choose_color()
3981 info->color.bitdepth = in[24]; in lodepng_inspect()
4004 state->error = checkColorValidity(info->color.colortype, info->color.bitdepth); in lodepng_inspect()
4764 && !(state->info_raw.bitdepth == 8)) in lodepng_decode()
4782 size_t insize, LodePNGColorType colortype, unsigned bitdepth) in lodepng_decode_memory() argument
4788 state.info_raw.bitdepth = bitdepth; in lodepng_decode_memory()
4806 LodePNGColorType colortype, unsigned bitdepth) in lodepng_decode_file() argument
4812 if(!error) error = lodepng_decode_memory(out, w, h, buffer, buffersize, colortype, bitdepth); in lodepng_decode_file()
4903 … LodePNGColorType colortype, unsigned bitdepth, unsigned interlace_method) in addChunk_IHDR() argument
4911 ucvector_push_back(&header, (unsigned char)bitdepth); /*bit depth*/ in addChunk_IHDR()
5264 (info->colortype == LCT_PALETTE || info->bitdepth < 8)) strategy = LFS_ZERO; in filter()
5701 state->error = checkColorValidity(info.color.colortype, info.color.bitdepth); in lodepng_encode()
5703 state->error = checkColorValidity(state->info_raw.colortype, state->info_raw.bitdepth); in lodepng_encode()
5731 addChunk_IHDR(&outv, w, h, info.color.colortype, info.color.bitdepth, info.interlace_method); in lodepng_encode()
5856 … unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth) in lodepng_encode_memory() argument
5862 state.info_raw.bitdepth = bitdepth; in lodepng_encode_memory()
5864 state.info_png.color.bitdepth = bitdepth; in lodepng_encode_memory()
5883 LodePNGColorType colortype, unsigned bitdepth) in lodepng_encode_file() argument
5887 unsigned error = lodepng_encode_memory(&buffer, &buffersize, image, w, h, colortype, bitdepth); in lodepng_encode_file()
6137 size_t insize, LodePNGColorType colortype, unsigned bitdepth) in decode() argument
6140 unsigned error = lodepng_decode_memory(&buffer, &w, &h, in, insize, colortype, bitdepth); in decode()
6145 state.info_raw.bitdepth = bitdepth; in decode()
6154 const std::vector<unsigned char>& in, LodePNGColorType colortype, unsigned bitdepth) in decode() argument
6156 return decode(out, w, h, in.empty() ? 0 : &in[0], (unsigned)in.size(), colortype, bitdepth); in decode()
6183 LodePNGColorType colortype, unsigned bitdepth) in decode() argument
6187 return decode(out, w, h, buffer, colortype, bitdepth); in decode()
6194 LodePNGColorType colortype, unsigned bitdepth) in encode() argument
6198 unsigned error = lodepng_encode_memory(&buffer, &buffersize, in, w, h, colortype, bitdepth); in encode()
6209 LodePNGColorType colortype, unsigned bitdepth) in encode() argument
6211 if(lodepng_get_raw_size_lct(w, h, colortype, bitdepth) > in.size()) return 84; in encode()
6212 return encode(out, in.empty() ? 0 : &in[0], w, h, colortype, bitdepth); in encode()
6241 LodePNGColorType colortype, unsigned bitdepth) in encode() argument
6244 unsigned error = encode(buffer, in, w, h, colortype, bitdepth); in encode()
6251 LodePNGColorType colortype, unsigned bitdepth) in encode() argument
6253 if(lodepng_get_raw_size_lct(w, h, colortype, bitdepth) > in.size()) return 84; in encode()
6254 return encode(filename, in.empty() ? 0 : &in[0], w, h, colortype, bitdepth); in encode()