@img/sharp-libvips-dev 1.2.0-rc.3 → 1.2.0-rc.4
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/fontconfig/fontconfig.h +12 -2
- package/include/glib-2.0/girepository/girepository.h +3 -0
- package/include/glib-2.0/glib/gmarkup.h +4 -0
- package/include/libheif/heif.h +16 -2603
- package/include/libheif/heif_aux_images.h +182 -0
- package/include/libheif/heif_brands.h +373 -0
- package/include/libheif/heif_color.h +357 -0
- package/include/libheif/heif_context.h +329 -0
- package/include/libheif/heif_cxx.h +6 -6
- package/include/libheif/heif_decoding.h +162 -0
- package/include/libheif/heif_encoding.h +391 -0
- package/include/libheif/heif_entity_groups.h +60 -0
- package/include/libheif/heif_error.h +302 -0
- package/include/libheif/heif_image.h +352 -0
- package/include/libheif/heif_image_handle.h +120 -0
- package/include/libheif/heif_items.h +45 -45
- package/include/libheif/heif_library.h +216 -0
- package/include/libheif/heif_metadata.h +133 -0
- package/include/libheif/heif_plugin.h +53 -41
- package/include/libheif/heif_properties.h +73 -36
- package/include/libheif/heif_regions.h +95 -95
- package/include/libheif/heif_security.h +102 -0
- package/include/libheif/heif_sequences.h +577 -0
- package/include/libheif/heif_tai_timestamps.h +202 -0
- package/include/libheif/heif_tiling.h +137 -0
- package/include/libheif/heif_uncompressed.h +109 -0
- package/include/libheif/heif_version.h +2 -2
- package/include/libpng16/png.h +7 -7
- package/include/libpng16/pngconf.h +1 -1
- package/include/libpng16/pnglibconf.h +1 -1
- package/include/pango-1.0/pango/pango-attributes.h +1 -1
- package/include/pango-1.0/pango/pango-features.h +2 -2
- package/include/png.h +7 -7
- package/include/pngconf.h +1 -1
- package/include/pnglibconf.h +1 -1
- package/include/vips/version.h +4 -4
- package/package.json +1 -1
- package/versions.json +5 -5
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
extern "C" {
|
|
26
26
|
#endif
|
|
27
27
|
|
|
28
|
-
#include <libheif/
|
|
28
|
+
#include <libheif/heif_encoding.h>
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
// ====================================================================================================
|
|
@@ -42,7 +42,10 @@ extern "C" {
|
|
|
42
42
|
// 1.8 1 2 2
|
|
43
43
|
// 1.13 2 3 2
|
|
44
44
|
// 1.15 3 3 2
|
|
45
|
+
// 1.20 4 3 2
|
|
45
46
|
|
|
47
|
+
#define heif_decoder_plugin_latest_version 4
|
|
48
|
+
#define heif_encoder_plugin_latest_version 3
|
|
46
49
|
|
|
47
50
|
// ====================================================================================================
|
|
48
51
|
// Decoder plugin API
|
|
@@ -50,7 +53,7 @@ extern "C" {
|
|
|
50
53
|
// added as plugins. A plugin has to implement the functions specified in heif_decoder_plugin
|
|
51
54
|
// and the plugin has to be registered to the libheif library using heif_register_decoder().
|
|
52
55
|
|
|
53
|
-
struct heif_decoder_plugin
|
|
56
|
+
typedef struct heif_decoder_plugin
|
|
54
57
|
{
|
|
55
58
|
// API version supported by this plugin (see table above for supported versions)
|
|
56
59
|
int plugin_api_version;
|
|
@@ -59,13 +62,13 @@ struct heif_decoder_plugin
|
|
|
59
62
|
// --- version 1 functions ---
|
|
60
63
|
|
|
61
64
|
// Human-readable name of the plugin
|
|
62
|
-
const char* (* get_plugin_name)();
|
|
65
|
+
const char* (* get_plugin_name)(void);
|
|
63
66
|
|
|
64
67
|
// Global plugin initialization (may be NULL)
|
|
65
|
-
void (* init_plugin)();
|
|
68
|
+
void (* init_plugin)(void);
|
|
66
69
|
|
|
67
70
|
// Global plugin deinitialization (may be NULL)
|
|
68
|
-
void (* deinit_plugin)();
|
|
71
|
+
void (* deinit_plugin)(void);
|
|
69
72
|
|
|
70
73
|
// Query whether the plugin supports decoding of the given format
|
|
71
74
|
// Result is a priority value. The plugin with the largest value wins.
|
|
@@ -73,24 +76,24 @@ struct heif_decoder_plugin
|
|
|
73
76
|
int (* does_support_format)(enum heif_compression_format format);
|
|
74
77
|
|
|
75
78
|
// Create a new decoder context for decoding an image
|
|
76
|
-
|
|
79
|
+
heif_error (* new_decoder)(void** decoder);
|
|
77
80
|
|
|
78
81
|
// Free the decoder context (heif_image can still be used after destruction)
|
|
79
82
|
void (* free_decoder)(void* decoder);
|
|
80
83
|
|
|
81
84
|
// Push more data into the decoder. This can be called multiple times.
|
|
82
85
|
// This may not be called after any decode_*() function has been called.
|
|
83
|
-
|
|
86
|
+
heif_error (* push_data)(void* decoder, const void* data, size_t size);
|
|
84
87
|
|
|
85
88
|
|
|
86
89
|
// --- After pushing the data into the decoder, the decode functions may be called only once.
|
|
87
90
|
|
|
88
|
-
|
|
91
|
+
heif_error (* decode_image)(void* decoder, heif_image** out_img);
|
|
89
92
|
|
|
90
93
|
|
|
91
|
-
// --- version 2 functions
|
|
94
|
+
// --- version 2 functions ---
|
|
92
95
|
|
|
93
|
-
void (*set_strict_decoding)(void* decoder, int flag);
|
|
96
|
+
void (* set_strict_decoding)(void* decoder, int flag);
|
|
94
97
|
|
|
95
98
|
// If not NULL, this can provide a specialized function to convert YCbCr to sRGB, because
|
|
96
99
|
// only the codec itself knows how to interpret the chroma samples and their locations.
|
|
@@ -104,12 +107,19 @@ struct heif_decoder_plugin
|
|
|
104
107
|
// Reset decoder, such that we can feed in new data for another image.
|
|
105
108
|
// void (*reset_image)(void* decoder);
|
|
106
109
|
|
|
107
|
-
// --- version 3 functions
|
|
110
|
+
// --- version 3 functions ---
|
|
108
111
|
|
|
109
112
|
const char* id_name;
|
|
110
113
|
|
|
111
|
-
// --- version 4 functions
|
|
112
|
-
|
|
114
|
+
// --- version 4 functions ---
|
|
115
|
+
|
|
116
|
+
heif_error (* decode_next_image)(void* decoder, heif_image** out_img,
|
|
117
|
+
const heif_security_limits* limits);
|
|
118
|
+
|
|
119
|
+
// --- version 5 functions will follow below ... ---
|
|
120
|
+
|
|
121
|
+
// --- Note: when adding new versions, also update `heif_decoder_plugin_latest_version`.
|
|
122
|
+
} heif_decoder_plugin;
|
|
113
123
|
|
|
114
124
|
|
|
115
125
|
enum heif_encoded_data_type
|
|
@@ -132,7 +142,7 @@ enum heif_image_input_class
|
|
|
132
142
|
};
|
|
133
143
|
|
|
134
144
|
|
|
135
|
-
struct heif_encoder_plugin
|
|
145
|
+
typedef struct heif_encoder_plugin
|
|
136
146
|
{
|
|
137
147
|
// API version supported by this plugin (see table above for supported versions)
|
|
138
148
|
int plugin_api_version;
|
|
@@ -157,46 +167,46 @@ struct heif_encoder_plugin
|
|
|
157
167
|
|
|
158
168
|
|
|
159
169
|
// Human-readable name of the plugin
|
|
160
|
-
const char* (* get_plugin_name)();
|
|
170
|
+
const char* (* get_plugin_name)(void);
|
|
161
171
|
|
|
162
172
|
// Global plugin initialization (may be NULL)
|
|
163
|
-
void (* init_plugin)();
|
|
173
|
+
void (* init_plugin)(void);
|
|
164
174
|
|
|
165
175
|
// Global plugin cleanup (may be NULL).
|
|
166
176
|
// Free data that was allocated in init_plugin()
|
|
167
|
-
void (* cleanup_plugin)();
|
|
177
|
+
void (* cleanup_plugin)(void);
|
|
168
178
|
|
|
169
179
|
// Create a new decoder context for decoding an image
|
|
170
|
-
|
|
180
|
+
heif_error (* new_encoder)(void** encoder);
|
|
171
181
|
|
|
172
182
|
// Free the decoder context (heif_image can still be used after destruction)
|
|
173
183
|
void (* free_encoder)(void* encoder);
|
|
174
184
|
|
|
175
|
-
|
|
185
|
+
heif_error (* set_parameter_quality)(void* encoder, int quality);
|
|
176
186
|
|
|
177
|
-
|
|
187
|
+
heif_error (* get_parameter_quality)(void* encoder, int* quality);
|
|
178
188
|
|
|
179
|
-
|
|
189
|
+
heif_error (* set_parameter_lossless)(void* encoder, int lossless);
|
|
180
190
|
|
|
181
|
-
|
|
191
|
+
heif_error (* get_parameter_lossless)(void* encoder, int* lossless);
|
|
182
192
|
|
|
183
|
-
|
|
193
|
+
heif_error (* set_parameter_logging_level)(void* encoder, int logging);
|
|
184
194
|
|
|
185
|
-
|
|
195
|
+
heif_error (* get_parameter_logging_level)(void* encoder, int* logging);
|
|
186
196
|
|
|
187
|
-
const
|
|
197
|
+
const heif_encoder_parameter** (* list_parameters)(void* encoder);
|
|
188
198
|
|
|
189
|
-
|
|
199
|
+
heif_error (* set_parameter_integer)(void* encoder, const char* name, int value);
|
|
190
200
|
|
|
191
|
-
|
|
201
|
+
heif_error (* get_parameter_integer)(void* encoder, const char* name, int* value);
|
|
192
202
|
|
|
193
|
-
|
|
203
|
+
heif_error (* set_parameter_boolean)(void* encoder, const char* name, int value);
|
|
194
204
|
|
|
195
|
-
|
|
205
|
+
heif_error (* get_parameter_boolean)(void* encoder, const char* name, int* value);
|
|
196
206
|
|
|
197
|
-
|
|
207
|
+
heif_error (* set_parameter_string)(void* encoder, const char* name, const char* value);
|
|
198
208
|
|
|
199
|
-
|
|
209
|
+
heif_error (* get_parameter_string)(void* encoder, const char* name, char* value, int value_size);
|
|
200
210
|
|
|
201
211
|
// Replace the input colorspace/chroma with the one that is supported by the encoder and that
|
|
202
212
|
// comes as close to the input colorspace/chroma as possible.
|
|
@@ -206,12 +216,12 @@ struct heif_encoder_plugin
|
|
|
206
216
|
// Encode an image.
|
|
207
217
|
// After pushing an image into the encoder, you should call get_compressed_data() to
|
|
208
218
|
// get compressed data until it returns a NULL data pointer.
|
|
209
|
-
|
|
210
|
-
|
|
219
|
+
heif_error (* encode_image)(void* encoder, const heif_image* image,
|
|
220
|
+
enum heif_image_input_class image_class);
|
|
211
221
|
|
|
212
222
|
// Get a packet of decoded data. The data format depends on the codec.
|
|
213
223
|
// For HEVC, each packet shall contain exactly one NAL, starting with the NAL header without startcode.
|
|
214
|
-
|
|
224
|
+
heif_error (* get_compressed_data)(void* encoder, uint8_t** data, int* size,
|
|
215
225
|
enum heif_encoded_data_type* type);
|
|
216
226
|
|
|
217
227
|
|
|
@@ -231,7 +241,9 @@ struct heif_encoder_plugin
|
|
|
231
241
|
uint32_t* encoded_width, uint32_t* encoded_height);
|
|
232
242
|
|
|
233
243
|
// --- version 4 functions will follow below ... ---
|
|
234
|
-
|
|
244
|
+
|
|
245
|
+
// --- Note: when adding new versions, also update `heif_encoder_plugin_latest_version`.
|
|
246
|
+
} heif_encoder_plugin;
|
|
235
247
|
|
|
236
248
|
|
|
237
249
|
// Names for standard parameters. These should only be used by the encoder plugins.
|
|
@@ -241,7 +253,7 @@ struct heif_encoder_plugin
|
|
|
241
253
|
// For use only by the encoder plugins.
|
|
242
254
|
// Application programs should use the access functions.
|
|
243
255
|
// NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
|
|
244
|
-
struct heif_encoder_parameter
|
|
256
|
+
typedef struct heif_encoder_parameter
|
|
245
257
|
{
|
|
246
258
|
int version; // current version: 2
|
|
247
259
|
|
|
@@ -280,15 +292,15 @@ struct heif_encoder_parameter
|
|
|
280
292
|
// --- version 2 fields
|
|
281
293
|
|
|
282
294
|
int has_default;
|
|
283
|
-
};
|
|
295
|
+
} heif_encoder_parameter;
|
|
284
296
|
|
|
285
297
|
|
|
286
|
-
extern
|
|
287
|
-
extern
|
|
288
|
-
extern
|
|
298
|
+
extern heif_error heif_error_ok;
|
|
299
|
+
extern heif_error heif_error_unsupported_parameter;
|
|
300
|
+
extern heif_error heif_error_invalid_parameter_value;
|
|
289
301
|
|
|
290
302
|
#define HEIF_WARN_OR_FAIL(strict, image, cmd, cleanupBlock) \
|
|
291
|
-
{
|
|
303
|
+
{ heif_error e = cmd; \
|
|
292
304
|
if (e.code != heif_error_Ok) { \
|
|
293
305
|
if (strict) { \
|
|
294
306
|
cleanupBlock \
|
|
@@ -49,7 +49,7 @@ enum heif_item_property_type
|
|
|
49
49
|
// The number of properties is returned, which are not more than 'count' if (out_list != nullptr).
|
|
50
50
|
// By setting out_list==nullptr, you can query the number of properties, 'count' is ignored.
|
|
51
51
|
LIBHEIF_API
|
|
52
|
-
int heif_item_get_properties_of_type(const
|
|
52
|
+
int heif_item_get_properties_of_type(const heif_context* context,
|
|
53
53
|
heif_item_id id,
|
|
54
54
|
enum heif_item_property_type type,
|
|
55
55
|
heif_property_id* out_list,
|
|
@@ -60,18 +60,18 @@ int heif_item_get_properties_of_type(const struct heif_context* context,
|
|
|
60
60
|
// The number of properties is returned, which are not more than 'count' if (out_list != nullptr).
|
|
61
61
|
// By setting out_list==nullptr, you can query the number of properties, 'count' is ignored.
|
|
62
62
|
LIBHEIF_API
|
|
63
|
-
int heif_item_get_transformation_properties(const
|
|
63
|
+
int heif_item_get_transformation_properties(const heif_context* context,
|
|
64
64
|
heif_item_id id,
|
|
65
65
|
heif_property_id* out_list,
|
|
66
66
|
int count);
|
|
67
67
|
|
|
68
68
|
LIBHEIF_API
|
|
69
|
-
enum heif_item_property_type heif_item_get_property_type(const
|
|
69
|
+
enum heif_item_property_type heif_item_get_property_type(const heif_context* context,
|
|
70
70
|
heif_item_id id,
|
|
71
71
|
heif_property_id property_id);
|
|
72
72
|
|
|
73
73
|
// The strings are managed by libheif. They will be deleted in heif_property_user_description_release().
|
|
74
|
-
struct heif_property_user_description
|
|
74
|
+
typedef struct heif_property_user_description
|
|
75
75
|
{
|
|
76
76
|
int version;
|
|
77
77
|
|
|
@@ -81,28 +81,28 @@ struct heif_property_user_description
|
|
|
81
81
|
const char* name;
|
|
82
82
|
const char* description;
|
|
83
83
|
const char* tags;
|
|
84
|
-
};
|
|
84
|
+
} heif_property_user_description;
|
|
85
85
|
|
|
86
86
|
// Get the "udes" user description property content.
|
|
87
87
|
// Undefined strings are returned as empty strings.
|
|
88
88
|
LIBHEIF_API
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
heif_error heif_item_get_property_user_description(const heif_context* context,
|
|
90
|
+
heif_item_id itemId,
|
|
91
|
+
heif_property_id propertyId,
|
|
92
|
+
heif_property_user_description** out);
|
|
93
93
|
|
|
94
94
|
// Add a "udes" user description property to the item.
|
|
95
95
|
// If any string pointers are NULL, an empty string will be used instead.
|
|
96
96
|
LIBHEIF_API
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
heif_error heif_item_add_property_user_description(const heif_context* context,
|
|
98
|
+
heif_item_id itemId,
|
|
99
|
+
const heif_property_user_description* description,
|
|
100
|
+
heif_property_id* out_propertyId);
|
|
101
101
|
|
|
102
102
|
// Release all strings and the object itself.
|
|
103
103
|
// Only call for objects that you received from heif_item_get_property_user_description().
|
|
104
104
|
LIBHEIF_API
|
|
105
|
-
void heif_property_user_description_release(
|
|
105
|
+
void heif_property_user_description_release(heif_property_user_description*);
|
|
106
106
|
|
|
107
107
|
enum heif_transform_mirror_direction
|
|
108
108
|
{
|
|
@@ -113,14 +113,14 @@ enum heif_transform_mirror_direction
|
|
|
113
113
|
|
|
114
114
|
// Will return 'heif_transform_mirror_direction_invalid' in case of error.
|
|
115
115
|
LIBHEIF_API
|
|
116
|
-
enum heif_transform_mirror_direction heif_item_get_property_transform_mirror(const
|
|
116
|
+
enum heif_transform_mirror_direction heif_item_get_property_transform_mirror(const heif_context* context,
|
|
117
117
|
heif_item_id itemId,
|
|
118
118
|
heif_property_id propertyId);
|
|
119
119
|
|
|
120
120
|
// Returns only 0, 90, 180, or 270 angle values.
|
|
121
121
|
// Returns -1 in case of error (but it will only return an error in case of wrong usage).
|
|
122
122
|
LIBHEIF_API
|
|
123
|
-
int heif_item_get_property_transform_rotation_ccw(const
|
|
123
|
+
int heif_item_get_property_transform_rotation_ccw(const heif_context* context,
|
|
124
124
|
heif_item_id itemId,
|
|
125
125
|
heif_property_id propertyId);
|
|
126
126
|
|
|
@@ -128,7 +128,7 @@ int heif_item_get_property_transform_rotation_ccw(const struct heif_context* con
|
|
|
128
128
|
// Because of the way this data is stored, you have to pass the image size at the moment of the crop operation
|
|
129
129
|
// to compute the cropped border sizes.
|
|
130
130
|
LIBHEIF_API
|
|
131
|
-
void heif_item_get_property_transform_crop_borders(const
|
|
131
|
+
void heif_item_get_property_transform_crop_borders(const heif_context* context,
|
|
132
132
|
heif_item_id itemId,
|
|
133
133
|
heif_property_id propertyId,
|
|
134
134
|
int image_width, int image_height,
|
|
@@ -145,28 +145,28 @@ void heif_item_get_property_transform_crop_borders(const struct heif_context* co
|
|
|
145
145
|
* @param out_propertyId Outputs the id of the inserted property. Can be NULL.
|
|
146
146
|
*/
|
|
147
147
|
LIBHEIF_API
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
148
|
+
heif_error heif_item_add_raw_property(const heif_context* context,
|
|
149
|
+
heif_item_id itemId,
|
|
150
|
+
uint32_t fourcc_type,
|
|
151
|
+
const uint8_t* uuid_type,
|
|
152
|
+
const uint8_t* data, size_t size,
|
|
153
|
+
int is_essential,
|
|
154
|
+
heif_property_id* out_propertyId);
|
|
155
155
|
|
|
156
156
|
LIBHEIF_API
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
157
|
+
heif_error heif_item_get_property_raw_size(const heif_context* context,
|
|
158
|
+
heif_item_id itemId,
|
|
159
|
+
heif_property_id propertyId,
|
|
160
|
+
size_t* out_size);
|
|
161
161
|
|
|
162
162
|
/**
|
|
163
163
|
* @param out_data 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().
|
|
164
164
|
*/
|
|
165
165
|
LIBHEIF_API
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
166
|
+
heif_error heif_item_get_property_raw_data(const heif_context* context,
|
|
167
|
+
heif_item_id itemId,
|
|
168
|
+
heif_property_id propertyId,
|
|
169
|
+
uint8_t* out_data);
|
|
170
170
|
|
|
171
171
|
/**
|
|
172
172
|
* Get the extended type for an extended "uuid" box.
|
|
@@ -182,10 +182,47 @@ struct heif_error heif_item_get_property_raw_data(const struct heif_context* con
|
|
|
182
182
|
* @return heif_error_success or an error indicating the failure
|
|
183
183
|
*/
|
|
184
184
|
LIBHEIF_API
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
185
|
+
heif_error heif_item_get_property_uuid_type(const heif_context* context,
|
|
186
|
+
heif_item_id itemId,
|
|
187
|
+
heif_property_id propertyId,
|
|
188
|
+
uint8_t out_extended_type[16]);
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
// ------------------------- intrinsic and extrinsic matrices -------------------------
|
|
192
|
+
|
|
193
|
+
typedef struct heif_camera_intrinsic_matrix
|
|
194
|
+
{
|
|
195
|
+
double focal_length_x;
|
|
196
|
+
double focal_length_y;
|
|
197
|
+
double principal_point_x;
|
|
198
|
+
double principal_point_y;
|
|
199
|
+
double skew;
|
|
200
|
+
} heif_camera_intrinsic_matrix;
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
LIBHEIF_API
|
|
204
|
+
int heif_image_handle_has_camera_intrinsic_matrix(const heif_image_handle* handle);
|
|
205
|
+
|
|
206
|
+
LIBHEIF_API
|
|
207
|
+
heif_error heif_image_handle_get_camera_intrinsic_matrix(const heif_image_handle* handle,
|
|
208
|
+
heif_camera_intrinsic_matrix* out_matrix);
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
typedef struct heif_camera_extrinsic_matrix heif_camera_extrinsic_matrix;
|
|
212
|
+
|
|
213
|
+
LIBHEIF_API
|
|
214
|
+
int heif_image_handle_has_camera_extrinsic_matrix(const heif_image_handle* handle);
|
|
215
|
+
|
|
216
|
+
LIBHEIF_API
|
|
217
|
+
heif_error heif_image_handle_get_camera_extrinsic_matrix(const heif_image_handle* handle,
|
|
218
|
+
heif_camera_extrinsic_matrix** out_matrix);
|
|
219
|
+
|
|
220
|
+
LIBHEIF_API
|
|
221
|
+
void heif_camera_extrinsic_matrix_release(heif_camera_extrinsic_matrix*);
|
|
222
|
+
|
|
223
|
+
LIBHEIF_API
|
|
224
|
+
heif_error heif_camera_extrinsic_matrix_get_rotation_matrix(const heif_camera_extrinsic_matrix*,
|
|
225
|
+
double* out_matrix_row_major);
|
|
189
226
|
|
|
190
227
|
#ifdef __cplusplus
|
|
191
228
|
}
|