improved png compression ratio (ticket #1452)

pull/13383/head
Vadim Pisarevsky 13 years ago
parent 3f22a1c40f
commit 17c3102705
  1. 2
      modules/highgui/src/grfmt_png.cpp

@ -366,7 +366,7 @@ bool PngEncoder::write( const Mat& img, const vector<int>& params )
png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, PNG_FILTER_SUB); png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, PNG_FILTER_SUB);
png_set_compression_level(png_ptr, Z_BEST_SPEED); png_set_compression_level(png_ptr, Z_BEST_SPEED);
} }
png_set_compression_strategy(png_ptr, Z_HUFFMAN_ONLY); png_set_compression_strategy(png_ptr, Z_FILTERED);
png_set_IHDR( png_ptr, info_ptr, width, height, depth == CV_8U ? 8 : 16, png_set_IHDR( png_ptr, info_ptr, width, height, depth == CV_8U ? 8 : 16,
channels == 1 ? PNG_COLOR_TYPE_GRAY : channels == 1 ? PNG_COLOR_TYPE_GRAY :

Loading…
Cancel
Save