@img/sharp-libvips-dev-wasm32 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/include/aom/aom.h +1 -1
- package/include/aom/aom_codec.h +4 -4
- package/include/aom/aom_decoder.h +2 -2
- package/include/aom/aom_encoder.h +10 -2
- package/include/aom/aom_external_partition.h +1 -1
- package/include/aom/aom_frame_buffer.h +1 -1
- package/include/aom/aom_image.h +25 -13
- package/include/aom/aom_integer.h +4 -12
- package/include/aom/aomcx.h +62 -4
- package/include/aom/aomdx.h +6 -3
- package/include/cgif.h +3 -0
- package/include/expat.h +1 -1
- package/include/expat_config.h +3 -6
- package/include/glib-2.0/gio/gappinfo.h +40 -25
- package/include/glib-2.0/gio/gasyncresult.h +1 -1
- package/include/glib-2.0/gio/gconverter.h +5 -0
- package/include/glib-2.0/gio/gdbusintrospection.h +1 -1
- package/include/glib-2.0/gio/gfile.h +16 -0
- package/include/glib-2.0/gio/gio-visibility.h +34 -0
- package/include/glib-2.0/gio/gioenums.h +2 -2
- package/include/glib-2.0/gio/gsettings.h +8 -0
- package/include/glib-2.0/gio/gvfs.h +2 -2
- package/include/glib-2.0/glib/gbookmarkfile.h +1 -1
- package/include/glib-2.0/glib/giochannel.h +2 -2
- package/include/glib-2.0/glib/glib-visibility.h +34 -0
- package/include/glib-2.0/glib/gmacros.h +12 -5
- package/include/glib-2.0/glib/gmain.h +145 -54
- package/include/glib-2.0/glib/gqsort.h +8 -1
- package/include/glib-2.0/glib/gstrfuncs.h +0 -12
- package/include/glib-2.0/glib/gstring.h +4 -0
- package/include/glib-2.0/glib/gstrvbuilder.h +3 -0
- package/include/glib-2.0/glib/gunicode.h +1 -1
- package/include/glib-2.0/glib/gversionmacros.h +9 -0
- package/include/glib-2.0/gmodule/gmodule-visibility.h +34 -0
- package/include/glib-2.0/gobject/gobject-visibility.h +34 -0
- package/include/glib-2.0/gobject/gobjectnotifyqueue.c +2 -2
- package/include/glib-2.0/gobject/gtype.h +6 -6
- package/include/hwy/abort.h +28 -0
- package/include/hwy/aligned_allocator.h +48 -1
- package/include/hwy/base.h +235 -34
- package/include/hwy/detect_compiler_arch.h +84 -10
- package/include/hwy/detect_targets.h +95 -29
- package/include/hwy/foreach_target.h +12 -1
- package/include/hwy/highway.h +205 -50
- package/include/hwy/ops/arm_neon-inl.h +841 -99
- package/include/hwy/ops/arm_sve-inl.h +413 -141
- package/include/hwy/ops/emu128-inl.h +373 -360
- package/include/hwy/ops/generic_ops-inl.h +804 -401
- package/include/hwy/ops/inside-inl.h +691 -0
- package/include/hwy/ops/ppc_vsx-inl.h +456 -166
- package/include/hwy/ops/rvv-inl.h +537 -249
- package/include/hwy/ops/scalar-inl.h +169 -79
- package/include/hwy/ops/set_macros-inl.h +106 -18
- package/include/hwy/ops/shared-inl.h +23 -0
- package/include/hwy/ops/wasm_128-inl.h +130 -108
- package/include/hwy/ops/x86_128-inl.h +1892 -577
- package/include/hwy/ops/x86_256-inl.h +625 -184
- package/include/hwy/ops/x86_512-inl.h +733 -131
- package/include/hwy/targets.h +22 -21
- package/include/hwy/timer-inl.h +3 -3
- package/include/hwy/timer.h +5 -1
- package/include/libheif/heif.h +170 -15
- package/include/libheif/heif_items.h +237 -0
- package/include/libheif/heif_properties.h +38 -2
- package/include/libheif/heif_regions.h +1 -1
- package/include/libheif/heif_version.h +2 -2
- package/include/resvg.h +16 -9
- package/include/tiffio.h +11 -11
- package/include/tiffvers.h +4 -4
- package/include/vips/util.h +1 -2
- package/include/vips/version.h +4 -4
- package/include/webp/decode.h +58 -56
- package/include/webp/demux.h +25 -21
- package/include/webp/encode.h +44 -39
- package/include/webp/mux.h +76 -15
- package/include/webp/mux_types.h +2 -1
- package/include/webp/sharpyuv/sharpyuv.h +77 -8
- package/include/webp/types.h +29 -8
- package/include/zconf.h +1 -1
- package/include/zlib.h +12 -12
- package/lib/glib-2.0/include/glibconfig.h +2 -2
- package/lib/libaom.a +0 -0
- package/lib/libcgif.a +0 -0
- package/lib/libexif.a +0 -0
- package/lib/libexpat.a +0 -0
- package/lib/libexpat.la +1 -1
- package/lib/libffi.a +0 -0
- package/lib/libgio-2.0.a +0 -0
- package/lib/libglib-2.0.a +0 -0
- package/lib/libgmodule-2.0.a +0 -0
- package/lib/libgobject-2.0.a +0 -0
- package/lib/libgthread-2.0.a +0 -0
- package/lib/libheif.a +0 -0
- package/lib/libhwy.a +0 -0
- package/lib/libimagequant.a +0 -0
- package/lib/libjpeg.a +0 -0
- package/lib/liblcms2.a +0 -0
- package/lib/libresvg.a +0 -0
- package/lib/libsharpyuv.a +0 -0
- package/lib/libsharpyuv.la +4 -4
- package/lib/libspng.a +0 -0
- package/lib/libtiff.a +0 -0
- package/lib/libtiff.la +3 -3
- package/lib/libvips-cpp.a +0 -0
- package/lib/libvips.a +0 -0
- package/lib/libwebp.a +0 -0
- package/lib/libwebp.la +2 -2
- package/lib/libwebpdemux.a +0 -0
- package/lib/libwebpdemux.la +2 -2
- package/lib/libwebpmux.a +0 -0
- package/lib/libwebpmux.la +4 -4
- package/lib/libz.a +0 -0
- package/lib/pkgconfig/aom.pc +2 -2
- package/lib/pkgconfig/cgif.pc +1 -1
- package/lib/pkgconfig/expat.pc +1 -1
- package/lib/pkgconfig/gio-2.0.pc +1 -1
- package/lib/pkgconfig/glib-2.0.pc +1 -1
- package/lib/pkgconfig/gmodule-2.0.pc +1 -1
- package/lib/pkgconfig/gmodule-export-2.0.pc +1 -1
- package/lib/pkgconfig/gmodule-no-export-2.0.pc +1 -1
- package/lib/pkgconfig/gobject-2.0.pc +1 -1
- package/lib/pkgconfig/gthread-2.0.pc +1 -1
- package/lib/pkgconfig/libheif.pc +1 -10
- package/lib/pkgconfig/libhwy.pc +1 -1
- package/lib/pkgconfig/libjpeg.pc +3 -3
- package/lib/pkgconfig/libsharpyuv.pc +1 -1
- package/lib/pkgconfig/libtiff-4.pc +1 -1
- package/lib/pkgconfig/libwebp.pc +1 -1
- package/lib/pkgconfig/libwebpdemux.pc +1 -1
- package/lib/pkgconfig/libwebpmux.pc +1 -1
- package/lib/pkgconfig/vips-cpp.pc +1 -1
- package/lib/pkgconfig/vips.pc +1 -1
- package/lib/pkgconfig/zlib.pc +1 -1
- package/package.json +1 -1
- package/versions.json +12 -12
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
#ifndef LIBHEIF_HEIF_PROPERTIES_H
|
|
22
22
|
#define LIBHEIF_HEIF_PROPERTIES_H
|
|
23
23
|
|
|
24
|
-
#include "
|
|
24
|
+
#include "heif.h"
|
|
25
25
|
|
|
26
26
|
#ifdef __cplusplus
|
|
27
27
|
extern "C" {
|
|
@@ -37,7 +37,8 @@ enum heif_item_property_type
|
|
|
37
37
|
heif_item_property_type_transform_mirror = heif_fourcc('i', 'm', 'i', 'r'),
|
|
38
38
|
heif_item_property_type_transform_rotation = heif_fourcc('i', 'r', 'o', 't'),
|
|
39
39
|
heif_item_property_type_transform_crop = heif_fourcc('c', 'l', 'a', 'p'),
|
|
40
|
-
heif_item_property_type_image_size = heif_fourcc('i', 's', 'p', 'e')
|
|
40
|
+
heif_item_property_type_image_size = heif_fourcc('i', 's', 'p', 'e'),
|
|
41
|
+
heif_item_property_type_uuid = heif_fourcc('u', 'u', 'i', 'd')
|
|
41
42
|
};
|
|
42
43
|
|
|
43
44
|
// Get the heif_property_id for a heif_item_id.
|
|
@@ -131,6 +132,41 @@ void heif_item_get_property_transform_crop_borders(const struct heif_context* co
|
|
|
131
132
|
int image_width, int image_height,
|
|
132
133
|
int* left, int* top, int* right, int* bottom);
|
|
133
134
|
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @param context
|
|
138
|
+
* @param itemId The image item id to which this property belongs.
|
|
139
|
+
* @param fourcc_type The short four-cc type of the property to add.
|
|
140
|
+
* @param uuid_type If fourcc_type=='uuid', this should point to a 16-byte UUID type. It is ignored otherwise and can be NULL.
|
|
141
|
+
* @param data Data to insert for this property (including a full-box header, if required for this box).
|
|
142
|
+
* @param size Length of data in bytes.
|
|
143
|
+
* @param is_essential Whether this property is essential (boolean).
|
|
144
|
+
* @param out_propertyId Outputs the id of the inserted property. Can be NULL.
|
|
145
|
+
*/
|
|
146
|
+
LIBHEIF_API
|
|
147
|
+
struct heif_error heif_item_add_raw_property(const struct heif_context* context,
|
|
148
|
+
heif_item_id itemId,
|
|
149
|
+
uint32_t fourcc_type,
|
|
150
|
+
const uint8_t* uuid_type,
|
|
151
|
+
const uint8_t* data, size_t size,
|
|
152
|
+
int is_essential,
|
|
153
|
+
heif_property_id* out_propertyId);
|
|
154
|
+
|
|
155
|
+
LIBHEIF_API
|
|
156
|
+
struct heif_error heif_item_get_property_raw_size(const struct heif_context* context,
|
|
157
|
+
heif_item_id itemId,
|
|
158
|
+
heif_property_id propertyId,
|
|
159
|
+
size_t* out_size);
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* @param data_out User-supplied array to write the property data to. The required size of the output array is given by heif_item_get_property_raw_size().
|
|
163
|
+
*/
|
|
164
|
+
LIBHEIF_API
|
|
165
|
+
struct heif_error heif_item_get_property_raw_data(const struct heif_context* context,
|
|
166
|
+
heif_item_id itemId,
|
|
167
|
+
heif_property_id propertyId,
|
|
168
|
+
uint8_t* out_data);
|
|
169
|
+
|
|
134
170
|
#ifdef __cplusplus
|
|
135
171
|
}
|
|
136
172
|
#endif
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
#define LIBHEIF_HEIF_VERSION_H
|
|
29
29
|
|
|
30
30
|
/* Numeric representation of the version */
|
|
31
|
-
#define LIBHEIF_NUMERIC_VERSION ((1<<24) | (
|
|
31
|
+
#define LIBHEIF_NUMERIC_VERSION ((1<<24) | (18<<16) | (2<<8) | 0)
|
|
32
32
|
|
|
33
33
|
/* Version string */
|
|
34
|
-
#define LIBHEIF_VERSION "1.
|
|
34
|
+
#define LIBHEIF_VERSION "1.18.2"
|
|
35
35
|
|
|
36
36
|
#define LIBHEIF_PLUGIN_DIRECTORY "/src/build/target/lib/libheif"
|
|
37
37
|
|
package/include/resvg.h
CHANGED
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
#include <stdint.h>
|
|
18
18
|
|
|
19
19
|
#define RESVG_MAJOR_VERSION 0
|
|
20
|
-
#define RESVG_MINOR_VERSION
|
|
20
|
+
#define RESVG_MINOR_VERSION 44
|
|
21
21
|
#define RESVG_PATCH_VERSION 0
|
|
22
|
-
#define RESVG_VERSION "0.
|
|
22
|
+
#define RESVG_VERSION "0.44.0"
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* @brief List of possible errors.
|
|
@@ -375,9 +375,10 @@ bool resvg_is_image_empty(const resvg_render_tree *tree);
|
|
|
375
375
|
/**
|
|
376
376
|
* @brief Returns an image size.
|
|
377
377
|
*
|
|
378
|
-
* The size of
|
|
378
|
+
* The size of an image that is required to render this SVG.
|
|
379
379
|
*
|
|
380
|
-
*
|
|
380
|
+
* Note that elements outside the viewbox will be clipped. This is by design.
|
|
381
|
+
* If you want to render the whole SVG content, use #resvg_get_image_bbox instead.
|
|
381
382
|
*
|
|
382
383
|
* @param tree Render tree.
|
|
383
384
|
* @return Image size.
|
|
@@ -385,19 +386,25 @@ bool resvg_is_image_empty(const resvg_render_tree *tree);
|
|
|
385
386
|
resvg_size resvg_get_image_size(const resvg_render_tree *tree);
|
|
386
387
|
|
|
387
388
|
/**
|
|
388
|
-
* @brief Returns an
|
|
389
|
+
* @brief Returns an object bounding box.
|
|
389
390
|
*
|
|
390
|
-
*
|
|
391
|
+
* This bounding box does not include objects stroke and filter regions.
|
|
392
|
+
* This is what SVG calls "absolute object bonding box".
|
|
393
|
+
*
|
|
394
|
+
* If you're looking for a "complete" bounding box see #resvg_get_image_bbox
|
|
391
395
|
*
|
|
392
396
|
* @param tree Render tree.
|
|
393
|
-
* @
|
|
397
|
+
* @param bbox Image's object bounding box.
|
|
398
|
+
* @return `false` if an image has no elements.
|
|
394
399
|
*/
|
|
395
|
-
|
|
400
|
+
bool resvg_get_object_bbox(const resvg_render_tree *tree, resvg_rect *bbox);
|
|
396
401
|
|
|
397
402
|
/**
|
|
398
403
|
* @brief Returns an image bounding box.
|
|
399
404
|
*
|
|
400
|
-
*
|
|
405
|
+
* This bounding box contains the maximum SVG dimensions.
|
|
406
|
+
* It's size can be bigger or smaller than #resvg_get_image_size
|
|
407
|
+
* Use it when you want to avoid clipping of elements that are outside the SVG viewbox.
|
|
401
408
|
*
|
|
402
409
|
* @param tree Render tree.
|
|
403
410
|
* @param bbox Image's bounding box.
|
package/include/tiffio.h
CHANGED
|
@@ -77,10 +77,6 @@ typedef tstrile_t ttile_t; /* tile number */
|
|
|
77
77
|
typedef tmsize_t tsize_t; /* i/o size in bytes */
|
|
78
78
|
typedef void *tdata_t; /* image data ref */
|
|
79
79
|
|
|
80
|
-
#if !defined(__WIN32__) && (defined(_WIN32) || defined(WIN32))
|
|
81
|
-
#define __WIN32__
|
|
82
|
-
#endif
|
|
83
|
-
|
|
84
80
|
/*
|
|
85
81
|
* On windows you should define USE_WIN32_FILEIO if you are using tif_win32.c
|
|
86
82
|
* or AVOID_WIN32_FILEIO if you are using something else (like tif_unix.c).
|
|
@@ -88,7 +84,7 @@ typedef void *tdata_t; /* image data ref */
|
|
|
88
84
|
* By default tif_unix.c is assumed.
|
|
89
85
|
*/
|
|
90
86
|
|
|
91
|
-
#if defined(
|
|
87
|
+
#if defined(_WIN32)
|
|
92
88
|
#if !defined(__CYGWIN) && !defined(AVOID_WIN32_FILEIO) && \
|
|
93
89
|
!defined(USE_WIN32_FILEIO)
|
|
94
90
|
#define AVOID_WIN32_FILEIO
|
|
@@ -98,11 +94,11 @@ typedef void *tdata_t; /* image data ref */
|
|
|
98
94
|
#if defined(USE_WIN32_FILEIO)
|
|
99
95
|
#define VC_EXTRALEAN
|
|
100
96
|
#include <windows.h>
|
|
101
|
-
#ifdef
|
|
97
|
+
#ifdef _WIN32
|
|
102
98
|
DECLARE_HANDLE(thandle_t); /* Win32 file handle */
|
|
103
99
|
#else
|
|
104
100
|
typedef HFILE thandle_t; /* client data handle */
|
|
105
|
-
#endif /*
|
|
101
|
+
#endif /* _WIN32 */
|
|
106
102
|
#else
|
|
107
103
|
typedef void *thandle_t; /* client data handle */
|
|
108
104
|
#endif /* USE_WIN32_FILEIO */
|
|
@@ -311,14 +307,15 @@ extern "C"
|
|
|
311
307
|
/*
|
|
312
308
|
* Auxiliary functions.
|
|
313
309
|
*/
|
|
314
|
-
|
|
310
|
+
#ifndef TIFF_DO_NOT_USE_NON_EXT_ALLOC_FUNCTIONS
|
|
315
311
|
extern void *_TIFFmalloc(tmsize_t s);
|
|
316
312
|
extern void *_TIFFcalloc(tmsize_t nmemb, tmsize_t siz);
|
|
317
313
|
extern void *_TIFFrealloc(void *p, tmsize_t s);
|
|
314
|
+
extern void _TIFFfree(void *p);
|
|
315
|
+
#endif
|
|
318
316
|
extern void _TIFFmemset(void *p, int v, tmsize_t c);
|
|
319
317
|
extern void _TIFFmemcpy(void *d, const void *s, tmsize_t c);
|
|
320
318
|
extern int _TIFFmemcmp(const void *p1, const void *p2, tmsize_t c);
|
|
321
|
-
extern void _TIFFfree(void *p);
|
|
322
319
|
|
|
323
320
|
/*
|
|
324
321
|
** Stuff, related to tag handling and creating custom tags.
|
|
@@ -508,6 +505,9 @@ extern int TIFFReadRGBAImageOriented(TIFF *, uint32_t, uint32_t, uint32_t *,
|
|
|
508
505
|
TIFFOpenOptionsSetMaxSingleMemAlloc(TIFFOpenOptions *opts,
|
|
509
506
|
tmsize_t max_single_mem_alloc);
|
|
510
507
|
extern void
|
|
508
|
+
TIFFOpenOptionsSetMaxCumulatedMemAlloc(TIFFOpenOptions *opts,
|
|
509
|
+
tmsize_t max_cumulated_mem_alloc);
|
|
510
|
+
extern void
|
|
511
511
|
TIFFOpenOptionsSetErrorHandlerExtR(TIFFOpenOptions *opts,
|
|
512
512
|
TIFFErrorHandlerExtR handler,
|
|
513
513
|
void *errorhandler_user_data);
|
|
@@ -518,11 +518,11 @@ extern int TIFFReadRGBAImageOriented(TIFF *, uint32_t, uint32_t, uint32_t *,
|
|
|
518
518
|
|
|
519
519
|
extern TIFF *TIFFOpen(const char *, const char *);
|
|
520
520
|
extern TIFF *TIFFOpenExt(const char *, const char *, TIFFOpenOptions *opts);
|
|
521
|
-
#ifdef
|
|
521
|
+
#ifdef _WIN32
|
|
522
522
|
extern TIFF *TIFFOpenW(const wchar_t *, const char *);
|
|
523
523
|
extern TIFF *TIFFOpenWExt(const wchar_t *, const char *,
|
|
524
524
|
TIFFOpenOptions *opts);
|
|
525
|
-
#endif /*
|
|
525
|
+
#endif /* _WIN32 */
|
|
526
526
|
extern TIFF *TIFFFdOpen(int, const char *, const char *);
|
|
527
527
|
extern TIFF *TIFFFdOpenExt(int, const char *, const char *,
|
|
528
528
|
TIFFOpenOptions *opts);
|
package/include/tiffvers.h
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Furthermore, configure_file variables of type "@VAR@" are
|
|
9
9
|
* modified by clang-format and won't be substituted by CMake.
|
|
10
10
|
*/
|
|
11
|
-
#define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.
|
|
11
|
+
#define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.7.0\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc."
|
|
12
12
|
/*
|
|
13
13
|
* This define can be used in code that requires
|
|
14
14
|
* compilation-related definitions specific to a
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
* version checking should be done based on the
|
|
17
17
|
* string returned by TIFFGetVersion.
|
|
18
18
|
*/
|
|
19
|
-
#define TIFFLIB_VERSION
|
|
19
|
+
#define TIFFLIB_VERSION 20240911
|
|
20
20
|
|
|
21
21
|
/* The following defines have been added in 4.5.0 */
|
|
22
22
|
#define TIFFLIB_MAJOR_VERSION 4
|
|
23
|
-
#define TIFFLIB_MINOR_VERSION
|
|
23
|
+
#define TIFFLIB_MINOR_VERSION 7
|
|
24
24
|
#define TIFFLIB_MICRO_VERSION 0
|
|
25
|
-
#define TIFFLIB_VERSION_STR_MAJ_MIN_MIC "4.
|
|
25
|
+
#define TIFFLIB_VERSION_STR_MAJ_MIN_MIC "4.7.0"
|
|
26
26
|
|
|
27
27
|
/* Macro added in 4.5.0. Returns TRUE if the current libtiff version is
|
|
28
28
|
* greater or equal to major.minor.micro
|
package/include/vips/util.h
CHANGED
|
@@ -335,8 +335,7 @@ int vips__file_write(void *data, size_t size, size_t nmemb, FILE *stream);
|
|
|
335
335
|
/* TODO(kleisauke): VIPS_API is required by the magick module.
|
|
336
336
|
*/
|
|
337
337
|
VIPS_API
|
|
338
|
-
gint64 vips__get_bytes(const char *filename,
|
|
339
|
-
unsigned char buf[], gint64 len);
|
|
338
|
+
gint64 vips__get_bytes(const char *filename, unsigned char buf[], gint64 len);
|
|
340
339
|
int vips__fgetc(FILE *fp);
|
|
341
340
|
|
|
342
341
|
GValue *vips__gvalue_ref_string_new(const char *text);
|
package/include/vips/version.h
CHANGED
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
#ifndef VIPS_VERSION_H
|
|
5
5
|
#define VIPS_VERSION_H
|
|
6
6
|
|
|
7
|
-
#define VIPS_VERSION "8.15.
|
|
8
|
-
#define VIPS_VERSION_STRING "8.15.
|
|
7
|
+
#define VIPS_VERSION "8.15.5"
|
|
8
|
+
#define VIPS_VERSION_STRING "8.15.5"
|
|
9
9
|
#define VIPS_MAJOR_VERSION (8)
|
|
10
10
|
#define VIPS_MINOR_VERSION (15)
|
|
11
|
-
#define VIPS_MICRO_VERSION (
|
|
11
|
+
#define VIPS_MICRO_VERSION (5)
|
|
12
12
|
|
|
13
13
|
/* The ABI version, as used for library versioning.
|
|
14
14
|
*/
|
|
15
15
|
#define VIPS_LIBRARY_CURRENT (59)
|
|
16
|
-
#define VIPS_LIBRARY_REVISION (
|
|
16
|
+
#define VIPS_LIBRARY_REVISION (5)
|
|
17
17
|
#define VIPS_LIBRARY_AGE (17)
|
|
18
18
|
|
|
19
19
|
#define VIPS_CONFIG "enable debug: false\nenable deprecated: false\nenable modules: false\nenable cplusplus: true\nenable RAD load/save: true\nenable Analyze7 load/save: true\nenable PPM load/save: true\nenable GIF load: true\nuse fftw for FFTs: false\nSIMD support with highway: true\nICC profile support with lcms: true\nzlib: true\ntext rendering with pangocairo: false\nfont file support with fontconfig: false\nEXIF metadata support with libexif: true\nJPEG load/save with libjpeg: true\nJXL load/save with libjxl: false (dynamic module: false)\nJPEG2000 load/save with OpenJPEG: false\nPNG load/save with libspng: true\nPNG load/save with libpng: false\nselected quantisation package: imagequant\nTIFF load/save with libtiff: true\nimage pyramid save with libarchive: false\nHEIC/AVIF load/save with libheif: true (dynamic module: false)\nWebP load/save with libwebp: true\nPDF load with PDFium: false\nPDF load with poppler-glib: false (dynamic module: false)\nSVG load with librsvg: false\nSVG load with resvg: true (dynamic module: false)\nEXR load with OpenEXR: false\nOpenSlide load: false (dynamic module: false)\nMatlab load with libmatio: false\nNIfTI load/save with niftiio: false\nFITS load/save with cfitsio: false\nGIF save with cgif: true\nselected Magick package: none (dynamic module: false)\nMagick API version: none\nMagick load: false\nMagick save: false"
|
package/include/webp/decode.h
CHANGED
|
@@ -48,34 +48,33 @@ WEBP_EXTERN int WebPGetDecoderVersion(void);
|
|
|
48
48
|
// RIFF + VP8X + (optional chunks) + VP8(L)
|
|
49
49
|
// ALPH + VP8 <-- Not a valid WebP format: only allowed for internal purpose.
|
|
50
50
|
// VP8(L) <-- Not a valid WebP format: only allowed for internal purpose.
|
|
51
|
-
WEBP_EXTERN int WebPGetInfo(
|
|
52
|
-
|
|
51
|
+
WEBP_NODISCARD WEBP_EXTERN int WebPGetInfo(
|
|
52
|
+
const uint8_t* data, size_t data_size, int* width, int* height);
|
|
53
53
|
|
|
54
54
|
// Decodes WebP images pointed to by 'data' and returns RGBA samples, along
|
|
55
55
|
// with the dimensions in *width and *height. The ordering of samples in
|
|
56
56
|
// memory is R, G, B, A, R, G, B, A... in scan order (endian-independent).
|
|
57
57
|
// The returned pointer should be deleted calling WebPFree().
|
|
58
58
|
// Returns NULL in case of error.
|
|
59
|
-
WEBP_EXTERN uint8_t* WebPDecodeRGBA(
|
|
60
|
-
|
|
59
|
+
WEBP_NODISCARD WEBP_EXTERN uint8_t* WebPDecodeRGBA(
|
|
60
|
+
const uint8_t* data, size_t data_size, int* width, int* height);
|
|
61
61
|
|
|
62
62
|
// Same as WebPDecodeRGBA, but returning A, R, G, B, A, R, G, B... ordered data.
|
|
63
|
-
WEBP_EXTERN uint8_t* WebPDecodeARGB(
|
|
64
|
-
|
|
63
|
+
WEBP_NODISCARD WEBP_EXTERN uint8_t* WebPDecodeARGB(
|
|
64
|
+
const uint8_t* data, size_t data_size, int* width, int* height);
|
|
65
65
|
|
|
66
66
|
// Same as WebPDecodeRGBA, but returning B, G, R, A, B, G, R, A... ordered data.
|
|
67
|
-
WEBP_EXTERN uint8_t* WebPDecodeBGRA(
|
|
68
|
-
|
|
67
|
+
WEBP_NODISCARD WEBP_EXTERN uint8_t* WebPDecodeBGRA(
|
|
68
|
+
const uint8_t* data, size_t data_size, int* width, int* height);
|
|
69
69
|
|
|
70
70
|
// Same as WebPDecodeRGBA, but returning R, G, B, R, G, B... ordered data.
|
|
71
71
|
// If the bitstream contains transparency, it is ignored.
|
|
72
|
-
WEBP_EXTERN uint8_t* WebPDecodeRGB(
|
|
73
|
-
|
|
72
|
+
WEBP_NODISCARD WEBP_EXTERN uint8_t* WebPDecodeRGB(
|
|
73
|
+
const uint8_t* data, size_t data_size, int* width, int* height);
|
|
74
74
|
|
|
75
75
|
// Same as WebPDecodeRGB, but returning B, G, R, B, G, R... ordered data.
|
|
76
|
-
WEBP_EXTERN uint8_t* WebPDecodeBGR(
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
WEBP_NODISCARD WEBP_EXTERN uint8_t* WebPDecodeBGR(
|
|
77
|
+
const uint8_t* data, size_t data_size, int* width, int* height);
|
|
79
78
|
|
|
80
79
|
// Decode WebP images pointed to by 'data' to Y'UV format(*). The pointer
|
|
81
80
|
// returned is the Y samples buffer. Upon return, *u and *v will point to
|
|
@@ -87,10 +86,9 @@ WEBP_EXTERN uint8_t* WebPDecodeBGR(const uint8_t* data, size_t data_size,
|
|
|
87
86
|
// 'width' and 'height' may be NULL, the other pointers must not be.
|
|
88
87
|
// Returns NULL in case of error.
|
|
89
88
|
// (*) Also named Y'CbCr. See: https://en.wikipedia.org/wiki/YCbCr
|
|
90
|
-
WEBP_EXTERN uint8_t* WebPDecodeYUV(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
int* stride, int* uv_stride);
|
|
89
|
+
WEBP_NODISCARD WEBP_EXTERN uint8_t* WebPDecodeYUV(
|
|
90
|
+
const uint8_t* data, size_t data_size, int* width, int* height,
|
|
91
|
+
uint8_t** u, uint8_t** v, int* stride, int* uv_stride);
|
|
94
92
|
|
|
95
93
|
// These five functions are variants of the above ones, that decode the image
|
|
96
94
|
// directly into a pre-allocated buffer 'output_buffer'. The maximum storage
|
|
@@ -100,22 +98,22 @@ WEBP_EXTERN uint8_t* WebPDecodeYUV(const uint8_t* data, size_t data_size,
|
|
|
100
98
|
// The parameter 'output_stride' specifies the distance (in bytes)
|
|
101
99
|
// between scanlines. Hence, output_buffer_size is expected to be at least
|
|
102
100
|
// output_stride x picture-height.
|
|
103
|
-
WEBP_EXTERN uint8_t* WebPDecodeRGBAInto(
|
|
101
|
+
WEBP_NODISCARD WEBP_EXTERN uint8_t* WebPDecodeRGBAInto(
|
|
104
102
|
const uint8_t* data, size_t data_size,
|
|
105
103
|
uint8_t* output_buffer, size_t output_buffer_size, int output_stride);
|
|
106
|
-
WEBP_EXTERN uint8_t* WebPDecodeARGBInto(
|
|
104
|
+
WEBP_NODISCARD WEBP_EXTERN uint8_t* WebPDecodeARGBInto(
|
|
107
105
|
const uint8_t* data, size_t data_size,
|
|
108
106
|
uint8_t* output_buffer, size_t output_buffer_size, int output_stride);
|
|
109
|
-
WEBP_EXTERN uint8_t* WebPDecodeBGRAInto(
|
|
107
|
+
WEBP_NODISCARD WEBP_EXTERN uint8_t* WebPDecodeBGRAInto(
|
|
110
108
|
const uint8_t* data, size_t data_size,
|
|
111
109
|
uint8_t* output_buffer, size_t output_buffer_size, int output_stride);
|
|
112
110
|
|
|
113
111
|
// RGB and BGR variants. Here too the transparency information, if present,
|
|
114
112
|
// will be dropped and ignored.
|
|
115
|
-
WEBP_EXTERN uint8_t* WebPDecodeRGBInto(
|
|
113
|
+
WEBP_NODISCARD WEBP_EXTERN uint8_t* WebPDecodeRGBInto(
|
|
116
114
|
const uint8_t* data, size_t data_size,
|
|
117
115
|
uint8_t* output_buffer, size_t output_buffer_size, int output_stride);
|
|
118
|
-
WEBP_EXTERN uint8_t* WebPDecodeBGRInto(
|
|
116
|
+
WEBP_NODISCARD WEBP_EXTERN uint8_t* WebPDecodeBGRInto(
|
|
119
117
|
const uint8_t* data, size_t data_size,
|
|
120
118
|
uint8_t* output_buffer, size_t output_buffer_size, int output_stride);
|
|
121
119
|
|
|
@@ -126,7 +124,7 @@ WEBP_EXTERN uint8_t* WebPDecodeBGRInto(
|
|
|
126
124
|
// 'u_size' and 'v_size' respectively.
|
|
127
125
|
// Pointer to the luma plane ('*luma') is returned or NULL if an error occurred
|
|
128
126
|
// during decoding (or because some buffers were found to be too small).
|
|
129
|
-
WEBP_EXTERN uint8_t* WebPDecodeYUVInto(
|
|
127
|
+
WEBP_NODISCARD WEBP_EXTERN uint8_t* WebPDecodeYUVInto(
|
|
130
128
|
const uint8_t* data, size_t data_size,
|
|
131
129
|
uint8_t* luma, size_t luma_size, int luma_stride,
|
|
132
130
|
uint8_t* u, size_t u_size, int u_stride,
|
|
@@ -217,11 +215,11 @@ struct WebPDecBuffer {
|
|
|
217
215
|
};
|
|
218
216
|
|
|
219
217
|
// Internal, version-checked, entry point
|
|
220
|
-
WEBP_EXTERN int WebPInitDecBufferInternal(WebPDecBuffer*, int);
|
|
218
|
+
WEBP_NODISCARD WEBP_EXTERN int WebPInitDecBufferInternal(WebPDecBuffer*, int);
|
|
221
219
|
|
|
222
220
|
// Initialize the structure as empty. Must be called before any other use.
|
|
223
221
|
// Returns false in case of version mismatch
|
|
224
|
-
static WEBP_INLINE int WebPInitDecBuffer(WebPDecBuffer* buffer) {
|
|
222
|
+
WEBP_NODISCARD static WEBP_INLINE int WebPInitDecBuffer(WebPDecBuffer* buffer) {
|
|
225
223
|
return WebPInitDecBufferInternal(buffer, WEBP_DECODER_ABI_VERSION);
|
|
226
224
|
}
|
|
227
225
|
|
|
@@ -232,7 +230,7 @@ WEBP_EXTERN void WebPFreeDecBuffer(WebPDecBuffer* buffer);
|
|
|
232
230
|
//------------------------------------------------------------------------------
|
|
233
231
|
// Enumeration of the status codes
|
|
234
232
|
|
|
235
|
-
typedef enum VP8StatusCode {
|
|
233
|
+
typedef enum WEBP_NODISCARD VP8StatusCode {
|
|
236
234
|
VP8_STATUS_OK = 0,
|
|
237
235
|
VP8_STATUS_OUT_OF_MEMORY,
|
|
238
236
|
VP8_STATUS_INVALID_PARAM,
|
|
@@ -251,23 +249,24 @@ typedef enum VP8StatusCode {
|
|
|
251
249
|
// WebPIDecoder object. This object can be left in a SUSPENDED state if the
|
|
252
250
|
// picture is only partially decoded, pending additional input.
|
|
253
251
|
// Code example:
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
//
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
//
|
|
267
|
-
//
|
|
268
|
-
//
|
|
269
|
-
|
|
270
|
-
|
|
252
|
+
/*
|
|
253
|
+
WebPInitDecBuffer(&output_buffer);
|
|
254
|
+
output_buffer.colorspace = mode;
|
|
255
|
+
...
|
|
256
|
+
WebPIDecoder* idec = WebPINewDecoder(&output_buffer);
|
|
257
|
+
while (additional_data_is_available) {
|
|
258
|
+
// ... (get additional data in some new_data[] buffer)
|
|
259
|
+
status = WebPIAppend(idec, new_data, new_data_size);
|
|
260
|
+
if (status != VP8_STATUS_OK && status != VP8_STATUS_SUSPENDED) {
|
|
261
|
+
break; // an error occurred.
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// The above call decodes the current available buffer.
|
|
265
|
+
// Part of the image can now be refreshed by calling
|
|
266
|
+
// WebPIDecGetRGB()/WebPIDecGetYUVA() etc.
|
|
267
|
+
}
|
|
268
|
+
WebPIDelete(idec);
|
|
269
|
+
*/
|
|
271
270
|
|
|
272
271
|
// Creates a new incremental decoder with the supplied buffer parameter.
|
|
273
272
|
// This output_buffer can be passed NULL, in which case a default output buffer
|
|
@@ -281,7 +280,8 @@ typedef enum VP8StatusCode {
|
|
|
281
280
|
// within valid bounds.
|
|
282
281
|
// All other fields of WebPDecBuffer MUST remain constant between calls.
|
|
283
282
|
// Returns NULL if the allocation failed.
|
|
284
|
-
WEBP_EXTERN WebPIDecoder* WebPINewDecoder(
|
|
283
|
+
WEBP_NODISCARD WEBP_EXTERN WebPIDecoder* WebPINewDecoder(
|
|
284
|
+
WebPDecBuffer* output_buffer);
|
|
285
285
|
|
|
286
286
|
// This function allocates and initializes an incremental-decoder object, which
|
|
287
287
|
// will output the RGB/A samples specified by 'csp' into a preallocated
|
|
@@ -293,7 +293,7 @@ WEBP_EXTERN WebPIDecoder* WebPINewDecoder(WebPDecBuffer* output_buffer);
|
|
|
293
293
|
// colorspace 'csp' is taken into account for allocating this buffer. All other
|
|
294
294
|
// parameters are ignored.
|
|
295
295
|
// Returns NULL if the allocation failed, or if some parameters are invalid.
|
|
296
|
-
WEBP_EXTERN WebPIDecoder* WebPINewRGB(
|
|
296
|
+
WEBP_NODISCARD WEBP_EXTERN WebPIDecoder* WebPINewRGB(
|
|
297
297
|
WEBP_CSP_MODE csp,
|
|
298
298
|
uint8_t* output_buffer, size_t output_buffer_size, int output_stride);
|
|
299
299
|
|
|
@@ -308,7 +308,7 @@ WEBP_EXTERN WebPIDecoder* WebPINewRGB(
|
|
|
308
308
|
// In this case, the output buffer will be automatically allocated (using
|
|
309
309
|
// MODE_YUVA) when decoding starts. All parameters are then ignored.
|
|
310
310
|
// Returns NULL if the allocation failed or if a parameter is invalid.
|
|
311
|
-
WEBP_EXTERN WebPIDecoder* WebPINewYUVA(
|
|
311
|
+
WEBP_NODISCARD WEBP_EXTERN WebPIDecoder* WebPINewYUVA(
|
|
312
312
|
uint8_t* luma, size_t luma_size, int luma_stride,
|
|
313
313
|
uint8_t* u, size_t u_size, int u_stride,
|
|
314
314
|
uint8_t* v, size_t v_size, int v_stride,
|
|
@@ -316,7 +316,7 @@ WEBP_EXTERN WebPIDecoder* WebPINewYUVA(
|
|
|
316
316
|
|
|
317
317
|
// Deprecated version of the above, without the alpha plane.
|
|
318
318
|
// Kept for backward compatibility.
|
|
319
|
-
WEBP_EXTERN WebPIDecoder* WebPINewYUV(
|
|
319
|
+
WEBP_NODISCARD WEBP_EXTERN WebPIDecoder* WebPINewYUV(
|
|
320
320
|
uint8_t* luma, size_t luma_size, int luma_stride,
|
|
321
321
|
uint8_t* u, size_t u_size, int u_stride,
|
|
322
322
|
uint8_t* v, size_t v_size, int v_stride);
|
|
@@ -346,21 +346,21 @@ WEBP_EXTERN VP8StatusCode WebPIUpdate(
|
|
|
346
346
|
// (*last_y, *width etc.) can be NULL if corresponding information is not
|
|
347
347
|
// needed. The values in these pointers are only valid on successful (non-NULL)
|
|
348
348
|
// return.
|
|
349
|
-
WEBP_EXTERN uint8_t* WebPIDecGetRGB(
|
|
349
|
+
WEBP_NODISCARD WEBP_EXTERN uint8_t* WebPIDecGetRGB(
|
|
350
350
|
const WebPIDecoder* idec, int* last_y,
|
|
351
351
|
int* width, int* height, int* stride);
|
|
352
352
|
|
|
353
353
|
// Same as above function to get a YUVA image. Returns pointer to the luma
|
|
354
354
|
// plane or NULL in case of error. If there is no alpha information
|
|
355
355
|
// the alpha pointer '*a' will be returned NULL.
|
|
356
|
-
WEBP_EXTERN uint8_t* WebPIDecGetYUVA(
|
|
356
|
+
WEBP_NODISCARD WEBP_EXTERN uint8_t* WebPIDecGetYUVA(
|
|
357
357
|
const WebPIDecoder* idec, int* last_y,
|
|
358
358
|
uint8_t** u, uint8_t** v, uint8_t** a,
|
|
359
359
|
int* width, int* height, int* stride, int* uv_stride, int* a_stride);
|
|
360
360
|
|
|
361
361
|
// Deprecated alpha-less version of WebPIDecGetYUVA(): it will ignore the
|
|
362
362
|
// alpha information (if present). Kept for backward compatibility.
|
|
363
|
-
static WEBP_INLINE uint8_t* WebPIDecGetYUV(
|
|
363
|
+
WEBP_NODISCARD static WEBP_INLINE uint8_t* WebPIDecGetYUV(
|
|
364
364
|
const WebPIDecoder* idec, int* last_y, uint8_t** u, uint8_t** v,
|
|
365
365
|
int* width, int* height, int* stride, int* uv_stride) {
|
|
366
366
|
return WebPIDecGetYUVA(idec, last_y, u, v, NULL, width, height,
|
|
@@ -373,7 +373,7 @@ static WEBP_INLINE uint8_t* WebPIDecGetYUV(
|
|
|
373
373
|
// Returns NULL in case the incremental decoder object is in an invalid state.
|
|
374
374
|
// Otherwise returns the pointer to the internal representation. This structure
|
|
375
375
|
// is read-only, tied to WebPIDecoder's lifespan and should not be modified.
|
|
376
|
-
WEBP_EXTERN const WebPDecBuffer* WebPIDecodedArea(
|
|
376
|
+
WEBP_NODISCARD WEBP_EXTERN const WebPDecBuffer* WebPIDecodedArea(
|
|
377
377
|
const WebPIDecoder* idec, int* left, int* top, int* width, int* height);
|
|
378
378
|
|
|
379
379
|
//------------------------------------------------------------------------------
|
|
@@ -389,7 +389,7 @@ WEBP_EXTERN const WebPDecBuffer* WebPIDecodedArea(
|
|
|
389
389
|
CHECK(WebPGetFeatures(data, data_size, &config.input) == VP8_STATUS_OK);
|
|
390
390
|
|
|
391
391
|
// C) Adjust 'config', if needed
|
|
392
|
-
config.no_fancy_upsampling = 1;
|
|
392
|
+
config.options.no_fancy_upsampling = 1;
|
|
393
393
|
config.output.colorspace = MODE_BGRA;
|
|
394
394
|
// etc.
|
|
395
395
|
|
|
@@ -468,12 +468,14 @@ struct WebPDecoderConfig {
|
|
|
468
468
|
};
|
|
469
469
|
|
|
470
470
|
// Internal, version-checked, entry point
|
|
471
|
-
WEBP_EXTERN int WebPInitDecoderConfigInternal(WebPDecoderConfig*,
|
|
471
|
+
WEBP_NODISCARD WEBP_EXTERN int WebPInitDecoderConfigInternal(WebPDecoderConfig*,
|
|
472
|
+
int);
|
|
472
473
|
|
|
473
474
|
// Initialize the configuration as empty. This function must always be
|
|
474
475
|
// called first, unless WebPGetFeatures() is to be called.
|
|
475
476
|
// Returns false in case of mismatched version.
|
|
476
|
-
static WEBP_INLINE int WebPInitDecoderConfig(
|
|
477
|
+
WEBP_NODISCARD static WEBP_INLINE int WebPInitDecoderConfig(
|
|
478
|
+
WebPDecoderConfig* config) {
|
|
477
479
|
return WebPInitDecoderConfigInternal(config, WEBP_DECODER_ABI_VERSION);
|
|
478
480
|
}
|
|
479
481
|
|
|
@@ -488,8 +490,8 @@ static WEBP_INLINE int WebPInitDecoderConfig(WebPDecoderConfig* config) {
|
|
|
488
490
|
// The return WebPIDecoder object must always be deleted calling WebPIDelete().
|
|
489
491
|
// Returns NULL in case of error (and config->status will then reflect
|
|
490
492
|
// the error condition, if available).
|
|
491
|
-
WEBP_EXTERN WebPIDecoder* WebPIDecode(
|
|
492
|
-
|
|
493
|
+
WEBP_NODISCARD WEBP_EXTERN WebPIDecoder* WebPIDecode(
|
|
494
|
+
const uint8_t* data, size_t data_size, WebPDecoderConfig* config);
|
|
493
495
|
|
|
494
496
|
// Non-incremental version. This version decodes the full data at once, taking
|
|
495
497
|
// 'config' into account. Returns decoding status (which should be VP8_STATUS_OK
|