Flags used for image file reading and writing#
Detailed Description#
Enumerations#
enum cv::ImageMetadataType {
cv::IMAGE_METADATA_UNKNOWN = -1,
cv::IMAGE_METADATA_EXIF = 0,
cv::IMAGE_METADATA_XMP = 1,
cv::IMAGE_METADATA_ICCP = 2,
cv::IMAGE_METADATA_CICP = 3,
cv::IMAGE_METADATA_MAX = 3
}
enum cv::ImreadModes {
cv::IMREAD_UNCHANGED = -1,
cv::IMREAD_GRAYSCALE = 0,
cv::IMREAD_COLOR_BGR = 1,
cv::IMREAD_COLOR = 1,
cv::IMREAD_ANYDEPTH = 2,
cv::IMREAD_ANYCOLOR = 4,
cv::IMREAD_LOAD_GDAL = 8,
cv::IMREAD_REDUCED_GRAYSCALE_2 = 16,
cv::IMREAD_REDUCED_COLOR_2 = 17,
cv::IMREAD_REDUCED_GRAYSCALE_4 = 32,
cv::IMREAD_REDUCED_COLOR_4 = 33,
cv::IMREAD_REDUCED_GRAYSCALE_8 = 64,
cv::IMREAD_REDUCED_COLOR_8 = 65,
cv::IMREAD_IGNORE_ORIENTATION = 128,
cv::IMREAD_COLOR_RGB = 256
}Imwrite BMP specific values for IMWRITE_BMP_COMPRESSION parameter key. View details
enum cv::ImwriteEXRCompressionFlags {
cv::IMWRITE_EXR_COMPRESSION_NO = 0,
cv::IMWRITE_EXR_COMPRESSION_RLE = 1,
cv::IMWRITE_EXR_COMPRESSION_ZIPS = 2,
cv::IMWRITE_EXR_COMPRESSION_ZIP = 3,
cv::IMWRITE_EXR_COMPRESSION_PIZ = 4,
cv::IMWRITE_EXR_COMPRESSION_PXR24 = 5,
cv::IMWRITE_EXR_COMPRESSION_B44 = 6,
cv::IMWRITE_EXR_COMPRESSION_B44A = 7,
cv::IMWRITE_EXR_COMPRESSION_DWAA = 8,
cv::IMWRITE_EXR_COMPRESSION_DWAB = 9
}
enum cv::ImwriteEXRTypeFlags {
cv::IMWRITE_EXR_TYPE_HALF = 1,
cv::IMWRITE_EXR_TYPE_FLOAT = 2
}
enum cv::ImwriteFlags {
cv::IMWRITE_JPEG_QUALITY = 1,
cv::IMWRITE_JPEG_PROGRESSIVE = 2,
cv::IMWRITE_JPEG_OPTIMIZE = 3,
cv::IMWRITE_JPEG_RST_INTERVAL = 4,
cv::IMWRITE_JPEG_LUMA_QUALITY = 5,
cv::IMWRITE_JPEG_CHROMA_QUALITY = 6,
cv::IMWRITE_JPEG_SAMPLING_FACTOR = 7,
cv::IMWRITE_PNG_COMPRESSION = 16,
cv::IMWRITE_PNG_STRATEGY = 17,
cv::IMWRITE_PNG_BILEVEL = 18,
cv::IMWRITE_PNG_FILTER = 19,
cv::IMWRITE_PNG_ZLIBBUFFER_SIZE = 20,
cv::IMWRITE_PXM_BINARY = 32,
cv::IMWRITE_EXR_TYPE = (3 << 4) + 0,
cv::IMWRITE_EXR_COMPRESSION = (3 << 4) + 1,
cv::IMWRITE_EXR_DWA_COMPRESSION_LEVEL = (3 << 4) + 2,
cv::IMWRITE_WEBP_QUALITY = 64,
cv::IMWRITE_WEBP_LOSSLESS_MODE = 65,
cv::IMWRITE_HDR_COMPRESSION = (5 << 4) + 0,
cv::IMWRITE_PAM_TUPLETYPE = 128,
cv::IMWRITE_TIFF_RESUNIT = 256,
cv::IMWRITE_TIFF_XDPI = 257,
cv::IMWRITE_TIFF_YDPI = 258,
cv::IMWRITE_TIFF_COMPRESSION = 259,
cv::IMWRITE_TIFF_ROWSPERSTRIP = 278,
cv::IMWRITE_TIFF_PREDICTOR = 317,
cv::IMWRITE_JPEG2000_COMPRESSION_X1000 = 272,
cv::IMWRITE_AVIF_QUALITY = 512,
cv::IMWRITE_AVIF_DEPTH = 513,
cv::IMWRITE_AVIF_SPEED = 514,
cv::IMWRITE_JPEGXL_QUALITY = 640,
cv::IMWRITE_JPEGXL_EFFORT = 641,
cv::IMWRITE_JPEGXL_DISTANCE = 642,
cv::IMWRITE_JPEGXL_DECODING_SPEED = 643,
cv::IMWRITE_BMP_COMPRESSION = 768,
cv::IMWRITE_GIF_LOOP = 1024,
cv::IMWRITE_GIF_SPEED = 1025,
cv::IMWRITE_GIF_QUALITY = 1026,
cv::IMWRITE_GIF_DITHER = 1027,
cv::IMWRITE_GIF_TRANSPARENCY = 1028,
cv::IMWRITE_GIF_COLORTABLE = 1029
}Imwrite flags. View details
enum cv::ImwriteGIFCompressionFlags {
cv::IMWRITE_GIF_FAST_NO_DITHER = 1,
cv::IMWRITE_GIF_FAST_FLOYD_DITHER = 2,
cv::IMWRITE_GIF_COLORTABLE_SIZE_8 = 3,
cv::IMWRITE_GIF_COLORTABLE_SIZE_16 = 4,
cv::IMWRITE_GIF_COLORTABLE_SIZE_32 = 5,
cv::IMWRITE_GIF_COLORTABLE_SIZE_64 = 6,
cv::IMWRITE_GIF_COLORTABLE_SIZE_128 = 7,
cv::IMWRITE_GIF_COLORTABLE_SIZE_256 = 8
}Imwrite GIF specific values for IMWRITE_GIF_QUALITY parameter key, if larger than 3, then its related to the size of the color table. View details
Imwrite HDR specific values for IMWRITE_HDR_COMPRESSION parameter key. View details
enum cv::ImwriteJPEGSamplingFactorParams {
cv::IMWRITE_JPEG_SAMPLING_FACTOR_411 = 0x411111,
cv::IMWRITE_JPEG_SAMPLING_FACTOR_420 = 0x221111,
cv::IMWRITE_JPEG_SAMPLING_FACTOR_422 = 0x211111,
cv::IMWRITE_JPEG_SAMPLING_FACTOR_440 = 0x121111,
cv::IMWRITE_JPEG_SAMPLING_FACTOR_444 = 0x111111
}Imwrite PAM specific tupletype flags used to define the ‘TUPLETYPE’ field of a PAM file. View details
enum cv::ImwritePNGFilterFlags {
cv::IMWRITE_PNG_FILTER_NONE = 8,
cv::IMWRITE_PNG_FILTER_SUB = 16,
cv::IMWRITE_PNG_FILTER_UP = 32,
cv::IMWRITE_PNG_FILTER_AVG = 64,
cv::IMWRITE_PNG_FILTER_PAETH = 128,
cv::IMWRITE_PNG_FAST_FILTERS = (IMWRITE_PNG_FILTER_NONE | IMWRITE_PNG_FILTER_SUB | IMWRITE_PNG_FILTER_UP),
cv::IMWRITE_PNG_ALL_FILTERS = (IMWRITE_PNG_FAST_FILTERS | IMWRITE_PNG_FILTER_AVG | IMWRITE_PNG_FILTER_PAETH)
}Imwrite PNG specific values for IMWRITE_PNG_FILTER parameter key. View details
Imwrite PNG specific flags used to tune the compression algorithm. View details
enum cv::ImwriteTiffCompressionFlags {
cv::IMWRITE_TIFF_COMPRESSION_NONE = 1,
cv::IMWRITE_TIFF_COMPRESSION_CCITTRLE = 2,
cv::IMWRITE_TIFF_COMPRESSION_CCITTFAX3 = 3,
cv::IMWRITE_TIFF_COMPRESSION_CCITT_T4 = 3,
cv::IMWRITE_TIFF_COMPRESSION_CCITTFAX4 = 4,
cv::IMWRITE_TIFF_COMPRESSION_CCITT_T6 = 4,
cv::IMWRITE_TIFF_COMPRESSION_LZW = 5,
cv::IMWRITE_TIFF_COMPRESSION_OJPEG = 6,
cv::IMWRITE_TIFF_COMPRESSION_JPEG = 7,
cv::IMWRITE_TIFF_COMPRESSION_T85 = 9,
cv::IMWRITE_TIFF_COMPRESSION_T43 = 10,
cv::IMWRITE_TIFF_COMPRESSION_NEXT = 32766,
cv::IMWRITE_TIFF_COMPRESSION_CCITTRLEW = 32771,
cv::IMWRITE_TIFF_COMPRESSION_PACKBITS = 32773,
cv::IMWRITE_TIFF_COMPRESSION_THUNDERSCAN = 32809,
cv::IMWRITE_TIFF_COMPRESSION_IT8CTPAD = 32895,
cv::IMWRITE_TIFF_COMPRESSION_IT8LW = 32896,
cv::IMWRITE_TIFF_COMPRESSION_IT8MP = 32897,
cv::IMWRITE_TIFF_COMPRESSION_IT8BL = 32898,
cv::IMWRITE_TIFF_COMPRESSION_PIXARFILM = 32908,
cv::IMWRITE_TIFF_COMPRESSION_PIXARLOG = 32909,
cv::IMWRITE_TIFF_COMPRESSION_DEFLATE = 32946,
cv::IMWRITE_TIFF_COMPRESSION_ADOBE_DEFLATE = 8,
cv::IMWRITE_TIFF_COMPRESSION_DCS = 32947,
cv::IMWRITE_TIFF_COMPRESSION_JBIG = 34661,
cv::IMWRITE_TIFF_COMPRESSION_SGILOG = 34676,
cv::IMWRITE_TIFF_COMPRESSION_SGILOG24 = 34677,
cv::IMWRITE_TIFF_COMPRESSION_JP2000 = 34712,
cv::IMWRITE_TIFF_COMPRESSION_LERC = 34887,
cv::IMWRITE_TIFF_COMPRESSION_LZMA = 34925,
cv::IMWRITE_TIFF_COMPRESSION_ZSTD = 50000,
cv::IMWRITE_TIFF_COMPRESSION_WEBP = 50001,
cv::IMWRITE_TIFF_COMPRESSION_JXL = 50002
}Imwrite WEBP specific values for IMWRITE_WEBP_LOSSLESS_MODE parameter key. View details
Enumeration Type Documentation#
ImageMetadataType#
#include <opencv2/imgcodecs.hpp>
Enumerator:
|
|
|
|
|
|
ImreadModes#
enum cv::ImreadModes
#include <opencv2/imgcodecs.hpp>
Imread flags
Note
IMREAD_COLOR_BGR (IMREAD_COLOR) and IMREAD_COLOR_RGB can not be set at the same time.
Enumerator:
|
If set, return the loaded image as is (with alpha channel, otherwise it gets cropped). Ignore EXIF orientation. |
|
If set, always convert image to the single channel grayscale image (codec internal conversion). |
|
If set, always convert image to the 3 channel BGR color image. |
|
Same as IMREAD_COLOR_BGR. |
|
If set, return 16-bit/32-bit image when the input has the corresponding depth, otherwise convert it to 8-bit. |
|
If set, the image is read in any possible color format. |
|
If set, use the gdal driver for loading the image. |
|
If set, always convert image to the single channel grayscale image and the image size reduced 1/2. |
|
If set, always convert image to the 3 channel BGR color image and the image size reduced 1/2. |
|
If set, always convert image to the single channel grayscale image and the image size reduced 1/4. |
|
If set, always convert image to the 3 channel BGR color image and the image size reduced 1/4. |
|
If set, always convert image to the single channel grayscale image and the image size reduced 1/8. |
|
If set, always convert image to the 3 channel BGR color image and the image size reduced 1/8. |
|
If set, do not rotate the image according to EXIF’s orientation flag. |
|
If set, always convert image to the 3 channel RGB color image. |
ImwriteBMPCompressionFlags#
enum cv::ImwriteBMPCompressionFlags
#include <opencv2/imgcodecs.hpp>
Imwrite BMP specific values for IMWRITE_BMP_COMPRESSION parameter key.
Enumerator:
|
Use BI_RGB. OpenCV v4.12.0 or before supports to encode with this compression only. |
|
Use BI_BITFIELDS. OpenCV v4.13.0 or later can support to encode with this compression. (only for 32 BPP images) |
ImwriteEXRCompressionFlags#
enum cv::ImwriteEXRCompressionFlags
#include <opencv2/imgcodecs.hpp>
Enumerator:
|
no compression |
|
run length encoding |
|
zlib compression, one scan line at a time |
|
zlib compression, in blocks of 16 scan lines |
|
piz-based wavelet compression |
|
lossy 24-bit float compression |
|
lossy 4-by-4 pixel block compression, fixed compression rate |
|
lossy 4-by-4 pixel block compression, flat fields are compressed more |
|
lossy DCT based compression, in blocks of 32 scanlines. More efficient for partial buffer access. Supported since OpenEXR 2.2.0. |
|
lossy DCT based compression, in blocks of 256 scanlines. More efficient space wise and faster to decode full frames than DWAA_COMPRESSION. Supported since OpenEXR 2.2.0. |
ImwriteEXRTypeFlags#
#include <opencv2/imgcodecs.hpp>
Enumerator:
|
store as HALF (FP16) |
|
store as FP32 (default) |
ImwriteFlags#
enum cv::ImwriteFlags
#include <opencv2/imgcodecs.hpp>
Imwrite flags.
Enumerator:
|
For JPEG, it can be a quality from 0 to 100 (the higher is the better). Default value is 95. |
|
Enable JPEG features, 0 or 1, default is False. |
|
Enable JPEG features, 0 or 1, default is False. |
|
JPEG restart interval, 0 - 65535, default is 0 - no restart. |
|
Separate luma quality level, 0 - 100, default is -1 - don’t use. If JPEG_LIB_VERSION < 70, Not supported. |
|
Separate chroma quality level, 0 - 100, default is -1 - don’t use. If JPEG_LIB_VERSION < 70, Not supported. |
|
For JPEG, set sampling factor. See cv::ImwriteJPEGSamplingFactorParams. |
|
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). |
|
For PNG, One of cv::ImwritePNGFlags, default is IMWRITE_PNG_STRATEGY_RLE. |
|
For PNG, Binary level PNG, 0 or 1, default is 0. For APNG, it is not supported. |
|
For PNG, One of cv::ImwritePNGFilterFlags, default is IMWRITE_PNG_FILTER_SUB. For APNG, it is not supported. |
|
For PNG with libpng, sets the size of the internal zlib compression buffer in bytes, from 6 to 1048576(1024 KiB). Default is 8192(8 KiB). For normal use, 131072(128 KiB) or 262144(256 KiB) may be sufficient. If WITH_SPNG=ON, it is not supported. For APNG, it is not supported. |
|
For PPM, PGM, or PBM, it can be a binary format flag, 0 or 1. Default value is 1. |
|
override EXR storage type (FLOAT (FP32) is default) |
|
override EXR compression type (ZIP_COMPRESSION = 3 is default) |
|
override EXR DWA compression level (45 is default) |
|
For WEBP, it can be a lossy quality from 1 to 100 (the higher is the better) for IMWRITE_WEBP_LOSSLESS_OFF. By default (without this parameter) or if quality > 100, IMWRITE_WEBP_LOSSLESS_ON is used instead. |
|
For WEBP, it can be a lossless compression strategy. See cv::ImwriteWEBPLosslessMode. Default is IMWRITE_WEBP_LOSSLESS_OFF. For Animated WEBP, it is not supported. |
|
specify HDR compression |
|
For PAM, sets the TUPLETYPE field to the corresponding string value that is defined for the format. |
|
For TIFF, use to specify which DPI resolution unit to set. See ImwriteTiffResolutionUnitFlags. Default is IMWRITE_TIFF_RESOLUTION_UNIT_INCH. |
|
For TIFF, use to specify the X direction DPI. |
|
For TIFF, use to specify the Y direction DPI. |
|
For TIFF, use to specify the image compression scheme. See cv::ImwriteTiffCompressionFlags. The compression scheme can be specified by this flag; the default is LZW compression, except for 32F depth where it is NONE. |
|
For TIFF, use to specify the number of rows per strip. |
|
For TIFF, use to specify predictor. See cv::ImwriteTiffPredictorFlags. Default is IMWRITE_TIFF_PREDICTOR_HORIZONTAL . |
|
For JPEG2000, use to specify the target compression rate (multiplied by 1000). The value can be from 0 to 1000. Default is 1000. |
|
For AVIF, it can be a quality between 0 and 100 (the higher the better). Default is 95. |
|
For AVIF, it can be 8, 10 or 12. If >8, it is stored/read as CV_16U. Default is 8. |
|
For AVIF, it is between 0 (slowest) and 10(fastest). Default is 9. |
|
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. |
|
For JPEG XL, encoder effort/speed level without affecting decoding speed; it is between 1 (fastest) and 10 (slowest). Default is 7. |
|
For JPEG XL, distance level for lossy compression: target max butteraugli distance, lower = higher quality, 0 = lossless; range: 0 .. 25. Default is 1. |
|
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. |
|
For BMP, use to specify compress parameter for 32bpp image. Default is IMWRITE_BMP_COMPRESSION_BITFIELDS. See cv::ImwriteBMPCompressionFlags. |
|
Not functional since 4.12.0. Replaced by cv::Animation::loop_count. |
|
Not functional since 4.12.0. Replaced by cv::Animation::durations. |
|
For GIF, it can be a quality from 1 to 8. Default is 2. See cv::ImwriteGifCompressionFlags. |
|
For GIF, it can be a quality from -1(most dither) to 3(no dither). Default is 0. |
|
For GIF, the alpha channel lower than this will be set to transparent. Default is 1. |
|
For GIF, 0 means global color table is used, 1 means local color table is used. Default is 0. |
ImwriteGIFCompressionFlags#
enum cv::ImwriteGIFCompressionFlags
#include <opencv2/imgcodecs.hpp>
Imwrite GIF specific values for IMWRITE_GIF_QUALITY parameter key, if larger than 3, then its related to the size of the color table.
Enumerator:
|
|
|
|
|
|
|
|
ImwriteHDRCompressionFlags#
enum cv::ImwriteHDRCompressionFlags
#include <opencv2/imgcodecs.hpp>
Imwrite HDR specific values for IMWRITE_HDR_COMPRESSION parameter key.
Enumerator:
|
|
ImwriteJPEGSamplingFactorParams#
enum cv::ImwriteJPEGSamplingFactorParams
#include <opencv2/imgcodecs.hpp>
Enumerator:
|
4x1,1x1,1x1 |
|
2x2,1x1,1x1(Default) |
|
2x1,1x1,1x1 |
|
1x2,1x1,1x1 |
|
1x1,1x1,1x1(No subsampling) |
ImwritePAMFlags#
enum cv::ImwritePAMFlags
#include <opencv2/imgcodecs.hpp>
Imwrite PAM specific tupletype flags used to define the ‘TUPLETYPE’ field of a PAM file.
Enumerator:
|
|
|
|
|
|
ImwritePNGFilterFlags#
enum cv::ImwritePNGFilterFlags
#include <opencv2/imgcodecs.hpp>
Imwrite PNG specific values for IMWRITE_PNG_FILTER parameter key.
Enumerator:
|
Applies no filter to the PNG image (useful when you want to save the raw pixel data without any compression filter). |
|
Applies the “sub” filter, which calculates the difference between the current byte and the previous byte in the row. |
|
applies the “up” filter, which calculates the difference between the current byte and the corresponding byte directly above it. |
|
applies the “average” filter, which calculates the average of the byte to the left and the byte above. |
|
applies the “Paeth” filter, a more complex filter that predicts the next pixel value based on neighboring pixels. |
|
This is a combination of IMWRITE_PNG_FILTER_NONE, IMWRITE_PNG_FILTER_SUB, and IMWRITE_PNG_FILTER_UP, typically used for faster compression. |
|
This combines all available filters (NONE, SUB, UP, AVG, and PAETH), which will attempt to apply all of them for the best possible compression. |
ImwritePNGFlags#
enum cv::ImwritePNGFlags
#include <opencv2/imgcodecs.hpp>
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.
Enumerator:
|
Use this value for normal data. |
|
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. |
|
Use this value to force Huffman encoding only (no string match). |
|
Use this value to limit match distances to one (run-length encoding). |
|
Using this value prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications. |
ImwriteTiffCompressionFlags#
enum cv::ImwriteTiffCompressionFlags
#include <opencv2/imgcodecs.hpp>
Enumerator:
|
dump mode |
|
CCITT modified Huffman RLE. |
|
CCITT Group 3 fax encoding. |
|
CCITT T.4 (TIFF 6 name) |
|
CCITT Group 4 fax encoding. |
|
CCITT T.6 (TIFF 6 name) |
|
Lempel-Ziv & Welch. |
|
!6.0 JPEG |
|
JPEG DCT compression |
|
!TIFF/FX T.85 JBIG compression |
|
!TIFF/FX T.43 colour by layered JBIG compression |
|
NeXT 2-bit RLE. |
|
#1 w/ word alignment |
|
Macintosh RLE. |
|
ThunderScan RLE. |
|
IT8 CT w/padding. |
|
IT8 Linework RLE. |
|
IT8 Monochrome picture. |
|
IT8 Binary line art. |
|
Pixar companded 10bit LZW. |
|
Pixar companded 11bit ZIP. |
|
Deflate compression, legacy tag. |
|
Deflate compression, as recognized by Adobe. |
|
Kodak DCS encoding. |
|
ISO JBIG. |
|
SGI Log Luminance RLE. |
|
SGI Log 24-bit packed. |
|
Leadtools JPEG2000. |
|
ESRI Lerc codec: Esri/lerc. |
|
LZMA2. |
|
ZSTD: WARNING not registered in Adobe-maintained registry. |
|
WEBP: WARNING not registered in Adobe-maintained registry. |
|
JPEGXL: WARNING not registered in Adobe-maintained registry. |
ImwriteTiffPredictorFlags#
enum cv::ImwriteTiffPredictorFlags
#include <opencv2/imgcodecs.hpp>
Enumerator:
|
no prediction scheme used |
|
horizontal differencing |
|
floating point predictor |
ImwriteTiffResolutionUnitFlags#
enum cv::ImwriteTiffResolutionUnitFlags
#include <opencv2/imgcodecs.hpp>
Enumerator:
|
no absolute unit of measurement. |
|
inch |
|
centimeter |
ImwriteWEBPLosslessMode#
enum cv::ImwriteWEBPLosslessMode
#include <opencv2/imgcodecs.hpp>
Imwrite WEBP specific values for IMWRITE_WEBP_LOSSLESS_MODE parameter key.
Enumerator:
|
Lossy compression mode. Uses IMWRITE_WEBP_QUALITY to control compression. (Default) Note If IMWRITE_WEBP_QUALITY is not specified, it falls back to IMWRITE_WEBP_LOSSLESS_ON to maintain backward compatibility. |
|
Standard lossless compression. May modify or discard RGB values of fully transparent pixels to improve compression ratio. |
|
Exact lossless compression. Preserves all RGB data even for pixels with 0 alpha (equivalent to WebP’s exact flag). |