@img/sharp-libvips-dev-wasm32 1.3.0-rc.3 → 1.3.0-rc.5
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/expat.h +1 -1
- package/include/expat_config.h +3 -3
- package/include/expat_external.h +1 -1
- package/include/glib-2.0/glib/gslice.h +12 -4
- package/include/libheif/heif_aux_images.h +2 -2
- package/include/libheif/heif_brands.h +13 -4
- package/include/libheif/heif_color.h +14 -14
- package/include/libheif/heif_context.h +17 -4
- package/include/libheif/heif_decoding.h +2 -2
- package/include/libheif/heif_encoding.h +29 -5
- package/include/libheif/heif_error.h +4 -4
- package/include/libheif/heif_image.h +52 -8
- package/include/libheif/heif_image_handle.h +42 -0
- package/include/libheif/heif_library.h +2 -2
- package/include/libheif/heif_metadata.h +2 -2
- package/include/libheif/heif_plugin.h +4 -4
- package/include/libheif/heif_properties.h +16 -4
- package/include/libheif/heif_regions.h +2 -2
- package/include/libheif/heif_security.h +5 -0
- package/include/libheif/heif_sequences.h +10 -10
- package/include/libheif/heif_uncompressed.h +327 -23
- package/include/libheif/heif_uncompressed_types.h +143 -0
- package/include/libpng16/png.h +8 -8
- package/include/libpng16/pngconf.h +1 -1
- package/include/libpng16/pnglibconf.h +1 -1
- package/include/png.h +8 -8
- package/include/pngconf.h +1 -1
- package/include/pnglibconf.h +1 -1
- package/include/vips/version.h +4 -4
- 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/libpng.a +0 -0
- package/lib/libpng.la +2 -2
- package/lib/libpng16.a +0 -0
- package/lib/libpng16.la +2 -2
- package/lib/libresvg.a +0 -0
- package/lib/libsharpyuv.a +0 -0
- package/lib/libtiff.a +0 -0
- package/lib/libuhdr.a +0 -0
- package/lib/libvips-cpp.a +0 -0
- package/lib/libvips.a +0 -0
- package/lib/libwebp.a +0 -0
- package/lib/libwebpdemux.a +0 -0
- package/lib/libwebpmux.a +0 -0
- 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 -1
- package/lib/pkgconfig/libpng.pc +1 -1
- package/lib/pkgconfig/libpng16.pc +1 -1
- package/lib/pkgconfig/vips-cpp.pc +1 -1
- package/lib/pkgconfig/vips.pc +1 -1
- package/package.json +1 -1
- package/versions.json +8 -8
package/include/expat.h
CHANGED
|
@@ -1082,7 +1082,7 @@ XML_SetReparseDeferralEnabled(XML_Parser parser, XML_Bool enabled);
|
|
|
1082
1082
|
*/
|
|
1083
1083
|
# define XML_MAJOR_VERSION 2
|
|
1084
1084
|
# define XML_MINOR_VERSION 7
|
|
1085
|
-
# define XML_MICRO_VERSION
|
|
1085
|
+
# define XML_MICRO_VERSION 5
|
|
1086
1086
|
|
|
1087
1087
|
# ifdef __cplusplus
|
|
1088
1088
|
}
|
package/include/expat_config.h
CHANGED
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
#define PACKAGE_NAME "expat"
|
|
81
81
|
|
|
82
82
|
/* Define to the full name and version of this package. */
|
|
83
|
-
#define PACKAGE_STRING "expat 2.7.
|
|
83
|
+
#define PACKAGE_STRING "expat 2.7.5"
|
|
84
84
|
|
|
85
85
|
/* Define to the one symbol short name of this package. */
|
|
86
86
|
#define PACKAGE_TARNAME "expat"
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
#define PACKAGE_URL ""
|
|
90
90
|
|
|
91
91
|
/* Define to the version of this package. */
|
|
92
|
-
#define PACKAGE_VERSION "2.7.
|
|
92
|
+
#define PACKAGE_VERSION "2.7.5"
|
|
93
93
|
|
|
94
94
|
/* Define to 1 if all of the C89 standard headers exist (not just the ones
|
|
95
95
|
required in a freestanding environment). This macro is provided for
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
#define STDC_HEADERS 1
|
|
98
98
|
|
|
99
99
|
/* Version number of package */
|
|
100
|
-
#define VERSION "2.7.
|
|
100
|
+
#define VERSION "2.7.5"
|
|
101
101
|
|
|
102
102
|
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
|
103
103
|
significant byte first (like Motorola and SPARC, unlike Intel). */
|
package/include/expat_external.h
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
Copyright (c) 2001-2002 Greg Stein <gstein@users.sourceforge.net>
|
|
13
13
|
Copyright (c) 2002-2006 Karl Waclawek <karl@waclawek.net>
|
|
14
14
|
Copyright (c) 2016 Cristian Rodríguez <crrodriguez@opensuse.org>
|
|
15
|
-
Copyright (c) 2016-
|
|
15
|
+
Copyright (c) 2016-2026 Sebastian Pipping <sebastian@pipping.org>
|
|
16
16
|
Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk>
|
|
17
17
|
Copyright (c) 2018 Yury Gribov <tetra2005@gmail.com>
|
|
18
18
|
Licensed under the MIT license:
|
|
@@ -45,21 +45,29 @@ GLIB_AVAILABLE_IN_ALL
|
|
|
45
45
|
void g_slice_free_chain_with_offset (gsize block_size,
|
|
46
46
|
gpointer mem_chain,
|
|
47
47
|
gsize next_offset);
|
|
48
|
-
|
|
48
|
+
|
|
49
|
+
#ifndef __GI_SCANNER__
|
|
50
|
+
/* Private helper to give the allocation size for a struct — we want to
|
|
51
|
+
* guarantee non-empty allocations, so it returns a minimum of 1B. This is
|
|
52
|
+
* necessary because some compilers do allow empty (zero size) structs. */
|
|
53
|
+
#define g_slice_alloc_size(type) (sizeof (type) > 0 ? sizeof (type) : 1)
|
|
54
|
+
#endif
|
|
55
|
+
|
|
56
|
+
#define g_slice_new(type) ((type*) g_slice_alloc (g_slice_alloc_size (type)))
|
|
49
57
|
|
|
50
58
|
/* Allow the compiler to inline memset(). Since the size is a constant, this
|
|
51
59
|
* can significantly improve performance. */
|
|
52
60
|
#if defined (__GNUC__) && (__GNUC__ >= 2) && defined (__OPTIMIZE__)
|
|
53
61
|
# define g_slice_new0(type) \
|
|
54
62
|
(type *) (G_GNUC_EXTENSION ({ \
|
|
55
|
-
gsize __s =
|
|
63
|
+
gsize __s = g_slice_alloc_size (type); \
|
|
56
64
|
gpointer __p; \
|
|
57
65
|
__p = g_slice_alloc (__s); \
|
|
58
66
|
memset (__p, 0, __s); \
|
|
59
67
|
__p; \
|
|
60
68
|
}))
|
|
61
69
|
#else
|
|
62
|
-
# define g_slice_new0(type) ((type*) g_slice_alloc0 (
|
|
70
|
+
# define g_slice_new0(type) ((type*) g_slice_alloc0 (g_slice_alloc_size (type)))
|
|
63
71
|
#endif
|
|
64
72
|
|
|
65
73
|
/* MemoryBlockType *
|
|
@@ -76,7 +84,7 @@ void g_slice_free_chain_with_offset (gsize block_size,
|
|
|
76
84
|
|
|
77
85
|
/* we go through extra hoops to ensure type safety */
|
|
78
86
|
#define g_slice_dup(type, mem) \
|
|
79
|
-
(1 ? (type*) g_slice_copy (
|
|
87
|
+
(1 ? (type*) g_slice_copy (g_slice_alloc_size (type), (mem)) \
|
|
80
88
|
: ((void) ((type*) 0 == (mem)), (type*) 0))
|
|
81
89
|
#define g_slice_free(type, mem) \
|
|
82
90
|
G_STMT_START { \
|
|
@@ -51,12 +51,12 @@ heif_error heif_image_handle_get_depth_image_handle(const heif_image_handle* han
|
|
|
51
51
|
heif_image_handle** out_depth_handle);
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
enum heif_depth_representation_type {
|
|
54
|
+
typedef enum heif_depth_representation_type {
|
|
55
55
|
heif_depth_representation_type_uniform_inverse_Z = 0,
|
|
56
56
|
heif_depth_representation_type_uniform_disparity = 1,
|
|
57
57
|
heif_depth_representation_type_uniform_Z = 2,
|
|
58
58
|
heif_depth_representation_type_nonuniform_disparity = 3
|
|
59
|
-
};
|
|
59
|
+
} heif_depth_representation_type;
|
|
60
60
|
|
|
61
61
|
typedef struct heif_depth_representation_info {
|
|
62
62
|
uint8_t version;
|
|
@@ -250,6 +250,15 @@ typedef uint32_t heif_brand2;
|
|
|
250
250
|
#define heif_brand2_avci heif_fourcc('a','v','c','i')
|
|
251
251
|
#define heif_brand2_avcs heif_fourcc('a','v','c','s')
|
|
252
252
|
|
|
253
|
+
/**
|
|
254
|
+
* Unified ID namespace (`unif`) brand.
|
|
255
|
+
*
|
|
256
|
+
* All IDs (item, track, entity group) share a single global namespace.
|
|
257
|
+
*
|
|
258
|
+
* See ISO/IEC 14496-12.
|
|
259
|
+
*/
|
|
260
|
+
#define heif_brand2_unif heif_fourcc('u','n','i','f')
|
|
261
|
+
|
|
253
262
|
#define heif_brand2_iso8 heif_fourcc('i','s','o','8')
|
|
254
263
|
#define heif_brand2_isom heif_fourcc('i','s','o','m')
|
|
255
264
|
#define heif_brand2_mp41 heif_fourcc('m','p','4','1')
|
|
@@ -311,13 +320,13 @@ const char* heif_get_file_mime_type(const uint8_t* data, int len);
|
|
|
311
320
|
|
|
312
321
|
// ========================= file type check ======================
|
|
313
322
|
|
|
314
|
-
enum heif_filetype_result
|
|
323
|
+
typedef enum heif_filetype_result
|
|
315
324
|
{
|
|
316
325
|
heif_filetype_no,
|
|
317
326
|
heif_filetype_yes_supported, // it is heif and can be read by libheif
|
|
318
327
|
heif_filetype_yes_unsupported, // it is heif, but cannot be read by libheif
|
|
319
328
|
heif_filetype_maybe // not sure whether it is an heif, try detection with more input data
|
|
320
|
-
};
|
|
329
|
+
} heif_filetype_result;
|
|
321
330
|
|
|
322
331
|
// input data should be at least 12 bytes
|
|
323
332
|
LIBHEIF_API
|
|
@@ -342,7 +351,7 @@ int heif_check_jpeg_filetype(const uint8_t* data, int len);
|
|
|
342
351
|
// ===================== DEPRECATED =====================
|
|
343
352
|
|
|
344
353
|
// DEPRECATED, use heif_brand2 and the heif_brand2_* constants instead
|
|
345
|
-
enum heif_brand
|
|
354
|
+
typedef enum heif_brand
|
|
346
355
|
{
|
|
347
356
|
heif_unknown_brand,
|
|
348
357
|
heif_heic, // HEIF image with h265
|
|
@@ -362,7 +371,7 @@ enum heif_brand
|
|
|
362
371
|
heif_evbs, // EVC sequence
|
|
363
372
|
heif_j2ki, // JPEG2000 image
|
|
364
373
|
heif_j2is, // JPEG2000 image sequence
|
|
365
|
-
};
|
|
374
|
+
} heif_brand;
|
|
366
375
|
|
|
367
376
|
// input data should be at least 12 bytes
|
|
368
377
|
// DEPRECATED, use heif_read_main_brand() instead
|
|
@@ -31,7 +31,7 @@ extern "C" {
|
|
|
31
31
|
typedef struct heif_image heif_image;
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
enum heif_chroma_downsampling_algorithm
|
|
34
|
+
typedef enum heif_chroma_downsampling_algorithm
|
|
35
35
|
{
|
|
36
36
|
heif_chroma_downsampling_nearest_neighbor = 1,
|
|
37
37
|
heif_chroma_downsampling_average = 2,
|
|
@@ -39,13 +39,13 @@ enum heif_chroma_downsampling_algorithm
|
|
|
39
39
|
// Combine with 'heif_chroma_upsampling_bilinear' for best quality.
|
|
40
40
|
// Makes edges look sharper when using YUV 420 with bilinear chroma upsampling.
|
|
41
41
|
heif_chroma_downsampling_sharp_yuv = 3
|
|
42
|
-
};
|
|
42
|
+
} heif_chroma_downsampling_algorithm;
|
|
43
43
|
|
|
44
|
-
enum heif_chroma_upsampling_algorithm
|
|
44
|
+
typedef enum heif_chroma_upsampling_algorithm
|
|
45
45
|
{
|
|
46
46
|
heif_chroma_upsampling_nearest_neighbor = 1,
|
|
47
47
|
heif_chroma_upsampling_bilinear = 2
|
|
48
|
-
};
|
|
48
|
+
} heif_chroma_upsampling_algorithm;
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
typedef struct heif_color_conversion_options
|
|
@@ -71,12 +71,12 @@ typedef struct heif_color_conversion_options
|
|
|
71
71
|
} heif_color_conversion_options;
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
enum heif_alpha_composition_mode
|
|
74
|
+
typedef enum heif_alpha_composition_mode
|
|
75
75
|
{
|
|
76
76
|
heif_alpha_composition_mode_none,
|
|
77
77
|
heif_alpha_composition_mode_solid_color,
|
|
78
78
|
heif_alpha_composition_mode_checkerboard,
|
|
79
|
-
};
|
|
79
|
+
} heif_alpha_composition_mode;
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
typedef struct heif_color_conversion_options_ext
|
|
@@ -111,13 +111,13 @@ void heif_color_conversion_options_ext_free(heif_color_conversion_options_ext*);
|
|
|
111
111
|
|
|
112
112
|
// ------------------------- color profiles -------------------------
|
|
113
113
|
|
|
114
|
-
enum heif_color_profile_type
|
|
114
|
+
typedef enum heif_color_profile_type
|
|
115
115
|
{
|
|
116
116
|
heif_color_profile_type_not_present = 0,
|
|
117
117
|
heif_color_profile_type_nclx = heif_fourcc('n', 'c', 'l', 'x'),
|
|
118
118
|
heif_color_profile_type_rICC = heif_fourcc('r', 'I', 'C', 'C'),
|
|
119
119
|
heif_color_profile_type_prof = heif_fourcc('p', 'r', 'o', 'f')
|
|
120
|
-
};
|
|
120
|
+
} heif_color_profile_type;
|
|
121
121
|
|
|
122
122
|
|
|
123
123
|
// Returns 'heif_color_profile_type_not_present' if there is no color profile.
|
|
@@ -137,7 +137,7 @@ struct heif_error heif_image_handle_get_raw_color_profile(const heif_image_handl
|
|
|
137
137
|
void* out_data);
|
|
138
138
|
|
|
139
139
|
|
|
140
|
-
enum heif_color_primaries
|
|
140
|
+
typedef enum heif_color_primaries
|
|
141
141
|
{
|
|
142
142
|
heif_color_primaries_ITU_R_BT_709_5 = 1, // g=0.3;0.6, b=0.15;0.06, r=0.64;0.33, w=0.3127,0.3290
|
|
143
143
|
heif_color_primaries_unspecified = 2,
|
|
@@ -151,9 +151,9 @@ enum heif_color_primaries
|
|
|
151
151
|
heif_color_primaries_SMPTE_RP_431_2 = 11,
|
|
152
152
|
heif_color_primaries_SMPTE_EG_432_1 = 12,
|
|
153
153
|
heif_color_primaries_EBU_Tech_3213_E = 22
|
|
154
|
-
};
|
|
154
|
+
} heif_color_primaries;
|
|
155
155
|
|
|
156
|
-
enum heif_transfer_characteristics
|
|
156
|
+
typedef enum heif_transfer_characteristics
|
|
157
157
|
{
|
|
158
158
|
heif_transfer_characteristic_ITU_R_BT_709_5 = 1,
|
|
159
159
|
heif_transfer_characteristic_unspecified = 2,
|
|
@@ -172,9 +172,9 @@ enum heif_transfer_characteristics
|
|
|
172
172
|
heif_transfer_characteristic_ITU_R_BT_2100_0_PQ = 16,
|
|
173
173
|
heif_transfer_characteristic_SMPTE_ST_428_1 = 17,
|
|
174
174
|
heif_transfer_characteristic_ITU_R_BT_2100_0_HLG = 18
|
|
175
|
-
};
|
|
175
|
+
} heif_transfer_characteristics;
|
|
176
176
|
|
|
177
|
-
enum heif_matrix_coefficients
|
|
177
|
+
typedef enum heif_matrix_coefficients
|
|
178
178
|
{
|
|
179
179
|
heif_matrix_coefficients_RGB_GBR = 0,
|
|
180
180
|
heif_matrix_coefficients_ITU_R_BT_709_5 = 1, // TODO: or 709-6 according to h.273
|
|
@@ -190,7 +190,7 @@ enum heif_matrix_coefficients
|
|
|
190
190
|
heif_matrix_coefficients_chromaticity_derived_non_constant_luminance = 12,
|
|
191
191
|
heif_matrix_coefficients_chromaticity_derived_constant_luminance = 13,
|
|
192
192
|
heif_matrix_coefficients_ICtCp = 14
|
|
193
|
-
};
|
|
193
|
+
} heif_matrix_coefficients;
|
|
194
194
|
|
|
195
195
|
typedef struct heif_color_profile_nclx
|
|
196
196
|
{
|
|
@@ -35,7 +35,7 @@ extern "C" {
|
|
|
35
35
|
/**
|
|
36
36
|
* libheif known compression formats.
|
|
37
37
|
*/
|
|
38
|
-
enum heif_compression_format
|
|
38
|
+
typedef enum heif_compression_format
|
|
39
39
|
{
|
|
40
40
|
/**
|
|
41
41
|
* Unspecified / undefined compression format.
|
|
@@ -115,7 +115,7 @@ enum heif_compression_format
|
|
|
115
115
|
* The core encoding is defined in ISO/IEC 15444-15, or ITU-T T.814.
|
|
116
116
|
*/
|
|
117
117
|
heif_compression_HTJ2K = 10
|
|
118
|
-
};
|
|
118
|
+
} heif_compression_format;
|
|
119
119
|
|
|
120
120
|
|
|
121
121
|
// ========================= heif_context =========================
|
|
@@ -136,13 +136,13 @@ void heif_context_free(heif_context*);
|
|
|
136
136
|
|
|
137
137
|
typedef struct heif_reading_options heif_reading_options;
|
|
138
138
|
|
|
139
|
-
enum heif_reader_grow_status
|
|
139
|
+
typedef enum heif_reader_grow_status
|
|
140
140
|
{
|
|
141
141
|
heif_reader_grow_status_size_reached, // requested size has been reached, we can read until this point
|
|
142
142
|
heif_reader_grow_status_timeout, // size has not been reached yet, but it may still grow further (deprecated)
|
|
143
143
|
heif_reader_grow_status_size_beyond_eof, // size has not been reached and never will. The file has grown to its full size
|
|
144
144
|
heif_reader_grow_status_error // an error has occurred
|
|
145
|
-
};
|
|
145
|
+
} heif_reader_grow_status;
|
|
146
146
|
|
|
147
147
|
|
|
148
148
|
typedef struct heif_reader_range_request_result
|
|
@@ -295,6 +295,19 @@ heif_error heif_context_get_image_handle(heif_context* ctx,
|
|
|
295
295
|
LIBHEIF_API
|
|
296
296
|
void heif_context_debug_dump_boxes_to_file(heif_context* ctx, int fd);
|
|
297
297
|
|
|
298
|
+
// ====================================================================================================
|
|
299
|
+
// Mini format (experimental)
|
|
300
|
+
|
|
301
|
+
// Enable writing in the compact 'mini' box format (ISO/IEC 23008-12 DAmd2).
|
|
302
|
+
// When enabled, the output file will use a single 'mini' box instead of the standard
|
|
303
|
+
// meta+mdat box structure, if the file content is compatible with the mini format.
|
|
304
|
+
// If the content cannot be represented as a mini box, the standard format is used as fallback.
|
|
305
|
+
// Requires ENABLE_EXPERIMENTAL_MINI_FORMAT to be enabled at compile time.
|
|
306
|
+
// Default: disabled.
|
|
307
|
+
LIBHEIF_API
|
|
308
|
+
void heif_context_set_write_mini_format(heif_context*, int enable);
|
|
309
|
+
|
|
310
|
+
|
|
298
311
|
// ====================================================================================================
|
|
299
312
|
// Write the heif_context to a HEIF file
|
|
300
313
|
|
|
@@ -46,11 +46,11 @@ LIBHEIF_API
|
|
|
46
46
|
int heif_have_decoder_for_format(enum heif_compression_format format);
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
enum heif_progress_step
|
|
49
|
+
typedef enum heif_progress_step
|
|
50
50
|
{
|
|
51
51
|
heif_progress_step_total = 0,
|
|
52
52
|
heif_progress_step_load_tile = 1
|
|
53
|
-
};
|
|
53
|
+
} heif_progress_step;
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
typedef struct heif_decoding_options
|
|
@@ -33,6 +33,7 @@ extern "C" {
|
|
|
33
33
|
#include <libheif/heif_context.h>
|
|
34
34
|
#include <libheif/heif_brands.h>
|
|
35
35
|
#include <libheif/heif_color.h>
|
|
36
|
+
#include <libheif/heif_uncompressed_types.h>
|
|
36
37
|
|
|
37
38
|
|
|
38
39
|
// ----- encoder -----
|
|
@@ -146,12 +147,12 @@ LIBHEIF_API
|
|
|
146
147
|
const char* heif_encoder_parameter_get_name(const heif_encoder_parameter*);
|
|
147
148
|
|
|
148
149
|
|
|
149
|
-
enum heif_encoder_parameter_type
|
|
150
|
+
typedef enum heif_encoder_parameter_type
|
|
150
151
|
{
|
|
151
152
|
heif_encoder_parameter_type_integer = 1,
|
|
152
153
|
heif_encoder_parameter_type_boolean = 2,
|
|
153
154
|
heif_encoder_parameter_type_string = 3
|
|
154
|
-
};
|
|
155
|
+
} heif_encoder_parameter_type;
|
|
155
156
|
|
|
156
157
|
// Return the parameter type.
|
|
157
158
|
LIBHEIF_API
|
|
@@ -256,7 +257,7 @@ int heif_encoder_has_default(heif_encoder*,
|
|
|
256
257
|
|
|
257
258
|
|
|
258
259
|
// The orientation values are defined equal to the EXIF Orientation tag.
|
|
259
|
-
enum heif_orientation
|
|
260
|
+
typedef enum heif_orientation
|
|
260
261
|
{
|
|
261
262
|
heif_orientation_normal = 1,
|
|
262
263
|
heif_orientation_flip_horizontally = 2,
|
|
@@ -266,7 +267,11 @@ enum heif_orientation
|
|
|
266
267
|
heif_orientation_rotate_90_cw = 6,
|
|
267
268
|
heif_orientation_rotate_90_cw_then_flip_vertically = 7,
|
|
268
269
|
heif_orientation_rotate_270_cw = 8
|
|
269
|
-
};
|
|
270
|
+
} heif_orientation;
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
LIBHEIF_API
|
|
274
|
+
heif_orientation heif_orientation_concat(heif_orientation first, heif_orientation second);
|
|
270
275
|
|
|
271
276
|
|
|
272
277
|
typedef struct heif_encoding_options
|
|
@@ -297,7 +302,7 @@ typedef struct heif_encoding_options
|
|
|
297
302
|
// version 5 options
|
|
298
303
|
|
|
299
304
|
// libheif will generate irot/imir boxes to match these orientations
|
|
300
|
-
|
|
305
|
+
heif_orientation image_orientation;
|
|
301
306
|
|
|
302
307
|
// version 6 options
|
|
303
308
|
|
|
@@ -308,6 +313,12 @@ typedef struct heif_encoding_options
|
|
|
308
313
|
// Set this to true to use compressed form of uncC where possible.
|
|
309
314
|
uint8_t prefer_uncC_short_form;
|
|
310
315
|
|
|
316
|
+
// version 8 options
|
|
317
|
+
|
|
318
|
+
// Set this to enable compression for 'unci' images encoded through heif_context_encode_image().
|
|
319
|
+
// Default: heif_unci_compression_off
|
|
320
|
+
heif_unci_compression unci_compression;
|
|
321
|
+
|
|
311
322
|
// TODO: we should add a flag to force MIAF compatible outputs. E.g. this will put restrictions on grid tile sizes and
|
|
312
323
|
// might add a clap box when the grid output size does not match the color subsampling factors.
|
|
313
324
|
// Since some of these constraints have to be known before actually encoding the image, "forcing MIAF compatibility"
|
|
@@ -364,6 +375,19 @@ LIBHEIF_API
|
|
|
364
375
|
void heif_context_add_compatible_brand(heif_context* ctx,
|
|
365
376
|
heif_brand2 compatible_brand);
|
|
366
377
|
|
|
378
|
+
/**
|
|
379
|
+
* Enable the unified ID namespace ('unif' brand).
|
|
380
|
+
*
|
|
381
|
+
* When enabled, item IDs, track IDs, and entity group IDs share a single
|
|
382
|
+
* global counter so no ID value is reused across categories. The 'unif'
|
|
383
|
+
* compatible brand is automatically added to the output file.
|
|
384
|
+
*
|
|
385
|
+
* @param ctx the encoding context
|
|
386
|
+
* @param flag non-zero to enable, zero to disable
|
|
387
|
+
*/
|
|
388
|
+
LIBHEIF_API
|
|
389
|
+
void heif_context_set_unif(heif_context* ctx, int flag);
|
|
390
|
+
|
|
367
391
|
// --- deprecated functions ---
|
|
368
392
|
|
|
369
393
|
// DEPRECATED, typo in function name
|
|
@@ -29,7 +29,7 @@ extern "C" {
|
|
|
29
29
|
#include <stdint.h>
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
enum heif_error_code
|
|
32
|
+
typedef enum heif_error_code
|
|
33
33
|
{
|
|
34
34
|
// Everything ok, no error occurred.
|
|
35
35
|
heif_error_Ok = 0,
|
|
@@ -71,10 +71,10 @@ enum heif_error_code
|
|
|
71
71
|
heif_error_Canceled = 12,
|
|
72
72
|
|
|
73
73
|
heif_error_End_of_sequence = 13
|
|
74
|
-
};
|
|
74
|
+
} heif_error_code;
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
enum heif_suberror_code
|
|
77
|
+
typedef enum heif_suberror_code
|
|
78
78
|
{
|
|
79
79
|
// no further information available
|
|
80
80
|
heif_suberror_Unspecified = 0,
|
|
@@ -278,7 +278,7 @@ enum heif_suberror_code
|
|
|
278
278
|
heif_suberror_Plugin_is_not_loaded = 6001, // trying to remove a plugin that is not loaded
|
|
279
279
|
heif_suberror_Cannot_read_plugin_directory = 6002, // error while scanning the directory for plugins
|
|
280
280
|
heif_suberror_No_matching_decoder_installed = 6003 // no decoder found for that compression format
|
|
281
|
-
};
|
|
281
|
+
} heif_suberror_code;
|
|
282
282
|
|
|
283
283
|
|
|
284
284
|
typedef struct heif_error
|
|
@@ -31,7 +31,7 @@ extern "C" {
|
|
|
31
31
|
#include <stdint.h>
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
enum heif_chroma
|
|
34
|
+
typedef enum heif_chroma
|
|
35
35
|
{
|
|
36
36
|
heif_chroma_undefined = 99,
|
|
37
37
|
heif_chroma_monochrome = 0,
|
|
@@ -44,14 +44,14 @@ enum heif_chroma
|
|
|
44
44
|
heif_chroma_interleaved_RRGGBBAA_BE = 13, // HDR, big endian.
|
|
45
45
|
heif_chroma_interleaved_RRGGBB_LE = 14, // HDR, little endian.
|
|
46
46
|
heif_chroma_interleaved_RRGGBBAA_LE = 15 // HDR, little endian.
|
|
47
|
-
};
|
|
47
|
+
} heif_chroma;
|
|
48
48
|
|
|
49
49
|
// DEPRECATED ENUM NAMES
|
|
50
50
|
#define heif_chroma_interleaved_24bit heif_chroma_interleaved_RGB
|
|
51
51
|
#define heif_chroma_interleaved_32bit heif_chroma_interleaved_RGBA
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
enum heif_colorspace
|
|
54
|
+
typedef enum heif_colorspace
|
|
55
55
|
{
|
|
56
56
|
heif_colorspace_undefined = 99,
|
|
57
57
|
|
|
@@ -75,10 +75,12 @@ enum heif_colorspace
|
|
|
75
75
|
heif_colorspace_monochrome = 2,
|
|
76
76
|
|
|
77
77
|
// Indicates that this image has no visual channels.
|
|
78
|
-
heif_colorspace_nonvisual = 3
|
|
79
|
-
};
|
|
78
|
+
heif_colorspace_nonvisual = 3,
|
|
80
79
|
|
|
81
|
-
|
|
80
|
+
heif_colorspace_filter_array = 4
|
|
81
|
+
} heif_colorspace;
|
|
82
|
+
|
|
83
|
+
typedef enum heif_channel
|
|
82
84
|
{
|
|
83
85
|
heif_channel_Y = 0,
|
|
84
86
|
heif_channel_Cb = 1,
|
|
@@ -90,9 +92,44 @@ enum heif_channel
|
|
|
90
92
|
heif_channel_interleaved = 10,
|
|
91
93
|
heif_channel_filter_array = 11,
|
|
92
94
|
heif_channel_depth = 12,
|
|
93
|
-
heif_channel_disparity = 13
|
|
94
|
-
|
|
95
|
+
heif_channel_disparity = 13,
|
|
96
|
+
heif_channel_unknown = 65535
|
|
97
|
+
} heif_channel;
|
|
95
98
|
|
|
99
|
+
#if HEIF_WITH_OMAF
|
|
100
|
+
/**
|
|
101
|
+
* OMAF Image projection.
|
|
102
|
+
*
|
|
103
|
+
* The image projection for most images is flat - it is projected as intended to be shown on
|
|
104
|
+
* a flat screen or print. For immersive or omnidirectional media (e.g. VR headsets, or
|
|
105
|
+
* equivalent), there are alternatives such as an equirectangular projection or cubemap projection.
|
|
106
|
+
*
|
|
107
|
+
* See ISO/IEC 23090-2 "Omnidirectional media format" for more information.
|
|
108
|
+
*/
|
|
109
|
+
typedef enum heif_omaf_image_projection
|
|
110
|
+
{
|
|
111
|
+
/**
|
|
112
|
+
* Equirectangular projection.
|
|
113
|
+
*/
|
|
114
|
+
heif_omaf_image_projection_equirectangular = 0x00,
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Cube map.
|
|
118
|
+
*/
|
|
119
|
+
heif_omaf_image_projection_cube_map = 0x01,
|
|
120
|
+
|
|
121
|
+
/* Values 2 through 31 are reserved in ISO/IEC 23090-2:2023 Table 10. */
|
|
122
|
+
/**
|
|
123
|
+
* Projection is specified, but not recognised.
|
|
124
|
+
*/
|
|
125
|
+
heif_omaf_image_projection_unknown = 0xFE,
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Flat projection, assumed if no projection information provided.
|
|
129
|
+
*/
|
|
130
|
+
heif_omaf_image_projection_flat = 0xFF,
|
|
131
|
+
} heif_omaf_image_projection;
|
|
132
|
+
#endif
|
|
96
133
|
|
|
97
134
|
// An heif_image contains a decoded pixel image in various colorspaces, chroma formats,
|
|
98
135
|
// and bit depths.
|
|
@@ -265,6 +302,13 @@ void heif_image_set_pixel_aspect_ratio(heif_image*, uint32_t aspect_h, uint32_t
|
|
|
265
302
|
LIBHEIF_API
|
|
266
303
|
void heif_image_handle_set_pixel_aspect_ratio(heif_image_handle*, uint32_t aspect_h, uint32_t aspect_v);
|
|
267
304
|
|
|
305
|
+
#if HEIF_WITH_OMAF
|
|
306
|
+
LIBHEIF_API
|
|
307
|
+
heif_omaf_image_projection heif_image_get_omaf_image_projection(const heif_image*);
|
|
308
|
+
|
|
309
|
+
LIBHEIF_API
|
|
310
|
+
void heif_image_set_omaf_image_projection(const heif_image*, heif_omaf_image_projection image_projection);
|
|
311
|
+
#endif
|
|
268
312
|
|
|
269
313
|
// --- heif_image allocation
|
|
270
314
|
|
|
@@ -122,6 +122,48 @@ heif_context* heif_image_handle_get_context(const heif_image_handle* handle);
|
|
|
122
122
|
LIBHEIF_API
|
|
123
123
|
const char* heif_image_handle_get_gimi_content_id(const heif_image_handle* handle);
|
|
124
124
|
|
|
125
|
+
LIBHEIF_API
|
|
126
|
+
void heif_image_handle_set_gimi_content_id(heif_image_handle* handle, const char* content_id);
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
// --- cmpd component queries
|
|
130
|
+
|
|
131
|
+
// Returns the number of components in the cmpd box, or 0 if no cmpd property exists.
|
|
132
|
+
LIBHEIF_API
|
|
133
|
+
uint32_t heif_image_handle_get_number_of_cmpd_components(const heif_image_handle*);
|
|
134
|
+
|
|
135
|
+
// Returns the component_type for the given cmpd component index.
|
|
136
|
+
// Returns 0 if out of range or no cmpd property.
|
|
137
|
+
LIBHEIF_API
|
|
138
|
+
uint16_t heif_image_handle_get_cmpd_component_type(const heif_image_handle*, uint32_t component_idx);
|
|
139
|
+
|
|
140
|
+
// Returns the component_type_uri for the given cmpd component index (component_type >= 0x8000).
|
|
141
|
+
// Returns NULL if the component does not have a URI.
|
|
142
|
+
// The returned string must be freed with heif_string_release().
|
|
143
|
+
LIBHEIF_API
|
|
144
|
+
const char* heif_image_handle_get_cmpd_component_type_uri(const heif_image_handle*, uint32_t component_idx);
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
// --- GIMI component content IDs (handle-level)
|
|
148
|
+
|
|
149
|
+
// Returns non-zero (count of content IDs) if an ItemComponentContentIDProperty is set, 0 otherwise.
|
|
150
|
+
LIBHEIF_API
|
|
151
|
+
int heif_image_handle_has_gimi_component_content_ids(const heif_image_handle*);
|
|
152
|
+
|
|
153
|
+
// Returns the GIMI component content ID for the given component index.
|
|
154
|
+
// Returns NULL if no ItemComponentContentIDProperty is set or index is out of range.
|
|
155
|
+
// The returned string must be freed with heif_string_release().
|
|
156
|
+
LIBHEIF_API
|
|
157
|
+
const char* heif_image_handle_get_gimi_component_content_id(const heif_image_handle*, uint32_t component_idx);
|
|
158
|
+
|
|
159
|
+
// Set a GIMI component content ID for a single component.
|
|
160
|
+
// If an ItemComponentContentIDProperty does not yet exist, one will be created.
|
|
161
|
+
// The content IDs array is resized as needed (new entries default to empty).
|
|
162
|
+
LIBHEIF_API
|
|
163
|
+
void heif_image_handle_set_gimi_component_content_id(heif_image_handle*,
|
|
164
|
+
uint32_t component_idx,
|
|
165
|
+
const char* content_id);
|
|
166
|
+
|
|
125
167
|
#ifdef __cplusplus
|
|
126
168
|
}
|
|
127
169
|
#endif
|
|
@@ -160,11 +160,11 @@ void heif_deinit(void);
|
|
|
160
160
|
|
|
161
161
|
// --- Plugins are currently only supported on Unix platforms.
|
|
162
162
|
|
|
163
|
-
enum heif_plugin_type
|
|
163
|
+
typedef enum heif_plugin_type
|
|
164
164
|
{
|
|
165
165
|
heif_plugin_type_encoder,
|
|
166
166
|
heif_plugin_type_decoder
|
|
167
|
-
};
|
|
167
|
+
} heif_plugin_type;
|
|
168
168
|
|
|
169
169
|
typedef struct heif_plugin_info
|
|
170
170
|
{
|
|
@@ -28,7 +28,7 @@ extern "C" {
|
|
|
28
28
|
#include <libheif/heif_library.h>
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
enum heif_metadata_compression
|
|
31
|
+
typedef enum heif_metadata_compression
|
|
32
32
|
{
|
|
33
33
|
heif_metadata_compression_off = 0,
|
|
34
34
|
heif_metadata_compression_auto = 1,
|
|
@@ -36,7 +36,7 @@ enum heif_metadata_compression
|
|
|
36
36
|
heif_metadata_compression_deflate = 3,
|
|
37
37
|
heif_metadata_compression_zlib = 4, // do not use for header data
|
|
38
38
|
heif_metadata_compression_brotli = 5
|
|
39
|
-
};
|
|
39
|
+
} heif_metadata_compression;
|
|
40
40
|
|
|
41
41
|
LIBHEIF_API
|
|
42
42
|
int heif_metadata_compression_method_supported(enum heif_metadata_compression method);
|
|
@@ -162,24 +162,24 @@ typedef struct heif_decoder_plugin
|
|
|
162
162
|
} heif_decoder_plugin;
|
|
163
163
|
|
|
164
164
|
|
|
165
|
-
enum heif_encoded_data_type
|
|
165
|
+
typedef enum heif_encoded_data_type
|
|
166
166
|
{
|
|
167
167
|
heif_encoded_data_type_HEVC_header = 1,
|
|
168
168
|
heif_encoded_data_type_HEVC_image = 2,
|
|
169
169
|
heif_encoded_data_type_HEVC_depth_SEI = 3
|
|
170
|
-
};
|
|
170
|
+
} heif_encoded_data_type;
|
|
171
171
|
|
|
172
172
|
|
|
173
173
|
// Specifies the class of the input image content.
|
|
174
174
|
// The encoder may want to encode different classes with different parameters
|
|
175
175
|
// (e.g. always encode alpha lossless)
|
|
176
|
-
enum heif_image_input_class
|
|
176
|
+
typedef enum heif_image_input_class
|
|
177
177
|
{
|
|
178
178
|
heif_image_input_class_normal = 1,
|
|
179
179
|
heif_image_input_class_alpha = 2,
|
|
180
180
|
heif_image_input_class_depth = 3,
|
|
181
181
|
heif_image_input_class_thumbnail = 4
|
|
182
|
-
};
|
|
182
|
+
} heif_image_input_class;
|
|
183
183
|
|
|
184
184
|
|
|
185
185
|
typedef struct heif_encoder_plugin
|