1 /* conversion.h
2  *
3  * 20/9/09
4  * 	- from proto.h
5  */
6 
7 /*
8 
9     This file is part of VIPS.
10 
11     VIPS is free software; you can redistribute it and/or modify
12     it under the terms of the GNU Lesser General Public License as published by
13     the Free Software Foundation; either version 2 of the License, or
14     (at your option) any later version.
15 
16     This program is distributed in the hope that it will be useful,
17     but WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19     GNU Lesser General Public License for more details.
20 
21     You should have received a copy of the GNU Lesser General Public License
22     along with this program; if not, write to the Free Software
23     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24     02110-1301  USA
25 
26  */
27 
28 /*
29 
30     These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
31 
32  */
33 
34 #ifndef VIPS_CONVERSION_H
35 #define VIPS_CONVERSION_H
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif /*__cplusplus*/
40 
41 typedef enum {
42 	VIPS_EXTEND_BLACK,
43 	VIPS_EXTEND_COPY,
44 	VIPS_EXTEND_REPEAT,
45 	VIPS_EXTEND_MIRROR,
46 	VIPS_EXTEND_WHITE,
47 	VIPS_EXTEND_BACKGROUND,
48 	VIPS_EXTEND_LAST
49 } VipsExtend;
50 
51 typedef enum {
52 	VIPS_COMPASS_DIRECTION_CENTRE,
53 	VIPS_COMPASS_DIRECTION_NORTH,
54 	VIPS_COMPASS_DIRECTION_EAST,
55 	VIPS_COMPASS_DIRECTION_SOUTH,
56 	VIPS_COMPASS_DIRECTION_WEST,
57 	VIPS_COMPASS_DIRECTION_NORTH_EAST,
58 	VIPS_COMPASS_DIRECTION_SOUTH_EAST,
59 	VIPS_COMPASS_DIRECTION_SOUTH_WEST,
60 	VIPS_COMPASS_DIRECTION_NORTH_WEST,
61 	VIPS_COMPASS_DIRECTION_LAST
62 } VipsCompassDirection;
63 
64 typedef enum {
65 	VIPS_DIRECTION_HORIZONTAL,
66 	VIPS_DIRECTION_VERTICAL,
67 	VIPS_DIRECTION_LAST
68 } VipsDirection;
69 
70 typedef enum {
71 	VIPS_ALIGN_LOW,
72 	VIPS_ALIGN_CENTRE,
73 	VIPS_ALIGN_HIGH,
74 	VIPS_ALIGN_LAST
75 } VipsAlign;
76 
77 typedef enum {
78 	VIPS_ANGLE_D0,
79 	VIPS_ANGLE_D90,
80 	VIPS_ANGLE_D180,
81 	VIPS_ANGLE_D270,
82 	VIPS_ANGLE_LAST
83 } VipsAngle;
84 
85 typedef enum {
86 	VIPS_ANGLE45_D0,
87 	VIPS_ANGLE45_D45,
88 	VIPS_ANGLE45_D90,
89 	VIPS_ANGLE45_D135,
90 	VIPS_ANGLE45_D180,
91 	VIPS_ANGLE45_D225,
92 	VIPS_ANGLE45_D270,
93 	VIPS_ANGLE45_D315,
94 	VIPS_ANGLE45_LAST
95 } VipsAngle45;
96 
97 typedef enum {
98 	VIPS_INTERESTING_NONE,
99 	VIPS_INTERESTING_CENTRE,
100 	VIPS_INTERESTING_ENTROPY,
101 	VIPS_INTERESTING_ATTENTION,
102 	VIPS_INTERESTING_LOW,
103 	VIPS_INTERESTING_HIGH,
104 	VIPS_INTERESTING_ALL,
105 	VIPS_INTERESTING_LAST
106 } VipsInteresting;
107 
108 typedef enum {
109 	VIPS_BLEND_MODE_CLEAR,
110 	VIPS_BLEND_MODE_SOURCE,
111 	VIPS_BLEND_MODE_OVER,
112 	VIPS_BLEND_MODE_IN,
113 	VIPS_BLEND_MODE_OUT,
114 	VIPS_BLEND_MODE_ATOP,
115 	VIPS_BLEND_MODE_DEST,
116 	VIPS_BLEND_MODE_DEST_OVER,
117 	VIPS_BLEND_MODE_DEST_IN,
118 	VIPS_BLEND_MODE_DEST_OUT,
119 	VIPS_BLEND_MODE_DEST_ATOP,
120 	VIPS_BLEND_MODE_XOR,
121 	VIPS_BLEND_MODE_ADD,
122 	VIPS_BLEND_MODE_SATURATE,
123 	VIPS_BLEND_MODE_MULTIPLY,
124 	VIPS_BLEND_MODE_SCREEN,
125 	VIPS_BLEND_MODE_OVERLAY,
126 	VIPS_BLEND_MODE_DARKEN,
127 	VIPS_BLEND_MODE_LIGHTEN,
128 	VIPS_BLEND_MODE_COLOUR_DODGE,
129 	VIPS_BLEND_MODE_COLOUR_BURN,
130 	VIPS_BLEND_MODE_HARD_LIGHT,
131 	VIPS_BLEND_MODE_SOFT_LIGHT,
132 	VIPS_BLEND_MODE_DIFFERENCE,
133 	VIPS_BLEND_MODE_EXCLUSION,
134 	VIPS_BLEND_MODE_LAST
135 } VipsBlendMode;
136 
137 int vips_copy( VipsImage *in, VipsImage **out, ... )
138 	__attribute__((sentinel));
139 int vips_tilecache( VipsImage *in, VipsImage **out, ... )
140 	__attribute__((sentinel));
141 int vips_linecache( VipsImage *in, VipsImage **out, ... )
142 	__attribute__((sentinel));
143 int vips_sequential( VipsImage *in, VipsImage **out, ... )
144 	__attribute__((sentinel));
145 int vips_cache( VipsImage *in, VipsImage **out, ... )
146 	__attribute__((sentinel));
147 int vips_copy_file( VipsImage *in, VipsImage **out, ... )
148 	__attribute__((sentinel));
149 
150 int vips_embed( VipsImage *in, VipsImage **out,
151 	int x, int y, int width, int height, ... )
152 	__attribute__((sentinel));
153 int vips_gravity( VipsImage *in, VipsImage **out,
154 	VipsCompassDirection direction, int width, int height, ... )
155 	__attribute__((sentinel));
156 int vips_flip( VipsImage *in, VipsImage **out, VipsDirection direction, ... )
157 	__attribute__((sentinel));
158 int vips_insert( VipsImage *main, VipsImage *sub, VipsImage **out,
159 	int x, int y, ... )
160 	__attribute__((sentinel));
161 int vips_join( VipsImage *in1, VipsImage *in2, VipsImage **out,
162 	VipsDirection direction, ... )
163 	__attribute__((sentinel));
164 int vips_arrayjoin( VipsImage **in, VipsImage **out, int n, ... )
165 	__attribute__((sentinel));
166 int vips_extract_area( VipsImage *in, VipsImage **out,
167 	int left, int top, int width, int height, ... )
168 	__attribute__((sentinel));
169 int vips_crop( VipsImage *in, VipsImage **out,
170 	int left, int top, int width, int height, ... )
171 	__attribute__((sentinel));
172 int vips_smartcrop( VipsImage *in, VipsImage **out, int width, int height, ... )
173 	__attribute__((sentinel));
174 int vips_extract_band( VipsImage *in, VipsImage **out, int band, ... )
175 	__attribute__((sentinel));
176 int vips_replicate( VipsImage *in, VipsImage **out, int across, int down, ... )
177 	__attribute__((sentinel));
178 int vips_grid( VipsImage *in, VipsImage **out,
179 	int tile_height, int across, int down, ... )
180 	__attribute__((sentinel));
181 int vips_transpose3d( VipsImage *in, VipsImage **out, ... )
182 	__attribute__((sentinel));
183 int vips_wrap( VipsImage *in, VipsImage **out, ... )
184 	__attribute__((sentinel));
185 int vips_rot( VipsImage *in, VipsImage **out, VipsAngle angle, ... )
186 	__attribute__((sentinel));
187 int vips_rot90( VipsImage *in, VipsImage **out, ... )
188 	__attribute__((sentinel));
189 int vips_rot180( VipsImage *in, VipsImage **out, ... )
190 	__attribute__((sentinel));
191 int vips_rot270( VipsImage *in, VipsImage **out, ... )
192 	__attribute__((sentinel));
193 int vips_rot45( VipsImage *in, VipsImage **out, ... )
194 	__attribute__((sentinel));
195 void vips_autorot_remove_angle( VipsImage *image );
196 int vips_autorot( VipsImage *in, VipsImage **out, ... )
197 	__attribute__((sentinel));
198 int vips_zoom( VipsImage *in, VipsImage **out, int xfac, int yfac, ... )
199 	__attribute__((sentinel));
200 int vips_subsample( VipsImage *in, VipsImage **out, int xfac, int yfac, ... )
201 	__attribute__((sentinel));
202 
203 int vips_cast( VipsImage *in, VipsImage **out, VipsBandFormat format, ... )
204 	__attribute__((sentinel));
205 int vips_cast_uchar( VipsImage *in, VipsImage **out, ... )
206 	__attribute__((sentinel));
207 int vips_cast_char( VipsImage *in, VipsImage **out, ... )
208 	__attribute__((sentinel));
209 int vips_cast_ushort( VipsImage *in, VipsImage **out, ... )
210 	__attribute__((sentinel));
211 int vips_cast_short( VipsImage *in, VipsImage **out, ... )
212 	__attribute__((sentinel));
213 int vips_cast_uint( VipsImage *in, VipsImage **out, ... )
214 	__attribute__((sentinel));
215 int vips_cast_int( VipsImage *in, VipsImage **out, ... )
216 	__attribute__((sentinel));
217 int vips_cast_float( VipsImage *in, VipsImage **out, ... )
218 	__attribute__((sentinel));
219 int vips_cast_double( VipsImage *in, VipsImage **out, ... )
220 	__attribute__((sentinel));
221 int vips_cast_complex( VipsImage *in, VipsImage **out, ... )
222 	__attribute__((sentinel));
223 int vips_cast_dpcomplex( VipsImage *in, VipsImage **out, ... )
224 	__attribute__((sentinel));
225 int vips_scale( VipsImage *in, VipsImage **out, ... )
226 	__attribute__((sentinel));
227 int vips_msb( VipsImage *in, VipsImage **out, ... )
228 	__attribute__((sentinel));
229 int vips_byteswap( VipsImage *in, VipsImage **out, ... )
230 	__attribute__((sentinel));
231 
232 int vips_bandjoin( VipsImage **in, VipsImage **out, int n, ... )
233 	__attribute__((sentinel));
234 int vips_bandjoin2( VipsImage *in1, VipsImage *in2, VipsImage **out, ... )
235 	__attribute__((sentinel));
236 int vips_bandjoin_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
237 	__attribute__((sentinel));
238 int vips_bandjoin_const1( VipsImage *in, VipsImage **out, double c, ... )
239 	__attribute__((sentinel));
240 int vips_bandrank( VipsImage **in, VipsImage **out, int n, ... )
241 	__attribute__((sentinel));
242 int vips_bandfold( VipsImage *in, VipsImage **out, ... )
243 	__attribute__((sentinel));
244 int vips_bandunfold( VipsImage *in, VipsImage **out, ... )
245 	__attribute__((sentinel));
246 
247 int vips_bandbool( VipsImage *in, VipsImage **out,
248 	VipsOperationBoolean boolean, ... )
249 	__attribute__((sentinel));
250 int vips_bandand( VipsImage *in, VipsImage **out, ... )
251 	__attribute__((sentinel));
252 int vips_bandor( VipsImage *in, VipsImage **out, ... )
253 	__attribute__((sentinel));
254 int vips_bandeor( VipsImage *in, VipsImage **out, ... )
255 	__attribute__((sentinel));
256 int vips_bandmean( VipsImage *in, VipsImage **out, ... )
257 	__attribute__((sentinel));
258 
259 int vips_recomb( VipsImage *in, VipsImage **out, VipsImage *m, ... )
260 	__attribute__((sentinel));
261 
262 int vips_ifthenelse( VipsImage *cond, VipsImage *in1, VipsImage *in2,
263 	VipsImage **out, ... )
264 	__attribute__((sentinel));
265 int vips_switch( VipsImage **tests, VipsImage **out, int n, ... )
266 	__attribute__((sentinel));
267 
268 int vips_flatten( VipsImage *in, VipsImage **out, ... )
269 	__attribute__((sentinel));
270 int vips_addalpha( VipsImage *in, VipsImage **out, ... )
271 	__attribute__((sentinel));
272 int vips_premultiply( VipsImage *in, VipsImage **out, ... )
273 	__attribute__((sentinel));
274 int vips_unpremultiply( VipsImage *in, VipsImage **out, ... )
275 	__attribute__((sentinel));
276 int vips_composite( VipsImage **in, VipsImage **out, int n, int *mode, ... )
277 	__attribute__((sentinel));
278 int vips_composite2( VipsImage *base, VipsImage *overlay, VipsImage **out,
279 	VipsBlendMode mode1, ... )
280 	__attribute__((sentinel));
281 
282 int vips_falsecolour( VipsImage *in, VipsImage **out, ... )
283 	__attribute__((sentinel));
284 int vips_gamma( VipsImage *in, VipsImage **out, ... )
285 	__attribute__((sentinel));
286 
287 #ifdef __cplusplus
288 }
289 #endif /*__cplusplus*/
290 
291 #endif /*VIPS_CONVERSION_H*/
292