1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

imgcodecs: ensure parameters are key-value pairs, fix HDR encoder

This commit is contained in:
Alexander Alekhin
2022-11-18 18:09:26 +00:00
parent d9f66413ee
commit f0df78b7e7
6 changed files with 119 additions and 19 deletions
@@ -96,6 +96,7 @@ enum ImwriteFlags {
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 = (3 << 4) + 0, /* 48 */ //!< override EXR storage type (FLOAT (FP32) 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 = (5 << 4) + 0, /* 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.
@@ -145,6 +146,12 @@ enum ImwritePAMFlags {
IMWRITE_PAM_FORMAT_RGB_ALPHA = 5
};
//! Imwrite HDR specific values for IMWRITE_HDR_COMPRESSION parameter key
enum ImwriteHDRCompressionFlags {
IMWRITE_HDR_COMPRESSION_NONE = 0,
IMWRITE_HDR_COMPRESSION_RLE = 1
};
//! @} imgcodecs_flags
/** @brief Loads an image from a file.