Enum ImwritePNGFlags
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Imwrite PNG specific flags used to tune the compression algorithm.
These flags will be modify the way of PNG image compression and will be passed to the underlying zlib processing stage. The effect of IMWRITE_PNG_StrategyFILTERED is to force more Huffman coding and less string matching; it is somewhat intermediate between IMWRITE_PNG_StrategyDEFAULT and IMWRITE_PNG_StrategyHUFFMAN_ONLY. IMWRITE_PNG_StrategyRLE is designed to be almost as fast as IMWRITE_PNG_StrategyHUFFMAN_ONLY, but give better compression for PNG image data. The strategy parameter only affects the compression ratio but not the correctness of the compressed output even if it is not set appropriately. IMWRITE_PNG_StrategyFIXED prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.
public enum ImwritePNGFlags
Fields
StrategyDefault = 0Use this value for normal data.
StrategyFiltered = 1Use this value for data produced by a filter (or predictor).Filtered data consists mostly of small values with a somewhat random distribution. In this case, the compression algorithm is tuned to compress them better.
StrategyFixed = 4Using this value prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.
StrategyHuffmanOnly = 2Use this value to force Huffman encoding only (no string match).
StrategyRLE = 3Use this value to limit match distances to one (run-length encoding).