#[repr(C)]
pub enum ImwriteFlags {
Show 19 variants IMWRITE_JPEG_QUALITY, IMWRITE_JPEG_PROGRESSIVE, IMWRITE_JPEG_OPTIMIZE, IMWRITE_JPEG_RST_INTERVAL, IMWRITE_JPEG_LUMA_QUALITY, IMWRITE_JPEG_CHROMA_QUALITY, IMWRITE_PNG_COMPRESSION, IMWRITE_PNG_STRATEGY, IMWRITE_PNG_BILEVEL, IMWRITE_PXM_BINARY, IMWRITE_EXR_TYPE, IMWRITE_EXR_COMPRESSION, IMWRITE_WEBP_QUALITY, IMWRITE_PAM_TUPLETYPE, IMWRITE_TIFF_RESUNIT, IMWRITE_TIFF_XDPI, IMWRITE_TIFF_YDPI, IMWRITE_TIFF_COMPRESSION, IMWRITE_JPEG2000_COMPRESSION_X1000,
}
Expand description

Imwrite flags

Variants

IMWRITE_JPEG_QUALITY

For JPEG, it can be a quality from 0 to 100 (the higher is the better). Default value is 95.

IMWRITE_JPEG_PROGRESSIVE

Enable JPEG features, 0 or 1, default is False.

IMWRITE_JPEG_OPTIMIZE

Enable JPEG features, 0 or 1, default is False.

IMWRITE_JPEG_RST_INTERVAL

JPEG restart interval, 0 - 65535, default is 0 - no restart.

IMWRITE_JPEG_LUMA_QUALITY

Separate luma quality level, 0 - 100, default is -1 - don’t use.

IMWRITE_JPEG_CHROMA_QUALITY

Separate chroma quality level, 0 - 100, default is -1 - don’t use.

IMWRITE_PNG_COMPRESSION

For PNG, it can be the compression level from 0 to 9. A higher value means a smaller size and longer compression time. If specified, strategy is changed to IMWRITE_PNG_STRATEGY_DEFAULT (Z_DEFAULT_STRATEGY). Default value is 1 (best speed setting).

IMWRITE_PNG_STRATEGY

One of cv::ImwritePNGFlags, default is IMWRITE_PNG_STRATEGY_RLE.

IMWRITE_PNG_BILEVEL

Binary level PNG, 0 or 1, default is 0.

IMWRITE_PXM_BINARY

For PPM, PGM, or PBM, it can be a binary format flag, 0 or 1. Default value is 1.

IMWRITE_EXR_TYPE

override EXR storage type (FLOAT (FP32) is default)

IMWRITE_EXR_COMPRESSION

override EXR compression type (ZIP_COMPRESSION = 3 is default)

IMWRITE_WEBP_QUALITY

For WEBP, it can be a quality from 1 to 100 (the higher is the better). By default (without any parameter) and for quality above 100 the lossless compression is used.

IMWRITE_PAM_TUPLETYPE

For PAM, sets the TUPLETYPE field to the corresponding string value that is defined for the format

IMWRITE_TIFF_RESUNIT

For TIFF, use to specify which DPI resolution unit to set; see libtiff documentation for valid values

IMWRITE_TIFF_XDPI

For TIFF, use to specify the X direction DPI

IMWRITE_TIFF_YDPI

For TIFF, use to specify the Y direction DPI

IMWRITE_TIFF_COMPRESSION

For TIFF, use to specify the image compression scheme. See libtiff for integer constants corresponding to compression formats. Note, for images whose depth is CV_32F, only libtiff’s SGILOG compression scheme is used. For other supported depths, the compression scheme can be specified by this flag; LZW compression is the default.

IMWRITE_JPEG2000_COMPRESSION_X1000

For JPEG2000, use to specify the target compression rate (multiplied by 1000). The value can be from 0 to 1000. Default is 1000.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.