[][src]Enum opencv::imgcodecs::ImwritePNGFlags

#[repr(C)]pub enum ImwritePNGFlags {
    IMWRITE_PNG_STRATEGY_DEFAULT,
    IMWRITE_PNG_STRATEGY_FILTERED,
    IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY,
    IMWRITE_PNG_STRATEGY_RLE,
    IMWRITE_PNG_STRATEGY_FIXED,
}

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_STRATEGY_FILTERED is to force more Huffman coding and less string matching; it is somewhat intermediate between IMWRITE_PNG_STRATEGY_DEFAULT and IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY.
  • IMWRITE_PNG_STRATEGY_RLE is designed to be almost as fast as IMWRITE_PNG_STRATEGY_HUFFMAN_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_STRATEGY_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.

Variants

IMWRITE_PNG_STRATEGY_DEFAULT

Use this value for normal data.

IMWRITE_PNG_STRATEGY_FILTERED

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.

IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY

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

IMWRITE_PNG_STRATEGY_RLE

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

IMWRITE_PNG_STRATEGY_FIXED

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

Trait Implementations

impl Clone for ImwritePNGFlags[src]

impl Copy for ImwritePNGFlags[src]

impl Debug for ImwritePNGFlags[src]

impl PartialEq<ImwritePNGFlags> for ImwritePNGFlags[src]

impl StructuralPartialEq for ImwritePNGFlags[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.