@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.
- package/README.md +2 -2
- package/cplusplus/VConnection.cpp +54 -54
- package/cplusplus/VError.cpp +20 -18
- package/cplusplus/VImage.cpp +636 -589
- package/cplusplus/VInterpolate.cpp +22 -22
- package/cplusplus/VRegion.cpp +4 -4
- package/cplusplus/vips-operators.cpp +2326 -2301
- package/include/aom/aom_codec.h +10 -6
- package/include/aom/aom_decoder.h +1 -1
- package/include/aom/aom_encoder.h +9 -2
- package/include/aom/aomcx.h +72 -3
- package/include/cairo/cairo-ft.h +1 -1
- package/include/cairo/cairo-gobject.h +8 -0
- package/include/cairo/cairo-svg.h +3 -3
- package/include/cairo/cairo-version.h +2 -2
- package/include/cairo/cairo.h +91 -24
- package/include/harfbuzz/hb-version.h +2 -2
- package/include/hwy/aligned_allocator.h +211 -0
- package/include/hwy/base.h +1517 -0
- package/include/hwy/cache_control.h +108 -0
- package/include/hwy/detect_compiler_arch.h +281 -0
- package/include/hwy/detect_targets.h +644 -0
- package/include/hwy/foreach_target.h +340 -0
- package/include/hwy/highway.h +435 -0
- package/include/hwy/highway_export.h +74 -0
- package/include/hwy/nanobenchmark.h +171 -0
- package/include/hwy/ops/arm_neon-inl.h +8913 -0
- package/include/hwy/ops/arm_sve-inl.h +5105 -0
- package/include/hwy/ops/emu128-inl.h +2811 -0
- package/include/hwy/ops/generic_ops-inl.h +4745 -0
- package/include/hwy/ops/ppc_vsx-inl.h +5716 -0
- package/include/hwy/ops/rvv-inl.h +5070 -0
- package/include/hwy/ops/scalar-inl.h +1995 -0
- package/include/hwy/ops/set_macros-inl.h +578 -0
- package/include/hwy/ops/shared-inl.h +539 -0
- package/include/hwy/ops/tuple-inl.h +125 -0
- package/include/hwy/ops/wasm_128-inl.h +5917 -0
- package/include/hwy/ops/x86_128-inl.h +11173 -0
- package/include/hwy/ops/x86_256-inl.h +7529 -0
- package/include/hwy/ops/x86_512-inl.h +6849 -0
- package/include/hwy/per_target.h +44 -0
- package/include/hwy/print-inl.h +62 -0
- package/include/hwy/print.h +75 -0
- package/include/hwy/robust_statistics.h +148 -0
- package/include/hwy/targets.h +338 -0
- package/include/hwy/timer-inl.h +200 -0
- package/include/hwy/timer.h +55 -0
- package/include/jconfig.h +2 -2
- package/include/jpeglib.h +3 -2
- package/include/libheif/heif.h +443 -377
- package/include/libheif/heif_cxx.h +4 -1
- package/include/libheif/heif_plugin.h +1 -1
- package/include/libheif/heif_properties.h +138 -0
- package/include/libheif/heif_regions.h +866 -0
- package/include/libheif/heif_version.h +3 -3
- package/include/vips/VConnection8.h +43 -49
- package/include/vips/VError8.h +27 -24
- package/include/vips/VImage8.h +4861 -4597
- package/include/vips/VInterpolate8.h +24 -27
- package/include/vips/VRegion8.h +32 -33
- package/include/vips/arithmetic.h +169 -169
- package/include/vips/basic.h +33 -33
- package/include/vips/buf.h +56 -54
- package/include/vips/colour.h +95 -95
- package/include/vips/connection.h +190 -193
- package/include/vips/conversion.h +91 -91
- package/include/vips/convolution.h +36 -30
- package/include/vips/create.h +63 -63
- package/include/vips/dbuf.h +35 -37
- package/include/vips/debug.h +65 -33
- package/include/vips/draw.h +41 -41
- package/include/vips/enumtypes.h +54 -51
- package/include/vips/error.h +63 -63
- package/include/vips/foreign.h +263 -223
- package/include/vips/format.h +48 -48
- package/include/vips/freqfilt.h +22 -22
- package/include/vips/gate.h +55 -47
- package/include/vips/generate.h +34 -34
- package/include/vips/header.h +111 -101
- package/include/vips/histogram.h +28 -28
- package/include/vips/image.h +213 -213
- package/include/vips/interpolate.h +40 -41
- package/include/vips/memory.h +61 -52
- package/include/vips/morphology.h +24 -24
- package/include/vips/mosaicing.h +32 -33
- package/include/vips/object.h +371 -357
- package/include/vips/operation.h +68 -67
- package/include/vips/private.h +76 -76
- package/include/vips/rect.h +26 -26
- package/include/vips/region.h +92 -92
- package/include/vips/resample.h +38 -38
- package/include/vips/sbuf.h +53 -54
- package/include/vips/semaphore.h +24 -24
- package/include/vips/thread.h +30 -27
- package/include/vips/threadpool.h +48 -49
- package/include/vips/transform.h +39 -39
- package/include/vips/type.h +90 -85
- package/include/vips/util.h +274 -229
- package/include/vips/vector.h +24 -144
- package/include/vips/version.h +9 -9
- package/include/vips/vips.h +41 -40
- package/package.json +1 -1
- package/versions.json +7 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* C++ interface to libheif
|
|
3
|
-
* Copyright (c) 2018
|
|
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;
|
|
@@ -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
|