• Home
  • Raw
  • Download

Lines Matching refs:image

91                  const unsigned char* image, unsigned w, unsigned h,  in CountColors()  argument
95 unsigned index = ColorIndex(&image[i * 4]); in CountColors()
96 if (transparent_counts_as_one && image[i * 4 + 3] == 0) index = 0; in CountColors()
103 void LossyOptimizeTransparent(lodepng::State* inputstate, unsigned char* image, in LossyOptimizeTransparent() argument
109 if (image[i * 4 + 3] > 0 && image[i * 4 + 3] < 255) { in LossyOptimizeTransparent()
115 CountColors(&count, image, w, h, true); in LossyOptimizeTransparent()
124 if (image[i * 4 + 3] == 0) { in LossyOptimizeTransparent()
128 r = image[i * 4 + 0]; in LossyOptimizeTransparent()
129 g = image[i * 4 + 1]; in LossyOptimizeTransparent()
130 b = image[i * 4 + 2]; in LossyOptimizeTransparent()
137 if (image[i * 4 + 3] == 0) { in LossyOptimizeTransparent()
138 image[i * 4 + 0] = r; in LossyOptimizeTransparent()
139 image[i * 4 + 1] = g; in LossyOptimizeTransparent()
140 image[i * 4 + 2] = b; in LossyOptimizeTransparent()
145 r = image[i * 4 + 0]; in LossyOptimizeTransparent()
146 g = image[i * 4 + 1]; in LossyOptimizeTransparent()
147 b = image[i * 4 + 2]; in LossyOptimizeTransparent()
154 CountColors(&count, image, w, h, false); in LossyOptimizeTransparent()
177 const std::vector<unsigned char>& image, unsigned w, unsigned h, in TryOptimize() argument
239 error = lodepng::encode(*out, image, w, h, state); in TryOptimize()
261 error = lodepng::encode(out2, image, w, h, state); in TryOptimize()
277 unsigned AutoChooseFilterStrategy(const std::vector<unsigned char>& image, in AutoChooseFilterStrategy() argument
296 unsigned error = TryOptimize(image, w, h, inputstate, bit16, origfile, in AutoChooseFilterStrategy()
361 std::vector<unsigned char> image; in ZopfliPNGOptimize() local
365 error = lodepng::decode(image, w, h, inputstate, origpng); in ZopfliPNGOptimize()
377 image.clear(); in ZopfliPNGOptimize()
378 error = lodepng::decode(image, w, h, origpng, LCT_RGBA, 16); in ZopfliPNGOptimize()
385 LossyOptimizeTransparent(&inputstate, &image[0], w, h); in ZopfliPNGOptimize()
389 error = AutoChooseFilterStrategy(image, w, h, inputstate, bit16, in ZopfliPNGOptimize()
404 error = TryOptimize(image, w, h, inputstate, bit16, origpng, in ZopfliPNGOptimize()