@img/sharp-libvips-dev 0.0.1 → 0.0.3
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 +3 -3
- 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/glib-2.0/glib/gmacros.h +1 -1
- package/include/glib-2.0/glib/gtestutils.h +1 -1
- package/include/glib-2.0/gobject/gtype.h +7 -7
- 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 +461 -384
- 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/libpng16/pnglibconf.h +1 -1
- package/include/pnglibconf.h +1 -1
- 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/include/zlib.h +23 -19
- package/package.json +1 -1
- package/versions.json +9 -9
package/cplusplus/VImage.cpp
CHANGED
|
@@ -10,28 +10,28 @@
|
|
|
10
10
|
|
|
11
11
|
/*
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Copyright (C) 1991-2001 The National Gallery
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
This program is free software; you can redistribute it and/or modify
|
|
16
|
+
it under the terms of the GNU Lesser General Public License as published by
|
|
17
|
+
the Free Software Foundation; either version 2 of the License, or
|
|
18
|
+
(at your option) any later version.
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
This program is distributed in the hope that it will be useful,
|
|
21
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
22
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
23
|
+
GNU Lesser General Public License for more details.
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
You should have received a copy of the GNU Lesser General Public License
|
|
26
|
+
along with this program; if not, write to the Free Software
|
|
27
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
28
|
+
02110-1301 USA
|
|
29
29
|
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
32
|
/*
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
|
35
35
|
|
|
36
36
|
*/
|
|
37
37
|
|
|
@@ -57,488 +57,488 @@ VIPS_NAMESPACE_START
|
|
|
57
57
|
*/
|
|
58
58
|
|
|
59
59
|
std::vector<double>
|
|
60
|
-
to_vectorv(
|
|
60
|
+
to_vectorv(int n, ...)
|
|
61
61
|
{
|
|
62
|
-
std::vector<double> vector(
|
|
62
|
+
std::vector<double> vector(n);
|
|
63
63
|
va_list ap;
|
|
64
64
|
|
|
65
|
-
va_start(
|
|
66
|
-
for(
|
|
67
|
-
vector[i] = va_arg(
|
|
68
|
-
va_end(
|
|
65
|
+
va_start(ap, n);
|
|
66
|
+
for (int i = 0; i < n; i++)
|
|
67
|
+
vector[i] = va_arg(ap, double);
|
|
68
|
+
va_end(ap);
|
|
69
69
|
|
|
70
|
-
return
|
|
70
|
+
return vector;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
std::vector<double>
|
|
74
|
-
to_vector(
|
|
74
|
+
to_vector(double value)
|
|
75
75
|
{
|
|
76
|
-
return
|
|
76
|
+
return to_vectorv(1, value);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
std::vector<double>
|
|
80
|
-
to_vector(
|
|
80
|
+
to_vector(int n, double array[])
|
|
81
81
|
{
|
|
82
|
-
std::vector<double> vector(
|
|
82
|
+
std::vector<double> vector(n);
|
|
83
83
|
|
|
84
|
-
for(
|
|
84
|
+
for (int i = 0; i < n; i++)
|
|
85
85
|
vector[i] = array[i];
|
|
86
86
|
|
|
87
|
-
return
|
|
87
|
+
return vector;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
std::vector<double>
|
|
91
|
-
negate(
|
|
91
|
+
negate(std::vector<double> vector)
|
|
92
92
|
{
|
|
93
|
-
std::vector<double> new_vector(
|
|
93
|
+
std::vector<double> new_vector(vector.size());
|
|
94
94
|
|
|
95
|
-
for(
|
|
95
|
+
for (std::vector<double>::size_type i = 0; i < vector.size(); i++)
|
|
96
96
|
new_vector[i] = vector[i] * -1;
|
|
97
97
|
|
|
98
|
-
return
|
|
98
|
+
return new_vector;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
std::vector<double>
|
|
102
|
-
invert(
|
|
102
|
+
invert(std::vector<double> vector)
|
|
103
103
|
{
|
|
104
|
-
std::vector<double> new_vector(
|
|
104
|
+
std::vector<double> new_vector(vector.size());
|
|
105
105
|
|
|
106
|
-
for(
|
|
106
|
+
for (std::vector<double>::size_type i = 0; i < vector.size(); i++)
|
|
107
107
|
new_vector[i] = 1.0 / vector[i];
|
|
108
108
|
|
|
109
|
-
return
|
|
109
|
+
return new_vector;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
VOption::~VOption()
|
|
113
113
|
{
|
|
114
114
|
std::list<Pair *>::iterator i;
|
|
115
115
|
|
|
116
|
-
for(
|
|
116
|
+
for (i = options.begin(); i != options.end(); ++i)
|
|
117
117
|
delete *i;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
// input bool
|
|
121
121
|
VOption *
|
|
122
|
-
VOption::set(
|
|
122
|
+
VOption::set(const char *name, bool value)
|
|
123
123
|
{
|
|
124
|
-
Pair *pair = new Pair(
|
|
124
|
+
Pair *pair = new Pair(name);
|
|
125
125
|
|
|
126
126
|
pair->input = true;
|
|
127
|
-
g_value_init(
|
|
128
|
-
g_value_set_boolean(
|
|
129
|
-
options.push_back(
|
|
127
|
+
g_value_init(&pair->value, G_TYPE_BOOLEAN);
|
|
128
|
+
g_value_set_boolean(&pair->value, value);
|
|
129
|
+
options.push_back(pair);
|
|
130
130
|
|
|
131
|
-
return
|
|
131
|
+
return this;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
// input int ... this path is used for enums as well
|
|
135
135
|
VOption *
|
|
136
|
-
VOption::set(
|
|
136
|
+
VOption::set(const char *name, int value)
|
|
137
137
|
{
|
|
138
|
-
Pair *pair = new Pair(
|
|
138
|
+
Pair *pair = new Pair(name);
|
|
139
139
|
|
|
140
140
|
pair->input = true;
|
|
141
|
-
g_value_init(
|
|
142
|
-
g_value_set_int(
|
|
143
|
-
options.push_back(
|
|
141
|
+
g_value_init(&pair->value, G_TYPE_INT);
|
|
142
|
+
g_value_set_int(&pair->value, value);
|
|
143
|
+
options.push_back(pair);
|
|
144
144
|
|
|
145
|
-
return
|
|
145
|
+
return this;
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
// input guint64
|
|
149
149
|
VOption *
|
|
150
|
-
VOption::set(
|
|
150
|
+
VOption::set(const char *name, guint64 value)
|
|
151
151
|
{
|
|
152
|
-
Pair *pair = new Pair(
|
|
152
|
+
Pair *pair = new Pair(name);
|
|
153
153
|
|
|
154
154
|
pair->input = true;
|
|
155
|
-
g_value_init(
|
|
156
|
-
g_value_set_uint64(
|
|
157
|
-
options.push_back(
|
|
155
|
+
g_value_init(&pair->value, G_TYPE_UINT64);
|
|
156
|
+
g_value_set_uint64(&pair->value, value);
|
|
157
|
+
options.push_back(pair);
|
|
158
158
|
|
|
159
|
-
return
|
|
159
|
+
return this;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
// input double
|
|
163
163
|
VOption *
|
|
164
|
-
VOption::set(
|
|
164
|
+
VOption::set(const char *name, double value)
|
|
165
165
|
{
|
|
166
|
-
Pair *pair = new Pair(
|
|
166
|
+
Pair *pair = new Pair(name);
|
|
167
167
|
|
|
168
168
|
pair->input = true;
|
|
169
|
-
g_value_init(
|
|
170
|
-
g_value_set_double(
|
|
171
|
-
options.push_back(
|
|
169
|
+
g_value_init(&pair->value, G_TYPE_DOUBLE);
|
|
170
|
+
g_value_set_double(&pair->value, value);
|
|
171
|
+
options.push_back(pair);
|
|
172
172
|
|
|
173
|
-
return
|
|
173
|
+
return this;
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
VOption *
|
|
177
|
-
VOption::set(
|
|
177
|
+
VOption::set(const char *name, const char *value)
|
|
178
178
|
{
|
|
179
|
-
Pair *pair = new Pair(
|
|
179
|
+
Pair *pair = new Pair(name);
|
|
180
180
|
|
|
181
181
|
pair->input = true;
|
|
182
|
-
g_value_init(
|
|
183
|
-
g_value_set_string(
|
|
184
|
-
options.push_back(
|
|
182
|
+
g_value_init(&pair->value, G_TYPE_STRING);
|
|
183
|
+
g_value_set_string(&pair->value, value);
|
|
184
|
+
options.push_back(pair);
|
|
185
185
|
|
|
186
|
-
return
|
|
186
|
+
return this;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
// input vips object (image, source, target, etc. etc.)
|
|
190
190
|
VOption *
|
|
191
|
-
VOption::set(
|
|
191
|
+
VOption::set(const char *name, const VObject value)
|
|
192
192
|
{
|
|
193
|
-
Pair *pair = new Pair(
|
|
193
|
+
Pair *pair = new Pair(name);
|
|
194
194
|
VipsObject *object = value.get_object();
|
|
195
|
-
GType type = G_OBJECT_TYPE(
|
|
195
|
+
GType type = G_OBJECT_TYPE(object);
|
|
196
196
|
|
|
197
197
|
pair->input = true;
|
|
198
|
-
g_value_init(
|
|
199
|
-
g_value_set_object(
|
|
200
|
-
options.push_back(
|
|
198
|
+
g_value_init(&pair->value, type);
|
|
199
|
+
g_value_set_object(&pair->value, object);
|
|
200
|
+
options.push_back(pair);
|
|
201
201
|
|
|
202
|
-
return
|
|
202
|
+
return this;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
// input int array
|
|
206
206
|
VOption *
|
|
207
|
-
VOption::set(
|
|
207
|
+
VOption::set(const char *name, std::vector<int> value)
|
|
208
208
|
{
|
|
209
|
-
Pair *pair = new Pair(
|
|
209
|
+
Pair *pair = new Pair(name);
|
|
210
210
|
|
|
211
211
|
int *array;
|
|
212
212
|
|
|
213
213
|
pair->input = true;
|
|
214
214
|
|
|
215
|
-
g_value_init(
|
|
216
|
-
vips_value_set_array_int(
|
|
217
|
-
static_cast<
|
|
218
|
-
array = vips_value_get_array_int(
|
|
215
|
+
g_value_init(&pair->value, VIPS_TYPE_ARRAY_INT);
|
|
216
|
+
vips_value_set_array_int(&pair->value, nullptr,
|
|
217
|
+
static_cast<int>(value.size()));
|
|
218
|
+
array = vips_value_get_array_int(&pair->value, nullptr);
|
|
219
219
|
|
|
220
|
-
for(
|
|
220
|
+
for (std::vector<double>::size_type i = 0; i < value.size(); i++)
|
|
221
221
|
array[i] = value[i];
|
|
222
222
|
|
|
223
|
-
options.push_back(
|
|
223
|
+
options.push_back(pair);
|
|
224
224
|
|
|
225
|
-
return
|
|
225
|
+
return this;
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
// input double array
|
|
229
229
|
VOption *
|
|
230
|
-
VOption::set(
|
|
230
|
+
VOption::set(const char *name, std::vector<double> value)
|
|
231
231
|
{
|
|
232
|
-
Pair *pair = new Pair(
|
|
232
|
+
Pair *pair = new Pair(name);
|
|
233
233
|
|
|
234
234
|
double *array;
|
|
235
235
|
|
|
236
236
|
pair->input = true;
|
|
237
237
|
|
|
238
|
-
g_value_init(
|
|
239
|
-
vips_value_set_array_double(
|
|
240
|
-
static_cast<
|
|
241
|
-
array = vips_value_get_array_double(
|
|
238
|
+
g_value_init(&pair->value, VIPS_TYPE_ARRAY_DOUBLE);
|
|
239
|
+
vips_value_set_array_double(&pair->value, nullptr,
|
|
240
|
+
static_cast<int>(value.size()));
|
|
241
|
+
array = vips_value_get_array_double(&pair->value, nullptr);
|
|
242
242
|
|
|
243
|
-
for(
|
|
243
|
+
for (std::vector<double>::size_type i = 0; i < value.size(); i++)
|
|
244
244
|
array[i] = value[i];
|
|
245
245
|
|
|
246
|
-
options.push_back(
|
|
246
|
+
options.push_back(pair);
|
|
247
247
|
|
|
248
|
-
return
|
|
248
|
+
return this;
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
// input image array
|
|
252
252
|
VOption *
|
|
253
|
-
VOption::set(
|
|
253
|
+
VOption::set(const char *name, std::vector<VImage> value)
|
|
254
254
|
{
|
|
255
|
-
Pair *pair = new Pair(
|
|
255
|
+
Pair *pair = new Pair(name);
|
|
256
256
|
|
|
257
257
|
VipsImage **array;
|
|
258
258
|
|
|
259
259
|
pair->input = true;
|
|
260
260
|
|
|
261
|
-
g_value_init(
|
|
262
|
-
vips_value_set_array_image(
|
|
263
|
-
static_cast<
|
|
264
|
-
array = vips_value_get_array_image(
|
|
261
|
+
g_value_init(&pair->value, VIPS_TYPE_ARRAY_IMAGE);
|
|
262
|
+
vips_value_set_array_image(&pair->value,
|
|
263
|
+
static_cast<int>(value.size()));
|
|
264
|
+
array = vips_value_get_array_image(&pair->value, nullptr);
|
|
265
265
|
|
|
266
|
-
for(
|
|
266
|
+
for (std::vector<double>::size_type i = 0; i < value.size(); i++) {
|
|
267
267
|
VipsImage *vips_image = value[i].get_image();
|
|
268
268
|
|
|
269
269
|
array[i] = vips_image;
|
|
270
|
-
g_object_ref(
|
|
270
|
+
g_object_ref(vips_image);
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
options.push_back(
|
|
273
|
+
options.push_back(pair);
|
|
274
274
|
|
|
275
|
-
return
|
|
275
|
+
return this;
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
// input blob
|
|
279
279
|
VOption *
|
|
280
|
-
VOption::set(
|
|
280
|
+
VOption::set(const char *name, VipsBlob *value)
|
|
281
281
|
{
|
|
282
|
-
Pair *pair = new Pair(
|
|
282
|
+
Pair *pair = new Pair(name);
|
|
283
283
|
|
|
284
284
|
pair->input = true;
|
|
285
|
-
g_value_init(
|
|
286
|
-
g_value_set_boxed(
|
|
287
|
-
options.push_back(
|
|
285
|
+
g_value_init(&pair->value, VIPS_TYPE_BLOB);
|
|
286
|
+
g_value_set_boxed(&pair->value, value);
|
|
287
|
+
options.push_back(pair);
|
|
288
288
|
|
|
289
|
-
return
|
|
289
|
+
return this;
|
|
290
290
|
}
|
|
291
291
|
|
|
292
292
|
// output bool
|
|
293
293
|
VOption *
|
|
294
|
-
VOption::set(
|
|
294
|
+
VOption::set(const char *name, bool *value)
|
|
295
295
|
{
|
|
296
|
-
Pair *pair = new Pair(
|
|
296
|
+
Pair *pair = new Pair(name);
|
|
297
297
|
|
|
298
298
|
pair->input = false;
|
|
299
299
|
pair->vbool = value;
|
|
300
|
-
g_value_init(
|
|
300
|
+
g_value_init(&pair->value, G_TYPE_BOOLEAN);
|
|
301
301
|
|
|
302
|
-
options.push_back(
|
|
302
|
+
options.push_back(pair);
|
|
303
303
|
|
|
304
|
-
return
|
|
304
|
+
return this;
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
// output int
|
|
308
308
|
VOption *
|
|
309
|
-
VOption::set(
|
|
309
|
+
VOption::set(const char *name, int *value)
|
|
310
310
|
{
|
|
311
|
-
Pair *pair = new Pair(
|
|
311
|
+
Pair *pair = new Pair(name);
|
|
312
312
|
|
|
313
313
|
pair->input = false;
|
|
314
314
|
pair->vint = value;
|
|
315
|
-
g_value_init(
|
|
315
|
+
g_value_init(&pair->value, G_TYPE_INT);
|
|
316
316
|
|
|
317
|
-
options.push_back(
|
|
317
|
+
options.push_back(pair);
|
|
318
318
|
|
|
319
|
-
return
|
|
319
|
+
return this;
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
// output double
|
|
323
323
|
VOption *
|
|
324
|
-
VOption::set(
|
|
324
|
+
VOption::set(const char *name, double *value)
|
|
325
325
|
{
|
|
326
|
-
Pair *pair = new Pair(
|
|
326
|
+
Pair *pair = new Pair(name);
|
|
327
327
|
|
|
328
328
|
pair->input = false;
|
|
329
329
|
pair->vdouble = value;
|
|
330
|
-
g_value_init(
|
|
330
|
+
g_value_init(&pair->value, G_TYPE_DOUBLE);
|
|
331
331
|
|
|
332
|
-
options.push_back(
|
|
332
|
+
options.push_back(pair);
|
|
333
333
|
|
|
334
|
-
return
|
|
334
|
+
return this;
|
|
335
335
|
}
|
|
336
336
|
|
|
337
337
|
// output image
|
|
338
338
|
VOption *
|
|
339
|
-
VOption::set(
|
|
339
|
+
VOption::set(const char *name, VImage *value)
|
|
340
340
|
{
|
|
341
|
-
Pair *pair = new Pair(
|
|
341
|
+
Pair *pair = new Pair(name);
|
|
342
342
|
|
|
343
343
|
pair->input = false;
|
|
344
344
|
pair->vimage = value;
|
|
345
|
-
g_value_init(
|
|
345
|
+
g_value_init(&pair->value, VIPS_TYPE_IMAGE);
|
|
346
346
|
|
|
347
|
-
options.push_back(
|
|
347
|
+
options.push_back(pair);
|
|
348
348
|
|
|
349
|
-
return
|
|
349
|
+
return this;
|
|
350
350
|
}
|
|
351
351
|
|
|
352
352
|
// output doublearray
|
|
353
353
|
VOption *
|
|
354
|
-
VOption::set(
|
|
354
|
+
VOption::set(const char *name, std::vector<double> *value)
|
|
355
355
|
{
|
|
356
|
-
Pair *pair = new Pair(
|
|
356
|
+
Pair *pair = new Pair(name);
|
|
357
357
|
|
|
358
358
|
pair->input = false;
|
|
359
359
|
pair->vvector = value;
|
|
360
|
-
g_value_init(
|
|
360
|
+
g_value_init(&pair->value, VIPS_TYPE_ARRAY_DOUBLE);
|
|
361
361
|
|
|
362
|
-
options.push_back(
|
|
362
|
+
options.push_back(pair);
|
|
363
363
|
|
|
364
|
-
return
|
|
364
|
+
return this;
|
|
365
365
|
}
|
|
366
366
|
|
|
367
367
|
// output blob
|
|
368
368
|
VOption *
|
|
369
|
-
VOption::set(
|
|
369
|
+
VOption::set(const char *name, VipsBlob **value)
|
|
370
370
|
{
|
|
371
|
-
Pair *pair = new Pair(
|
|
371
|
+
Pair *pair = new Pair(name);
|
|
372
372
|
|
|
373
373
|
pair->input = false;
|
|
374
374
|
pair->vblob = value;
|
|
375
|
-
g_value_init(
|
|
375
|
+
g_value_init(&pair->value, VIPS_TYPE_BLOB);
|
|
376
376
|
|
|
377
|
-
options.push_back(
|
|
377
|
+
options.push_back(pair);
|
|
378
378
|
|
|
379
|
-
return
|
|
379
|
+
return this;
|
|
380
380
|
}
|
|
381
381
|
|
|
382
382
|
// just g_object_set_property(), except we allow set enum from string
|
|
383
383
|
static void
|
|
384
|
-
set_property(
|
|
384
|
+
set_property(VipsObject *object, const char *name, const GValue *value)
|
|
385
385
|
{
|
|
386
|
-
VipsObjectClass *object_class = VIPS_OBJECT_GET_CLASS(
|
|
387
|
-
GType type = G_VALUE_TYPE(
|
|
386
|
+
VipsObjectClass *object_class = VIPS_OBJECT_GET_CLASS(object);
|
|
387
|
+
GType type = G_VALUE_TYPE(value);
|
|
388
388
|
|
|
389
389
|
GParamSpec *pspec;
|
|
390
390
|
VipsArgumentClass *argument_class;
|
|
391
391
|
VipsArgumentInstance *argument_instance;
|
|
392
392
|
|
|
393
|
-
if(
|
|
394
|
-
|
|
395
|
-
g_warning(
|
|
393
|
+
if (vips_object_get_argument(object, name,
|
|
394
|
+
&pspec, &argument_class, &argument_instance)) {
|
|
395
|
+
g_warning("%s", vips_error_buffer());
|
|
396
396
|
vips_error_clear();
|
|
397
397
|
return;
|
|
398
398
|
}
|
|
399
399
|
|
|
400
|
-
if(
|
|
401
|
-
type == G_TYPE_STRING
|
|
402
|
-
GType pspec_type = G_PARAM_SPEC_VALUE_TYPE(
|
|
400
|
+
if (G_IS_PARAM_SPEC_ENUM(pspec) &&
|
|
401
|
+
type == G_TYPE_STRING) {
|
|
402
|
+
GType pspec_type = G_PARAM_SPEC_VALUE_TYPE(pspec);
|
|
403
403
|
|
|
404
404
|
int enum_value;
|
|
405
|
-
GValue value2 =
|
|
405
|
+
GValue value2 = G_VALUE_INIT;
|
|
406
406
|
|
|
407
|
-
if
|
|
408
|
-
|
|
409
|
-
g_warning(
|
|
407
|
+
if ((enum_value = vips_enum_from_nick(object_class->nickname,
|
|
408
|
+
pspec_type, g_value_get_string(value))) < 0) {
|
|
409
|
+
g_warning("%s", vips_error_buffer());
|
|
410
410
|
vips_error_clear();
|
|
411
411
|
return;
|
|
412
412
|
}
|
|
413
413
|
|
|
414
|
-
g_value_init(
|
|
415
|
-
g_value_set_enum(
|
|
416
|
-
g_object_set_property(
|
|
417
|
-
g_value_unset(
|
|
414
|
+
g_value_init(&value2, pspec_type);
|
|
415
|
+
g_value_set_enum(&value2, enum_value);
|
|
416
|
+
g_object_set_property(G_OBJECT(object), name, &value2);
|
|
417
|
+
g_value_unset(&value2);
|
|
418
418
|
}
|
|
419
419
|
else
|
|
420
|
-
g_object_set_property(
|
|
420
|
+
g_object_set_property(G_OBJECT(object), name, value);
|
|
421
421
|
}
|
|
422
422
|
|
|
423
423
|
// walk the options and set props on the operation
|
|
424
424
|
void
|
|
425
|
-
VOption::set_operation(
|
|
425
|
+
VOption::set_operation(VipsOperation *operation)
|
|
426
426
|
{
|
|
427
427
|
std::list<Pair *>::iterator i;
|
|
428
428
|
|
|
429
|
-
for(
|
|
430
|
-
if
|
|
429
|
+
for (i = options.begin(); i != options.end(); ++i)
|
|
430
|
+
if ((*i)->input) {
|
|
431
431
|
#ifdef VIPS_DEBUG_VERBOSE
|
|
432
|
-
printf(
|
|
433
|
-
vips_object_print_name(
|
|
432
|
+
printf("set_operation: ");
|
|
433
|
+
vips_object_print_name(VIPS_OBJECT(operation));
|
|
434
434
|
char *str_value =
|
|
435
|
-
g_strdup_value_contents(
|
|
436
|
-
printf(
|
|
437
|
-
g_free(
|
|
435
|
+
g_strdup_value_contents(&(*i)->value);
|
|
436
|
+
printf(".%s = %s\n", (*i)->name, str_value);
|
|
437
|
+
g_free(str_value);
|
|
438
438
|
#endif /*VIPS_DEBUG_VERBOSE*/
|
|
439
439
|
|
|
440
|
-
set_property(
|
|
441
|
-
(*i)->name, &(*i)->value
|
|
440
|
+
set_property(VIPS_OBJECT(operation),
|
|
441
|
+
(*i)->name, &(*i)->value);
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
444
|
|
|
445
445
|
// walk the options and fetch any requested outputs
|
|
446
446
|
void
|
|
447
|
-
VOption::get_operation(
|
|
447
|
+
VOption::get_operation(VipsOperation *operation)
|
|
448
448
|
{
|
|
449
449
|
std::list<Pair *>::iterator i;
|
|
450
450
|
|
|
451
|
-
for(
|
|
452
|
-
if(
|
|
451
|
+
for (i = options.begin(); i != options.end(); ++i)
|
|
452
|
+
if (!(*i)->input) {
|
|
453
453
|
const char *name = (*i)->name;
|
|
454
454
|
|
|
455
|
-
g_object_get_property(
|
|
456
|
-
name, &(*i)->value
|
|
455
|
+
g_object_get_property(G_OBJECT(operation),
|
|
456
|
+
name, &(*i)->value);
|
|
457
457
|
|
|
458
458
|
#ifdef VIPS_DEBUG_VERBOSE
|
|
459
|
-
printf(
|
|
460
|
-
vips_object_print_name(
|
|
459
|
+
printf("get_operation: ");
|
|
460
|
+
vips_object_print_name(VIPS_OBJECT(operation));
|
|
461
461
|
char *str_value = g_strdup_value_contents(
|
|
462
|
-
&(*i)->value
|
|
463
|
-
printf(
|
|
464
|
-
g_free(
|
|
462
|
+
&(*i)->value);
|
|
463
|
+
printf(".%s = %s\n", name, str_value);
|
|
464
|
+
g_free(str_value);
|
|
465
465
|
#endif /*VIPS_DEBUG_VERBOSE*/
|
|
466
466
|
|
|
467
467
|
GValue *value = &(*i)->value;
|
|
468
|
-
GType type = G_VALUE_TYPE(
|
|
468
|
+
GType type = G_VALUE_TYPE(value);
|
|
469
469
|
|
|
470
|
-
if(
|
|
470
|
+
if (type == VIPS_TYPE_IMAGE) {
|
|
471
471
|
// rebox object
|
|
472
472
|
VipsImage *image = VIPS_IMAGE(
|
|
473
|
-
g_value_get_object(
|
|
474
|
-
*((*i)->vimage) = VImage(
|
|
473
|
+
g_value_get_object(value));
|
|
474
|
+
*((*i)->vimage) = VImage(image);
|
|
475
475
|
}
|
|
476
|
-
else if(
|
|
477
|
-
*((*i)->vint) = g_value_get_int(
|
|
478
|
-
else if(
|
|
479
|
-
*((*i)->vbool) = g_value_get_boolean(
|
|
480
|
-
else if(
|
|
481
|
-
*((*i)->vdouble) = g_value_get_double(
|
|
482
|
-
else if(
|
|
476
|
+
else if (type == G_TYPE_INT)
|
|
477
|
+
*((*i)->vint) = g_value_get_int(value);
|
|
478
|
+
else if (type == G_TYPE_BOOLEAN)
|
|
479
|
+
*((*i)->vbool) = g_value_get_boolean(value);
|
|
480
|
+
else if (type == G_TYPE_DOUBLE)
|
|
481
|
+
*((*i)->vdouble) = g_value_get_double(value);
|
|
482
|
+
else if (type == VIPS_TYPE_ARRAY_DOUBLE) {
|
|
483
483
|
int length;
|
|
484
484
|
double *array =
|
|
485
|
-
vips_value_get_array_double(
|
|
486
|
-
|
|
485
|
+
vips_value_get_array_double(value,
|
|
486
|
+
&length);
|
|
487
487
|
|
|
488
|
-
((*i)->vvector)->resize(
|
|
489
|
-
for(
|
|
488
|
+
((*i)->vvector)->resize(length);
|
|
489
|
+
for (int j = 0; j < length; j++)
|
|
490
490
|
(*((*i)->vvector))[j] = array[j];
|
|
491
491
|
}
|
|
492
|
-
else if(
|
|
492
|
+
else if (type == VIPS_TYPE_BLOB) {
|
|
493
493
|
// our caller gets a reference
|
|
494
494
|
*((*i)->vblob) =
|
|
495
|
-
(VipsBlob *) g_value_dup_boxed(
|
|
495
|
+
(VipsBlob *) g_value_dup_boxed(value);
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
499
|
|
|
500
500
|
void
|
|
501
|
-
VImage::call_option_string(
|
|
502
|
-
const char *option_string, VOption *options
|
|
501
|
+
VImage::call_option_string(const char *operation_name,
|
|
502
|
+
const char *option_string, VOption *options)
|
|
503
503
|
{
|
|
504
504
|
VipsOperation *operation;
|
|
505
505
|
|
|
506
|
-
VIPS_DEBUG_MSG(
|
|
507
|
-
operation_name
|
|
506
|
+
VIPS_DEBUG_MSG("call_option_string: starting for %s ...\n",
|
|
507
|
+
operation_name);
|
|
508
508
|
|
|
509
|
-
if(
|
|
509
|
+
if (!(operation = vips_operation_new(operation_name))) {
|
|
510
510
|
delete options;
|
|
511
|
-
throw(
|
|
511
|
+
throw(VError());
|
|
512
512
|
}
|
|
513
513
|
|
|
514
514
|
/* Set str options before vargs options, so the user can't
|
|
515
515
|
* override things we set deliberately.
|
|
516
516
|
*/
|
|
517
|
-
if(
|
|
518
|
-
vips_object_set_from_string(
|
|
519
|
-
option_string
|
|
520
|
-
vips_object_unref_outputs(
|
|
521
|
-
g_object_unref(
|
|
517
|
+
if (option_string &&
|
|
518
|
+
vips_object_set_from_string(VIPS_OBJECT(operation),
|
|
519
|
+
option_string)) {
|
|
520
|
+
vips_object_unref_outputs(VIPS_OBJECT(operation));
|
|
521
|
+
g_object_unref(operation);
|
|
522
522
|
delete options;
|
|
523
|
-
throw(
|
|
523
|
+
throw(VError());
|
|
524
524
|
}
|
|
525
525
|
|
|
526
|
-
if(
|
|
527
|
-
options->set_operation(
|
|
526
|
+
if (options)
|
|
527
|
+
options->set_operation(operation);
|
|
528
528
|
|
|
529
529
|
/* Build from cache.
|
|
530
530
|
*/
|
|
531
|
-
if(
|
|
532
|
-
vips_object_unref_outputs(
|
|
533
|
-
g_object_unref(
|
|
531
|
+
if (vips_cache_operation_buildp(&operation)) {
|
|
532
|
+
vips_object_unref_outputs(VIPS_OBJECT(operation));
|
|
533
|
+
g_object_unref(operation);
|
|
534
534
|
delete options;
|
|
535
|
-
throw(
|
|
535
|
+
throw(VError());
|
|
536
536
|
}
|
|
537
537
|
|
|
538
538
|
/* Walk args again, writing output.
|
|
539
539
|
*/
|
|
540
|
-
if(
|
|
541
|
-
options->get_operation(
|
|
540
|
+
if (options)
|
|
541
|
+
options->get_operation(operation);
|
|
542
542
|
|
|
543
543
|
/* We're done with options!
|
|
544
544
|
*/
|
|
@@ -548,17 +548,17 @@ VImage::call_option_string( const char *operation_name,
|
|
|
548
548
|
* one of its arguments or have finished its work. Either
|
|
549
549
|
* way, we can unref.
|
|
550
550
|
*/
|
|
551
|
-
g_object_unref(
|
|
551
|
+
g_object_unref(operation);
|
|
552
552
|
}
|
|
553
553
|
|
|
554
554
|
void
|
|
555
|
-
VImage::call(
|
|
555
|
+
VImage::call(const char *operation_name, VOption *options)
|
|
556
556
|
{
|
|
557
|
-
call_option_string(
|
|
557
|
+
call_option_string(operation_name, nullptr, options);
|
|
558
558
|
}
|
|
559
559
|
|
|
560
560
|
VImage
|
|
561
|
-
VImage::new_from_file(
|
|
561
|
+
VImage::new_from_file(const char *name, VOption *options)
|
|
562
562
|
{
|
|
563
563
|
char filename[VIPS_PATH_MAX];
|
|
564
564
|
char option_string[VIPS_PATH_MAX];
|
|
@@ -566,147 +566,147 @@ VImage::new_from_file( const char *name, VOption *options )
|
|
|
566
566
|
|
|
567
567
|
VImage out;
|
|
568
568
|
|
|
569
|
-
vips__filename_split8(
|
|
570
|
-
if(
|
|
569
|
+
vips__filename_split8(name, filename, option_string);
|
|
570
|
+
if (!(operation_name = vips_foreign_find_load(filename))) {
|
|
571
571
|
delete options;
|
|
572
572
|
throw VError();
|
|
573
573
|
}
|
|
574
574
|
|
|
575
|
-
call_option_string(
|
|
576
|
-
(options ? options : VImage::option())
|
|
577
|
-
set(
|
|
578
|
-
set(
|
|
575
|
+
call_option_string(operation_name, option_string,
|
|
576
|
+
(options ? options : VImage::option())
|
|
577
|
+
->set("filename", filename)
|
|
578
|
+
->set("out", &out));
|
|
579
579
|
|
|
580
|
-
return
|
|
580
|
+
return out;
|
|
581
581
|
}
|
|
582
582
|
|
|
583
583
|
VImage
|
|
584
|
-
VImage::new_from_buffer(
|
|
585
|
-
VOption *options
|
|
584
|
+
VImage::new_from_buffer(const void *buf, size_t len, const char *option_string,
|
|
585
|
+
VOption *options)
|
|
586
586
|
{
|
|
587
587
|
const char *operation_name;
|
|
588
588
|
VipsBlob *blob;
|
|
589
589
|
VImage out;
|
|
590
590
|
|
|
591
|
-
if(
|
|
591
|
+
if (!(operation_name = vips_foreign_find_load_buffer(buf, len))) {
|
|
592
592
|
delete options;
|
|
593
|
-
throw(
|
|
593
|
+
throw(VError());
|
|
594
594
|
}
|
|
595
595
|
|
|
596
596
|
/* We don't take a copy of the data or free it.
|
|
597
597
|
*/
|
|
598
|
-
blob = vips_blob_new(
|
|
599
|
-
options = (options ? options : VImage::option())
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
vips_area_unref(
|
|
598
|
+
blob = vips_blob_new(nullptr, buf, len);
|
|
599
|
+
options = (options ? options : VImage::option())
|
|
600
|
+
->set("buffer", blob)
|
|
601
|
+
->set("out", &out);
|
|
602
|
+
vips_area_unref(VIPS_AREA(blob));
|
|
603
603
|
|
|
604
|
-
call_option_string(
|
|
604
|
+
call_option_string(operation_name, option_string, options);
|
|
605
605
|
|
|
606
|
-
return
|
|
606
|
+
return out;
|
|
607
607
|
}
|
|
608
608
|
|
|
609
609
|
VImage
|
|
610
|
-
VImage::new_from_buffer(
|
|
611
|
-
VOption *options
|
|
610
|
+
VImage::new_from_buffer(const std::string &buf, const char *option_string,
|
|
611
|
+
VOption *options)
|
|
612
612
|
{
|
|
613
|
-
return
|
|
614
|
-
option_string, options
|
|
613
|
+
return new_from_buffer(buf.c_str(), buf.size(),
|
|
614
|
+
option_string, options);
|
|
615
615
|
}
|
|
616
616
|
|
|
617
617
|
VImage
|
|
618
|
-
VImage::new_from_source(
|
|
619
|
-
VOption *options
|
|
618
|
+
VImage::new_from_source(VSource source, const char *option_string,
|
|
619
|
+
VOption *options)
|
|
620
620
|
{
|
|
621
621
|
const char *operation_name;
|
|
622
622
|
VImage out;
|
|
623
623
|
|
|
624
|
-
if(
|
|
625
|
-
|
|
624
|
+
if (!(operation_name = vips_foreign_find_load_source(
|
|
625
|
+
source.get_source()))) {
|
|
626
626
|
delete options;
|
|
627
|
-
throw(
|
|
627
|
+
throw(VError());
|
|
628
628
|
}
|
|
629
629
|
|
|
630
|
-
options = (options ? options : VImage::option())
|
|
631
|
-
|
|
632
|
-
|
|
630
|
+
options = (options ? options : VImage::option())
|
|
631
|
+
->set("source", source)
|
|
632
|
+
->set("out", &out);
|
|
633
633
|
|
|
634
|
-
call_option_string(
|
|
634
|
+
call_option_string(operation_name, option_string, options);
|
|
635
635
|
|
|
636
|
-
return
|
|
636
|
+
return out;
|
|
637
637
|
}
|
|
638
638
|
|
|
639
|
-
VImage
|
|
640
|
-
VImage::new_from_memory_steal(
|
|
641
|
-
int width, int height, int bands, VipsBandFormat format
|
|
639
|
+
VImage
|
|
640
|
+
VImage::new_from_memory_steal(void *data, size_t size,
|
|
641
|
+
int width, int height, int bands, VipsBandFormat format)
|
|
642
642
|
{
|
|
643
643
|
VipsImage *image;
|
|
644
644
|
|
|
645
|
-
if(
|
|
646
|
-
|
|
647
|
-
throw(
|
|
645
|
+
if (!(image = vips_image_new_from_memory(data, size,
|
|
646
|
+
width, height, bands, format)))
|
|
647
|
+
throw(VError());
|
|
648
648
|
|
|
649
|
-
g_signal_connect(
|
|
650
|
-
G_CALLBACK(
|
|
649
|
+
g_signal_connect(image, "postclose",
|
|
650
|
+
G_CALLBACK(vips_image_free_buffer), data);
|
|
651
651
|
|
|
652
|
-
return
|
|
652
|
+
return VImage(image);
|
|
653
653
|
}
|
|
654
654
|
|
|
655
655
|
VImage
|
|
656
|
-
VImage::new_matrix(
|
|
656
|
+
VImage::new_matrix(int width, int height)
|
|
657
657
|
{
|
|
658
|
-
return
|
|
658
|
+
return VImage(vips_image_new_matrix(width, height));
|
|
659
659
|
}
|
|
660
660
|
|
|
661
661
|
VImage
|
|
662
|
-
VImage::new_matrixv(
|
|
662
|
+
VImage::new_matrixv(int width, int height, ...)
|
|
663
663
|
{
|
|
664
|
-
VImage matrix = new_matrix(
|
|
664
|
+
VImage matrix = new_matrix(width, height);
|
|
665
665
|
VipsImage *vips_matrix = matrix.get_image();
|
|
666
666
|
|
|
667
667
|
va_list ap;
|
|
668
668
|
|
|
669
|
-
va_start(
|
|
670
|
-
for(
|
|
671
|
-
for(
|
|
672
|
-
*VIPS_MATRIX(
|
|
673
|
-
va_arg(
|
|
674
|
-
va_end(
|
|
669
|
+
va_start(ap, height);
|
|
670
|
+
for (int y = 0; y < height; y++)
|
|
671
|
+
for (int x = 0; x < width; x++)
|
|
672
|
+
*VIPS_MATRIX(vips_matrix, x, y) =
|
|
673
|
+
va_arg(ap, double);
|
|
674
|
+
va_end(ap);
|
|
675
675
|
|
|
676
|
-
return
|
|
676
|
+
return matrix;
|
|
677
677
|
}
|
|
678
678
|
|
|
679
679
|
VImage
|
|
680
|
-
VImage::write(
|
|
680
|
+
VImage::write(VImage out) const
|
|
681
681
|
{
|
|
682
|
-
if(
|
|
682
|
+
if (vips_image_write(this->get_image(), out.get_image()))
|
|
683
683
|
throw VError();
|
|
684
684
|
|
|
685
|
-
return
|
|
685
|
+
return out;
|
|
686
686
|
}
|
|
687
687
|
|
|
688
688
|
void
|
|
689
|
-
VImage::write_to_file(
|
|
689
|
+
VImage::write_to_file(const char *name, VOption *options) const
|
|
690
690
|
{
|
|
691
691
|
char filename[VIPS_PATH_MAX];
|
|
692
692
|
char option_string[VIPS_PATH_MAX];
|
|
693
693
|
const char *operation_name;
|
|
694
694
|
|
|
695
|
-
vips__filename_split8(
|
|
696
|
-
if(
|
|
695
|
+
vips__filename_split8(name, filename, option_string);
|
|
696
|
+
if (!(operation_name = vips_foreign_find_save(filename))) {
|
|
697
697
|
delete options;
|
|
698
698
|
throw VError();
|
|
699
699
|
}
|
|
700
700
|
|
|
701
|
-
call_option_string(
|
|
702
|
-
(options ? options : VImage::option())
|
|
703
|
-
set(
|
|
704
|
-
set(
|
|
701
|
+
call_option_string(operation_name, option_string,
|
|
702
|
+
(options ? options : VImage::option())
|
|
703
|
+
->set("in", *this)
|
|
704
|
+
->set("filename", filename));
|
|
705
705
|
}
|
|
706
706
|
|
|
707
707
|
void
|
|
708
|
-
VImage::write_to_buffer(
|
|
709
|
-
VOption *options
|
|
708
|
+
VImage::write_to_buffer(const char *suffix, void **buf, size_t *size,
|
|
709
|
+
VOption *options) const
|
|
710
710
|
{
|
|
711
711
|
char filename[VIPS_PATH_MAX];
|
|
712
712
|
char option_string[VIPS_PATH_MAX];
|
|
@@ -718,87 +718,104 @@ VImage::write_to_buffer( const char *suffix, void **buf, size_t *size,
|
|
|
718
718
|
*
|
|
719
719
|
* We need to hide any errors from this first phase.
|
|
720
720
|
*/
|
|
721
|
-
vips__filename_split8(
|
|
721
|
+
vips__filename_split8(suffix, filename, option_string);
|
|
722
722
|
|
|
723
723
|
vips_error_freeze();
|
|
724
|
-
operation_name = vips_foreign_find_save_target(
|
|
724
|
+
operation_name = vips_foreign_find_save_target(filename);
|
|
725
725
|
vips_error_thaw();
|
|
726
726
|
|
|
727
|
-
if(
|
|
727
|
+
if (operation_name) {
|
|
728
728
|
VTarget target = VTarget::new_to_memory();
|
|
729
729
|
|
|
730
|
-
call_option_string(
|
|
731
|
-
(options ? options : VImage::option())
|
|
732
|
-
set(
|
|
733
|
-
set(
|
|
730
|
+
call_option_string(operation_name, option_string,
|
|
731
|
+
(options ? options : VImage::option())
|
|
732
|
+
->set("in", *this)
|
|
733
|
+
->set("target", target));
|
|
734
734
|
|
|
735
|
-
g_object_get(
|
|
735
|
+
g_object_get(target.get_target(), "blob", &blob, nullptr);
|
|
736
736
|
}
|
|
737
|
-
else if
|
|
738
|
-
call_option_string(
|
|
739
|
-
(options ? options : VImage::option())
|
|
740
|
-
set(
|
|
741
|
-
set(
|
|
737
|
+
else if ((operation_name = vips_foreign_find_save_buffer(filename))) {
|
|
738
|
+
call_option_string(operation_name, option_string,
|
|
739
|
+
(options ? options : VImage::option())
|
|
740
|
+
->set("in", *this)
|
|
741
|
+
->set("buffer", &blob));
|
|
742
742
|
}
|
|
743
743
|
else {
|
|
744
744
|
delete options;
|
|
745
745
|
throw VError();
|
|
746
746
|
}
|
|
747
747
|
|
|
748
|
-
if(
|
|
749
|
-
if(
|
|
750
|
-
*buf = VIPS_AREA(
|
|
751
|
-
VIPS_AREA(
|
|
748
|
+
if (blob) {
|
|
749
|
+
if (buf) {
|
|
750
|
+
*buf = VIPS_AREA(blob)->data;
|
|
751
|
+
VIPS_AREA(blob)->free_fn = nullptr;
|
|
752
752
|
}
|
|
753
|
-
if(
|
|
754
|
-
*size = VIPS_AREA(
|
|
753
|
+
if (size)
|
|
754
|
+
*size = VIPS_AREA(blob)->length;
|
|
755
755
|
|
|
756
|
-
vips_area_unref(
|
|
756
|
+
vips_area_unref(VIPS_AREA(blob));
|
|
757
757
|
}
|
|
758
758
|
}
|
|
759
759
|
|
|
760
760
|
void
|
|
761
|
-
VImage::write_to_target(
|
|
762
|
-
VOption *options
|
|
761
|
+
VImage::write_to_target(const char *suffix, VTarget target,
|
|
762
|
+
VOption *options) const
|
|
763
763
|
{
|
|
764
764
|
char filename[VIPS_PATH_MAX];
|
|
765
765
|
char option_string[VIPS_PATH_MAX];
|
|
766
766
|
const char *operation_name;
|
|
767
767
|
|
|
768
|
-
vips__filename_split8(
|
|
769
|
-
if(
|
|
768
|
+
vips__filename_split8(suffix, filename, option_string);
|
|
769
|
+
if (!(operation_name = vips_foreign_find_save_target(filename))) {
|
|
770
770
|
delete options;
|
|
771
771
|
throw VError();
|
|
772
772
|
}
|
|
773
773
|
|
|
774
|
-
call_option_string(
|
|
775
|
-
(options ? options : VImage::option())
|
|
776
|
-
set(
|
|
777
|
-
set(
|
|
774
|
+
call_option_string(operation_name, option_string,
|
|
775
|
+
(options ? options : VImage::option())
|
|
776
|
+
->set("in", *this)
|
|
777
|
+
->set("target", target));
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
VImage
|
|
781
|
+
VImage::thumbnail_buffer(void *buf, size_t len, int width, VOption *options)
|
|
782
|
+
{
|
|
783
|
+
VipsBlob *blob;
|
|
784
|
+
VImage out;
|
|
785
|
+
|
|
786
|
+
/* We don't take a copy of the data or free it.
|
|
787
|
+
*/
|
|
788
|
+
blob = vips_blob_new(nullptr, buf, len);
|
|
789
|
+
options = (options ? options : VImage::option())->set("buffer", blob)->set("width", width)->set("out", &out);
|
|
790
|
+
vips_area_unref(VIPS_AREA(blob));
|
|
791
|
+
|
|
792
|
+
call("thumbnail_buffer", options);
|
|
793
|
+
|
|
794
|
+
return out;
|
|
778
795
|
}
|
|
779
796
|
|
|
780
797
|
VRegion
|
|
781
798
|
VImage::region() const
|
|
782
799
|
{
|
|
783
|
-
return VRegion::new_from_image(
|
|
800
|
+
return VRegion::new_from_image(*this);
|
|
784
801
|
}
|
|
785
802
|
|
|
786
803
|
VRegion
|
|
787
|
-
VImage::region(
|
|
804
|
+
VImage::region(VipsRect *rect) const
|
|
788
805
|
{
|
|
789
|
-
VRegion region = VRegion::new_from_image(
|
|
806
|
+
VRegion region = VRegion::new_from_image(*this);
|
|
790
807
|
|
|
791
|
-
region.prepare(
|
|
808
|
+
region.prepare(rect);
|
|
792
809
|
|
|
793
810
|
return region;
|
|
794
811
|
}
|
|
795
812
|
|
|
796
813
|
VRegion
|
|
797
|
-
VImage::region(
|
|
814
|
+
VImage::region(int left, int top, int width, int height) const
|
|
798
815
|
{
|
|
799
|
-
VRegion region = VRegion::new_from_image(
|
|
816
|
+
VRegion region = VRegion::new_from_image(*this);
|
|
800
817
|
|
|
801
|
-
region.prepare(
|
|
818
|
+
region.prepare(left, top, width, height);
|
|
802
819
|
|
|
803
820
|
return region;
|
|
804
821
|
}
|
|
@@ -806,743 +823,773 @@ VImage::region( int left, int top, int width, int height ) const
|
|
|
806
823
|
#include "vips-operators.cpp"
|
|
807
824
|
|
|
808
825
|
std::vector<VImage>
|
|
809
|
-
VImage::bandsplit(
|
|
826
|
+
VImage::bandsplit(VOption *options) const
|
|
810
827
|
{
|
|
811
828
|
std::vector<VImage> b;
|
|
812
829
|
b.reserve(bands());
|
|
813
830
|
|
|
814
|
-
for(
|
|
815
|
-
b.push_back(
|
|
831
|
+
for (int i = 0; i < bands(); i++)
|
|
832
|
+
b.push_back(extract_band(i));
|
|
816
833
|
|
|
817
|
-
return
|
|
834
|
+
return b;
|
|
818
835
|
}
|
|
819
836
|
|
|
820
837
|
VImage
|
|
821
|
-
VImage::bandjoin(
|
|
838
|
+
VImage::bandjoin(VImage other, VOption *options) const
|
|
822
839
|
{
|
|
823
840
|
VImage v[2] = { *this, other };
|
|
824
|
-
std::vector<VImage> vec(
|
|
841
|
+
std::vector<VImage> vec(v, v + VIPS_NUMBER(v));
|
|
825
842
|
|
|
826
|
-
return
|
|
843
|
+
return bandjoin(vec, options);
|
|
827
844
|
}
|
|
828
845
|
|
|
829
846
|
VImage
|
|
830
|
-
VImage::composite(
|
|
847
|
+
VImage::composite(VImage other, VipsBlendMode mode, VOption *options) const
|
|
831
848
|
{
|
|
832
849
|
VImage v[2] = { *this, other };
|
|
833
|
-
std::vector<VImage> ivec(
|
|
834
|
-
int m[1] = { static_cast<int>(
|
|
835
|
-
std::vector<int> mvec(
|
|
850
|
+
std::vector<VImage> ivec(v, v + VIPS_NUMBER(v));
|
|
851
|
+
int m[1] = { static_cast<int>(mode) };
|
|
852
|
+
std::vector<int> mvec(m, m + VIPS_NUMBER(m));
|
|
836
853
|
|
|
837
|
-
return
|
|
854
|
+
return composite(ivec, mvec, options);
|
|
838
855
|
}
|
|
839
856
|
|
|
840
857
|
std::complex<double>
|
|
841
|
-
VImage::minpos(
|
|
858
|
+
VImage::minpos(VOption *options) const
|
|
842
859
|
{
|
|
843
860
|
double x, y;
|
|
844
861
|
|
|
845
862
|
(void) min(
|
|
846
|
-
(options ? options : VImage::option())
|
|
847
|
-
set(
|
|
848
|
-
set(
|
|
863
|
+
(options ? options : VImage::option())
|
|
864
|
+
->set("x", &x)
|
|
865
|
+
->set("y", &y));
|
|
849
866
|
|
|
850
|
-
return
|
|
867
|
+
return std::complex<double>(x, y);
|
|
851
868
|
}
|
|
852
869
|
|
|
853
870
|
std::complex<double>
|
|
854
|
-
VImage::maxpos(
|
|
871
|
+
VImage::maxpos(VOption *options) const
|
|
855
872
|
{
|
|
856
873
|
double x, y;
|
|
857
874
|
|
|
858
875
|
(void) max(
|
|
859
|
-
(options ? options : VImage::option())
|
|
860
|
-
set(
|
|
861
|
-
set(
|
|
876
|
+
(options ? options : VImage::option())
|
|
877
|
+
->set("x", &x)
|
|
878
|
+
->set("y", &y));
|
|
862
879
|
|
|
863
|
-
return
|
|
880
|
+
return std::complex<double>(x, y);
|
|
864
881
|
}
|
|
865
882
|
|
|
866
883
|
// Operator overloads
|
|
867
884
|
|
|
868
885
|
VImage
|
|
869
|
-
VImage::operator[](
|
|
886
|
+
VImage::operator[](int index) const
|
|
870
887
|
{
|
|
871
|
-
return
|
|
888
|
+
return this->extract_band(index);
|
|
872
889
|
}
|
|
873
890
|
|
|
874
891
|
std::vector<double>
|
|
875
|
-
VImage::operator()(
|
|
892
|
+
VImage::operator()(int x, int y) const
|
|
876
893
|
{
|
|
877
|
-
return
|
|
894
|
+
return this->getpoint(x, y);
|
|
878
895
|
}
|
|
879
896
|
|
|
880
897
|
VImage
|
|
881
|
-
operator+(
|
|
898
|
+
operator+(const VImage a, const VImage b)
|
|
882
899
|
{
|
|
883
|
-
return
|
|
900
|
+
return a.add(b);
|
|
884
901
|
}
|
|
885
902
|
|
|
886
903
|
VImage
|
|
887
|
-
operator+(
|
|
904
|
+
operator+(double a, const VImage b)
|
|
888
905
|
{
|
|
889
|
-
return
|
|
906
|
+
return b.linear(1.0, a);
|
|
890
907
|
}
|
|
891
908
|
|
|
892
909
|
VImage
|
|
893
|
-
operator+(
|
|
910
|
+
operator+(const VImage a, double b)
|
|
894
911
|
{
|
|
895
|
-
return
|
|
912
|
+
return a.linear(1.0, b);
|
|
896
913
|
}
|
|
897
914
|
|
|
898
915
|
VImage
|
|
899
|
-
operator+(
|
|
916
|
+
operator+(const std::vector<double> a, const VImage b)
|
|
900
917
|
{
|
|
901
|
-
return
|
|
918
|
+
return b.linear(1.0, a);
|
|
902
919
|
}
|
|
903
920
|
|
|
904
921
|
VImage
|
|
905
|
-
operator+(
|
|
922
|
+
operator+(const VImage a, const std::vector<double> b)
|
|
906
923
|
{
|
|
907
|
-
return
|
|
924
|
+
return a.linear(1.0, b);
|
|
908
925
|
}
|
|
909
926
|
|
|
910
927
|
VImage &
|
|
911
|
-
operator+=(
|
|
928
|
+
operator+=(VImage &a, const VImage b)
|
|
912
929
|
{
|
|
913
|
-
|
|
930
|
+
a = a + b;
|
|
931
|
+
return a;
|
|
914
932
|
}
|
|
915
933
|
|
|
916
934
|
VImage &
|
|
917
|
-
operator+=(
|
|
935
|
+
operator+=(VImage &a, const double b)
|
|
918
936
|
{
|
|
919
|
-
|
|
937
|
+
a = a + b;
|
|
938
|
+
return a;
|
|
920
939
|
}
|
|
921
940
|
|
|
922
941
|
VImage &
|
|
923
|
-
operator+=(
|
|
942
|
+
operator+=(VImage &a, const std::vector<double> b)
|
|
924
943
|
{
|
|
925
|
-
|
|
944
|
+
a = a + b;
|
|
945
|
+
return a;
|
|
926
946
|
}
|
|
927
947
|
|
|
928
948
|
VImage
|
|
929
|
-
operator-(
|
|
949
|
+
operator-(const VImage a, const VImage b)
|
|
930
950
|
{
|
|
931
|
-
return
|
|
951
|
+
return a.subtract(b);
|
|
932
952
|
}
|
|
933
953
|
|
|
934
954
|
VImage
|
|
935
|
-
operator-(
|
|
955
|
+
operator-(double a, const VImage b)
|
|
936
956
|
{
|
|
937
|
-
return
|
|
957
|
+
return b.linear(-1.0, a);
|
|
938
958
|
}
|
|
939
959
|
|
|
940
960
|
VImage
|
|
941
|
-
operator-(
|
|
961
|
+
operator-(const VImage a, double b)
|
|
942
962
|
{
|
|
943
|
-
return
|
|
963
|
+
return a.linear(1.0, -b);
|
|
944
964
|
}
|
|
945
965
|
|
|
946
966
|
VImage
|
|
947
|
-
operator-(
|
|
967
|
+
operator-(const std::vector<double> a, const VImage b)
|
|
948
968
|
{
|
|
949
|
-
return
|
|
969
|
+
return b.linear(-1.0, a);
|
|
950
970
|
}
|
|
951
971
|
|
|
952
972
|
VImage
|
|
953
|
-
operator-(
|
|
973
|
+
operator-(const VImage a, const std::vector<double> b)
|
|
954
974
|
{
|
|
955
|
-
return
|
|
975
|
+
return a.linear(1.0, vips::negate(b));
|
|
956
976
|
}
|
|
957
977
|
|
|
958
978
|
VImage &
|
|
959
|
-
operator-=(
|
|
979
|
+
operator-=(VImage &a, const VImage b)
|
|
960
980
|
{
|
|
961
|
-
|
|
981
|
+
a = a - b;
|
|
982
|
+
return a;
|
|
962
983
|
}
|
|
963
984
|
|
|
964
985
|
VImage &
|
|
965
|
-
operator-=(
|
|
986
|
+
operator-=(VImage &a, const double b)
|
|
966
987
|
{
|
|
967
|
-
|
|
988
|
+
a = a - b;
|
|
989
|
+
return a;
|
|
968
990
|
}
|
|
969
991
|
|
|
970
992
|
VImage &
|
|
971
|
-
operator-=(
|
|
993
|
+
operator-=(VImage &a, const std::vector<double> b)
|
|
972
994
|
{
|
|
973
|
-
|
|
995
|
+
a = a - b;
|
|
996
|
+
return a;
|
|
974
997
|
}
|
|
975
998
|
|
|
976
999
|
VImage
|
|
977
|
-
operator-(
|
|
1000
|
+
operator-(const VImage a)
|
|
978
1001
|
{
|
|
979
|
-
return
|
|
1002
|
+
return a * -1;
|
|
980
1003
|
}
|
|
981
1004
|
|
|
982
1005
|
VImage
|
|
983
|
-
operator*(
|
|
1006
|
+
operator*(const VImage a, const VImage b)
|
|
984
1007
|
{
|
|
985
|
-
return
|
|
1008
|
+
return a.multiply(b);
|
|
986
1009
|
}
|
|
987
1010
|
|
|
988
1011
|
VImage
|
|
989
|
-
operator*(
|
|
1012
|
+
operator*(double a, const VImage b)
|
|
990
1013
|
{
|
|
991
|
-
return
|
|
1014
|
+
return b.linear(a, 0.0);
|
|
992
1015
|
}
|
|
993
1016
|
|
|
994
1017
|
VImage
|
|
995
|
-
operator*(
|
|
1018
|
+
operator*(const VImage a, double b)
|
|
996
1019
|
{
|
|
997
|
-
return
|
|
1020
|
+
return a.linear(b, 0.0);
|
|
998
1021
|
}
|
|
999
1022
|
|
|
1000
1023
|
VImage
|
|
1001
|
-
operator*(
|
|
1024
|
+
operator*(const std::vector<double> a, const VImage b)
|
|
1002
1025
|
{
|
|
1003
|
-
return
|
|
1026
|
+
return b.linear(a, 0.0);
|
|
1004
1027
|
}
|
|
1005
1028
|
|
|
1006
1029
|
VImage
|
|
1007
|
-
operator*(
|
|
1030
|
+
operator*(const VImage a, const std::vector<double> b)
|
|
1008
1031
|
{
|
|
1009
|
-
return
|
|
1032
|
+
return a.linear(b, 0.0);
|
|
1010
1033
|
}
|
|
1011
1034
|
|
|
1012
1035
|
VImage &
|
|
1013
|
-
operator*=(
|
|
1036
|
+
operator*=(VImage &a, const VImage b)
|
|
1014
1037
|
{
|
|
1015
|
-
|
|
1038
|
+
a = a * b;
|
|
1039
|
+
return a;
|
|
1016
1040
|
}
|
|
1017
1041
|
|
|
1018
1042
|
VImage &
|
|
1019
|
-
operator*=(
|
|
1043
|
+
operator*=(VImage &a, const double b)
|
|
1020
1044
|
{
|
|
1021
|
-
|
|
1045
|
+
a = a * b;
|
|
1046
|
+
return a;
|
|
1022
1047
|
}
|
|
1023
1048
|
|
|
1024
1049
|
VImage &
|
|
1025
|
-
operator*=(
|
|
1050
|
+
operator*=(VImage &a, const std::vector<double> b)
|
|
1026
1051
|
{
|
|
1027
|
-
|
|
1052
|
+
a = a * b;
|
|
1053
|
+
return a;
|
|
1028
1054
|
}
|
|
1029
1055
|
|
|
1030
1056
|
VImage
|
|
1031
|
-
operator/(
|
|
1057
|
+
operator/(const VImage a, const VImage b)
|
|
1032
1058
|
{
|
|
1033
|
-
return
|
|
1059
|
+
return a.divide(b);
|
|
1034
1060
|
}
|
|
1035
1061
|
|
|
1036
1062
|
VImage
|
|
1037
|
-
operator/(
|
|
1063
|
+
operator/(double a, const VImage b)
|
|
1038
1064
|
{
|
|
1039
|
-
return
|
|
1065
|
+
return b.pow(-1.0).linear(a, 0.0);
|
|
1040
1066
|
}
|
|
1041
1067
|
|
|
1042
1068
|
VImage
|
|
1043
|
-
operator/(
|
|
1069
|
+
operator/(const VImage a, double b)
|
|
1044
1070
|
{
|
|
1045
|
-
return
|
|
1071
|
+
return a.linear(1.0 / b, 0.0);
|
|
1046
1072
|
}
|
|
1047
1073
|
|
|
1048
1074
|
VImage
|
|
1049
|
-
operator/(
|
|
1075
|
+
operator/(const std::vector<double> a, const VImage b)
|
|
1050
1076
|
{
|
|
1051
|
-
return
|
|
1077
|
+
return b.pow(-1.0).linear(a, 0.0);
|
|
1052
1078
|
}
|
|
1053
1079
|
|
|
1054
1080
|
VImage
|
|
1055
|
-
operator/(
|
|
1081
|
+
operator/(const VImage a, const std::vector<double> b)
|
|
1056
1082
|
{
|
|
1057
|
-
return
|
|
1083
|
+
return a.linear(vips::invert(b), 0.0);
|
|
1058
1084
|
}
|
|
1059
1085
|
|
|
1060
1086
|
VImage &
|
|
1061
|
-
operator/=(
|
|
1087
|
+
operator/=(VImage &a, const VImage b)
|
|
1062
1088
|
{
|
|
1063
|
-
|
|
1089
|
+
a = a / b;
|
|
1090
|
+
return a;
|
|
1064
1091
|
}
|
|
1065
1092
|
|
|
1066
1093
|
VImage &
|
|
1067
|
-
operator/=(
|
|
1094
|
+
operator/=(VImage &a, const double b)
|
|
1068
1095
|
{
|
|
1069
|
-
|
|
1096
|
+
a = a / b;
|
|
1097
|
+
return a;
|
|
1070
1098
|
}
|
|
1071
1099
|
|
|
1072
1100
|
VImage &
|
|
1073
|
-
operator/=(
|
|
1101
|
+
operator/=(VImage &a, const std::vector<double> b)
|
|
1074
1102
|
{
|
|
1075
|
-
|
|
1103
|
+
a = a / b;
|
|
1104
|
+
return a;
|
|
1076
1105
|
}
|
|
1077
1106
|
|
|
1078
1107
|
VImage
|
|
1079
|
-
operator%(
|
|
1108
|
+
operator%(const VImage a, const VImage b)
|
|
1080
1109
|
{
|
|
1081
|
-
return
|
|
1110
|
+
return a.remainder(b);
|
|
1082
1111
|
}
|
|
1083
1112
|
|
|
1084
1113
|
VImage
|
|
1085
|
-
operator%(
|
|
1114
|
+
operator%(const VImage a, const double b)
|
|
1086
1115
|
{
|
|
1087
|
-
return
|
|
1116
|
+
return a.remainder_const(to_vector(b));
|
|
1088
1117
|
}
|
|
1089
1118
|
|
|
1090
1119
|
VImage
|
|
1091
|
-
operator%(
|
|
1120
|
+
operator%(const VImage a, const std::vector<double> b)
|
|
1092
1121
|
{
|
|
1093
|
-
return
|
|
1122
|
+
return a.remainder_const(b);
|
|
1094
1123
|
}
|
|
1095
1124
|
|
|
1096
1125
|
VImage &
|
|
1097
|
-
operator%=(
|
|
1126
|
+
operator%=(VImage &a, const VImage b)
|
|
1098
1127
|
{
|
|
1099
|
-
|
|
1128
|
+
a = a % b;
|
|
1129
|
+
return a;
|
|
1100
1130
|
}
|
|
1101
1131
|
|
|
1102
1132
|
VImage &
|
|
1103
|
-
operator%=(
|
|
1133
|
+
operator%=(VImage &a, const double b)
|
|
1104
1134
|
{
|
|
1105
|
-
|
|
1135
|
+
a = a % b;
|
|
1136
|
+
return a;
|
|
1106
1137
|
}
|
|
1107
1138
|
|
|
1108
1139
|
VImage &
|
|
1109
|
-
operator%=(
|
|
1140
|
+
operator%=(VImage &a, const std::vector<double> b)
|
|
1110
1141
|
{
|
|
1111
|
-
|
|
1142
|
+
a = a % b;
|
|
1143
|
+
return a;
|
|
1112
1144
|
}
|
|
1113
1145
|
|
|
1114
1146
|
VImage
|
|
1115
|
-
operator<(
|
|
1147
|
+
operator<(const VImage a, const VImage b)
|
|
1116
1148
|
{
|
|
1117
|
-
return
|
|
1149
|
+
return a.relational(b, VIPS_OPERATION_RELATIONAL_LESS);
|
|
1118
1150
|
}
|
|
1119
1151
|
|
|
1120
1152
|
VImage
|
|
1121
|
-
operator<(
|
|
1153
|
+
operator<(const double a, const VImage b)
|
|
1122
1154
|
{
|
|
1123
|
-
return
|
|
1124
|
-
to_vector(
|
|
1155
|
+
return b.relational_const(VIPS_OPERATION_RELATIONAL_MORE,
|
|
1156
|
+
to_vector(a));
|
|
1125
1157
|
}
|
|
1126
1158
|
|
|
1127
1159
|
VImage
|
|
1128
|
-
operator<(
|
|
1160
|
+
operator<(const VImage a, const double b)
|
|
1129
1161
|
{
|
|
1130
|
-
return
|
|
1131
|
-
to_vector(
|
|
1162
|
+
return a.relational_const(VIPS_OPERATION_RELATIONAL_LESS,
|
|
1163
|
+
to_vector(b));
|
|
1132
1164
|
}
|
|
1133
1165
|
|
|
1134
1166
|
VImage
|
|
1135
|
-
operator<(
|
|
1167
|
+
operator<(const std::vector<double> a, const VImage b)
|
|
1136
1168
|
{
|
|
1137
|
-
return
|
|
1138
|
-
a
|
|
1169
|
+
return b.relational_const(VIPS_OPERATION_RELATIONAL_MORE,
|
|
1170
|
+
a);
|
|
1139
1171
|
}
|
|
1140
1172
|
|
|
1141
1173
|
VImage
|
|
1142
|
-
operator<(
|
|
1174
|
+
operator<(const VImage a, const std::vector<double> b)
|
|
1143
1175
|
{
|
|
1144
|
-
return
|
|
1145
|
-
b
|
|
1176
|
+
return a.relational_const(VIPS_OPERATION_RELATIONAL_LESS,
|
|
1177
|
+
b);
|
|
1146
1178
|
}
|
|
1147
1179
|
|
|
1148
1180
|
VImage
|
|
1149
|
-
operator<=(
|
|
1181
|
+
operator<=(const VImage a, const VImage b)
|
|
1150
1182
|
{
|
|
1151
|
-
return
|
|
1183
|
+
return a.relational(b, VIPS_OPERATION_RELATIONAL_LESSEQ);
|
|
1152
1184
|
}
|
|
1153
1185
|
|
|
1154
1186
|
VImage
|
|
1155
|
-
operator<=(
|
|
1187
|
+
operator<=(const double a, const VImage b)
|
|
1156
1188
|
{
|
|
1157
|
-
return
|
|
1158
|
-
to_vector(
|
|
1189
|
+
return b.relational_const(VIPS_OPERATION_RELATIONAL_MOREEQ,
|
|
1190
|
+
to_vector(a));
|
|
1159
1191
|
}
|
|
1160
1192
|
|
|
1161
1193
|
VImage
|
|
1162
|
-
operator<=(
|
|
1194
|
+
operator<=(const VImage a, const double b)
|
|
1163
1195
|
{
|
|
1164
|
-
return
|
|
1165
|
-
to_vector(
|
|
1196
|
+
return a.relational_const(VIPS_OPERATION_RELATIONAL_LESSEQ,
|
|
1197
|
+
to_vector(b));
|
|
1166
1198
|
}
|
|
1167
1199
|
|
|
1168
1200
|
VImage
|
|
1169
|
-
operator<=(
|
|
1201
|
+
operator<=(const std::vector<double> a, const VImage b)
|
|
1170
1202
|
{
|
|
1171
|
-
return
|
|
1172
|
-
a
|
|
1203
|
+
return b.relational_const(VIPS_OPERATION_RELATIONAL_MOREEQ,
|
|
1204
|
+
a);
|
|
1173
1205
|
}
|
|
1174
1206
|
|
|
1175
1207
|
VImage
|
|
1176
|
-
operator<=(
|
|
1208
|
+
operator<=(const VImage a, const std::vector<double> b)
|
|
1177
1209
|
{
|
|
1178
|
-
return
|
|
1179
|
-
b
|
|
1210
|
+
return a.relational_const(VIPS_OPERATION_RELATIONAL_LESSEQ,
|
|
1211
|
+
b);
|
|
1180
1212
|
}
|
|
1181
1213
|
|
|
1182
1214
|
VImage
|
|
1183
|
-
operator>(
|
|
1215
|
+
operator>(const VImage a, const VImage b)
|
|
1184
1216
|
{
|
|
1185
|
-
return
|
|
1217
|
+
return a.relational(b, VIPS_OPERATION_RELATIONAL_MORE);
|
|
1186
1218
|
}
|
|
1187
1219
|
|
|
1188
1220
|
VImage
|
|
1189
|
-
operator>(
|
|
1221
|
+
operator>(const double a, const VImage b)
|
|
1190
1222
|
{
|
|
1191
|
-
return
|
|
1192
|
-
to_vector(
|
|
1223
|
+
return b.relational_const(VIPS_OPERATION_RELATIONAL_LESS,
|
|
1224
|
+
to_vector(a));
|
|
1193
1225
|
}
|
|
1194
1226
|
|
|
1195
1227
|
VImage
|
|
1196
|
-
operator>(
|
|
1228
|
+
operator>(const VImage a, const double b)
|
|
1197
1229
|
{
|
|
1198
|
-
return
|
|
1199
|
-
to_vector(
|
|
1230
|
+
return a.relational_const(VIPS_OPERATION_RELATIONAL_MORE,
|
|
1231
|
+
to_vector(b));
|
|
1200
1232
|
}
|
|
1201
1233
|
|
|
1202
1234
|
VImage
|
|
1203
|
-
operator>(
|
|
1235
|
+
operator>(const std::vector<double> a, const VImage b)
|
|
1204
1236
|
{
|
|
1205
|
-
return
|
|
1206
|
-
a
|
|
1237
|
+
return b.relational_const(VIPS_OPERATION_RELATIONAL_LESS,
|
|
1238
|
+
a);
|
|
1207
1239
|
}
|
|
1208
1240
|
|
|
1209
1241
|
VImage
|
|
1210
|
-
operator>(
|
|
1242
|
+
operator>(const VImage a, const std::vector<double> b)
|
|
1211
1243
|
{
|
|
1212
|
-
return
|
|
1213
|
-
b
|
|
1244
|
+
return a.relational_const(VIPS_OPERATION_RELATIONAL_MORE,
|
|
1245
|
+
b);
|
|
1214
1246
|
}
|
|
1215
1247
|
|
|
1216
1248
|
VImage
|
|
1217
|
-
operator>=(
|
|
1249
|
+
operator>=(const VImage a, const VImage b)
|
|
1218
1250
|
{
|
|
1219
|
-
return
|
|
1251
|
+
return a.relational(b, VIPS_OPERATION_RELATIONAL_MOREEQ);
|
|
1220
1252
|
}
|
|
1221
1253
|
|
|
1222
1254
|
VImage
|
|
1223
|
-
operator>=(
|
|
1255
|
+
operator>=(const double a, const VImage b)
|
|
1224
1256
|
{
|
|
1225
|
-
return
|
|
1226
|
-
to_vector(
|
|
1257
|
+
return b.relational_const(VIPS_OPERATION_RELATIONAL_LESSEQ,
|
|
1258
|
+
to_vector(a));
|
|
1227
1259
|
}
|
|
1228
1260
|
|
|
1229
1261
|
VImage
|
|
1230
|
-
operator>=(
|
|
1262
|
+
operator>=(const VImage a, const double b)
|
|
1231
1263
|
{
|
|
1232
|
-
return
|
|
1233
|
-
to_vector(
|
|
1264
|
+
return a.relational_const(VIPS_OPERATION_RELATIONAL_MOREEQ,
|
|
1265
|
+
to_vector(b));
|
|
1234
1266
|
}
|
|
1235
1267
|
|
|
1236
1268
|
VImage
|
|
1237
|
-
operator>=(
|
|
1269
|
+
operator>=(const std::vector<double> a, const VImage b)
|
|
1238
1270
|
{
|
|
1239
|
-
return
|
|
1240
|
-
a
|
|
1271
|
+
return b.relational_const(VIPS_OPERATION_RELATIONAL_LESSEQ,
|
|
1272
|
+
a);
|
|
1241
1273
|
}
|
|
1242
1274
|
|
|
1243
1275
|
VImage
|
|
1244
|
-
operator>=(
|
|
1276
|
+
operator>=(const VImage a, const std::vector<double> b)
|
|
1245
1277
|
{
|
|
1246
|
-
return
|
|
1247
|
-
b
|
|
1278
|
+
return a.relational_const(VIPS_OPERATION_RELATIONAL_MOREEQ,
|
|
1279
|
+
b);
|
|
1248
1280
|
}
|
|
1249
1281
|
|
|
1250
1282
|
VImage
|
|
1251
|
-
operator==(
|
|
1283
|
+
operator==(const VImage a, const VImage b)
|
|
1252
1284
|
{
|
|
1253
|
-
return
|
|
1285
|
+
return a.relational(b, VIPS_OPERATION_RELATIONAL_EQUAL);
|
|
1254
1286
|
}
|
|
1255
1287
|
|
|
1256
1288
|
VImage
|
|
1257
|
-
operator==(
|
|
1289
|
+
operator==(const double a, const VImage b)
|
|
1258
1290
|
{
|
|
1259
|
-
return
|
|
1260
|
-
to_vector(
|
|
1291
|
+
return b.relational_const(VIPS_OPERATION_RELATIONAL_EQUAL,
|
|
1292
|
+
to_vector(a));
|
|
1261
1293
|
}
|
|
1262
1294
|
|
|
1263
1295
|
VImage
|
|
1264
|
-
operator==(
|
|
1296
|
+
operator==(const VImage a, const double b)
|
|
1265
1297
|
{
|
|
1266
|
-
return
|
|
1267
|
-
to_vector(
|
|
1298
|
+
return a.relational_const(VIPS_OPERATION_RELATIONAL_EQUAL,
|
|
1299
|
+
to_vector(b));
|
|
1268
1300
|
}
|
|
1269
1301
|
|
|
1270
1302
|
VImage
|
|
1271
|
-
operator==(
|
|
1303
|
+
operator==(const std::vector<double> a, const VImage b)
|
|
1272
1304
|
{
|
|
1273
|
-
return
|
|
1274
|
-
a
|
|
1305
|
+
return b.relational_const(VIPS_OPERATION_RELATIONAL_EQUAL,
|
|
1306
|
+
a);
|
|
1275
1307
|
}
|
|
1276
1308
|
|
|
1277
1309
|
VImage
|
|
1278
|
-
operator==(
|
|
1310
|
+
operator==(const VImage a, const std::vector<double> b)
|
|
1279
1311
|
{
|
|
1280
|
-
return
|
|
1281
|
-
b
|
|
1312
|
+
return a.relational_const(VIPS_OPERATION_RELATIONAL_EQUAL,
|
|
1313
|
+
b);
|
|
1282
1314
|
}
|
|
1283
1315
|
|
|
1284
1316
|
VImage
|
|
1285
|
-
operator!=(
|
|
1317
|
+
operator!=(const VImage a, const VImage b)
|
|
1286
1318
|
{
|
|
1287
|
-
return
|
|
1319
|
+
return a.relational(b, VIPS_OPERATION_RELATIONAL_NOTEQ);
|
|
1288
1320
|
}
|
|
1289
1321
|
|
|
1290
1322
|
VImage
|
|
1291
|
-
operator!=(
|
|
1323
|
+
operator!=(const double a, const VImage b)
|
|
1292
1324
|
{
|
|
1293
|
-
return
|
|
1294
|
-
to_vector(
|
|
1325
|
+
return b.relational_const(VIPS_OPERATION_RELATIONAL_NOTEQ,
|
|
1326
|
+
to_vector(a));
|
|
1295
1327
|
}
|
|
1296
1328
|
|
|
1297
1329
|
VImage
|
|
1298
|
-
operator!=(
|
|
1330
|
+
operator!=(const VImage a, const double b)
|
|
1299
1331
|
{
|
|
1300
|
-
return
|
|
1301
|
-
to_vector(
|
|
1332
|
+
return a.relational_const(VIPS_OPERATION_RELATIONAL_NOTEQ,
|
|
1333
|
+
to_vector(b));
|
|
1302
1334
|
}
|
|
1303
1335
|
|
|
1304
1336
|
VImage
|
|
1305
|
-
operator!=(
|
|
1337
|
+
operator!=(const std::vector<double> a, const VImage b)
|
|
1306
1338
|
{
|
|
1307
|
-
return
|
|
1308
|
-
a
|
|
1339
|
+
return b.relational_const(VIPS_OPERATION_RELATIONAL_NOTEQ,
|
|
1340
|
+
a);
|
|
1309
1341
|
}
|
|
1310
1342
|
|
|
1311
1343
|
VImage
|
|
1312
|
-
operator!=(
|
|
1344
|
+
operator!=(const VImage a, const std::vector<double> b)
|
|
1313
1345
|
{
|
|
1314
|
-
return
|
|
1315
|
-
b
|
|
1346
|
+
return a.relational_const(VIPS_OPERATION_RELATIONAL_NOTEQ,
|
|
1347
|
+
b);
|
|
1316
1348
|
}
|
|
1317
1349
|
|
|
1318
1350
|
VImage
|
|
1319
|
-
operator&(
|
|
1351
|
+
operator&(const VImage a, const VImage b)
|
|
1320
1352
|
{
|
|
1321
|
-
return
|
|
1353
|
+
return a.boolean(b, VIPS_OPERATION_BOOLEAN_AND);
|
|
1322
1354
|
}
|
|
1323
1355
|
|
|
1324
1356
|
VImage
|
|
1325
|
-
operator&(
|
|
1357
|
+
operator&(const double a, const VImage b)
|
|
1326
1358
|
{
|
|
1327
|
-
return
|
|
1328
|
-
to_vector(
|
|
1359
|
+
return b.boolean_const(VIPS_OPERATION_BOOLEAN_AND,
|
|
1360
|
+
to_vector(a));
|
|
1329
1361
|
}
|
|
1330
1362
|
|
|
1331
1363
|
VImage
|
|
1332
|
-
operator&(
|
|
1364
|
+
operator&(const VImage a, const double b)
|
|
1333
1365
|
{
|
|
1334
|
-
return
|
|
1335
|
-
to_vector(
|
|
1366
|
+
return a.boolean_const(VIPS_OPERATION_BOOLEAN_AND,
|
|
1367
|
+
to_vector(b));
|
|
1336
1368
|
}
|
|
1337
1369
|
|
|
1338
1370
|
VImage
|
|
1339
|
-
operator&(
|
|
1371
|
+
operator&(const std::vector<double> a, const VImage b)
|
|
1340
1372
|
{
|
|
1341
|
-
return
|
|
1373
|
+
return b.boolean_const(VIPS_OPERATION_BOOLEAN_AND, a);
|
|
1342
1374
|
}
|
|
1343
1375
|
|
|
1344
1376
|
VImage
|
|
1345
|
-
operator&(
|
|
1377
|
+
operator&(const VImage a, const std::vector<double> b)
|
|
1346
1378
|
{
|
|
1347
|
-
return
|
|
1379
|
+
return a.boolean_const(VIPS_OPERATION_BOOLEAN_AND, b);
|
|
1348
1380
|
}
|
|
1349
1381
|
|
|
1350
1382
|
VImage &
|
|
1351
|
-
operator&=(
|
|
1383
|
+
operator&=(VImage &a, const VImage b)
|
|
1352
1384
|
{
|
|
1353
|
-
|
|
1385
|
+
a = a & b;
|
|
1386
|
+
return a;
|
|
1354
1387
|
}
|
|
1355
1388
|
|
|
1356
1389
|
VImage &
|
|
1357
|
-
operator&=(
|
|
1390
|
+
operator&=(VImage &a, const double b)
|
|
1358
1391
|
{
|
|
1359
|
-
|
|
1392
|
+
a = a & b;
|
|
1393
|
+
return a;
|
|
1360
1394
|
}
|
|
1361
1395
|
|
|
1362
1396
|
VImage &
|
|
1363
|
-
operator&=(
|
|
1397
|
+
operator&=(VImage &a, const std::vector<double> b)
|
|
1364
1398
|
{
|
|
1365
|
-
|
|
1399
|
+
a = a & b;
|
|
1400
|
+
return a;
|
|
1366
1401
|
}
|
|
1367
1402
|
|
|
1368
1403
|
VImage
|
|
1369
|
-
operator|(
|
|
1404
|
+
operator|(const VImage a, const VImage b)
|
|
1370
1405
|
{
|
|
1371
|
-
return
|
|
1406
|
+
return a.boolean(b, VIPS_OPERATION_BOOLEAN_OR);
|
|
1372
1407
|
}
|
|
1373
1408
|
|
|
1374
1409
|
VImage
|
|
1375
|
-
operator|(
|
|
1410
|
+
operator|(const double a, const VImage b)
|
|
1376
1411
|
{
|
|
1377
|
-
return
|
|
1378
|
-
to_vector(
|
|
1412
|
+
return b.boolean_const(VIPS_OPERATION_BOOLEAN_OR,
|
|
1413
|
+
to_vector(a));
|
|
1379
1414
|
}
|
|
1380
1415
|
|
|
1381
1416
|
VImage
|
|
1382
|
-
operator|(
|
|
1417
|
+
operator|(const VImage a, const double b)
|
|
1383
1418
|
{
|
|
1384
|
-
return
|
|
1385
|
-
to_vector(
|
|
1419
|
+
return a.boolean_const(VIPS_OPERATION_BOOLEAN_OR,
|
|
1420
|
+
to_vector(b));
|
|
1386
1421
|
}
|
|
1387
1422
|
|
|
1388
1423
|
VImage
|
|
1389
|
-
operator|(
|
|
1424
|
+
operator|(const std::vector<double> a, const VImage b)
|
|
1390
1425
|
{
|
|
1391
|
-
return
|
|
1392
|
-
a
|
|
1426
|
+
return b.boolean_const(VIPS_OPERATION_BOOLEAN_OR,
|
|
1427
|
+
a);
|
|
1393
1428
|
}
|
|
1394
1429
|
|
|
1395
1430
|
VImage
|
|
1396
|
-
operator|(
|
|
1431
|
+
operator|(const VImage a, const std::vector<double> b)
|
|
1397
1432
|
{
|
|
1398
|
-
return
|
|
1399
|
-
b
|
|
1433
|
+
return a.boolean_const(VIPS_OPERATION_BOOLEAN_OR,
|
|
1434
|
+
b);
|
|
1400
1435
|
}
|
|
1401
1436
|
|
|
1402
1437
|
VImage &
|
|
1403
|
-
operator|=(
|
|
1438
|
+
operator|=(VImage &a, const VImage b)
|
|
1404
1439
|
{
|
|
1405
|
-
|
|
1440
|
+
a = a | b;
|
|
1441
|
+
return a;
|
|
1406
1442
|
}
|
|
1407
1443
|
|
|
1408
1444
|
VImage &
|
|
1409
|
-
operator|=(
|
|
1445
|
+
operator|=(VImage &a, const double b)
|
|
1410
1446
|
{
|
|
1411
|
-
|
|
1447
|
+
a = a | b;
|
|
1448
|
+
return a;
|
|
1412
1449
|
}
|
|
1413
1450
|
|
|
1414
1451
|
VImage &
|
|
1415
|
-
operator|=(
|
|
1452
|
+
operator|=(VImage &a, const std::vector<double> b)
|
|
1416
1453
|
{
|
|
1417
|
-
|
|
1454
|
+
a = a | b;
|
|
1455
|
+
return a;
|
|
1418
1456
|
}
|
|
1419
1457
|
|
|
1420
1458
|
VImage
|
|
1421
|
-
operator^(
|
|
1459
|
+
operator^(const VImage a, const VImage b)
|
|
1422
1460
|
{
|
|
1423
|
-
return
|
|
1461
|
+
return a.boolean(b, VIPS_OPERATION_BOOLEAN_EOR);
|
|
1424
1462
|
}
|
|
1425
1463
|
|
|
1426
1464
|
VImage
|
|
1427
|
-
operator^(
|
|
1465
|
+
operator^(const double a, const VImage b)
|
|
1428
1466
|
{
|
|
1429
|
-
return
|
|
1430
|
-
to_vector(
|
|
1467
|
+
return b.boolean_const(VIPS_OPERATION_BOOLEAN_EOR,
|
|
1468
|
+
to_vector(a));
|
|
1431
1469
|
}
|
|
1432
1470
|
|
|
1433
1471
|
VImage
|
|
1434
|
-
operator^(
|
|
1472
|
+
operator^(const VImage a, const double b)
|
|
1435
1473
|
{
|
|
1436
|
-
return
|
|
1437
|
-
to_vector(
|
|
1474
|
+
return a.boolean_const(VIPS_OPERATION_BOOLEAN_EOR,
|
|
1475
|
+
to_vector(b));
|
|
1438
1476
|
}
|
|
1439
1477
|
|
|
1440
1478
|
VImage
|
|
1441
|
-
operator^(
|
|
1479
|
+
operator^(const std::vector<double> a, const VImage b)
|
|
1442
1480
|
{
|
|
1443
|
-
return
|
|
1444
|
-
a
|
|
1481
|
+
return b.boolean_const(VIPS_OPERATION_BOOLEAN_EOR,
|
|
1482
|
+
a);
|
|
1445
1483
|
}
|
|
1446
1484
|
|
|
1447
1485
|
VImage
|
|
1448
|
-
operator^(
|
|
1486
|
+
operator^(const VImage a, const std::vector<double> b)
|
|
1449
1487
|
{
|
|
1450
|
-
return
|
|
1451
|
-
b
|
|
1488
|
+
return a.boolean_const(VIPS_OPERATION_BOOLEAN_EOR,
|
|
1489
|
+
b);
|
|
1452
1490
|
}
|
|
1453
1491
|
|
|
1454
1492
|
VImage &
|
|
1455
|
-
operator^=(
|
|
1493
|
+
operator^=(VImage &a, const VImage b)
|
|
1456
1494
|
{
|
|
1457
|
-
|
|
1495
|
+
a = a ^ b;
|
|
1496
|
+
return a;
|
|
1458
1497
|
}
|
|
1459
1498
|
|
|
1460
1499
|
VImage &
|
|
1461
|
-
operator^=(
|
|
1500
|
+
operator^=(VImage &a, const double b)
|
|
1462
1501
|
{
|
|
1463
|
-
|
|
1502
|
+
a = a ^ b;
|
|
1503
|
+
return a;
|
|
1464
1504
|
}
|
|
1465
1505
|
|
|
1466
1506
|
VImage &
|
|
1467
|
-
operator^=(
|
|
1507
|
+
operator^=(VImage &a, const std::vector<double> b)
|
|
1468
1508
|
{
|
|
1469
|
-
|
|
1509
|
+
a = a ^ b;
|
|
1510
|
+
return a;
|
|
1470
1511
|
}
|
|
1471
1512
|
|
|
1472
1513
|
VImage
|
|
1473
|
-
operator<<(
|
|
1514
|
+
operator<<(const VImage a, const VImage b)
|
|
1474
1515
|
{
|
|
1475
|
-
return
|
|
1516
|
+
return a.boolean(b, VIPS_OPERATION_BOOLEAN_LSHIFT);
|
|
1476
1517
|
}
|
|
1477
1518
|
|
|
1478
1519
|
VImage
|
|
1479
|
-
operator<<(
|
|
1520
|
+
operator<<(const VImage a, const double b)
|
|
1480
1521
|
{
|
|
1481
|
-
return
|
|
1482
|
-
to_vector(
|
|
1522
|
+
return a.boolean_const(VIPS_OPERATION_BOOLEAN_LSHIFT,
|
|
1523
|
+
to_vector(b));
|
|
1483
1524
|
}
|
|
1484
1525
|
|
|
1485
1526
|
VImage
|
|
1486
|
-
operator<<(
|
|
1527
|
+
operator<<(const VImage a, const std::vector<double> b)
|
|
1487
1528
|
{
|
|
1488
|
-
return
|
|
1489
|
-
b
|
|
1529
|
+
return a.boolean_const(VIPS_OPERATION_BOOLEAN_LSHIFT,
|
|
1530
|
+
b);
|
|
1490
1531
|
}
|
|
1491
1532
|
|
|
1492
1533
|
VImage &
|
|
1493
|
-
operator<<=(
|
|
1534
|
+
operator<<=(VImage &a, const VImage b)
|
|
1494
1535
|
{
|
|
1495
|
-
|
|
1536
|
+
a = a << b;
|
|
1537
|
+
return a;
|
|
1496
1538
|
}
|
|
1497
1539
|
|
|
1498
1540
|
VImage &
|
|
1499
|
-
operator<<=(
|
|
1541
|
+
operator<<=(VImage &a, const double b)
|
|
1500
1542
|
{
|
|
1501
|
-
|
|
1543
|
+
a = a << b;
|
|
1544
|
+
return a;
|
|
1502
1545
|
}
|
|
1503
1546
|
|
|
1504
1547
|
VImage &
|
|
1505
|
-
operator<<=(
|
|
1548
|
+
operator<<=(VImage &a, const std::vector<double> b)
|
|
1506
1549
|
{
|
|
1507
|
-
|
|
1550
|
+
a = a << b;
|
|
1551
|
+
return a;
|
|
1508
1552
|
}
|
|
1509
1553
|
|
|
1510
1554
|
VImage
|
|
1511
|
-
operator>>(
|
|
1555
|
+
operator>>(const VImage a, const VImage b)
|
|
1512
1556
|
{
|
|
1513
|
-
return
|
|
1557
|
+
return a.boolean(b, VIPS_OPERATION_BOOLEAN_RSHIFT);
|
|
1514
1558
|
}
|
|
1515
1559
|
|
|
1516
1560
|
VImage
|
|
1517
|
-
operator>>(
|
|
1561
|
+
operator>>(const VImage a, const double b)
|
|
1518
1562
|
{
|
|
1519
|
-
return
|
|
1520
|
-
to_vector(
|
|
1563
|
+
return a.boolean_const(VIPS_OPERATION_BOOLEAN_RSHIFT,
|
|
1564
|
+
to_vector(b));
|
|
1521
1565
|
}
|
|
1522
1566
|
|
|
1523
1567
|
VImage
|
|
1524
|
-
operator>>(
|
|
1568
|
+
operator>>(const VImage a, const std::vector<double> b)
|
|
1525
1569
|
{
|
|
1526
|
-
return
|
|
1527
|
-
b
|
|
1570
|
+
return a.boolean_const(VIPS_OPERATION_BOOLEAN_RSHIFT,
|
|
1571
|
+
b);
|
|
1528
1572
|
}
|
|
1529
1573
|
|
|
1530
1574
|
VImage &
|
|
1531
|
-
operator>>=(
|
|
1575
|
+
operator>>=(VImage &a, const VImage b)
|
|
1532
1576
|
{
|
|
1533
|
-
|
|
1577
|
+
a = a << b;
|
|
1578
|
+
return a;
|
|
1534
1579
|
}
|
|
1535
1580
|
|
|
1536
1581
|
VImage &
|
|
1537
|
-
operator>>=(
|
|
1582
|
+
operator>>=(VImage &a, const double b)
|
|
1538
1583
|
{
|
|
1539
|
-
|
|
1584
|
+
a = a << b;
|
|
1585
|
+
return a;
|
|
1540
1586
|
}
|
|
1541
1587
|
|
|
1542
1588
|
VImage &
|
|
1543
|
-
operator>>=(
|
|
1589
|
+
operator>>=(VImage &a, const std::vector<double> b)
|
|
1544
1590
|
{
|
|
1545
|
-
|
|
1591
|
+
a = a << b;
|
|
1592
|
+
return a;
|
|
1546
1593
|
}
|
|
1547
1594
|
|
|
1548
1595
|
VIPS_NAMESPACE_END
|