@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
package/include/vips/region.h
CHANGED
|
@@ -8,28 +8,28 @@
|
|
|
8
8
|
|
|
9
9
|
/*
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
This file is part of VIPS.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
VIPS is free software; you can redistribute it and/or modify
|
|
14
|
+
it under the terms of the GNU Lesser General Public License as published by
|
|
15
|
+
the Free Software Foundation; either version 2 of the License, or
|
|
16
|
+
(at your option) any later version.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
This program is distributed in the hope that it will be useful,
|
|
19
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
20
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
21
|
+
GNU Lesser General Public License for more details.
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
You should have received a copy of the GNU Lesser General Public License
|
|
24
|
+
along with this program; if not, write to the Free Software
|
|
25
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
26
|
+
02110-1301 USA
|
|
27
27
|
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
30
|
/*
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
|
33
33
|
|
|
34
34
|
*/
|
|
35
35
|
|
|
@@ -48,19 +48,19 @@ extern "C" {
|
|
|
48
48
|
#endif /*__cplusplus*/
|
|
49
49
|
|
|
50
50
|
#define VIPS_TYPE_REGION (vips_region_get_type())
|
|
51
|
-
#define VIPS_REGION(
|
|
52
|
-
(G_TYPE_CHECK_INSTANCE_CAST(
|
|
53
|
-
|
|
54
|
-
#define VIPS_REGION_CLASS(
|
|
55
|
-
(G_TYPE_CHECK_CLASS_CAST(
|
|
56
|
-
|
|
57
|
-
#define VIPS_IS_REGION(
|
|
58
|
-
(G_TYPE_CHECK_INSTANCE_TYPE(
|
|
59
|
-
#define VIPS_IS_REGION_CLASS(
|
|
60
|
-
(G_TYPE_CHECK_CLASS_TYPE(
|
|
61
|
-
#define VIPS_REGION_GET_CLASS(
|
|
62
|
-
(G_TYPE_INSTANCE_GET_CLASS(
|
|
63
|
-
|
|
51
|
+
#define VIPS_REGION(obj) \
|
|
52
|
+
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
|
53
|
+
VIPS_TYPE_REGION, VipsRegion))
|
|
54
|
+
#define VIPS_REGION_CLASS(klass) \
|
|
55
|
+
(G_TYPE_CHECK_CLASS_CAST((klass), \
|
|
56
|
+
VIPS_TYPE_REGION, VipsRegionClass))
|
|
57
|
+
#define VIPS_IS_REGION(obj) \
|
|
58
|
+
(G_TYPE_CHECK_INSTANCE_TYPE((obj), VIPS_TYPE_REGION))
|
|
59
|
+
#define VIPS_IS_REGION_CLASS(klass) \
|
|
60
|
+
(G_TYPE_CHECK_CLASS_TYPE((klass), VIPS_TYPE_REGION))
|
|
61
|
+
#define VIPS_REGION_GET_CLASS(obj) \
|
|
62
|
+
(G_TYPE_INSTANCE_GET_CLASS((obj), \
|
|
63
|
+
VIPS_TYPE_REGION, VipsRegionClass))
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* VipsRegionShrink:
|
|
@@ -93,16 +93,16 @@ struct _VipsRegion {
|
|
|
93
93
|
/*< public >*/
|
|
94
94
|
/* Users may read these two fields.
|
|
95
95
|
*/
|
|
96
|
-
VipsImage *im;
|
|
97
|
-
VipsRect valid;
|
|
96
|
+
VipsImage *im; /* Link back to parent image */
|
|
97
|
+
VipsRect valid; /* Area of parent we can see */
|
|
98
98
|
|
|
99
99
|
/* The rest of VipsRegion is private.
|
|
100
100
|
*/
|
|
101
101
|
/*< private >*/
|
|
102
|
-
RegionType type;
|
|
103
|
-
VipsPel *data;
|
|
104
|
-
int bpl;
|
|
105
|
-
void *seq;
|
|
102
|
+
RegionType type; /* What kind of attachment */
|
|
103
|
+
VipsPel *data; /* Off here to get data */
|
|
104
|
+
int bpl; /* Bytes-per-line for data */
|
|
105
|
+
void *seq; /* Sequence we are using to fill region */
|
|
106
106
|
|
|
107
107
|
/* The thread that made this region. Used to assert() test that
|
|
108
108
|
* regions are not being shared between threads.
|
|
@@ -120,7 +120,7 @@ struct _VipsRegion {
|
|
|
120
120
|
/* The image this region is on has changed and caches need to be
|
|
121
121
|
* dropped.
|
|
122
122
|
*/
|
|
123
|
-
gboolean invalid;
|
|
123
|
+
gboolean invalid;
|
|
124
124
|
};
|
|
125
125
|
|
|
126
126
|
typedef struct _VipsRegionClass {
|
|
@@ -134,102 +134,102 @@ VIPS_API
|
|
|
134
134
|
GType vips_region_get_type(void);
|
|
135
135
|
|
|
136
136
|
VIPS_API
|
|
137
|
-
VipsRegion *vips_region_new(
|
|
137
|
+
VipsRegion *vips_region_new(VipsImage *image);
|
|
138
138
|
|
|
139
139
|
VIPS_API
|
|
140
|
-
int vips_region_buffer(
|
|
140
|
+
int vips_region_buffer(VipsRegion *reg, const VipsRect *r);
|
|
141
141
|
VIPS_API
|
|
142
|
-
int vips_region_image(
|
|
142
|
+
int vips_region_image(VipsRegion *reg, const VipsRect *r);
|
|
143
143
|
VIPS_API
|
|
144
|
-
int vips_region_region(
|
|
145
|
-
const VipsRect *r, int x, int y
|
|
144
|
+
int vips_region_region(VipsRegion *reg, VipsRegion *dest,
|
|
145
|
+
const VipsRect *r, int x, int y);
|
|
146
146
|
VIPS_API
|
|
147
|
-
int vips_region_equalsregion(
|
|
147
|
+
int vips_region_equalsregion(VipsRegion *reg1, VipsRegion *reg2);
|
|
148
148
|
VIPS_API
|
|
149
|
-
int vips_region_position(
|
|
149
|
+
int vips_region_position(VipsRegion *reg, int x, int y);
|
|
150
150
|
|
|
151
151
|
VIPS_API
|
|
152
|
-
void vips_region_paint(
|
|
152
|
+
void vips_region_paint(VipsRegion *reg, const VipsRect *r, int value);
|
|
153
153
|
VIPS_API
|
|
154
|
-
void vips_region_paint_pel(
|
|
155
|
-
const VipsRect *r, const VipsPel *ink
|
|
154
|
+
void vips_region_paint_pel(VipsRegion *reg,
|
|
155
|
+
const VipsRect *r, const VipsPel *ink);
|
|
156
156
|
VIPS_API
|
|
157
|
-
void vips_region_black(
|
|
157
|
+
void vips_region_black(VipsRegion *reg);
|
|
158
158
|
VIPS_API
|
|
159
|
-
void vips_region_copy(
|
|
160
|
-
const VipsRect *r, int x, int y
|
|
159
|
+
void vips_region_copy(VipsRegion *reg, VipsRegion *dest,
|
|
160
|
+
const VipsRect *r, int x, int y);
|
|
161
161
|
VIPS_API
|
|
162
|
-
int vips_region_shrink_method(
|
|
163
|
-
const VipsRect *target, VipsRegionShrink method
|
|
162
|
+
int vips_region_shrink_method(VipsRegion *from, VipsRegion *to,
|
|
163
|
+
const VipsRect *target, VipsRegionShrink method);
|
|
164
164
|
VIPS_API
|
|
165
|
-
int vips_region_shrink(
|
|
166
|
-
const VipsRect *target
|
|
165
|
+
int vips_region_shrink(VipsRegion *from, VipsRegion *to,
|
|
166
|
+
const VipsRect *target);
|
|
167
167
|
|
|
168
168
|
VIPS_API
|
|
169
|
-
int vips_region_prepare(
|
|
169
|
+
int vips_region_prepare(VipsRegion *reg, const VipsRect *r);
|
|
170
170
|
VIPS_API
|
|
171
|
-
int vips_region_prepare_to(
|
|
172
|
-
VipsRegion *dest, const VipsRect *r, int x, int y
|
|
171
|
+
int vips_region_prepare_to(VipsRegion *reg,
|
|
172
|
+
VipsRegion *dest, const VipsRect *r, int x, int y);
|
|
173
173
|
|
|
174
174
|
VIPS_API
|
|
175
|
-
VipsPel *vips_region_fetch(
|
|
176
|
-
int left, int top, int width, int height, size_t *len
|
|
175
|
+
VipsPel *vips_region_fetch(VipsRegion *region,
|
|
176
|
+
int left, int top, int width, int height, size_t *len);
|
|
177
177
|
VIPS_API
|
|
178
|
-
int vips_region_width(
|
|
178
|
+
int vips_region_width(VipsRegion *region);
|
|
179
179
|
VIPS_API
|
|
180
|
-
int vips_region_height(
|
|
180
|
+
int vips_region_height(VipsRegion *region);
|
|
181
181
|
|
|
182
182
|
VIPS_API
|
|
183
|
-
void vips_region_invalidate(
|
|
183
|
+
void vips_region_invalidate(VipsRegion *reg);
|
|
184
184
|
|
|
185
185
|
/* Use this to count pixels passing through key points. Handy for spotting bad
|
|
186
186
|
* overcomputation.
|
|
187
187
|
*/
|
|
188
188
|
#ifdef DEBUG_LEAK
|
|
189
|
-
#define VIPS_COUNT_PIXELS(
|
|
189
|
+
#define VIPS_COUNT_PIXELS(R, N) vips__region_count_pixels(R, N)
|
|
190
190
|
#else /*!DEBUG_LEAK*/
|
|
191
|
-
#define VIPS_COUNT_PIXELS(
|
|
191
|
+
#define VIPS_COUNT_PIXELS(R, N)
|
|
192
192
|
#endif /*DEBUG_LEAK*/
|
|
193
193
|
|
|
194
|
-
#define VIPS_REGION_LSKIP(
|
|
195
|
-
((size_t)((R)->bpl))
|
|
196
|
-
#define VIPS_REGION_N_ELEMENTS(
|
|
197
|
-
((size_t)((R)->valid.width * (R)->im->Bands))
|
|
198
|
-
#define VIPS_REGION_SIZEOF_ELEMENT(
|
|
199
|
-
(VIPS_IMAGE_SIZEOF_ELEMENT(
|
|
200
|
-
#define VIPS_REGION_SIZEOF_PEL(
|
|
201
|
-
(VIPS_IMAGE_SIZEOF_PEL(
|
|
202
|
-
#define VIPS_REGION_SIZEOF_LINE(
|
|
203
|
-
((size_t)((R)->valid.width * VIPS_REGION_SIZEOF_PEL(
|
|
194
|
+
#define VIPS_REGION_LSKIP(R) \
|
|
195
|
+
((size_t) ((R)->bpl))
|
|
196
|
+
#define VIPS_REGION_N_ELEMENTS(R) \
|
|
197
|
+
((size_t) ((R)->valid.width * (R)->im->Bands))
|
|
198
|
+
#define VIPS_REGION_SIZEOF_ELEMENT(R) \
|
|
199
|
+
(VIPS_IMAGE_SIZEOF_ELEMENT((R)->im))
|
|
200
|
+
#define VIPS_REGION_SIZEOF_PEL(R) \
|
|
201
|
+
(VIPS_IMAGE_SIZEOF_PEL((R)->im))
|
|
202
|
+
#define VIPS_REGION_SIZEOF_LINE(R) \
|
|
203
|
+
((size_t) ((R)->valid.width * VIPS_REGION_SIZEOF_PEL(R)))
|
|
204
204
|
|
|
205
205
|
/* If DEBUG is defined, add bounds checking.
|
|
206
206
|
*/
|
|
207
207
|
#ifdef DEBUG
|
|
208
|
-
#define VIPS_REGION_ADDR(
|
|
209
|
-
(
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
208
|
+
#define VIPS_REGION_ADDR(R, X, Y) \
|
|
209
|
+
((vips_rect_includespoint(&(R)->valid, (X), (Y))) \
|
|
210
|
+
? ((R)->data + ((Y) - (R)->valid.top) * VIPS_REGION_LSKIP(R) + \
|
|
211
|
+
((X) - (R)->valid.left) * VIPS_REGION_SIZEOF_PEL(R)) \
|
|
212
|
+
: (fprintf(stderr, \
|
|
213
|
+
"VIPS_REGION_ADDR: point out of bounds, " \
|
|
214
|
+
"file \"%s\", line %d\n" \
|
|
215
|
+
"(point x=%d, y=%d\n" \
|
|
216
|
+
" should have been within VipsRect left=%d, top=%d, " \
|
|
217
|
+
"width=%d, height=%d)\n", \
|
|
218
|
+
__FILE__, __LINE__, \
|
|
219
|
+
(X), (Y), \
|
|
220
|
+
(R)->valid.left, \
|
|
221
|
+
(R)->valid.top, \
|
|
222
|
+
(R)->valid.width, \
|
|
223
|
+
(R)->valid.height), \
|
|
224
|
+
abort(), (VipsPel *) NULL))
|
|
225
225
|
#else /*DEBUG*/
|
|
226
|
-
#define VIPS_REGION_ADDR(
|
|
226
|
+
#define VIPS_REGION_ADDR(R, X, Y) \
|
|
227
227
|
((R)->data + \
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
((Y) - (R)->valid.top) * VIPS_REGION_LSKIP(R) + \
|
|
229
|
+
((X) - (R)->valid.left) * VIPS_REGION_SIZEOF_PEL(R))
|
|
230
230
|
#endif /*DEBUG*/
|
|
231
231
|
|
|
232
|
-
#define VIPS_REGION_ADDR_TOPLEFT(
|
|
232
|
+
#define VIPS_REGION_ADDR_TOPLEFT(R) ((R)->data)
|
|
233
233
|
|
|
234
234
|
#ifdef __cplusplus
|
|
235
235
|
}
|
package/include/vips/resample.h
CHANGED
|
@@ -6,28 +6,28 @@
|
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
9
|
+
This file is part of VIPS.
|
|
10
|
+
|
|
11
|
+
VIPS is free software; you can redistribute it and/or modify
|
|
12
|
+
it under the terms of the GNU Lesser General Public License as published by
|
|
13
|
+
the Free Software Foundation; either version 2 of the License, or
|
|
14
|
+
(at your option) any later version.
|
|
15
|
+
|
|
16
|
+
This program is distributed in the hope that it will be useful,
|
|
17
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
+
GNU Lesser General Public License for more details.
|
|
20
|
+
|
|
21
|
+
You should have received a copy of the GNU Lesser General Public License
|
|
22
|
+
along with this program; if not, write to the Free Software
|
|
23
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
24
|
+
02110-1301 USA
|
|
25
25
|
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
28
|
/*
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
|
31
31
|
|
|
32
32
|
*/
|
|
33
33
|
|
|
@@ -57,63 +57,63 @@ typedef enum {
|
|
|
57
57
|
} VipsSize;
|
|
58
58
|
|
|
59
59
|
VIPS_API
|
|
60
|
-
int vips_shrink(
|
|
61
|
-
double hshrink, double vshrink, ...
|
|
60
|
+
int vips_shrink(VipsImage *in, VipsImage **out,
|
|
61
|
+
double hshrink, double vshrink, ...)
|
|
62
62
|
G_GNUC_NULL_TERMINATED;
|
|
63
63
|
VIPS_API
|
|
64
|
-
int vips_shrinkh(
|
|
64
|
+
int vips_shrinkh(VipsImage *in, VipsImage **out, int hshrink, ...)
|
|
65
65
|
G_GNUC_NULL_TERMINATED;
|
|
66
66
|
VIPS_API
|
|
67
|
-
int vips_shrinkv(
|
|
67
|
+
int vips_shrinkv(VipsImage *in, VipsImage **out, int vshrink, ...)
|
|
68
68
|
G_GNUC_NULL_TERMINATED;
|
|
69
69
|
|
|
70
70
|
VIPS_API
|
|
71
|
-
int vips_reduce(
|
|
72
|
-
double hshrink, double vshrink, ...
|
|
71
|
+
int vips_reduce(VipsImage *in, VipsImage **out,
|
|
72
|
+
double hshrink, double vshrink, ...)
|
|
73
73
|
G_GNUC_NULL_TERMINATED;
|
|
74
74
|
VIPS_API
|
|
75
|
-
int vips_reduceh(
|
|
75
|
+
int vips_reduceh(VipsImage *in, VipsImage **out, double hshrink, ...)
|
|
76
76
|
G_GNUC_NULL_TERMINATED;
|
|
77
77
|
VIPS_API
|
|
78
|
-
int vips_reducev(
|
|
78
|
+
int vips_reducev(VipsImage *in, VipsImage **out, double vshrink, ...)
|
|
79
79
|
G_GNUC_NULL_TERMINATED;
|
|
80
80
|
|
|
81
81
|
VIPS_API
|
|
82
|
-
int vips_thumbnail(
|
|
82
|
+
int vips_thumbnail(const char *filename, VipsImage **out, int width, ...)
|
|
83
83
|
G_GNUC_NULL_TERMINATED;
|
|
84
84
|
VIPS_API
|
|
85
|
-
int vips_thumbnail_buffer(
|
|
86
|
-
int width, ...
|
|
85
|
+
int vips_thumbnail_buffer(void *buf, size_t len, VipsImage **out,
|
|
86
|
+
int width, ...)
|
|
87
87
|
G_GNUC_NULL_TERMINATED;
|
|
88
88
|
VIPS_API
|
|
89
|
-
int vips_thumbnail_image(
|
|
89
|
+
int vips_thumbnail_image(VipsImage *in, VipsImage **out, int width, ...)
|
|
90
90
|
G_GNUC_NULL_TERMINATED;
|
|
91
91
|
VIPS_API
|
|
92
|
-
int vips_thumbnail_source(
|
|
93
|
-
int width, ...
|
|
92
|
+
int vips_thumbnail_source(VipsSource *source, VipsImage **out,
|
|
93
|
+
int width, ...)
|
|
94
94
|
G_GNUC_NULL_TERMINATED;
|
|
95
95
|
|
|
96
96
|
VIPS_API
|
|
97
|
-
int vips_similarity(
|
|
97
|
+
int vips_similarity(VipsImage *in, VipsImage **out, ...)
|
|
98
98
|
G_GNUC_NULL_TERMINATED;
|
|
99
99
|
VIPS_API
|
|
100
|
-
int vips_rotate(
|
|
100
|
+
int vips_rotate(VipsImage *in, VipsImage **out, double angle, ...)
|
|
101
101
|
G_GNUC_NULL_TERMINATED;
|
|
102
102
|
VIPS_API
|
|
103
|
-
int vips_affine(
|
|
104
|
-
double a, double b, double c, double d, ...
|
|
103
|
+
int vips_affine(VipsImage *in, VipsImage **out,
|
|
104
|
+
double a, double b, double c, double d, ...)
|
|
105
105
|
G_GNUC_NULL_TERMINATED;
|
|
106
106
|
|
|
107
107
|
VIPS_API
|
|
108
|
-
int vips_resize(
|
|
108
|
+
int vips_resize(VipsImage *in, VipsImage **out, double scale, ...)
|
|
109
109
|
G_GNUC_NULL_TERMINATED;
|
|
110
110
|
|
|
111
111
|
VIPS_API
|
|
112
|
-
int vips_mapim(
|
|
112
|
+
int vips_mapim(VipsImage *in, VipsImage **out, VipsImage *index, ...)
|
|
113
113
|
G_GNUC_NULL_TERMINATED;
|
|
114
114
|
|
|
115
115
|
VIPS_API
|
|
116
|
-
int vips_quadratic(
|
|
116
|
+
int vips_quadratic(VipsImage *in, VipsImage **out, VipsImage *coeff, ...)
|
|
117
117
|
G_GNUC_NULL_TERMINATED;
|
|
118
118
|
|
|
119
119
|
#ifdef __cplusplus
|
package/include/vips/sbuf.h
CHANGED
|
@@ -5,28 +5,28 @@
|
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
This file is part of VIPS.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
VIPS is free software; you can redistribute it and/or modify
|
|
11
|
+
it under the terms of the GNU Lesser General Public License as published by
|
|
12
|
+
the Free Software Foundation; either version 2 of the License, or
|
|
13
|
+
(at your option) any later version.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
This program is distributed in the hope that it will be useful,
|
|
16
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
17
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
18
|
+
GNU Lesser General Public License for more details.
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
You should have received a copy of the GNU Lesser General Public License
|
|
21
|
+
along with this program; if not, write to the Free Software
|
|
22
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
23
|
+
02110-1301 USA
|
|
24
24
|
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
27
|
/*
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
|
30
30
|
|
|
31
31
|
*/
|
|
32
32
|
|
|
@@ -42,24 +42,24 @@ extern "C" {
|
|
|
42
42
|
#endif /*__cplusplus*/
|
|
43
43
|
|
|
44
44
|
#define VIPS_TYPE_SBUF (vips_sbuf_get_type())
|
|
45
|
-
#define VIPS_SBUF(
|
|
46
|
-
(G_TYPE_CHECK_INSTANCE_CAST(
|
|
47
|
-
|
|
48
|
-
#define VIPS_SBUF_CLASS(
|
|
49
|
-
(G_TYPE_CHECK_CLASS_CAST(
|
|
50
|
-
|
|
51
|
-
#define VIPS_IS_SBUF(
|
|
52
|
-
(G_TYPE_CHECK_INSTANCE_TYPE(
|
|
53
|
-
#define VIPS_IS_SBUF_CLASS(
|
|
54
|
-
(G_TYPE_CHECK_CLASS_TYPE(
|
|
55
|
-
#define VIPS_SBUF_GET_CLASS(
|
|
56
|
-
(G_TYPE_INSTANCE_GET_CLASS(
|
|
57
|
-
|
|
45
|
+
#define VIPS_SBUF(obj) \
|
|
46
|
+
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
|
47
|
+
VIPS_TYPE_SBUF, VipsSbuf))
|
|
48
|
+
#define VIPS_SBUF_CLASS(klass) \
|
|
49
|
+
(G_TYPE_CHECK_CLASS_CAST((klass), \
|
|
50
|
+
VIPS_TYPE_SBUF, VipsSbufClass))
|
|
51
|
+
#define VIPS_IS_SBUF(obj) \
|
|
52
|
+
(G_TYPE_CHECK_INSTANCE_TYPE((obj), VIPS_TYPE_SBUF))
|
|
53
|
+
#define VIPS_IS_SBUF_CLASS(klass) \
|
|
54
|
+
(G_TYPE_CHECK_CLASS_TYPE((klass), VIPS_TYPE_SBUF))
|
|
55
|
+
#define VIPS_SBUF_GET_CLASS(obj) \
|
|
56
|
+
(G_TYPE_INSTANCE_GET_CLASS((obj), \
|
|
57
|
+
VIPS_TYPE_SBUF, VipsSbufClass))
|
|
58
58
|
|
|
59
59
|
#define VIPS_SBUF_BUFFER_SIZE (4096)
|
|
60
60
|
|
|
61
61
|
/* Layer over source: read with an input buffer.
|
|
62
|
-
*
|
|
62
|
+
*
|
|
63
63
|
* Libraries like libjpeg do their own input buffering and need raw IO, but
|
|
64
64
|
* others, like radiance, need to parse the input into lines. A buffered read
|
|
65
65
|
* class is very convenient.
|
|
@@ -96,46 +96,45 @@ typedef struct _VipsSbufClass {
|
|
|
96
96
|
} VipsSbufClass;
|
|
97
97
|
|
|
98
98
|
VIPS_API
|
|
99
|
-
GType vips_sbuf_get_type(
|
|
99
|
+
GType vips_sbuf_get_type(void);
|
|
100
100
|
|
|
101
101
|
VIPS_API
|
|
102
|
-
VipsSbuf *vips_sbuf_new_from_source(
|
|
102
|
+
VipsSbuf *vips_sbuf_new_from_source(VipsSource *source);
|
|
103
103
|
|
|
104
104
|
VIPS_API
|
|
105
|
-
void vips_sbuf_unbuffer(
|
|
105
|
+
void vips_sbuf_unbuffer(VipsSbuf *sbuf);
|
|
106
106
|
|
|
107
107
|
VIPS_API
|
|
108
|
-
int vips_sbuf_getc(
|
|
109
|
-
#define VIPS_SBUF_GETC(
|
|
110
|
-
(S)->read_point < (S)->chars_in_buffer
|
|
111
|
-
(S)->input_buffer[(S)->read_point++]
|
|
112
|
-
vips_sbuf_getc(
|
|
113
|
-
)
|
|
108
|
+
int vips_sbuf_getc(VipsSbuf *sbuf);
|
|
109
|
+
#define VIPS_SBUF_GETC(S) ( \
|
|
110
|
+
(S)->read_point < (S)->chars_in_buffer \
|
|
111
|
+
? (S)->input_buffer[(S)->read_point++] \
|
|
112
|
+
: vips_sbuf_getc(S))
|
|
114
113
|
VIPS_API
|
|
115
|
-
void vips_sbuf_ungetc(
|
|
116
|
-
#define VIPS_SBUF_UNGETC(
|
|
117
|
-
|
|
118
|
-
(S)->read_point
|
|
119
|
-
|
|
114
|
+
void vips_sbuf_ungetc(VipsSbuf *sbuf);
|
|
115
|
+
#define VIPS_SBUF_UNGETC(S) \
|
|
116
|
+
{ \
|
|
117
|
+
if ((S)->read_point > 0) \
|
|
118
|
+
(S)->read_point -= 1; \
|
|
119
|
+
}
|
|
120
120
|
|
|
121
121
|
VIPS_API
|
|
122
|
-
int vips_sbuf_require(
|
|
123
|
-
#define VIPS_SBUF_REQUIRE(
|
|
124
|
-
(S)->read_point + (R) <= (S)->chars_in_buffer
|
|
125
|
-
0
|
|
126
|
-
vips_sbuf_require(
|
|
127
|
-
)
|
|
128
|
-
#define
|
|
129
|
-
#define VIPS_SBUF_FETCH( S ) ((S)->input_buffer[(S)->read_point++])
|
|
122
|
+
int vips_sbuf_require(VipsSbuf *sbuf, int require);
|
|
123
|
+
#define VIPS_SBUF_REQUIRE(S, R) ( \
|
|
124
|
+
(S)->read_point + (R) <= (S)->chars_in_buffer \
|
|
125
|
+
? 0 \
|
|
126
|
+
: vips_sbuf_require((S), (R)))
|
|
127
|
+
#define VIPS_SBUF_PEEK(S) ((S)->input_buffer + (S)->read_point)
|
|
128
|
+
#define VIPS_SBUF_FETCH(S) ((S)->input_buffer[(S)->read_point++])
|
|
130
129
|
|
|
131
130
|
VIPS_API
|
|
132
|
-
const char *vips_sbuf_get_line(
|
|
131
|
+
const char *vips_sbuf_get_line(VipsSbuf *sbuf);
|
|
133
132
|
VIPS_API
|
|
134
|
-
char *vips_sbuf_get_line_copy(
|
|
133
|
+
char *vips_sbuf_get_line_copy(VipsSbuf *sbuf);
|
|
135
134
|
VIPS_API
|
|
136
|
-
const char *vips_sbuf_get_non_whitespace(
|
|
135
|
+
const char *vips_sbuf_get_non_whitespace(VipsSbuf *sbuf);
|
|
137
136
|
VIPS_API
|
|
138
|
-
int vips_sbuf_skip_whitespace(
|
|
137
|
+
int vips_sbuf_skip_whitespace(VipsSbuf *sbuf);
|
|
139
138
|
|
|
140
139
|
#ifdef __cplusplus
|
|
141
140
|
}
|
package/include/vips/semaphore.h
CHANGED
|
@@ -9,28 +9,28 @@
|
|
|
9
9
|
|
|
10
10
|
/*
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
12
|
+
This file is part of VIPS.
|
|
13
|
+
|
|
14
|
+
VIPS is free software; you can redistribute it and/or modify
|
|
15
|
+
it under the terms of the GNU Lesser General Public License as published by
|
|
16
|
+
the Free Software Foundation; either version 2 of the License, or
|
|
17
|
+
(at your option) any later version.
|
|
18
|
+
|
|
19
|
+
This program is distributed in the hope that it will be useful,
|
|
20
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
21
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
22
|
+
GNU Lesser General Public License for more details.
|
|
23
|
+
|
|
24
|
+
You should have received a copy of the GNU Lesser General Public License
|
|
25
|
+
along with this program; if not, write to the Free Software
|
|
26
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
27
|
+
02110-1301 USA
|
|
28
28
|
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
/*
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
|
34
34
|
|
|
35
35
|
*/
|
|
36
36
|
|
|
@@ -56,19 +56,19 @@ typedef struct {
|
|
|
56
56
|
} VipsSemaphore;
|
|
57
57
|
|
|
58
58
|
VIPS_API
|
|
59
|
-
int vips_semaphore_up(
|
|
59
|
+
int vips_semaphore_up(VipsSemaphore *s);
|
|
60
60
|
VIPS_API
|
|
61
|
-
int vips_semaphore_upn(
|
|
61
|
+
int vips_semaphore_upn(VipsSemaphore *s, int n);
|
|
62
62
|
VIPS_API
|
|
63
|
-
int vips_semaphore_down(
|
|
63
|
+
int vips_semaphore_down(VipsSemaphore *s);
|
|
64
64
|
VIPS_API
|
|
65
|
-
int vips_semaphore_downn(
|
|
65
|
+
int vips_semaphore_downn(VipsSemaphore *s, int n);
|
|
66
66
|
VIPS_API
|
|
67
|
-
int vips_semaphore_down_timeout(
|
|
67
|
+
int vips_semaphore_down_timeout(VipsSemaphore *s, gint64 timeout);
|
|
68
68
|
VIPS_API
|
|
69
|
-
void vips_semaphore_destroy(
|
|
69
|
+
void vips_semaphore_destroy(VipsSemaphore *s);
|
|
70
70
|
VIPS_API
|
|
71
|
-
void vips_semaphore_init(
|
|
71
|
+
void vips_semaphore_init(VipsSemaphore *s, int v, char *name);
|
|
72
72
|
|
|
73
73
|
#ifdef __cplusplus
|
|
74
74
|
}
|