@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/include/vips/operation.h
CHANGED
|
@@ -3,28 +3,28 @@
|
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Copyright (C) 1991-2005 The National Gallery
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
This library is free software; you can redistribute it and/or
|
|
9
|
+
modify it under the terms of the GNU Lesser General Public
|
|
10
|
+
License as published by the Free Software Foundation; either
|
|
11
|
+
version 2.1 of the License, or (at your option) any later version.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
This library is distributed in the hope that it will be useful,
|
|
14
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
16
|
+
Lesser General Public License for more details.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
You should have received a copy of the GNU Lesser General Public
|
|
19
|
+
License along with this library; if not, write to the Free Software
|
|
20
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
21
|
+
02110-1301 USA
|
|
22
22
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
/*
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
|
28
28
|
|
|
29
29
|
*/
|
|
30
30
|
|
|
@@ -48,25 +48,26 @@ typedef enum /*< flags >*/ {
|
|
|
48
48
|
VIPS_OPERATION_NOCACHE = 4,
|
|
49
49
|
VIPS_OPERATION_DEPRECATED = 8,
|
|
50
50
|
VIPS_OPERATION_UNTRUSTED = 16,
|
|
51
|
-
VIPS_OPERATION_BLOCKED = 32
|
|
51
|
+
VIPS_OPERATION_BLOCKED = 32,
|
|
52
|
+
VIPS_OPERATION_REVALIDATE = 64
|
|
52
53
|
} VipsOperationFlags;
|
|
53
54
|
|
|
54
55
|
#define VIPS_TYPE_OPERATION (vips_operation_get_type())
|
|
55
|
-
#define VIPS_OPERATION(
|
|
56
|
-
(G_TYPE_CHECK_INSTANCE_CAST(
|
|
57
|
-
VIPS_TYPE_OPERATION, VipsOperation
|
|
58
|
-
#define VIPS_OPERATION_CLASS(
|
|
59
|
-
(G_TYPE_CHECK_CLASS_CAST(
|
|
60
|
-
VIPS_TYPE_OPERATION, VipsOperationClass
|
|
61
|
-
#define VIPS_IS_OPERATION(
|
|
62
|
-
(G_TYPE_CHECK_INSTANCE_TYPE(
|
|
63
|
-
#define VIPS_IS_OPERATION_CLASS(
|
|
64
|
-
(G_TYPE_CHECK_CLASS_TYPE(
|
|
65
|
-
#define VIPS_OPERATION_GET_CLASS(
|
|
66
|
-
(G_TYPE_INSTANCE_GET_CLASS(
|
|
67
|
-
VIPS_TYPE_OPERATION, VipsOperationClass
|
|
68
|
-
|
|
69
|
-
typedef gboolean (*VipsOperationBuildFn)(
|
|
56
|
+
#define VIPS_OPERATION(obj) \
|
|
57
|
+
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
|
58
|
+
VIPS_TYPE_OPERATION, VipsOperation))
|
|
59
|
+
#define VIPS_OPERATION_CLASS(klass) \
|
|
60
|
+
(G_TYPE_CHECK_CLASS_CAST((klass), \
|
|
61
|
+
VIPS_TYPE_OPERATION, VipsOperationClass))
|
|
62
|
+
#define VIPS_IS_OPERATION(obj) \
|
|
63
|
+
(G_TYPE_CHECK_INSTANCE_TYPE((obj), VIPS_TYPE_OPERATION))
|
|
64
|
+
#define VIPS_IS_OPERATION_CLASS(klass) \
|
|
65
|
+
(G_TYPE_CHECK_CLASS_TYPE((klass), VIPS_TYPE_OPERATION))
|
|
66
|
+
#define VIPS_OPERATION_GET_CLASS(obj) \
|
|
67
|
+
(G_TYPE_INSTANCE_GET_CLASS((obj), \
|
|
68
|
+
VIPS_TYPE_OPERATION, VipsOperationClass))
|
|
69
|
+
|
|
70
|
+
typedef gboolean (*VipsOperationBuildFn)(VipsObject *object);
|
|
70
71
|
|
|
71
72
|
typedef struct _VipsOperation {
|
|
72
73
|
VipsObject parent_instance;
|
|
@@ -87,17 +88,17 @@ typedef struct _VipsOperationClass {
|
|
|
87
88
|
|
|
88
89
|
/* Print the usage message.
|
|
89
90
|
*/
|
|
90
|
-
void (*usage)(
|
|
91
|
+
void (*usage)(struct _VipsOperationClass *cls, VipsBuf *buf);
|
|
91
92
|
|
|
92
|
-
/* Return a set of operation flags.
|
|
93
|
+
/* Return a set of operation flags.
|
|
93
94
|
*/
|
|
94
|
-
VipsOperationFlags (*get_flags)(
|
|
95
|
+
VipsOperationFlags (*get_flags)(VipsOperation *operation);
|
|
95
96
|
VipsOperationFlags flags;
|
|
96
97
|
|
|
97
98
|
/* One of our input images has signalled "invalidate". The cache uses
|
|
98
99
|
* VipsOperation::invalidate to drop dirty ops.
|
|
99
100
|
*/
|
|
100
|
-
void (*invalidate)(
|
|
101
|
+
void (*invalidate)(VipsOperation *operation);
|
|
101
102
|
} VipsOperationClass;
|
|
102
103
|
|
|
103
104
|
/* Don't put spaces around void here, it breaks gtk-doc.
|
|
@@ -106,74 +107,74 @@ VIPS_API
|
|
|
106
107
|
GType vips_operation_get_type(void);
|
|
107
108
|
|
|
108
109
|
VIPS_API
|
|
109
|
-
VipsOperationFlags vips_operation_get_flags(
|
|
110
|
+
VipsOperationFlags vips_operation_get_flags(VipsOperation *operation);
|
|
110
111
|
VIPS_API
|
|
111
|
-
void vips_operation_class_print_usage(
|
|
112
|
+
void vips_operation_class_print_usage(VipsOperationClass *operation_class);
|
|
112
113
|
VIPS_API
|
|
113
|
-
void vips_operation_invalidate(
|
|
114
|
+
void vips_operation_invalidate(VipsOperation *operation);
|
|
114
115
|
|
|
115
116
|
VIPS_API
|
|
116
|
-
int vips_operation_call_valist(
|
|
117
|
+
int vips_operation_call_valist(VipsOperation *operation, va_list ap);
|
|
117
118
|
VIPS_API
|
|
118
|
-
VipsOperation *vips_operation_new(
|
|
119
|
+
VipsOperation *vips_operation_new(const char *name);
|
|
119
120
|
VIPS_API
|
|
120
|
-
int vips_call_required_optional(
|
|
121
|
-
va_list required, va_list optional
|
|
121
|
+
int vips_call_required_optional(VipsOperation **operation,
|
|
122
|
+
va_list required, va_list optional);
|
|
122
123
|
VIPS_API
|
|
123
|
-
int vips_call(
|
|
124
|
+
int vips_call(const char *operation_name, ...)
|
|
124
125
|
G_GNUC_NULL_TERMINATED;
|
|
125
126
|
VIPS_API
|
|
126
|
-
int vips_call_split(
|
|
127
|
+
int vips_call_split(const char *operation_name, va_list optional, ...);
|
|
127
128
|
VIPS_API
|
|
128
|
-
int vips_call_split_option_string(
|
|
129
|
-
const char *option_string, va_list optional, ...
|
|
129
|
+
int vips_call_split_option_string(const char *operation_name,
|
|
130
|
+
const char *option_string, va_list optional, ...);
|
|
130
131
|
|
|
131
132
|
VIPS_API
|
|
132
|
-
void vips_call_options(
|
|
133
|
+
void vips_call_options(GOptionGroup *group, VipsOperation *operation);
|
|
133
134
|
VIPS_API
|
|
134
|
-
int vips_call_argv(
|
|
135
|
+
int vips_call_argv(VipsOperation *operation, int argc, char **argv);
|
|
135
136
|
|
|
136
137
|
VIPS_API
|
|
137
|
-
void vips_cache_drop_all(
|
|
138
|
+
void vips_cache_drop_all(void);
|
|
139
|
+
VIPS_DEPRECATED_FOR(vips_cache_operation_buildp)
|
|
140
|
+
VipsOperation *vips_cache_operation_lookup(VipsOperation *operation);
|
|
141
|
+
VIPS_DEPRECATED_FOR(vips_cache_operation_buildp)
|
|
142
|
+
void vips_cache_operation_add(VipsOperation *operation);
|
|
138
143
|
VIPS_API
|
|
139
|
-
|
|
144
|
+
int vips_cache_operation_buildp(VipsOperation **operation);
|
|
140
145
|
VIPS_API
|
|
141
|
-
|
|
146
|
+
VipsOperation *vips_cache_operation_build(VipsOperation *operation);
|
|
142
147
|
VIPS_API
|
|
143
|
-
|
|
148
|
+
void vips_cache_print(void);
|
|
144
149
|
VIPS_API
|
|
145
|
-
|
|
150
|
+
void vips_cache_set_max(int max);
|
|
146
151
|
VIPS_API
|
|
147
|
-
void
|
|
152
|
+
void vips_cache_set_max_mem(size_t max_mem);
|
|
148
153
|
VIPS_API
|
|
149
|
-
|
|
154
|
+
int vips_cache_get_max(void);
|
|
150
155
|
VIPS_API
|
|
151
|
-
|
|
156
|
+
int vips_cache_get_size(void);
|
|
152
157
|
VIPS_API
|
|
153
|
-
|
|
158
|
+
size_t vips_cache_get_max_mem(void);
|
|
154
159
|
VIPS_API
|
|
155
|
-
int
|
|
160
|
+
int vips_cache_get_max_files(void);
|
|
156
161
|
VIPS_API
|
|
157
|
-
|
|
162
|
+
void vips_cache_set_max_files(int max_files);
|
|
158
163
|
VIPS_API
|
|
159
|
-
|
|
164
|
+
void vips_cache_set_dump(gboolean dump);
|
|
160
165
|
VIPS_API
|
|
161
|
-
void
|
|
162
|
-
VIPS_API
|
|
163
|
-
void vips_cache_set_dump( gboolean dump );
|
|
164
|
-
VIPS_API
|
|
165
|
-
void vips_cache_set_trace( gboolean trace );
|
|
166
|
+
void vips_cache_set_trace(gboolean trace);
|
|
166
167
|
|
|
167
168
|
/* Part of threadpool, really, but we want these in a header that gets scanned
|
|
168
169
|
* for our typelib.
|
|
169
170
|
*/
|
|
170
171
|
VIPS_API
|
|
171
|
-
void vips_concurrency_set(
|
|
172
|
+
void vips_concurrency_set(int concurrency);
|
|
172
173
|
VIPS_API
|
|
173
|
-
int vips_concurrency_get(
|
|
174
|
+
int vips_concurrency_get(void);
|
|
174
175
|
|
|
175
176
|
VIPS_API
|
|
176
|
-
void vips_operation_block_set(
|
|
177
|
+
void vips_operation_block_set(const char *name, gboolean state);
|
|
177
178
|
|
|
178
179
|
#ifdef __cplusplus
|
|
179
180
|
}
|
package/include/vips/private.h
CHANGED
|
@@ -8,28 +8,28 @@
|
|
|
8
8
|
|
|
9
9
|
/*
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
VIPS is free software; you can redistribute it and/or modify
|
|
14
|
-
it under the terms of the GNU Lesser General Public License as published by
|
|
15
|
-
the Free Software Foundation; either version 2 of the License, or
|
|
16
|
-
(at your option) any later version.
|
|
11
|
+
This file is part of VIPS.
|
|
17
12
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
VIPS is free software; you can redistribute it and/or modify
|
|
14
|
+
it under the terms of the GNU Lesser General Public License as published by
|
|
15
|
+
the Free Software Foundation; either version 2 of the License, or
|
|
16
|
+
(at your option) any later version.
|
|
22
17
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
This program is distributed in the hope that it will be useful,
|
|
19
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
20
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
21
|
+
GNU Lesser General Public License for more details.
|
|
22
|
+
|
|
23
|
+
You should have received a copy of the GNU Lesser General Public License
|
|
24
|
+
along with this program; if not, write to the Free Software
|
|
25
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
26
|
+
02110-1301 USA
|
|
27
27
|
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
30
|
/*
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
|
33
33
|
|
|
34
34
|
*/
|
|
35
35
|
|
|
@@ -42,12 +42,12 @@ extern "C" {
|
|
|
42
42
|
|
|
43
43
|
#define VIPS_SPARE (8)
|
|
44
44
|
|
|
45
|
-
/* Private to iofuncs: the minimum number of scanlines we add above and below
|
|
45
|
+
/* Private to iofuncs: the minimum number of scanlines we add above and below
|
|
46
46
|
* the window as a margin for slop.
|
|
47
47
|
*/
|
|
48
48
|
#define VIPS__WINDOW_MARGIN_PIXELS (128)
|
|
49
49
|
|
|
50
|
-
/* Private to iofuncs: add at least this many bytes above and below the window.
|
|
50
|
+
/* Private to iofuncs: add at least this many bytes above and below the window.
|
|
51
51
|
* There's no point mapping just a few KB of a small image.
|
|
52
52
|
*/
|
|
53
53
|
#define VIPS__WINDOW_MARGIN_BYTES (1024 * 1024 * 10)
|
|
@@ -60,31 +60,31 @@ extern "C" {
|
|
|
60
60
|
* VipsImage.
|
|
61
61
|
*/
|
|
62
62
|
typedef struct {
|
|
63
|
-
int ref_count;
|
|
64
|
-
struct _VipsImage *im;
|
|
63
|
+
int ref_count; /* # of regions referencing us */
|
|
64
|
+
struct _VipsImage *im; /* VipsImage we are attached to */
|
|
65
65
|
|
|
66
|
-
int top;
|
|
66
|
+
int top; /* Area of image we have mapped, in pixels */
|
|
67
67
|
int height;
|
|
68
|
-
VipsPel *data;
|
|
68
|
+
VipsPel *data; /* First pixel of line 'top' */
|
|
69
69
|
|
|
70
|
-
void *baseaddr;
|
|
71
|
-
size_t length;
|
|
70
|
+
void *baseaddr; /* Base of window */
|
|
71
|
+
size_t length; /* Size of window */
|
|
72
72
|
} VipsWindow;
|
|
73
73
|
|
|
74
74
|
VIPS_API
|
|
75
|
-
int vips_window_unref(
|
|
75
|
+
int vips_window_unref(VipsWindow *window);
|
|
76
76
|
VIPS_API
|
|
77
|
-
void vips_window_print(
|
|
77
|
+
void vips_window_print(VipsWindow *window);
|
|
78
78
|
|
|
79
79
|
/* Per-thread buffer state. Held in a GPrivate.
|
|
80
80
|
*/
|
|
81
81
|
typedef struct {
|
|
82
|
-
GHashTable *hash;
|
|
83
|
-
GThread *thread;
|
|
82
|
+
GHashTable *hash; /* VipsImage -> VipsBufferCache* */
|
|
83
|
+
GThread *thread; /* Just for sanity checking */
|
|
84
84
|
} VipsBufferThread;
|
|
85
85
|
|
|
86
86
|
/* Per-image buffer cache. This keeps a list of "done" VipsBuffer that this
|
|
87
|
-
* worker has generated. We use this to reuse results within a thread.
|
|
87
|
+
* worker has generated. We use this to reuse results within a thread.
|
|
88
88
|
*
|
|
89
89
|
* Hash to this from VipsBufferThread::hash.
|
|
90
90
|
* We can't store the GSList directly in the hash table as GHashTable lacks an
|
|
@@ -92,49 +92,49 @@ typedef struct {
|
|
|
92
92
|
* operation.
|
|
93
93
|
*/
|
|
94
94
|
typedef struct _VipsBufferCache {
|
|
95
|
-
GSList *buffers;
|
|
96
|
-
GThread *thread;
|
|
95
|
+
GSList *buffers; /* GSList of "done" VipsBuffer* */
|
|
96
|
+
GThread *thread; /* Just for sanity checking */
|
|
97
97
|
struct _VipsImage *im;
|
|
98
98
|
VipsBufferThread *buffer_thread;
|
|
99
|
-
GSList *reserve;
|
|
100
|
-
int n_reserve;
|
|
99
|
+
GSList *reserve; /* VipsBuffer kept in reserve */
|
|
100
|
+
int n_reserve; /* Number in reserve */
|
|
101
101
|
} VipsBufferCache;
|
|
102
102
|
|
|
103
103
|
/* What we track for each pixel buffer. These can move between caches and
|
|
104
|
-
* between threads, but not between images.
|
|
104
|
+
* between threads, but not between images.
|
|
105
105
|
*
|
|
106
|
-
* Moving between threads is difficult, use region ownership stuff.
|
|
106
|
+
* Moving between threads is difficult, use region ownership stuff.
|
|
107
107
|
*/
|
|
108
108
|
typedef struct _VipsBuffer {
|
|
109
|
-
int ref_count;
|
|
110
|
-
struct _VipsImage *im;
|
|
111
|
-
|
|
112
|
-
VipsRect area;
|
|
113
|
-
gboolean done;
|
|
114
|
-
VipsBufferCache *cache;
|
|
115
|
-
VipsPel *buf;
|
|
116
|
-
size_t bsize;
|
|
109
|
+
int ref_count; /* # of regions referencing us */
|
|
110
|
+
struct _VipsImage *im; /* VipsImage we are attached to */
|
|
111
|
+
|
|
112
|
+
VipsRect area; /* Area this pixel buffer covers */
|
|
113
|
+
gboolean done; /* Calculated and in a cache */
|
|
114
|
+
VipsBufferCache *cache; /* The cache this buffer is published on */
|
|
115
|
+
VipsPel *buf; /* Private malloc() area */
|
|
116
|
+
size_t bsize; /* Size of private malloc() */
|
|
117
117
|
} VipsBuffer;
|
|
118
118
|
|
|
119
119
|
VIPS_API
|
|
120
|
-
void vips_buffer_dump_all(
|
|
120
|
+
void vips_buffer_dump_all(void);
|
|
121
121
|
VIPS_API
|
|
122
|
-
void vips_buffer_done(
|
|
122
|
+
void vips_buffer_done(VipsBuffer *buffer);
|
|
123
123
|
VIPS_API
|
|
124
|
-
void vips_buffer_undone(
|
|
124
|
+
void vips_buffer_undone(VipsBuffer *buffer);
|
|
125
125
|
VIPS_API
|
|
126
|
-
void vips_buffer_unref(
|
|
126
|
+
void vips_buffer_unref(VipsBuffer *buffer);
|
|
127
127
|
VIPS_API
|
|
128
|
-
VipsBuffer *vips_buffer_new(
|
|
128
|
+
VipsBuffer *vips_buffer_new(struct _VipsImage *im, VipsRect *area);
|
|
129
129
|
VIPS_API
|
|
130
|
-
VipsBuffer *vips_buffer_ref(
|
|
130
|
+
VipsBuffer *vips_buffer_ref(struct _VipsImage *im, VipsRect *area);
|
|
131
131
|
VIPS_API
|
|
132
|
-
VipsBuffer *vips_buffer_unref_ref(
|
|
133
|
-
struct _VipsImage *im, VipsRect *area
|
|
132
|
+
VipsBuffer *vips_buffer_unref_ref(VipsBuffer *buffer,
|
|
133
|
+
struct _VipsImage *im, VipsRect *area);
|
|
134
134
|
VIPS_API
|
|
135
|
-
void vips_buffer_print(
|
|
135
|
+
void vips_buffer_print(VipsBuffer *buffer);
|
|
136
136
|
|
|
137
|
-
void vips__render_shutdown(
|
|
137
|
+
void vips__render_shutdown(void);
|
|
138
138
|
|
|
139
139
|
/* Sections of region.h that are private to VIPS.
|
|
140
140
|
*/
|
|
@@ -143,13 +143,13 @@ void vips__render_shutdown( void );
|
|
|
143
143
|
*/
|
|
144
144
|
typedef enum _RegionType {
|
|
145
145
|
VIPS_REGION_NONE,
|
|
146
|
-
VIPS_REGION_BUFFER,
|
|
147
|
-
VIPS_REGION_OTHER_REGION,
|
|
148
|
-
VIPS_REGION_OTHER_IMAGE,
|
|
149
|
-
VIPS_REGION_WINDOW
|
|
146
|
+
VIPS_REGION_BUFFER, /* A VipsBuffer */
|
|
147
|
+
VIPS_REGION_OTHER_REGION, /* Memory on another region */
|
|
148
|
+
VIPS_REGION_OTHER_IMAGE, /* Memory on another image */
|
|
149
|
+
VIPS_REGION_WINDOW /* A VipsWindow on fd */
|
|
150
150
|
} RegionType;
|
|
151
151
|
|
|
152
|
-
/* Private to iofuncs: the size of the `tiles' requested by
|
|
152
|
+
/* Private to iofuncs: the size of the `tiles' requested by
|
|
153
153
|
* vips_image_generate() when acting as a data sink.
|
|
154
154
|
*/
|
|
155
155
|
#define VIPS__TILE_WIDTH (128)
|
|
@@ -163,28 +163,28 @@ typedef enum _RegionType {
|
|
|
163
163
|
/* Functions on regions.
|
|
164
164
|
*/
|
|
165
165
|
struct _VipsRegion;
|
|
166
|
-
void vips__region_take_ownership(
|
|
167
|
-
void vips__region_check_ownership(
|
|
166
|
+
void vips__region_take_ownership(struct _VipsRegion *reg);
|
|
167
|
+
void vips__region_check_ownership(struct _VipsRegion *reg);
|
|
168
168
|
/* TODO(kleisauke): VIPS_API is required by vipsdisp.
|
|
169
169
|
*/
|
|
170
170
|
VIPS_API
|
|
171
|
-
void vips__region_no_ownership(
|
|
171
|
+
void vips__region_no_ownership(struct _VipsRegion *reg);
|
|
172
172
|
|
|
173
|
-
typedef int (*VipsRegionFillFn)(
|
|
173
|
+
typedef int (*VipsRegionFillFn)(struct _VipsRegion *, void *);
|
|
174
174
|
VIPS_API
|
|
175
|
-
int vips_region_fill(
|
|
176
|
-
const VipsRect *r, VipsRegionFillFn fn, void *a
|
|
175
|
+
int vips_region_fill(struct _VipsRegion *reg,
|
|
176
|
+
const VipsRect *r, VipsRegionFillFn fn, void *a);
|
|
177
177
|
|
|
178
|
-
int vips__image_wio_output(
|
|
179
|
-
int vips__image_pio_output(
|
|
178
|
+
int vips__image_wio_output(struct _VipsImage *image);
|
|
179
|
+
int vips__image_pio_output(struct _VipsImage *image);
|
|
180
180
|
|
|
181
181
|
/* VIPS_ARGUMENT_FOR_ALL() needs to have this visible.
|
|
182
182
|
*/
|
|
183
183
|
VIPS_API
|
|
184
|
-
VipsArgumentInstance *vips__argument_get_instance(
|
|
184
|
+
VipsArgumentInstance *vips__argument_get_instance(
|
|
185
185
|
VipsArgumentClass *argument_class,
|
|
186
186
|
VipsObject *object);
|
|
187
|
-
VipsArgument *vips__argument_table_lookup(
|
|
187
|
+
VipsArgument *vips__argument_table_lookup(VipsArgumentTable *table,
|
|
188
188
|
GParamSpec *pspec);
|
|
189
189
|
|
|
190
190
|
/* im_demand_hint_array() needs to have this visible.
|
|
@@ -192,33 +192,33 @@ VipsArgument *vips__argument_table_lookup( VipsArgumentTable *table,
|
|
|
192
192
|
#if VIPS_ENABLE_DEPRECATED
|
|
193
193
|
VIPS_API
|
|
194
194
|
#endif
|
|
195
|
-
void vips__demand_hint_array(
|
|
196
|
-
int hint, struct _VipsImage **in
|
|
195
|
+
void vips__demand_hint_array(struct _VipsImage *image,
|
|
196
|
+
int hint, struct _VipsImage **in);
|
|
197
197
|
/* im_cp_desc_array() needs to have this visible.
|
|
198
198
|
*/
|
|
199
199
|
#if VIPS_ENABLE_DEPRECATED
|
|
200
200
|
VIPS_API
|
|
201
201
|
#endif
|
|
202
|
-
int vips__image_copy_fields_array(
|
|
203
|
-
struct _VipsImage *in[]
|
|
202
|
+
int vips__image_copy_fields_array(struct _VipsImage *out,
|
|
203
|
+
struct _VipsImage *in[]);
|
|
204
204
|
|
|
205
|
-
void vips__region_count_pixels(
|
|
205
|
+
void vips__region_count_pixels(struct _VipsRegion *region, const char *nickname);
|
|
206
206
|
VIPS_API
|
|
207
|
-
void vips_region_dump_all(
|
|
207
|
+
void vips_region_dump_all(void);
|
|
208
208
|
|
|
209
209
|
VIPS_API
|
|
210
|
-
int vips_region_prepare_many(
|
|
210
|
+
int vips_region_prepare_many(struct _VipsRegion **reg, const VipsRect *r);
|
|
211
211
|
|
|
212
212
|
/* Handy for debugging.
|
|
213
213
|
*/
|
|
214
|
-
int vips__view_image(
|
|
214
|
+
int vips__view_image(struct _VipsImage *image);
|
|
215
215
|
|
|
216
216
|
/* Pre 8.7 libvipses used this for allocating argument ids.
|
|
217
217
|
*/
|
|
218
218
|
VIPS_API
|
|
219
219
|
int _vips__argument_id;
|
|
220
220
|
|
|
221
|
-
void vips__meta_init(
|
|
221
|
+
void vips__meta_init(void);
|
|
222
222
|
|
|
223
223
|
#ifdef __cplusplus
|
|
224
224
|
}
|
package/include/vips/rect.h
CHANGED
|
@@ -3,28 +3,28 @@
|
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
This file is part of VIPS.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
VIPS is free software; you can redistribute it and/or modify
|
|
9
|
+
it under the terms of the GNU Lesser General Public License as published by
|
|
10
|
+
the Free Software Foundation; either version 2 of the License, or
|
|
11
|
+
(at your option) any later version.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
This program is distributed in the hope that it will be useful,
|
|
14
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
GNU Lesser General Public License for more details.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
You should have received a copy of the GNU Lesser General Public License
|
|
19
|
+
along with this program; if not, write to the Free Software
|
|
20
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
21
|
+
02110-1301 USA
|
|
22
22
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
/*
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
|
28
28
|
|
|
29
29
|
*/
|
|
30
30
|
|
|
@@ -51,27 +51,27 @@ typedef struct _VipsRect {
|
|
|
51
51
|
#define VIPS_RECT_VCENTRE(R) ((R)->top + (R)->height / 2)
|
|
52
52
|
|
|
53
53
|
VIPS_API
|
|
54
|
-
gboolean vips_rect_isempty(
|
|
54
|
+
gboolean vips_rect_isempty(const VipsRect *r);
|
|
55
55
|
VIPS_API
|
|
56
|
-
gboolean vips_rect_includespoint(
|
|
56
|
+
gboolean vips_rect_includespoint(const VipsRect *r, int x, int y);
|
|
57
57
|
VIPS_API
|
|
58
|
-
gboolean vips_rect_includesrect(
|
|
58
|
+
gboolean vips_rect_includesrect(const VipsRect *r1, const VipsRect *r2);
|
|
59
59
|
VIPS_API
|
|
60
|
-
gboolean vips_rect_equalsrect(
|
|
60
|
+
gboolean vips_rect_equalsrect(const VipsRect *r1, const VipsRect *r2);
|
|
61
61
|
VIPS_API
|
|
62
|
-
gboolean vips_rect_overlapsrect(
|
|
62
|
+
gboolean vips_rect_overlapsrect(const VipsRect *r1, const VipsRect *r2);
|
|
63
63
|
VIPS_API
|
|
64
|
-
void vips_rect_marginadjust(
|
|
64
|
+
void vips_rect_marginadjust(VipsRect *r, int n);
|
|
65
65
|
VIPS_API
|
|
66
|
-
void vips_rect_intersectrect(
|
|
67
|
-
VipsRect *out
|
|
66
|
+
void vips_rect_intersectrect(const VipsRect *r1, const VipsRect *r2,
|
|
67
|
+
VipsRect *out);
|
|
68
68
|
VIPS_API
|
|
69
|
-
void vips_rect_unionrect(
|
|
70
|
-
VipsRect *out
|
|
69
|
+
void vips_rect_unionrect(const VipsRect *r1, const VipsRect *r2,
|
|
70
|
+
VipsRect *out);
|
|
71
71
|
VIPS_API
|
|
72
|
-
VipsRect *vips_rect_dup(
|
|
72
|
+
VipsRect *vips_rect_dup(const VipsRect *r);
|
|
73
73
|
VIPS_API
|
|
74
|
-
void vips_rect_normalise(
|
|
74
|
+
void vips_rect_normalise(VipsRect *r);
|
|
75
75
|
|
|
76
76
|
#ifdef __cplusplus
|
|
77
77
|
}
|