@img/sharp-libvips-dev 0.0.1 → 0.0.2

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 (103) hide show
  1. package/README.md +2 -2
  2. package/cplusplus/VConnection.cpp +54 -54
  3. package/cplusplus/VError.cpp +20 -18
  4. package/cplusplus/VImage.cpp +636 -589
  5. package/cplusplus/VInterpolate.cpp +22 -22
  6. package/cplusplus/VRegion.cpp +4 -4
  7. package/cplusplus/vips-operators.cpp +2326 -2301
  8. package/include/aom/aom_codec.h +10 -6
  9. package/include/aom/aom_decoder.h +1 -1
  10. package/include/aom/aom_encoder.h +9 -2
  11. package/include/aom/aomcx.h +72 -3
  12. package/include/cairo/cairo-ft.h +1 -1
  13. package/include/cairo/cairo-gobject.h +8 -0
  14. package/include/cairo/cairo-svg.h +3 -3
  15. package/include/cairo/cairo-version.h +2 -2
  16. package/include/cairo/cairo.h +91 -24
  17. package/include/harfbuzz/hb-version.h +2 -2
  18. package/include/hwy/aligned_allocator.h +211 -0
  19. package/include/hwy/base.h +1517 -0
  20. package/include/hwy/cache_control.h +108 -0
  21. package/include/hwy/detect_compiler_arch.h +281 -0
  22. package/include/hwy/detect_targets.h +644 -0
  23. package/include/hwy/foreach_target.h +340 -0
  24. package/include/hwy/highway.h +435 -0
  25. package/include/hwy/highway_export.h +74 -0
  26. package/include/hwy/nanobenchmark.h +171 -0
  27. package/include/hwy/ops/arm_neon-inl.h +8913 -0
  28. package/include/hwy/ops/arm_sve-inl.h +5105 -0
  29. package/include/hwy/ops/emu128-inl.h +2811 -0
  30. package/include/hwy/ops/generic_ops-inl.h +4745 -0
  31. package/include/hwy/ops/ppc_vsx-inl.h +5716 -0
  32. package/include/hwy/ops/rvv-inl.h +5070 -0
  33. package/include/hwy/ops/scalar-inl.h +1995 -0
  34. package/include/hwy/ops/set_macros-inl.h +578 -0
  35. package/include/hwy/ops/shared-inl.h +539 -0
  36. package/include/hwy/ops/tuple-inl.h +125 -0
  37. package/include/hwy/ops/wasm_128-inl.h +5917 -0
  38. package/include/hwy/ops/x86_128-inl.h +11173 -0
  39. package/include/hwy/ops/x86_256-inl.h +7529 -0
  40. package/include/hwy/ops/x86_512-inl.h +6849 -0
  41. package/include/hwy/per_target.h +44 -0
  42. package/include/hwy/print-inl.h +62 -0
  43. package/include/hwy/print.h +75 -0
  44. package/include/hwy/robust_statistics.h +148 -0
  45. package/include/hwy/targets.h +338 -0
  46. package/include/hwy/timer-inl.h +200 -0
  47. package/include/hwy/timer.h +55 -0
  48. package/include/jconfig.h +2 -2
  49. package/include/jpeglib.h +3 -2
  50. package/include/libheif/heif.h +443 -377
  51. package/include/libheif/heif_cxx.h +4 -1
  52. package/include/libheif/heif_plugin.h +1 -1
  53. package/include/libheif/heif_properties.h +138 -0
  54. package/include/libheif/heif_regions.h +866 -0
  55. package/include/libheif/heif_version.h +3 -3
  56. package/include/vips/VConnection8.h +43 -49
  57. package/include/vips/VError8.h +27 -24
  58. package/include/vips/VImage8.h +4861 -4597
  59. package/include/vips/VInterpolate8.h +24 -27
  60. package/include/vips/VRegion8.h +32 -33
  61. package/include/vips/arithmetic.h +169 -169
  62. package/include/vips/basic.h +33 -33
  63. package/include/vips/buf.h +56 -54
  64. package/include/vips/colour.h +95 -95
  65. package/include/vips/connection.h +190 -193
  66. package/include/vips/conversion.h +91 -91
  67. package/include/vips/convolution.h +36 -30
  68. package/include/vips/create.h +63 -63
  69. package/include/vips/dbuf.h +35 -37
  70. package/include/vips/debug.h +65 -33
  71. package/include/vips/draw.h +41 -41
  72. package/include/vips/enumtypes.h +54 -51
  73. package/include/vips/error.h +63 -63
  74. package/include/vips/foreign.h +263 -223
  75. package/include/vips/format.h +48 -48
  76. package/include/vips/freqfilt.h +22 -22
  77. package/include/vips/gate.h +55 -47
  78. package/include/vips/generate.h +34 -34
  79. package/include/vips/header.h +111 -101
  80. package/include/vips/histogram.h +28 -28
  81. package/include/vips/image.h +213 -213
  82. package/include/vips/interpolate.h +40 -41
  83. package/include/vips/memory.h +61 -52
  84. package/include/vips/morphology.h +24 -24
  85. package/include/vips/mosaicing.h +32 -33
  86. package/include/vips/object.h +371 -357
  87. package/include/vips/operation.h +68 -67
  88. package/include/vips/private.h +76 -76
  89. package/include/vips/rect.h +26 -26
  90. package/include/vips/region.h +92 -92
  91. package/include/vips/resample.h +38 -38
  92. package/include/vips/sbuf.h +53 -54
  93. package/include/vips/semaphore.h +24 -24
  94. package/include/vips/thread.h +30 -27
  95. package/include/vips/threadpool.h +48 -49
  96. package/include/vips/transform.h +39 -39
  97. package/include/vips/type.h +90 -85
  98. package/include/vips/util.h +274 -229
  99. package/include/vips/vector.h +24 -144
  100. package/include/vips/version.h +9 -9
  101. package/include/vips/vips.h +41 -40
  102. package/package.json +1 -1
  103. package/versions.json +7 -7
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * C++ interface to libheif
3
- * Copyright (c) 2018 struktur AG, Dirk Farin <farin@struktur.de>
3
+ * Copyright (c) 2018 Dirk Farin <dirk.farin@gmail.com>
4
4
  *
5
5
  * This file is part of libheif.
6
6
  *
@@ -24,6 +24,7 @@
24
24
  #include <memory>
25
25
  #include <string>
26
26
  #include <vector>
27
+ #include <cassert>
27
28
 
28
29
  extern "C" {
29
30
  #include <libheif/heif.h>
@@ -44,6 +45,8 @@ namespace heif {
44
45
 
45
46
  Error(const heif_error& err)
46
47
  {
48
+ assert(err.message);
49
+
47
50
  m_code = err.code;
48
51
  m_subcode = err.subcode;
49
52
  m_message = err.message;
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * HEIF codec.
3
- * Copyright (c) 2017 struktur AG, Dirk Farin <farin@struktur.de>
3
+ * Copyright (c) 2017 Dirk Farin <dirk.farin@gmail.com>
4
4
  *
5
5
  * This file is part of libheif.
6
6
  *
@@ -0,0 +1,138 @@
1
+ /*
2
+ * HEIF codec.
3
+ * Copyright (c) 2017-2023 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_PROPERTIES_H
22
+ #define LIBHEIF_HEIF_PROPERTIES_H
23
+
24
+ #include "libheif/heif.h"
25
+
26
+ #ifdef __cplusplus
27
+ extern "C" {
28
+ #endif
29
+
30
+ // ------------------------- item properties -------------------------
31
+
32
+ enum heif_item_property_type
33
+ {
34
+ // heif_item_property_unknown = -1,
35
+ heif_item_property_type_invalid = 0,
36
+ heif_item_property_type_user_description = heif_fourcc('u', 'd', 'e', 's'),
37
+ heif_item_property_type_transform_mirror = heif_fourcc('i', 'm', 'i', 'r'),
38
+ heif_item_property_type_transform_rotation = heif_fourcc('i', 'r', 'o', 't'),
39
+ heif_item_property_type_transform_crop = heif_fourcc('c', 'l', 'a', 'p'),
40
+ heif_item_property_type_image_size = heif_fourcc('i', 's', 'p', 'e')
41
+ };
42
+
43
+ // Get the heif_property_id for a heif_item_id.
44
+ // You may specify which property 'type' you want to receive.
45
+ // If you specify 'heif_item_property_type_invalid', all properties associated to that item are returned.
46
+ // The number of properties is returned, which are not more than 'count' if (out_list != nullptr).
47
+ // By setting out_list==nullptr, you can query the number of properties, 'count' is ignored.
48
+ LIBHEIF_API
49
+ int heif_item_get_properties_of_type(const struct heif_context* context,
50
+ heif_item_id id,
51
+ enum heif_item_property_type type,
52
+ heif_property_id* out_list,
53
+ int count);
54
+
55
+ // Returns all transformative properties in the correct order.
56
+ // This includes "irot", "imir", "clap".
57
+ // The number of properties is returned, which are not more than 'count' if (out_list != nullptr).
58
+ // By setting out_list==nullptr, you can query the number of properties, 'count' is ignored.
59
+ LIBHEIF_API
60
+ int heif_item_get_transformation_properties(const struct heif_context* context,
61
+ heif_item_id id,
62
+ heif_property_id* out_list,
63
+ int count);
64
+
65
+ LIBHEIF_API
66
+ enum heif_item_property_type heif_item_get_property_type(const struct heif_context* context,
67
+ heif_item_id id,
68
+ heif_property_id property_id);
69
+
70
+ // The strings are managed by libheif. They will be deleted in heif_property_user_description_release().
71
+ struct heif_property_user_description
72
+ {
73
+ int version;
74
+
75
+ // version 1
76
+
77
+ const char* lang;
78
+ const char* name;
79
+ const char* description;
80
+ const char* tags;
81
+ };
82
+
83
+ // Get the "udes" user description property content.
84
+ // Undefined strings are returned as empty strings.
85
+ LIBHEIF_API
86
+ struct heif_error heif_item_get_property_user_description(const struct heif_context* context,
87
+ heif_item_id itemId,
88
+ heif_property_id propertyId,
89
+ struct heif_property_user_description** out);
90
+
91
+ // Add a "udes" user description property to the item.
92
+ // If any string pointers are NULL, an empty string will be used instead.
93
+ LIBHEIF_API
94
+ struct heif_error heif_item_add_property_user_description(const struct heif_context* context,
95
+ heif_item_id itemId,
96
+ const struct heif_property_user_description* description,
97
+ heif_property_id* out_propertyId);
98
+
99
+ // Release all strings and the object itself.
100
+ // Only call for objects that you received from heif_item_get_property_user_description().
101
+ LIBHEIF_API
102
+ void heif_property_user_description_release(struct heif_property_user_description*);
103
+
104
+ enum heif_transform_mirror_direction
105
+ {
106
+ heif_transform_mirror_direction_invalid = -1,
107
+ heif_transform_mirror_direction_vertical = 0, // flip image vertically
108
+ heif_transform_mirror_direction_horizontal = 1 // flip image horizontally
109
+ };
110
+
111
+ // Will return 'heif_transform_mirror_direction_invalid' in case of error.
112
+ LIBHEIF_API
113
+ enum heif_transform_mirror_direction heif_item_get_property_transform_mirror(const struct heif_context* context,
114
+ heif_item_id itemId,
115
+ heif_property_id propertyId);
116
+
117
+ // Returns only 0, 90, 180, or 270 angle values.
118
+ // Returns -1 in case of error (but it will only return an error in case of wrong usage).
119
+ LIBHEIF_API
120
+ int heif_item_get_property_transform_rotation_ccw(const struct heif_context* context,
121
+ heif_item_id itemId,
122
+ heif_property_id propertyId);
123
+
124
+ // Returns the number of pixels that should be removed from the four edges.
125
+ // Because of the way this data is stored, you have to pass the image size at the moment of the crop operation
126
+ // to compute the cropped border sizes.
127
+ LIBHEIF_API
128
+ void heif_item_get_property_transform_crop_borders(const struct heif_context* context,
129
+ heif_item_id itemId,
130
+ heif_property_id propertyId,
131
+ int image_width, int image_height,
132
+ int* left, int* top, int* right, int* bottom);
133
+
134
+ #ifdef __cplusplus
135
+ }
136
+ #endif
137
+
138
+ #endif