@img/sharp-libvips-dev 1.2.0-rc.3 → 1.2.0
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
|
@@ -32,7 +32,7 @@ extern "C" {
|
|
|
32
32
|
|
|
33
33
|
// See ISO/IEC 23008-12:2022 Section 6.10 "Region items and region annotations"
|
|
34
34
|
|
|
35
|
-
struct heif_region_item;
|
|
35
|
+
typedef struct heif_region_item heif_region_item;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* Region type.
|
|
@@ -121,7 +121,7 @@ enum heif_region_type
|
|
|
121
121
|
heif_region_type_polyline = 6
|
|
122
122
|
};
|
|
123
123
|
|
|
124
|
-
struct heif_region;
|
|
124
|
+
typedef struct heif_region heif_region;
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
127
|
* Get the number of region items that are attached to an image.
|
|
@@ -130,7 +130,7 @@ struct heif_region;
|
|
|
130
130
|
* @return the number of region items, which can be zero.
|
|
131
131
|
*/
|
|
132
132
|
LIBHEIF_API
|
|
133
|
-
int heif_image_handle_get_number_of_region_items(const
|
|
133
|
+
int heif_image_handle_get_number_of_region_items(const heif_image_handle* image_handle);
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
136
|
* Get the region item identifiers for the region items attached to an image.
|
|
@@ -151,7 +151,7 @@ int heif_image_handle_get_number_of_region_items(const struct heif_image_handle*
|
|
|
151
151
|
* @return the number of region item identifiers that were returned.
|
|
152
152
|
*/
|
|
153
153
|
LIBHEIF_API
|
|
154
|
-
int heif_image_handle_get_list_of_region_item_ids(const
|
|
154
|
+
int heif_image_handle_get_list_of_region_item_ids(const heif_image_handle* image_handle,
|
|
155
155
|
heif_item_id* region_item_ids_array,
|
|
156
156
|
int max_count);
|
|
157
157
|
|
|
@@ -166,9 +166,9 @@ int heif_image_handle_get_list_of_region_item_ids(const struct heif_image_handle
|
|
|
166
166
|
* @return heif_error_ok on success, or an error value indicating the problem
|
|
167
167
|
*/
|
|
168
168
|
LIBHEIF_API
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
169
|
+
heif_error heif_context_get_region_item(const heif_context* context,
|
|
170
|
+
heif_item_id region_item_id,
|
|
171
|
+
heif_region_item** out);
|
|
172
172
|
|
|
173
173
|
/**
|
|
174
174
|
* Get the item identifier for a region item.
|
|
@@ -177,7 +177,7 @@ struct heif_error heif_context_get_region_item(const struct heif_context* contex
|
|
|
177
177
|
* @return the region item identifier (or -1 if the region_item is null)
|
|
178
178
|
*/
|
|
179
179
|
LIBHEIF_API
|
|
180
|
-
heif_item_id heif_region_item_get_id(
|
|
180
|
+
heif_item_id heif_region_item_get_id(heif_region_item* region_item);
|
|
181
181
|
|
|
182
182
|
/**
|
|
183
183
|
* Release a region item.
|
|
@@ -187,7 +187,7 @@ heif_item_id heif_region_item_get_id(struct heif_region_item* region_item);
|
|
|
187
187
|
* @param region_item the item to release.
|
|
188
188
|
*/
|
|
189
189
|
LIBHEIF_API
|
|
190
|
-
void heif_region_item_release(
|
|
190
|
+
void heif_region_item_release(heif_region_item* region_item);
|
|
191
191
|
|
|
192
192
|
/**
|
|
193
193
|
* Get the reference size for a region item.
|
|
@@ -200,7 +200,7 @@ void heif_region_item_release(struct heif_region_item* region_item);
|
|
|
200
200
|
* @param out_height the return value for the reference height (before any transformation)
|
|
201
201
|
*/
|
|
202
202
|
LIBHEIF_API
|
|
203
|
-
void heif_region_item_get_reference_size(
|
|
203
|
+
void heif_region_item_get_reference_size(heif_region_item*, uint32_t* out_width, uint32_t* out_height);
|
|
204
204
|
|
|
205
205
|
/**
|
|
206
206
|
* Get the number of regions within a region item.
|
|
@@ -209,7 +209,7 @@ void heif_region_item_get_reference_size(struct heif_region_item*, uint32_t* out
|
|
|
209
209
|
* @return the number of regions
|
|
210
210
|
*/
|
|
211
211
|
LIBHEIF_API
|
|
212
|
-
int heif_region_item_get_number_of_regions(const
|
|
212
|
+
int heif_region_item_get_number_of_regions(const heif_region_item* region_item);
|
|
213
213
|
|
|
214
214
|
/**
|
|
215
215
|
* Get the regions that are part of a region item.
|
|
@@ -234,8 +234,8 @@ int heif_region_item_get_number_of_regions(const struct heif_region_item* region
|
|
|
234
234
|
* @return the number of regions that were returned.
|
|
235
235
|
*/
|
|
236
236
|
LIBHEIF_API
|
|
237
|
-
int heif_region_item_get_list_of_regions(const
|
|
238
|
-
|
|
237
|
+
int heif_region_item_get_list_of_regions(const heif_region_item* region_item,
|
|
238
|
+
heif_region** out_regions_array,
|
|
239
239
|
int max_count);
|
|
240
240
|
|
|
241
241
|
/**
|
|
@@ -248,7 +248,7 @@ int heif_region_item_get_list_of_regions(const struct heif_region_item* region_i
|
|
|
248
248
|
* \sa heif_region_release_many() to release the whole list
|
|
249
249
|
*/
|
|
250
250
|
LIBHEIF_API
|
|
251
|
-
void heif_region_release(const
|
|
251
|
+
void heif_region_release(const heif_region* region);
|
|
252
252
|
|
|
253
253
|
/**
|
|
254
254
|
* Release a list of regions.
|
|
@@ -261,7 +261,7 @@ void heif_region_release(const struct heif_region* region);
|
|
|
261
261
|
* \sa heif_region_release() to release a single region
|
|
262
262
|
*/
|
|
263
263
|
LIBHEIF_API
|
|
264
|
-
void heif_region_release_many(const
|
|
264
|
+
void heif_region_release_many(const heif_region* const* regions_array, int num_items);
|
|
265
265
|
|
|
266
266
|
/**
|
|
267
267
|
* Get the region type for a specified region.
|
|
@@ -270,7 +270,7 @@ void heif_region_release_many(const struct heif_region* const* regions_array, in
|
|
|
270
270
|
* @return the corresponding region type as an enumeration value
|
|
271
271
|
*/
|
|
272
272
|
LIBHEIF_API
|
|
273
|
-
enum heif_region_type heif_region_get_type(const
|
|
273
|
+
enum heif_region_type heif_region_get_type(const heif_region* region);
|
|
274
274
|
|
|
275
275
|
// When querying the region geometry, there is a version without and a version with "_transformed" suffix.
|
|
276
276
|
// The version without returns the coordinates in the reference coordinate space.
|
|
@@ -289,7 +289,7 @@ enum heif_region_type heif_region_get_type(const struct heif_region* region);
|
|
|
289
289
|
* \sa heif_region_get_point_transformed() for a version in pixels after all transformative properties have been applied.
|
|
290
290
|
*/
|
|
291
291
|
LIBHEIF_API
|
|
292
|
-
|
|
292
|
+
heif_error heif_region_get_point(const heif_region* region, int32_t* out_x, int32_t* out_y);
|
|
293
293
|
|
|
294
294
|
/**
|
|
295
295
|
* Get the transformed values for a point region.
|
|
@@ -305,7 +305,7 @@ struct heif_error heif_region_get_point(const struct heif_region* region, int32_
|
|
|
305
305
|
* \sa heif_region_get_point() for a version that returns the values in the reference coordinate space.
|
|
306
306
|
*/
|
|
307
307
|
LIBHEIF_API
|
|
308
|
-
|
|
308
|
+
heif_error heif_region_get_point_transformed(const heif_region* region, heif_item_id image_id, double* out_x, double* out_y);
|
|
309
309
|
|
|
310
310
|
/**
|
|
311
311
|
* Get the values for a rectangle region.
|
|
@@ -325,9 +325,9 @@ struct heif_error heif_region_get_point_transformed(const struct heif_region* re
|
|
|
325
325
|
* \sa heif_region_get_rectangle_transformed() for a version in pixels after all transformative properties have been applied.
|
|
326
326
|
*/
|
|
327
327
|
LIBHEIF_API
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
328
|
+
heif_error heif_region_get_rectangle(const heif_region* region,
|
|
329
|
+
int32_t* out_x, int32_t* out_y,
|
|
330
|
+
uint32_t* out_width, uint32_t* out_height);
|
|
331
331
|
|
|
332
332
|
/**
|
|
333
333
|
* Get the transformed values for a rectangle region.
|
|
@@ -348,10 +348,10 @@ struct heif_error heif_region_get_rectangle(const struct heif_region* region,
|
|
|
348
348
|
* \sa heif_region_get_rectangle() for a version that returns the values in the reference coordinate space.
|
|
349
349
|
*/
|
|
350
350
|
LIBHEIF_API
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
351
|
+
heif_error heif_region_get_rectangle_transformed(const heif_region* region,
|
|
352
|
+
heif_item_id image_id,
|
|
353
|
+
double* out_x, double* out_y,
|
|
354
|
+
double* out_width, double* out_height);
|
|
355
355
|
|
|
356
356
|
/**
|
|
357
357
|
* Get the values for an ellipse region.
|
|
@@ -371,9 +371,9 @@ struct heif_error heif_region_get_rectangle_transformed(const struct heif_region
|
|
|
371
371
|
* \sa heif_region_get_ellipse_transformed() for a version in pixels after all transformative properties have been applied.
|
|
372
372
|
*/
|
|
373
373
|
LIBHEIF_API
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
374
|
+
heif_error heif_region_get_ellipse(const heif_region* region,
|
|
375
|
+
int32_t* out_x, int32_t* out_y,
|
|
376
|
+
uint32_t* out_radius_x, uint32_t* out_radius_y);
|
|
377
377
|
|
|
378
378
|
|
|
379
379
|
/**
|
|
@@ -395,10 +395,10 @@ struct heif_error heif_region_get_ellipse(const struct heif_region* region,
|
|
|
395
395
|
* \sa heif_region_get_ellipse() for a version that returns the values in the reference coordinate space.
|
|
396
396
|
*/
|
|
397
397
|
LIBHEIF_API
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
398
|
+
heif_error heif_region_get_ellipse_transformed(const heif_region* region,
|
|
399
|
+
heif_item_id image_id,
|
|
400
|
+
double* out_x, double* out_y,
|
|
401
|
+
double* out_radius_x, double* out_radius_y);
|
|
402
402
|
|
|
403
403
|
/**
|
|
404
404
|
* Get the number of points in a polygon.
|
|
@@ -407,7 +407,7 @@ struct heif_error heif_region_get_ellipse_transformed(const struct heif_region*
|
|
|
407
407
|
* @return the number of points, or -1 on error.
|
|
408
408
|
*/
|
|
409
409
|
LIBHEIF_API
|
|
410
|
-
int heif_region_get_polygon_num_points(const
|
|
410
|
+
int heif_region_get_polygon_num_points(const heif_region* region);
|
|
411
411
|
|
|
412
412
|
/**
|
|
413
413
|
* Get the points in a polygon region.
|
|
@@ -428,8 +428,8 @@ int heif_region_get_polygon_num_points(const struct heif_region* region);
|
|
|
428
428
|
* \sa heif_region_get_polygon_points_transformed() for a version in pixels after all transformative properties have been applied.
|
|
429
429
|
*/
|
|
430
430
|
LIBHEIF_API
|
|
431
|
-
|
|
432
|
-
|
|
431
|
+
heif_error heif_region_get_polygon_points(const heif_region* region,
|
|
432
|
+
int32_t* out_pts_array);
|
|
433
433
|
|
|
434
434
|
/**
|
|
435
435
|
* Get the transformed points in a polygon region.
|
|
@@ -451,9 +451,9 @@ struct heif_error heif_region_get_polygon_points(const struct heif_region* regio
|
|
|
451
451
|
* \sa heif_region_get_polygon_points() for a version that returns the values in the reference coordinate space.
|
|
452
452
|
*/
|
|
453
453
|
LIBHEIF_API
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
454
|
+
heif_error heif_region_get_polygon_points_transformed(const heif_region* region,
|
|
455
|
+
heif_item_id image_id,
|
|
456
|
+
double* out_pts_array);
|
|
457
457
|
/**
|
|
458
458
|
* Get the number of points in a polyline.
|
|
459
459
|
*
|
|
@@ -461,7 +461,7 @@ struct heif_error heif_region_get_polygon_points_transformed(const struct heif_r
|
|
|
461
461
|
* @return the number of points, or -1 on error.
|
|
462
462
|
*/
|
|
463
463
|
LIBHEIF_API
|
|
464
|
-
int heif_region_get_polyline_num_points(const
|
|
464
|
+
int heif_region_get_polyline_num_points(const heif_region* region);
|
|
465
465
|
|
|
466
466
|
/**
|
|
467
467
|
* Get the points in a polyline region.
|
|
@@ -492,8 +492,8 @@ int heif_region_get_polyline_num_points(const struct heif_region* region);
|
|
|
492
492
|
* \sa heif_region_get_polyline_points_transformed() for a version in pixels after all transformative properties have been applied.
|
|
493
493
|
*/
|
|
494
494
|
LIBHEIF_API
|
|
495
|
-
|
|
496
|
-
|
|
495
|
+
heif_error heif_region_get_polyline_points(const heif_region* region,
|
|
496
|
+
int32_t* out_pts_array);
|
|
497
497
|
|
|
498
498
|
/**
|
|
499
499
|
* Get the transformed points in a polyline region.
|
|
@@ -515,9 +515,9 @@ struct heif_error heif_region_get_polyline_points(const struct heif_region* regi
|
|
|
515
515
|
* \sa heif_region_get_polyline_points() for a version that returns the values in the reference coordinate space.
|
|
516
516
|
*/
|
|
517
517
|
LIBHEIF_API
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
518
|
+
heif_error heif_region_get_polyline_points_transformed(const heif_region* region,
|
|
519
|
+
heif_item_id image_id,
|
|
520
|
+
double* out_pts_array);
|
|
521
521
|
|
|
522
522
|
/**
|
|
523
523
|
* Get a referenced item mask region.
|
|
@@ -554,10 +554,10 @@ struct heif_error heif_region_get_polyline_points_transformed(const struct heif_
|
|
|
554
554
|
* @return heif_error_ok on success, or an error value indicating the problem on failure
|
|
555
555
|
*/
|
|
556
556
|
LIBHEIF_API
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
557
|
+
heif_error heif_region_get_referenced_mask_ID(const heif_region* region,
|
|
558
|
+
int32_t* out_x, int32_t* out_y,
|
|
559
|
+
uint32_t* out_width, uint32_t* out_height,
|
|
560
|
+
heif_item_id* out_mask_item_id);
|
|
561
561
|
|
|
562
562
|
/**
|
|
563
563
|
* Get the length of the data in an inline mask region.
|
|
@@ -566,7 +566,7 @@ struct heif_error heif_region_get_referenced_mask_ID(const struct heif_region* r
|
|
|
566
566
|
* @return the number of bytes in the mask data, or 0 on error.
|
|
567
567
|
*/
|
|
568
568
|
LIBHEIF_API
|
|
569
|
-
size_t heif_region_get_inline_mask_data_len(const
|
|
569
|
+
size_t heif_region_get_inline_mask_data_len(const heif_region* region);
|
|
570
570
|
|
|
571
571
|
|
|
572
572
|
/**
|
|
@@ -599,10 +599,10 @@ size_t heif_region_get_inline_mask_data_len(const struct heif_region* region);
|
|
|
599
599
|
* @return heif_error_ok on success, or an error value indicating the problem on failure
|
|
600
600
|
*/
|
|
601
601
|
LIBHEIF_API
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
602
|
+
heif_error heif_region_get_inline_mask_data(const heif_region* region,
|
|
603
|
+
int32_t* out_x, int32_t* out_y,
|
|
604
|
+
uint32_t* out_width, uint32_t* out_height,
|
|
605
|
+
uint8_t* out_mask_data);
|
|
606
606
|
|
|
607
607
|
/**
|
|
608
608
|
* Get a mask region image.
|
|
@@ -632,10 +632,10 @@ struct heif_error heif_region_get_inline_mask_data(const struct heif_region* reg
|
|
|
632
632
|
* \note the caller is responsible for releasing the mask image
|
|
633
633
|
*/
|
|
634
634
|
LIBHEIF_API
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
635
|
+
heif_error heif_region_get_mask_image(const heif_region* region,
|
|
636
|
+
int32_t* out_x, int32_t* out_y,
|
|
637
|
+
uint32_t* out_width, uint32_t* out_height,
|
|
638
|
+
heif_image** out_mask_image);
|
|
639
639
|
|
|
640
640
|
// --- adding region items
|
|
641
641
|
|
|
@@ -654,9 +654,9 @@ struct heif_error heif_region_get_mask_image(const struct heif_region* region,
|
|
|
654
654
|
* @return heif_error_ok on success, or an error indicating the problem on failure
|
|
655
655
|
*/
|
|
656
656
|
LIBHEIF_API
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
657
|
+
heif_error heif_image_handle_add_region_item(heif_image_handle* image_handle,
|
|
658
|
+
uint32_t reference_width, uint32_t reference_height,
|
|
659
|
+
heif_region_item** out_region_item);
|
|
660
660
|
|
|
661
661
|
/**
|
|
662
662
|
* Add a point region to the region item.
|
|
@@ -670,9 +670,9 @@ struct heif_error heif_image_handle_add_region_item(struct heif_image_handle* im
|
|
|
670
670
|
* @note The `out_region` parameter is optional, and can be set to `NULL` if not needed.
|
|
671
671
|
*/
|
|
672
672
|
LIBHEIF_API
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
673
|
+
heif_error heif_region_item_add_region_point(heif_region_item* region_item,
|
|
674
|
+
int32_t x, int32_t y,
|
|
675
|
+
heif_region** out_region);
|
|
676
676
|
|
|
677
677
|
/**
|
|
678
678
|
* Add a rectangle region to the region item.
|
|
@@ -688,10 +688,10 @@ struct heif_error heif_region_item_add_region_point(struct heif_region_item* reg
|
|
|
688
688
|
* @note The `out_region` parameter is optional, and can be set to `NULL` if not needed.
|
|
689
689
|
*/
|
|
690
690
|
LIBHEIF_API
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
691
|
+
heif_error heif_region_item_add_region_rectangle(heif_region_item* region_item,
|
|
692
|
+
int32_t x, int32_t y,
|
|
693
|
+
uint32_t width, uint32_t height,
|
|
694
|
+
heif_region** out_region);
|
|
695
695
|
|
|
696
696
|
/**
|
|
697
697
|
* Add a ellipse region to the region item.
|
|
@@ -707,10 +707,10 @@ struct heif_error heif_region_item_add_region_rectangle(struct heif_region_item*
|
|
|
707
707
|
* @note The `out_region` parameter is optional, and can be set to `NULL` if not needed.
|
|
708
708
|
*/
|
|
709
709
|
LIBHEIF_API
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
710
|
+
heif_error heif_region_item_add_region_ellipse(heif_region_item* region_item,
|
|
711
|
+
int32_t x, int32_t y,
|
|
712
|
+
uint32_t radius_x, uint32_t radius_y,
|
|
713
|
+
heif_region** out_region);
|
|
714
714
|
|
|
715
715
|
/**
|
|
716
716
|
* Add a polygon region to the region item.
|
|
@@ -730,9 +730,9 @@ struct heif_error heif_region_item_add_region_ellipse(struct heif_region_item* r
|
|
|
730
730
|
* @note The `out_region` parameter is optional, and can be set to `NULL` if not needed.
|
|
731
731
|
*/
|
|
732
732
|
LIBHEIF_API
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
733
|
+
heif_error heif_region_item_add_region_polygon(heif_region_item* region_item,
|
|
734
|
+
const int32_t* pts_array, int nPoints,
|
|
735
|
+
heif_region** out_region);
|
|
736
736
|
|
|
737
737
|
/**
|
|
738
738
|
* Add a polyline region to the region item.
|
|
@@ -753,9 +753,9 @@ struct heif_error heif_region_item_add_region_polygon(struct heif_region_item* r
|
|
|
753
753
|
* @note The `out_region` parameter is optional, and can be set to `NULL` if not needed.
|
|
754
754
|
*/
|
|
755
755
|
LIBHEIF_API
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
756
|
+
heif_error heif_region_item_add_region_polyline(heif_region_item* region_item,
|
|
757
|
+
const int32_t* pts_array, int nPoints,
|
|
758
|
+
heif_region** out_region);
|
|
759
759
|
|
|
760
760
|
|
|
761
761
|
/**
|
|
@@ -794,11 +794,11 @@ struct heif_error heif_region_item_add_region_polyline(struct heif_region_item*
|
|
|
794
794
|
* @note The `out_region` parameter is optional, and can be set to `NULL` if not needed.
|
|
795
795
|
*/
|
|
796
796
|
LIBHEIF_API
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
797
|
+
heif_error heif_region_item_add_region_referenced_mask(heif_region_item* region_item,
|
|
798
|
+
int32_t x, int32_t y,
|
|
799
|
+
uint32_t width, uint32_t height,
|
|
800
|
+
heif_item_id mask_item_id,
|
|
801
|
+
heif_region** out_region);
|
|
802
802
|
|
|
803
803
|
|
|
804
804
|
/**
|
|
@@ -822,13 +822,13 @@ struct heif_error heif_region_item_add_region_referenced_mask(struct heif_region
|
|
|
822
822
|
* @param out_region pointer to pointer to the returned region (optional, see below)
|
|
823
823
|
* @return heif_error_ok on success, or an error value indicating the problem on failure
|
|
824
824
|
*/
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
825
|
+
LIBHEIF_API
|
|
826
|
+
heif_error heif_region_item_add_region_inline_mask_data(heif_region_item* region_item,
|
|
827
|
+
int32_t x, int32_t y,
|
|
828
|
+
uint32_t width, uint32_t height,
|
|
829
|
+
const uint8_t* mask_data,
|
|
830
|
+
size_t mask_data_len,
|
|
831
|
+
heif_region** out_region);
|
|
832
832
|
|
|
833
833
|
/**
|
|
834
834
|
* Add an inline mask region image to the region item.
|
|
@@ -853,12 +853,12 @@ struct heif_error heif_region_item_add_region_inline_mask_data(struct heif_regio
|
|
|
853
853
|
* @param out_region pointer to pointer to the returned region (optional, see below)
|
|
854
854
|
* @return heif_error_ok on success, or an error value indicating the problem on failure
|
|
855
855
|
*/
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
856
|
+
LIBHEIF_API
|
|
857
|
+
heif_error heif_region_item_add_region_inline_mask(heif_region_item* region_item,
|
|
858
|
+
int32_t x, int32_t y,
|
|
859
|
+
uint32_t width, uint32_t height,
|
|
860
|
+
heif_image* image,
|
|
861
|
+
heif_region** out_region);
|
|
862
862
|
#ifdef __cplusplus
|
|
863
863
|
}
|
|
864
864
|
#endif
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* HEIF codec.
|
|
3
|
+
* Copyright (c) 2017-2025 Dirk Farin <dirk.farin@gmail.com>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of libheif.
|
|
6
|
+
*
|
|
7
|
+
* libheif is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as
|
|
9
|
+
* published by the Free Software Foundation, either version 3 of
|
|
10
|
+
* the License, or (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* libheif is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with libheif. If not, see <http://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
#ifndef LIBHEIF_HEIF_SECURITY_H
|
|
22
|
+
#define LIBHEIF_HEIF_SECURITY_H
|
|
23
|
+
|
|
24
|
+
#ifdef __cplusplus
|
|
25
|
+
extern "C" {
|
|
26
|
+
#endif
|
|
27
|
+
|
|
28
|
+
#include <stddef.h>
|
|
29
|
+
#include <stdint.h>
|
|
30
|
+
|
|
31
|
+
#include <libheif/heif_library.h>
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
// --- security limits
|
|
35
|
+
|
|
36
|
+
// If you set a limit to 0, the limit is disabled.
|
|
37
|
+
typedef struct heif_security_limits
|
|
38
|
+
{
|
|
39
|
+
uint8_t version;
|
|
40
|
+
|
|
41
|
+
// --- version 1
|
|
42
|
+
|
|
43
|
+
// Limit on the maximum image size to avoid allocating too much memory.
|
|
44
|
+
// For example, setting this to 32768^2 pixels = 1 Gigapixels results
|
|
45
|
+
// in 1.5 GB memory need for YUV-4:2:0 or 4 GB for RGB32.
|
|
46
|
+
uint64_t max_image_size_pixels;
|
|
47
|
+
uint64_t max_number_of_tiles;
|
|
48
|
+
uint32_t max_bayer_pattern_pixels;
|
|
49
|
+
uint32_t max_items;
|
|
50
|
+
|
|
51
|
+
uint32_t max_color_profile_size;
|
|
52
|
+
uint64_t max_memory_block_size;
|
|
53
|
+
|
|
54
|
+
uint32_t max_components;
|
|
55
|
+
|
|
56
|
+
uint32_t max_iloc_extents_per_item;
|
|
57
|
+
uint32_t max_size_entity_group;
|
|
58
|
+
|
|
59
|
+
uint32_t max_children_per_box; // for all boxes that are not covered by other limits
|
|
60
|
+
|
|
61
|
+
// --- version 2
|
|
62
|
+
|
|
63
|
+
uint64_t max_total_memory;
|
|
64
|
+
uint32_t max_sample_description_box_entries;
|
|
65
|
+
uint32_t max_sample_group_description_box_entries;
|
|
66
|
+
} heif_security_limits;
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
// The global security limits are the default for new heif_contexts.
|
|
70
|
+
// These global limits cannot be changed, but you can override the limits for a specific heif_context.
|
|
71
|
+
LIBHEIF_API
|
|
72
|
+
const heif_security_limits* heif_get_global_security_limits(void);
|
|
73
|
+
|
|
74
|
+
// Returns a set of fully disabled security limits. Use with care and only after user confirmation.
|
|
75
|
+
LIBHEIF_API
|
|
76
|
+
const heif_security_limits* heif_get_disabled_security_limits(void);
|
|
77
|
+
|
|
78
|
+
// Returns the security limits for a heif_context.
|
|
79
|
+
// By default, the limits are set to the global limits, but you can change them in the returned object.
|
|
80
|
+
LIBHEIF_API
|
|
81
|
+
heif_security_limits* heif_context_get_security_limits(const heif_context*);
|
|
82
|
+
|
|
83
|
+
// Overwrites the security limits of a heif_context.
|
|
84
|
+
// This is a convenience function to easily copy limits.
|
|
85
|
+
LIBHEIF_API
|
|
86
|
+
heif_error heif_context_set_security_limits(heif_context*, const heif_security_limits*);
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
// --- DEPRECATED ---
|
|
90
|
+
|
|
91
|
+
// Set the maximum image size security limit. This function will set the maximum image area (number of pixels)
|
|
92
|
+
// to maximum_width ^ 2. Alternatively to using this function, you can also set the maximum image area
|
|
93
|
+
// in the security limits structure returned by heif_context_get_security_limits().
|
|
94
|
+
LIBHEIF_API
|
|
95
|
+
void heif_context_set_maximum_image_size_limit(heif_context* ctx, int maximum_width);
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
#ifdef __cplusplus
|
|
99
|
+
}
|
|
100
|
+
#endif
|
|
101
|
+
|
|
102
|
+
#endif
|