#[repr(C)]pub enum ImwriteFlags {
Show 37 variants
IMWRITE_JPEG_QUALITY = 1,
IMWRITE_JPEG_PROGRESSIVE = 2,
IMWRITE_JPEG_OPTIMIZE = 3,
IMWRITE_JPEG_RST_INTERVAL = 4,
IMWRITE_JPEG_LUMA_QUALITY = 5,
IMWRITE_JPEG_CHROMA_QUALITY = 6,
IMWRITE_JPEG_SAMPLING_FACTOR = 7,
IMWRITE_PNG_COMPRESSION = 16,
IMWRITE_PNG_STRATEGY = 17,
IMWRITE_PNG_BILEVEL = 18,
IMWRITE_PXM_BINARY = 32,
IMWRITE_EXR_TYPE = 48,
IMWRITE_EXR_COMPRESSION = 49,
IMWRITE_EXR_DWA_COMPRESSION_LEVEL = 50,
IMWRITE_WEBP_QUALITY = 64,
IMWRITE_HDR_COMPRESSION = 80,
IMWRITE_PAM_TUPLETYPE = 128,
IMWRITE_TIFF_RESUNIT = 256,
IMWRITE_TIFF_XDPI = 257,
IMWRITE_TIFF_YDPI = 258,
IMWRITE_TIFF_COMPRESSION = 259,
IMWRITE_TIFF_ROWSPERSTRIP = 278,
IMWRITE_TIFF_PREDICTOR = 317,
IMWRITE_JPEG2000_COMPRESSION_X1000 = 272,
IMWRITE_AVIF_QUALITY = 512,
IMWRITE_AVIF_DEPTH = 513,
IMWRITE_AVIF_SPEED = 514,
IMWRITE_JPEGXL_QUALITY = 640,
IMWRITE_JPEGXL_EFFORT = 641,
IMWRITE_JPEGXL_DISTANCE = 642,
IMWRITE_JPEGXL_DECODING_SPEED = 643,
IMWRITE_GIF_LOOP = 1_024,
IMWRITE_GIF_SPEED = 1_025,
IMWRITE_GIF_QUALITY = 1_026,
IMWRITE_GIF_DITHER = 1_027,
IMWRITE_GIF_TRANSPARENCY = 1_028,
IMWRITE_GIF_COLORTABLE = 1_029,
}
Expand description
Imwrite flags
Variants§
IMWRITE_JPEG_QUALITY = 1
For JPEG, it can be a quality from 0 to 100 (the higher is the better). Default value is 95.
IMWRITE_JPEG_PROGRESSIVE = 2
Enable JPEG features, 0 or 1, default is False.
IMWRITE_JPEG_OPTIMIZE = 3
Enable JPEG features, 0 or 1, default is False.
IMWRITE_JPEG_RST_INTERVAL = 4
JPEG restart interval, 0 - 65535, default is 0 - no restart.
IMWRITE_JPEG_LUMA_QUALITY = 5
Separate luma quality level, 0 - 100, default is -1 - don’t use. If JPEG_LIB_VERSION < 70, Not supported.
IMWRITE_JPEG_CHROMA_QUALITY = 6
Separate chroma quality level, 0 - 100, default is -1 - don’t use. If JPEG_LIB_VERSION < 70, Not supported.
IMWRITE_JPEG_SAMPLING_FACTOR = 7
For JPEG, set sampling factor. See cv::ImwriteJPEGSamplingFactorParams.
IMWRITE_PNG_COMPRESSION = 16
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 = 17
One of cv::ImwritePNGFlags, default is IMWRITE_PNG_STRATEGY_RLE.
IMWRITE_PNG_BILEVEL = 18
Binary level PNG, 0 or 1, default is 0.
IMWRITE_PXM_BINARY = 32
For PPM, PGM, or PBM, it can be a binary format flag, 0 or 1. Default value is 1.
IMWRITE_EXR_TYPE = 48
override EXR storage type (FLOAT (FP32) is default)
IMWRITE_EXR_COMPRESSION = 49
override EXR compression type (ZIP_COMPRESSION = 3 is default)
IMWRITE_EXR_DWA_COMPRESSION_LEVEL = 50
override EXR DWA compression level (45 is default)
IMWRITE_WEBP_QUALITY = 64
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_HDR_COMPRESSION = 80
specify HDR compression
IMWRITE_PAM_TUPLETYPE = 128
For PAM, sets the TUPLETYPE field to the corresponding string value that is defined for the format
IMWRITE_TIFF_RESUNIT = 256
For TIFF, use to specify which DPI resolution unit to set; see libtiff documentation for valid values
IMWRITE_TIFF_XDPI = 257
For TIFF, use to specify the X direction DPI
IMWRITE_TIFF_YDPI = 258
For TIFF, use to specify the Y direction DPI
IMWRITE_TIFF_COMPRESSION = 259
For TIFF, use to specify the image compression scheme. See cv::ImwriteTiffCompressionFlags. 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_TIFF_ROWSPERSTRIP = 278
For TIFF, use to specify the number of rows per strip.
IMWRITE_TIFF_PREDICTOR = 317
For TIFF, use to specify predictor. See cv::ImwriteTiffPredictorFlags.
IMWRITE_JPEG2000_COMPRESSION_X1000 = 272
For JPEG2000, use to specify the target compression rate (multiplied by 1000). The value can be from 0 to 1000. Default is 1000.
IMWRITE_AVIF_QUALITY = 512
For AVIF, it can be a quality between 0 and 100 (the higher the better). Default is 95.
IMWRITE_AVIF_DEPTH = 513
For AVIF, it can be 8, 10 or 12. If >8, it is stored/read as CV_32F. Default is 8.
IMWRITE_AVIF_SPEED = 514
For AVIF, it is between 0 (slowest) and (fastest). Default is 9.
IMWRITE_JPEGXL_QUALITY = 640
For JPEG XL, it can be a quality from 0 to 100 (the higher is the better). Default value is 95. If set, distance parameter is re-calicurated from quality level automatically. This parameter request libjxl v0.10 or later.
IMWRITE_JPEGXL_EFFORT = 641
For JPEG XL, encoder effort/speed level without affecting decoding speed; it is between 1 (fastest) and 10 (slowest). Default is 7.
IMWRITE_JPEGXL_DISTANCE = 642
For JPEG XL, distance level for lossy compression: target max butteraugli distance, lower = higher quality, 0 = lossless; range: 0 .. 25. Default is 1.
IMWRITE_JPEGXL_DECODING_SPEED = 643
For JPEG XL, decoding speed tier for the provided options; minimum is 0 (slowest to decode, best quality/density), and maximum is 4 (fastest to decode, at the cost of some quality/density). Default is 0.
IMWRITE_GIF_LOOP = 1_024
For GIF, it can be a loop flag from 0 to 65535. Default is 0 - loop forever.
IMWRITE_GIF_SPEED = 1_025
For GIF, it is between 1 (slowest) and 100 (fastest). Default is 96.
IMWRITE_GIF_QUALITY = 1_026
For GIF, it can be a quality from 1 to 8. Default is 2. See cv::ImwriteGifCompressionFlags.
IMWRITE_GIF_DITHER = 1_027
For GIF, it can be a quality from -1(most dither) to 3(no dither). Default is 0.
IMWRITE_GIF_TRANSPARENCY = 1_028
For GIF, the alpha channel lower than this will be set to transparent. Default is 1.
IMWRITE_GIF_COLORTABLE = 1_029
For GIF, 0 means global color table is used, 1 means local color table is used. Default is 0.
Trait Implementations§
Source§impl Clone for ImwriteFlags
impl Clone for ImwriteFlags
Source§fn clone(&self) -> ImwriteFlags
fn clone(&self) -> ImwriteFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more