@revizly/sharp-libvips-dev 1.0.56 → 1.0.58

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 (39) hide show
  1. package/cplusplus/VImage.cpp +15 -0
  2. package/cplusplus/vips-operators.cpp +113 -0
  3. package/include/archive.h +4 -2
  4. package/include/archive_entry.h +1 -1
  5. package/include/expat.h +3 -2
  6. package/include/expat_config.h +3 -3
  7. package/include/expat_external.h +1 -1
  8. package/include/fribidi/fribidi-config.h +2 -2
  9. package/include/harfbuzz/hb-buffer.h +15 -0
  10. package/include/harfbuzz/hb-ot-metrics.h +1 -1
  11. package/include/harfbuzz/hb-version.h +2 -2
  12. package/include/lcms2.h +6 -4
  13. package/include/lcms2_plugin.h +30 -0
  14. package/include/libheif/heif_cxx.h +24 -2
  15. package/include/libheif/heif_image.h +4 -2
  16. package/include/libheif/heif_metadata.h +4 -2
  17. package/include/libheif/heif_sequences.h +1 -0
  18. package/include/libheif/heif_text.h +1 -1
  19. package/include/libheif/heif_version.h +2 -2
  20. package/include/vips/VImage8.h +215 -3
  21. package/include/vips/arithmetic.h +2 -2
  22. package/include/vips/basic.h +8 -0
  23. package/include/vips/colour.h +75 -3
  24. package/include/vips/conversion.h +6 -1
  25. package/include/vips/enumtypes.h +9 -0
  26. package/include/vips/error.h +2 -0
  27. package/include/vips/foreign.h +63 -14
  28. package/include/vips/header.h +17 -0
  29. package/include/vips/histogram.h +3 -0
  30. package/include/vips/image.h +4 -3
  31. package/include/vips/memory.h +1 -0
  32. package/include/vips/operation.h +1 -2
  33. package/include/vips/region.h +3 -0
  34. package/include/vips/threadpool.h +3 -3
  35. package/include/vips/util.h +28 -0
  36. package/include/vips/version.h +8 -8
  37. package/include/vips/vips.h +5 -0
  38. package/package.json +1 -1
  39. package/versions.json +8 -8
@@ -286,6 +286,12 @@ public:
286
286
  VOption *
287
287
  set(const char *name, const char *value);
288
288
 
289
+ /**
290
+ * Set an input pointer option.
291
+ */
292
+ VOption *
293
+ set(const char *name, void *value);
294
+
289
295
  /**
290
296
  * Set a libvips object as an option. These can be images, sources,
291
297
  * targets, etc.
@@ -529,6 +535,16 @@ public:
529
535
  return vips_image_get_yoffset(get_image());
530
536
  }
531
537
 
538
+ /**
539
+ * Return the orientation of the image, or 1 (no rotate, no flip) if
540
+ * not present or crazy.
541
+ */
542
+ int
543
+ orientation() const
544
+ {
545
+ return vips_image_get_orientation(get_image());
546
+ }
547
+
532
548
  /**
533
549
  * TRUE if the image has an alpha channel.
534
550
  */
@@ -2102,6 +2118,13 @@ public:
2102
2118
  // this file is generated automatically, do not edit!
2103
2119
  // clang-format off
2104
2120
 
2121
+ /**
2122
+ * Transform cicp to scrgb.
2123
+ * @param options Set of options.
2124
+ * @return Output image.
2125
+ */
2126
+ VImage CICP2scRGB(VOption *options = nullptr) const;
2127
+
2105
2128
  /**
2106
2129
  * Transform lch to cmc.
2107
2130
  * @param options Set of options.
@@ -2225,6 +2248,13 @@ public:
2225
2248
  */
2226
2249
  VImage Oklch2Oklab(VOption *options = nullptr) const;
2227
2250
 
2251
+ /**
2252
+ * Transform uhdr to scrgb.
2253
+ * @param options Set of options.
2254
+ * @return Output image.
2255
+ */
2256
+ VImage UHDR2scRGB(VOption *options = nullptr) const;
2257
+
2228
2258
  /**
2229
2259
  * Transform xyz to cmyk.
2230
2260
  * @param options Set of options.
@@ -2825,7 +2855,8 @@ public:
2825
2855
  * Load raw camera files.
2826
2856
  *
2827
2857
  * **Optional parameters**
2828
- * - **bitdepth** -- Number of bits per pixel, int.
2858
+ * - **bitdepth** -- Number of bits to decode to, int.
2859
+ * - **half_size** -- Decode image at half size, bool.
2829
2860
  * - **memory** -- Force open via memory, bool.
2830
2861
  * - **access** -- Required access pattern for this file, VipsAccess.
2831
2862
  * - **fail_on** -- Error level to fail on, VipsFailOn.
@@ -2841,7 +2872,8 @@ public:
2841
2872
  * Load raw camera files.
2842
2873
  *
2843
2874
  * **Optional parameters**
2844
- * - **bitdepth** -- Number of bits per pixel, int.
2875
+ * - **bitdepth** -- Number of bits to decode to, int.
2876
+ * - **half_size** -- Decode image at half size, bool.
2845
2877
  * - **memory** -- Force open via memory, bool.
2846
2878
  * - **access** -- Required access pattern for this file, VipsAccess.
2847
2879
  * - **fail_on** -- Error level to fail on, VipsFailOn.
@@ -2857,7 +2889,8 @@ public:
2857
2889
  * Load raw camera files.
2858
2890
  *
2859
2891
  * **Optional parameters**
2860
- * - **bitdepth** -- Number of bits per pixel, int.
2892
+ * - **bitdepth** -- Number of bits to decode to, int.
2893
+ * - **half_size** -- Decode image at half size, bool.
2861
2894
  * - **memory** -- Force open via memory, bool.
2862
2895
  * - **access** -- Required access pattern for this file, VipsAccess.
2863
2896
  * - **fail_on** -- Error level to fail on, VipsFailOn.
@@ -2926,6 +2959,11 @@ public:
2926
2959
 
2927
2960
  /**
2928
2961
  * Draw a line on an image.
2962
+ *
2963
+ * **Optional parameters**
2964
+ * - **draw_point** -- Custom point draw function, void *.
2965
+ * - **client** -- Client data for the point draw function, void *.
2966
+ *
2929
2967
  * @param ink Color for pixels.
2930
2968
  * @param x1 Start of draw_line.
2931
2969
  * @param y1 Start of draw_line.
@@ -4164,6 +4202,8 @@ public:
4164
4202
  * - **lossless** -- Enable lossless compression, bool.
4165
4203
  * - **Q** -- Quality factor, int.
4166
4204
  * - **bitdepth** -- Bit depth, int.
4205
+ * - **interlace** -- Enable progressive (interlaced) encoding, bool.
4206
+ * - **progressive** -- Enable progressive encoding, bool.
4167
4207
  * - **keep** -- Which metadata to retain, VipsForeignKeep.
4168
4208
  * - **background** -- Background value, std::vector<double>.
4169
4209
  * - **page_height** -- Set page height for multipage save, int.
@@ -4184,6 +4224,8 @@ public:
4184
4224
  * - **lossless** -- Enable lossless compression, bool.
4185
4225
  * - **Q** -- Quality factor, int.
4186
4226
  * - **bitdepth** -- Bit depth, int.
4227
+ * - **interlace** -- Enable progressive (interlaced) encoding, bool.
4228
+ * - **progressive** -- Enable progressive encoding, bool.
4187
4229
  * - **keep** -- Which metadata to retain, VipsForeignKeep.
4188
4230
  * - **background** -- Background value, std::vector<double>.
4189
4231
  * - **page_height** -- Set page height for multipage save, int.
@@ -4204,6 +4246,8 @@ public:
4204
4246
  * - **lossless** -- Enable lossless compression, bool.
4205
4247
  * - **Q** -- Quality factor, int.
4206
4248
  * - **bitdepth** -- Bit depth, int.
4249
+ * - **interlace** -- Enable progressive (interlaced) encoding, bool.
4250
+ * - **progressive** -- Enable progressive encoding, bool.
4207
4251
  * - **keep** -- Which metadata to retain, VipsForeignKeep.
4208
4252
  * - **background** -- Background value, std::vector<double>.
4209
4253
  * - **page_height** -- Set page height for multipage save, int.
@@ -5027,6 +5071,18 @@ public:
5027
5071
  */
5028
5072
  int percent(double percent, VOption *options = nullptr) const;
5029
5073
 
5074
+ /**
5075
+ * Find threshold for percent of pixels by bt.709 luminance.
5076
+ *
5077
+ * **Optional parameters**
5078
+ * - **max** -- Histogram upper bound in input unit; values above clamp to the top bin, double.
5079
+ *
5080
+ * @param percent Percentile (0-100) of luminance to return.
5081
+ * @param options Set of options.
5082
+ * @return Luminance value at the requested percentile in input unit.
5083
+ */
5084
+ double percent_lum(double percent, VOption *options = nullptr) const;
5085
+
5030
5086
  /**
5031
5087
  * Make a perlin noise image.
5032
5088
  *
@@ -5054,6 +5110,8 @@ public:
5054
5110
  * Load png from file.
5055
5111
  *
5056
5112
  * **Optional parameters**
5113
+ * - **page** -- First page to load, int.
5114
+ * - **n** -- Number of pages to load, -1 for all, int.
5057
5115
  * - **unlimited** -- Remove all denial of service limits, bool.
5058
5116
  * - **memory** -- Force open via memory, bool.
5059
5117
  * - **access** -- Required access pattern for this file, VipsAccess.
@@ -5070,6 +5128,8 @@ public:
5070
5128
  * Load png from buffer.
5071
5129
  *
5072
5130
  * **Optional parameters**
5131
+ * - **page** -- First page to load, int.
5132
+ * - **n** -- Number of pages to load, -1 for all, int.
5073
5133
  * - **unlimited** -- Remove all denial of service limits, bool.
5074
5134
  * - **memory** -- Force open via memory, bool.
5075
5135
  * - **access** -- Required access pattern for this file, VipsAccess.
@@ -5086,6 +5146,8 @@ public:
5086
5146
  * Load png from source.
5087
5147
  *
5088
5148
  * **Optional parameters**
5149
+ * - **page** -- First page to load, int.
5150
+ * - **n** -- Number of pages to load, -1 for all, int.
5089
5151
  * - **unlimited** -- Remove all denial of service limits, bool.
5090
5152
  * - **memory** -- Force open via memory, bool.
5091
5153
  * - **access** -- Required access pattern for this file, VipsAccess.
@@ -5246,6 +5308,7 @@ public:
5246
5308
  *
5247
5309
  * **Optional parameters**
5248
5310
  * - **max_alpha** -- Maximum value of alpha channel, double.
5311
+ * - **uchar** -- Output should be uchar, bool.
5249
5312
  *
5250
5313
  * @param options Set of options.
5251
5314
  * @return Output image.
@@ -5277,12 +5340,102 @@ public:
5277
5340
 
5278
5341
  /**
5279
5342
  * Find image projections.
5343
+ *
5344
+ * **Optional parameters**
5345
+ * - **combine** -- Combine values with this, VipsCombine.
5346
+ *
5280
5347
  * @param rows Sums of rows.
5281
5348
  * @param options Set of options.
5282
5349
  * @return Sums of columns.
5283
5350
  */
5284
5351
  VImage project(VImage *rows, VOption *options = nullptr) const;
5285
5352
 
5353
+ /**
5354
+ * Load qoi from file.
5355
+ *
5356
+ * **Optional parameters**
5357
+ * - **memory** -- Force open via memory, bool.
5358
+ * - **access** -- Required access pattern for this file, VipsAccess.
5359
+ * - **fail_on** -- Error level to fail on, VipsFailOn.
5360
+ * - **revalidate** -- Don't use a cached result for this operation, bool.
5361
+ *
5362
+ * @param filename Filename to load from.
5363
+ * @param options Set of options.
5364
+ * @return Output image.
5365
+ */
5366
+ static VImage qoiload(const char *filename, VOption *options = nullptr);
5367
+
5368
+ /**
5369
+ * Load qoi from buffer.
5370
+ *
5371
+ * **Optional parameters**
5372
+ * - **memory** -- Force open via memory, bool.
5373
+ * - **access** -- Required access pattern for this file, VipsAccess.
5374
+ * - **fail_on** -- Error level to fail on, VipsFailOn.
5375
+ * - **revalidate** -- Don't use a cached result for this operation, bool.
5376
+ *
5377
+ * @param buffer Buffer to load from.
5378
+ * @param options Set of options.
5379
+ * @return Output image.
5380
+ */
5381
+ static VImage qoiload_buffer(VipsBlob *buffer, VOption *options = nullptr);
5382
+
5383
+ /**
5384
+ * Load qoi from source.
5385
+ *
5386
+ * **Optional parameters**
5387
+ * - **memory** -- Force open via memory, bool.
5388
+ * - **access** -- Required access pattern for this file, VipsAccess.
5389
+ * - **fail_on** -- Error level to fail on, VipsFailOn.
5390
+ *
5391
+ * @param source Source to load from.
5392
+ * @param options Set of options.
5393
+ * @return Output image.
5394
+ */
5395
+ static VImage qoiload_source(VSource source, VOption *options = nullptr);
5396
+
5397
+ /**
5398
+ * Save image to file as qoi.
5399
+ *
5400
+ * **Optional parameters**
5401
+ * - **keep** -- Which metadata to retain, VipsForeignKeep.
5402
+ * - **background** -- Background value, std::vector<double>.
5403
+ * - **page_height** -- Set page height for multipage save, int.
5404
+ * - **profile** -- Filename of ICC profile to embed, const char *.
5405
+ *
5406
+ * @param filename Filename to save to.
5407
+ * @param options Set of options.
5408
+ */
5409
+ void qoisave(const char *filename, VOption *options = nullptr) const;
5410
+
5411
+ /**
5412
+ * Save image to buffer as qoi.
5413
+ *
5414
+ * **Optional parameters**
5415
+ * - **keep** -- Which metadata to retain, VipsForeignKeep.
5416
+ * - **background** -- Background value, std::vector<double>.
5417
+ * - **page_height** -- Set page height for multipage save, int.
5418
+ * - **profile** -- Filename of ICC profile to embed, const char *.
5419
+ *
5420
+ * @param options Set of options.
5421
+ * @return Buffer to save to.
5422
+ */
5423
+ VipsBlob *qoisave_buffer(VOption *options = nullptr) const;
5424
+
5425
+ /**
5426
+ * Save image to target as qoi.
5427
+ *
5428
+ * **Optional parameters**
5429
+ * - **keep** -- Which metadata to retain, VipsForeignKeep.
5430
+ * - **background** -- Background value, std::vector<double>.
5431
+ * - **page_height** -- Set page height for multipage save, int.
5432
+ * - **profile** -- Filename of ICC profile to embed, const char *.
5433
+ *
5434
+ * @param target Target to save to.
5435
+ * @param options Set of options.
5436
+ */
5437
+ void qoisave_target(VTarget target, VOption *options = nullptr) const;
5438
+
5286
5439
  /**
5287
5440
  * Resample an image with a quadratic transform.
5288
5441
  *
@@ -5644,6 +5797,20 @@ public:
5644
5797
  */
5645
5798
  VImage scRGB2BW(VOption *options = nullptr) const;
5646
5799
 
5800
+ /**
5801
+ * Transform scrgb to cicp.
5802
+ *
5803
+ * **Optional parameters**
5804
+ * - **colour_primaries** -- CICP colour primaries (H.273 Table 2), VipsCICPColourPrimaries.
5805
+ * - **transfer_characteristics** -- CICP transfer characteristics (H.273 Table 3), VipsCICPTransferCharacteristics.
5806
+ * - **matrix_coefficients** -- CICP matrix coefficients (H.273 Table 4), VipsCICPMatrixCoefficients.
5807
+ * - **depth** -- Output device space depth in bits, int.
5808
+ *
5809
+ * @param options Set of options.
5810
+ * @return Output image.
5811
+ */
5812
+ VImage scRGB2CICP(VOption *options = nullptr) const;
5813
+
5647
5814
  /**
5648
5815
  * Transform scrgb to xyz.
5649
5816
  * @param options Set of options.
@@ -5807,6 +5974,8 @@ public:
5807
5974
  *
5808
5975
  * **Optional parameters**
5809
5976
  * - **interesting** -- How to measure interestingness, VipsInteresting.
5977
+ * - **interesting_x** -- Horizontal position of the specific point of interest, int.
5978
+ * - **interesting_y** -- Vertical position of the specific point of interest, int.
5810
5979
  * - **premultiplied** -- Input image already has premultiplied alpha, bool.
5811
5980
  *
5812
5981
  * @param width Width of extract area.
@@ -6000,6 +6169,8 @@ public:
6000
6169
  * - **size** -- Only upsize, only downsize, or both, VipsSize.
6001
6170
  * - **no_rotate** -- Don't use orientation tags to rotate image upright, bool.
6002
6171
  * - **crop** -- Reduce to fill target rectangle, then crop, VipsInteresting.
6172
+ * - **interesting_x** -- Horizontal position of the specific point of interest for cropping, int.
6173
+ * - **interesting_y** -- Vertical position of the specific point of interest for cropping, int.
6003
6174
  * - **linear** -- Reduce in linear light, bool.
6004
6175
  * - **input_profile** -- Fallback input profile, const char *.
6005
6176
  * - **output_profile** -- Fallback output profile, const char *.
@@ -6022,6 +6193,8 @@ public:
6022
6193
  * - **size** -- Only upsize, only downsize, or both, VipsSize.
6023
6194
  * - **no_rotate** -- Don't use orientation tags to rotate image upright, bool.
6024
6195
  * - **crop** -- Reduce to fill target rectangle, then crop, VipsInteresting.
6196
+ * - **interesting_x** -- Horizontal position of the specific point of interest for cropping, int.
6197
+ * - **interesting_y** -- Vertical position of the specific point of interest for cropping, int.
6025
6198
  * - **linear** -- Reduce in linear light, bool.
6026
6199
  * - **input_profile** -- Fallback input profile, const char *.
6027
6200
  * - **output_profile** -- Fallback output profile, const char *.
@@ -6043,6 +6216,8 @@ public:
6043
6216
  * - **size** -- Only upsize, only downsize, or both, VipsSize.
6044
6217
  * - **no_rotate** -- Don't use orientation tags to rotate image upright, bool.
6045
6218
  * - **crop** -- Reduce to fill target rectangle, then crop, VipsInteresting.
6219
+ * - **interesting_x** -- Horizontal position of the specific point of interest for cropping, int.
6220
+ * - **interesting_y** -- Vertical position of the specific point of interest for cropping, int.
6046
6221
  * - **linear** -- Reduce in linear light, bool.
6047
6222
  * - **input_profile** -- Fallback input profile, const char *.
6048
6223
  * - **output_profile** -- Fallback output profile, const char *.
@@ -6064,6 +6239,8 @@ public:
6064
6239
  * - **size** -- Only upsize, only downsize, or both, VipsSize.
6065
6240
  * - **no_rotate** -- Don't use orientation tags to rotate image upright, bool.
6066
6241
  * - **crop** -- Reduce to fill target rectangle, then crop, VipsInteresting.
6242
+ * - **interesting_x** -- Horizontal position of the specific point of interest for cropping, int.
6243
+ * - **interesting_y** -- Vertical position of the specific point of interest for cropping, int.
6067
6244
  * - **linear** -- Reduce in linear light, bool.
6068
6245
  * - **input_profile** -- Fallback input profile, const char *.
6069
6246
  * - **output_profile** -- Fallback output profile, const char *.
@@ -6290,6 +6467,7 @@ public:
6290
6467
  * @param options Set of options.
6291
6468
  * @return Output image.
6292
6469
  */
6470
+ G_DEPRECATED
6293
6471
  VImage uhdr2scRGB(VOption *options = nullptr) const;
6294
6472
 
6295
6473
  /**
@@ -6344,6 +6522,17 @@ public:
6344
6522
  *
6345
6523
  * **Optional parameters**
6346
6524
  * - **Q** -- Q factor, int.
6525
+ * - **gainmap_scale_factor** -- The scale factor of base image to gainmap image, int.
6526
+ * - **peak_brightness** -- Target display peak brightness in nits, double.
6527
+ * - **max_content_boost** -- Maximum content boost for the gainmap, double.
6528
+ * - **optimize_coding** -- Compute optimal Huffman coding tables, bool.
6529
+ * - **interlace** -- Generate an interlaced (progressive) jpeg, bool.
6530
+ * - **subsample_mode** -- Select chroma subsample operation mode, VipsForeignSubsample.
6531
+ * - **trellis_quant** -- Apply trellis quantisation to each 8x8 block, bool.
6532
+ * - **overshoot_deringing** -- Apply overshooting to samples with extreme values, bool.
6533
+ * - **optimize_scans** -- Split spectrum of DCT coefficients into separate scans, bool.
6534
+ * - **quant_table** -- Use predefined quantization table with given index, int.
6535
+ * - **restart_interval** -- Add restart markers every specified number of mcu, int.
6347
6536
  * - **keep** -- Which metadata to retain, VipsForeignKeep.
6348
6537
  * - **background** -- Background value, std::vector<double>.
6349
6538
  * - **page_height** -- Set page height for multipage save, int.
@@ -6359,6 +6548,17 @@ public:
6359
6548
  *
6360
6549
  * **Optional parameters**
6361
6550
  * - **Q** -- Q factor, int.
6551
+ * - **gainmap_scale_factor** -- The scale factor of base image to gainmap image, int.
6552
+ * - **peak_brightness** -- Target display peak brightness in nits, double.
6553
+ * - **max_content_boost** -- Maximum content boost for the gainmap, double.
6554
+ * - **optimize_coding** -- Compute optimal Huffman coding tables, bool.
6555
+ * - **interlace** -- Generate an interlaced (progressive) jpeg, bool.
6556
+ * - **subsample_mode** -- Select chroma subsample operation mode, VipsForeignSubsample.
6557
+ * - **trellis_quant** -- Apply trellis quantisation to each 8x8 block, bool.
6558
+ * - **overshoot_deringing** -- Apply overshooting to samples with extreme values, bool.
6559
+ * - **optimize_scans** -- Split spectrum of DCT coefficients into separate scans, bool.
6560
+ * - **quant_table** -- Use predefined quantization table with given index, int.
6561
+ * - **restart_interval** -- Add restart markers every specified number of mcu, int.
6362
6562
  * - **keep** -- Which metadata to retain, VipsForeignKeep.
6363
6563
  * - **background** -- Background value, std::vector<double>.
6364
6564
  * - **page_height** -- Set page height for multipage save, int.
@@ -6374,6 +6574,17 @@ public:
6374
6574
  *
6375
6575
  * **Optional parameters**
6376
6576
  * - **Q** -- Q factor, int.
6577
+ * - **gainmap_scale_factor** -- The scale factor of base image to gainmap image, int.
6578
+ * - **peak_brightness** -- Target display peak brightness in nits, double.
6579
+ * - **max_content_boost** -- Maximum content boost for the gainmap, double.
6580
+ * - **optimize_coding** -- Compute optimal Huffman coding tables, bool.
6581
+ * - **interlace** -- Generate an interlaced (progressive) jpeg, bool.
6582
+ * - **subsample_mode** -- Select chroma subsample operation mode, VipsForeignSubsample.
6583
+ * - **trellis_quant** -- Apply trellis quantisation to each 8x8 block, bool.
6584
+ * - **overshoot_deringing** -- Apply overshooting to samples with extreme values, bool.
6585
+ * - **optimize_scans** -- Split spectrum of DCT coefficients into separate scans, bool.
6586
+ * - **quant_table** -- Use predefined quantization table with given index, int.
6587
+ * - **restart_interval** -- Add restart markers every specified number of mcu, int.
6377
6588
  * - **keep** -- Which metadata to retain, VipsForeignKeep.
6378
6589
  * - **background** -- Background value, std::vector<double>.
6379
6590
  * - **page_height** -- Set page height for multipage save, int.
@@ -6390,6 +6601,7 @@ public:
6390
6601
  * **Optional parameters**
6391
6602
  * - **max_alpha** -- Maximum value of alpha channel, double.
6392
6603
  * - **alpha_band** -- Unpremultiply with this alpha, int.
6604
+ * - **uchar** -- Output should be uchar, bool.
6393
6605
  *
6394
6606
  * @param options Set of options.
6395
6607
  * @return Output image.
@@ -138,8 +138,8 @@ typedef enum {
138
138
  * @VIPS_OPERATION_BOOLEAN_AND: `&`
139
139
  * @VIPS_OPERATION_BOOLEAN_OR: `|`
140
140
  * @VIPS_OPERATION_BOOLEAN_EOR: `^`
141
- * @VIPS_OPERATION_BOOLEAN_LSHIFT: `>>`
142
- * @VIPS_OPERATION_BOOLEAN_RSHIFT: `<<`
141
+ * @VIPS_OPERATION_BOOLEAN_LSHIFT: `<<`
142
+ * @VIPS_OPERATION_BOOLEAN_RSHIFT: `>>`
143
143
  *
144
144
  * See also: [method@Image.boolean].
145
145
  */
@@ -78,6 +78,14 @@
78
78
  #define VIPS_DEPRECATED_ENUMERATOR_FOR(f)
79
79
  #endif
80
80
 
81
+ /* glib-mkenums only recognizes versioned enumerator annotations, so use
82
+ * the <NAMESPACE>_DEPRECATED_ENUMERATOR_IN_<version>_FOR form it expects.
83
+ *
84
+ * See: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1984.
85
+ */
86
+ #define VIPS_DEPRECATED_ENUMERATOR_IN_8_18_FOR(f) \
87
+ VIPS_DEPRECATED_ENUMERATOR_FOR(f)
88
+
81
89
  #ifdef __cplusplus
82
90
  extern "C" {
83
91
  #endif /*__cplusplus*/
@@ -105,15 +105,72 @@ typedef enum {
105
105
  * four standard ones.
106
106
  */
107
107
  VIPS_INTENT_AUTO = 32,
108
- VIPS_INTENT_LAST /*< skip >*/
108
+ VIPS_INTENT_LAST /*< skip >*/
109
109
  } VipsIntent;
110
110
 
111
111
  typedef enum {
112
112
  VIPS_PCS_LAB,
113
113
  VIPS_PCS_XYZ,
114
- VIPS_PCS_LAST /*< skip >*/
114
+ VIPS_PCS_LAST /*< skip >*/
115
115
  } VipsPCS;
116
116
 
117
+ /* ITU-T H.273
118
+ */
119
+ typedef enum {
120
+ VIPS_CICP_COLOUR_PRIMARIES_BT709 = 1, /* sRGB */
121
+ VIPS_CICP_COLOUR_PRIMARIES_UNSPECIFIED = 2,
122
+ VIPS_CICP_COLOUR_PRIMARIES_BT470M = 4,
123
+ VIPS_CICP_COLOUR_PRIMARIES_BT470BG = 5,
124
+ VIPS_CICP_COLOUR_PRIMARIES_BT601 = 6,
125
+ VIPS_CICP_COLOUR_PRIMARIES_SMPTE240 = 7,
126
+ VIPS_CICP_COLOUR_PRIMARIES_GENERIC_FILM = 8,
127
+ VIPS_CICP_COLOUR_PRIMARIES_BT2020 = 9,
128
+ VIPS_CICP_COLOUR_PRIMARIES_SMPTE428 = 10,
129
+ VIPS_CICP_COLOUR_PRIMARIES_SMPTE431 = 11, /*< nick=dci-p3 >*/
130
+ VIPS_CICP_COLOUR_PRIMARIES_SMPTE432 = 12, /*< nick=display-p3 >*/
131
+ VIPS_CICP_COLOUR_PRIMARIES_EBU3213 = 22,
132
+ VIPS_CICP_COLOUR_PRIMARIES_LAST /*< skip >*/
133
+ } VipsCICPColourPrimaries;
134
+
135
+ typedef enum {
136
+ VIPS_CICP_TRANSFER_BT709 = 1,
137
+ VIPS_CICP_TRANSFER_UNSPECIFIED = 2,
138
+ VIPS_CICP_TRANSFER_BT470M = 4, /* gamma 2.2 */
139
+ VIPS_CICP_TRANSFER_BT470BG = 5, /* gamma 2.8 */
140
+ VIPS_CICP_TRANSFER_BT601 = 6,
141
+ VIPS_CICP_TRANSFER_SMPTE240 = 7,
142
+ VIPS_CICP_TRANSFER_LINEAR = 8,
143
+ VIPS_CICP_TRANSFER_LOG_100 = 9,
144
+ VIPS_CICP_TRANSFER_LOG_100_SQRT10 = 10,
145
+ VIPS_CICP_TRANSFER_IEC61966 = 11,
146
+ VIPS_CICP_TRANSFER_BT1361 = 12,
147
+ VIPS_CICP_TRANSFER_SRGB = 13,
148
+ VIPS_CICP_TRANSFER_BT2020_10BIT = 14,
149
+ VIPS_CICP_TRANSFER_BT2020_12BIT = 15,
150
+ VIPS_CICP_TRANSFER_PQ = 16, /* ITU-R BT.2100 PQ */
151
+ VIPS_CICP_TRANSFER_SMPTE428 = 17,
152
+ VIPS_CICP_TRANSFER_HLG = 18, /* ITU-R BT.2100 HLG */
153
+ VIPS_CICP_TRANSFER_LAST /*< skip >*/
154
+ } VipsCICPTransferCharacteristics;
155
+
156
+ typedef enum {
157
+ VIPS_CICP_MATRIX_RGB = 0, /* Identity */
158
+ VIPS_CICP_MATRIX_BT709 = 1,
159
+ VIPS_CICP_MATRIX_UNSPECIFIED = 2,
160
+ VIPS_CICP_MATRIX_FCC = 4,
161
+ VIPS_CICP_MATRIX_BT470BG = 5,
162
+ VIPS_CICP_MATRIX_BT601 = 6,
163
+ VIPS_CICP_MATRIX_SMPTE240 = 7,
164
+ VIPS_CICP_MATRIX_YCGCO = 8,
165
+ VIPS_CICP_MATRIX_BT2020_NCL = 9,
166
+ VIPS_CICP_MATRIX_BT2020_CL = 10,
167
+ VIPS_CICP_MATRIX_SMPTE2085 = 11,
168
+ VIPS_CICP_MATRIX_CHROMA_NCL = 12,
169
+ VIPS_CICP_MATRIX_CHROMA_CL = 13,
170
+ VIPS_CICP_MATRIX_ICTCP = 14,
171
+ VIPS_CICP_MATRIX_LAST /*< skip >*/
172
+ } VipsCICPMatrixCoefficients;
173
+
117
174
  VIPS_API
118
175
  gboolean vips_colourspace_issupported(const VipsImage *image);
119
176
  VIPS_API
@@ -216,10 +273,25 @@ VIPS_API
216
273
  int vips_Oklab2Oklch(VipsImage *in, VipsImage **out, ...)
217
274
  G_GNUC_NULL_TERMINATED;
218
275
 
219
- VIPS_API
276
+ #ifndef __GI_SCANNER__
277
+
278
+ VIPS_DEPRECATED_FOR(vips_UHDR2scRGB)
220
279
  int vips_uhdr2scRGB(VipsImage *in, VipsImage **out, ...)
221
280
  G_GNUC_NULL_TERMINATED;
222
281
 
282
+ #endif /* !__GI_SCANNER__ */
283
+
284
+ VIPS_API
285
+ int vips_UHDR2scRGB(VipsImage *in, VipsImage **out, ...)
286
+ G_GNUC_NULL_TERMINATED;
287
+
288
+ VIPS_API
289
+ int vips_CICP2scRGB(VipsImage *in, VipsImage **out, ...)
290
+ G_GNUC_NULL_TERMINATED;
291
+ VIPS_API
292
+ int vips_scRGB2CICP(VipsImage *in, VipsImage **out, ...)
293
+ G_GNUC_NULL_TERMINATED;
294
+
223
295
  VIPS_API
224
296
  int vips_profile_load(const char *name, VipsBlob **profile, ...)
225
297
  G_GNUC_NULL_TERMINATED;
@@ -102,6 +102,7 @@ typedef enum {
102
102
  VIPS_INTERESTING_LOW,
103
103
  VIPS_INTERESTING_HIGH,
104
104
  VIPS_INTERESTING_ALL,
105
+ VIPS_INTERESTING_SPECIFIC,
105
106
  VIPS_INTERESTING_LAST /*< skip >*/
106
107
  } VipsInteresting;
107
108
 
@@ -131,7 +132,11 @@ typedef enum {
131
132
  VIPS_BLEND_MODE_SOFT_LIGHT,
132
133
  VIPS_BLEND_MODE_DIFFERENCE,
133
134
  VIPS_BLEND_MODE_EXCLUSION,
134
- VIPS_BLEND_MODE_LAST /*< skip >*/
135
+ VIPS_BLEND_MODE_HUE,
136
+ VIPS_BLEND_MODE_SATURATION,
137
+ VIPS_BLEND_MODE_COLOUR,
138
+ VIPS_BLEND_MODE_LUMINOSITY,
139
+ VIPS_BLEND_MODE_LAST /*< skip >*/
135
140
  } VipsBlendMode;
136
141
 
137
142
  VIPS_API
@@ -41,6 +41,15 @@ GType vips_intent_get_type(void);
41
41
  VIPS_API
42
42
  GType vips_pcs_get_type(void);
43
43
  #define VIPS_TYPE_PCS (vips_pcs_get_type())
44
+ VIPS_API
45
+ GType vips_cicp_colour_primaries_get_type(void);
46
+ #define VIPS_TYPE_CICP_COLOUR_PRIMARIES (vips_cicp_colour_primaries_get_type())
47
+ VIPS_API
48
+ GType vips_cicp_transfer_characteristics_get_type(void);
49
+ #define VIPS_TYPE_CICP_TRANSFER_CHARACTERISTICS (vips_cicp_transfer_characteristics_get_type())
50
+ VIPS_API
51
+ GType vips_cicp_matrix_coefficients_get_type(void);
52
+ #define VIPS_TYPE_CICP_MATRIX_COEFFICIENTS (vips_cicp_matrix_coefficients_get_type())
44
53
  /* enumerations from "conversion.h" */
45
54
  VIPS_API
46
55
  GType vips_extend_get_type(void);
@@ -67,6 +67,8 @@ VIPS_API
67
67
  void vips_error_exit(const char *fmt, ...)
68
68
  G_GNUC_NORETURN G_GNUC_PRINTF(1, 2);
69
69
 
70
+ VIPS_API
71
+ int vips_check_draw(const char *domain, VipsImage *image);
70
72
  VIPS_API
71
73
  int vips_check_uncoded(const char *domain, VipsImage *im);
72
74
  VIPS_API