@img/sharp-libvips-dev-wasm32 1.3.0-rc.4 → 1.3.0-rc.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.
Files changed (59) hide show
  1. package/include/libheif/heif_aux_images.h +2 -2
  2. package/include/libheif/heif_brands.h +13 -4
  3. package/include/libheif/heif_color.h +14 -14
  4. package/include/libheif/heif_context.h +17 -4
  5. package/include/libheif/heif_decoding.h +2 -2
  6. package/include/libheif/heif_encoding.h +29 -5
  7. package/include/libheif/heif_error.h +4 -4
  8. package/include/libheif/heif_image.h +52 -8
  9. package/include/libheif/heif_image_handle.h +42 -0
  10. package/include/libheif/heif_library.h +2 -2
  11. package/include/libheif/heif_metadata.h +2 -2
  12. package/include/libheif/heif_plugin.h +4 -4
  13. package/include/libheif/heif_properties.h +16 -4
  14. package/include/libheif/heif_regions.h +2 -2
  15. package/include/libheif/heif_security.h +5 -0
  16. package/include/libheif/heif_sequences.h +10 -10
  17. package/include/libheif/heif_uncompressed.h +327 -23
  18. package/include/libheif/heif_uncompressed_types.h +143 -0
  19. package/include/libpng16/png.h +7 -7
  20. package/include/libpng16/pngconf.h +1 -1
  21. package/include/libpng16/pnglibconf.h +1 -1
  22. package/include/png.h +7 -7
  23. package/include/pngconf.h +1 -1
  24. package/include/pnglibconf.h +1 -1
  25. package/lib/libaom.a +0 -0
  26. package/lib/libcgif.a +0 -0
  27. package/lib/libexif.a +0 -0
  28. package/lib/libexpat.a +0 -0
  29. package/lib/libffi.a +0 -0
  30. package/lib/libgio-2.0.a +0 -0
  31. package/lib/libglib-2.0.a +0 -0
  32. package/lib/libgmodule-2.0.a +0 -0
  33. package/lib/libgobject-2.0.a +0 -0
  34. package/lib/libgthread-2.0.a +0 -0
  35. package/lib/libheif.a +0 -0
  36. package/lib/libhwy.a +0 -0
  37. package/lib/libimagequant.a +0 -0
  38. package/lib/libjpeg.a +0 -0
  39. package/lib/liblcms2.a +0 -0
  40. package/lib/libpng.a +0 -0
  41. package/lib/libpng.la +2 -2
  42. package/lib/libpng16.a +0 -0
  43. package/lib/libpng16.la +2 -2
  44. package/lib/libresvg.a +0 -0
  45. package/lib/libsharpyuv.a +0 -0
  46. package/lib/libtiff.a +0 -0
  47. package/lib/libuhdr.a +0 -0
  48. package/lib/libvips-cpp.a +0 -0
  49. package/lib/libvips.a +0 -0
  50. package/lib/libwebp.a +0 -0
  51. package/lib/libwebpdemux.a +0 -0
  52. package/lib/libwebpmux.a +0 -0
  53. package/lib/libz.a +0 -0
  54. package/lib/pkgconfig/aom.pc +2 -2
  55. package/lib/pkgconfig/libheif.pc +1 -1
  56. package/lib/pkgconfig/libpng.pc +1 -1
  57. package/lib/pkgconfig/libpng16.pc +1 -1
  58. package/package.json +1 -1
  59. package/versions.json +4 -4
@@ -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
- enum heif_orientation image_orientation;
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
- enum heif_channel
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
@@ -29,7 +29,7 @@ extern "C" {
29
29
 
30
30
  // ------------------------- item properties -------------------------
31
31
 
32
- enum heif_item_property_type
32
+ typedef enum heif_item_property_type
33
33
  {
34
34
  // heif_item_property_unknown = -1,
35
35
  heif_item_property_type_invalid = 0,
@@ -42,7 +42,7 @@ enum heif_item_property_type
42
42
  heif_item_property_type_tai_clock_info = heif_fourcc('t', 'a', 'i', 'c'),
43
43
  heif_item_property_type_tai_timestamp = heif_fourcc('i', 't', 'a', 'i'),
44
44
  heif_item_property_type_extended_language = heif_fourcc('e', 'l', 'n', 'g')
45
- };
45
+ } heif_item_property_type;
46
46
 
47
47
  // Get the heif_property_id for a heif_item_id.
48
48
  // You may specify which property 'type' you want to receive.
@@ -105,12 +105,12 @@ heif_error heif_item_add_property_user_description(const heif_context* context,
105
105
  LIBHEIF_API
106
106
  void heif_property_user_description_release(heif_property_user_description*);
107
107
 
108
- enum heif_transform_mirror_direction
108
+ typedef enum heif_transform_mirror_direction
109
109
  {
110
110
  heif_transform_mirror_direction_invalid = -1,
111
111
  heif_transform_mirror_direction_vertical = 0, // flip image vertically
112
112
  heif_transform_mirror_direction_horizontal = 1 // flip image horizontally
113
- };
113
+ } heif_transform_mirror_direction;
114
114
 
115
115
  // Will return 'heif_transform_mirror_direction_invalid' in case of error.
116
116
  // If 'propertyId==0', it returns the first imir property found.
@@ -228,6 +228,18 @@ LIBHEIF_API
228
228
  heif_error heif_camera_extrinsic_matrix_get_rotation_matrix(const heif_camera_extrinsic_matrix*,
229
229
  double* out_matrix_row_major);
230
230
 
231
+ #if HEIF_WITH_OMAF
232
+ // ------------------------- OMAF projection information -------------------------
233
+ LIBHEIF_API
234
+ int heif_image_handle_has_omaf_image_projection(const heif_image_handle* handle);
235
+
236
+ LIBHEIF_API
237
+ heif_omaf_image_projection heif_image_handle_get_omaf_image_projection(const heif_image_handle* handle);
238
+
239
+ LIBHEIF_API
240
+ void heif_image_handle_set_omaf_image_projection(const heif_image_handle* handle, heif_omaf_image_projection image_projection);
241
+ #endif
242
+
231
243
  #ifdef __cplusplus
232
244
  }
233
245
  #endif
@@ -42,7 +42,7 @@ typedef struct heif_region_item heif_region_item;
42
42
  * Each region item will contain zero or more regions, which may have different geometry or
43
43
  * mask representations.
44
44
  */
45
- enum heif_region_type
45
+ typedef enum heif_region_type
46
46
  {
47
47
  /**
48
48
  * Point geometry.
@@ -121,7 +121,7 @@ enum heif_region_type
121
121
  * considered to form a closed surface. Only the edge is part of the region.
122
122
  */
123
123
  heif_region_type_polyline = 6
124
- };
124
+ } heif_region_type;
125
125
 
126
126
  typedef struct heif_region heif_region;
127
127
 
@@ -45,6 +45,7 @@ typedef struct heif_security_limits
45
45
  // in 1.5 GB memory need for YUV-4:2:0 or 4 GB for RGB32.
46
46
  uint64_t max_image_size_pixels;
47
47
  uint64_t max_number_of_tiles;
48
+ // Also used for polarization pattern (splz) size limit.
48
49
  uint32_t max_bayer_pattern_pixels;
49
50
  uint32_t max_items;
50
51
 
@@ -68,6 +69,10 @@ typedef struct heif_security_limits
68
69
 
69
70
  uint32_t max_sequence_frames;
70
71
  uint32_t max_number_of_file_brands;
72
+
73
+ // --- version 4
74
+
75
+ uint32_t max_bad_pixels;
71
76
  } heif_security_limits;
72
77
 
73
78