@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/util.h
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Various useful definitions.
|
|
1
|
+
/* Various useful definitions.
|
|
2
2
|
*
|
|
3
3
|
* J.Cupitt, 8/4/93
|
|
4
4
|
* 15/7/96 JC
|
|
@@ -7,28 +7,28 @@
|
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
VIPS is free software; you can redistribute it and/or modify
|
|
13
|
-
it under the terms of the GNU Lesser General Public License as published by
|
|
14
|
-
the Free Software Foundation; either version 2 of the License, or
|
|
15
|
-
(at your option) any later version.
|
|
10
|
+
This file is part of VIPS.
|
|
16
11
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
VIPS is free software; you can redistribute it and/or modify
|
|
13
|
+
it under the terms of the GNU Lesser General Public License as published by
|
|
14
|
+
the Free Software Foundation; either version 2 of the License, or
|
|
15
|
+
(at your option) any later version.
|
|
21
16
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
This program is distributed in the hope that it will be useful,
|
|
18
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
19
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
20
|
+
GNU Lesser General Public License for more details.
|
|
21
|
+
|
|
22
|
+
You should have received a copy of the GNU Lesser General Public License
|
|
23
|
+
along with this program; if not, write to the Free Software
|
|
24
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
25
|
+
02110-1301 USA
|
|
26
26
|
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
29
|
/*
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
|
32
32
|
|
|
33
33
|
*/
|
|
34
34
|
|
|
@@ -46,291 +46,336 @@ extern "C" {
|
|
|
46
46
|
*/
|
|
47
47
|
#define VIPS_PI (3.14159265358979323846)
|
|
48
48
|
|
|
49
|
-
/* Convert degrees->rads and vice-versa.
|
|
49
|
+
/* Convert degrees->rads and vice-versa.
|
|
50
50
|
*/
|
|
51
|
-
#define VIPS_RAD(
|
|
52
|
-
#define VIPS_DEG(
|
|
51
|
+
#define VIPS_RAD(R) (((R) / 360.0) * 2.0 * VIPS_PI)
|
|
52
|
+
#define VIPS_DEG(A) (((A) / (2.0 * VIPS_PI)) * 360.0)
|
|
53
53
|
|
|
54
|
-
#define VIPS_MAX(
|
|
55
|
-
#define VIPS_MIN(
|
|
54
|
+
#define VIPS_MAX(A, B) ((A) > (B) ? (A) : (B))
|
|
55
|
+
#define VIPS_MIN(A, B) ((A) < (B) ? (A) : (B))
|
|
56
56
|
|
|
57
|
-
#define VIPS_CLIP(
|
|
58
|
-
#define VIPS_FCLIP(
|
|
57
|
+
#define VIPS_CLIP(A, V, B) VIPS_MAX((A), VIPS_MIN((B), (V)))
|
|
58
|
+
#define VIPS_FCLIP(A, V, B) VIPS_FMAX((A), VIPS_FMIN((B), (V)))
|
|
59
59
|
|
|
60
|
-
#define VIPS_NUMBER(
|
|
60
|
+
#define VIPS_NUMBER(R) ((int) (sizeof(R) / sizeof(R[0])))
|
|
61
61
|
|
|
62
|
-
#define VIPS_ABS(
|
|
62
|
+
#define VIPS_ABS(X) (((X) >= 0) ? (X) : -(X))
|
|
63
63
|
|
|
64
64
|
/* The built-in isnan and isinf functions provided by gcc 4+ and clang are
|
|
65
65
|
* up to 7x faster than their libc equivalent included from <math.h>.
|
|
66
66
|
*/
|
|
67
67
|
#if defined(__clang__) || (__GNUC__ >= 4)
|
|
68
|
-
#define VIPS_ISNAN(
|
|
69
|
-
#define VIPS_FLOOR(
|
|
70
|
-
#define VIPS_CEIL(
|
|
71
|
-
#define VIPS_RINT(
|
|
72
|
-
#define VIPS_ROUND(
|
|
73
|
-
#define VIPS_FABS(
|
|
74
|
-
#define VIPS_FMAX(
|
|
75
|
-
#define VIPS_FMIN(
|
|
68
|
+
#define VIPS_ISNAN(V) __builtin_isnan(V)
|
|
69
|
+
#define VIPS_FLOOR(V) __builtin_floor(V)
|
|
70
|
+
#define VIPS_CEIL(V) __builtin_ceil(V)
|
|
71
|
+
#define VIPS_RINT(V) __builtin_rint(V)
|
|
72
|
+
#define VIPS_ROUND(V) __builtin_round(V)
|
|
73
|
+
#define VIPS_FABS(V) __builtin_fabs(V)
|
|
74
|
+
#define VIPS_FMAX(A, B) __builtin_fmax(A, B)
|
|
75
|
+
#define VIPS_FMIN(A, B) __builtin_fmin(A, B)
|
|
76
76
|
#else
|
|
77
|
-
#define VIPS_ISNAN(
|
|
78
|
-
#define VIPS_FLOOR(
|
|
79
|
-
#define VIPS_CEIL(
|
|
80
|
-
#define VIPS_RINT(
|
|
81
|
-
#define VIPS_ROUND(
|
|
82
|
-
#define VIPS_FABS(
|
|
83
|
-
#define VIPS_FMAX(
|
|
84
|
-
#define VIPS_FMIN(
|
|
77
|
+
#define VIPS_ISNAN(V) isnan(V)
|
|
78
|
+
#define VIPS_FLOOR(V) floor(V)
|
|
79
|
+
#define VIPS_CEIL(V) ceil(V)
|
|
80
|
+
#define VIPS_RINT(V) rint(V)
|
|
81
|
+
#define VIPS_ROUND(V) round(V)
|
|
82
|
+
#define VIPS_FABS(V) VIPS_ABS(V)
|
|
83
|
+
#define VIPS_FMAX(A, B) VIPS_MAX(A, B)
|
|
84
|
+
#define VIPS_FMIN(A, B) VIPS_MIN(A, B)
|
|
85
85
|
#endif
|
|
86
86
|
|
|
87
87
|
/* Testing status before the function call saves a lot of time.
|
|
88
88
|
*/
|
|
89
|
-
#define VIPS_ONCE(
|
|
90
|
-
G_STMT_START
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
89
|
+
#define VIPS_ONCE(ONCE, FUNC, CLIENT) \
|
|
90
|
+
G_STMT_START \
|
|
91
|
+
{ \
|
|
92
|
+
if (G_UNLIKELY((ONCE)->status != G_ONCE_STATUS_READY)) \
|
|
93
|
+
(void) g_once(ONCE, FUNC, CLIENT); \
|
|
94
|
+
} \
|
|
95
|
+
G_STMT_END
|
|
94
96
|
|
|
95
97
|
/* VIPS_RINT() does "bankers rounding", it rounds to the nearest even integer.
|
|
96
98
|
* For things like image geometry, we want strict nearest int.
|
|
97
99
|
*
|
|
98
|
-
* If you know it's unsigned, _UINT is a little faster.
|
|
100
|
+
* If you know it's unsigned, _UINT is a little faster.
|
|
99
101
|
*/
|
|
100
|
-
#define VIPS_ROUND_INT(
|
|
101
|
-
#define VIPS_ROUND_UINT(
|
|
102
|
+
#define VIPS_ROUND_INT(R) ((int) ((R) > 0 ? ((R) + 0.5) : ((R) -0.5)))
|
|
103
|
+
#define VIPS_ROUND_UINT(R) ((int) ((R) + 0.5))
|
|
102
104
|
|
|
103
105
|
/* Round N down and up to the nearest multiple of P.
|
|
104
106
|
*/
|
|
105
|
-
#define VIPS_ROUND_DOWN(
|
|
106
|
-
#define VIPS_ROUND_UP(
|
|
107
|
-
|
|
108
|
-
#define VIPS_SWAP(
|
|
109
|
-
G_STMT_START
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
107
|
+
#define VIPS_ROUND_DOWN(N, P) ((N) - ((N) % (P)))
|
|
108
|
+
#define VIPS_ROUND_UP(N, P) (VIPS_ROUND_DOWN((N) + (P) -1, (P)))
|
|
109
|
+
|
|
110
|
+
#define VIPS_SWAP(TYPE, A, B) \
|
|
111
|
+
G_STMT_START \
|
|
112
|
+
{ \
|
|
113
|
+
TYPE t = (A); \
|
|
114
|
+
(A) = (B); \
|
|
115
|
+
(B) = t; \
|
|
116
|
+
} \
|
|
117
|
+
G_STMT_END
|
|
114
118
|
|
|
115
119
|
/* Duff's device. Do OPERation N times in a 16-way unrolled loop.
|
|
116
120
|
*/
|
|
117
|
-
#define VIPS_UNROLL(
|
|
118
|
-
G_STMT_START
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
121
|
+
#define VIPS_UNROLL(N, OPER) \
|
|
122
|
+
G_STMT_START \
|
|
123
|
+
{ \
|
|
124
|
+
if ((N)) { \
|
|
125
|
+
int duff_count = ((N) + 15) / 16; \
|
|
126
|
+
\
|
|
127
|
+
switch ((N) % 16) { \
|
|
128
|
+
case 0: \
|
|
129
|
+
do { \
|
|
130
|
+
OPER; \
|
|
131
|
+
case 15: \
|
|
132
|
+
OPER; \
|
|
133
|
+
case 14: \
|
|
134
|
+
OPER; \
|
|
135
|
+
case 13: \
|
|
136
|
+
OPER; \
|
|
137
|
+
case 12: \
|
|
138
|
+
OPER; \
|
|
139
|
+
case 11: \
|
|
140
|
+
OPER; \
|
|
141
|
+
case 10: \
|
|
142
|
+
OPER; \
|
|
143
|
+
case 9: \
|
|
144
|
+
OPER; \
|
|
145
|
+
case 8: \
|
|
146
|
+
OPER; \
|
|
147
|
+
case 7: \
|
|
148
|
+
OPER; \
|
|
149
|
+
case 6: \
|
|
150
|
+
OPER; \
|
|
151
|
+
case 5: \
|
|
152
|
+
OPER; \
|
|
153
|
+
case 4: \
|
|
154
|
+
OPER; \
|
|
155
|
+
case 3: \
|
|
156
|
+
OPER; \
|
|
157
|
+
case 2: \
|
|
158
|
+
OPER; \
|
|
159
|
+
case 1: \
|
|
160
|
+
OPER; \
|
|
161
|
+
} while (--duff_count > 0); \
|
|
162
|
+
} \
|
|
140
163
|
} \
|
|
141
164
|
} \
|
|
142
|
-
|
|
165
|
+
G_STMT_END
|
|
143
166
|
|
|
144
167
|
/* The g_info() macro was added in 2.40.
|
|
145
168
|
*/
|
|
146
169
|
#ifndef g_info
|
|
147
|
-
/* Hopefully we have varargs macros. Maybe revisit this.
|
|
170
|
+
/* Hopefully we have varargs macros. Maybe revisit this.
|
|
148
171
|
*/
|
|
149
172
|
#define g_info(...) \
|
|
150
|
-
|
|
173
|
+
g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, __VA_ARGS__)
|
|
151
174
|
#endif
|
|
152
175
|
|
|
153
176
|
/* Various integer range clips. Record over/under flows.
|
|
154
177
|
*/
|
|
155
|
-
#define VIPS_CLIP_UCHAR(
|
|
156
|
-
G_STMT_START
|
|
157
|
-
|
|
158
|
-
(
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
(
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
(
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
#define
|
|
178
|
+
#define VIPS_CLIP_UCHAR(V, SEQ) \
|
|
179
|
+
G_STMT_START \
|
|
180
|
+
{ \
|
|
181
|
+
if ((V) < 0) { \
|
|
182
|
+
(SEQ)->underflow++; \
|
|
183
|
+
(V) = 0; \
|
|
184
|
+
} \
|
|
185
|
+
else if ((V) > UCHAR_MAX) { \
|
|
186
|
+
(SEQ)->overflow++; \
|
|
187
|
+
(V) = UCHAR_MAX; \
|
|
188
|
+
} \
|
|
189
|
+
} \
|
|
190
|
+
G_STMT_END
|
|
191
|
+
|
|
192
|
+
#define VIPS_CLIP_CHAR(V, SEQ) \
|
|
193
|
+
G_STMT_START \
|
|
194
|
+
{ \
|
|
195
|
+
if ((V) < SCHAR_MIN) { \
|
|
196
|
+
(SEQ)->underflow++; \
|
|
197
|
+
(V) = SCHAR_MIN; \
|
|
198
|
+
} \
|
|
199
|
+
else if ((V) > SCHAR_MAX) { \
|
|
200
|
+
(SEQ)->overflow++; \
|
|
201
|
+
(V) = SCHAR_MAX; \
|
|
202
|
+
} \
|
|
203
|
+
} \
|
|
204
|
+
G_STMT_END
|
|
205
|
+
|
|
206
|
+
#define VIPS_CLIP_USHORT(V, SEQ) \
|
|
207
|
+
G_STMT_START \
|
|
208
|
+
{ \
|
|
209
|
+
if ((V) < 0) { \
|
|
210
|
+
(SEQ)->underflow++; \
|
|
211
|
+
(V) = 0; \
|
|
212
|
+
} \
|
|
213
|
+
else if ((V) > USHRT_MAX) { \
|
|
214
|
+
(SEQ)->overflow++; \
|
|
215
|
+
(V) = USHRT_MAX; \
|
|
216
|
+
} \
|
|
217
|
+
} \
|
|
218
|
+
G_STMT_END
|
|
219
|
+
|
|
220
|
+
#define VIPS_CLIP_SHORT(V, SEQ) \
|
|
221
|
+
G_STMT_START \
|
|
222
|
+
{ \
|
|
223
|
+
if ((V) < SHRT_MIN) { \
|
|
224
|
+
(SEQ)->underflow++; \
|
|
225
|
+
(V) = SHRT_MIN; \
|
|
226
|
+
} \
|
|
227
|
+
else if ((V) > SHRT_MAX) { \
|
|
228
|
+
(SEQ)->overflow++; \
|
|
229
|
+
(V) = SHRT_MAX; \
|
|
230
|
+
} \
|
|
231
|
+
} \
|
|
232
|
+
G_STMT_END
|
|
233
|
+
|
|
234
|
+
#define VIPS_CLIP_UINT(V, SEQ) \
|
|
235
|
+
G_STMT_START \
|
|
236
|
+
{ \
|
|
237
|
+
if ((V) < 0) { \
|
|
238
|
+
(SEQ)->underflow++; \
|
|
239
|
+
(V) = 0; \
|
|
240
|
+
} \
|
|
241
|
+
} \
|
|
242
|
+
G_STMT_END
|
|
243
|
+
|
|
244
|
+
#define VIPS_CLIP_NONE(V, SEQ) \
|
|
245
|
+
{ \
|
|
246
|
+
}
|
|
212
247
|
|
|
213
248
|
/* Not all platforms have PATH_MAX (eg. Hurd) and we don't need a platform one
|
|
214
249
|
* anyway, just a static buffer big enough for almost any path.
|
|
215
250
|
*/
|
|
216
251
|
#define VIPS_PATH_MAX (4096)
|
|
217
252
|
|
|
253
|
+
/* Create multiple copies of a function targeted at groups of SIMD intrinsics,
|
|
254
|
+
* with the most suitable selected at runtime via dynamic dispatch.
|
|
255
|
+
*/
|
|
256
|
+
#ifdef HAVE_TARGET_CLONES
|
|
257
|
+
#define VIPS_TARGET_CLONES(TARGETS) \
|
|
258
|
+
__attribute__((target_clones(TARGETS)))
|
|
259
|
+
#else
|
|
260
|
+
#define VIPS_TARGET_CLONES(TARGETS)
|
|
261
|
+
#endif
|
|
262
|
+
|
|
218
263
|
VIPS_API
|
|
219
|
-
const char *vips_enum_string(
|
|
264
|
+
const char *vips_enum_string(GType enm, int value);
|
|
220
265
|
VIPS_API
|
|
221
|
-
const char *vips_enum_nick(
|
|
266
|
+
const char *vips_enum_nick(GType enm, int value);
|
|
222
267
|
VIPS_API
|
|
223
|
-
int vips_enum_from_nick(
|
|
268
|
+
int vips_enum_from_nick(const char *domain, GType type, const char *str);
|
|
224
269
|
VIPS_API
|
|
225
|
-
int vips_flags_from_nick(
|
|
270
|
+
int vips_flags_from_nick(const char *domain, GType type, const char *nick);
|
|
226
271
|
|
|
227
272
|
VIPS_API
|
|
228
|
-
gboolean vips_slist_equal(
|
|
273
|
+
gboolean vips_slist_equal(GSList *l1, GSList *l2);
|
|
229
274
|
VIPS_API
|
|
230
|
-
void *vips_slist_map2(
|
|
275
|
+
void *vips_slist_map2(GSList *list, VipsSListMap2Fn fn, void *a, void *b);
|
|
231
276
|
VIPS_API
|
|
232
|
-
void *vips_slist_map2_rev(
|
|
277
|
+
void *vips_slist_map2_rev(GSList *list, VipsSListMap2Fn fn, void *a, void *b);
|
|
233
278
|
VIPS_API
|
|
234
|
-
void *vips_slist_map4(
|
|
235
|
-
VipsSListMap4Fn fn, void *a, void *b, void *c, void *d
|
|
279
|
+
void *vips_slist_map4(GSList *list,
|
|
280
|
+
VipsSListMap4Fn fn, void *a, void *b, void *c, void *d);
|
|
236
281
|
VIPS_API
|
|
237
|
-
void *vips_slist_fold2(
|
|
238
|
-
VipsSListFold2Fn fn, void *a, void *b
|
|
282
|
+
void *vips_slist_fold2(GSList *list, void *start,
|
|
283
|
+
VipsSListFold2Fn fn, void *a, void *b);
|
|
239
284
|
VIPS_API
|
|
240
|
-
GSList *vips_slist_filter(
|
|
285
|
+
GSList *vips_slist_filter(GSList *list, VipsSListMap2Fn fn, void *a, void *b);
|
|
241
286
|
VIPS_API
|
|
242
|
-
void vips_slist_free_all(
|
|
287
|
+
void vips_slist_free_all(GSList *list);
|
|
243
288
|
VIPS_API
|
|
244
|
-
void *vips_map_equal(
|
|
289
|
+
void *vips_map_equal(void *a, void *b);
|
|
245
290
|
|
|
246
291
|
VIPS_API
|
|
247
|
-
void *vips_hash_table_map(
|
|
248
|
-
VipsSListMap2Fn fn, void *a, void *b
|
|
292
|
+
void *vips_hash_table_map(GHashTable *hash,
|
|
293
|
+
VipsSListMap2Fn fn, void *a, void *b);
|
|
249
294
|
|
|
250
295
|
VIPS_API
|
|
251
|
-
char *vips_strncpy(
|
|
296
|
+
char *vips_strncpy(char *dest, const char *src, int n);
|
|
252
297
|
VIPS_API
|
|
253
|
-
char *vips_strrstr(
|
|
298
|
+
char *vips_strrstr(const char *haystack, const char *needle);
|
|
254
299
|
VIPS_API
|
|
255
|
-
gboolean vips_ispostfix(
|
|
300
|
+
gboolean vips_ispostfix(const char *a, const char *b);
|
|
256
301
|
VIPS_API
|
|
257
|
-
gboolean vips_iscasepostfix(
|
|
302
|
+
gboolean vips_iscasepostfix(const char *a, const char *b);
|
|
258
303
|
VIPS_API
|
|
259
|
-
gboolean vips_isprefix(
|
|
304
|
+
gboolean vips_isprefix(const char *a, const char *b);
|
|
260
305
|
VIPS_API
|
|
261
|
-
char *vips_break_token(
|
|
306
|
+
char *vips_break_token(char *str, const char *brk);
|
|
262
307
|
|
|
263
|
-
void vips__chomp(
|
|
308
|
+
void vips__chomp(char *str);
|
|
264
309
|
|
|
265
310
|
VIPS_API
|
|
266
|
-
int vips_vsnprintf(
|
|
311
|
+
int vips_vsnprintf(char *str, size_t size, const char *format, va_list ap);
|
|
267
312
|
VIPS_API
|
|
268
|
-
int vips_snprintf(
|
|
269
|
-
G_GNUC_PRINTF(
|
|
313
|
+
int vips_snprintf(char *str, size_t size, const char *format, ...)
|
|
314
|
+
G_GNUC_PRINTF(3, 4);
|
|
270
315
|
|
|
271
316
|
VIPS_API
|
|
272
|
-
int vips_filename_suffix_match(
|
|
317
|
+
int vips_filename_suffix_match(const char *path, const char *suffixes[]);
|
|
273
318
|
|
|
274
319
|
VIPS_API
|
|
275
|
-
gint64 vips_file_length(
|
|
320
|
+
gint64 vips_file_length(int fd);
|
|
276
321
|
/* TODO(kleisauke): VIPS_API is required by vipsedit.
|
|
277
322
|
*/
|
|
278
323
|
VIPS_API
|
|
279
|
-
int vips__write(
|
|
324
|
+
int vips__write(int fd, const void *buf, size_t count);
|
|
280
325
|
|
|
281
326
|
/* TODO(kleisauke): VIPS_API is required by test_connections.
|
|
282
327
|
*/
|
|
283
328
|
VIPS_API
|
|
284
|
-
int vips__open(
|
|
285
|
-
int vips__open_read(
|
|
286
|
-
FILE *vips__fopen(
|
|
329
|
+
int vips__open(const char *filename, int flags, int mode);
|
|
330
|
+
int vips__open_read(const char *filename);
|
|
331
|
+
FILE *vips__fopen(const char *filename, const char *mode);
|
|
287
332
|
|
|
288
|
-
FILE *vips__file_open_read(
|
|
289
|
-
const char *fallback_dir, gboolean text_mode
|
|
290
|
-
FILE *vips__file_open_write(
|
|
291
|
-
gboolean text_mode
|
|
333
|
+
FILE *vips__file_open_read(const char *filename,
|
|
334
|
+
const char *fallback_dir, gboolean text_mode);
|
|
335
|
+
FILE *vips__file_open_write(const char *filename,
|
|
336
|
+
gboolean text_mode);
|
|
292
337
|
/* TODO(kleisauke): VIPS_API is required by vipsedit.
|
|
293
338
|
*/
|
|
294
339
|
VIPS_API
|
|
295
|
-
char *vips__file_read(
|
|
296
|
-
char *vips__file_read_name(
|
|
297
|
-
size_t *length_out
|
|
298
|
-
int vips__file_write(
|
|
340
|
+
char *vips__file_read(FILE *fp, const char *name, size_t *length_out);
|
|
341
|
+
char *vips__file_read_name(const char *name, const char *fallback_dir,
|
|
342
|
+
size_t *length_out);
|
|
343
|
+
int vips__file_write(void *data, size_t size, size_t nmemb, FILE *stream);
|
|
299
344
|
/* TODO(kleisauke): VIPS_API is required by the magick module.
|
|
300
345
|
*/
|
|
301
346
|
VIPS_API
|
|
302
|
-
gint64 vips__get_bytes(
|
|
303
|
-
unsigned char buf[], gint64 len
|
|
304
|
-
int vips__fgetc(
|
|
347
|
+
gint64 vips__get_bytes(const char *filename,
|
|
348
|
+
unsigned char buf[], gint64 len);
|
|
349
|
+
int vips__fgetc(FILE *fp);
|
|
305
350
|
|
|
306
|
-
GValue *vips__gvalue_ref_string_new(
|
|
307
|
-
void vips__gslist_gvalue_free(
|
|
308
|
-
GSList *vips__gslist_gvalue_copy(
|
|
309
|
-
GSList *vips__gslist_gvalue_merge(
|
|
310
|
-
char *vips__gslist_gvalue_get(
|
|
351
|
+
GValue *vips__gvalue_ref_string_new(const char *text);
|
|
352
|
+
void vips__gslist_gvalue_free(GSList *list);
|
|
353
|
+
GSList *vips__gslist_gvalue_copy(const GSList *list);
|
|
354
|
+
GSList *vips__gslist_gvalue_merge(GSList *a, const GSList *b);
|
|
355
|
+
char *vips__gslist_gvalue_get(const GSList *list);
|
|
311
356
|
|
|
312
|
-
gint64 vips__seek_no_error(
|
|
357
|
+
gint64 vips__seek_no_error(int fd, gint64 pos, int whence);
|
|
313
358
|
/* TODO(kleisauke): VIPS_API is required by vipsedit.
|
|
314
359
|
*/
|
|
315
360
|
VIPS_API
|
|
316
|
-
gint64 vips__seek(
|
|
317
|
-
int vips__ftruncate(
|
|
361
|
+
gint64 vips__seek(int fd, gint64 pos, int whence);
|
|
362
|
+
int vips__ftruncate(int fd, gint64 pos);
|
|
318
363
|
VIPS_API
|
|
319
|
-
int vips_existsf(
|
|
320
|
-
G_GNUC_PRINTF(
|
|
364
|
+
int vips_existsf(const char *name, ...)
|
|
365
|
+
G_GNUC_PRINTF(1, 2);
|
|
321
366
|
VIPS_API
|
|
322
|
-
int vips_isdirf(
|
|
323
|
-
G_GNUC_PRINTF(
|
|
367
|
+
int vips_isdirf(const char *name, ...)
|
|
368
|
+
G_GNUC_PRINTF(1, 2);
|
|
324
369
|
VIPS_API
|
|
325
|
-
int vips_mkdirf(
|
|
326
|
-
G_GNUC_PRINTF(
|
|
370
|
+
int vips_mkdirf(const char *name, ...)
|
|
371
|
+
G_GNUC_PRINTF(1, 2);
|
|
327
372
|
VIPS_API
|
|
328
|
-
int vips_rmdirf(
|
|
329
|
-
G_GNUC_PRINTF(
|
|
373
|
+
int vips_rmdirf(const char *name, ...)
|
|
374
|
+
G_GNUC_PRINTF(1, 2);
|
|
330
375
|
VIPS_API
|
|
331
|
-
int vips_rename(
|
|
376
|
+
int vips_rename(const char *old_name, const char *new_name);
|
|
332
377
|
|
|
333
|
-
/**
|
|
378
|
+
/**
|
|
334
379
|
* VipsToken:
|
|
335
380
|
* @VIPS_TOKEN_LEFT: left bracket
|
|
336
381
|
* @VIPS_TOKEN_RIGHT: right bracket
|
|
@@ -339,7 +384,7 @@ int vips_rename( const char *old_name, const char *new_name );
|
|
|
339
384
|
* @VIPS_TOKEN_COMMA: comma
|
|
340
385
|
*
|
|
341
386
|
* Tokens returned by the vips lexical analyzer, see vips__token_get(). This
|
|
342
|
-
* is used to parse option strings for arguments.
|
|
387
|
+
* is used to parse option strings for arguments.
|
|
343
388
|
*
|
|
344
389
|
* Left and right brackets can be any of (, {, [, <.
|
|
345
390
|
*
|
|
@@ -348,56 +393,56 @@ int vips_rename( const char *old_name, const char *new_name );
|
|
|
348
393
|
*
|
|
349
394
|
*/
|
|
350
395
|
typedef enum {
|
|
351
|
-
|
|
396
|
+
VIPS_TOKEN_LEFT = 1,
|
|
352
397
|
VIPS_TOKEN_RIGHT,
|
|
353
398
|
VIPS_TOKEN_STRING,
|
|
354
399
|
VIPS_TOKEN_EQUALS,
|
|
355
400
|
VIPS_TOKEN_COMMA
|
|
356
401
|
} VipsToken;
|
|
357
402
|
|
|
358
|
-
const char *vips__token_get(
|
|
359
|
-
VipsToken *token, char *string, int size
|
|
360
|
-
const char *vips__token_must(
|
|
361
|
-
char *string, int size
|
|
362
|
-
const char *vips__token_need(
|
|
363
|
-
char *string, int size
|
|
364
|
-
const char *vips__token_segment(
|
|
365
|
-
char *string, int size
|
|
366
|
-
const char *vips__token_segment_need(
|
|
367
|
-
char *string, int size
|
|
368
|
-
const char *vips__find_rightmost_brackets(
|
|
403
|
+
const char *vips__token_get(const char *buffer,
|
|
404
|
+
VipsToken *token, char *string, int size);
|
|
405
|
+
const char *vips__token_must(const char *buffer, VipsToken *token,
|
|
406
|
+
char *string, int size);
|
|
407
|
+
const char *vips__token_need(const char *buffer, VipsToken need_token,
|
|
408
|
+
char *string, int size);
|
|
409
|
+
const char *vips__token_segment(const char *p, VipsToken *token,
|
|
410
|
+
char *string, int size);
|
|
411
|
+
const char *vips__token_segment_need(const char *p, VipsToken need_token,
|
|
412
|
+
char *string, int size);
|
|
413
|
+
const char *vips__find_rightmost_brackets(const char *p);
|
|
369
414
|
/* TODO(kleisauke): VIPS_API is required by libvips-cpp and vipsheader.
|
|
370
415
|
*/
|
|
371
416
|
VIPS_API
|
|
372
|
-
void vips__filename_split8(
|
|
373
|
-
char *filename, char *option_string
|
|
417
|
+
void vips__filename_split8(const char *name,
|
|
418
|
+
char *filename, char *option_string);
|
|
374
419
|
|
|
375
420
|
VIPS_API
|
|
376
|
-
int vips_ispoweroftwo(
|
|
421
|
+
int vips_ispoweroftwo(int p);
|
|
377
422
|
VIPS_API
|
|
378
|
-
int vips_amiMSBfirst(
|
|
423
|
+
int vips_amiMSBfirst(void);
|
|
379
424
|
|
|
380
425
|
/* TODO(kleisauke): VIPS_API is required by jpegsave_file_fuzzer.
|
|
381
426
|
*/
|
|
382
427
|
VIPS_API
|
|
383
|
-
char *vips__temp_name(
|
|
428
|
+
char *vips__temp_name(const char *format);
|
|
384
429
|
|
|
385
|
-
void vips__change_suffix(
|
|
386
|
-
|
|
430
|
+
void vips__change_suffix(const char *name, char *out, int mx,
|
|
431
|
+
const char *new_suff, const char **olds, int nolds);
|
|
387
432
|
|
|
388
433
|
VIPS_API
|
|
389
|
-
char *vips_realpath(
|
|
434
|
+
char *vips_realpath(const char *path);
|
|
390
435
|
|
|
391
|
-
guint32 vips__random(
|
|
392
|
-
guint32 vips__random_add(
|
|
436
|
+
guint32 vips__random(guint32 seed);
|
|
437
|
+
guint32 vips__random_add(guint32 seed, int value);
|
|
393
438
|
|
|
394
|
-
const char *vips__icc_dir(
|
|
395
|
-
const char *vips__windows_prefix(
|
|
439
|
+
const char *vips__icc_dir(void);
|
|
440
|
+
const char *vips__windows_prefix(void);
|
|
396
441
|
|
|
397
|
-
char *vips__get_iso8601(
|
|
442
|
+
char *vips__get_iso8601(void);
|
|
398
443
|
|
|
399
444
|
VIPS_API
|
|
400
|
-
int vips_strtod(
|
|
445
|
+
int vips_strtod(const char *str, double *out);
|
|
401
446
|
|
|
402
447
|
#ifdef __cplusplus
|
|
403
448
|
}
|