Home | History | Annotate | Download | only in zopflipng

Lines Matching defs:color

82 // Returns 32-bit integer value for RGBA color.
83 static unsigned ColorIndex(const unsigned char* color) {
84 return color[0] + 256u * color[1] + 65536u * color[1] + 16777216u * color[3];
88 // is enabled, any color with alpha channel 0 is treated as a single color with
105 // First check if we want to preserve potential color-key background color,
114 std::set<unsigned> count; // Color count, up to 257.
117 // the transparent color.
120 // Choose the color key or first initial background color.
126 // used as a valid color key, or in case of palette ensures a color
153 if (palette && inputstate->info_png.color.palettesize > 0) {
155 if (count.size() < inputstate->info_png.color.palettesize) {
157 unsigned char* palette_in = inputstate->info_png.color.palette;
158 for (size_t i = 0; i < inputstate->info_png.color.palettesize; i++) {
166 inputstate->info_png.color.palettesize = palette_out.size() / 4;
192 if (inputstate.info_png.color.colortype == LCT_PALETTE) {
194 lodepng_color_mode_copy(&state.info_raw, &inputstate.info_png.color);
247 LodePNGColorMode& color = teststate.info_png.color;
248 if (color.colortype == LCT_PALETTE) {
252 for (size_t i = 0; i < color.palettesize; i++) {
253 if (color.palette[i * 4 + 0] != color.palette[i * 4 + 2]
254 || color.palette[i * 4 + 1] != color.palette[i * 4 + 2]) {
259 if (grey) state.info_png.color.colortype = LCT_GREY_ALPHA;
375 if (inputstate.info_png.color.bitdepth == 16 && !png_options.lossy_8bit) {