summaryrefslogtreecommitdiffstats
path: root/contrib/libs/libwebp/src/webp/decode.h
diff options
context:
space:
mode:
authorrobot-piglet <[email protected]>2025-07-24 10:07:25 +0300
committerrobot-piglet <[email protected]>2025-07-24 10:16:27 +0300
commit1c295121fa6a70a55c0ed79beb993761eac1fadc (patch)
tree0a3af4cf839ddc14d3d2829c3b224c1da409d80c /contrib/libs/libwebp/src/webp/decode.h
parent026ffc40392187f03308f5ae7445365ad4a1ef7f (diff)
Intermediate changes
commit_hash:9e9c04347de10235f77fcdaf62119e9b89e8bc59
Diffstat (limited to 'contrib/libs/libwebp/src/webp/decode.h')
-rw-r--r--contrib/libs/libwebp/src/webp/decode.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/contrib/libs/libwebp/src/webp/decode.h b/contrib/libs/libwebp/src/webp/decode.h
index d6895f5c555..1f0d0c22ead 100644
--- a/contrib/libs/libwebp/src/webp/decode.h
+++ b/contrib/libs/libwebp/src/webp/decode.h
@@ -14,13 +14,15 @@
#ifndef WEBP_WEBP_DECODE_H_
#define WEBP_WEBP_DECODE_H_
+#include <stddef.h>
+
#include "./types.h"
#ifdef __cplusplus
extern "C" {
#endif
-#define WEBP_DECODER_ABI_VERSION 0x0209 // MAJOR(8b) + MINOR(8b)
+#define WEBP_DECODER_ABI_VERSION 0x0210 // MAJOR(8b) + MINOR(8b)
// Note: forward declaring enumerations is not allowed in (strict) C and C++,
// the types are left here for reference.
@@ -451,7 +453,9 @@ struct WebPDecoderOptions {
// Will be snapped to even values.
int crop_width, crop_height; // dimension of the cropping area
int use_scaling; // if true, scaling is applied _afterward_
- int scaled_width, scaled_height; // final resolution
+ int scaled_width, scaled_height; // final resolution. if one is 0, it is
+ // guessed from the other one to keep the
+ // original ratio.
int use_threads; // if true, use multi-threaded decoding
int dithering_strength; // dithering strength (0=Off, 100=full)
int flip; // if true, flip output vertically
@@ -479,6 +483,11 @@ WEBP_NODISCARD static WEBP_INLINE int WebPInitDecoderConfig(
return WebPInitDecoderConfigInternal(config, WEBP_DECODER_ABI_VERSION);
}
+// Returns true if 'config' is non-NULL and all configuration parameters are
+// within their valid ranges.
+WEBP_NODISCARD WEBP_EXTERN int WebPValidateDecoderConfig(
+ const WebPDecoderConfig* config);
+
// Instantiate a new incremental decoder object with the requested
// configuration. The bitstream can be passed using 'data' and 'data_size'
// parameter, in which case the features will be parsed and stored into