Show / Hide Table of Contents

Enum ImwritePNGFlags

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.

Namespace: OpenCvSharp
Assembly: OpenCvSharp.dll
Syntax
public enum ImwritePNGFlags

Fields

Name Description
StrategyDefault

Use this value for normal data.

StrategyFiltered

Use 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

Using this value prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.

StrategyHuffmanOnly

Use this value to force Huffman encoding only (no string match).

StrategyRLE

Use this value to limit match distances to one (run-length encoding).

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX