Enum ImwriteFlags
Flags for Imwrite function
[Flags]
public enum ImwriteFlags
Fields
ExrCompression = JpegQuality | ExrType
Override EXR compression type (ZIP_COMPRESSION = 3 is default)
ExrType = PngCompression | PxmBinary
Override EXR storage type (FLOAT (FP32) is default)
Jpeg2000CompressionX1000 = PngCompression | TiffResunit
For JPEG2000, use to specify the target compression rate (multiplied by 1000). The value can be from 0 to 1000. Default is 1000.
JpegChromaQuality = JpegProgressive | JpegRstInterval
Separate chroma quality level, 0 - 100, default is 0 - don't use.
JpegLumaQuality = JpegQuality | JpegRstInterval
Separate luma quality level, 0 - 100, default is 0 - don't use.
JpegOptimize = JpegQuality | JpegProgressive
Enable JPEG features, 0 or 1, default is False.
JpegProgressive = 2
Enable JPEG features, 0 or 1, default is False.
JpegQuality = 1
For JPEG, it can be a quality from 0 to 100 (the higher is the better). Default value is 95.
JpegRstInterval = 4
JPEG restart interval, 0 - 65535, default is 0 - no restart.
PamTupletype = 128
For PAM, sets the TUPLETYPE field to the corresponding string value that is defined for the format
PngBilevel = JpegProgressive | PngCompression
Binary level PNG, 0 or 1, default is 0.
PngCompression = 16
For PNG, it can be the compression level from 0 to 9. A higher value means a smaller size and longer compression time. Default value is 3.
PngStrategy = JpegQuality | PngCompression
One of cv::ImwritePNGFlags, default is IMWRITE_PNG_STRATEGY_DEFAULT.
PxmBinary = 32
For PPM, PGM, or PBM, it can be a binary format flag, 0 or 1. Default value is 1.
TiffCompression = JpegQuality | TiffYdpi
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.
TiffResunit = 256
For TIFF, use to specify which DPI resolution unit to set; see libtiff documentation for valid values
TiffXdpi = JpegQuality | TiffResunit
For TIFF, use to specify the X direction DPI
TiffYdpi = JpegProgressive | TiffResunit
For TIFF, use to specify the Y direction DPI
WebpQuality = 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.