liburcu: Update to 0.8.6
[feed/packages.git] / libs / vips / patches / 001-no_cpp.patch
1 diff -u --recursive --new-file vips-7.38.5-vanilla/configure.ac vips-7.38.5/configure.ac
2 --- vips-7.38.5-vanilla/configure.ac 2014-07-17 23:48:36.205794473 -0400
3 +++ vips-7.38.5/configure.ac 2014-07-17 23:49:32.773792981 -0400
4 @@ -184,7 +184,6 @@
5 AC_PROG_AWK
6 AC_PROG_CC
7 AC_PROG_CC_STDC
8 -AC_PROG_CXX
9 AC_C_CONST
10 AC_C_RESTRICT
11 AC_PROG_RANLIB
12 @@ -192,19 +191,6 @@
13 AC_PROG_LN_S
14 AM_WITH_DMALLOC
15
16 -# vips_PROG_CXX_WORKS
17 -# Check whether the C++ compiler works.
18 -AC_DEFUN([vips_PROG_CXX_WORKS],
19 - [AC_REQUIRE([AC_PROG_CXX])dnl
20 - AC_CACHE_CHECK([whether the C++ compiler works],
21 - [vips_cv_prog_cxx_works],
22 - [AC_LANG_PUSH([C++])
23 - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
24 - [vips_cv_prog_cxx_works=yes],
25 - [vips_cv_prog_cxx_works=no])
26 - AC_LANG_POP([C++])])
27 -])
28 -
29 # option to build without C++
30 # handy for some embedded applications
31 # also, including C++ source causes link problems on some
32 @@ -212,22 +198,8 @@
33 AC_ARG_ENABLE(cxx,
34 AS_HELP_STRING([--enable-cxx], [build C++ components (default: test)]))
35
36 -if test x"$enable_cxx" != x"no"; then
37 - vips_PROG_CXX_WORKS
38 - if test x"$vips_cv_prog_cxx_works" = x"yes"; then
39 - AC_DEFINE(ENABLE_CXX,1,[build C++ components])
40 - AM_CONDITIONAL(ENABLE_CXX, true)
41 - # need -lstdc++ for (eg.) the C++ format loaders
42 - # this gets added to vips.pc to help mingw and friends link programs
43 - # using libvips
44 - VIPS_CXX_LIBS="-lstdc++"
45 - enable_cxx=yes
46 - fi
47 -fi
48 -
49 if test x"$enable_cxx" != x"yes"; then
50 AM_CONDITIONAL(ENABLE_CXX, false)
51 - VIPS_CXX_LIBS=""
52 enable_cxx=no
53 fi
54
55 @@ -688,7 +660,6 @@
56 AC_SUBST(VIPS_CFLAGS)
57 AC_SUBST(VIPS_INCLUDES)
58 AC_SUBST(VIPS_LIBS)
59 -AC_SUBST(VIPS_CXX_LIBS)
60 AC_SUBST(PACKAGES_USED)
61
62 AC_OUTPUT([
63 @@ -700,7 +671,6 @@
64 libvips/include/vips/Makefile
65 libvips/Makefile
66 libvips/arithmetic/Makefile
67 - libvips/cimg/Makefile
68 libvips/colour/Makefile
69 libvips/conversion/Makefile
70 libvips/convolution/Makefile
71 @@ -715,9 +685,6 @@
72 libvips/create/Makefile
73 libvips/resample/Makefile
74 libvips/video/Makefile
75 - libvipsCC/include/Makefile
76 - libvipsCC/include/vips/Makefile
77 - libvipsCC/Makefile
78 tools/Makefile
79 tools/batch_crop
80 tools/batch_image_convert
81 @@ -725,7 +692,6 @@
82 tools/light_correct
83 tools/shrink_width
84 swig/Makefile
85 - swig/vipsCC/Makefile
86 swig/python/setup.py
87 man/Makefile
88 doc/Makefile
89 diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/cimg/cimg.cpp vips-7.38.5/libvips/cimg/cimg.cpp
90 --- vips-7.38.5-vanilla/libvips/cimg/cimg.cpp 2014-07-17 23:48:36.231794473 -0400
91 +++ vips-7.38.5/libvips/cimg/cimg.cpp 1969-12-31 19:00:00.000000000 -0500
92 @@ -1,300 +0,0 @@
93 -/* Pass VIPS images through CImg
94 - *
95 - * JC, 15/10/07
96 - * 29/4/10
97 - * - oop, should be smalltile, probably
98 - * - tiny cleanups
99 - * - gtkdoc
100 - */
101 -
102 -/*
103 -
104 - This file is part of VIPS.
105 -
106 - VIPS is free software; you can redistribute it and/or modify
107 - it under the terms of the GNU Lesser General Public License as published by
108 - the Free Software Foundation; either version 2 of the License, or
109 - (at your option) any later version.
110 -
111 - This program is distributed in the hope that it will be useful,
112 - but WITHOUT ANY WARRANTY; without even the implied warranty of
113 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
114 - GNU Lesser General Public License for more details.
115 -
116 - You should have received a copy of the GNU Lesser General Public License
117 - along with this program; if not, write to the Free Software
118 - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
119 - 02110-1301 USA
120 -
121 - */
122 -
123 -/*
124 -
125 - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
126 -
127 - */
128 -
129 -#ifdef HAVE_CONFIG_H
130 -#include <config.h>
131 -#endif /*HAVE_CONFIG_H*/
132 -#include <vips/intl.h>
133 -
134 -#include <vips/vips.h>
135 -#include <vips/internal.h>
136 -
137 -/* CImg needs to call pthread directly, this is the preproc magic they
138 - * prefer.
139 - */
140 -#if defined(sun) || defined(__sun) || defined(linux) || defined(__linux) \
141 - || defined(__linux__) || defined(__CYGWIN__) || defined(BSD) || defined(__FreeBSD__) \
142 - || defined(__OPENBSD__) || defined(__MACOSX__) || defined(__APPLE__) || defined(sgi) \
143 - || defined(__sgi)
144 - #include <pthread.h>
145 -#endif
146 -
147 -#include "CImg.h"
148 -using namespace cimg_library;
149 -
150 -/* Save params here.
151 - */
152 -struct Greyc {
153 - IMAGE *in;
154 - IMAGE *out;
155 - IMAGE *mask;
156 - IMAGE **arry;
157 -
158 - int iterations;
159 - float amplitude;
160 - float sharpness;
161 - float anisotropy;
162 - float alpha;
163 - float sigma;
164 - float dl;
165 - float da;
166 - float gauss_prec;
167 - int interpolation;
168 - bool fast_approx;
169 -};
170 -
171 -// copy part of a vips region into a cimg
172 -template<typename T> static CImg<T> *
173 -vips_to_cimg( REGION *in, Rect *area )
174 -{
175 - IMAGE *im = in->im;
176 - CImg<T> *img = new CImg<T>( area->width, area->height, 1, im->Bands );
177 -
178 - for( int y = 0; y < area->height; y++ ) {
179 - T *p = (T *) IM_REGION_ADDR( in, area->left, area->top + y );
180 -
181 - for( int x = 0; x < area->width; x++ ) {
182 - for( int z = 0; z < im->Bands; z++ )
183 - (*img)( x, y, z ) = p[z];
184 -
185 - p += im->Bands;
186 - }
187 - }
188 -
189 - return( img );
190 -}
191 -
192 -// write a CImg to a vips region
193 -// fill out->valid, img has pixels in img_rect
194 -template<typename T> static void
195 -cimg_to_vips( CImg<T> *img, Rect *img_rect, REGION *out )
196 -{
197 - IMAGE *im = out->im;
198 - Rect *valid = &out->valid;
199 -
200 - g_assert( im_rect_includesrect( img_rect, valid ) );
201 -
202 - int x_off = valid->left - img_rect->left;
203 - int y_off = valid->top - img_rect->top;
204 -
205 - for( int y = 0; y < valid->height; y++ ) {
206 - T *p = (T *) IM_REGION_ADDR( out, valid->left, valid->top + y );
207 -
208 - for( int x = 0; x < valid->width; x++ ) {
209 - for( int z = 0; z < im->Bands; z++ )
210 - p[z] = static_cast<T>( (*img)(
211 - x + x_off, y + y_off, z ) );
212 -
213 - p += im->Bands;
214 - }
215 - }
216 -}
217 -
218 -template<typename T> static int
219 -greyc_gen( REGION *out, REGION **in, IMAGE **arry, Greyc *greyc )
220 -{
221 - static const float gfact = (sizeof( T ) == 2) ? 1.0 / 256 : 1.0;
222 - static const int tile_border = 4;
223 -
224 - Rect *ir = &out->valid;
225 - Rect need;
226 - Rect image;
227 -
228 - CImg<T> *img;
229 - CImg<unsigned char> *msk;
230 -
231 - need = *ir;
232 - im_rect_marginadjust( &need, tile_border );
233 - image.left = 0;
234 - image.top = 0;
235 - image.width = in[0]->im->Xsize;
236 - image.height = in[0]->im->Ysize;
237 - im_rect_intersectrect( &need, &image, &need );
238 - if( im_prepare( in[0], &need ) )
239 - return( -1 );
240 - if( in[1] && im_prepare( in[1], &need ) )
241 - return( -1 );
242 -
243 - img = NULL;
244 - msk = NULL;
245 -
246 - try {
247 - img = vips_to_cimg<T>( in[0], &need );
248 - if( in[1] )
249 - msk = vips_to_cimg<unsigned char>( in[1], &need );
250 - else
251 - // empty mask
252 - msk = new CImg<unsigned char>();
253 -
254 - for( int i = 0; i < greyc->iterations; i++ )
255 - img->blur_anisotropic( *msk,
256 - greyc->amplitude, greyc->sharpness,
257 - greyc->anisotropy,
258 - greyc->alpha, greyc->sigma, greyc->dl,
259 - greyc->da, greyc->gauss_prec,
260 - greyc->interpolation, greyc->fast_approx,
261 - gfact );
262 -
263 - cimg_to_vips<T>( img, &need, out );
264 - }
265 - catch( CImgException e ) {
266 - if( img )
267 - delete( img );
268 - if( msk )
269 - delete( msk );
270 -
271 - im_error( "GREYCstoration", "%s", e.message );
272 -
273 - return( -1 );
274 - }
275 -
276 - if( img )
277 - delete( img );
278 - if( msk )
279 - delete( msk );
280 -
281 - return( 0 );
282 -}
283 -
284 -// Hmm, strange double-cast needed
285 -typedef int (*generate_fn)( REGION *out, REGION **in,
286 - IMAGE **im, Greyc *greyc );
287 -
288 -// as a plain C function
289 -/**
290 - * im_greyc_mask:
291 - * @in: input image
292 - * @out: output image
293 - * @mask: input mask
294 - * @iterations: number of iterations to perform (eg. 1)
295 - * @amplitude: scaling factor (eg. 40)
296 - * @sharpness: degree of sharpening to apply (eg. 0.9)
297 - * @anisotropy: how much to blur along lines (eg. 0.15)
298 - * @alpha: blur by this much before calculating geometry (eg. 0.6)
299 - * @sigma: blur geometry by this much (eg. 1.1)
300 - * @dl: spatial integration step (eg. 0.8)
301 - * @da: angular integration step (eg. 30)
302 - * @gauss_prec: precision (eg. 2)
303 - * @interpolation: interpolation (eg. 0 for nearest-neighbour)
304 - *
305 - * This operation calls the blur_anisotropic() method of the CImag image
306 - * processing library. It is handy for denoising images and for upscaling.
307 - *
308 - * See also: im_conv().
309 - *
310 - * Returns: 0 on success, -1 on error
311 - */
312 -int
313 -im_greyc_mask( IMAGE *in, IMAGE *out, IMAGE *mask,
314 - int iterations,
315 - float amplitude, float sharpness, float anisotropy,
316 - float alpha, float sigma,
317 - float dl, float da, float gauss_prec,
318 - int interpolation, int fast_approx )
319 -{
320 - IMAGE **arry;
321 - Greyc *greyc;
322 -
323 - if( im_piocheck( in, out ) ||
324 - im_check_uncoded( "im_greyc_mask", in ) ||
325 - im_check_u8or16orf( "im_greyc_mask", in ) )
326 - return( -1 );
327 - if( mask ) {
328 - if( im_pincheck( mask ) ||
329 - im_check_uncoded( "im_greyc_mask", mask ) ||
330 - im_check_size_same( "im_greyc_mask", in, mask ) ||
331 - im_check_format( "im_greyc_mask",
332 - mask, IM_BANDFMT_UCHAR ) )
333 - return( -1 );
334 - }
335 - if( im_cp_desc( out, in ) ||
336 - !(arry = im_allocate_input_array( out, in, mask, NULL )) ||
337 - !(greyc = IM_NEW( out, Greyc )) ||
338 - im_demand_hint( out, IM_SMALLTILE, in, NULL ) )
339 - return( -1 );
340 -
341 - greyc->in = in;
342 - greyc->out = out;
343 - greyc->mask = mask;
344 - greyc->arry = arry;
345 - greyc->iterations = iterations;
346 - greyc->amplitude = amplitude;
347 - greyc->sharpness = sharpness;
348 - greyc->anisotropy = anisotropy;
349 - greyc->alpha = alpha;
350 - greyc->sigma = sigma;
351 - greyc->dl = dl;
352 - greyc->da = da;
353 - greyc->gauss_prec = gauss_prec;
354 - greyc->interpolation = interpolation;
355 - greyc->fast_approx = fast_approx;
356 -
357 - switch( in->BandFmt ) {
358 - case IM_BANDFMT_UCHAR:
359 - if( im_generate( out,
360 - im_start_many,
361 - // double-cast to give g++ enough context to expand the
362 - // template correctly
363 - (im_generate_fn) (
364 - (generate_fn) greyc_gen<unsigned char>),
365 - im_stop_many, arry, greyc ) )
366 - return( -1 );
367 - break;
368 -
369 - case IM_BANDFMT_USHORT:
370 - if( im_generate( out,
371 - im_start_many,
372 - (im_generate_fn) (
373 - (generate_fn) greyc_gen<unsigned short>),
374 - im_stop_many, arry, greyc ) )
375 - return( -1 );
376 - break;
377 -
378 - case IM_BANDFMT_FLOAT:
379 - if( im_generate( out,
380 - im_start_many,
381 - (im_generate_fn) (
382 - (generate_fn) greyc_gen<float>),
383 - im_stop_many, arry, greyc ) )
384 - return( -1 );
385 - break;
386 -
387 - default:
388 - g_assert( 0 );
389 - }
390 -
391 - return( 0 );
392 -}
393 diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/cimg/cimg_dispatch.c vips-7.38.5/libvips/cimg/cimg_dispatch.c
394 --- vips-7.38.5-vanilla/libvips/cimg/cimg_dispatch.c 2014-07-17 23:48:36.230794473 -0400
395 +++ vips-7.38.5/libvips/cimg/cimg_dispatch.c 1969-12-31 19:00:00.000000000 -0500
396 @@ -1,171 +0,0 @@
397 -/* Function dispatch tables for cimg wrappers.
398 - */
399 -
400 -/*
401 -
402 - This file is part of VIPS.
403 -
404 - VIPS is free software; you can redistribute it and/or modify
405 - it under the terms of the GNU Lesser General Public License as published by
406 - the Free Software Foundation; either version 2 of the License, or
407 - (at your option) any later version.
408 -
409 - This program is distributed in the hope that it will be useful,
410 - but WITHOUT ANY WARRANTY; without even the implied warranty of
411 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
412 - GNU Lesser General Public License for more details.
413 -
414 - You should have received a copy of the GNU Lesser General Public License
415 - along with this program; if not, write to the Free Software
416 - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
417 - 02110-1301 USA
418 -
419 - */
420 -
421 -/*
422 -
423 - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
424 -
425 - */
426 -
427 -#ifdef HAVE_CONFIG_H
428 -#include <config.h>
429 -#endif /*HAVE_CONFIG_H*/
430 -#include <vips/intl.h>
431 -
432 -#include <stdio.h>
433 -
434 -#include <vips/vips.h>
435 -
436 -/**
437 - * SECTION: cimg_funcs
438 - * @short_description: expose operations from the CImg library, mostly noise
439 - * removal
440 - * @stability: Stable
441 - * @include: vips/vips.h
442 - *
443 - * The GREYCstoration filter.
444 - */
445 -
446 -static int
447 -greyc_vec( im_object *argv )
448 -{
449 - IMAGE *src = (IMAGE *) argv[0];
450 - IMAGE *dst = (IMAGE *) argv[1];
451 -
452 - int iterations = *((int *) argv[2]);
453 - double amplitude = *((double *) argv[3]);
454 - double sharpness = *((double *) argv[4]);
455 - double anisotropy = *((double *) argv[5]);
456 - double alpha = *((double *) argv[6]);
457 - double sigma = *((double *) argv[7]);
458 - double dl = *((double *) argv[8]);
459 - double da = *((double *) argv[9]);
460 - double gauss_prec = *((double *) argv[10]);
461 - int interpolation = *((int *) argv[11]);
462 - int fast_approx = *((int *) argv[12]);
463 -
464 - if( im_greyc_mask( src, dst, NULL,
465 - iterations,
466 - amplitude, sharpness, anisotropy,
467 - alpha, sigma,
468 - dl, da, gauss_prec,
469 - interpolation, fast_approx ) )
470 - return( -1 );
471 -
472 - return( 0 );
473 -}
474 -
475 -static im_arg_desc greyc_arg_types[] = {
476 - IM_INPUT_IMAGE( "src" ),
477 - IM_OUTPUT_IMAGE( "dst" ),
478 - IM_INPUT_INT( "iterations" ),
479 - IM_INPUT_DOUBLE( "amplitude" ),
480 - IM_INPUT_DOUBLE( "sharpness" ),
481 - IM_INPUT_DOUBLE( "anisotropy" ),
482 - IM_INPUT_DOUBLE( "alpha" ),
483 - IM_INPUT_DOUBLE( "sigma" ),
484 - IM_INPUT_DOUBLE( "dl" ),
485 - IM_INPUT_DOUBLE( "da" ),
486 - IM_INPUT_DOUBLE( "gauss_prec" ),
487 - IM_INPUT_INT( "interpolation" ),
488 - IM_INPUT_INT( "fast_approx" )
489 -};
490 -
491 -static im_function greyc_desc = {
492 - "im_greyc", /* Name */
493 - "noise-removing filter", /* Description */
494 - (im_fn_flags) (IM_FN_TRANSFORM | IM_FN_PIO),/* Flags */
495 - greyc_vec, /* Dispatch function */
496 - IM_NUMBER( greyc_arg_types ), /* Size of arg list */
497 - greyc_arg_types /* Arg list */
498 -};
499 -
500 -static int
501 -greyc_mask_vec( im_object *argv )
502 -{
503 - IMAGE *src = (IMAGE *) argv[0];
504 - IMAGE *dst = (IMAGE *) argv[1];
505 - IMAGE *mask = (IMAGE *) argv[2];
506 -
507 - int iterations = *((int *) argv[3]);
508 - double amplitude = *((double *) argv[4]);
509 - double sharpness = *((double *) argv[5]);
510 - double anisotropy = *((double *) argv[6]);
511 - double alpha = *((double *) argv[7]);
512 - double sigma = *((double *) argv[8]);
513 - double dl = *((double *) argv[9]);
514 - double da = *((double *) argv[10]);
515 - double gauss_prec = *((double *) argv[11]);
516 - int interpolation = *((int *) argv[12]);
517 - int fast_approx = *((int *) argv[13]);
518 -
519 - if( im_greyc_mask( src, dst, mask,
520 - iterations,
521 - amplitude, sharpness, anisotropy,
522 - alpha, sigma,
523 - dl, da, gauss_prec,
524 - interpolation, fast_approx ) )
525 - return( -1 );
526 -
527 - return( 0 );
528 -}
529 -
530 -static im_arg_desc greyc_mask_arg_types[] = {
531 - IM_INPUT_IMAGE( "src" ),
532 - IM_OUTPUT_IMAGE( "dst" ),
533 - IM_INPUT_IMAGE( "mask" ),
534 - IM_INPUT_INT( "iterations" ),
535 - IM_INPUT_DOUBLE( "amplitude" ),
536 - IM_INPUT_DOUBLE( "sharpness" ),
537 - IM_INPUT_DOUBLE( "anisotropy" ),
538 - IM_INPUT_DOUBLE( "alpha" ),
539 - IM_INPUT_DOUBLE( "sigma" ),
540 - IM_INPUT_DOUBLE( "dl" ),
541 - IM_INPUT_DOUBLE( "da" ),
542 - IM_INPUT_DOUBLE( "gauss_prec" ),
543 - IM_INPUT_INT( "interpolation" ),
544 - IM_INPUT_INT( "fast_approx" )
545 -};
546 -
547 -static im_function greyc_mask_desc = {
548 - "im_greyc_mask", /* Name */
549 - "noise-removing filter, with a mask", /* Description */
550 - (im_fn_flags) (IM_FN_TRANSFORM | IM_FN_PIO),/* Flags */
551 - greyc_mask_vec, /* Dispatch function */
552 - IM_NUMBER( greyc_mask_arg_types ),/* Size of arg list */
553 - greyc_mask_arg_types /* Arg list */
554 -};
555 -
556 -static im_function *function_list[] = {
557 - &greyc_desc,
558 - &greyc_mask_desc
559 -};
560 -
561 -/* Package of functions.
562 - */
563 -im_package im__cimg = {
564 - "cimg",
565 - IM_NUMBER( function_list ),
566 - function_list
567 -};
568 diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/cimg/CImg.h vips-7.38.5/libvips/cimg/CImg.h
569 --- vips-7.38.5-vanilla/libvips/cimg/CImg.h 2014-07-17 23:48:36.230794473 -0400
570 +++ vips-7.38.5/libvips/cimg/CImg.h 1969-12-31 19:00:00.000000000 -0500
571 @@ -1,22228 +0,0 @@
572 -/*
573 - #
574 - # File : CImg.h
575 - #
576 - # Description : The C++ Template Image Processing Library
577 - # ( http://cimg.sourceforge.net )
578 - #
579 - # Copyright : David Tschumperle
580 - # ( http://www.greyc.ensicaen.fr/~dtschump/ )
581 - #
582 - # License : CeCILL-C
583 - #
584 - # This software is governed by the CeCILL-C license under French law and
585 - # abiding by the rules of distribution of free software. You can use,
586 - # modify and or redistribute the software under the terms of the CeCILL-C
587 - # license as circulated by CEA, CNRS and INRIA at the following URL
588 - # "http://www.cecill.info".
589 - #
590 - # As a counterpart to the access to the source code and rights to copy,
591 - # modify and redistribute granted by the license, users are provided only
592 - # with a limited warranty and the software's author, the holder of the
593 - # economic rights, and the successive licensors have only limited
594 - # liability.
595 - #
596 - # In this respect, the user's attention is drawn to the risks associated
597 - # with loading, using, modifying and/or developing or reproducing the
598 - # software by the user in light of its specific status of free software,
599 - # that may mean that it is complicated to manipulate, and that also
600 - # therefore means that it is reserved for developers and experienced
601 - # professionals having in-depth computer knowledge. Users are therefore
602 - # encouraged to load and test the software's suitability as regards their
603 - # requirements in conditions enabling the security of their systems and/or
604 - # data to be ensured and, more generally, to use and operate it in the
605 - # same conditions as regards security.
606 - #
607 - # The fact that you are presently reading this means that you have had
608 - # knowledge of the CeCILL-C license and that you accept its terms.
609 - #
610 - */
611 -#ifndef cimg_version
612 -#define cimg_version 1.20
613 -
614 -// Detect Microsoft VC++ 6.0 compiler to get some workarounds afterwards.
615 -#if defined(_MSC_VER) && _MSC_VER<1300
616 -#define cimg_use_visualcpp6
617 -#endif
618 -
619 -// Avoid strange 'deprecated' warning messages with Visual C++ .NET.
620 -#if defined(_MSC_VER) && _MSC_VER>=1300
621 -#define _CRT_SECURE_NO_DEPRECATE 1
622 -#define _CRT_NONSTDC_NO_DEPRECATE 1
623 -#endif
624 -
625 -// Standard C++ includes.
626 -#include <cstdio>
627 -#include <cstdlib>
628 -#include <cstdarg>
629 -#include <cstring>
630 -#include <cmath>
631 -#include <ctime>
632 -
633 -// Overcome VisualC++ 6.0 compilers namespace 'std::' bug.
634 -#ifdef cimg_use_visualcpp6
635 -#define std
636 -#endif
637 -
638 -/*
639 - #
640 - # Set CImg configuration flags.
641 - #
642 - # If compilation flags are not adapted to your system,
643 - # you may override their values, before including
644 - # the header file "CImg.h" (use the #define directive).
645 - #
646 - */
647 -
648 -// Try to detect the current system and set value of 'cimg_OS'.
649 -#ifndef cimg_OS
650 -#if defined(sun) || defined(__sun) || defined(linux) || defined(__linux) \
651 - || defined(__linux__) || defined(__CYGWIN__) || defined(BSD) || defined(__FreeBSD__) \
652 - || defined(__OPENBSD__) || defined(__MACOSX__) || defined(__APPLE__) || defined(sgi) \
653 - || defined(__sgi)
654 -// Unix-like (Linux, Solaris, BSD, MacOSX, Irix,...).
655 -#define cimg_OS 1
656 -#ifndef cimg_display_type
657 -#define cimg_display_type 1
658 -#endif
659 -#ifndef cimg_color_terminal
660 -#define cimg_color_terminal
661 -#endif
662 -#elif defined(_WIN32) || defined(__WIN32__)
663 -// Windows.
664 -#define cimg_OS 2
665 -#ifndef cimg_display_type
666 -#define cimg_display_type 2
667 -#endif
668 -#else
669 -// Unknown configuration : ask for minimal dependencies (no display).
670 -#define cimg_OS 0
671 -#ifndef cimg_display_type
672 -#define cimg_display_type 0
673 -#endif
674 -#endif
675 -#endif
676 -
677 -// Debug configuration.
678 -//
679 -// Set 'cimg_debug' to : 0 to remove debug messages (exceptions are still thrown anyway).
680 -// 1 to display debug messages on standard error output (console).
681 -// 2 to display debug messages with modal windows (default behavior).
682 -// 3 to do as 2 + add extra memory access warnings (may slow down the code)
683 -#ifndef cimg_debug
684 -#define cimg_debug 2
685 -#endif
686 -
687 -// Allow compatibility with older CImg versions.
688 -//
689 -// Define 'cimg_strict' to avoid keeping the compatibility with older code
690 -#ifndef cimg_strict
691 -#define CImgl CImgList
692 -#define cimgl_map cimglist_for
693 -#define cimglist_map cimglist_for
694 -#define cimg_map cimg_for
695 -#define cimg_mapoff cimg_foroff
696 -#define cimg_mapX cimg_forX
697 -#define cimg_mapY cimg_forY
698 -#define cimg_mapZ cimg_forZ
699 -#define cimg_mapV cimg_forV
700 -#define cimg_mapXY cimg_forXY
701 -#define cimg_mapXZ cimg_forXZ
702 -#define cimg_mapXV cimg_forXV
703 -#define cimg_mapYZ cimg_forYZ
704 -#define cimg_mapYV cimg_forYV
705 -#define cimg_mapZV cimg_forZV
706 -#define cimg_mapXYZ cimg_forXYZ
707 -#define cimg_mapXYV cimg_forXYV
708 -#define cimg_mapXZV cimg_forXZV
709 -#define cimg_mapYZV cimg_forYZV
710 -#define cimg_mapXYZV cimg_forXYZV
711 -#define cimg_imapX cimg_for_insideX
712 -#define cimg_imapY cimg_for_insideY
713 -#define cimg_imapZ cimg_for_insideZ
714 -#define cimg_imapV cimg_for_insideV
715 -#define cimg_imapXY cimg_for_insideXY
716 -#define cimg_imapXYZ cimg_for_insideXYZ
717 -#define cimg_bmapX cimg_for_borderX
718 -#define cimg_bmapY cimg_for_borderY
719 -#define cimg_bmapZ cimg_for_borderZ
720 -#define cimg_bmapV cimg_for_borderV
721 -#define cimg_bmapXY cimg_for_borderXY
722 -#define cimg_bmapXYZ cimg_for_borderXYZ
723 -#define cimg_2mapX cimg_for2X
724 -#define cimg_2mapY cimg_for2Y
725 -#define cimg_2mapZ cimg_for2Z
726 -#define cimg_2mapXY cimg_for2XY
727 -#define cimg_2mapXZ cimg_for2XZ
728 -#define cimg_2mapYZ cimg_for2YZ
729 -#define cimg_2mapXYZ cimg_for2XYZ
730 -#define cimg_3mapX cimg_for3X
731 -#define cimg_3mapY cimg_for3Y
732 -#define cimg_3mapZ cimg_for3Z
733 -#define cimg_3mapXY cimg_for3XY
734 -#define cimg_3mapXZ cimg_for3XZ
735 -#define cimg_3mapYZ cimg_for3YZ
736 -#define cimg_3mapXYZ cimg_for3XYZ
737 -#define cimg_4mapX cimg_for4X
738 -#define cimg_4mapY cimg_for4Y
739 -#define cimg_4mapZ cimg_for4Z
740 -#define cimg_4mapXY cimg_for4XY
741 -#define cimg_4mapXZ cimg_for4XZ
742 -#define cimg_4mapYZ cimg_for4YZ
743 -#define cimg_4mapXYZ cimg_for4XYZ
744 -#define cimg_5mapX cimg_for5X
745 -#define cimg_5mapY cimg_for5Y
746 -#define cimg_5mapZ cimg_for5Z
747 -#define cimg_5mapXY cimg_for5XY
748 -#define cimg_5mapXZ cimg_for5XZ
749 -#define cimg_5mapYZ cimg_for5YZ
750 -#define cimg_5mapXYZ cimg_for5XYZ
751 -#define cimg_map2x2x1 cimg_for2x2
752 -#define cimg_map3x3x1 cimg_for3x3
753 -#define cimg_map4x4x1 cimg_for4x4
754 -#define cimg_map5x5x1 cimg_for5x5
755 -#define cimg_map2x2 cimg_for2x2
756 -#define cimg_map3x3 cimg_for3x3
757 -#define cimg_map4x4 cimg_for4x4
758 -#define cimg_map5x5 cimg_for5x5
759 -#define cimg_map3x3x3 cimg_for3x3x3
760 -#define cimg_map2x2x2 cimg_for2x2x2
761 -#define CImg_2x2x1 CImg_2x2
762 -#define CImg_3x3x1 CImg_3x3
763 -#define CImg_4x4x1 CImg_4x4
764 -#define CImg_5x5x1 CImg_5x5
765 -#define scroll translate
766 -#define cimg_convert_path cimg_imagemagick_path
767 -#define load_convert load_imagemagick
768 -#define save_convert save_imagemagick
769 -#endif
770 -
771 -// Architecture-dependent includes.
772 -#if cimg_OS==1
773 -#include <sys/time.h>
774 -#include <unistd.h>
775 -#elif cimg_OS==2
776 -#include <windows.h>
777 -// Discard unuseful macros in windows.h
778 -// to allow compilation with VC++ 6.0.
779 -#ifdef min
780 -#undef min
781 -#undef max
782 -#undef abs
783 -#endif
784 -#endif
785 -// Display-dependent includes.
786 -#if cimg_display_type==1
787 -#include <X11/Xlib.h>
788 -#include <X11/Xutil.h>
789 -#include <X11/keysym.h>
790 -#include <pthread.h>
791 -#ifdef cimg_use_xshm
792 -#include <sys/ipc.h>
793 -#include <sys/shm.h>
794 -#include <X11/extensions/XShm.h>
795 -#endif
796 -#ifdef cimg_use_xrandr
797 -#include <X11/extensions/Xrandr.h>
798 -#endif
799 -#endif
800 -
801 -// Configuration for native PNG and JPEG support
802 -//
803 -// Define 'cimg_use_png', 'cimg_use_jpeg' or 'cimg_use_tiff' to enable native PNG, JPEG or TIFF files support.
804 -// This requires you link your code with the zlib/png, jpeg or tiff libraries.
805 -// Without these libraries, PNG,JPEG and TIFF support will be done by the Image Magick's 'convert' tool,
806 -// or byt the GraphicsMagick 'gm' tool if installed
807 -// (this is the case on most unix plateforms).
808 -#ifdef cimg_use_png
809 -extern "C" {
810 -#include "png.h"
811 -}
812 -#endif
813 -#ifdef cimg_use_jpeg
814 -extern "C" {
815 -#include "jpeglib.h"
816 -}
817 -#endif
818 -#ifdef cimg_use_tiff
819 -extern "C" {
820 -#include "tiffio.h"
821 -}
822 -#endif
823 -#ifdef cimg_use_magick
824 -#include "Magick++.h"
825 -#endif
826 -#ifdef cimg_use_fftw3
827 -extern "C" {
828 -#include "fftw3.h"
829 -}
830 -#endif
831 -
832 -/*
833 - #
834 - #
835 - # Define some useful macros. Macros of the CImg Library are prefixed by 'cimg_'
836 - # Documented macros below may be safely used in your own code
837 - # (particularly useful for option parsing, image loops and neighborhoods).
838 - #
839 - #
840 - */
841 -
842 -// Macros used to describe the program usage, and retrieve command line arguments
843 -// (See corresponding module 'Retrieving command line arguments' in the generated documentation).
844 -#define cimg_usage(usage) cimg_library::cimg::option((char*)0,argc,argv,(char*)0,usage)
845 -#define cimg_help(str) cimg_library::cimg::option((char*)0,argc,argv,str,(char*)0)
846 -#define cimg_option(name,defaut,usage) cimg_library::cimg::option(name,argc,argv,defaut,usage)
847 -
848 -// Macros used for neighborhood definitions and manipulations.
849 -// (see module 'Using Image Loops' in the generated documentation).
850 -#define CImg_2(I,T) T I##cc,I##nc=0
851 -#define CImg_2x2(I,T) T I##cc,I##nc=0,I##cn,I##nn=0
852 -#define CImg_3(I,T) T I##pp,I##cp,I##np=0
853 -#define CImg_3x3(I,T) T I##pp,I##cp,I##np=0,I##pc,I##cc,I##nc=0,I##pn,I##cn,I##nn=0
854 -#define CImg_4(I,T) T I##pp,I##cp,I##np=0,I##ap=0
855 -#define CImg_4x4(I,T) T I##pp,I##cp,I##np=0,I##ap=0, \
856 - I##pc,I##cc,I##nc=0,I##ac=0, \
857 - I##pn,I##cn,I##nn=0,I##an=0, \
858 - I##pa,I##ca,I##na=0,I##aa=0
859 -#define CImg_5(I,T) T I##bb,I##pb,I##cb,I##nb=0,I##ab=0
860 -#define CImg_5x5(I,T) T I##bb,I##pb,I##cb,I##nb=0,I##ab=0, \
861 - I##bp,I##pp,I##cp,I##np=0,I##ap=0, \
862 - I##bc,I##pc,I##cc,I##nc=0,I##ac=0, \
863 - I##bn,I##pn,I##cn,I##nn=0,I##an=0, \
864 - I##ba,I##pa,I##ca,I##na=0,I##aa=0
865 -#define CImg_2x2x2(I,T) T I##ccc,I##ncc=0,I##cnc,I##nnc=0, \
866 - I##ccn,I##ncn=0,I##cnn,I##nnn=0
867 -#define CImg_3x3x3(I,T) T I##ppp,I##cpp,I##npp=0,I##pcp,I##ccp,I##ncp=0,I##pnp,I##cnp,I##nnp=0, \
868 - I##ppc,I##cpc,I##npc=0,I##pcc,I##ccc,I##ncc=0,I##pnc,I##cnc,I##nnc=0, \
869 - I##ppn,I##cpn,I##npn=0,I##pcn,I##ccn,I##ncn=0,I##pnn,I##cnn,I##nnn=0
870 -
871 -#define CImg_2x2_ref(I,T,tab) T &I##cc=(tab)[0],&I##nc=(tab)[1],&I##cn=(tab)[2],&I##nn=(tab)[3]
872 -#define CImg_3x3_ref(I,T,tab) T &I##pp=(tab)[0],&I##cp=(tab)[1],&I##np=(tab)[2], \
873 - &I##pc=(tab)[3],&I##cc=(tab)[4],&I##nc=(tab)[5], \
874 - &I##pn=(tab)[6],&I##cn=(tab)[7],&I##nn=(tab)[8]
875 -#define CImg_4x4_ref(I,T,tab) T &I##pp=(tab)[0],&I##cp=(tab)[1],&I##np=(tab)[2],&I##ap=(tab)[3], \
876 - &I##pc=(tab)[4],&I##cc=(tab)[5],&I##nc=(tab)[6],&I##ap=(tab)[7], \
877 - &I##pn=(tab)[8],&I##cn=(tab)[9],&I##nn=(tab)[10],&I##aa=(tab)[11], \
878 - &I##pa=(tab)[12],&I##ca=(tab)[13],&I##na=(tab)[14],&I##aa=(tab)[15]
879 -#define CImg_5x5_ref(I,T,tab) T &I##bb=(tab)[0],&I##pb=(tab)[1],&I##cb=(tab)[2],&I##nb=(tab)[3],&I##ab=(tab)[4], \
880 - &I##bp=(tab)[5],&I##pp=(tab)[6],&I##cp=(tab)[7],&I##np=(tab)[8],&I##ap=(tab)[9], \
881 - &I##bc=(tab)[10],&I##pc=(tab)[11],&I##cc=(tab)[12],&I##nc=(tab)[13],&I##ac=(tab)[14], \
882 - &I##bn=(tab)[15],&I##pn=(tab)[16],&I##cn=(tab)[17],&I##nn=(tab)[18],&I##an=(tab)[19], \
883 - &I##ba=(tab)[20],&I##pa=(tab)[21],&I##ca=(tab)[22],&I##na=(tab)[23],&I##aa=(tab)[24]
884 -#define CImg_2x2x2_ref(I,T,tab) T &I##ccc=(tab)[0],&I##ncc=(tab)[1],&I##cnc=(tab)[2],&I##nnc=(tab)[3], \
885 - &I##ccn=(tab)[4],&I##ncn=(tab)[5],&I##cnn=(tab)[6],&I##nnn=(tab)[7]
886 -#define CImg_3x3x3_ref(I,T,tab) T &I##ppp=(tab)[0],&I##cpp=(tab)[1],&I##npp=(tab)[2], \
887 - &I##pcp=(tab)[3],&I##ccp=(tab)[4],&I##ncp=(tab)[5], \
888 - &I##pnp=(tab)[6],&I##cnp=(tab)[7],&I##nnp=(tab)[8], \
889 - &I##ppc=(tab)[9],&I##cpc=(tab)[10],&I##npc=(tab)[11], \
890 - &I##pcc=(tab)[12],&I##ccc=(tab)[13],&I##ncc=(tab)[14], \
891 - &I##pnc=(tab)[15],&I##cnc=(tab)[16],&I##nnc=(tab)[17], \
892 - &I##ppn=(tab)[18],&I##cpn=(tab)[19],&I##npn=(tab)[20], \
893 - &I##pcn=(tab)[21],&I##ccn=(tab)[22],&I##ncn=(tab)[23], \
894 - &I##pnn=(tab)[24],&I##cnn=(tab)[25],&I##nnn=(tab)[26]
895 -
896 -#define cimg_copy2x2(J,I) I##cc=J##cc, I##nc=J##nc, I##cn=J##cn, I##nn=J##nn
897 -#define cimg_copy3x3(J,I) I##pp=J##pp, I##cp=J##cp, I##np=J##np, \
898 - I##pc=J##pc, I##cc=J##cc, I##nc=J##nc, \
899 - I##pn=J##pn, I##cn=J##cn, I##nn=J##nn
900 -#define cimg_copy5x5(J,I) I##bb=J##bb, I##pb=J##pb, I##cb=J##cb, I##nb=J##nb, I##ab=J##ab, \
901 - I##bp=J##bp, I##pp=J##pp, I##cp=J##cp, I##np=J##np, I##ap=J##ap, \
902 - I##bc=J##bc, I##pc=J##pc, I##cc=J##cc, I##nc=J##nc, I##ac=J##ac, \
903 - I##bn=J##bn, I##pn=J##pn, I##cn=J##cn, I##nn=J##nn, I##an=J##an, \
904 - I##ba=J##ba, I##pa=J##pa, I##ca=J##ca, I##na=J##na, I##aa=J##aa
905 -
906 -#define cimg_squaresum2x2(I) ( I##cc*I##cc + I##nc*I##nc + I##cn*I##cn + I##nn*I##nn )
907 -#define cimg_squaresum3x3(I) ( I##pp*I##pp + I##cp*I##cp + I##np*I##np + \
908 - I##pc*I##pc + I##cc*I##cc + I##nc*I##nc + \
909 - I##pn*I##pn + I##cn*I##cn + I##nn*I##nn )
910 -#define cimg_squaresum4x4(I) ( I##pp*I##pp + I##cp*I##cp + I##np*I##np + I##ap*I##ap + \
911 - I##pc*I##pc + I##cc*I##cc + I##nc*I##nc + I##ac*I##ac + \
912 - I##pn*I##pn + I##cn*I##cn + I##nn*I##nn + I##an*I##an + \
913 - I##pa*I##pa + I##ca*I##ca + I##na*I##na + I##aa*I##aa )
914 -#define cimg_squaresum5x5(I) ( I##bb*I##bb + I##pb*I##pb + I##cb*I##cb + I##nb*I##nb + I##ab*I##ab + \
915 - I##bp*I##bp + I##pp*I##pp + I##cp*I##cp + I##np*I##np + I##ap*I##ap + \
916 - I##bc*I##bc + I##pc*I##pc + I##cc*I##cc + I##nc*I##nc + I##ac*I##ac + \
917 - I##bn*I##bn + I##pn*I##pn + I##cn*I##cn + I##nn*I##nn + I##an*I##an + \
918 - I##ba*I##ba + I##pa*I##pa + I##ca*I##ca + I##na*I##na + I##aa*I##aa )
919 -#define cimg_squaresum2x2x2(I) ( I##ccc*I##ccc + I##ncc*I##ncc + I##cnc*I##cnc + I##nnc*I##nnc + \
920 - I##ccn*I##ccn + I##ncn*I##ncn + I##cnn*I##cnn + I##nnn*I##nnn )
921 -#define cimg_squaresum3x3x3(I) ( I##ppp*I##ppp + I##cpp*I##cpp + I##npp*I##npp + \
922 - I##pcp*I##pcp + I##ccp*I##ccp + I##ncp*I##ncp + \
923 - I##pnp*I##pnp + I##cnp*I##cnp + I##nnp*I##nnp + \
924 - I##ppc*I##ppc + I##cpc*I##cpc + I##npc*I##npc + \
925 - I##pcc*I##pcc + I##ccc*I##ccc + I##ncc*I##ncc + \
926 - I##pnc*I##pnc + I##cnc*I##cnc + I##nnc*I##nnc + \
927 - I##ppn*I##ppn + I##cpn*I##cpn + I##npn*I##npn + \
928 - I##pcn*I##pcn + I##ccn*I##ccn + I##ncn*I##ncn + \
929 - I##pnn*I##pnn + I##cnn*I##cnn + I##nnn*I##nnn )
930 -
931 -#define cimg_corr2x2(I,m) ( I##cc*(m)(0,0)+I##nc*(m)(1,0)+I##cn*(m)(0,1)+I##nn*(m)(1,1) )
932 -#define cimg_corr3x3(I,m) ( I##pp*(m)(0,0)+I##cp*(m)(1,0)+I##np*(m)(2,0) + \
933 - I##pc*(m)(0,1)+I##cc*(m)(1,1)+I##nc*(m)(2,1) + \
934 - I##pn*(m)(0,2)+I##cn*(m)(1,2)+I##nn*(m)(2,2) )
935 -#define cimg_corr4x4(I,m) ( I##pp*(m)(0,0)+I##cp*(m)(1,0)+I##np*(m)(2,0)+I##ap*(m)(3,0) + \
936 - I##pc*(m)(0,1)+I##cc*(m)(1,1)+I##nc*(m)(2,1)+I##ac*(m)(3,1) + \
937 - I##pn*(m)(0,2)+I##cn*(m)(1,2)+I##nn*(m)(2,2)+I##an*(m)(3,2) + \
938 - I##pa*(m)(0,3)+I##ca*(m)(1,3)+I##na*(m)(2,3)+I##aa*(m)(3,3) )
939 -#define cimg_corr5x5(I,m) ( I##bb*(m)(0,0)+I##pb*(m)(1,0)+I##cb*(m)(2,0)+I##nb*(m)(3,0)+I##ab*(m)(4,0) + \
940 - I##bp*(m)(0,1)+I##pp*(m)(1,1)+I##cp*(m)(2,1)+I##np*(m)(3,1)+I##ap*(m)(4,1) + \
941 - I##bc*(m)(0,2)+I##pc*(m)(1,2)+I##cc*(m)(2,2)+I##nc*(m)(3,2)+I##ac*(m)(4,2) + \
942 - I##bn*(m)(0,3)+I##pn*(m)(1,3)+I##cn*(m)(2,3)+I##nn*(m)(3,3)+I##an*(m)(4,3) + \
943 - I##ba*(m)(0,4)+I##pa*(m)(1,4)+I##ca*(m)(2,4)+I##na*(m)(3,4)+I##aa*(m)(4,4) )
944 -#define cimg_corr2x2x2(I,m) ( I##ccc*(m)(0,0,0)+I##ncc*(m)(1,0,0)+I##cnc*(m)(0,1,0)+I##nnc*(m)(1,1,0) + \
945 - I##ccn*(m)(0,0,1)+I##ncn*(m)(1,0,1)+I##cnn*(m)(0,1,1)+I##nnn*(m)(1,1,1) )
946 -#define cimg_corr3x3x3(I,m) ( I##ppp*(m)(0,0,0)+I##cpp*(m)(1,0,0)+I##npp*(m)(2,0,0) + \
947 - I##pcp*(m)(0,1,0)+I##ccp*(m)(1,1,0)+I##ncp*(m)(2,1,0) + \
948 - I##pnp*(m)(0,2,0)+I##cnp*(m)(1,2,0)+I##nnp*(m)(2,2,0) + \
949 - I##ppc*(m)(0,0,1)+I##cpc*(m)(1,0,1)+I##npc*(m)(2,0,1) + \
950 - I##pcc*(m)(0,1,1)+I##ccc*(m)(1,1,1)+I##ncc*(m)(2,1,1) + \
951 - I##pnc*(m)(0,2,1)+I##cnc*(m)(1,2,1)+I##nnc*(m)(2,2,1) + \
952 - I##ppn*(m)(0,0,2)+I##cpn*(m)(1,0,2)+I##npn*(m)(2,0,2) + \
953 - I##pcn*(m)(0,1,2)+I##ccn*(m)(1,1,2)+I##ncn*(m)(2,1,2) + \
954 - I##pnn*(m)(0,2,2)+I##cnn*(m)(1,2,2)+I##nnn*(m)(2,2,2) )
955 -
956 -#define cimg_conv2x2(I,m) ( I##cc*(m)(1,1)+I##nc*(m)(0,1)+I##cn*(m)(1,0)+I##nn*(m)(0,0) )
957 -#define cimg_conv3x3(I,m) ( I##pp*(m)(2,2)+I##cp*(m)(1,2)+I##np*(m)(0,2) + \
958 - I##pc*(m)(2,1)+I##cc*(m)(1,1)+I##nc*(m)(0,1) + \
959 - I##pn*(m)(2,0)+I##cn*(m)(1,0)+I##nn*(m)(0,0) )
960 -#define cimg_conv4x4(I,m) ( I##pp*(m)(3,3)+I##cp*(m)(2,3)+I##np*(m)(1,3)+I##ap*(m)(0,3) + \
961 - I##pc*(m)(3,2)+I##cc*(m)(2,2)+I##nc*(m)(1,2)+I##ac*(m)(0,2) + \
962 - I##pn*(m)(3,1)+I##cn*(m)(2,1)+I##nn*(m)(1,1)+I##an*(m)(0,1) + \
963 - I##pa*(m)(3,0)+I##ca*(m)(2,0)+I##na*(m)(1,0)+I##aa*(m)(0,0) )
964 -#define cimg_conv5x5(I,m) ( I##bb*(m)(4,4)+I##pb*(m)(3,4)+I##cb*(m)(2,4)+I##nb*(m)(1,4)+I##ab*(m)(0,4) + \
965 - I##bp*(m)(4,3)+I##pp*(m)(3,3)+I##cp*(m)(2,3)+I##np*(m)(1,3)+I##ap*(m)(0,3) + \
966 - I##bc*(m)(4,2)+I##pc*(m)(3,2)+I##cc*(m)(2,2)+I##nc*(m)(1,2)+I##ac*(m)(0,2) + \
967 - I##bn*(m)(4,1)+I##pn*(m)(3,1)+I##cn*(m)(2,1)+I##nn*(m)(1,1)+I##an*(m)(0,1) + \
968 - I##ba*(m)(4,0)+I##pa*(m)(3,0)+I##ca*(m)(2,0)+I##na*(m)(1,0)+I##aa*(m)(0,0) )
969 -#define cimg_conv2x2x2(I,m) ( I##ccc*(m)(1,1,1)+I##ncc*(m)(0,1,1)+I##cnc*(m)(1,0,1)+I##nnc*(m)(0,0,1) + \
970 - I##ccn*(m)(1,1,0)+I##ncn*(m)(0,1,0)+I##cnn*(m)(1,0,0)+I##nnn*(m)(0,0,0) )
971 -#define cimg_conv3x3x3(I,m) ( I##ppp*(m)(2,2,2)+I##cpp*(m)(1,2,2)+I##npp*(m)(0,2,2) + \
972 - I##pcp*(m)(2,1,2)+I##ccp*(m)(1,1,2)+I##ncp*(m)(0,1,2) + \
973 - I##pnp*(m)(2,0,2)+I##cnp*(m)(1,0,2)+I##nnp*(m)(0,0,2) + \
974 - I##ppc*(m)(2,2,1)+I##cpc*(m)(1,2,1)+I##npc*(m)(0,2,1) + \
975 - I##pcc*(m)(2,1,1)+I##ccc*(m)(1,1,1)+I##ncc*(m)(0,1,1) + \
976 - I##pnc*(m)(2,0,1)+I##cnc*(m)(1,0,1)+I##nnc*(m)(0,0,1) + \
977 - I##ppn*(m)(2,2,0)+I##cpn*(m)(1,2,0)+I##npn*(m)(0,2,0) + \
978 - I##pcn*(m)(2,1,0)+I##ccn*(m)(1,1,0)+I##ncn*(m)(0,1,0) + \
979 - I##pnn*(m)(2,0,0)+I##cnn*(m)(1,0,0)+I##nnn*(m)(0,0,0) )
980 -
981 -#define cimg_get2x2(img,x,y,z,v,I) \
982 - I##cc=(img)(x, y,z,v), I##nc=(img)(_n##x, y,z,v), \
983 - I##cn=(img)(x,_n##y,z,v), I##nn=(img)(_n##x,_n##y,z,v)
984 -#define cimg_get3x3(img,x,y,z,v,I) \
985 - I##pp=(img)(_p##x,_p##y,z,v), I##cp=(img)(x,_p##y,z,v), I##np=(img)(_n##x,_p##y,z,v), \
986 - I##pc=(img)(_p##x, y,z,v), I##cc=(img)(x, y,z,v), I##nc=(img)(_n##x, y,z,v), \
987 - I##pn=(img)(_p##x,_n##y,z,v), I##cn=(img)(x,_n##y,z,v), I##nn=(img)(_n##x,_n##y,z,v)
988 -#define cimg_get4x4(img,x,y,z,v,I) \
989 - I##pp=(img)(_p##x,_p##y,z,v), I##cp=(img)(x,_p##y,z,v), I##np=(img)(_n##x,_p##y,z,v), I##ap=(img)(_a##x,_p##y,z,v), \
990 - I##pc=(img)(_p##x, y,z,v), I##cc=(img)(x, y,z,v), I##nc=(img)(_n##x, y,z,v), I##ac=(img)(_a##x, y,z,v), \
991 - I##pn=(img)(_p##x,_n##y,z,v), I##cn=(img)(x,_n##y,z,v), I##nn=(img)(_n##x,_n##y,z,v), I##an=(img)(_a##x,_n##y,z,v), \
992 - I##pa=(img)(_p##x,_a##y,z,v), I##ca=(img)(x,_a##y,z,v), I##na=(img)(_n##x,_a##y,z,v), I##aa=(img)(_a##x,_a##y,z,v)
993 -#define cimg_get5x5(img,x,y,z,v,I) \
994 - I##bb=(img)(_b##x,_b##y,z,v), I##pb=(img)(_p##x,_b##y,z,v), I##cb=(img)(x,_b##y,z,v), I##nb=(img)(_n##x,_b##y,z,v), I##ab=(img)(_a##x,_b##y,z,v), \
995 - I##bp=(img)(_b##x,_p##y,z,v), I##pp=(img)(_p##x,_p##y,z,v), I##cp=(img)(x,_p##y,z,v), I##np=(img)(_n##x,_p##y,z,v), I##ap=(img)(_a##x,_p##y,z,v), \
996 - I##bc=(img)(_b##x, y,z,v), I##pc=(img)(_p##x, y,z,v), I##cc=(img)(x, y,z,v), I##nc=(img)(_n##x, y,z,v), I##ac=(img)(_a##x, y,z,v), \
997 - I##bn=(img)(_b##x,_n##y,z,v), I##pn=(img)(_p##x,_n##y,z,v), I##cn=(img)(x,_n##y,z,v), I##nn=(img)(_n##x,_n##y,z,v), I##an=(img)(_a##x,_n##y,z,v), \
998 - I##ba=(img)(_b##x,_a##y,z,v), I##pa=(img)(_p##x,_a##y,z,v), I##ca=(img)(x,_a##y,z,v), I##na=(img)(_n##x,_a##y,z,v), I##aa=(img)(_a##x,_a##y,z,v)
999 -#define cimg_get2x2x2(img,x,y,z,v,I) \
1000 - I##ccc=(img)(x,y, z,v), I##ncc=(img)(_n##x,y, z,v), I##cnc=(img)(x,_n##y, z,v), I##nnc=(img)(_n##x,_n##y, z,v), \
1001 - I##ccc=(img)(x,y,_n##z,v), I##ncc=(img)(_n##x,y,_n##z,v), I##cnc=(img)(x,_n##y,_n##z,v), I##nnc=(img)(_n##x,_n##y,_n##z,v)
1002 -#define cimg_get3x3x3(img,x,y,z,v,I) \
1003 - I##ppp=(img)(_p##x,_p##y,_p##z,v), I##cpp=(img)(x,_p##y,_p##z,v), I##npp=(img)(_n##x,_p##y,_p##z,v), \
1004 - I##pcp=(img)(_p##x, y,_p##z,v), I##ccp=(img)(x, y,_p##z,v), I##ncp=(img)(_n##x, y,_p##z,v), \
1005 - I##pnp=(img)(_p##x,_n##y,_p##z,v), I##cnp=(img)(x,_n##y,_p##z,v), I##nnp=(img)(_n##x,_n##y,_p##z,v), \
1006 - I##ppc=(img)(_p##x,_p##y, z,v), I##cpc=(img)(x,_p##y, z,v), I##npc=(img)(_n##x,_p##y, z,v), \
1007 - I##pcc=(img)(_p##x, y, z,v), I##ccc=(img)(x, y, z,v), I##ncc=(img)(_n##x, y, z,v), \
1008 - I##pnc=(img)(_p##x,_n##y, z,v), I##cnc=(img)(x,_n##y, z,v), I##nnc=(img)(_n##x,_n##y, z,v), \
1009 - I##ppn=(img)(_p##x,_p##y,_n##z,v), I##cpn=(img)(x,_p##y,_n##z,v), I##npn=(img)(_n##x,_p##y,_n##z,v), \
1010 - I##pcn=(img)(_p##x, y,_n##z,v), I##ccn=(img)(x, y,_n##z,v), I##ncn=(img)(_n##x, y,_n##z,v), \
1011 - I##pnn=(img)(_p##x,_n##y,_n##z,v), I##cnn=(img)(x,_n##y,_n##z,v), I##nnn=(img)(_n##x,_n##y,_n##z,v)
1012 -
1013 -// Macros used to define special image loops.
1014 -// (see module 'Using Image Loops' in the generated documentation).
1015 -#define cimg_for(img,ptr,T_ptr) for (T_ptr *ptr=(img).data+(img).size(); (ptr--)>(img).data; )
1016 -#define cimglist_for(list,l) for (unsigned int l=0; l<(list).size; l++)
1017 -#define cimglist_apply(list,fn) cimglist_for(list,__##fn) (list)[__##fn].fn
1018 -#define cimg_foroff(img,off) for (unsigned int off=0; off<(img).size(); off++)
1019 -#define cimg_forX(img,x) for (int x=0; x<(int)((img).width); x++)
1020 -#define cimg_forY(img,y) for (int y=0; y<(int)((img).height);y++)
1021 -#define cimg_forZ(img,z) for (int z=0; z<(int)((img).depth); z++)
1022 -#define cimg_forV(img,v) for (int v=0; v<(int)((img).dim); v++)
1023 -#define cimg_forXY(img,x,y) cimg_forY(img,y) cimg_forX(img,x)
1024 -#define cimg_forXZ(img,x,z) cimg_forZ(img,z) cimg_forX(img,x)
1025 -#define cimg_forYZ(img,y,z) cimg_forZ(img,z) cimg_forY(img,y)
1026 -#define cimg_forXV(img,x,v) cimg_forV(img,v) cimg_forX(img,x)
1027 -#define cimg_forYV(img,y,v) cimg_forV(img,v) cimg_forY(img,y)
1028 -#define cimg_forZV(img,z,v) cimg_forV(img,v) cimg_forZ(img,z)
1029 -#define cimg_forXYZ(img,x,y,z) cimg_forZ(img,z) cimg_forXY(img,x,y)
1030 -#define cimg_forXYV(img,x,y,v) cimg_forV(img,v) cimg_forXY(img,x,y)
1031 -#define cimg_forXZV(img,x,z,v) cimg_forV(img,v) cimg_forXZ(img,x,z)
1032 -#define cimg_forYZV(img,y,z,v) cimg_forV(img,v) cimg_forYZ(img,y,z)
1033 -#define cimg_forXYZV(img,x,y,z,v) cimg_forV(img,v) cimg_forXYZ(img,x,y,z)
1034 -#define cimg_for_insideX(img,x,n) for (int x=(n); x<(int)((img).width-(n)); x++)
1035 -#define cimg_for_insideY(img,y,n) for (int y=(n); y<(int)((img).height-(n)); y++)
1036 -#define cimg_for_insideZ(img,z,n) for (int z=(n); z<(int)((img).depth-(n)); z++)
1037 -#define cimg_for_insideV(img,v,n) for (int v=(n); v<(int)((img).dim-(n)); v++)
1038 -#define cimg_for_insideXY(img,x,y,n) cimg_for_insideY(img,y,n) cimg_for_insideX(img,x,n)
1039 -#define cimg_for_insideXYZ(img,x,y,z,n) cimg_for_insideZ(img,z,n) cimg_for_insideXY(img,x,y,n)
1040 -#define cimg_for_borderX(img,x,n) for (int x=0; x<(int)((img).width); x==(n)-1?(x=(img).width-(n)): x++)
1041 -#define cimg_for_borderY(img,y,n) for (int y=0; y<(int)((img).height); y==(n)-1?(x=(img).height-(n)):y++)
1042 -#define cimg_for_borderZ(img,z,n) for (int z=0; z<(int)((img).depth); z==(n)-1?(x=(img).depth-(n)): z++)
1043 -#define cimg_for_borderV(img,v,n) for (int v=0; v<(int)((img).dim); v==(n)-1?(x=(img).dim-(n)): v++)
1044 -#define cimg_for_borderXY(img,x,y,n) cimg_forY(img,y) for (int x=0; x<(int)((img).width); (y<(n) || y>=(int)((img).height)-(n))?x++: \
1045 - ((x<(n)-1 || x>=(int)((img).width)-(n))?x++:(x=(img).width-(n))))
1046 -#define cimg_for_borderXYZ(img,x,y,z,n) cimg_forYZ(img,y,z) for (int x=0; x<(int)((img).width); (y<(n) || y>=(int)((img).height)-(n) || z<(n) || z>=(int)((img).depth)-(n))?x++: \
1047 - ((x<(n)-1 || x>=(int)((img).width)-(n))?x++:(x=(img).width-(n))))
1048 -#define cimg_for2X(img,x) for (int x=0,_n##x=1; _n##x<(int)((img).width) || x==--_n##x; x++, _n##x++)
1049 -#define cimg_for2Y(img,y) for (int y=0,_n##y=1; _n##y<(int)((img).height) || y==--_n##y; y++, _n##y++)
1050 -#define cimg_for2Z(img,z) for (int z=0,_n##z=1; _n##z<(int)((img).depth) || z==--_n##z; z++, _n##z++)
1051 -#define cimg_for2XY(img,x,y) cimg_for2Y(img,y) cimg_for2X(img,x)
1052 -#define cimg_for2XZ(img,x,z) cimg_for2Z(img,z) cimg_for2X(img,x)
1053 -#define cimg_for2YZ(img,y,z) cimg_for2Z(img,z) cimg_for2Y(img,y)
1054 -#define cimg_for2XYZ(img,x,y,z) cimg_for2Z(img,z) cimg_for2XY(img,x,y)
1055 -#define cimg_for3X(img,x) for (int x=0,_p##x=0,_n##x=1; _n##x<(int)((img).width) || x==--_n##x; _p##x=x++,_n##x++)
1056 -#define cimg_for3Y(img,y) for (int y=0,_p##y=0,_n##y=1; _n##y<(int)((img).height) || y==--_n##y; _p##y=y++,_n##y++)
1057 -#define cimg_for3Z(img,z) for (int z=0,_p##z=0,_n##z=1; _n##z<(int)((img).depth) || z==--_n##z; _p##z=z++,_n##z++)
1058 -#define cimg_for3XY(img,x,y) cimg_for3Y(img,y) cimg_for3X(img,x)
1059 -#define cimg_for3XZ(img,x,z) cimg_for3Z(img,z) cimg_for3X(img,x)
1060 -#define cimg_for3YZ(img,y,z) cimg_for3Z(img,z) cimg_for3Y(img,y)
1061 -#define cimg_for3XYZ(img,x,y,z) cimg_for3Z(img,z) cimg_for3XY(img,x,y)
1062 -#define cimg_for4X(img,x) for (int _p##x=0,x=0,_n##x=1,_a##x=2; \
1063 - _a##x<(int)((img).width) || _n##x==--_a##x || x==(_a##x=--_n##x); \
1064 - _p##x=x++,_n##x++,_a##x++)
1065 -#define cimg_for4Y(img,y) for (int _p##y=0,y=0,_n##y=1,_a##y=2; \
1066 - _a##y<(int)((img).height) || _n##y==--_a##y || y==(_a##y=--_n##y); \
1067 - _p##y=y++,_n##y++,_a##y++)
1068 -#define cimg_for4Z(img,z) for (int _p##z=0,z=0,_n##z=1,_a##z=2; \
1069 - _a##z<(int)((img).depth) || _n##z==--_a##z || z==(_a##z=--_n##z); \
1070 - _p##z=z++,_n##z++,_a##z++)
1071 -#define cimg_for4XY(img,x,y) cimg_for4Y(img,y) cimg_for4X(img,x)
1072 -#define cimg_for4XZ(img,x,z) cimg_for4Z(img,z) cimg_for4X(img,x)
1073 -#define cimg_for4YZ(img,y,z) cimg_for4Z(img,z) cimg_for4Y(img,y)
1074 -#define cimg_for4XYZ(img,x,y,z) cimg_for4Z(img,z) cimg_for4XY(img,x,y)
1075 -#define cimg_for5X(img,x) for (int _b##x=0,_p##x=0,x=0,_n##x=1,_a##x=2; \
1076 - _a##x<(int)((img).width) || _n##x==--_a##x || x==(_a##x=--_n##x); \
1077 - _b##x=_p##x,_p##x=x++,_n##x++,_a##x++)
1078 -#define cimg_for5Y(img,y) for (int _b##y=0,_p##y=0,y=0,_n##y=1,_a##y=2; \
1079 - _a##y<(int)((img).height) || _n##y==--_a##y || y==(_a##y=--_n##y); \
1080 - _b##y=_p##y,_p##y=y++,_n##y++,_a##y++)
1081 -#define cimg_for5Z(img,z) for (int _b##z=0,_p##z=0,z=0,_n##z=1,_a##z=2; \
1082 - _a##z<(int)((img).depth) || _n##z==--_a##z || z==(_a##z=--_n##z); \
1083 - _b##z=_p##z,_p##z=z++,_n##z++,_a##z++)
1084 -#define cimg_for5XY(img,x,y) cimg_for5Y(img,y) cimg_for5X(img,x)
1085 -#define cimg_for5XZ(img,x,z) cimg_for5Z(img,z) cimg_for5X(img,x)
1086 -#define cimg_for5YZ(img,y,z) cimg_for5Z(img,z) cimg_for5Y(img,y)
1087 -#define cimg_for5XYZ(img,x,y,z) cimg_for5Z(img,z) cimg_for5XY(img,x,y)
1088 -
1089 -#define cimg_for2x2(img,x,y,z,v,I) cimg_for2Y(img,y) \
1090 - for (int _n##x=1, x=(int)((I##cc=(img)(0, y,z,v)), \
1091 - (I##cn=(img)(0,_n##y,z,v)), \
1092 - 0); \
1093 - (_n##x<(int)((img).width) && ((I##nc=(img)(_n##x, y,z,v)), \
1094 - (I##nn=(img)(_n##x,_n##y,z,v)), \
1095 - 1)) || x==--_n##x; \
1096 - I##cc=I##nc, I##cn=I##nn, \
1097 - x++,_n##x++ )
1098 -
1099 -#define cimg_for3x3(img,x,y,z,v,I) cimg_for3Y(img,y) \
1100 - for (int _n##x=1, _p##x=(int)((I##cp=I##pp=(img)(0,_p##y,z,v)), \
1101 - (I##cc=I##pc=(img)(0, y,z,v)), \
1102 - (I##cn=I##pn=(img)(0,_n##y,z,v))), \
1103 - x=_p##x=0; \
1104 - (_n##x<(int)((img).width) && ((I##np=(img)(_n##x,_p##y,z,v)), \
1105 - (I##nc=(img)(_n##x, y,z,v)), \
1106 - (I##nn=(img)(_n##x,_n##y,z,v)), \
1107 - 1)) || x==--_n##x; \
1108 - I##pp=I##cp, I##pc=I##cc, I##pn=I##cn, \
1109 - I##cp=I##np, I##cc=I##nc, I##cn=I##nn, \
1110 - _p##x=x++,_n##x++ )
1111 -
1112 -
1113 -#define cimg_for4x4(img,x,y,z,v,I) cimg_for4Y(img,y) \
1114 - for (int _a##x=2, _n##x=1, x=(int)((I##cp=I##pp=(img)(0,_p##y,z,v)), \
1115 - (I##cc=I##pc=(img)(0, y,z,v)), \
1116 - (I##cn=I##pn=(img)(0,_n##y,z,v)), \
1117 - (I##ca=I##pa=(img)(0,_a##y,z,v)), \
1118 - (I##np=(img)(_n##x,_p##y,z,v)), \
1119 - (I##nc=(img)(_n##x, y,z,v)), \
1120 - (I##nn=(img)(_n##x,_n##y,z,v)), \
1121 - (I##na=(img)(_n##x,_a##y,z,v)), \
1122 - 0), _p##x=0; \
1123 - (_a##x<(int)((img).width) && ((I##ap=(img)(_a##x,_p##y,z,v)), \
1124 - (I##ac=(img)(_a##x, y,z,v)), \
1125 - (I##an=(img)(_a##x,_n##y,z,v)), \
1126 - (I##aa=(img)(_a##x,_a##y,z,v)), \
1127 - 1)) || _n##x==--_a##x || x==(_a##x=--_n##x); \
1128 - I##pp=I##cp, I##pc=I##cc, I##pn=I##cn, I##pa=I##ca, \
1129 - I##cp=I##np, I##cc=I##nc, I##cn=I##nn, I##ca=I##na, \
1130 - I##np=I##ap, I##nc=I##ac, I##nn=I##an, I##na=I##aa, \
1131 - _p##x=x++, _n##x++, _a##x++ )
1132 -
1133 -#define cimg_for5x5(img,x,y,z,v,I) cimg_for5Y(img,y) \
1134 - for (int _a##x=2, _n##x=1, _b##x=(int)((I##cb=I##pb=I##bb=(img)(0,_b##y,z,v)), \
1135 - (I##cp=I##pp=I##bp=(img)(0,_p##y,z,v)), \
1136 - (I##cc=I##pc=I##bc=(img)(0, y,z,v)), \
1137 - (I##cn=I##pn=I##bn=(img)(0,_n##y,z,v)), \
1138 - (I##ca=I##pa=I##ba=(img)(0,_a##y,z,v)), \
1139 - (I##nb=(img)(_n##x,_b##y,z,v)), \
1140 - (I##np=(img)(_n##x,_p##y,z,v)), \
1141 - (I##nc=(img)(_n##x, y,z,v)), \
1142 - (I##nn=(img)(_n##x,_n##y,z,v)), \
1143 - (I##na=(img)(_n##x,_a##y,z,v))), \
1144 - x=0, _p##x=_b##x=0; \
1145 - (_a##x<(int)((img).width) && ((I##ab=(img)(_a##x,_b##y,z,v)), \
1146 - (I##ap=(img)(_a##x,_p##y,z,v)), \
1147 - (I##ac=(img)(_a##x, y,z,v)), \
1148 - (I##an=(img)(_a##x,_n##y,z,v)), \
1149 - (I##aa=(img)(_a##x,_a##y,z,v)), \
1150 - 1)) || _n##x==--_a##x || x==(_a##x=--_n##x); \
1151 - I##bb=I##pb, I##bp=I##pp, I##bc=I##pc, I##bn=I##pn, I##ba=I##pa, \
1152 - I##pb=I##cb, I##pp=I##cp, I##pc=I##cc, I##pn=I##cn, I##pa=I##ca, \
1153 - I##cb=I##nb, I##cp=I##np, I##cc=I##nc, I##cn=I##nn, I##ca=I##na, \
1154 - I##nb=I##ab, I##np=I##ap, I##nc=I##ac, I##nn=I##an, I##na=I##aa, \
1155 - _b##x=_p##x, _p##x=x++, _n##x++, _a##x++ )
1156 -
1157 -#define cimg_for2x2x2(img,x,y,z,v,I) cimg_for2YZ(img,y,z) \
1158 - for (int _n##x=1, x=(int)((I##ccc=(img)(0, y, z,v)), \
1159 - (I##cnc=(img)(0,_n##y, z,v)), \
1160 - (I##ccn=(img)(0, y,_n##z,v)), \
1161 - (I##cnn=(img)(0,_n##y,_n##z,v)), \
1162 - 0); \
1163 - (_n##x<(int)((img).width) && ((I##ncc=(img)(_n##x, y, z,v)), \
1164 - (I##nnc=(img)(_n##x,_n##y, z,v)), \
1165 - (I##ncn=(img)(_n##x, y,_n##z,v)), \
1166 - (I##nnn=(img)(_n##x,_n##y,_n##z,v)), \
1167 - 1)) || x==--_n##x; \
1168 - I##ccc=I##ncc, I##cnc=I##nnc, \
1169 - I##ccn=I##ncn, I##cnn=I##nnn, \
1170 - x++, _n##x++ )
1171 -
1172 -#define cimg_for3x3x3(img,x,y,z,v,I) cimg_for3YZ(img,y,z) \
1173 - for (int _n##x=1, _p##x=(int)((I##cpp=I##ppp=(img)(0,_p##y,_p##z,v)), \
1174 - (I##ccp=I##pcp=(img)(0, y,_p##z,v)), \
1175 - (I##cnp=I##pnp=(img)(0,_n##y,_p##z,v)), \
1176 - (I##cpc=I##ppc=(img)(0,_p##y, z,v)), \
1177 - (I##ccc=I##pcc=(img)(0, y, z,v)), \
1178 - (I##cnc=I##pnc=(img)(0,_n##y, z,v)), \
1179 - (I##cpn=I##ppn=(img)(0,_p##y,_n##z,v)), \
1180 - (I##ccn=I##pcn=(img)(0, y,_n##z,v)), \
1181 - (I##cnn=I##pnn=(img)(0,_n##y,_n##z,v))),\
1182 - x=_p##x=0; \
1183 - (_n##x<(int)((img).width) && ((I##npp=(img)(_n##x,_p##y,_p##z,v)), \
1184 - (I##ncp=(img)(_n##x, y,_p##z,v)), \
1185 - (I##nnp=(img)(_n##x,_n##y,_p##z,v)), \
1186 - (I##npc=(img)(_n##x,_p##y, z,v)), \
1187 - (I##ncc=(img)(_n##x, y, z,v)), \
1188 - (I##nnc=(img)(_n##x,_n##y, z,v)), \
1189 - (I##npn=(img)(_n##x,_p##y,_n##z,v)), \
1190 - (I##ncn=(img)(_n##x, y,_n##z,v)), \
1191 - (I##nnn=(img)(_n##x,_n##y,_n##z,v)), \
1192 - 1)) || x==--_n##x; \
1193 - I##ppp=I##cpp, I##pcp=I##ccp, I##pnp=I##cnp, \
1194 - I##cpp=I##npp, I##ccp=I##ncp, I##cnp=I##nnp, \
1195 - I##ppc=I##cpc, I##pcc=I##ccc, I##pnc=I##cnc, \
1196 - I##cpc=I##npc, I##ccc=I##ncc, I##cnc=I##nnc, \
1197 - I##ppn=I##cpn, I##pcn=I##ccn, I##pnn=I##cnn, \
1198 - I##cpn=I##npn, I##ccn=I##ncn, I##cnn=I##nnn, \
1199 - _p##x=x++, _n##x++ )
1200 -
1201 -/*
1202 - #------------------------------------------------
1203 - #
1204 - #
1205 - # Definition of the cimg_library:: namespace
1206 - #
1207 - #
1208 - #------------------------------------------------
1209 - */
1210 -
1211 -//! Namespace that encompasses all classes and functions of the %CImg library.
1212 -/**
1213 - This namespace is defined to avoid class names collisions that could happen
1214 - with the include of other C++ header files. Anyway, it should not happen
1215 - very often and you may start most of your programs with
1216 - \code
1217 - #include "CImg.h"
1218 - using namespace cimg_library;
1219 - \endcode
1220 - to simplify the declaration of %CImg Library objects variables afterwards.
1221 -**/
1222 -
1223 -namespace cimg_library {
1224 -
1225 - // Define the CImg classes.
1226 - template<typename T=float> struct CImg;
1227 - template<typename T=float> struct CImgList;
1228 - struct CImgStats;
1229 - struct CImgDisplay;
1230 - struct CImgException;
1231 -
1232 - namespace cimg {
1233 -
1234 - // The bodies of the functions below are defined afterwards
1235 - inline void info();
1236 -
1237 - inline unsigned int& exception_mode();
1238 -
1239 - inline int dialog(const char *title,const char *msg,const char *button1_txt="OK",
1240 - const char *button2_txt=0,const char *button3_txt=0,
1241 - const char *button4_txt=0,const char *button5_txt=0,
1242 - const char *button6_txt=0,const bool centering = false);
1243 -
1244 - template<typename tfunc, typename tp, typename tf>
1245 - inline void marching_cubes(const tfunc& func, const float isovalue,
1246 - const float x0,const float y0,const float z0,
1247 - const float x1,const float y1,const float z1,
1248 - const float resx,const float resy,const float resz,
1249 - CImgList<tp>& points, CImgList<tf>& primitives,
1250 - const bool invert_faces = false);
1251 -
1252 - template<typename tfunc, typename tp, typename tf>
1253 - inline void marching_squares(const tfunc& func, const float isovalue,
1254 - const float x0,const float y0,
1255 - const float x1,const float y1,
1256 - const float resx,const float resy,
1257 - CImgList<tp>& points, CImgList<tf>& primitives);
1258 - }
1259 -
1260 - /*
1261 - #----------------------------------------------
1262 - #
1263 - #
1264 - # Definition of the CImgException structures
1265 - #
1266 - #
1267 - #----------------------------------------------
1268 - */
1269 -
1270 - // Never use the following macro in your own code !
1271 -#define cimg_exception_err(etype,disp_flag) \
1272 - if (cimg::exception_mode()>=1) { \
1273 - std::va_list ap; \
1274 - va_start(ap,format); \
1275 - std::vsprintf(message,format,ap); \
1276 - va_end(ap); \
1277 - if (cimg::exception_mode()>=2 && disp_flag) { \
1278 - try { cimg::dialog(etype,message,"Abort"); } \
1279 - catch (CImgException&) { std::fprintf(stderr,"\n# %s :\n%s\n\n",etype,message); } \
1280 - } else std::fprintf(stderr,"\n# %s :\n%s\n\n",etype,message); \
1281 - } \
1282 - if (cimg::exception_mode()>=3) cimg_library::cimg::info(); \
1283 -
1284 - //! Class which is thrown when an error occured during a %CImg library function call.
1285 - /**
1286 -
1287 - \section ex1 Overview
1288 -
1289 - CImgException is the base class of %CImg exceptions.
1290 - Exceptions are thrown by the %CImg Library when an error occured in a %CImg library function call.
1291 - CImgException is seldom thrown itself. Children classes that specify the kind of error encountered
1292 - are generally used instead. These sub-classes are :
1293 -
1294 - - \b CImgInstanceException : Thrown when the instance associated to the called %CImg function is not
1295 - correctly defined. Generally, this exception is thrown when one tries to process \a empty images. The example
1296 - below will throw a \a CImgInstanceException.
1297 - \code
1298 - CImg<float> img; // Construct an empty image.
1299 - img.blur(10); // Try to blur the image.
1300 - \endcode
1301 -
1302 - - \b CImgArgumentException : Thrown when one of the arguments given to the called %CImg function is not correct.
1303 - Generally, this exception is thrown when arguments passed to the function are outside an admissible range of values.
1304 - The example below will throw a \a CImgArgumentException.
1305 - \code
1306 - CImg<float> img(100,100,1,3); // Define a 100x100 color image with float pixels.
1307 - img = 0; // Try to fill pixels from the 0 pointer (invalid argument to operator=() ).
1308 - \endcode
1309 -
1310 - - \b CImgIOException : Thrown when an error occured when trying to load or save image files.
1311 - The example below will throw a \a CImgIOException.
1312 - \code
1313 - CImg<float> img("file_doesnt_exist.jpg"); // Try to load a file that doesn't exist.
1314 - \endcode
1315 -
1316 - - \b CImgDisplayException : Thrown when an error occured when trying to display an image in a window.
1317 - This exception is thrown when image display request cannot be satisfied.
1318 -
1319 - The parent class CImgException may be thrown itself when errors that cannot be classified in one of
1320 - the above type occur. It is recommended not to throw CImgExceptions yourself, since there are normally
1321 - reserved to %CImg Library functions.
1322 - \b CImgInstanceException, \b CImgArgumentException, \b CImgIOException and \b CImgDisplayException are simple
1323 - subclasses of CImgException and are thus not detailled more in this reference documentation.
1324 -
1325 - \section ex2 Exception handling
1326 -
1327 - When an error occurs, the %CImg Library first displays the error in a modal window.
1328 - Then, it throws an instance of the corresponding exception class, generally leading the program to stop
1329 - (this is the default behavior).
1330 - You can bypass this default behavior by handling the exceptions yourself,
1331 - using a code block <tt>try { ... } catch() { ... }</tt>.
1332 - In this case, you can avoid the apparition of the modal window, by
1333 - defining the environment variable <tt>cimg_debug</tt> to 0 before including the %CImg header file.
1334 - The example below shows how to cleanly handle %CImg Library exceptions :
1335 - \code
1336 - #define cimg_debug 0 // Disable modal window in CImg exceptions.
1337 - #define "CImg.h"
1338 - int main() {
1339 - try {
1340 - ...; // Here, do what you want.
1341 - }
1342 - catch (CImgInstanceException &e) {
1343 - std::fprintf(stderr,"CImg Library Error : %s",e.message); // Display your own error message
1344 - ... // Do what you want now.
1345 - }
1346 - }
1347 - \endcode
1348 - **/
1349 - struct CImgException {
1350 - char message[1024]; //!< Message associated with the error that thrown the exception.
1351 - CImgException() { message[0]='\0'; }
1352 - CImgException(const char *format,...) { cimg_exception_err("CImgException",true); }
1353 - };
1354 -
1355 - // The \ref CImgInstanceException class is used to throw an exception related
1356 - // to a non suitable instance encountered in a library function call.
1357 - struct CImgInstanceException : CImgException {
1358 - CImgInstanceException(const char *format,...) { cimg_exception_err("CImgInstanceException",true); }
1359 - };
1360 -
1361 - // The \ref CImgArgumentException class is used to throw an exception related
1362 - // to invalid arguments encountered in a library function call.
1363 - struct CImgArgumentException : CImgException {
1364 - CImgArgumentException(const char *format,...) { cimg_exception_err("CImgArgumentException",true); }
1365 - };
1366 -
1367 - // The \ref CImgIOException class is used to throw an exception related
1368 - // to Input/Output file problems encountered in a library function call.
1369 - struct CImgIOException : CImgException {
1370 - CImgIOException(const char *format,...) { cimg_exception_err("CImgIOException",true); }
1371 - };
1372 -
1373 - // The CImgDisplayException class is used to throw an exception related to display problems
1374 - // encountered in a library function call.
1375 - struct CImgDisplayException : CImgException {
1376 - CImgDisplayException(const char *format,...) { cimg_exception_err("CImgDisplayException",false); }
1377 - };
1378 -
1379 - /*
1380 - #-------------------------------------
1381 - #
1382 - #
1383 - # Definition of the namespace 'cimg'
1384 - #
1385 - #
1386 - #-------------------------------------
1387 - */
1388 -
1389 - //! Namespace that encompasses \a low-level functions and variables of the %CImg Library.
1390 - /**
1391 - Most of the functions and variables within this namespace are used by the library for low-level processing.
1392 - Nevertheless, documented variables and functions of this namespace may be used safely in your own source code.
1393 -
1394 - \warning Never write <tt>using namespace cimg_library::cimg;</tt> in your source code, since a lot of functions of the
1395 - <tt>cimg::</tt> namespace have prototypes similar to standard C functions defined in the global namespace <tt>::</tt>.
1396 - **/
1397 - namespace cimg {
1398 -
1399 - // Define the trait that will be used to determine the best data type to work with.
1400 - // Considered types are : bool, uchar, char, short, ushort, int, uint, long, ulong, float and double.
1401 - // Two rules applies there :
1402 - // - largest of two integer types is an integer type.
1403 - // - largest of integer/float type is a float type.
1404 - template<typename T,typename t> struct largest { typedef t type; };
1405 - template<> struct largest<unsigned char,bool> { typedef unsigned char type; };
1406 - template<> struct largest<unsigned char,char> { typedef short type; };
1407 - template<> struct largest<char,bool> { typedef char type; };
1408 - template<> struct largest<char,unsigned char> { typedef short type; };
1409 - template<> struct largest<char,unsigned short> { typedef int type; };
1410 - template<> struct largest<char,unsigned int> { typedef unsigned int type; };
1411 - template<> struct largest<char,unsigned long> { typedef unsigned long type; };
1412 - template<> struct largest<unsigned short,bool> { typedef unsigned short type; };
1413 - template<> struct largest<unsigned short,unsigned char> { typedef unsigned short type; };
1414 - template<> struct largest<unsigned short,char> { typedef int type; };
1415 - template<> struct largest<unsigned short,short> { typedef int type; };
1416 - template<> struct largest<short,bool> { typedef short type; };
1417 - template<> struct largest<short,unsigned char> { typedef short type; };
1418 - template<> struct largest<short,char> { typedef short type; };
1419 - template<> struct largest<short,unsigned short> { typedef int type; };
1420 - template<> struct largest<short,unsigned int> { typedef unsigned int type; };
1421 - template<> struct largest<short,unsigned long> { typedef unsigned long type; };
1422 - template<> struct largest<unsigned int,bool> { typedef unsigned int type; };
1423 - template<> struct largest<unsigned int,unsigned char> { typedef unsigned int type; };
1424 - template<> struct largest<unsigned int,char> { typedef unsigned int type; };
1425 - template<> struct largest<unsigned int,unsigned short> { typedef unsigned int type; };
1426 - template<> struct largest<unsigned int,short> { typedef unsigned int type; };
1427 - template<> struct largest<unsigned int,int> { typedef unsigned int type; };
1428 - template<> struct largest<int,bool> { typedef int type; };
1429 - template<> struct largest<int,unsigned char> { typedef int type; };
1430 - template<> struct largest<int,char> { typedef int type; };
1431 - template<> struct largest<int,unsigned short> { typedef int type; };
1432 - template<> struct largest<int,short> { typedef int type; };
1433 - template<> struct largest<int,unsigned int> { typedef unsigned int type; };
1434 - template<> struct largest<int,unsigned long> { typedef unsigned long type; };
1435 - template<> struct largest<float,bool> { typedef float type; };
1436 - template<> struct largest<float,unsigned char> { typedef float type; };
1437 - template<> struct largest<float,char> { typedef float type; };
1438 - template<> struct largest<float,unsigned short> { typedef float type; };
1439 - template<> struct largest<float,short> { typedef float type; };
1440 - template<> struct largest<float,unsigned int> { typedef float type; };
1441 - template<> struct largest<float,int> { typedef float type; };
1442 - template<> struct largest<float,unsigned long> { typedef float type; };
1443 - template<> struct largest<float,long> { typedef float type; };
1444 - template<> struct largest<double,bool> { typedef double type; };
1445 - template<> struct largest<double,unsigned char> { typedef double type; };
1446 - template<> struct largest<double,char> { typedef double type; };
1447 - template<> struct largest<double,unsigned short> { typedef double type; };
1448 - template<> struct largest<double,short> { typedef double type; };
1449 - template<> struct largest<double,unsigned int> { typedef double type; };
1450 - template<> struct largest<double,int> { typedef double type; };
1451 - template<> struct largest<double,unsigned long> { typedef double type; };
1452 - template<> struct largest<double,long> { typedef double type; };
1453 - template<> struct largest<double,float> { typedef double type; };
1454 -
1455 - template<typename T> struct type {
1456 - static T min() { return (T)-1>0?(T)0:(T)-1<<(8*sizeof(T)-1); }
1457 - static T max() { return (T)-1>0?(T)-1:~((T)-1<<(8*sizeof(T)-1)); }
1458 - static bool is_float() { return false; }
1459 - static const char* id() { static const char *const s = "unknown"; return s; }
1460 - };
1461 - template<> struct type<bool> {
1462 - static bool min() { return false; }
1463 - static bool max() { return true; }
1464 - static bool is_float() { return false; }
1465 - static const char* id() { static const char *const s = "bool"; return s; }
1466 - };
1467 - template<> struct type<unsigned char> {
1468 - static unsigned char min() { return 0; }
1469 - static unsigned char max() { return (unsigned char)~0U; }
1470 - static bool is_float() { return false; }
1471 - static const char* id() { static const char *const s = "unsigned char"; return s; }
1472 - };
1473 - template<> struct type<char> {
1474 - static char min() { return (char)-1<<(8*sizeof(char)-1); }
1475 - static char max() { return ~((char)-1<<(8*sizeof(char)-1)); }
1476 - static bool is_float() { return false; }
1477 - static const char* id() { static const char *const s = "char"; return s; }
1478 - };
1479 - template<> struct type<unsigned short> {
1480 - static unsigned short min() { return 0; }
1481 - static unsigned short max() { return (unsigned short)~0U; }
1482 - static bool is_float() { return false; }
1483 - static const char* id() { static const char *const s = "unsigned short"; return s; }
1484 - };
1485 - template<> struct type<short> {
1486 - static short min() { return (short)-1<<(8*sizeof(short)-1); }
1487 - static short max() { return ~((short)-1<<(8*sizeof(short)-1)); }
1488 - static bool is_float() { return false; }
1489 - static const char* id() { static const char *const s = "short"; return s; }
1490 - };
1491 - template<> struct type<unsigned int> {
1492 - static unsigned int min() { return 0; }
1493 - static unsigned int max() { return (unsigned int)~0U; }
1494 - static bool is_float() { return false; }
1495 - static const char* id() { static const char *const s = "unsigned int"; return s; }
1496 - };
1497 - template<> struct type<int> {
1498 - static int min() { return (int)-1<<(8*sizeof(int)-1); }
1499 - static int max() { return ~((int)-1<<(8*sizeof(int)-1)); }
1500 - static bool is_float() { return false; }
1501 - static const char* id() { static const char *const s = "int"; return s; }
1502 - };
1503 - template<> struct type<unsigned long> {
1504 - static unsigned long min() { return 0; }
1505 - static unsigned long max() { return (unsigned long)~0UL; }
1506 - static bool is_float() { return false; }
1507 - static const char* id() { static const char *const s = "unsigned long"; return s; }
1508 - };
1509 - template<> struct type<long> {
1510 - static long min() { return (long)-1<<(8*sizeof(long)-1); }
1511 - static long max() { return ~((long)-1<<(8*sizeof(long)-1)); }
1512 - static bool is_float() { return false; }
1513 - static const char* id() { static const char *const s = "long"; return s; }
1514 - };
1515 - template<> struct type<float> {
1516 - static float min() { return -3.4E38f; }
1517 - static float max() { return 3.4E38f; }
1518 - static bool is_float() { return true; }
1519 - static const char* id() { static const char *const s = "float"; return s; }
1520 - };
1521 - template<> struct type<double> {
1522 - static double min() { return -1.7E308; }
1523 - static double max() { return 1.7E308; }
1524 - static bool is_float() { return true; }
1525 - static const char* id() { static const char *const s = "double"; return s; }
1526 - };
1527 -
1528 - // Define internal library variables.
1529 -#if cimg_display_type==1
1530 - struct X11info {
1531 - volatile unsigned int nb_wins;
1532 - pthread_mutex_t* mutex;
1533 - pthread_t* event_thread;
1534 - CImgDisplay* wins[1024];
1535 - Display* display;
1536 - unsigned int nb_bits;
1537 - GC* gc;
1538 - bool blue_first;
1539 - bool byte_order;
1540 - bool shm_enabled;
1541 -#ifdef cimg_use_xrandr
1542 - XRRScreenSize *resolutions;
1543 - Rotation curr_rotation;
1544 - unsigned int curr_resolution;
1545 - unsigned int nb_resolutions;
1546 -#endif
1547 - X11info():nb_wins(0),mutex(0),event_thread(0),display(0),
1548 - nb_bits(0),gc(0),blue_first(false),byte_order(false),shm_enabled(false) {
1549 -#ifdef cimg_use_xrandr
1550 - resolutions = 0;
1551 - curr_rotation = 0;
1552 - curr_resolution = nb_resolutions = 0;
1553 -#endif
1554 - }
1555 - };
1556 -#if defined(cimg_module)
1557 - X11info& X11attr();
1558 -#elif defined(cimg_main)
1559 - X11info& X11attr() { static X11info val; return val; }
1560 -#else
1561 - inline X11info& X11attr() { static X11info val; return val; }
1562 -#endif
1563 -
1564 -#elif cimg_display_type==2
1565 - struct Win32info {
1566 - HANDLE wait_event;
1567 - Win32info() { wait_event = CreateEvent(0,FALSE,FALSE,0); }
1568 - };
1569 -#if defined(cimg_module)
1570 - Win32info& Win32attr();
1571 -#elif defined(cimg_main)
1572 - Win32info& Win32attr() { static Win32info val; return val; }
1573 -#else
1574 - inline Win32info& Win32attr() { static Win32info val; return val; }
1575 -#endif
1576 -#endif
1577 -
1578 - inline unsigned int& exception_mode() { static unsigned int mode=cimg_debug; return mode; }
1579 -
1580 -#ifdef cimg_color_terminal
1581 - const char t_normal[9] = {0x1b,'[','0',';','0',';','0','m','\0'};
1582 - const char t_red[11] = {0x1b,'[','4',';','3','1',';','5','9','m','\0'};
1583 - const char t_bold[5] = {0x1b,'[','1','m','\0'};
1584 - const char t_purple[11] = {0x1b,'[','0',';','3','5',';','5','9','m','\0'};
1585 -#else
1586 - const char t_normal[1] = {'\0'};
1587 - const char *const t_red = cimg::t_normal, *const t_bold = cimg::t_normal, *const t_purple = cimg::t_normal;
1588 -#endif
1589 -
1590 -#if cimg_display_type==1
1591 - // Keycodes for X11-based graphical systems
1592 - const unsigned int keyESC = XK_Escape;
1593 - const unsigned int keyF1 = XK_F1;
1594 - const unsigned int keyF2 = XK_F2;
1595 - const unsigned int keyF3 = XK_F3;
1596 - const unsigned int keyF4 = XK_F4;
1597 - const unsigned int keyF5 = XK_F5;
1598 - const unsigned int keyF6 = XK_F6;
1599 - const unsigned int keyF7 = XK_F7;
1600 - const unsigned int keyF8 = XK_F8;
1601 - const unsigned int keyF9 = XK_F9;
1602 - const unsigned int keyF10 = XK_F10;
1603 - const unsigned int keyF11 = XK_F11;
1604 - const unsigned int keyF12 = XK_F12;
1605 - const unsigned int keyPAUSE = XK_Pause;
1606 - const unsigned int key1 = XK_1;
1607 - const unsigned int key2 = XK_2;
1608 - const unsigned int key3 = XK_3;
1609 - const unsigned int key4 = XK_4;
1610 - const unsigned int key5 = XK_5;
1611 - const unsigned int key6 = XK_6;
1612 - const unsigned int key7 = XK_7;
1613 - const unsigned int key8 = XK_8;
1614 - const unsigned int key9 = XK_9;
1615 - const unsigned int key0 = XK_0;
1616 - const unsigned int keyBACKSPACE = XK_BackSpace;
1617 - const unsigned int keyINSERT = XK_Insert;
1618 - const unsigned int keyHOME = XK_Home;
1619 - const unsigned int keyPAGEUP = XK_Page_Up;
1620 - const unsigned int keyTAB = XK_Tab;
1621 - const unsigned int keyQ = XK_q;
1622 - const unsigned int keyW = XK_w;
1623 - const unsigned int keyE = XK_e;
1624 - const unsigned int keyR = XK_r;
1625 - const unsigned int keyT = XK_t;
1626 - const unsigned int keyY = XK_y;
1627 - const unsigned int keyU = XK_u;
1628 - const unsigned int keyI = XK_i;
1629 - const unsigned int keyO = XK_o;
1630 - const unsigned int keyP = XK_p;
1631 - const unsigned int keyDELETE = XK_Delete;
1632 - const unsigned int keyEND = XK_End;
1633 - const unsigned int keyPAGEDOWN = XK_Page_Down;
1634 - const unsigned int keyCAPSLOCK = XK_Caps_Lock;
1635 - const unsigned int keyA = XK_a;
1636 - const unsigned int keyS = XK_s;
1637 - const unsigned int keyD = XK_d;
1638 - const unsigned int keyF = XK_f;
1639 - const unsigned int keyG = XK_g;
1640 - const unsigned int keyH = XK_h;
1641 - const unsigned int keyJ = XK_j;
1642 - const unsigned int keyK = XK_k;
1643 - const unsigned int keyL = XK_l;
1644 - const unsigned int keyENTER = XK_Return;
1645 - const unsigned int keySHIFTLEFT = XK_Shift_L;
1646 - const unsigned int keyZ = XK_z;
1647 - const unsigned int keyX = XK_x;
1648 - const unsigned int keyC = XK_c;
1649 - const unsigned int keyV = XK_v;
1650 - const unsigned int keyB = XK_b;
1651 - const unsigned int keyN = XK_n;
1652 - const unsigned int keyM = XK_m;
1653 - const unsigned int keySHIFTRIGHT = XK_Shift_R;
1654 - const unsigned int keyARROWUP = XK_Up;
1655 - const unsigned int keyCTRLLEFT = XK_Control_L;
1656 - const unsigned int keyAPPLEFT = XK_Super_L;
1657 - const unsigned int keySPACE = XK_space;
1658 - const unsigned int keyALTGR = XK_Alt_R;
1659 - const unsigned int keyAPPRIGHT = XK_Super_R;
1660 - const unsigned int keyMENU = XK_Menu;
1661 - const unsigned int keyCTRLRIGHT = XK_Control_R;
1662 - const unsigned int keyARROWLEFT = XK_Left;
1663 - const unsigned int keyARROWDOWN = XK_Down;
1664 - const unsigned int keyARROWRIGHT = XK_Right;
1665 - const unsigned int keyPAD0 = XK_KP_0;
1666 - const unsigned int keyPAD1 = XK_KP_1;
1667 - const unsigned int keyPAD2 = XK_KP_2;
1668 - const unsigned int keyPAD3 = XK_KP_3;
1669 - const unsigned int keyPAD4 = XK_KP_4;
1670 - const unsigned int keyPAD5 = XK_KP_5;
1671 - const unsigned int keyPAD6 = XK_KP_6;
1672 - const unsigned int keyPAD7 = XK_KP_7;
1673 - const unsigned int keyPAD8 = XK_KP_8;
1674 - const unsigned int keyPAD9 = XK_KP_9;
1675 - const unsigned int keyPADADD = XK_KP_Add;
1676 - const unsigned int keyPADSUB = XK_KP_Subtract;
1677 - const unsigned int keyPADMUL = XK_KP_Multiply;
1678 - const unsigned int keyPADDIV = XK_KP_Divide;
1679 -
1680 -#elif (cimg_display_type==2 && cimg_OS==2)
1681 - // Keycodes for Windows-OS
1682 - const unsigned int keyESC = VK_ESCAPE;
1683 - const unsigned int keyF1 = VK_F1;
1684 - const unsigned int keyF2 = VK_F2;
1685 - const unsigned int keyF3 = VK_F3;
1686 - const unsigned int keyF4 = VK_F4;
1687 - const unsigned int keyF5 = VK_F5;
1688 - const unsigned int keyF6 = VK_F6;
1689 - const unsigned int keyF7 = VK_F7;
1690 - const unsigned int keyF8 = VK_F8;
1691 - const unsigned int keyF9 = VK_F9;
1692 - const unsigned int keyF10 = VK_F10;
1693 - const unsigned int keyF11 = VK_F11;
1694 - const unsigned int keyF12 = VK_F12;
1695 - const unsigned int keyPAUSE = VK_PAUSE;
1696 - const unsigned int key1 = '1';
1697 - const unsigned int key2 = '2';
1698 - const unsigned int key3 = '3';
1699 - const unsigned int key4 = '4';
1700 - const unsigned int key5 = '5';
1701 - const unsigned int key6 = '6';
1702 - const unsigned int key7 = '7';
1703 - const unsigned int key8 = '8';
1704 - const unsigned int key9 = '9';
1705 - const unsigned int key0 = '0';
1706 - const unsigned int keyBACKSPACE = VK_BACK;
1707 - const unsigned int keyINSERT = VK_INSERT;
1708 - const unsigned int keyHOME = VK_HOME;
1709 - const unsigned int keyPAGEUP = VK_PRIOR;
1710 - const unsigned int keyTAB = VK_TAB;
1711 - const unsigned int keyQ = 'Q';
1712 - const unsigned int keyW = 'W';
1713 - const unsigned int keyE = 'E';
1714 - const unsigned int keyR = 'R';
1715 - const unsigned int keyT = 'T';
1716 - const unsigned int keyY = 'Y';
1717 - const unsigned int keyU = 'U';
1718 - const unsigned int keyI = 'I';
1719 - const unsigned int keyO = 'O';
1720 - const unsigned int keyP = 'P';
1721 - const unsigned int keyDELETE = VK_DELETE;
1722 - const unsigned int keyEND = VK_END;
1723 - const unsigned int keyPAGEDOWN = VK_NEXT;
1724 - const unsigned int keyCAPSLOCK = VK_CAPITAL;
1725 - const unsigned int keyA = 'A';
1726 - const unsigned int keyS = 'S';
1727 - const unsigned int keyD = 'D';
1728 - const unsigned int keyF = 'F';
1729 - const unsigned int keyG = 'G';
1730 - const unsigned int keyH = 'H';
1731 - const unsigned int keyJ = 'J';
1732 - const unsigned int keyK = 'K';
1733 - const unsigned int keyL = 'L';
1734 - const unsigned int keyENTER = VK_RETURN;
1735 - const unsigned int keySHIFTLEFT = VK_SHIFT;
1736 - const unsigned int keyZ = 'Z';
1737 - const unsigned int keyX = 'X';
1738 - const unsigned int keyC = 'C';
1739 - const unsigned int keyV = 'V';
1740 - const unsigned int keyB = 'B';
1741 - const unsigned int keyN = 'N';
1742 - const unsigned int keyM = 'M';
1743 - const unsigned int keySHIFTRIGHT = VK_SHIFT;
1744 - const unsigned int keyARROWUP = VK_UP;
1745 - const unsigned int keyCTRLLEFT = VK_CONTROL;
1746 - const unsigned int keyAPPLEFT = VK_LWIN;
1747 - const unsigned int keySPACE = VK_SPACE;
1748 - const unsigned int keyALTGR = VK_CONTROL;
1749 - const unsigned int keyAPPRIGHT = VK_RWIN;
1750 - const unsigned int keyMENU = VK_APPS;
1751 - const unsigned int keyCTRLRIGHT = VK_CONTROL;
1752 - const unsigned int keyARROWLEFT = VK_LEFT;
1753 - const unsigned int keyARROWDOWN = VK_DOWN;
1754 - const unsigned int keyARROWRIGHT = VK_RIGHT;
1755 - const unsigned int keyPAD0 = 0x60;
1756 - const unsigned int keyPAD1 = 0x61;
1757 - const unsigned int keyPAD2 = 0x62;
1758 - const unsigned int keyPAD3 = 0x63;
1759 - const unsigned int keyPAD4 = 0x64;
1760 - const unsigned int keyPAD5 = 0x65;
1761 - const unsigned int keyPAD6 = 0x66;
1762 - const unsigned int keyPAD7 = 0x67;
1763 - const unsigned int keyPAD8 = 0x68;
1764 - const unsigned int keyPAD9 = 0x69;
1765 - const unsigned int keyPADADD = VK_ADD;
1766 - const unsigned int keyPADSUB = VK_SUBTRACT;
1767 - const unsigned int keyPADMUL = VK_MULTIPLY;
1768 - const unsigned int keyPADDIV = VK_DIVIDE;
1769 -#else
1770 - // Define unknow keycodes when no display
1771 - const unsigned int keyESC = 1U;
1772 - const unsigned int keyF1 = 2U;
1773 - const unsigned int keyF2 = 3U;
1774 - const unsigned int keyF3 = 4U;
1775 - const unsigned int keyF4 = 5U;
1776 - const unsigned int keyF5 = 6U;
1777 - const unsigned int keyF6 = 7U;
1778 - const unsigned int keyF7 = 8U;
1779 - const unsigned int keyF8 = 9U;
1780 - const unsigned int keyF9 = 10U;
1781 - const unsigned int keyF10 = 11U;
1782 - const unsigned int keyF11 = 12U;
1783 - const unsigned int keyF12 = 13U;
1784 - const unsigned int keyPAUSE = 14U;
1785 - const unsigned int key1 = 15U;
1786 - const unsigned int key2 = 16U;
1787 - const unsigned int key3 = 17U;
1788 - const unsigned int key4 = 18U;
1789 - const unsigned int key5 = 19U;
1790 - const unsigned int key6 = 20U;
1791 - const unsigned int key7 = 21U;
1792 - const unsigned int key8 = 22U;
1793 - const unsigned int key9 = 23U;
1794 - const unsigned int key0 = 24U;
1795 - const unsigned int keyBACKSPACE = 25U;
1796 - const unsigned int keyINSERT = 26U;
1797 - const unsigned int keyHOME = 27U;
1798 - const unsigned int keyPAGEUP = 28U;
1799 - const unsigned int keyTAB = 29U;
1800 - const unsigned int keyQ = 30U;
1801 - const unsigned int keyW = 31U;
1802 - const unsigned int keyE = 32U;
1803 - const unsigned int keyR = 33U;
1804 - const unsigned int keyT = 34U;
1805 - const unsigned int keyY = 35U;
1806 - const unsigned int keyU = 36U;
1807 - const unsigned int keyI = 37U;
1808 - const unsigned int keyO = 38U;
1809 - const unsigned int keyP = 39U;
1810 - const unsigned int keyDELETE = 40U;
1811 - const unsigned int keyEND = 41U;
1812 - const unsigned int keyPAGEDOWN = 42U;
1813 - const unsigned int keyCAPSLOCK = 43U;
1814 - const unsigned int keyA = 44U;
1815 - const unsigned int keyS = 45U;
1816 - const unsigned int keyD = 46U;
1817 - const unsigned int keyF = 47U;
1818 - const unsigned int keyG = 48U;
1819 - const unsigned int keyH = 49U;
1820 - const unsigned int keyJ = 50U;
1821 - const unsigned int keyK = 51U;
1822 - const unsigned int keyL = 52U;
1823 - const unsigned int keyENTER = 53U;
1824 - const unsigned int keySHIFTLEFT = 54U;
1825 - const unsigned int keyZ = 55U;
1826 - const unsigned int keyX = 56U;
1827 - const unsigned int keyC = 57U;
1828 - const unsigned int keyV = 58U;
1829 - const unsigned int keyB = 59U;
1830 - const unsigned int keyN = 60U;
1831 - const unsigned int keyM = 61U;
1832 - const unsigned int keySHIFTRIGHT = 62U;
1833 - const unsigned int keyARROWUP = 63U;
1834 - const unsigned int keyCTRLLEFT = 64U;
1835 - const unsigned int keyAPPLEFT = 65U;
1836 - const unsigned int keySPACE = 66U;
1837 - const unsigned int keyALTGR = 67U;
1838 - const unsigned int keyAPPRIGHT = 68U;
1839 - const unsigned int keyMENU = 69U;
1840 - const unsigned int keyCTRLRIGHT = 70U;
1841 - const unsigned int keyARROWLEFT = 71U;
1842 - const unsigned int keyARROWDOWN = 72U;
1843 - const unsigned int keyARROWRIGHT = 73U;
1844 - const unsigned int keyPAD0 = 74U;
1845 - const unsigned int keyPAD1 = 75U;
1846 - const unsigned int keyPAD2 = 76U;
1847 - const unsigned int keyPAD3 = 77U;
1848 - const unsigned int keyPAD4 = 78U;
1849 - const unsigned int keyPAD5 = 79U;
1850 - const unsigned int keyPAD6 = 80U;
1851 - const unsigned int keyPAD7 = 81U;
1852 - const unsigned int keyPAD8 = 82U;
1853 - const unsigned int keyPAD9 = 83U;
1854 - const unsigned int keyPADADD = 84U;
1855 - const unsigned int keyPADSUB = 85U;
1856 - const unsigned int keyPADMUL = 86U;
1857 - const unsigned int keyPADDIV = 87U;
1858 -#endif
1859 -
1860 -#ifdef PI
1861 -#undef PI
1862 -#endif
1863 - const double PI = 3.14159265358979323846; //!< Definition of the mathematical constant PI
1864 -
1865 - // Definition of a 7x11 font, used to return a default font for drawing text.
1866 - const unsigned int font7x11[7*11*256/32] = {
1867 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
1868 - 0x0,0x0,0x0,0x0,0x0,0x0,0x90,0x0,0x7f0000,0x40000,0x0,0x0,0x4010c0a4,0x82000040,0x11848402,0x18480050,0x80430292,0x8023,0x9008000,
1869 - 0x40218140,0x4000040,0x21800402,0x18000051,0x1060500,0x8083,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x24002,0x4031,0x80000000,0x10000,
1870 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x81c0400,0x40020000,0x80070080,0x40440e00,0x0,0x0,0x1,0x88180000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
1871 - 0x0,0x200000,0x0,0x0,0x80000,0x0,0x0,0x20212140,0x5000020,0x22400204,0x240000a0,0x40848500,0x4044,0x80010038,0x20424285,0xa000020,
1872 - 0x42428204,0x2428e0a0,0x82090a14,0x4104,0x85022014,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10240a7,0x88484040,0x40800000,0x270c3,0x87811e0e,
1873 - 0x7c70e000,0x78,0x3c23c1ef,0x1f3e1e89,0xf1c44819,0xa23cf0f3,0xc3cff120,0xc18307f4,0x4040400,0x20000,0x80080080,0x40200,0x0,
1874 - 0x40000,0x2,0x8040000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8188,0x50603800,0xf3c00000,0x1c004003,0xc700003e,0x18180,0xc993880,0x10204081,
1875 - 0x2071ef9,0xf3e7cf9f,0x3e7c7911,0xe3c78f1e,0x7d1224,0x48906048,0x0,0x4000000,0x0,0x9000,0x0,0x0,0x2000,0x0,0x0,0x0,0x0,0x0,0x0,
1876 - 0x0,0x10240aa,0x14944080,0x23610000,0x68940,0x40831010,0x8891306,0x802044,0x44522208,0x90202088,0x40448819,0xb242890a,0x24011111,
1877 - 0x49448814,0x4040a00,0xe2c3c7,0x8e3f3cb9,0xc1c44216,0xee38b0f2,0xe78f9120,0xc18507e2,0x8040000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
1878 - 0x101c207,0x88a04001,0x9c00000,0x2200a041,0x8200113a,0x8240,0x50a3110,0x2850a142,0x850c2081,0x2040204,0x8104592,0x142850a1,
1879 - 0x42cd1224,0x4888bc48,0x70e1c387,0xe3b3c70,0xe1c38e1c,0x38707171,0xc3870e1c,0x10791224,0x48906c41,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
1880 - 0x10003ee,0x15140080,0x21810000,0x48840,0x40851020,0x8911306,0x31fd804,0x9c522408,0x90204088,0x4045081a,0xba42890a,0x24011111,
1881 - 0x49285024,0x2041b00,0x132408,0x910844c8,0x4044821b,0x7244c913,0x24041111,0x49488822,0x8040000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
1882 - 0x28204,0x85006001,0x6a414000,0x3a004043,0xc700113a,0x8245,0x50a3a00,0x2850a142,0x850c4081,0x2040204,0x81045d2,0x142850a1,
1883 - 0x24951224,0x48852250,0x8102040,0x81054089,0x12244204,0x8108992,0x24489122,0x991224,0x4888b222,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
1884 - 0x1000143,0xa988080,0x2147c01f,0x88840,0x83091c2c,0x1070f000,0xc000608,0xa48bc408,0x9e3c46f8,0x40460816,0xaa42f10b,0xc3811111,
1885 - 0x35102044,0x1041100,0xf22408,0x9f084488,0x40470212,0x62448912,0x6041111,0x55308846,0x8061c80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
1886 - 0x1028704,0x8f805801,0x4be28fdf,0x220001f0,0x111a,0x60000182,0x82c5c710,0x44891224,0x489640f1,0xe3c78204,0x810e552,0x142850a1,
1887 - 0x18a51224,0x48822250,0x78f1e3c7,0x8f1f40f9,0xf3e7c204,0x8108912,0x24489122,0x7ea91224,0x4888a222,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
1888 - 0x10007e2,0x85648080,0x20010000,0x88841,0x8f8232,0x20881000,0xc1fc610,0xbefa2408,0x90204288,0x40450816,0xa642810a,0x4041110a,
1889 - 0x36282084,0x1042080,0x1122408,0x90084488,0x40450212,0x62448912,0x184110a,0x55305082,0x8042700,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
1890 - 0x1028207,0x82004801,0x68050040,0x1c000040,0x110a,0x60000001,0x45484d10,0x7cf9f3e7,0xcf944081,0x2040204,0x8104532,0x142850a1,
1891 - 0x18a51224,0x48822248,0x89122448,0x91244081,0x2040204,0x8108912,0x24489122,0xc91224,0x48852214,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x282,
1892 - 0x89630080,0x20010c00,0x30108842,0x810222,0x20882306,0x3001800,0x408a2208,0x90202288,0x40448814,0xa642810a,0x2041110a,0x26442104,
1893 - 0x840000,0x1122408,0x90084488,0x40448212,0x62448912,0x84130a,0x36485102,0x8040000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x101c208,0x4f802801,
1894 - 0x8028040,0x40,0x130a,0x2,0x85e897a0,0x44891224,0x489c2081,0x2040204,0x8104532,0x142850a1,0x24cd1224,0x48823c44,0x89122448,
1895 - 0x91244081,0x2040204,0x8108912,0x24489122,0xc93264,0xc9852214,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100028f,0x109f0080,0x20010c00,
1896 - 0x303071f3,0xc7011c1c,0x4071c306,0x802010,0x3907c1ef,0x1f201e89,0xf3844f90,0xa23c80f2,0x17810e04,0x228223f4,0x840000,0xfbc3c7,
1897 - 0x8f083c88,0x40444212,0x6238f0f2,0x7039d04,0x228423e2,0x8040000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1008780,0x2201800,0xf0014000,0x1f0,
1898 - 0x1d0a,0x5,0x851e140,0x83060c18,0x30671ef9,0xf3e7cf9f,0x3e7c7911,0xe3c78f1e,0x42f8e1c3,0x8702205c,0x7cf9f3e7,0xcf9b3c78,0xf1e3c204,
1899 - 0x8107111,0xc3870e1c,0x10f1d3a7,0x4e823c08,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x40,0x40000400,0x200000,0x0,0x2,0x0,0x0,0x0,0x0,0x18,
1900 - 0x0,0x4,0x44007f,0x0,0x400,0x400000,0x8010,0x0,0x6002,0x8040000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x200800,0x0,0x0,0x100a,
1901 - 0x400000,0x44,0x0,0x400,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x0,0x0,0x0,0x0,0x62018,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x31,0x80000800,
1902 - 0x400000,0x0,0x4,0x0,0x0,0x0,0x0,0xc,0x0,0x7,0x3c0000,0x0,0x3800,0x3800000,0x8010,0x0,0x1c001,0x881c0000,0x0,0x0,0x0,0x0,0x0,0x0,
1903 - 0x0,0x0,0x207000,0x0,0x0,0x100a,0xc00000,0x3c,0x0,0xc00,0x0,0x0,0x0,0x0,0x0,0x0,0x1800,0x0,0x0,0x0,0x0,0x1c2070
1904 - };
1905 -
1906 - // Definition of a 10x13 font (used in dialog boxes).
1907 - const unsigned int font10x13[256*10*13/32] = {
1908 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
1909 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80100c0,
1910 - 0x68000300,0x801,0xc00010,0x100c000,0x68100,0x100c0680,0x2,0x403000,0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
1911 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
1912 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfc,0x0,0x0,0x0,0x0,0x0,0x4020120,
1913 - 0x58120480,0x402,0x1205008,0x2012050,0x58080,0x20120581,0x40000001,0x804812,0x2000000,0x0,0x300,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
1914 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x140,0x80000,0x200402,0x800000,0x10,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
1915 - 0x0,0x7010,0x7000000,0x8000200,0x20000,0xc0002000,0x8008,0x0,0x0,0x0,0x0,0x808,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
1916 - 0x0,0x0,0x80000000,0x0,0x0,0x0,0x40000,0x0,0x0,0x0,0x0,0x480,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x70,0x80100c0,0x68000480,0x1001,
1917 - 0xc00010,0x1018000,0x68100,0x100c0680,0x4,0x403000,0x1020000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20140,0x28081883,0x200801,
1918 - 0x2a00000,0x10,0x1c0201c0,0x70040f80,0xc0f81c07,0x0,0x70,0x3e0303c0,0x3c3c0f83,0xe03c2107,0xe08810,0x18c31070,0x3c0703c0,
1919 - 0x783e0842,0x22222208,0x83e04010,0x1008000,0x4000200,0x20001,0x2002,0x408008,0x0,0x0,0x100000,0x0,0x1008,0x2000000,0x0,0x0,0x0,
1920 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20080,0x38000880,0x8078140f,0x81c00000,0x3e000,0xc020180,0x60080001,0xe0000002,0xc00042,0x108e2010,
1921 - 0xc0300c0,0x300c0303,0xf83c3e0f,0x83e0f81c,0x701c070,0x3c0c41c0,0x701c0701,0xc0001d08,0x42108421,0x8820088,0x4020120,0x58140480,
1922 - 0x802,0x1205008,0x3014050,0xc058080,0x20120581,0x40000002,0x804814,0x2020050,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20140,
1923 - 0x281e2484,0x80200801,0x1c02000,0x10,0x22060220,0x880c0801,0x82208,0x80000001,0x20008,0x41030220,0x40220802,0x402102,0x209010,
1924 - 0x18c31088,0x22088220,0x80080842,0x22222208,0x80204010,0x1014000,0x200,0x20001,0x2000,0x8008,0x0,0x0,0x100000,0x0,0x1008,
1925 - 0x2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x40000500,0x80800010,0x40200000,0x41000,0x12020040,0x10000003,0xa0000006,
1926 - 0x12000c4,0x31014000,0xc0300c0,0x300c0302,0x80402008,0x2008008,0x2008020,0x220c4220,0x88220882,0x20002208,0x42108421,0x8820088,
1927 - 0x0,0x300,0x0,0x0,0x0,0x14000000,0x0,0x200200,0x0,0x20000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0xfc282504,0x80001000,
1928 - 0x82a02000,0x20,0x22020020,0x8140802,0x102208,0x80801006,0x18008,0x9c848220,0x80210802,0x802102,0x20a010,0x15429104,0x22104220,
1929 - 0x80080842,0x22221405,0x404008,0x1022000,0x703c0,0x381e0701,0xc0783c02,0xc09008,0x1d83c070,0x3c078140,0x381c0882,0x21242208,
1930 - 0x81e01008,0x2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x201e0,0x40220500,0x80800027,0x20e02800,0x9c800,0x12020040,
1931 - 0x20000883,0xa0200002,0x120a044,0x11064010,0x12048120,0x48120484,0x80802008,0x2008008,0x2008020,0x210a4411,0x4411044,0x10884508,
1932 - 0x42108421,0x503c0b0,0x1c0701c0,0x701c0707,0x70381c07,0x1c07008,0x2008020,0x20f01c0,0x701c0701,0xc0201c08,0x82208822,0x883c088,
1933 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x50281903,0x20001000,0x80802000,0x20,0x22020040,0x30240f03,0xc0101c08,0x80801018,
1934 - 0x1fc06010,0xa48483c0,0x80210f03,0xe0803f02,0x20c010,0x15429104,0x22104220,0x70080841,0x41540805,0x804008,0x1041000,0x8220,
1935 - 0x40220881,0x882202,0x40a008,0x12422088,0x22088180,0x40100882,0x21241408,0x80201008,0x2031000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
1936 - 0x0,0x20280,0x401c0200,0x700028,0x21205000,0x92800,0xc1fc080,0x10000883,0xa0200002,0x1205049,0x12c19010,0x12048120,0x48120484,
1937 - 0xf0803c0f,0x3c0f008,0x2008020,0x790a4411,0x4411044,0x10504908,0x42108421,0x5022088,0x2008020,0x8020080,0x88402208,0x82208808,
1938 - 0x2008020,0x1e088220,0x88220882,0x20002608,0x82208822,0x8822088,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x501c0264,
1939 - 0xa0001000,0x8001fc00,0x7000020,0x22020080,0x83e0082,0x20202207,0x80000020,0x1020,0xa4848220,0x80210802,0x9c2102,0x20c010,
1940 - 0x12425104,0x3c1043c0,0x8080841,0x41540802,0x804008,0x1000000,0x78220,0x40220f81,0x882202,0x40c008,0x12422088,0x22088100,
1941 - 0x60100881,0x41540805,0x406008,0x1849000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20280,0xf0140200,0x880028,0x20e0a03f,0x709c800,
1942 - 0x201c0,0x60000881,0xa0000007,0xc0284b,0x122eb020,0x12048120,0x48120487,0x80802008,0x2008008,0x2008020,0x21094411,0x4411044,
1943 - 0x10204908,0x42108421,0x2022088,0x1e0781e0,0x781e0787,0xf8403e0f,0x83e0f808,0x2008020,0x22088220,0x88220882,0x21fc2a08,0x82208822,
1944 - 0x5022050,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20001,0xf80a0294,0x40001000,0x80002000,0x20,0x22020100,0x8040082,0x20202200,
1945 - 0x80000018,0x1fc06020,0xa48fc220,0x80210802,0x842102,0x20a010,0x12425104,0x20104240,0x8080841,0x41541402,0x1004008,0x1000000,
1946 - 0x88220,0x40220801,0x882202,0x40a008,0x12422088,0x22088100,0x18100881,0x41540805,0x801008,0x2046000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
1947 - 0x0,0x0,0x0,0x20280,0x401c0f80,0x80880028,0x20005001,0x94800,0x20000,0x880,0xa0000000,0x5015,0x4215040,0x3f0fc3f0,0xfc3f0fc8,
1948 - 0x80802008,0x2008008,0x2008020,0x21094411,0x4411044,0x10505108,0x42108421,0x203c088,0x22088220,0x88220888,0x80402008,0x2008008,
1949 - 0x2008020,0x22088220,0x88220882,0x20002a08,0x82208822,0x5022050,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xa00a0494,0x60001000,
1950 - 0x80002004,0x8020,0x22020200,0x88040882,0x20402201,0x801006,0x18000,0x9f084220,0x40220802,0x442102,0x209010,0x10423088,0x20088220,
1951 - 0x8080840,0x80882202,0x2004008,0x1000000,0x88220,0x40220881,0x882202,0x409008,0x12422088,0x22088100,0x8100880,0x80881402,
1952 - 0x1001008,0x2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20280,0x40220200,0x80700027,0x20002801,0x92800,0x1fc000,0x980,
1953 - 0xa0000000,0xa017,0x84417840,0x21084210,0x84210848,0x80402008,0x2008008,0x2008020,0x2208c220,0x88220882,0x20882208,0x42108421,
1954 - 0x2020088,0x22088220,0x88220888,0xc8402208,0x82208808,0x2008020,0x22088220,0x88220882,0x20203208,0x82208822,0x2022020,0x0,0x0,0x0,
1955 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0xa03c0463,0x90000801,0x2004,0x8040,0x1c0703e0,0x70040701,0xc0401c06,0x801001,0x20020,
1956 - 0x400843c0,0x3c3c0f82,0x3c2107,0x1c0881e,0x10423070,0x20070210,0xf0080780,0x80882202,0x3e04004,0x1000000,0x783c0,0x381e0701,
1957 - 0x782202,0x408808,0x12422070,0x3c078100,0x700c0780,0x80882202,0x1e01008,0x2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x201e0,
1958 - 0xf8000200,0x80080010,0x40000001,0x41000,0x0,0xe80,0xa0000000,0x21,0x8e21038,0x21084210,0x84210848,0xf83c3e0f,0x83e0f81c,
1959 - 0x701c070,0x3c08c1c0,0x701c0701,0xc0005c07,0x81e0781e,0x20200b0,0x1e0781e0,0x781e0787,0x30381c07,0x1c07008,0x2008020,0x1c0881c0,
1960 - 0x701c0701,0xc0201c07,0x81e0781e,0x203c020,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000,0x801,0x4,0x40,0x0,0x0,0x0,0x1000,
1961 - 0x0,0x3c000000,0x0,0x0,0x0,0x0,0x10000,0x0,0x0,0x4004,0x1000000,0x0,0x0,0x80000,0x400000,0x0,0x20008000,0x0,0x4,0x1008,0x2000000,
1962 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x0,0x8008000f,0x80000000,0x3e000,0x0,0x800,0xa0000400,0x0,0x0,0x0,0x0,0x80000,0x0,
1963 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100000,0x0,0x0,0x0,0x0,0x2000,0x0,0x4020040,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000,
1964 - 0x402,0x8,0x40,0x0,0x0,0x0,0x2000,0x0,0x0,0x0,0x0,0x0,0x0,0xc000,0x0,0x0,0x7004,0x70000fc,0x0,0x0,0x700000,0x800000,0x0,0x20008000,
1965 - 0x0,0x4,0x808,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x0,0x80f00000,0x0,0x0,0x0,0x800,0xa0001800,0x0,0x0,0x0,0x0,
1966 - 0x300000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600000,0x0,0x0,0x0,0x0,0x0,0x0,0x4020040
1967 - };
1968 -
1969 - // Definition of a 8x17 font
1970 - const unsigned int font8x17[8*17*256/32] = {
1971 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
1972 - 0x0,0x0,0x0,0x2400,0x2400,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20081834,0x1c0000,0x20081800,0x20081800,0x342008,
1973 - 0x18340000,0x200818,0x80000,0x0,0x180000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4200000,0x0,0x0,
1974 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x380000,0x4000,0x2000c00,0x40100840,0x70000000,0x0,0x0,0x1c,0x10700000,0x7,0x0,
1975 - 0x1800,0x1800,0x0,0x0,0x0,0x14,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1010242c,0x14140000,0x10102414,0x10102414,0x2c1010,0x242c1400,
1976 - 0x101024,0x14100038,0x0,0x240000,0x0,0x0,0x30000000,0x0,0x0,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x12,0x0,0x8100000,0x0,
1977 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10,0x80000,0x10004000,0x2001000,0x40000040,0x10000000,0x0,0x0,0x10,0x10100000,0x4,
1978 - 0x0,0x18000000,0x0,0x0,0x0,0x34002400,0x2400,0x0,0x0,0x0,0x3c,0x0,0x8000000,0x0,0x60607800,0x0,0x140000,0x0,0x0,0x0,0x0,0x0,
1979 - 0x44,0x10081834,0x240000,0x10081800,0x10081800,0x1c341008,0x18340000,0x100818,0x84000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x102812,
1980 - 0x8601c10,0x8100800,0x2,0x1c383e3e,0x67e1e7f,0x3e3c0000,0x38,0x1e087e1e,0x7c7f7f1e,0x417c1c42,0x4063611c,0x7e1c7e3e,0xfe414181,
1981 - 0x63827f10,0x40081000,0x8004000,0x2001000,0x40000040,0x10000000,0x0,0x10000000,0x10,0x10100000,0x3c000008,0x0,0x24003e00,
1982 - 0x3f007f00,0x0,0x0,0x2ce91800,0x1882,0x10101c,0xc2103c,0x143c3c00,0x3c00,0x18003c3c,0x10001f00,0x181c00,0x20200810,0x8080808,
1983 - 0x8083e1e,0x7f7f7f7f,0x7c7c7c7c,0x7c611c1c,0x1c1c1c00,0x1e414141,0x41824044,0x810242c,0x14180000,0x8102414,0x8102414,0x382c0810,
1984 - 0x242c1400,0x81024,0x14104014,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x102816,0x3e902010,0x10084910,0x4,0x22084343,0xa402102,0x41620000,
1985 - 0x44,0x33144121,0x42404021,0x41100444,0x40636122,0x43224361,0x10416381,0x22440310,0x20082800,0x4000,0x2001000,0x40000040,
1986 - 0x10000000,0x0,0x10000000,0x10,0x10100000,0x24000008,0x0,0x606100,0x68000300,0x8106c,0x34000000,0x4f0000,0x44,0x101020,0x441040,
1987 - 0x420200,0x4200,0x24000404,0x7d00,0x82200,0x20203010,0x14141414,0x14082821,0x40404040,0x10101010,0x42612222,0x22222200,0x23414141,
1988 - 0x41447e48,0x0,0x0,0x0,0x0,0x4000000,0x18,0x0,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10287f,0x49902010,0x10083e10,0x4,0x41080101,
1989 - 0x1a404002,0x41411818,0x1004004,0x21144140,0x41404040,0x41100448,0x40555141,0x41414140,0x10412281,0x14280610,0x20084400,0x1c7c1c,
1990 - 0x3e3c7c3a,0x5c703844,0x107f5c3c,0x7c3e3c3c,0x7e424281,0x66427e10,0x10100000,0x40100008,0x1010,0xa04000,0x48100610,0x100c3024,
1991 - 0x24000000,0x4f3c00,0x2c107e28,0x3820,0x42281060,0x9d1e12,0xbd00,0x24100818,0x427d00,0x82248,0x20200800,0x14141414,0x14142840,
1992 - 0x40404040,0x10101010,0x41514141,0x41414142,0x43414141,0x41284350,0x1c1c1c1c,0x1c1c6c1c,0x3c3c3c3c,0x70707070,0x3c5c3c3c,
1993 - 0x3c3c3c18,0x3e424242,0x42427c42,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x102824,0x48623010,0x10081c10,0x8,0x41080103,0x127c5e04,
1994 - 0x41411818,0xe7f3808,0x4f144140,0x41404040,0x41100450,0x40555141,0x41414160,0x1041225a,0x1c280410,0x1008c600,0x226622,0x66661066,
1995 - 0x62100848,0x10496266,0x66663242,0x10426681,0x24220260,0x100c0000,0xf8280008,0x1010,0x606000,0x48280428,0x28042014,0x48000000,
1996 - 0x494200,0x52280228,0x105420,0x3cee1058,0xa12236,0xa500,0x18101004,0x427d00,0x8226c,0x76767e10,0x14141414,0x14142840,0x40404040,
1997 - 0x10101010,0x41514141,0x41414124,0x45414141,0x41284150,0x22222222,0x22221222,0x66666666,0x10101010,0x66626666,0x66666600,
1998 - 0x66424242,0x42226622,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100024,0x381c4900,0x10086bfe,0x8,0x4908021c,0x22036304,0x3e630000,
1999 - 0x70000710,0x51227e40,0x417f7f43,0x7f100470,0x40554941,0x43417e3e,0x1041225a,0x8100810,0x10080000,0x24240,0x42421042,0x42100850,
2000 - 0x10494242,0x42422040,0x1042245a,0x18240410,0x10103900,0x407c003e,0x1818,0x1c3e10,0x4f7c087c,0x7c002010,0x48000000,0x4008,
2001 - 0x527c0410,0x105078,0x2410104c,0xa13e6c,0x7f00b900,0xfe3c3c,0x421d18,0x1c1c36,0x38383810,0x22222222,0x22144e40,0x7f7f7f7f,
2002 - 0x10101010,0xf1494141,0x41414118,0x49414141,0x4110435c,0x2020202,0x2021240,0x42424242,0x10101010,0x42424242,0x424242ff,0x4e424242,
2003 - 0x42244224,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000fe,0xe664d00,0x10080810,0x380010,0x41080c03,0x42014108,0x633d0000,0x70000710,
2004 - 0x51224140,0x41404041,0x41100448,0x40494541,0x7e414203,0x1041145a,0x14101010,0x10080000,0x3e4240,0x427e1042,0x42100870,0x10494242,
2005 - 0x4242203c,0x1042245a,0x18241810,0x10104600,0xf8f60008,0x1010,0x600320,0x48f610f6,0xf6000000,0x187eff,0x3c04,0x5ef61810,0x105020,
2006 - 0x24fe0064,0x9d006c,0x138ad00,0x100000,0x420518,0x36,0xc0c0c020,0x22222222,0x22224840,0x40404040,0x10101010,0x41454141,0x41414118,
2007 - 0x51414141,0x41107e46,0x3e3e3e3e,0x3e3e7e40,0x7e7e7e7e,0x10101010,0x42424242,0x42424200,0x5a424242,0x42244224,0x0,0x0,0x0,
2008 - 0x0,0x0,0x0,0x0,0x0,0x28,0x9094500,0x10080010,0x10,0x41081801,0x7f014118,0x41010000,0xe7f3800,0x513e4140,0x41404041,0x41100444,
2009 - 0x40414541,0x40414101,0x10411466,0x36103010,0x8080000,0x424240,0x42401042,0x42100848,0x10494242,0x42422002,0x10423c5a,0x18142010,
2010 - 0x10100000,0x407c0010,0x1010,0x260140,0x487c307c,0x7c000000,0x180000,0x202,0x507c2010,0x105020,0x3c10003c,0x423e36,0x1004200,
2011 - 0x100000,0x420500,0x3e6c,0x41e0440,0x3e3e3e3e,0x3e3e7840,0x40404040,0x10101010,0x41454141,0x41414124,0x61414141,0x41104042,
2012 - 0x42424242,0x42425040,0x40404040,0x10101010,0x42424242,0x42424218,0x72424242,0x42144214,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100048,
2013 - 0x49096200,0x8100010,0x18001810,0x22082043,0x2432310,0x61421818,0x1004010,0x4f634121,0x42404021,0x41104444,0x40414322,0x40234143,
2014 - 0x10411466,0x22106010,0x8080000,0x466622,0x66621066,0x42100844,0x10494266,0x66662042,0x10461824,0x24184010,0x10100000,0x24381010,
2015 - 0x34001018,0xda4320,0x68386038,0x38000000,0x0,0x4204,0x50384010,0x105420,0x4210100c,0x3c0012,0x3c00,0x0,0x460500,0x48,0xc020c44,
2016 - 0x63636363,0x63228821,0x40404040,0x10101010,0x42432222,0x22222242,0x62414141,0x41104042,0x46464646,0x46465022,0x62626262,
2017 - 0x10101010,0x66426666,0x66666618,0x66464646,0x46186618,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100048,0x3e063d00,0x8100000,0x18001820,
2018 - 0x1c3e7f3e,0x23c1e20,0x3e3c1818,0x10,0x20417e1e,0x7c7f401e,0x417c3842,0x7f41431c,0x401e40be,0x103e0866,0x41107f10,0x4080000,
2019 - 0x3a5c1c,0x3a3c103a,0x427c0842,0xe49423c,0x7c3e203c,0xe3a1824,0x66087e10,0x10100000,0x3c103010,0x245a1010,0x5a3e10,0x3f107f10,
2020 - 0x10000000,0x0,0x3c08,0x2e107e10,0x1038fc,0x101004,0x0,0x0,0xfe0000,0x7f0500,0x0,0x14041438,0x41414141,0x41418e1e,0x7f7f7f7f,
2021 - 0x7c7c7c7c,0x7c431c1c,0x1c1c1c00,0xbc3e3e3e,0x3e10405c,0x3a3a3a3a,0x3a3a6e1c,0x3c3c3c3c,0x7c7c7c7c,0x3c423c3c,0x3c3c3c00,
2022 - 0x7c3a3a3a,0x3a087c08,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x4200000,0x10000020,0x0,0x0,0x10,0x0,0x30000000,0x0,
2023 - 0x0,0x0,0x60000,0x0,0x1c,0x4380000,0x0,0x2,0x800,0x0,0x40020000,0x0,0x8000c,0x10600000,0x2010,0x48000000,0x240000,0x0,0x0,
2024 - 0x0,0x0,0x0,0x1000,0x1078,0x0,0x0,0x0,0x400500,0x0,0x1e081e00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2025 - 0x84008,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x20000040,0x0,0x0,0x20,0x0,0x1e000000,0x0,0x0,0x0,0x20000,0x0,
2026 - 0x0,0x2000000,0x0,0x26,0x800,0x0,0x40020000,0x0,0x100000,0x10000000,0x2030,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000,0x1000,0x0,
2027 - 0x0,0x0,0x400000,0x8000000,0x41e0400,0x0,0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x0,0x0,0x0,0x0,0x0,0x104010,0x0,0x0,0x0,0x0,
2028 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfe,0x0,0x1c,0x7000,0x0,0x40020000,0x0,0x300000,
2029 - 0x0,0xe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000,0x0,0x0,0x0,0x400000,0x38000000,0x0,0x0,0x1c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2030 - 0x1c,0x0,0x0,0x0,0x0,0x0,0x304030,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2031 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2032 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2033 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2034 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 };
2035 -
2036 - // Definition of a 10x19 font
2037 - const unsigned int font10x19[10*19*256/32] = {
2038 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2039 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3600000,0x36000,0x0,0x0,0x0,0x0,0x6c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2040 - 0x0,0x180181c0,0xe81b0300,0x1801,0x81c06c18,0x181c06c,0xe8180,0x181c0e81,0xb0000006,0x60701b,0x1800000,0x0,0x0,0x0,0x0,0x0,
2041 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2042 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c00000,0x1c000,0x0,0x0,0x0,0x0,0x6c,0x0,0x0,0x0,0x0,
2043 - 0x0,0x0,0x0,0x0,0x0,0x0,0xc030360,0xb81b0480,0xc03,0x3606c0c,0x303606c,0xb80c0,0x30360b81,0xb0000003,0xc0d81b,0x3000000,0x0,
2044 - 0x300,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2045 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x0,0x0,0x0,0x0,0x0,0x2200000,
2046 - 0x22000,0x0,0x0,0x0,0x0,0x0,0x0,0x30000,0x0,0xe0,0x38078000,0x0,0x480,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3000c080,0x480,0x3000,
2047 - 0xc0800030,0xc08000,0x300,0xc080000,0xc,0x302000,0xc00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20120,0x41c01,0xe020060c,
2048 - 0x800000,0x4,0x1e0703e0,0xf8060fc1,0xe1fe1e07,0x80000000,0x78,0x307e0,0x3c7c1fe7,0xf83c408f,0x80f10440,0x18660878,0x7e0787e0,
2049 - 0x78ff9024,0xa0140a0,0x27f83840,0x700e000,0x18000400,0x8000,0x70004002,0x410078,0x0,0x0,0x0,0x0,0x1808,0xc000000,0xf000000,
2050 - 0xe000000,0x1400,0x1e0001f,0x8007f800,0x0,0x0,0x3a3b,0x61400000,0x14202,0x20000,0x38002020,0x3c1b00,0x3e00000,0xf8,0x1c0001c0,
2051 - 0x78060001,0xf800000e,0x1e00020,0x8004020,0xc0300c0,0x300c0301,0xf83c7f9f,0xe7f9fe3e,0xf83e0f8,0x7c1821e0,0x781e0781,0xe0001f10,
2052 - 0x24090240,0xa02400f8,0x18018140,0xe81b0480,0x1801,0x81406c18,0x181406c,0x190e8180,0x18140e81,0xb0000006,0x60501b,0x184006c,
2053 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20120,0x26042202,0x200c06,0x800000,0x8,0x210d0611,0x40e0803,0x10026188,0x40000000,
2054 - 0x8c,0xf030418,0xc6431004,0xc64082,0x110840,0x18660884,0x41084410,0x8c081024,0xa012110,0x40082020,0x101b000,0xc000400,0x8000,
2055 - 0x80004002,0x410008,0x0,0x0,0x100000,0x0,0x2008,0x2000000,0x18800000,0x10000000,0x2200,0x2300024,0x800,0x0,0x0,0x2e13,0x60800000,
2056 - 0x8104,0x20040,0x64001040,0x80401b07,0x80100000,0x1e000,0x22000020,0x40c0003,0xc8000002,0x3300020,0x8004020,0xc0300c0,0x300c0301,
2057 - 0x40c64010,0x4010008,0x2008020,0x43182210,0x84210842,0x10002190,0x24090240,0x9044018c,0xc030220,0xb81b0300,0xc03,0x2206c0c,
2058 - 0x302206c,0x1e0b80c0,0x30220b81,0xb0000003,0xc0881b,0x304006c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20120,0x241f2202,
2059 - 0x200802,0x4900000,0x8,0x21010408,0x20a0802,0x44090,0x20000000,0x4,0x11878408,0x80411004,0x804082,0x111040,0x1ce50986,0x40986409,
2060 - 0x81022,0x12012108,0x80102020,0x1031800,0x400,0x8000,0x80004000,0x10008,0x0,0x0,0x100000,0x0,0x2008,0x2000000,0x10000000,
2061 - 0x10000000,0x18,0x4000044,0x1000,0x30180,0xd81b0000,0x13,0xe0000000,0x88,0x40,0x400018c0,0x80400018,0x61f00000,0x61800,0x22020020,
2062 - 0x4000007,0xc8000002,0x2100020,0x8038000,0x1e0781e0,0x781e0301,0x40804010,0x4010008,0x2008020,0x41142619,0x86619866,0x18002190,
2063 - 0x24090240,0x8887e104,0x0,0x0,0x0,0x0,0x0,0x2000000,0x0,0x0,0x0,0x40000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20120,0x2434a202,
2064 - 0x200802,0x3e00000,0x10,0x40810008,0x21a0804,0x44090,0x20000000,0x80040004,0x20848409,0x409004,0x1004082,0x112040,0x14a50902,
2065 - 0x40902409,0x81022,0x11321208,0x80202010,0x1060c00,0x7c5e0,0x781e8783,0xf07a5f0e,0x1c10808,0xfc5f078,0x5e07a170,0x7c7e1024,
2066 - 0xa016190,0x27f82008,0x2000000,0x20000000,0x10000000,0x80200024,0x4000044,0x2000,0x18180,0xc8320000,0x12,0xa1f00037,0x7f888,
2067 - 0x1e0,0x40410880,0x80600017,0xa2100000,0x5e800,0x22020040,0x38001027,0xc8000002,0x2100020,0x8004020,0x12048120,0x48120482,
2068 - 0x41004010,0x4010008,0x2008020,0x40942409,0x2409024,0x9044390,0x24090240,0x88841918,0x1f07c1f0,0x7c1f07c3,0x70781e07,0x81e07838,
2069 - 0xe0380e0,0x1f17c1e0,0x781e0781,0xe0001f90,0x24090240,0x9025e102,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20001,0xff241c41,
2070 - 0x1001,0x1c02000,0x10,0x40810008,0x6120f85,0xe0086190,0x20c03007,0x8007800c,0x27848419,0x409004,0x1004082,0x114040,0x14a48902,
2071 - 0x40902409,0x81022,0x11321205,0x602010,0x1000000,0x86610,0x84218840,0x80866182,0x411008,0x9261884,0x61086189,0x82101022,0x12012108,
2072 - 0x40082008,0x2000000,0x20030000,0x20000000,0x80200024,0x4000044,0x3006030,0xc018100,0x4c260000,0x12,0x26080048,0x83000850,
2073 - 0x20250,0x403e0500,0x8078002c,0x12302200,0x92400,0x1c0200c0,0x4001027,0xc8000002,0x3308820,0x8004020,0x12048120,0x48120482,
2074 - 0x41004010,0x4010008,0x2008020,0x40922409,0x2409024,0x8884690,0x24090240,0x85040920,0x21886218,0x86218860,0x88842108,0x42108408,
2075 - 0x2008020,0x21186210,0x84210842,0x10302190,0x24090240,0x88461084,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x4c240182,
2076 - 0x80001001,0x6b02000,0x20,0x4c810010,0x78220846,0x10081e10,0x20c0301c,0x1fe0e018,0x4d8487e1,0x409fe7,0xf9007f82,0x11a040,
2077 - 0x13248902,0x41102418,0xe0081022,0x11320c05,0x402008,0x1000000,0x2409,0x409020,0x81024082,0x412008,0x9240902,0x40902101,0x101022,
2078 - 0x11321208,0x40102008,0x2000000,0x7e0c8000,0xfc000003,0xf0fc0018,0x43802047,0x8c8040c8,0x32008300,0x44240000,0x0,0x4000048,
2079 - 0x8c801050,0x20440,0x40221dc0,0x808c0028,0x11d0667f,0x8009c400,0x1fc180,0x4001023,0xc8300002,0x1e0ccfb,0x3ec7b020,0x12048120,
2080 - 0x48120482,0x79007f9f,0xe7f9fe08,0x2008020,0xf0922409,0x2409024,0x8504490,0x24090240,0x85040920,0x802008,0x2008020,0x89004090,
2081 - 0x24090208,0x2008020,0x40902409,0x2409024,0x8304390,0x24090240,0x88440884,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,
2082 - 0x481c0606,0xc8001001,0x802000,0x20,0x4c810020,0x4220024,0x8102108,0x60000070,0x3820,0x48884419,0x409004,0x10e4082,0x112040,
2083 - 0x13244902,0x7e1027e0,0x3c081021,0x21320c02,0x802008,0x1000000,0x7e409,0x409020,0x81024082,0x414008,0x9240902,0x40902101,
2084 - 0x80101022,0x11320c08,0x40202008,0x2038800,0x200bc000,0x20000000,0x80200003,0x80f04044,0xbc080bc,0x2f000200,0x0,0x0,0x6001048,
2085 - 0x8bc02020,0x20441,0xf8220200,0x80820028,0x1000cc00,0x80094400,0x201e0,0x78001021,0xc830000f,0x8000663c,0xf03c0c0,0x21084210,
2086 - 0x84210846,0x41004010,0x4010008,0x2008020,0x40912409,0x2409024,0x8204890,0x24090240,0x82040930,0x1f87e1f8,0x7e1f87e0,0x89004090,
2087 - 0x24090208,0x2008020,0x40902409,0x2409024,0x8004690,0x24090240,0x88440884,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,
2088 - 0x480719c4,0x48001001,0x81fc00,0x7800020,0x40810040,0x2420024,0x8104087,0xa0000070,0x3820,0x48884409,0x409004,0x1024082,0x111040,
2089 - 0x13244902,0x40102410,0x2081021,0x214a1202,0x1802008,0x1000000,0x182409,0x409fe0,0x81024082,0x41a008,0x9240902,0x40902100,
2090 - 0xf8101021,0x214a0c04,0x80c0c008,0x1847000,0x7c1ee000,0x20000000,0x8020000c,0x8c044,0x1ee181ee,0x7b800000,0x707,0xf3ff0000,
2091 - 0x3e0084f,0x9ee0c020,0x20440,0x40221fc0,0xc2002c,0x13f11000,0x87892400,0x20000,0x1020,0x48000000,0x3f011c6,0x31cc6180,0x21084210,
2092 - 0x84210844,0x41004010,0x4010008,0x2008020,0x40912409,0x2409024,0x8505090,0x24090240,0x8204191c,0x60982609,0x82609823,0xf9007f9f,
2093 - 0xe7f9fe08,0x2008020,0x40902409,0x2409024,0x9fe4c90,0x24090240,0x84840848,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0xfe048224,
2094 - 0x28001001,0x2000,0x40,0x40810080,0x27f8024,0x8104080,0x2000001c,0x1fe0e020,0x488fc409,0x409004,0x1024082,0x110840,0x10242902,
2095 - 0x40102408,0x2081021,0x214a1202,0x1002004,0x1000000,0x102409,0x409000,0x81024082,0x411008,0x9240902,0x40902100,0x6101021,
2096 - 0x214a0c04,0x81002008,0x2000000,0x201dc000,0x20000000,0x80200000,0x98044,0x1dc101dc,0x77000000,0x700,0x0,0x180448,0x1dc10020,
2097 - 0x20440,0x403e0200,0x620017,0xa000cc00,0x80052800,0x20000,0x1020,0x48000000,0x6606,0x206100,0x3f0fc3f0,0xfc3f0fc7,0xc1004010,
2098 - 0x4010008,0x2008020,0x4090a409,0x2409024,0x8886090,0x24090240,0x8207e106,0x40902409,0x2409024,0x81004010,0x4010008,0x2008020,
2099 - 0x40902409,0x2409024,0x8005890,0x24090240,0x84840848,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x98048224,0x30001001,0x2000,
2100 - 0x40,0x21010100,0x2020024,0x8204080,0x40000007,0x80078000,0x48884408,0x80411004,0x824082,0x110840,0x10242986,0x40086409,0x2081021,
2101 - 0xe14a2102,0x2002004,0x1000000,0x106409,0x409000,0x81024082,0x410808,0x9240902,0x40902100,0x2101021,0x214a1202,0x82002008,
2102 - 0x2000000,0x300f8000,0x20000000,0x80fc001d,0xe4088044,0xf8200f8,0x3e000000,0x300,0x0,0x80c48,0xf820020,0x20640,0x40410200,
2103 - 0x803c0018,0x60006600,0x61800,0x0,0x1020,0x48000000,0xcc0a,0x20a100,0x21084210,0x84210844,0x40804010,0x4010008,0x2008020,
2104 - 0x4110a619,0x86619866,0x19046110,0x24090240,0x82040102,0x41906419,0x6419064,0x81004010,0x4010008,0x2008020,0x40902409,0x2409024,
2105 - 0x8307090,0x24090240,0x82840828,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x90248222,0x30000802,0x200c,0xc080,0x21010301,
2106 - 0x4021042,0x10202108,0xc0c03000,0x80040020,0x4d902418,0xc6431004,0xc24082,0x6210440,0x10241884,0x40084409,0x86080840,0xc0842102,
2107 - 0x4002002,0x1000000,0x18e610,0x84218820,0x80864082,0x410408,0x9240884,0x61086101,0x6101860,0xc0842103,0x4002008,0x2000000,
2108 - 0x10850180,0x20330000,0x80200013,0x26184024,0x5040050,0x14000000,0x0,0x0,0x4180848,0x85040020,0x20350,0x40000200,0x800c0007,
2109 - 0x80002200,0x1e000,0x0,0x1860,0x48000000,0x880a,0x40a188,0x40902409,0x2409028,0x40c64010,0x4010008,0x2008020,0x43106210,0x84210842,
2110 - 0x10006108,0x42108421,0x2040102,0x6398e639,0x8e6398e4,0x88842088,0x22088208,0x2008020,0x21102210,0x84210842,0x10306118,0x66198661,
2111 - 0x83061030,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20001,0x901f01c1,0xe8000802,0xc,0xc080,0x1e07c7f8,0xf8020f81,0xe0401e07,
2112 - 0x80c03000,0x20,0x279027e0,0x3c7c1fe4,0x3c408f,0x83c1027f,0x90241878,0x4007c404,0xf8080780,0xc0844082,0x7f82002,0x1000000,
2113 - 0xfa5e0,0x781e87c0,0x807a409f,0xc0410207,0x9240878,0x5e07a100,0xf80e0fa0,0xc0846183,0x7f82008,0x2000000,0xf020100,0x40321360,
2114 - 0x80200014,0xa3e0201f,0x8207f820,0x8000000,0x0,0x0,0x3e01037,0x207f820,0x201e1,0xfc000200,0x80040000,0x0,0x0,0x1fc000,0x17b0,
2115 - 0x48000000,0x12,0xc120f0,0x40902409,0x2409028,0x783c7f9f,0xe7f9fe3e,0xf83e0f8,0x7c1061e0,0x781e0781,0xe000be07,0x81e0781e,
2116 - 0x204017c,0x3e8fa3e8,0xfa3e8fa3,0x70781f07,0xc1f07c7f,0x1fc7f1fc,0x1e1021e0,0x781e0781,0xe0007e0f,0xa3e8fa3e,0x8305e030,0x0,
2117 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0xc06,0xc,0x100,0x0,0x0,0x0,0x3000,0x0,0x20000000,0x0,0x0,0x0,0x0,0xc000,
2118 - 0x0,0x0,0x2001,0x1000000,0x0,0x0,0x20000,0x400000,0x0,0x40002000,0x0,0x1,0x2008,0x2000000,0x100,0x40240000,0x80200008,0x40000000,
2119 - 0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x80040000,0x0,0x0,0x0,0x1000,0x48000000,0x1f,0x181f000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2120 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1040010,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0x60c,0x18,0x0,
2121 - 0x0,0x0,0x0,0x6000,0x0,0x10000000,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,0x3800,0x7000000,0x0,0x0,0x840000,0x400000,0x0,0x40002000,
2122 - 0x0,0x2,0x2008,0x2000000,0x200,0x40440000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x80780000,0x0,0x0,0x0,0x1000,0x48000400,
2123 - 0x2,0x1e02000,0x0,0x0,0x80000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000,0x0,0x0,0x0,0x0,0x0,0x0,0x2040020,0x0,0x0,0x0,0x0,
2124 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x0,0x4000,0x0,0xf000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2125 - 0x780000,0x3800000,0x0,0x40002000,0x0,0xe,0x1808,0xc000000,0x3,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000000,
2126 - 0x0,0x0,0x0,0x1000,0x1c00,0x0,0x0,0x0,0x0,0x380000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x380000,0x0,0x0,0x0,0x0,0x0,0x0,0xe0400e0,
2127 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3fc,
2128 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2129 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 };
2130 -
2131 - // Definition of a 12x24 font
2132 - const unsigned int font12x24[12*24*256/32] = {
2133 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2134 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x19,0x80000000,0x198000,0x0,0x0,0x0,0x0,
2135 - 0x0,0x198,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc001806,0xc81980,0x60000000,0xc001806,0x1980c00,0x18060198,0xc80c,
2136 - 0x180600,0xc8198000,0xc001,0x80601980,0x18000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2137 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2138 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf,0x0,0xf0000,0x0,0x0,0x0,0x0,0x0,0x198,0x0,0x0,0x0,0x0,0x0,0x0,
2139 - 0x0,0x0,0x0,0x0,0x0,0x0,0x600300f,0x1301980,0x90000000,0x600300f,0x1980600,0x300f0198,0x13006,0x300f01,0x30198000,0x6003,
2140 - 0xf01980,0x30000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2141 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2142 - 0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x0,0x60000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7007,0x3c0000,0x3006019,
2143 - 0x80000000,0x90000000,0x3006019,0x80000300,0x60198000,0x3,0x601980,0x0,0x3006,0x1980000,0x60000000,0x0,0x0,0xe0000000,0x0,
2144 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2145 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000000,
2146 - 0x0,0x0,0x0,0x0,0x0,0xc800019,0x80000000,0x198000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0x0,0x0,0x1001,0x420000,0x0,0x0,0x90000000,
2147 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18000c06,0xc80001,0x10000000,0x18000c06,0x1800,0xc060000,0xc818,0xc0600,0xc8000000,
2148 - 0x18000,0xc0600000,0xc000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6019,0x80660207,0x800f8060,0x300c004,0x0,0x6,
2149 - 0xe00703f,0x3f00383,0xf80f07fc,0x1f01f000,0x0,0xf8,0x607f,0x7c7e07,0xfe7fe0f8,0x6063fc1f,0x86066007,0xe7060f0,0x7f80f07f,
2150 - 0x81f8fff6,0x6606c03,0x70ee077f,0xe0786000,0xf0070000,0xc000060,0xc0,0x3e000,0x60006003,0x600fc00,0x0,0x0,0x0,0x0,0x0,0x3c0603,
2151 - 0xc0000000,0x7800000,0xf0000,0x0,0xf00001f,0x80001fe0,0x7fe000,0x0,0x0,0x0,0x168fe609,0x0,0x90e07,0x6000,0x3c000e,0x70000f8,
2152 - 0x1980001f,0x0,0x1f8,0xf00000f,0xf00180,0xfe000,0xe00e,0x1001,0x20060,0x6006006,0x600600,0x600fe07c,0x7fe7fe7f,0xe7fe3fc3,
2153 - 0xfc3fc3fc,0x7e07060f,0xf00f00,0xf00f0000,0xf360660,0x6606606e,0x76001e0,0xc00180f,0x1681981,0x10000000,0xc00180f,0x1980c00,
2154 - 0x180f0198,0x3801680c,0x180f01,0x68198000,0xc001,0x80f01980,0x18600198,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6019,
2155 - 0x8044020c,0xc01f8060,0x2004004,0x0,0xc,0x3f81f07f,0x87f80383,0xf81f87fc,0x3f83f800,0x0,0x1fc,0x780607f,0x81fe7f87,0xfe7fe1fc,
2156 - 0x6063fc1f,0x860c6007,0xe7061f8,0x7fc1f87f,0xc3fcfff6,0x6606c03,0x30c6067f,0xe0783000,0xf00d8000,0x6000060,0xc0,0x7e000,0x60006003,
2157 - 0x600fc00,0x0,0x0,0xc00,0x0,0x0,0x7c0603,0xe0000000,0xfc00000,0x1f0000,0x0,0x900003f,0xc0003fe0,0x7fe000,0x0,0x0,0x0,0x1302660f,
2158 - 0x0,0xf0606,0x6004,0x7e0006,0x60601f8,0x19800001,0x80000000,0x1f8,0x19800010,0x81080300,0x3f2000,0x2011,0x1001,0x1c0060,0x6006006,
2159 - 0x600600,0x601fe1fe,0x7fe7fe7f,0xe7fe3fc3,0xfc3fc3fc,0x7f87061f,0x81f81f81,0xf81f8000,0x3fa60660,0x66066066,0x66003f0,0x6003009,
2160 - 0x1301981,0x10000000,0x6003009,0x1980600,0x30090198,0x1f013006,0x300901,0x30198000,0x6003,0x901980,0x30600198,0x0,0x0,0x0,
2161 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6019,0x80cc0f8c,0xc0180060,0x6006044,0x40000000,0xc,0x3181b041,0xc41c0783,0x388018,
2162 - 0x71c71800,0x0,0x106,0x18c0f061,0xc38261c6,0x600384,0x60606001,0x86186007,0xe78630c,0x60e30c60,0xe7040606,0x630cc03,0x39c30c00,
2163 - 0xc0603000,0x3018c000,0x3000060,0xc0,0x60000,0x60000000,0x6000c00,0x0,0x0,0xc00,0x0,0x0,0x600600,0x60000000,0x18400000,0x180000,
2164 - 0x0,0x19800070,0x40003600,0xc000,0x0,0x0,0x0,0x25a06,0x0,0x6030c,0x4,0xe20007,0xe060180,0xf000,0x80000000,0xf0000,0x10800000,
2165 - 0x80080600,0x7f2000,0x2020,0x80001001,0x20000,0xf00f00f,0xf00f00,0x601b0382,0x60060060,0x6000600,0x60060060,0x61c78630,0xc30c30c3,
2166 - 0xc30c000,0x30e60660,0x66066063,0xc600738,0x3006019,0x80000000,0xe0000000,0x3006019,0x80000300,0x60198000,0x3e000003,0x601980,
2167 - 0x0,0x3006,0x1980000,0x60600000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6019,0x80cc1fcc,0xc0180060,0x6006035,0x80000000,
2168 - 0x18,0x71c03000,0xc00c0583,0x300018,0x60c60c00,0x0,0x6,0x3060f060,0xc30060c6,0x600300,0x60606001,0x86306007,0x9e78670e,0x60670e60,
2169 - 0x66000606,0x630c606,0x19830c01,0xc0601800,0x30306000,0x60,0xc0,0x60000,0x60000000,0x6000c00,0x0,0x0,0xc00,0x0,0x0,0x600600,
2170 - 0x60000000,0x18000000,0x300000,0x0,0x78060,0x6600,0x1c000,0x300c,0x39819c0,0x0,0x25a00,0x0,0x30c,0x4,0xc00003,0xc060180,0x30c1f,
2171 - 0x80000000,0x30c000,0x10800001,0x80700000,0x7f2000,0x2020,0x80001001,0x20060,0xf00f00f,0xf00f00,0xf01b0300,0x60060060,0x6000600,
2172 - 0x60060060,0x60c78670,0xe70e70e7,0xe70e000,0x70c60660,0x66066063,0xc7f8618,0x0,0x0,0x0,0x0,0x0,0x0,0x7000000,0x0,0x0,0x0,
2173 - 0x0,0x600000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6019,0x87ff3a4c,0xc0180060,0x400600e,0x600000,0x18,0x60c03000,
2174 - 0xc00c0d83,0x700018,0x60c60c00,0x20,0x400006,0x3060f060,0xc6006066,0x600600,0x60606001,0x86606006,0x966c6606,0x60660660,0x66000606,
2175 - 0x630c666,0xf019801,0x80601800,0x30603000,0x1f06f,0xf01ec0,0xf03fe1ec,0x6703e01f,0x61c0c06,0xdc6701f0,0x6f01ec0c,0xe1f87fc6,
2176 - 0xc60cc03,0x71c60c7f,0xc0600600,0x60000000,0x30000000,0x300000,0x40040,0x88060,0x6600,0x18000,0x300c,0x1981980,0x0,0x2421f,
2177 - 0x80003ce0,0x7fc198,0x601f,0xc02021,0x980600c0,0x40230,0x80000000,0x402000,0x19806003,0x80006,0xc7f2000,0x2020,0x80001001,
2178 - 0x420060,0xf00f00f,0xf00f00,0xf01b0600,0x60060060,0x6000600,0x60060060,0x6066c660,0x66066066,0x6606208,0x60e60660,0x66066061,
2179 - 0x987fc670,0x1f01f01f,0x1f01f01,0xf039c0f0,0xf00f00f,0xf03e03,0xe03e03e0,0x1f06701f,0x1f01f01,0xf01f0060,0x1e660c60,0xc60c60c6,
2180 - 0xc6f060c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x7ff3207,0x8c0c0000,0xc00300e,0x600000,0x30,0x60c03000,
2181 - 0xc01c0983,0xf0600030,0x31860c06,0x6001e0,0x78000e,0x23e1f861,0xc6006066,0x600600,0x60606001,0x86c06006,0x966c6606,0x60660660,
2182 - 0xe7000606,0x630c666,0xf01f803,0x600c00,0x30000000,0x3f87f,0x83f83fc3,0xf83fe3fc,0x7f83e01f,0x6380c07,0xfe7f83f8,0x7f83fc0d,
2183 - 0xf3fc7fc6,0xc71cc03,0x3183187f,0xc0600600,0x60000000,0xff806000,0x300000,0x40040,0x88070,0x6600,0x60030060,0x6001818,0x1883180,
2184 - 0x0,0x2423f,0xc0007ff0,0x607fc1f8,0x603f,0x80c01fc1,0xf80601e0,0x5f220,0x80420000,0x5f2000,0xf006006,0x80006,0xc7f2000,0x2020,
2185 - 0x82107c07,0xc03c0060,0x1f81f81f,0x81f81f80,0xf03b0600,0x60060060,0x6000600,0x60060060,0x6066c660,0x66066066,0x660671c,0x61660660,
2186 - 0x66066061,0xf860e6c0,0x3f83f83f,0x83f83f83,0xf87fe3f8,0x3f83f83f,0x83f83e03,0xe03e03e0,0x3f87f83f,0x83f83f83,0xf83f8060,
2187 - 0x3fc60c60,0xc60c60c3,0x187f8318,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x883200,0x300c0000,0xc003035,0x80600000,
2188 - 0x30,0x66c03001,0xc0f81983,0xf86f0030,0x1f071c06,0x600787,0xfe1e001c,0x6261987f,0x86006067,0xfe7fc600,0x7fe06001,0x87c06006,
2189 - 0xf6646606,0x60e6067f,0xc3e00606,0x61986f6,0x600f007,0x600c00,0x30000000,0x21c71,0x830831c3,0x1c06031c,0x71c06003,0x6700c06,
2190 - 0x6671c318,0x71831c0f,0x16040c06,0xc318606,0x1b031803,0x80600600,0x60000000,0x30009000,0x300000,0x40040,0x7003e,0x67e0,0x90070090,
2191 - 0x9001818,0x8c3100,0x0,0x60,0x4000e730,0x900380f0,0x6034,0x80c018c7,0xfe060338,0xb0121,0x80c60000,0x909000,0x6008,0x1080006,
2192 - 0xc3f2000,0x2011,0x3180060,0x60060e0,0x19819819,0x81981981,0x9833c600,0x7fe7fe7f,0xe7fe0600,0x60060060,0x60664660,0x66066066,
2193 - 0x66063b8,0x62660660,0x66066060,0xf06066c0,0x21c21c21,0xc21c21c2,0x1c466308,0x31c31c31,0xc31c0600,0x60060060,0x31871c31,0x83183183,
2194 - 0x18318000,0x71860c60,0xc60c60c3,0x18718318,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x1981a00,0xe03e0000,0xc003044,
2195 - 0x40600000,0x60,0x66c03001,0x80f03182,0x1c7f8030,0x3f83fc06,0x601e07,0xfe078038,0x6661987f,0x86006067,0xfe7fc61e,0x7fe06001,
2196 - 0x87e06006,0x66666606,0x7fc6067f,0x81f80606,0x61986f6,0x6006006,0x600600,0x30000000,0xc60,0xc60060c6,0xc06060c,0x60c06003,
2197 - 0x6e00c06,0x6660c60c,0x60c60c0e,0x6000c06,0xc318666,0x1f031803,0x600600,0x603c2000,0x30016800,0x1fe0000,0x1f81f8,0x1c1f,0x804067e1,
2198 - 0x68060168,0x16800810,0xc42300,0x0,0x60,0x20c331,0x68030060,0x6064,0x3fc1040,0xf006031c,0xa011e,0x818c7fe0,0x909000,0x7fe1f,
2199 - 0x80f00006,0xc0f2060,0xf80e,0x18c0780,0x780781c0,0x19819819,0x81981981,0x9833c600,0x7fe7fe7f,0xe7fe0600,0x60060060,0xfc666660,
2200 - 0x66066066,0x66061f0,0x66660660,0x66066060,0x606066e0,0xc00c00,0xc00c00c0,0xc066600,0x60c60c60,0xc60c0600,0x60060060,0x60c60c60,
2201 - 0xc60c60c6,0xc60c000,0x61c60c60,0xc60c60c3,0x1860c318,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x1980f81,0x80373000,
2202 - 0xc003004,0x7fe0001,0xf0000060,0x60c03003,0x183180,0xc71c060,0x3181ec00,0x7000,0xe070,0x66619860,0xc6006066,0x60061e,0x60606001,
2203 - 0x87606006,0x66626606,0x7f860661,0xc01c0606,0x6198696,0xf00600e,0x600600,0x30000000,0x1fc60,0xc60060c7,0xfc06060c,0x60c06003,
2204 - 0x7c00c06,0x6660c60c,0x60c60c0c,0x7f00c06,0xc3b8666,0xe01b007,0x3c00600,0x3c7fe000,0xff03ec00,0x1fe0000,0x40040,0xe001,0xc0806603,
2205 - 0xec0e03ec,0x3ec00010,0x0,0x60000000,0x7f,0x10c3f3,0xec070060,0x6064,0x3fc1040,0x6000030c,0xa0100,0x3187fe1,0xf09f1000,0x7fe00,
2206 - 0x6,0xc012060,0x0,0xc63c03,0xc03c0380,0x19819819,0x81981981,0x98330600,0x60060060,0x6000600,0x60060060,0xfc662660,0x66066066,
2207 - 0x66060e0,0x6c660660,0x66066060,0x6060e630,0x1fc1fc1f,0xc1fc1fc1,0xfc3fe600,0x7fc7fc7f,0xc7fc0600,0x60060060,0x60c60c60,0xc60c60c6,
2208 - 0xc60c7fe,0x62c60c60,0xc60c60c1,0xb060c1b0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0xffe02c6,0x3c633000,0xc003004,
2209 - 0x7fe0001,0xf00000c0,0x60c03006,0xc6180,0xc60c060,0x60c00c00,0x7000,0xe060,0x66639c60,0x66006066,0x600606,0x60606001,0x86306006,
2210 - 0x66636606,0x60060660,0xc0060606,0x61f8696,0xf00600c,0x600300,0x30000000,0x3fc60,0xc60060c7,0xfc06060c,0x60c06003,0x7c00c06,
2211 - 0x6660c60c,0x60c60c0c,0x1f80c06,0xc1b0666,0xe01b00e,0x3c00600,0x3c43c000,0x3007de00,0x600000,0x40040,0x30000,0x61006607,0xde0c07de,
2212 - 0x7de00000,0x0,0xf07fefff,0x1f,0x8008c3f7,0xde0e0060,0x6064,0xc01047,0xfe00018c,0xb013f,0x86300061,0xf0911000,0x6000,0x6,
2213 - 0xc012060,0x3f,0x8063c0cc,0x3cc0c700,0x39c39c39,0xc39c39c1,0x98630600,0x60060060,0x6000600,0x60060060,0x60663660,0x66066066,
2214 - 0x66061f0,0x78660660,0x66066060,0x607fc618,0x3fc3fc3f,0xc3fc3fc3,0xfc7fe600,0x7fc7fc7f,0xc7fc0600,0x60060060,0x60c60c60,0xc60c60c6,
2215 - 0xc60c7fe,0x64c60c60,0xc60c60c1,0xb060c1b0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0xffe0260,0x6661b000,0xc003000,
2216 - 0x600000,0xc0,0x60c0300c,0xc7fe0,0xc60c060,0x60c01c00,0x1e07,0xfe078060,0x6663fc60,0x66006066,0x600606,0x60606001,0x86386006,
2217 - 0x6636606,0x60060660,0xe0060606,0x60f039c,0x1b806018,0x600300,0x30000000,0x70c60,0xc60060c6,0x6060c,0x60c06003,0x7600c06,
2218 - 0x6660c60c,0x60c60c0c,0x1c0c06,0xc1b03fc,0xe01f01c,0xe00600,0x70000000,0x3007fc00,0x600000,0x40040,0x0,0x62006607,0xfc1807fc,
2219 - 0x7fc00000,0x0,0xf0000000,0x1,0xc004c307,0xfc1c0060,0x6064,0xc018c0,0x600000d8,0x5f200,0x3180060,0x50a000,0x6000,0x6,0xc012000,
2220 - 0x0,0xc601c0,0x4201c600,0x3fc3fc3f,0xc3fc3fc3,0xfc7f0600,0x60060060,0x6000600,0x60060060,0x60663660,0x66066066,0x66063b8,
2221 - 0x70660660,0x66066060,0x607f860c,0x70c70c70,0xc70c70c7,0xcc60600,0x60060060,0x6000600,0x60060060,0x60c60c60,0xc60c60c6,0xc60c000,
2222 - 0x68c60c60,0xc60c60c1,0xf060c1f0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3300260,0x6661e000,0xc003000,0x600000,
2223 - 0x180,0x71c03018,0xc7fe0,0xc60c0c0,0x60c01800,0x787,0xfe1e0060,0x6663fc60,0x630060c6,0x600306,0x60606001,0x86186006,0x661e70e,
2224 - 0x60070c60,0x60060606,0x60f039c,0x19806038,0x600180,0x30000000,0x60c60,0xc60060c6,0x6060c,0x60c06003,0x6700c06,0x6660c60c,
2225 - 0x60c60c0c,0xc0c06,0xc1b039c,0x1f00e018,0x600600,0x60000000,0x1803f800,0x600000,0x40040,0x39e00,0x63006603,0xf83803f8,0x3f800000,
2226 - 0x0,0x60000000,0x0,0xc00cc303,0xf8180060,0x6064,0xc01fc0,0x60060070,0x40200,0x18c0060,0x402000,0x6000,0x6,0xc012000,0x0,0x18c0140,
2227 - 0x2014600,0x3fc3fc3f,0xc3fc3fc3,0xfc7f0300,0x60060060,0x6000600,0x60060060,0x60c61e70,0xe70e70e7,0xe70e71c,0x60e60660,0x66066060,
2228 - 0x6060060c,0x60c60c60,0xc60c60c6,0xcc60600,0x60060060,0x6000600,0x60060060,0x60c60c60,0xc60c60c6,0xc60c000,0x70c60c60,0xc60c60c0,
2229 - 0xe060c0e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x33022e0,0x6670c000,0xc003000,0x600600,0x60180,0x31803030,
2230 - 0x41c0184,0x1831c0c0,0x71c23806,0x6001e0,0x780000,0x62630c60,0xe38261c6,0x600386,0x60606043,0x860c6006,0x661e30c,0x60030c60,
2231 - 0x740e0607,0xe0f039c,0x31c06030,0x600180,0x30000000,0x61c71,0x830831c3,0x406031c,0x60c06003,0x6300c06,0x6660c318,0x71831c0c,
2232 - 0x41c0c07,0x1c0e039c,0x1b00e030,0x600600,0x60000000,0x1c41b00e,0x601cc0,0x401f8,0x45240,0xe1803601,0xb03001b0,0x1b000000,
2233 - 0x0,0x0,0x41,0xc008e711,0xb0300060,0x6034,0x80c02020,0x60060030,0x30c00,0xc60000,0x30c000,0x0,0x7,0x1c012000,0x0,0x3180240,
2234 - 0x6024608,0x30c30c30,0xc30c30c3,0xc630382,0x60060060,0x6000600,0x60060060,0x61c61e30,0xc30c30c3,0xc30c208,0x70c70e70,0xe70e70e0,
2235 - 0x6060068c,0x61c61c61,0xc61c61c6,0x1cc62308,0x30430430,0x43040600,0x60060060,0x31860c31,0x83183183,0x18318060,0x31c71c71,
2236 - 0xc71c71c0,0xe07180e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x2203fc0,0x663f6000,0x6006000,0x600600,0x60300,
2237 - 0x3f81fe7f,0xc7f80187,0xf83f80c0,0x3f83f006,0x600020,0x400060,0x33e6067f,0xc1fe7f87,0xfe6001fe,0x6063fc7f,0x60e7fe6,0x660e3f8,
2238 - 0x6001f860,0x37fc0603,0xfc06030c,0x30c0607f,0xe06000c0,0x30000000,0x7fc7f,0x83f83fc3,0xfc0603fc,0x60c7fe03,0x61807c6,0x6660c3f8,
2239 - 0x7f83fc0c,0x7f80fc3,0xfc0e039c,0x3180607f,0xc0600600,0x60000000,0xfc0e00c,0x601986,0x66040040,0x4527f,0xc0803fe0,0xe07fe0e0,
2240 - 0xe000000,0x0,0x0,0x7f,0x80107ff0,0xe07fc060,0x603f,0x83fe0000,0x60060018,0xf000,0x420000,0xf0000,0x7fe00,0x7,0xfe012000,
2241 - 0x0,0x2100640,0xc0643f8,0x60660660,0x66066067,0xec3e1fe,0x7fe7fe7f,0xe7fe3fc3,0xfc3fc3fc,0x7f860e3f,0x83f83f83,0xf83f8000,
2242 - 0x5fc3fc3f,0xc3fc3fc0,0x606006fc,0x7fc7fc7f,0xc7fc7fc7,0xfcffe3f8,0x3fc3fc3f,0xc3fc7fe7,0xfe7fe7fe,0x3f860c3f,0x83f83f83,
2243 - 0xf83f8060,0x7f83fc3f,0xc3fc3fc0,0x607f8060,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x2201f80,0x3c1e7000,0x6006000,
2244 - 0x600,0x60300,0xe01fe7f,0xc3f00183,0xe01f0180,0x1f01e006,0x600000,0x60,0x3006067f,0x807c7e07,0xfe6000f8,0x6063fc3e,0x6067fe6,
2245 - 0x660e0f0,0x6000f060,0x3bf80601,0xf806030c,0x60e0607f,0xe06000c0,0x30000000,0x1ec6f,0xf01ec0,0xf80601ec,0x60c7fe03,0x61c03c6,
2246 - 0x6660c1f0,0x6f01ec0c,0x3f007c1,0xcc0e030c,0x71c0c07f,0xc0600600,0x60000000,0x7804018,0xe01186,0x66040040,0x39e3f,0x80401fe0,
2247 - 0x407fe040,0x4000000,0x0,0x0,0x3f,0x203ce0,0x407fc060,0x601f,0x3fe0000,0x60060018,0x0,0x0,0x0,0x7fe00,0x6,0xe6012000,0x0,
2248 - 0x7e0,0x1807e1f0,0x60660660,0x66066066,0x6c3e07c,0x7fe7fe7f,0xe7fe3fc3,0xfc3fc3fc,0x7e060e0f,0xf00f00,0xf00f0000,0x8f01f81f,
2249 - 0x81f81f80,0x60600670,0x1ec1ec1e,0xc1ec1ec1,0xec79c0f0,0xf80f80f,0x80f87fe7,0xfe7fe7fe,0x1f060c1f,0x1f01f01,0xf01f0000,0x4f01cc1c,
2250 - 0xc1cc1cc0,0xc06f00c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200,0x0,0x6006000,0x600,0x600,0x0,0x0,0x0,0x0,
2251 - 0x600000,0x0,0x18000000,0x0,0x0,0x0,0x0,0x0,0x1800,0x0,0x0,0x0,0x600060,0x30000000,0x0,0x0,0xc,0x3,0x0,0x0,0x60000c00,0x0,
2252 - 0x0,0xc000,0x600600,0x60000000,0x18,0xc03100,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x0,0x601f8,0x0,0x0,0x0,0x0,0x6,
2253 - 0x12000,0x2000000,0x40,0x20004000,0x0,0x0,0x10,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2254 - 0x0,0xc06000c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200,0x0,0x2004000,0xc00,0x0,0x0,0x0,0x0,0x0,0xc00000,
2255 - 0x0,0x1c000000,0x0,0x0,0x0,0x0,0x0,0xc00,0x0,0x0,0x0,0x780000,0xf0000000,0x0,0x0,0x21c,0x3,0x0,0x0,0x60000c00,0x0,0x0,0xc000,
2256 - 0x7c0603,0xe0000000,0x10,0xc02300,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x0,0x601f0,0x0,0x0,0x0,0x0,0x6,0x12000,0x1000000,
2257 - 0x40,0x7e004000,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc06000c0,0x0,
2258 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200,0x0,0x300c000,0xc00,0x0,0x0,0x0,0x0,0x0,0xc00000,0x0,0x7800000,0x0,
2259 - 0x0,0x0,0x0,0x0,0x800,0x0,0x0,0x0,0x780000,0xf0000000,0x0,0x0,0x3f8,0x3e,0x0,0x0,0x60000c00,0x0,0x0,0x38000,0x3c0603,0xc0000000,
2260 - 0x10,0xfc00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x0,0x60000,0x0,0x0,0x0,0x0,0x6,0x0,0x1000000,0x0,0x0,0x0,0x0,
2261 - 0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x80600380,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2262 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xffc,0x0,
2263 - 0x0,0x1f0,0x3c,0x0,0x0,0x60000c00,0x0,0x0,0x38000,0x600,0x0,0x0,0xf000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2264 - 0x0,0x0,0x0,0x0,0x0,0x6,0x0,0xe000000,0x0,0x0,0x0,0x0,0x70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x70,0x0,0x0,0x0,0x0,
2265 - 0x0,0x0,0x0,0x3,0x80600380,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2266 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xffc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2267 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2268 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 };
2269 -
2270 - // Definition of a 16x32 font
2271 - const unsigned int font16x32[16*32*256/32] = {
2272 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2273 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2274 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc300000,0x0,0xc300000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2275 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x70000e0,0x3c00730,0xe7001c0,0x0,0x70000e0,0x3c00e70,0x70000e0,0x3c00e70,0x730,0x70000e0,0x3c00730,
2276 - 0xe700000,0x700,0xe003c0,0xe7000e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2277 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2278 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2279 - 0x0,0x0,0x6600000,0x0,0x6600000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2280 - 0x0,0x0,0x18001c0,0x6600ff0,0xe7003e0,0x0,0x18001c0,0x6600e70,0x18001c0,0x6600e70,0xff0,0x18001c0,0x6600ff0,0xe700000,0x180,
2281 - 0x1c00660,0xe7001c0,0x0,0x0,0x0,0x380,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2282 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2283 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,
2284 - 0x0,0x3c00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c00380,
2285 - 0xc300ce0,0xe700630,0x0,0x1c00380,0xc300e70,0x1c00380,0xc300e70,0xce0,0x1c00380,0xc300ce0,0xe700000,0x1c0,0x3800c30,0xe700380,
2286 - 0x0,0x0,0x0,0x7c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2287 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2288 - 0x0,0x0,0x0,0x0,0xe000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1800000,0x0,0x0,0x0,
2289 - 0x0,0x0,0x0,0x0,0x0,0xc300000,0x0,0xc300000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x700000,0x0,0x0,0x0,0x7c007c00,0x3e000000,
2290 - 0x0,0x0,0x630,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe000070,0x1800000,0xc60,0x0,0xe000070,0x1800000,0xe000070,
2291 - 0x1800000,0x0,0xe000070,0x1800000,0x0,0xe00,0x700180,0x70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2292 - 0x0,0x0,0x0,0x800000,0x0,0x600600,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2293 - 0x0,0x0,0x3f0,0xfc0,0x0,0x7000000,0x38000000,0x1c0000,0xfc0000,0x380001c0,0xe01c00,0x7f800000,0x0,0x0,0x0,0x0,0x0,0x0,0x7c,
2294 - 0x1801f00,0x0,0x0,0x1c,0x0,0x0,0x3c00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7300000,0x6600000,0x0,0x6600000,0x0,0x0,0x0,0x0,0xe700000,
2295 - 0x0,0x0,0x0,0x0,0x0,0xe00000,0x0,0x0,0x0,0xc000c00,0x43800000,0x0,0x0,0x630,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2296 - 0xf80,0x70000e0,0x3c00730,0xe700c60,0x0,0x70000e0,0x3c00e70,0x70000e0,0x3c00e70,0xe000730,0x70000e0,0x3c00730,0xe700000,0x700,
2297 - 0xe003c0,0xe7000e0,0x38000e70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x6300000,0x803c00,0x7c00180,
2298 - 0xc00300,0x1000000,0x0,0x1c,0x3c007c0,0xfc007e0,0xe01ff8,0x3f03ffc,0x7e007c0,0x0,0x0,0x7c0,0x1c0,0x7f8003f0,0x7f007ff8,0x7ff803f0,
2299 - 0x70381ffc,0xff0700e,0x7000783c,0x783807c0,0x7fc007c0,0x7fc00fc0,0x7fff7038,0x700ee007,0x780f780f,0x7ffc03f0,0x70000fc0,0x3c00000,
2300 - 0x3000000,0x38000000,0x1c0000,0x1fc0000,0x380001c0,0xe01c00,0x7f800000,0x0,0x0,0x0,0x0,0x0,0x0,0xfc,0x1801f80,0x0,0x1f80000,
2301 - 0x7e,0x0,0x0,0x2400000,0xfc00000,0x7ff0000,0x7ffc0000,0x0,0x0,0x0,0x0,0xf30fb0c,0x2400000,0x0,0x240780f,0x1c0,0xfc,0x780f,
2302 - 0x18003f0,0xe700000,0x7c00000,0x0,0xff0,0x3c00000,0x78007c0,0xc00000,0xff80000,0xf80,0x7c00000,0xc000c00,0x18001c0,0x1c001c0,
2303 - 0x1c001c0,0x1c003e0,0x7fe03f0,0x7ff87ff8,0x7ff87ff8,0x1ffc1ffc,0x1ffc1ffc,0x7f007838,0x7c007c0,0x7c007c0,0x7c00000,0x7c67038,
2304 - 0x70387038,0x7038780f,0x70001fe0,0x30000c0,0x2400f30,0xe700c60,0x0,0x30000c0,0x2400e70,0x30000c0,0x2400e70,0xf700f30,0x30000c0,
2305 - 0x2400f30,0xe700000,0x300,0xc00240,0xe7000c0,0x38000e70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,
2306 - 0x630018c,0x807e00,0xfe00180,0xc00300,0x1000000,0x0,0x38,0xff01fc0,0x3ff01ff0,0x1e01ff8,0x7f83ffc,0x1ff80ff0,0x0,0x0,0xff0,
2307 - 0x1f003e0,0x7fe00ff8,0x7fc07ff8,0x7ff80ff8,0x70381ffc,0xff0701c,0x7000783c,0x78381ff0,0x7fe01ff0,0x7fe01ff0,0x7fff7038,0x781ee007,
2308 - 0x3c1e380e,0x7ffc0380,0x380001c0,0x3c00000,0x1800000,0x38000000,0x1c0000,0x3c00000,0x380001c0,0xe01c00,0x3800000,0x0,0x0,
2309 - 0x0,0x7000000,0x0,0x0,0x1e0,0x18003c0,0x0,0x3fc0000,0x70,0x0,0x0,0x6600000,0x1ff00000,0x1fff0000,0x7ffc0000,0x0,0x0,0x0,0x0,
2310 - 0xcf0239c,0x3c00000,0x0,0x3c0380e,0x1c0,0x2001fe,0x380e,0x18007f8,0xe700000,0x8600000,0x0,0xff0,0x7e00000,0x8c00870,0x1800000,
2311 - 0x1ff80000,0x180,0xc600000,0xc000c00,0x38001c0,0x3e003e0,0x3e003e0,0x3e001c0,0x7fe0ff8,0x7ff87ff8,0x7ff87ff8,0x1ffc1ffc,0x1ffc1ffc,
2312 - 0x7fc07838,0x1ff01ff0,0x1ff01ff0,0x1ff00000,0x1fec7038,0x70387038,0x7038380e,0x70003ce0,0x1800180,0x6600cf0,0xe7007c0,0x0,
2313 - 0x1800180,0x6600e70,0x1800180,0x6600e70,0x7c00cf0,0x1800180,0x6600cf0,0xe700000,0x180,0x1800660,0xe700180,0x38000e70,0x0,
2314 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x630030c,0x3f0e700,0x1e200180,0x1800180,0x21100000,0x0,
2315 - 0x38,0x1e7819c0,0x38781038,0x1e01c00,0xf080038,0x1c381c38,0x0,0x0,0x1878,0x7fc03e0,0x70e01e18,0x70e07000,0x70001e18,0x703801c0,
2316 - 0x707038,0x70007c7c,0x7c381c70,0x70701c70,0x70703830,0x1c07038,0x381ce007,0x1c1c3c1e,0x3c0380,0x380001c0,0x7e00000,0xc00000,
2317 - 0x38000000,0x1c0000,0x3800000,0x38000000,0x1c00,0x3800000,0x0,0x0,0x0,0x7000000,0x0,0x0,0x1c0,0x18001c0,0x0,0x70c0000,0xe0,
2318 - 0x0,0x0,0xc300000,0x38300000,0x3c700000,0x3c0000,0x0,0x0,0x0,0x0,0xce022f4,0x1800000,0x0,0x1803c1e,0x1c0,0x2003c2,0x3c1e,
2319 - 0x1800e08,0x7e0,0x300000,0x0,0x7e00000,0xe700000,0x600030,0x3000000,0x3f980000,0x180,0x18200000,0xc000c00,0x1e0001c0,0x3e003e0,
2320 - 0x3e003e0,0x3e003e0,0xfe01e18,0x70007000,0x70007000,0x1c001c0,0x1c001c0,0x70e07c38,0x1c701c70,0x1c701c70,0x1c700000,0x3c787038,
2321 - 0x70387038,0x70383c1e,0x70003870,0xc00300,0xc300ce0,0x380,0x0,0xc00300,0xc300000,0xc00300,0xc300000,0xfc00ce0,0xc00300,0xc300ce0,
2322 - 0x0,0xc0,0x3000c30,0x300,0x38000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x630031c,0xff8c300,
2323 - 0x1c000180,0x1800180,0x39380000,0x0,0x70,0x1c3801c0,0x203c001c,0x3e01c00,0x1c000038,0x381c3838,0x0,0x0,0x1038,0xe0e03e0,0x70703c08,
2324 - 0x70707000,0x70003808,0x703801c0,0x707070,0x70007c7c,0x7c383838,0x70383838,0x70387010,0x1c07038,0x381c700e,0x1e3c1c1c,0x780380,
2325 - 0x1c0001c0,0xe700000,0x0,0x38000000,0x1c0000,0x3800000,0x38000000,0x1c00,0x3800000,0x0,0x0,0x0,0x7000000,0x0,0x0,0x1c0,0x18001c0,
2326 - 0x0,0xe000000,0xe0,0x0,0x1000100,0x3800,0x70100000,0x38700000,0x780000,0x1c0,0x7801ce0,0xe380000,0x0,0x2264,0x0,0x0,0x1c1c,
2327 - 0x0,0x200780,0x1c1c,0x1800c00,0x1818,0x7f00000,0x0,0x18180000,0xc300000,0x600070,0x0,0x7f980000,0x180,0x18300000,0xc000c00,
2328 - 0x3000000,0x3e003e0,0x3e003e0,0x3e003e0,0xee03c08,0x70007000,0x70007000,0x1c001c0,0x1c001c0,0x70707c38,0x38383838,0x38383838,
2329 - 0x38380000,0x38387038,0x70387038,0x70381c1c,0x7fc03870,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xbc00000,0x0,0x0,0x0,0x0,0x0,0x0,
2330 - 0x38000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x6300318,0xe88c300,0x1c000180,0x38001c0,
2331 - 0xfe00180,0x0,0x70,0x1c3801c0,0x1c001c,0x6e01c00,0x1c000078,0x381c3818,0x0,0x40000,0x40000038,0x1c0607e0,0x70703800,0x70707000,
2332 - 0x70003800,0x703801c0,0x7070e0,0x70007c7c,0x7c383838,0x70383838,0x70387000,0x1c07038,0x381c700e,0xf780e38,0x700380,0x1c0001c0,
2333 - 0x1c380000,0x0,0x38000000,0x1c0000,0x3800000,0x38000000,0x1c00,0x3800000,0x0,0x0,0x0,0x7000000,0x0,0x0,0x1c0,0x18001c0,0x0,
2334 - 0xe000000,0xe0,0x0,0x1000100,0x4400,0x70000000,0x38700000,0x700000,0xe0,0x7001c70,0xe380000,0x0,0x2264,0x0,0x0,0xe38,0x0,
2335 - 0x200700,0xe38,0x1800c00,0x300c,0xc300000,0x0,0x300c0000,0xc300180,0x6003c0,0x0,0x7f980000,0x180,0x18300000,0xc000c00,0x1800000,
2336 - 0x7e007e0,0x7e007e0,0x7e003e0,0xee03800,0x70007000,0x70007000,0x1c001c0,0x1c001c0,0x70707c38,0x38383838,0x38383838,0x38380000,
2337 - 0x38387038,0x70387038,0x70380e38,0x7ff039f0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1e00000,0x0,0x0,0x0,0x40000,0x0,0x0,0x38000000,
2338 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x6300318,0x1c80e700,0x1c000180,0x38001c0,0x3800180,
2339 - 0x0,0xe0,0x381c01c0,0x1c001c,0x6e01c00,0x38000070,0x381c381c,0x0,0x3c0000,0x78000078,0x38030770,0x70707800,0x70387000,0x70007000,
2340 - 0x703801c0,0x7071c0,0x7000745c,0x7638701c,0x7038701c,0x70387000,0x1c07038,0x1c38718e,0x7700f78,0xf00380,0xe0001c0,0x381c0000,
2341 - 0x7e0,0x39e003e0,0x79c03f0,0x3ffc079c,0x39e01fc0,0xfe01c1e,0x3807778,0x39e007e0,0x39e0079c,0x73c07e0,0x7ff83838,0x701ce007,
2342 - 0x783c701c,0x1ffc01c0,0x18001c0,0x0,0x1c000100,0xe0,0x0,0x1000100,0x4200,0x70000000,0x70700100,0xf00100,0x10000e0,0x7000c70,
2343 - 0xc700000,0x0,0x2204,0x7e00000,0x1e380100,0x1ffc0f78,0x0,0xf80700,0xf78,0x1800e00,0x63e6,0x18300000,0x0,0x6fe60000,0xe700180,
2344 - 0xc00060,0x3838,0x7f980000,0x180,0x18300000,0xc000c00,0x18001c0,0x7700770,0x7700770,0x77007f0,0xee07800,0x70007000,0x70007000,
2345 - 0x1c001c0,0x1c001c0,0x70387638,0x701c701c,0x701c701c,0x701c1008,0x707c7038,0x70387038,0x70380f78,0x707039c0,0x7e007e0,0x7e007e0,
2346 - 0x7e007e0,0x1f3c03e0,0x3f003f0,0x3f003f0,0x1fc01fc0,0x1fc01fc0,0x7f039e0,0x7e007e0,0x7e007e0,0x7e00380,0x7ce3838,0x38383838,
2347 - 0x3838701c,0x39e0701c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x6307fff,0x1c807e0c,0xe000180,
2348 - 0x30000c0,0x3800180,0x0,0xe0,0x381c01c0,0x1c001c,0xce01fe0,0x38000070,0x381c381c,0x3800380,0xfc0000,0x7e0000f0,0x30030770,
2349 - 0x70707000,0x70387000,0x70007000,0x703801c0,0x707380,0x700076dc,0x7638701c,0x7038701c,0x70387800,0x1c07038,0x1c3873ce,0x7f00770,
2350 - 0xe00380,0xe0001c0,0x700e0000,0x1ff8,0x3ff00ff0,0xffc0ff8,0x3ffc0ffc,0x3bf01fc0,0xfe01c3c,0x3807f78,0x3bf00ff0,0x3ff00ffc,
2351 - 0x77e0ff0,0x7ff83838,0x3838e007,0x3c783838,0x1ffc01c0,0x18001c0,0x0,0x7ff00380,0x1e0,0x0,0x1000100,0x4200,0x78000000,0x70700380,
2352 - 0xe00380,0x3800060,0xe000e30,0x1c600000,0x0,0x2204,0xff00000,0x7f7c0380,0x1ffc0770,0x1c0,0x3fc0700,0x18040770,0x1800780,0x4e12,
2353 - 0x18300104,0x0,0x4c320000,0x7e00180,0x1c00030,0x3838,0x7f980000,0x180,0x18302080,0xc000c00,0x18001c0,0x7700770,0x7700770,
2354 - 0x7700770,0x1ee07000,0x70007000,0x70007000,0x1c001c0,0x1c001c0,0x70387638,0x701c701c,0x701c701c,0x701c381c,0x705c7038,0x70387038,
2355 - 0x70380770,0x70383b80,0x1ff81ff8,0x1ff81ff8,0x1ff81ff8,0x3fbe0ff0,0xff80ff8,0xff80ff8,0x1fc01fc0,0x1fc01fc0,0xff83bf0,0xff00ff0,
2356 - 0xff00ff0,0xff00380,0xffc3838,0x38383838,0x38383838,0x3ff03838,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2357 - 0x0,0x1c0,0x7fff,0x1c803c38,0xf000000,0x70000e0,0xfe00180,0x0,0x1c0,0x381c01c0,0x3c0078,0xce01ff0,0x39e000f0,0x1c38381c,0x3800380,
2358 - 0x3e07ffc,0xf8001f0,0x307b0770,0x70e07000,0x70387000,0x70007000,0x703801c0,0x707700,0x700076dc,0x7638701c,0x7038701c,0x70387e00,
2359 - 0x1c07038,0x1c3873ce,0x3e007f0,0x1e00380,0x70001c0,0x0,0x1038,0x3c381e18,0x1c7c1e3c,0x3801e3c,0x3c7801c0,0xe01c78,0x380739c,
2360 - 0x3c781c38,0x3c381c3c,0x7c21e10,0x7003838,0x3838700e,0x1ef03838,0x3c01c0,0x18001c0,0x0,0x7fe007c0,0x1c0,0x0,0x1000100,0x6400,
2361 - 0x7e000000,0x707007c0,0x1e007c0,0x7c00070,0xe000638,0x18600000,0x0,0x0,0x1e100000,0x73ce07c0,0x3c07f0,0x1c0,0x7240700,0x1ddc3ffe,
2362 - 0x1800de0,0x8c01,0x1870030c,0x0,0x8c310000,0x3c00180,0x3800030,0x3838,0x7f980000,0x180,0x183030c0,0xc000c00,0x430001c0,0x7700770,
2363 - 0x7700770,0x7700770,0x1ce07000,0x70007000,0x70007000,0x1c001c0,0x1c001c0,0x70387638,0x701c701c,0x701c701c,0x701c1c38,0x70dc7038,
2364 - 0x70387038,0x703807f0,0x70383b80,0x10381038,0x10381038,0x10381038,0x21e71e18,0x1e3c1e3c,0x1e3c1e3c,0x1c001c0,0x1c001c0,0x1e383c78,
2365 - 0x1c381c38,0x1c381c38,0x1c380380,0x1c383838,0x38383838,0x38383838,0x3c383838,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2366 - 0x0,0x0,0x0,0x0,0x0,0x1c0,0x630,0x1e8000e0,0x1f000000,0x70000e0,0x39380180,0x0,0x1c0,0x3b9c01c0,0x3c07f0,0x18e01078,0x3bf800e0,
2367 - 0x7e0383c,0x3800380,0x1f807ffc,0x3f001c0,0x61ff0e38,0x7fc07000,0x70387ff0,0x7ff07000,0x7ff801c0,0x707f00,0x7000729c,0x7338701c,
2368 - 0x7070701c,0x70703fc0,0x1c07038,0x1e7873ce,0x1c003e0,0x3c00380,0x70001c0,0x0,0x1c,0x3c381c00,0x1c3c1c1c,0x3801c3c,0x383801c0,
2369 - 0xe01cf0,0x380739c,0x38381c38,0x3c381c3c,0x7801c00,0x7003838,0x3838700e,0xfe03c78,0x7801c0,0x18001c0,0x0,0x1c000c20,0xff8,
2370 - 0x0,0x1ff01ff0,0x3818,0x3fc00100,0x707e0c20,0x3c00c20,0xc200030,0xc000618,0x18c00000,0x0,0x0,0x1c000080,0xe1ce0c20,0x7803e0,
2371 - 0x1c0,0xe200700,0xff83ffe,0x1801878,0x9801,0x1cf0071c,0x7ffc0000,0x8c310000,0x7ffe,0x7000030,0x3838,0x3f980380,0x180,0xc6038e0,
2372 - 0x7f9c7f9c,0x3e1c01c0,0xe380e38,0xe380e38,0xe380f78,0x1cfc7000,0x7ff07ff0,0x7ff07ff0,0x1c001c0,0x1c001c0,0xfe387338,0x701c701c,
2373 - 0x701c701c,0x701c0e70,0x719c7038,0x70387038,0x703803e0,0x70383b80,0x1c001c,0x1c001c,0x1c001c,0xe71c00,0x1c1c1c1c,0x1c1c1c1c,
2374 - 0x1c001c0,0x1c001c0,0x1c383838,0x1c381c38,0x1c381c38,0x1c380000,0x3c383838,0x38383838,0x38383c78,0x3c383c78,0x0,0x0,0x0,0x0,
2375 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x630,0xf800380,0x3f830000,0x70000e0,0x31080180,0x0,0x380,0x3b9c01c0,
2376 - 0x7807e0,0x38e00038,0x3c3800e0,0xff01c3c,0x3800380,0x7c000000,0x7c03c0,0x61870e38,0x7fc07000,0x70387ff0,0x7ff070fc,0x7ff801c0,
2377 - 0x707f80,0x7000739c,0x7338701c,0x7ff0701c,0x7fe00ff0,0x1c07038,0xe7073ce,0x1c003e0,0x3800380,0x38001c0,0x0,0x1c,0x381c3800,
2378 - 0x381c380e,0x380381c,0x383801c0,0xe01de0,0x380739c,0x3838381c,0x381c381c,0x7001e00,0x7003838,0x1c70718e,0x7e01c70,0xf00380,
2379 - 0x18001e0,0x1e000000,0x1c001bb0,0xff8,0x0,0x1000100,0xe0,0xff00300,0x707e1bb0,0x3801bb0,0x1bb00010,0x8000308,0x30c00000,0x0,
2380 - 0x0,0x1e0000c0,0xe1ce1bb0,0xf003e0,0x1c0,0x1c203ff8,0x63003e0,0x180181c,0x9801,0xfb00e38,0x7ffc0000,0x8fc10000,0x7ffe,0xe000860,
2381 - 0x3838,0x1f980380,0x180,0x7c01c70,0x1f001f0,0x1f003c0,0xe380e38,0xe380e38,0xe380e38,0x1cfc7000,0x7ff07ff0,0x7ff07ff0,0x1c001c0,
2382 - 0x1c001c0,0xfe387338,0x701c701c,0x701c701c,0x701c07e0,0x731c7038,0x70387038,0x703803e0,0x70383980,0x1c001c,0x1c001c,0x1c001c,
2383 - 0xe73800,0x380e380e,0x380e380e,0x1c001c0,0x1c001c0,0x381c3838,0x381c381c,0x381c381c,0x381c0000,0x387c3838,0x38383838,0x38381c70,
2384 - 0x381c1c70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0xc30,0x7f00e00,0x33c30000,0x70000e0,0x1007ffe,
2385 - 0x0,0x380,0x3b9c01c0,0xf00078,0x30e0001c,0x3c1c01c0,0x1c381fdc,0x0,0x70000000,0x1c0380,0x63030e38,0x70707000,0x70387000,0x700070fc,
2386 - 0x703801c0,0x707b80,0x7000739c,0x7338701c,0x7fc0701c,0x7fc001f0,0x1c07038,0xe703e5c,0x3e001c0,0x7800380,0x38001c0,0x0,0x7fc,
2387 - 0x381c3800,0x381c380e,0x380381c,0x383801c0,0xe01fe0,0x380739c,0x3838381c,0x381c381c,0x7001fc0,0x7003838,0x1c70718e,0x7c01c70,
2388 - 0xe01f00,0x180007c,0x7f8c0000,0x7fc03fb8,0x1c0,0x0,0x1000100,0x700,0x1f00600,0x70703fb8,0x7803fb8,0x3fb80000,0x8000000,0x180,
2389 - 0x0,0x0,0x1fc00060,0xe1ce3fb8,0xe001c0,0x1c0,0x1c203ff8,0xc1801c0,0x180c,0x9801,0x1c70,0xc0000,0x8cc10000,0x180,0xfe007c0,
2390 - 0x3838,0x7980380,0xff0,0xe38,0x3e003e00,0x3e000380,0xe380e38,0xe380e38,0xe380e38,0x38e07000,0x70007000,0x70007000,0x1c001c0,
2391 - 0x1c001c0,0x70387338,0x701c701c,0x701c701c,0x701c03c0,0x731c7038,0x70387038,0x703801c0,0x703838e0,0x7fc07fc,0x7fc07fc,0x7fc07fc,
2392 - 0xe73800,0x380e380e,0x380e380e,0x1c001c0,0x1c001c0,0x381c3838,0x381c381c,0x381c381c,0x381c7ffc,0x38dc3838,0x38383838,0x38381c70,
2393 - 0x381c1c70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0xc60,0xf83878,0x71e30000,0x70000e0,0x1007ffe,
2394 - 0x7f0,0x380,0x381c01c0,0x1e0003c,0x60e0001c,0x381c01c0,0x381c079c,0x0,0x7c000000,0x7c0380,0x63031c1c,0x70307000,0x70387000,
2395 - 0x7000701c,0x703801c0,0x7071c0,0x7000739c,0x71b8701c,0x7000701c,0x71e00078,0x1c07038,0xe703e7c,0x7e001c0,0xf000380,0x38001c0,
2396 - 0x0,0x1ffc,0x381c3800,0x381c3ffe,0x380381c,0x383801c0,0xe01fc0,0x380739c,0x3838381c,0x381c381c,0x7000ff0,0x7003838,0x1ef03bdc,
2397 - 0x3800ee0,0x1e01f00,0x180007c,0x61fc0000,0x7fc07f3c,0x1c0,0x0,0x1000100,0x1800,0x780c00,0x70707f3c,0xf007f3c,0x7f3c0000,0x0,
2398 - 0x3c0,0x3ffcffff,0x0,0xff00030,0xe1fe7f3c,0x1e001c0,0x1c0,0x1c200700,0xc183ffe,0xe0c,0x9801,0x1ff038e0,0xc07f0,0x8c610000,
2399 - 0x180,0x0,0x3838,0x1980380,0x0,0x1ff0071c,0xe000e000,0xe0000f80,0x1c1c1c1c,0x1c1c1c1c,0x1c1c1e38,0x38e07000,0x70007000,0x70007000,
2400 - 0x1c001c0,0x1c001c0,0x703871b8,0x701c701c,0x701c701c,0x701c03c0,0x761c7038,0x70387038,0x703801c0,0x70703870,0x1ffc1ffc,0x1ffc1ffc,
2401 - 0x1ffc1ffc,0xfff3800,0x3ffe3ffe,0x3ffe3ffe,0x1c001c0,0x1c001c0,0x381c3838,0x381c381c,0x381c381c,0x381c7ffc,0x389c3838,0x38383838,
2402 - 0x38380ee0,0x381c0ee0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0xfffc,0xbc60fc,0x70e30000,0x70000e0,
2403 - 0x180,0x7f0,0x700,0x381c01c0,0x3e0001c,0x7ffc001c,0x381c03c0,0x381c001c,0x0,0x1f807ffc,0x3f00380,0x63031ffc,0x70387000,0x70387000,
2404 - 0x7000701c,0x703801c0,0x7071e0,0x7000701c,0x71b8701c,0x7000701c,0x70f00038,0x1c07038,0x7e03e7c,0x77001c0,0xe000380,0x1c001c0,
2405 - 0x0,0x3c1c,0x381c3800,0x381c3ffe,0x380381c,0x383801c0,0xe01fe0,0x380739c,0x3838381c,0x381c381c,0x70003f8,0x7003838,0xee03bdc,
2406 - 0x3c00ee0,0x3c00380,0x18000e0,0xf00000,0x1c007e7c,0x3c0,0x0,0x1000100,0x0,0x381800,0x70707e7c,0xe007e7c,0x7e7c0000,0x0,0x7c0,
2407 - 0x0,0x0,0x3f80018,0xe1fe7e7c,0x3c001c0,0x1c0,0x1c200700,0xc183ffe,0xf0c,0x8c01,0x38e0,0xc07f0,0x8c710000,0x180,0x0,0x3838,
2408 - 0x1980000,0x0,0x71c,0x7000f0,0x700f00,0x1ffc1ffc,0x1ffc1ffc,0x1ffc1ffc,0x3fe07000,0x70007000,0x70007000,0x1c001c0,0x1c001c0,
2409 - 0x703871b8,0x701c701c,0x701c701c,0x701c07e0,0x7c1c7038,0x70387038,0x703801c0,0x7ff03838,0x3c1c3c1c,0x3c1c3c1c,0x3c1c3c1c,
2410 - 0x3fff3800,0x3ffe3ffe,0x3ffe3ffe,0x1c001c0,0x1c001c0,0x381c3838,0x381c381c,0x381c381c,0x381c0000,0x391c3838,0x38383838,0x38380ee0,
2411 - 0x381c0ee0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfffc,0x9c01ce,0x70f60000,0x70000e0,0x180,
2412 - 0x0,0x700,0x381c01c0,0x780001c,0x7ffc001c,0x381c0380,0x381c003c,0x0,0x3e07ffc,0xf800380,0x63031ffc,0x70387000,0x70387000,
2413 - 0x7000701c,0x703801c0,0x7070f0,0x7000701c,0x71b8701c,0x7000701c,0x70700038,0x1c07038,0x7e03e7c,0xf7801c0,0x1e000380,0x1c001c0,
2414 - 0x0,0x381c,0x381c3800,0x381c3800,0x380381c,0x383801c0,0xe01fe0,0x380739c,0x3838381c,0x381c381c,0x7000078,0x7003838,0xee03a5c,
2415 - 0x7c00fe0,0x78001c0,0x18001c0,0x0,0x1c003ef8,0x380,0x0,0x1000100,0x810,0x383000,0x70703ef8,0x1e003ef8,0x3ef80000,0x0,0x7c0,
2416 - 0x0,0x0,0x78000c,0xe1c03ef8,0x78001c0,0x1c0,0x1c200700,0x63001c0,0x18003f8,0x4e12,0x1c70,0xc0000,0x4c320000,0x180,0x0,0x3838,
2417 - 0x1980000,0x0,0xe38,0x700118,0x701e00,0x1ffc1ffc,0x1ffc1ffc,0x1ffc1ffc,0x7fe07000,0x70007000,0x70007000,0x1c001c0,0x1c001c0,
2418 - 0x703871b8,0x701c701c,0x701c701c,0x701c0e70,0x7c1c7038,0x70387038,0x703801c0,0x7fc0381c,0x381c381c,0x381c381c,0x381c381c,
2419 - 0x78e03800,0x38003800,0x38003800,0x1c001c0,0x1c001c0,0x381c3838,0x381c381c,0x381c381c,0x381c0000,0x3b1c3838,0x38383838,0x38380fe0,
2420 - 0x381c0fe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1860,0x9c0186,0x707e0000,0x30000c0,0x180,
2421 - 0x0,0xe00,0x183801c0,0xf00001c,0xe0001c,0x181c0380,0x381c0038,0x0,0xfc0000,0x7e000000,0x61873c1e,0x70383800,0x70707000,0x7000381c,
2422 - 0x703801c0,0x707070,0x7000701c,0x70f83838,0x70003838,0x70780038,0x1c07038,0x7e03c3c,0xe3801c0,0x1c000380,0xe001c0,0x0,0x381c,
2423 - 0x381c3800,0x381c3800,0x380381c,0x383801c0,0xe01ef0,0x380739c,0x3838381c,0x381c381c,0x7000038,0x7003838,0xfe03e7c,0xfe007c0,
2424 - 0x70001c0,0x18001c0,0x0,0xe001ff0,0x380,0x0,0x1000100,0x162c,0x381800,0x30701ff0,0x1c001ff0,0x1ff00000,0x0,0x3c0,0x0,0x0,
2425 - 0x380018,0xe1c01ff0,0x70001c0,0x1c0,0x1c200700,0xff801c0,0x18000f0,0x63e6,0xe38,0x0,0x6c3e0000,0x0,0x0,0x3838,0x1980000,0x0,
2426 - 0x1c70,0xf0000c,0xf01c00,0x3c1e3c1e,0x3c1e3c1e,0x3c1e3c1c,0x70e03800,0x70007000,0x70007000,0x1c001c0,0x1c001c0,0x707070f8,
2427 - 0x38383838,0x38383838,0x38381c38,0x38387038,0x70387038,0x703801c0,0x7000381c,0x381c381c,0x381c381c,0x381c381c,0x70e03800,
2428 - 0x38003800,0x38003800,0x1c001c0,0x1c001c0,0x381c3838,0x381c381c,0x381c381c,0x381c0380,0x3e1c3838,0x38383838,0x383807c0,0x381c07c0,
2429 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18c0,0x9c0186,0x783c0000,0x38001c0,0x180,0x3800000,
2430 - 0x3800e00,0x1c3801c0,0x1e00003c,0xe00038,0x1c1c0780,0x381c0038,0x3800380,0x3c0000,0x78000000,0x61ff380e,0x70383808,0x70707000,
2431 - 0x7000381c,0x703801c0,0x40707078,0x7000701c,0x70f83838,0x70003838,0x70384038,0x1c07038,0x7e03c3c,0x1e3c01c0,0x3c000380,0xe001c0,
2432 - 0x0,0x383c,0x3c381c00,0x1c3c1c00,0x3801c3c,0x383801c0,0xe01c78,0x380739c,0x38381c38,0x3c381c3c,0x7000038,0x7003878,0x7c01e78,
2433 - 0x1ef007c0,0xf0001c0,0x18001c0,0x0,0xe000ee0,0x7800380,0xe380000,0x1001ff0,0x2242,0x40380c00,0x38700ee0,0x3c000ee0,0xee00000,
2434 - 0x0,0x0,0x0,0x0,0x380030,0xe1c00ee0,0xf0001c0,0x1c0,0xe200700,0xdd801c0,0x1800038,0x300c,0x71c,0x0,0x300c0000,0x0,0x0,0x3838,
2435 - 0x1980000,0x0,0x38e0,0xb0000c,0xb01c08,0x380e380e,0x380e380e,0x380e380e,0x70e03808,0x70007000,0x70007000,0x1c001c0,0x1c001c0,
2436 - 0x707070f8,0x38383838,0x38383838,0x3838381c,0x38387038,0x70387038,0x703801c0,0x7000381c,0x383c383c,0x383c383c,0x383c383c,
2437 - 0x70e01c00,0x1c001c00,0x1c001c00,0x1c001c0,0x1c001c0,0x1c383838,0x1c381c38,0x1c381c38,0x1c380380,0x1c383878,0x38783878,0x387807c0,
2438 - 0x3c3807c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x18c0,0x10b801ce,0x3c3e0000,0x38001c0,0x180,
2439 - 0x3800000,0x3801c00,0x1e7801c0,0x3c002078,0xe02078,0x1c380700,0x1c3810f0,0x3800380,0x40000,0x40000380,0x307b380e,0x70701e18,
2440 - 0x70e07000,0x70001c1c,0x703801c0,0x60e0703c,0x7000701c,0x70f83c78,0x70003c70,0x703c70f0,0x1c03870,0x3c01c3c,0x3c1c01c0,0x78000380,
2441 - 0x7001c0,0x0,0x3c7c,0x3c381e18,0x1c7c1e0c,0x3801c3c,0x383801c0,0xe01c38,0x3c0739c,0x38381c38,0x3c381c3c,0x7001078,0x7803c78,
2442 - 0x7c01c38,0x1c780380,0x1e0001c0,0x18001c0,0x0,0x70c06c0,0x7000380,0xe300000,0x1000100,0x2142,0x70f00600,0x3c7006c0,0x780006c0,
2443 - 0x6c00000,0x0,0x0,0x0,0x0,0x10780060,0x73e206c0,0x1e0001c0,0x1c0,0x7240700,0x180c01c0,0x1800018,0x1818,0x30c,0x0,0x18180000,
2444 - 0x0,0x0,0x3c78,0x1980000,0x0,0x30c0,0x130000c,0x1301c18,0x380e380e,0x380e380e,0x380e380e,0x70e01e18,0x70007000,0x70007000,
2445 - 0x1c001c0,0x1c001c0,0x70e070f8,0x3c783c78,0x3c783c78,0x3c781008,0x7c783870,0x38703870,0x387001c0,0x70003a3c,0x3c7c3c7c,0x3c7c3c7c,
2446 - 0x3c7c3c7c,0x79f11e18,0x1e0c1e0c,0x1e0c1e0c,0x1c001c0,0x1c001c0,0x1c783838,0x1c381c38,0x1c381c38,0x1c380380,0x1c383c78,0x3c783c78,
2447 - 0x3c780380,0x3c380380,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x38c0,0x1ff800fc,0x1fee0000,
2448 - 0x1800180,0x180,0x3800000,0x3801c00,0xff01ffc,0x3ffc3ff0,0xe03ff0,0xff00700,0x1ff81fe0,0x3800380,0x0,0x380,0x3000780f,0x7ff00ff8,
2449 - 0x7fc07ff8,0x70000ffc,0x70381ffc,0x7fe0701c,0x7ff8701c,0x70781ff0,0x70001ff0,0x701c7ff0,0x1c01fe0,0x3c01c38,0x380e01c0,0x7ffc0380,
2450 - 0x7001c0,0x0,0x1fdc,0x3ff00ff0,0xffc0ffc,0x3800fdc,0x38383ffe,0xe01c3c,0x1fc739c,0x38380ff0,0x3ff00ffc,0x7001ff0,0x3f81fb8,
2451 - 0x7c01c38,0x3c3c0380,0x1ffc01c0,0x18001c0,0x0,0x3fc0380,0x7000380,0xc70718c,0x1000100,0x2244,0x7ff00200,0x1fff0380,0x7ffc0380,
2452 - 0x3800000,0x0,0x0,0x0,0x0,0x1ff000c0,0x7f7e0380,0x1ffc01c0,0x1c0,0x3fc3ffe,0x1c0,0x1800018,0x7e0,0x104,0x0,0x7e00000,0x7ffe,
2453 - 0x0,0x3fde,0x1980000,0x0,0x2080,0x3300018,0x3300ff0,0x780f780f,0x780f780f,0x780f780e,0xf0fe0ff8,0x7ff87ff8,0x7ff87ff8,0x1ffc1ffc,
2454 - 0x1ffc1ffc,0x7fc07078,0x1ff01ff0,0x1ff01ff0,0x1ff00000,0x7ff01fe0,0x1fe01fe0,0x1fe001c0,0x70003bf8,0x1fdc1fdc,0x1fdc1fdc,
2455 - 0x1fdc1fdc,0x3fbf0ff0,0xffc0ffc,0xffc0ffc,0x3ffe3ffe,0x3ffe3ffe,0xff03838,0xff00ff0,0xff00ff0,0xff00000,0x3ff01fb8,0x1fb81fb8,
2456 - 0x1fb80380,0x3ff00380,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x31c0,0x7e00078,0x7cf0000,0x1800180,
2457 - 0x0,0x3800000,0x3803800,0x3c01ffc,0x3ffc0fe0,0xe01fc0,0x3e00e00,0x7e00f80,0x3800380,0x0,0x380,0x18007007,0x7fc003f0,0x7f007ff8,
2458 - 0x700003f0,0x70381ffc,0x3f80701e,0x7ff8701c,0x707807c0,0x700007c0,0x701e1fc0,0x1c00fc0,0x3c01818,0x780f01c0,0x7ffc0380,0x3801c0,
2459 - 0x0,0xf9c,0x39e003e0,0x79c03f0,0x380079c,0x38383ffe,0xe01c1e,0x7c739c,0x383807e0,0x39e0079c,0x7000fc0,0x1f80f38,0x3801c38,
2460 - 0x781e0380,0x1ffc01c0,0x18001c0,0x0,0x1f80100,0xe000700,0x1c60718c,0x1000100,0x1e3c,0x1fc00100,0x7ff0100,0x7ffc0100,0x1000000,
2461 - 0x0,0x0,0x0,0x0,0xfc00080,0x3e3c0100,0x1ffc01c0,0x1c0,0xf83ffe,0x1c0,0x1800838,0x0,0x0,0x0,0x0,0x7ffe,0x0,0x3b9e,0x1980000,
2462 - 0x0,0x0,0x2300038,0x23003e0,0x70077007,0x70077007,0x70077007,0xe0fe03f0,0x7ff87ff8,0x7ff87ff8,0x1ffc1ffc,0x1ffc1ffc,0x7f007078,
2463 - 0x7c007c0,0x7c007c0,0x7c00000,0xc7c00fc0,0xfc00fc0,0xfc001c0,0x700039f0,0xf9c0f9c,0xf9c0f9c,0xf9c0f9c,0x1f1e03e0,0x3f003f0,
2464 - 0x3f003f0,0x3ffe3ffe,0x3ffe3ffe,0x7e03838,0x7e007e0,0x7e007e0,0x7e00000,0x63e00f38,0xf380f38,0xf380380,0x39e00380,0x0,0x0,
2465 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800000,0x0,0xc00300,0x0,0x3000000,0x3800,0x0,0x0,0x0,0x0,
2466 - 0x0,0x300,0x0,0x0,0x1c000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe0,0x0,0x0,0x0,0x0,0x380,0x3801c0,0x0,0x0,0x0,0x0,0x1c,0x0,0xe00000,
2467 - 0x0,0x0,0x3800001c,0x0,0x0,0x0,0x700,0x1c0,0x18001c0,0x0,0x0,0xe000700,0x18600000,0x1000100,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2468 - 0x0,0x0,0x0,0x0,0x0,0x200000,0x0,0x1800ff0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x1980000,0x1800000,0x0,0x6300070,0x6300000,0x0,
2469 - 0x0,0x0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000000,
2470 - 0x0,0x700,0x38000700,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800000,0x0,0xc00300,0x0,0x7000000,
2471 - 0x7000,0x0,0x0,0x0,0x0,0x0,0x700,0x0,0x0,0xf040000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x78,0x0,0x0,0x0,0x0,0x3f0,0x1c0fc0,0x0,0x0,
2472 - 0x0,0x0,0x1c,0x0,0xe00000,0x0,0x0,0x3800001c,0x0,0x0,0x0,0x700,0x1e0,0x18003c0,0x0,0x0,0xc000700,0x18c00000,0x1000000,0x0,
2473 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200000,0x0,0x18007e0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x1980000,0xc00000,
2474 - 0x0,0x7f800e0,0x7f80000,0x0,0x0,0x0,0x60,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x60,0x0,0x0,0x0,0x0,
2475 - 0x0,0x0,0x0,0x0,0x0,0x0,0x700,0x38000700,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800000,
2476 - 0x0,0x600600,0x0,0x6000000,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x7fc0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30,0x0,0x0,0x0,0x0,
2477 - 0x3f0,0xfc0,0x0,0x0,0x0,0x0,0x838,0x0,0x1e00000,0x0,0x0,0x3800001c,0x0,0x0,0x0,0xf00,0xfc,0x1801f80,0x0,0x0,0x8008e00,0x30c00000,
2478 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200000,0x0,0x1800000,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x1980000,0xc00000,
2479 - 0x0,0x3001c0,0x300000,0x0,0x0,0x0,0x60,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x60,0x0,0x0,0x0,0x0,0x0,
2480 - 0x0,0x0,0x0,0x0,0x0,0xf00,0x38000f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800000,0x0,
2481 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfc0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2482 - 0x0,0x0,0xff0,0x0,0x1fc00000,0x0,0x0,0x3800001c,0x0,0x0,0x0,0x3e00,0x7c,0x1801f00,0x0,0x0,0x800fe00,0x0,0x0,0x0,0x0,0x0,0x0,
2483 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200000,0x0,0x1800000,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x0,0x7c00000,0x0,0x3001fc,0x300000,
2484 - 0x0,0x0,0x0,0x3e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2485 - 0x3e00,0x38003e00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2486 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfff8,0x0,0x0,0x0,0x7e0,0x0,0x1f000000,
2487 - 0x0,0x0,0x3800001c,0x0,0x0,0x0,0x3c00,0x0,0x1800000,0x0,0x0,0x7800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2488 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x0,0x7800000,0x0,0x0,0x0,0x0,0x0,0x0,0x3c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2489 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00,0x38003c00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2490 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2491 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfff8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1800000,0x0,0x0,0x0,0x0,
2492 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2493 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2494 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2495 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2496 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2497 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2498 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2499 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2500 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2501 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2502 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0 };
2503 -
2504 - // Definition of a 19x38 font
2505 - const unsigned int font19x38[19*38*256/32] = {
2506 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2507 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2508 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c380000,0x0,0x1c380,0x0,0x0,0x0,0x0,0x0,
2509 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800007,0x3c003,0x86000000,
2510 - 0x1e00000,0x3,0x80000700,0x3c00000,0x380000,0x70003c00,0x0,0xe1800e,0x1c00,0xf000e18,0x0,0x0,0x700000e0,0x780000,0x7000,0x0,
2511 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2512 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2513 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2514 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe700000,0x0,0xe700,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x38e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2515 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0000e,0x7e003,0xe60071c0,0x7f80000,0x1,0xc0000e00,0x7e0038e,0x1c0000,
2516 - 0xe0007e00,0x38e00000,0xf98007,0x3800,0x1f800f98,0x1c70000,0x0,0x380001c0,0xfc0071,0xc000e000,0x0,0x0,0x0,0x0,0x3e00000,0x0,
2517 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2518 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2519 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2520 - 0x0,0x0,0x0,0x7e00000,0x0,0x7e00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x38e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2521 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe0001c,0xe7006,0x7c0071c0,0xe180000,0x0,0xe0001c00,0xe70038e,0xe0001,0xc000e700,0x38e00000,
2522 - 0x19f0003,0x80007000,0x39c019f0,0x1c70000,0x0,0x1c000380,0x1ce0071,0xc001c000,0x0,0x0,0x0,0x0,0x7f00000,0x0,0x0,0x0,0x0,0x0,
2523 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2524 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2525 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,
2526 - 0x0,0x3c00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x38e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2527 - 0x0,0x0,0x700038,0x1c3806,0x3c0071c0,0xc0c0000,0x0,0x70003800,0x1c38038e,0x70003,0x8001c380,0x38e00000,0x18f0001,0xc000e000,
2528 - 0x70e018f0,0x1c70000,0x0,0xe000700,0x3870071,0xc0038000,0x0,0x0,0x0,0x0,0xe380000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2529 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2530 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2531 - 0xe000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x60000000,0x0,0x0,
2532 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c38,0x0,0x1,0xc3800000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c00000,0x0,0x0,0x0,
2533 - 0x0,0x0,0x0,0x0,0x0,0x0,0xc0c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe000003,0x80018000,0x0,0xc180000,
2534 - 0xe,0x380,0x1800000,0xe00000,0x38001800,0x0,0x38,0xe00,0x6000000,0x0,0x1,0xc0000070,0x300000,0x3800,0x0,0x0,0x0,0x0,0x0,0x0,
2535 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2536 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7000000,0x0,0x0,0x0,0x0,0x0,0x0,
2537 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x78c00,0xc30,
2538 - 0x0,0x0,0xc3000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800000,0x0,0x0,0x0,0xe0,0x1c000f,0xc0000000,0x0,0x0,
2539 - 0x0,0xc0c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7000007,0x3c003,0xc6000000,0xc180000,0x7,0x700,
2540 - 0x3c00000,0x700000,0x70003c00,0x0,0xf1801c,0x1c00,0xf000f18,0x0,0x0,0xe00000e0,0x780000,0x7000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2541 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x1c007000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2542 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfe0000,0xfe000,0x0,0x3800000,0x700000,0x38,
2543 - 0x7,0xe000001c,0x1c00,0x1c00700,0x7fc0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf800e,0x3e0000,0x0,0x0,0x0,0x1e00000,0x0,0x1,
2544 - 0xf8000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7cc00,0x660,0x0,0x0,0x66000000,0x0,0x0,0x0,0x0,0x7,0x1c000000,0x0,0x0,0x0,0x3fe00000,
2545 - 0x0,0x0,0x7000000,0x0,0x0,0x0,0x3e0,0x7c001f,0xe0000000,0x0,0x0,0x0,0xe1c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2546 - 0x0,0x0,0x0,0x1f80,0x380000e,0x7e007,0xe60071c0,0xc180000,0x3,0x80000e00,0x7e0038e,0x380000,0xe0007e00,0x38e00f00,0x1f9800e,
2547 - 0x3800,0x1f801f98,0x1c70000,0x0,0x700001c0,0xfc0071,0xc000e007,0x38e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2548 - 0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x1c7000,0x61c00600,0x1e00007e,0x70000,0x18003000,0x1800000,0x0,0x0,0x1c01f0,0x7e003f,0xc003f800,
2549 - 0x1e03ffc,0x7f01ff,0xfc03f000,0x7e000000,0x0,0x0,0xfc0,0x1e,0x7fe000,0x7e03fe00,0x3fff07ff,0xe007e038,0x383ffe0,0xff81c01,
2550 - 0xe1c000f8,0xf8f00e0,0xfc01ffc,0x3f00ff,0xc000fe07,0xfffc7007,0x1c007700,0x73c01ef,0x78ffff,0xfe0380,0xfe000,0x38000000,0x1800000,
2551 - 0x700000,0x38,0x1f,0xe000001c,0x1c00,0x1c00700,0x7fc0000,0x0,0x0,0x0,0x0,0x1c000000,0x0,0x0,0x0,0x3f800e,0x3f8000,0x0,0xfc0000,
2552 - 0x0,0x7f00000,0x0,0x1,0x98000000,0x7f00000,0x3ffe00,0xffff0,0x0,0x0,0x0,0x0,0x0,0xcf81f,0xee3807e0,0x0,0x0,0x7e03c01e,0x1c,
2553 - 0x0,0x1f800000,0xf0078038,0xfc007,0x1c000000,0xfe00000,0x0,0x0,0x3fe000f0,0xf,0xc001f800,0x6000000,0xffc000,0x0,0x1c0007e0,
2554 - 0x360,0x6c0010,0x70000700,0xf0001e,0x3c000,0x78000f00,0x7f800ff,0xf007e01f,0xff83fff0,0x7ffe0fff,0xc1fff03f,0xfe07ffc0,0xfff83fc0,
2555 - 0x7807007,0xe000fc00,0x1f8003f0,0x7e0000,0x1f867,0x70e00e,0x1c01c380,0x38f00787,0x3fe0,0x180000c,0x66006,0x7c0071c0,0xe380000,
2556 - 0x1,0x80000c00,0x660038e,0x180000,0xc0006600,0x38e0078e,0x19f0006,0x3000,0x198019f0,0x1c70000,0x0,0x30000180,0xcc0071,0xc000c007,
2557 - 0x38e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x1c7000,0x61800600,0x7f8001ff,0x70000,
2558 - 0x38003800,0x1800000,0x0,0x0,0x3807fc,0x1fe00ff,0xf00ffe00,0x3e03ffc,0xff81ff,0xfc07fc01,0xff800000,0x0,0x0,0x3fe0,0xfe001e,
2559 - 0x7ff801,0xff83ff80,0x3fff07ff,0xe01ff838,0x383ffe0,0xff81c03,0xc1c000f8,0xf8f80e0,0x3ff01fff,0xffc0ff,0xf003ff87,0xfffc7007,
2560 - 0x1e00f700,0x71c03c7,0x70ffff,0xfe01c0,0xfe000,0x7c000000,0xc00000,0x700000,0x38,0x3f,0xe000001c,0x1c00,0x1c00700,0x7fc0000,
2561 - 0x0,0x0,0x0,0x0,0x1c000000,0x0,0x0,0x0,0x3f800e,0x3f8000,0x0,0x3fe0000,0x0,0xff00000,0x0,0x3,0xc000000,0x1ffc0000,0xfffe00,
2562 - 0xffff0,0x0,0x0,0x0,0x0,0x0,0xc781f,0xee3803c0,0x0,0x0,0x3c01c01c,0x1c,0xc000,0x7fc00000,0x70070038,0x3fe007,0x1c000000,0x1ff80000,
2563 - 0x0,0x0,0x3fe003fc,0x1f,0xe003fc00,0xc000000,0x3ffc000,0x0,0x7c000ff0,0x60,0xc0000,0x30000700,0xf0001e,0x3c000,0x78000f00,
2564 - 0x3f000ff,0xf01ff81f,0xff83fff0,0x7ffe0fff,0xc1fff03f,0xfe07ffc0,0xfff83ff8,0x7c0701f,0xf803ff00,0x7fe00ffc,0x1ff8000,0x7fe67,
2565 - 0x70e00e,0x1c01c380,0x38700707,0x7ff0,0xc00018,0xc3006,0x3c0071c0,0x7f00000,0x0,0xc0001800,0xc30038e,0xc0001,0x8000c300,0x38e003fc,
2566 - 0x18f0003,0x6000,0x30c018f0,0x1c70000,0x0,0x18000300,0x1860071,0xc0018007,0x38e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2567 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x1c7000,0xe1801fc0,0x618001ff,0x70000,0x30001800,0x21840000,0x0,0x0,0x380ffe,0x1fe00ff,
2568 - 0xfc0fff00,0x3e03ffc,0x1ff81ff,0xfc0ffe03,0xffc00000,0x0,0x0,0x7ff0,0x3ff803f,0x7ffc03,0xffc3ffc0,0x3fff07ff,0xe03ffc38,0x383ffe0,
2569 - 0xff81c07,0x81c000f8,0xf8f80e0,0x7ff81fff,0x81ffe0ff,0xf80fff87,0xfffc7007,0xe00e700,0x70e0387,0x80f0ffff,0xe001c0,0xe000,
2570 - 0xfe000000,0xe00000,0x700000,0x38,0x3c,0x1c,0x1c00,0x1c00700,0x1c0000,0x0,0x0,0x0,0x0,0x1c000000,0x0,0x0,0x0,0x78000e,0x3c000,
2571 - 0x0,0x7ff0000,0x0,0xf100000,0x0,0x7,0xe000000,0x7ffc0000,0x1fffe00,0xffff0,0x0,0x0,0x0,0x0,0x0,0x3,0xf780180,0x0,0x0,0x1801e03c,
2572 - 0x1c,0xc000,0xffc00000,0x780f0038,0x786000,0x7f00,0x18380000,0x0,0xfe00,0x30c,0x10,0x70020e00,0x1c000000,0x7f8c000,0x0,0x6c001c38,
2573 - 0x60,0xc0000,0x70000700,0x1f8003f,0x7e000,0xfc001f80,0x3f000ff,0xf03ffc1f,0xff83fff0,0x7ffe0fff,0xc1fff03f,0xfe07ffc0,0xfff83ffc,
2574 - 0x7c0703f,0xfc07ff80,0xfff01ffe,0x3ffc000,0xffec7,0x70e00e,0x1c01c380,0x38780f07,0xf070,0xe00038,0x1c3800,0x0,0x3e00000,0x0,
2575 - 0xe0003800,0x1c380000,0xe0003,0x8001c380,0x3e0,0x3,0x8000e000,0x70e00000,0x0,0x0,0x1c000700,0x3870000,0x38007,0x0,0x0,0x0,
2576 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x1c7000,0xe3807ff0,0xc0c003c1,0x70000,0x70001c00,
2577 - 0x718e0000,0x0,0x0,0x700f1e,0x1ce00c0,0x3c0c0f80,0x7e03800,0x3e08000,0x381e0f03,0xc1e00000,0x0,0x0,0x7078,0x783c03f,0x701e07,
2578 - 0xc1c383e0,0x38000700,0x7c1c38,0x3801c00,0x381c0f,0x1c000fc,0x1f8f80e0,0x78781c07,0x81e1e0e0,0x780f0180,0xe007007,0xe00e380,
2579 - 0xe0f0783,0x80e0000e,0xe000e0,0xe001,0xef000000,0x0,0x700000,0x38,0x38,0x1c,0x0,0x700,0x1c0000,0x0,0x0,0x0,0x0,0x1c000000,
2580 - 0x0,0x0,0x0,0x70000e,0x1c000,0x0,0xf830000,0x0,0x1e000000,0x0,0x0,0x10000,0x780c0000,0x3e38000,0xe0,0x0,0x0,0x0,0x0,0x0,0x3,
2581 - 0xd580000,0x0,0x0,0xe038,0x1c,0xc000,0xf0400000,0x380e0038,0x702000,0x1ffc0,0xc0000,0x0,0x3ff80,0x606,0x0,0x30000600,0x0,
2582 - 0x7f8c000,0x0,0xc001818,0x60,0xc0003,0xe0000700,0x1f8003f,0x7e000,0xfc001f80,0x73801ee,0x7c1c1c,0x38000,0x70000e00,0xe0001,
2583 - 0xc0003800,0x700383e,0x7c0703c,0x3c078780,0xf0f01e1e,0x3c3c000,0xf0f87,0x70e00e,0x1c01c380,0x38380e07,0xe038,0x0,0x0,0x0,
2584 - 0x0,0x0,0x0,0x0,0x0,0x0,0xff0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2585 - 0x0,0x0,0x0,0x0,0x0,0x1c,0x1c7000,0xc380fff0,0xc0c00380,0x70000,0x70001c00,0x3dbc0070,0x0,0x0,0x701e0f,0xe0000,0x1e000380,
2586 - 0x6e03800,0x7800000,0x781c0707,0x80e00000,0x0,0x0,0x4038,0xe00c03f,0x700e07,0x4380f0,0x38000700,0x700438,0x3801c00,0x381c0e,
2587 - 0x1c000ec,0x1b8fc0e0,0xf03c1c03,0xc3c0f0e0,0x3c1e0000,0xe007007,0xe00e380,0xe070703,0xc1e0001e,0xe000e0,0xe001,0xc7000000,
2588 - 0x0,0x700000,0x38,0x38,0x1c,0x0,0x700,0x1c0000,0x0,0x0,0x0,0x0,0x1c000000,0x0,0x0,0x0,0x70000e,0x1c000,0x0,0xe010000,0x0,
2589 - 0x1c000000,0x10,0x20000,0x6c000,0xf0000000,0x3838000,0x1e0,0x0,0xf000f,0xf1e00,0x78f00000,0x0,0x3,0xdd80000,0x0,0x0,0xf078,
2590 - 0x0,0xc001,0xe0000000,0x1c1c0038,0x700000,0x3c1e0,0xc0000,0x0,0x783c0,0x606,0x0,0x30000e00,0x0,0xff8c000,0x0,0xc00300c,0x60,
2591 - 0xc0003,0xe0000000,0x1f8003f,0x7e000,0xfc001f80,0x73801ce,0x70041c,0x38000,0x70000e00,0xe0001,0xc0003800,0x700380f,0x7e07078,
2592 - 0x1e0f03c1,0xe0783c0f,0x781e000,0x1c0787,0x70e00e,0x1c01c380,0x383c1e07,0xff00e038,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x878,
2593 - 0x0,0x0,0x0,0x7,0x80000080,0x0,0x0,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,
2594 - 0x1c7000,0xc301e630,0xc0c00380,0x70000,0xe0000e00,0xff00070,0x0,0x0,0xe01c07,0xe0000,0xe000380,0xce03800,0x7000000,0x701c0707,
2595 - 0x600000,0x0,0x4000010,0x38,0x1c00e07f,0x80700e0e,0x38070,0x38000700,0xe00038,0x3801c00,0x381c1c,0x1c000ec,0x1b8ec0e0,0xe01c1c01,
2596 - 0xc38070e0,0x1c1c0000,0xe007007,0x701c380,0xe078e01,0xc1c0003c,0xe00070,0xe003,0x83800000,0x7f,0x71f000,0x3e003e38,0x3f007ff,
2597 - 0xe01f1c1c,0x7801fc00,0x3fc00701,0xe01c0077,0x8f071e00,0xf801c7c,0x7c700e,0x3e01fc03,0xfff8380e,0xe007700,0x73c0787,0x387ffc,
2598 - 0x70000e,0x1c000,0x0,0xe000000,0x0,0x1c000000,0x10,0x20000,0xc2000,0xe0000000,0x3838000,0x3c0,0x0,0xf000f,0x78e00,0x70e00000,
2599 - 0x0,0x3,0xc980fe0,0x1f0,0xf8000007,0xffc07070,0x0,0x3f801,0xc0000000,0x1e3c0038,0x700000,0x70070,0x7fc0000,0x0,0xe00e0,0x606,
2600 - 0x1c0000,0x70007c00,0x380e,0xff8c000,0x0,0xc00300c,0x60,0xc0000,0x70000000,0x3fc007f,0x800ff001,0xfe003fc0,0x73801ce,0xe0001c,
2601 - 0x38000,0x70000e00,0xe0001,0xc0003800,0x7003807,0x7607070,0xe0e01c1,0xc0383807,0x700e000,0x1c0387,0x70e00e,0x1c01c380,0x381c1c07,
2602 - 0xffc0e0f8,0x3f8007f,0xfe001,0xfc003f80,0x7f007e3,0xe003e001,0xf8003f00,0x7e000fc,0xfe001f,0xc003f800,0x7f00003c,0x38f0007,
2603 - 0xc000f800,0x1f0003e0,0x7c0007,0x8003f0c3,0x80e0701c,0xe0381c0,0x70700387,0x1f01c00e,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2604 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x1c701f,0xfff1c600,0xc0c00380,0x70000,0xe0000e00,0x3c00070,0x0,0x0,0xe03c07,
2605 - 0x800e0000,0xe000380,0x1ce03800,0x7000000,0x701c0707,0x7003c0,0x780000,0x3c00001e,0x38,0x18006073,0x80700e0e,0x38070,0x38000700,
2606 - 0xe00038,0x3801c00,0x381c38,0x1c000ee,0x3b8ee0e1,0xe01e1c01,0xc78078e0,0x1c1c0000,0xe007007,0x701c387,0xe03de00,0xe3800038,
2607 - 0xe00070,0xe007,0x1c00000,0x1ff,0xc077f801,0xff807fb8,0xff807ff,0xe03fdc1d,0xfc01fc00,0x3fc00703,0xc01c007f,0xdf877f00,0x3fe01dfe,
2608 - 0xff700e,0xff07ff03,0xfff8380e,0x700f700,0x71e0f03,0x80707ffc,0x70000e,0x1c000,0x0,0x1c000008,0x0,0x1c000000,0x10,0x20000,
2609 - 0x82000,0xe0000000,0x7038000,0x80000380,0x2000040,0x7000e,0x38700,0xf1e00000,0x0,0x3,0xc183ff8,0x3fd,0xfc008007,0xffc038e0,
2610 - 0x0,0xffc01,0xc0008008,0xe380038,0x380000,0xe3e38,0x1ffc0040,0x80000000,0x1cfc70,0x606,0x1c0000,0xe0007c00,0x380e,0xff8c000,
2611 - 0x0,0xc00300c,0x8100060,0xc0000,0x30000700,0x39c0073,0x800e7001,0xce0039c0,0x73801ce,0xe0001c,0x38000,0x70000e00,0xe0001,
2612 - 0xc0003800,0x7003807,0x77070f0,0xf1e01e3,0xc03c7807,0x8f00f080,0x83c0787,0x70e00e,0x1c01c380,0x380e3807,0xffe0e1c0,0xffe01ff,
2613 - 0xc03ff807,0xff00ffe0,0x1ffc0ff7,0xf01ff807,0xfc00ff80,0x1ff003fe,0xfe001f,0xc003f800,0x7f0003fc,0x3bf801f,0xf003fe00,0x7fc00ff8,
2614 - 0x1ff0007,0x8007fd83,0x80e0701c,0xe0381c0,0x70380707,0x7f80e01c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2615 - 0x0,0x0,0x0,0x0,0x1c,0x1c701f,0xfff1c600,0x618081c0,0x70000,0xe0000e00,0x3c00070,0x0,0x0,0xe03803,0x800e0000,0xe000380,0x18e03800,
2616 - 0xf000000,0xf01c0707,0x7003c0,0x780000,0xfc00001f,0x80000078,0x301e6073,0x80700e1c,0x38038,0x38000700,0x1c00038,0x3801c00,
2617 - 0x381c70,0x1c000e6,0x338ee0e1,0xc00e1c01,0xc70038e0,0x1c1c0000,0xe007007,0x701c387,0xe01dc00,0xf7800078,0xe00070,0xe00e,0xe00000,
2618 - 0x3ff,0xe07ffc03,0xffc0fff8,0x1ffc07ff,0xe07ffc1d,0xfe01fc00,0x3fc00707,0x801c007f,0xdf877f80,0x7ff01fff,0x1fff00e,0xff07ff03,
2619 - 0xfff8380e,0x700e380,0xe0e0e03,0x80707ffc,0x70000e,0x1c000,0x0,0x7ffc001c,0x0,0x1c000000,0x10,0x20000,0x82000,0xe0000000,
2620 - 0x7038001,0xc0000780,0x70000e0,0x3800e,0x38700,0xe1c00000,0x0,0x3,0xc183ff8,0x7ff,0xfc01c007,0xffc03de0,0x0,0x1ffc01,0xc001c01c,
2621 - 0xf780038,0x3c0000,0xcff18,0x380c00c1,0x80000000,0x18fe30,0x30c,0x1c0001,0xc0000e00,0x380e,0xff8c000,0x0,0xc00300c,0xc180060,
2622 - 0xc0000,0x30000700,0x39c0073,0x800e7001,0xce0039c0,0xe1c038e,0x1c0001c,0x38000,0x70000e00,0xe0001,0xc0003800,0x7003803,0x877070e0,
2623 - 0x71c00e3,0x801c7003,0x8e0071c0,0x1c380fc7,0x70e00e,0x1c01c380,0x380f7807,0x1e0e380,0x1fff03ff,0xe07ffc0f,0xff81fff0,0x3ffe0fff,
2624 - 0xf03ffc0f,0xfe01ffc0,0x3ff807ff,0xfe001f,0xc003f800,0x7f0007fe,0x3bfc03f,0xf807ff00,0xffe01ffc,0x3ff8007,0x800fff83,0x80e0701c,
2625 - 0xe0381c0,0x70380707,0xffc0e01c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x1c701f,
2626 - 0xfff1c600,0x7f8381e0,0x70000,0xc0000600,0xff00070,0x0,0x0,0x1c03803,0x800e0000,0xe000f00,0x38e03fe0,0xe000000,0xe00e0e07,
2627 - 0x7003c0,0x780007,0xf0ffff87,0xf00000f0,0x307fe0f3,0xc0703c1c,0x38038,0x38000700,0x1c00038,0x3801c00,0x381ce0,0x1c000e6,0x338e70e1,
2628 - 0xc00e1c01,0xc70038e0,0x3c1e0000,0xe007007,0x783c38f,0x8e01fc00,0x770000f0,0xe00038,0xe01c,0x700000,0x381,0xe07c1e07,0xc0c1e0f8,
2629 - 0x3c1e0038,0xf07c1f,0xe001c00,0x1c0070f,0x1c0079,0xf3c7c380,0xf0781f07,0x83c1f00f,0xc10f0300,0x1c00380e,0x700e380,0xe0f1e03,
2630 - 0xc0f00078,0x70000e,0x1c000,0x0,0xfff8003e,0x0,0x3c000000,0x10,0x20000,0xc6000,0xf0000000,0x7038003,0xe0000f00,0xf8001f0,
2631 - 0x3801c,0x18300,0xe1800000,0x0,0x3,0xc187818,0x70f,0x9e03e000,0x7801dc0,0x1c,0x3cc401,0xc000efb8,0x7f7f0038,0x3f0000,0x1ce11c,
2632 - 0x300c01c3,0x80000000,0x38c638,0x3fc,0x1c0003,0x80000600,0x380e,0xff8c000,0x0,0xc00300c,0xe1c0060,0xc0010,0x70000700,0x79e00f3,
2633 - 0xc01e7803,0xcf0079e0,0xe1c038e,0x1c0001c,0x38000,0x70000e00,0xe0001,0xc0003800,0x7003803,0x873870e0,0x71c00e3,0x801c7003,
2634 - 0x8e0070e0,0x38381dc7,0x70e00e,0x1c01c380,0x38077007,0xf0e700,0x1c0f0381,0xe0703c0e,0x781c0f0,0x381e083e,0x787c0c1e,0xf03c1e0,
2635 - 0x783c0f07,0x800e0001,0xc0003800,0x7000fff,0x3e1c078,0x3c0f0781,0xe0f03c1e,0x783c000,0x1e0f03,0x80e0701c,0xe0381c0,0x70380f07,
2636 - 0xc1e0e03c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x1,0x8701c600,0x1e0f01e0,0x1,
2637 - 0xc0000700,0x3dbc0070,0x0,0x0,0x1c03803,0x800e0000,0x1e01fe00,0x70e03ff8,0xe3e0001,0xe007fc07,0x80f003c0,0x78001f,0xc0ffff81,
2638 - 0xfc0001e0,0x30e1e0e1,0xc07ff81c,0x38038,0x3ffe07ff,0xc1c0003f,0xff801c00,0x381de0,0x1c000e7,0x738e70e1,0xc00e1c03,0xc70038e0,
2639 - 0x780f8000,0xe007007,0x383838d,0x8e00f800,0x7f0000e0,0xe00038,0xe000,0x0,0x200,0xf0780e07,0x8041c078,0x380e0038,0xe03c1e,
2640 - 0xf001c00,0x1c0071e,0x1c0070,0xe1c783c0,0xe0381e03,0x8380f00f,0xe0000,0x1c00380e,0x381c380,0xe07bc01,0xc0e00078,0x70000e,
2641 - 0x1c000,0x0,0x1c000061,0x0,0x38000000,0x10,0x20000,0x7c000,0x7c000000,0x703fc06,0x10000e00,0x18400308,0x1801c,0x1c381,0xc3800000,
2642 - 0x0,0x0,0x7000,0xe0f,0xe061000,0x7801fc0,0x1c,0x38c001,0xc0007ff0,0x7fff0038,0x77c000,0x19c00c,0x301c0387,0x0,0x30c618,0xf0,
2643 - 0x1c0007,0x600,0x380e,0x7f8c007,0x80000000,0xc001818,0x70e03fc,0x387f871f,0xe0e00700,0x70e00e1,0xc01c3803,0x870070e0,0xe1c038f,
2644 - 0xe1c0001f,0xff03ffe0,0x7ffc0fff,0x800e0001,0xc0003800,0x7003803,0x873870e0,0x71c00e3,0x801c7003,0x8e007070,0x703839c7,0x70e00e,
2645 - 0x1c01c380,0x3807f007,0x70e700,0x10078200,0xf0401e08,0x3c10078,0x200f001c,0x3878041c,0x70380e0,0x701c0e03,0x800e0001,0xc0003800,
2646 - 0x7001e0f,0x3c1e070,0x1c0e0381,0xc070380e,0x701c000,0x1c0f03,0x80e0701c,0xe0381c0,0x701c0e07,0x80e07038,0x0,0x0,0x0,0x0,0x0,
2647 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x3,0x8600e600,0x7803f0,0x1,0xc0000700,0x718e0070,0x0,0x0,0x38038c3,
2648 - 0x800e0000,0x3c01f800,0x60e03ffc,0xeff8001,0xc001f003,0xc1f003c0,0x7800fe,0xffff80,0x3f8003c0,0x60c0e0e1,0xc07fe01c,0x38038,
2649 - 0x3ffe07ff,0xc1c07e3f,0xff801c00,0x381fe0,0x1c000e3,0x638e30e1,0xc00e1c07,0x870038ff,0xf00ff800,0xe007007,0x38381cd,0x9c007000,
2650 - 0x3e0001e0,0xe0001c,0xe000,0x0,0x0,0x70780f0f,0x3c078,0x70070038,0x1e03c1c,0x7001c00,0x1c0073c,0x1c0070,0xe1c701c1,0xe03c1e03,
2651 - 0xc780f00f,0xe0000,0x1c00380e,0x381c387,0xe03f801,0xc0e000f0,0x70000e,0x1c007,0xe0100000,0x1c0000cd,0x80000003,0xffc00000,
2652 - 0x3ff,0x807ff000,0xe0,0x7fc00060,0x703fc0c,0xd8001e00,0x3360066c,0x1c018,0xc181,0x83000000,0x0,0x0,0x7000,0x300e07,0xe0cd800,
2653 - 0xf000f80,0x1c,0x78c00f,0xff0038e0,0x3e00038,0xe1e000,0x19800c,0x383c070e,0x7fffc00,0x30fc18,0x0,0xffff80e,0x20e00,0x380e,
2654 - 0x7f8c007,0x80000000,0xc001c38,0x38703ff,0xf87fff0f,0xcfe00f00,0x70e00e1,0xc01c3803,0x870070e0,0x1e1e078f,0xe1c0001f,0xff03ffe0,
2655 - 0x7ffc0fff,0x800e0001,0xc0003800,0x700ff83,0x871870e0,0x71c00e3,0x801c7003,0x8e007038,0xe03871c7,0x70e00e,0x1c01c380,0x3803e007,
2656 - 0x70e700,0x38000,0x70000e00,0x1c00038,0x7001c,0x38f00038,0x3870070,0xe00e1c01,0xc00e0001,0xc0003800,0x7001c07,0x380e0f0,0x1e1e03c3,
2657 - 0xc078780f,0xf01e000,0x3c0f03,0x80e0701c,0xe0381c0,0x701c0e07,0x80f07038,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2658 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x3,0x8600ff00,0x1e00778,0x38000001,0xc0000700,0x21843fff,0xe0000000,0x0,0x38039e3,0x800e0000,
2659 - 0x7c01fe00,0xe0e0203e,0xeffc001,0xc00ffe03,0xff700000,0x7f0,0x0,0x7f00380,0x618060e1,0xc07ffc1c,0x38038,0x3ffe07ff,0xc1c07e3f,
2660 - 0xff801c00,0x381ff0,0x1c000e3,0x638e38e1,0xc00e1fff,0x870038ff,0xc003fe00,0xe007007,0x38381cd,0x9c00f800,0x3e0003c0,0xe0001c,
2661 - 0xe000,0x0,0x0,0x7070070e,0x38038,0x70070038,0x1c01c1c,0x7001c00,0x1c00778,0x1c0070,0xe1c701c1,0xc01c1c01,0xc700700e,0xfc000,
2662 - 0x1c00380e,0x381c3c7,0x1e01f001,0xe1e001e0,0xf0000e,0x1e01f,0xf8300000,0x1c00019c,0xc0000003,0xffc00000,0x10,0x20000,0x700,
2663 - 0x1ff000c0,0x703fc19,0xcc003c00,0x67300ce6,0xc038,0xc181,0x83000000,0x0,0x0,0x7e00,0x180e07,0xe19cc00,0x1e000f80,0x1c,0x70c00f,
2664 - 0xff007070,0x3e00038,0xe0f000,0x19800c,0x1fec0e1c,0x7fffc00,0x30f818,0x0,0xffff81f,0xf003fc00,0x380e,0x3f8c007,0x80000000,
2665 - 0x7f800ff0,0x1c3803f,0xe007fc00,0xff800e00,0x70e00e1,0xc01c3803,0x870070e0,0x1c0e070f,0xe1c0001f,0xff03ffe0,0x7ffc0fff,0x800e0001,
2666 - 0xc0003800,0x700ff83,0x871c70e0,0x71c00e3,0x801c7003,0x8e00701d,0xc038e1c7,0x70e00e,0x1c01c380,0x3803e007,0x70e3c0,0x38000,
2667 - 0x70000e00,0x1c00038,0x7001c,0x38e00038,0x3870070,0xe00e1c01,0xc00e0001,0xc0003800,0x7003c07,0x8380e0e0,0xe1c01c3,0x80387007,
2668 - 0xe00e1ff,0xfe381b83,0x80e0701c,0xe0381c0,0x701e1e07,0x707878,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2669 - 0x0,0x0,0x0,0x0,0x1c,0x3,0xe007fe0,0x7800e3c,0x38000001,0xc0000700,0x1803fff,0xe0000000,0x0,0x70039c3,0x800e0000,0xf8000f80,
2670 - 0xc0e0000e,0xf83c003,0xc01e0f01,0xff700000,0x7c0,0x0,0x1f00780,0x618061c0,0xe0701e1c,0x38038,0x38000700,0x1c07e38,0x3801c00,
2671 - 0x381e78,0x1c000e3,0xe38e18e1,0xc00e1fff,0x70038ff,0xe0007f80,0xe007007,0x1c701dd,0x9c00f800,0x1c000780,0xe0000e,0xe000,0x0,
2672 - 0x7f,0xf070070e,0x38038,0x7fff0038,0x1c01c1c,0x7001c00,0x1c007f8,0x1c0070,0xe1c701c1,0xc01c1c01,0xc700700e,0x7fc00,0x1c00380e,
2673 - 0x1c381c7,0x1c01f000,0xe1c001c0,0xfe0000e,0xfe1f,0xfff00000,0x7ff003fc,0xe0000003,0xffc00000,0x10,0x20000,0x3800,0x3fc0180,
2674 - 0x703803f,0xce007800,0xff381fe7,0x30,0x0,0xc0,0x0,0x0,0x3fe0,0xc0e07,0xfe3fce00,0x1c000700,0x1c,0x70c00f,0xff006030,0x1c00000,
2675 - 0xe07800,0x19800c,0xfcc1c38,0x7fffc00,0x30d818,0x0,0xffff81f,0xf001f800,0x380e,0xf8c007,0x80000000,0x7f8007e0,0xe1c3fe,0x7fc00f,
2676 - 0xf8001e00,0xe0701c0,0xe0381c07,0x380e070,0x1c0e070e,0x1c0001c,0x38000,0x70000e00,0xe0001,0xc0003800,0x700ff83,0x870c70e0,
2677 - 0x71c00e3,0x801c7003,0x8e00700f,0x8038c1c7,0x70e00e,0x1c01c380,0x3801c007,0xf0e3e0,0x3ff807f,0xf00ffe01,0xffc03ff8,0x7ff03ff,
2678 - 0xf8e0003f,0xff87fff0,0xfffe1fff,0xc00e0001,0xc0003800,0x7003803,0x8380e0e0,0xe1c01c3,0x80387007,0xe00e1ff,0xfe383383,0x80e0701c,
2679 - 0xe0381c0,0x700e1c07,0x703870,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x3,0xc000ff0,
2680 - 0x3c1e1c1c,0x38000001,0xc0000700,0x1803fff,0xe0000007,0xf8000000,0x7003803,0x800e0001,0xf0000381,0xc0e00007,0xf01e003,0x801c0700,
2681 - 0x7c700000,0x7c0,0x0,0x1f00700,0x618061c0,0xe0700e1c,0x38038,0x38000700,0x1c00e38,0x3801c00,0x381e38,0x1c000e1,0xc38e1ce1,
2682 - 0xc00e1ffc,0x70038e0,0xf0000780,0xe007007,0x1c701dd,0xdc01fc00,0x1c000780,0xe0000e,0xe000,0x0,0x1ff,0xf070070e,0x38038,0x7fff0038,
2683 - 0x1c01c1c,0x7001c00,0x1c007f8,0x1c0070,0xe1c701c1,0xc01c1c01,0xc700700e,0x3ff00,0x1c00380e,0x1c381cd,0x9c00e000,0xe1c003c0,
2684 - 0xf80000e,0x3e18,0x3ff00000,0xffe007fd,0xf0000000,0x38000000,0x10,0x20000,0x1c000,0x3c0300,0x703807f,0xdf007801,0xff7c3fef,
2685 - 0x80000000,0x0,0x3e0,0x7ffe7ff,0xff000000,0x1ff8,0x60e07,0xfe7fdf00,0x3c000700,0x1c,0x70c001,0xc0006030,0x7fff0000,0xf03800,
2686 - 0x19800c,0x1c38,0x1c07,0xf830cc18,0x0,0x1c0000,0x0,0x380e,0x18c007,0x80000000,0x0,0xe1cfe0,0x1fc003f,0x80003c00,0xe0701c0,
2687 - 0xe0381c07,0x380e070,0x1c0e070e,0x1c0001c,0x38000,0x70000e00,0xe0001,0xc0003800,0x7003803,0x870e70e0,0x71c00e3,0x801c7003,
2688 - 0x8e007007,0x3981c7,0x70e00e,0x1c01c380,0x3801c007,0x1e0e0f8,0xfff81ff,0xf03ffe07,0xffc0fff8,0x1fff07ff,0xf8e0003f,0xff87fff0,
2689 - 0xfffe1fff,0xc00e0001,0xc0003800,0x7003803,0x8380e0e0,0xe1c01c3,0x80387007,0xe00e1ff,0xfe386383,0x80e0701c,0xe0381c0,0x700e1c07,
2690 - 0x703870,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x7f,0xffc00678,0x707f9c1e,0x38000001,
2691 - 0xc0000700,0x70,0x7,0xf8000000,0xe003803,0x800e0003,0xe00001c3,0x80e00007,0xe00e007,0x80380380,0x700000,0x7f0,0x0,0x7f00700,
2692 - 0x618061ff,0xe070071c,0x38038,0x38000700,0x1c00e38,0x3801c00,0x381c3c,0x1c000e1,0xc38e1ce1,0xc00e1c00,0x70038e0,0x700003c0,
2693 - 0xe007007,0x1c701d8,0xdc03dc00,0x1c000f00,0xe00007,0xe000,0x0,0x3ff,0xf070070e,0x38038,0x7fff0038,0x1c01c1c,0x7001c00,0x1c007fc,
2694 - 0x1c0070,0xe1c701c1,0xc01c1c01,0xc700700e,0x3f00,0x1c00380e,0x1c381cd,0x9c01f000,0x73800780,0xfe0000e,0xfe10,0x7c00000,0x1c000ffb,
2695 - 0xf8000000,0x38000000,0x10,0x20000,0x20000,0x1e0700,0x70380ff,0xbf80f003,0xfefe7fdf,0xc0000000,0x0,0x3f0,0x7ffe7ff,0xff000000,
2696 - 0x1f8,0x30e07,0xfeffbf80,0x78000700,0x1c,0x70c001,0xc0006030,0x7fff0000,0x783800,0x1ce11c,0xe1c,0x1c07,0xf838ce38,0x0,0x1c0000,
2697 - 0x0,0x380e,0x18c000,0x0,0x0,0x1c38c00,0x1800030,0x7800,0xfff01ff,0xe03ffc07,0xff80fff0,0x3fff0ffe,0x1c0001c,0x38000,0x70000e00,
2698 - 0xe0001,0xc0003800,0x7003803,0x870e70e0,0x71c00e3,0x801c7003,0x8e00700f,0x803b81c7,0x70e00e,0x1c01c380,0x3801c007,0xffe0e03c,
2699 - 0x1fff83ff,0xf07ffe0f,0xffc1fff8,0x3fff0fff,0xf8e0003f,0xff87fff0,0xfffe1fff,0xc00e0001,0xc0003800,0x7003803,0x8380e0e0,0xe1c01c3,
2700 - 0x80387007,0xe00e000,0x38c383,0x80e0701c,0xe0381c0,0x70073807,0x701ce0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2701 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0xffc0063c,0x40619c0f,0x30000001,0xc0000700,0x70,0x7,0xf8000000,0xe003803,0x800e0007,0xc00001c3,
2702 - 0xfffc0007,0xe00e007,0x380380,0xf00000,0xfe,0xffff80,0x3f800700,0x618063ff,0xf070071c,0x38038,0x38000700,0x1c00e38,0x3801c00,
2703 - 0x381c1e,0x1c000e0,0x38e0ee1,0xc00e1c00,0x70038e0,0x380001c0,0xe007007,0x1ef01d8,0xdc038e00,0x1c001e00,0xe00007,0xe000,0x0,
2704 - 0x7c0,0x7070070e,0x38038,0x70000038,0x1c01c1c,0x7001c00,0x1c0079e,0x1c0070,0xe1c701c1,0xc01c1c01,0xc700700e,0x780,0x1c00380e,
2705 - 0xe701cd,0x9c01f000,0x73800f00,0xe0000e,0xe000,0x0,0x1c0007f7,0xf0000000,0x70000000,0x10,0x20000,0x0,0xe0e00,0x703807f,0x7f01e001,
2706 - 0xfdfc3fbf,0x80000000,0x0,0x7f0,0x0,0x0,0x3c,0x18e07,0x7f7f00,0xf0000700,0x1c,0x70c001,0xc0007070,0x1c00000,0x3e7000,0xcff18,
2707 - 0x3ffc070e,0x1c07,0xf818c630,0x0,0x1c0000,0x0,0x380e,0x18c000,0x0,0x3ffc,0x3870000,0xe000fc00,0x380f000,0x1fff83ff,0xf07ffe0f,
2708 - 0xffc1fff8,0x3fff0ffe,0x1c0001c,0x38000,0x70000e00,0xe0001,0xc0003800,0x7003803,0x870770e0,0x71c00e3,0x801c7003,0x8e00701d,
2709 - 0xc03f01c7,0x70e00e,0x1c01c380,0x3801c007,0xffc0e01c,0x3e0387c0,0x70f80e1f,0x1c3e038,0x7c071e1c,0xe00038,0x70000,0xe0001c00,
2710 - 0xe0001,0xc0003800,0x7003803,0x8380e0e0,0xe1c01c3,0x80387007,0xe00e000,0x398383,0x80e0701c,0xe0381c0,0x70073807,0x701ce0,
2711 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0xffc0061c,0xc0dc07,0xf0000001,0xc0000700,
2712 - 0x70,0x0,0x0,0x1c003c07,0x800e000f,0x1c3,0xfffc0007,0xe00e007,0x380380,0xe00000,0x1f,0xc0ffff81,0xfc000700,0x618063ff,0xf070070e,
2713 - 0x38070,0x38000700,0xe00e38,0x3801c00,0x381c0e,0x1c000e0,0x38e0ee1,0xe01e1c00,0x78078e0,0x380001c0,0xe007007,0xee01f8,0xfc078f00,
2714 - 0x1c001c00,0xe00003,0x8000e000,0x0,0x700,0x7070070e,0x38038,0x70000038,0x1c01c1c,0x7001c00,0x1c0070e,0x1c0070,0xe1c701c1,
2715 - 0xc01c1c01,0xc700700e,0x380,0x1c00380e,0xe700ed,0xb803f800,0x77800f00,0x70000e,0x1c000,0x0,0xe0003f7,0xe0000000,0x70000000,
2716 - 0x10,0x20000,0x1c0e0,0xe1c00,0x703803f,0x7e01c000,0xfdf81fbf,0x0,0x0,0x3f0,0x0,0x0,0x1c,0x1ce07,0x3f7e00,0xf0000700,0x1c,
2717 - 0x70c001,0xc00038e0,0x1c00038,0xf7000,0xe3e38,0x3ffc0387,0x1c00,0x1cc770,0x0,0x1c0000,0x0,0x380e,0x18c000,0x0,0x3ffc,0x70e0001,
2718 - 0xe001fe00,0x780e000,0x1fff83ff,0xf07ffe0f,0xffc1fff8,0x3fff0ffe,0xe0001c,0x38000,0x70000e00,0xe0001,0xc0003800,0x7003807,
2719 - 0x70770f0,0xf1e01e3,0xc03c7807,0x8f00f038,0xe03e03c7,0x70e00e,0x1c01c380,0x3801c007,0xff00e00e,0x38038700,0x70e00e1c,0x1c38038,
2720 - 0x70071c1c,0xe00038,0x70000,0xe0001c00,0xe0001,0xc0003800,0x7003803,0x8380e0e0,0xe1c01c3,0x80387007,0xe00e000,0x3b0383,0x80e0701c,
2721 - 0xe0381c0,0x70077807,0x701de0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x1c00061c,
2722 - 0xc0de03,0xe0000001,0xc0000700,0x70,0x0,0x0,0x1c001c07,0xe001e,0x1c3,0xfffc0007,0x600e00e,0x380380,0xe00000,0x7,0xf0ffff87,
2723 - 0xf0000000,0x60c0e380,0x7070070e,0x38070,0x38000700,0xe00e38,0x3801c00,0x381c0f,0x1c000e0,0x38e06e0,0xe01c1c00,0x38070e0,
2724 - 0x1c0001c0,0xe007007,0xee00f8,0xf80f0700,0x1c003c00,0xe00003,0x8000e000,0x0,0x700,0x70780f0f,0x3c078,0x70000038,0x1e03c1c,
2725 - 0x7001c00,0x1c0070f,0x1c0070,0xe1c701c1,0xe03c1e03,0xc780f00e,0x380,0x1c00380e,0xe700f8,0xf807bc00,0x3f001e00,0x70000e,0x1c000,
2726 - 0x0,0xe0001ff,0xc0000000,0x70000000,0x10,0x20000,0x33110,0xe0e00,0x383801f,0xfc03c000,0x7ff00ffe,0x0,0x0,0x3e0,0x0,0x0,0x1c,
2727 - 0x38e07,0x1ffc01,0xe0000700,0x1c,0x78c001,0xc0007ff0,0x1c00038,0x7c000,0x70070,0x1c3,0x80001c00,0xe00e0,0x0,0x1c0000,0x0,
2728 - 0x380e,0x18c000,0x0,0x0,0xe1c0001,0xe0010700,0x780e000,0x1c038380,0x70700e0e,0x1c1c038,0x78070e0e,0xe0001c,0x38000,0x70000e00,
2729 - 0xe0001,0xc0003800,0x7003807,0x7037070,0xe0e01c1,0xc0383807,0x700e070,0x701c0387,0x70e00e,0x1c01c380,0x3801c007,0xe00e,0x38038700,
2730 - 0x70e00e1c,0x1c38038,0x70071c1c,0xf00038,0x70000,0xe0001c00,0xe0001,0xc0003800,0x7003c07,0x8380e0f0,0x1e1e03c3,0xc078780f,
2731 - 0xf01e007,0x803e0783,0x80e0701c,0xe0381c0,0x7003f007,0x80f00fc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2732 - 0x0,0x0,0x0,0x0,0x0,0x6,0x1800061c,0xc0de01,0xc0000000,0xc0000e00,0x70,0xf0000,0x3c00,0x38001c0f,0xe003c,0x3c0,0xe0000e,0x701e00e,
2733 - 0x3c0780,0x1e003c0,0x780000,0xfc00001f,0x80000000,0x60e1e780,0x78700f07,0x4380f0,0x38000700,0xf00e38,0x3801c00,0xc0781c07,
2734 - 0x81c000e0,0x38e07e0,0xe03c1c00,0x380f0e0,0x1e0003c0,0xe00780f,0xee00f0,0x780e0780,0x1c007800,0xe00001,0xc000e000,0x0,0x700,
2735 - 0xf0780e07,0x8041c078,0x38020038,0xe03c1c,0x7001c00,0x1c00707,0x801c0070,0xe1c701c0,0xe0381e03,0x8380f00e,0x80380,0x1c003c1e,
2736 - 0x7e00f8,0xf80f1e00,0x3f003c00,0x70000e,0x1c000,0x0,0xf0100f7,0x80078000,0x700078f0,0x10,0x7ff000,0x61208,0x1e0700,0x383800f,
2737 - 0x78078000,0x3de007bc,0x0,0x0,0x0,0x0,0x0,0x401c,0x70e0f,0xf7803,0xc0000700,0x1c,0x38c001,0xc000efb8,0x1c00038,0x1e000,0x3c1e0,
2738 - 0xc1,0x80000000,0x783c0,0x0,0x0,0x0,0x3c1e,0x18c000,0x0,0x0,0xc180003,0x60000300,0xd80e010,0x3c03c780,0x78f00f1e,0x1e3c03c,
2739 - 0x70039c0e,0x70041c,0x38000,0x70000e00,0xe0001,0xc0003800,0x700380f,0x703f070,0x1e0e03c1,0xc078380f,0x701e0e0,0x381c0787,
2740 - 0x80f0f01e,0x1e03c3c0,0x7801c007,0xe00e,0x38078700,0xf0e01e1c,0x3c38078,0x700f1c1c,0x78041c,0x1038020,0x70040e00,0x800e0001,
2741 - 0xc0003800,0x7001c07,0x380e070,0x1c0e0381,0xc070380e,0x701c007,0x801e0703,0xc1e0783c,0xf0781e0,0xf003f007,0x80e00fc0,0x0,
2742 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0xe,0x1801867c,0xc0cf83,0xe0000000,0xe0000e00,
2743 - 0x70,0xf0000,0x3c00,0x38000f1e,0xe0070,0x180780,0xe0603e,0x783c01e,0x1e0f01,0x7c003c0,0x780000,0x3c00001e,0x700,0x307fe700,
2744 - 0x38701e07,0xc1c383e0,0x38000700,0x7c1e38,0x3801c00,0xe0f01c03,0x81c000e0,0x38e03e0,0x78781c00,0x1e1e0e0,0xe180780,0xe003c1e,
2745 - 0x7c00f0,0x781e03c0,0x1c007000,0xe00001,0xc000e000,0x0,0x783,0xf07c1e07,0xc0c1e0f8,0x3e0e0038,0xf07c1c,0x7001c00,0x1c00703,
2746 - 0xc01e0070,0xe1c701c0,0xf0781f07,0x83c1f00e,0xe0f80,0x1e003c3e,0x7e00f8,0xf80e0e00,0x3f003800,0x70000e,0x1c000,0x0,0x7830077,
2747 - 0xf0000,0x700078f0,0x10,0x20000,0x41208,0xc03c0380,0x3c38007,0x70070000,0x1dc003b8,0x0,0x0,0x0,0x0,0x0,0x707c,0x6070f,0x86077003,
2748 - 0x80000700,0x1c,0x3ec401,0xc001c01c,0x1c00038,0xf000,0x1ffc0,0x40,0x80000000,0x3ff80,0x0,0x0,0x0,0x3e3e,0x18c000,0x0,0x0,
2749 - 0x8100006,0x60000300,0x1980f070,0x3801c700,0x38e0071c,0xe3801c,0x70039c0e,0x7c1c1c,0x38000,0x70000e00,0xe0001,0xc0003800,
2750 - 0x700383e,0x701f03c,0x3c078780,0xf0f01e1e,0x3c3c1c0,0x1c3f0f03,0xc1e0783c,0xf0781e0,0xf001c007,0xe81e,0x3c1f8783,0xf0f07e1e,
2751 - 0xfc3c1f8,0x783f1e3e,0x187c0c1f,0x703e0e0,0x7c1c0f83,0x800e0001,0xc0003800,0x7001e0f,0x380e078,0x3c0f0781,0xe0f03c1e,0x783c007,
2752 - 0x801e0f03,0xc3e0787c,0xf0f81e1,0xf003f007,0xc1e00fc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2753 - 0x0,0x0,0x1c,0xe,0x3801fff8,0x6187ff,0xe0000000,0xe0000e00,0x70,0xf0000,0x3c00,0x38000ffe,0x1fff0ff,0xfe1fff80,0xe07ffc,0x3ffc01c,
2754 - 0x1fff01,0xff8003c0,0x780000,0x4000010,0x700,0x301e6700,0x387ffe03,0xffc3ffc0,0x3fff0700,0x3ffe38,0x383ffe0,0xfff01c03,0xc1fff8e0,
2755 - 0x38e03e0,0x7ff81c00,0x1ffe0e0,0xf1fff80,0xe003ffe,0x7c00f0,0x781c01c0,0x1c00ffff,0xe00001,0xc000e000,0x0,0x3ff,0x707ffc03,
2756 - 0xffc0fff8,0x1ffe0038,0x7ffc1c,0x707fff0,0x1c00701,0xc00ff070,0xe1c701c0,0x7ff01fff,0x1fff00e,0xfff00,0xff81fee,0x7e00f0,
2757 - 0x781e0f00,0x1e007ffc,0x70000e,0x1c000,0x0,0x3ff003e,0xf0000,0xe00070e0,0x60830010,0x20000,0x41208,0xfffc01c0,0x1fffe03,0xe00ffff0,
2758 - 0xf8001f0,0x0,0x0,0x0,0x0,0x0,0x7ff8,0xc07fd,0xfe03e007,0xffc00700,0x1c,0x1ffc1f,0xffc08008,0x1c00038,0x7000,0x7f00,0x0,0x0,
2759 - 0xfe00,0x0,0xffff800,0x0,0x3ff7,0x8018c000,0x0,0x0,0x6,0x60000700,0x19807ff0,0x3801c700,0x38e0071c,0xe3801c,0x70039c0f,0xf03ffc1f,
2760 - 0xff83fff0,0x7ffe0fff,0xc1fff03f,0xfe07ffc0,0xfff83ffc,0x701f03f,0xfc07ff80,0xfff01ffe,0x3ffc080,0x83fff03,0xffe07ffc,0xfff81ff,
2761 - 0xf001c007,0xeffc,0x1ffb83ff,0x707fee0f,0xfdc1ffb8,0x3ff70ff7,0xf83ffc0f,0xff01ffe0,0x3ffc07ff,0x83fff87f,0xff0fffe1,0xfffc0ffe,
2762 - 0x380e03f,0xf807ff00,0xffe01ffc,0x3ff8007,0x803ffe01,0xfee03fdc,0x7fb80ff,0x7001e007,0xffc00780,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2763 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0xc,0x3801fff0,0x7f83fe,0x70000000,0xe0000e00,0x0,0xf0000,0x3c00,0x700007fc,
2764 - 0x1fff0ff,0xfe1ffe00,0xe07ff8,0x1ff801c,0xffe01,0xff0003c0,0x780000,0x0,0x700,0x38000f00,0x3c7ffc01,0xff83ff80,0x3fff0700,
2765 - 0x1ffc38,0x383ffe0,0x7fe01c01,0xe1fff8e0,0x38e03e0,0x3ff01c00,0xffc0e0,0x71fff00,0xe001ffc,0x7c00f0,0x783c01e0,0x1c00ffff,
2766 - 0xe00000,0xe000e000,0x0,0x1ff,0x7077f801,0xff807fb8,0xffc0038,0x3fdc1c,0x707fff0,0x1c00701,0xe007f070,0xe1c701c0,0x3fe01dfe,
2767 - 0xff700e,0x7fe00,0xff80fee,0x3c0070,0x703c0780,0x1e007ffc,0x70000e,0x1c000,0x0,0x1fe001c,0xe0000,0xe000e1c0,0x71c78010,0x20000,
2768 - 0x21318,0xfff800c0,0xfffe01,0xc00ffff0,0x70000e0,0x0,0x0,0x0,0x0,0x0,0x3ff0,0x1803fd,0xfe01c007,0xffc00700,0x1c,0xffc1f,0xffc00000,
2769 - 0x1c00038,0x7000,0x0,0x0,0x0,0x0,0x0,0xffff800,0x0,0x3ff7,0x8018c000,0x0,0x0,0xc,0x60000e00,0x31803fe0,0x7801ef00,0x3de007bc,
2770 - 0xf7801e,0xf003fc0f,0xf01ff81f,0xff83fff0,0x7ffe0fff,0xc1fff03f,0xfe07ffc0,0xfff83ff8,0x701f01f,0xf803ff00,0x7fe00ffc,0x1ff8000,
2771 - 0x67fe01,0xffc03ff8,0x7ff00ff,0xe001c007,0xeff8,0xffb81ff,0x703fee07,0xfdc0ffb8,0x1ff70ff7,0xf81ff807,0xfe00ffc0,0x1ff803ff,
2772 - 0x3fff87f,0xff0fffe1,0xfffc07fc,0x380e01f,0xf003fe00,0x7fc00ff8,0x1ff0000,0x37fc00,0xfee01fdc,0x3fb807f,0x7001e007,0x7f800780,
2773 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0xc,0x30007fc0,0x1e00f8,0x78000000,0x70001c00,
2774 - 0x0,0xe0000,0x3c00,0x700001f0,0x1fff0ff,0xfe07f800,0xe01fe0,0x7e0038,0x3f800,0xfc0003c0,0x700000,0x0,0x700,0x18000e00,0x1c7ff000,
2775 - 0x7e03fe00,0x3fff0700,0x7f038,0x383ffe0,0x1f801c00,0xf1fff8e0,0x38e01e0,0xfc01c00,0x3f80e0,0x787fc00,0xe0007f0,0x7c00f0,0x387800f0,
2776 - 0x1c00ffff,0xe00000,0xe000e000,0x0,0xfc,0x7071f000,0x3f003e38,0x3f00038,0x1f1c1c,0x707fff0,0x1c00700,0xf003f070,0xe1c701c0,
2777 - 0x1f801c7c,0x7c700e,0x1f800,0x3f8078e,0x3c0070,0x707803c0,0x1c007ffc,0x70000e,0x1c000,0x0,0x7c0008,0x1e0000,0xe000e1c0,0x71c30010,
2778 - 0x20000,0x1e1f0,0x3fe00020,0x3ffe00,0x800ffff0,0x2000040,0x0,0x0,0x0,0x0,0x0,0xfc0,0x3001f0,0x78008007,0xffc00700,0x1c,0x3f81f,
2779 - 0xffc00000,0x1c00038,0x407000,0x0,0x0,0x0,0x0,0x0,0xffff800,0x0,0x39c7,0x18c000,0x0,0x0,0x18,0x60001c00,0x61801f80,0x7000ee00,
2780 - 0x1dc003b8,0x77000e,0xe001f80f,0xf007e01f,0xff83fff0,0x7ffe0fff,0xc1fff03f,0xfe07ffc0,0xfff83fc0,0x700f007,0xe000fc00,0x1f8003f0,
2781 - 0x7e0000,0xe1f800,0x7f000fe0,0x1fc003f,0x8001c007,0xe7f0,0x7e380fc,0x701f8e03,0xf1c07e38,0xfc703c1,0xe003f001,0xf8003f00,
2782 - 0x7e000fc,0x3fff87f,0xff0fffe1,0xfffc03f8,0x380e00f,0xc001f800,0x3f0007e0,0xfc0000,0x61f800,0x78e00f1c,0x1e3803c,0x7001c007,
2783 - 0x1f000700,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x70001c00,0x0,
2784 - 0x1c0000,0x0,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0xe00000,0x0,0x0,0xc000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c000,0x0,
2785 - 0x0,0x0,0x0,0x0,0xe00000,0x7000e000,0x0,0x0,0x0,0x0,0x0,0x1c00,0x0,0x1c00000,0x0,0x0,0x1c00,0x7000,0x0,0x0,0x0,0x0,0x1c000000,
2786 - 0x70000e,0x1c000,0x0,0x0,0x1c0000,0xe000c180,0x10,0x20000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc000,
2787 - 0x0,0x38,0x70e000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x18c000,0x2000,0x0,0x1f,0xf8003800,0x7fe00000,0x0,0x0,0x0,0x0,0x4000,
2788 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x400000,
2789 - 0x0,0x0,0x1c007,0x700,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x30001800,
2790 - 0x0,0x1c0000,0x0,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0xe00000,0x0,0x0,0xe000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1e000,
2791 - 0x0,0x0,0x0,0x0,0x0,0xe00000,0x7000e000,0x0,0x0,0x0,0x0,0x0,0x1c00,0x0,0x1c00000,0x0,0x0,0x1c00,0x7000,0x0,0x0,0x0,0x0,0x1c000000,
2792 - 0x70000e,0x1c000,0x0,0x0,0x1c0001,0xe001c380,0x10,0x20000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc000,
2793 - 0x0,0x38,0x7fe000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x18c000,0x3000,0x0,0x1f,0xf8007000,0x7fe00000,0x0,0x0,0x0,0x0,0x6000,
2794 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2795 - 0x0,0x1c007,0x700,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x38003800,
2796 - 0x0,0x380000,0x1,0xc0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x1c00000,0x0,0x0,0x3c18000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf000,
2797 - 0x0,0x0,0x0,0x0,0x0,0xfe0000,0x380fe000,0x0,0x0,0x0,0x0,0x0,0x3800,0x0,0x1c00000,0x0,0x0,0x1c00,0x7000,0x0,0x0,0x0,0x0,0x38000000,
2798 - 0x78000e,0x3c000,0x0,0x0,0x180001,0xc0018300,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc000,0x0,
2799 - 0x38,0x1f8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x18c000,0x1800,0x0,0x0,0x6000e000,0x1800000,0x0,0x0,0x0,0x0,0x3000,0x0,
2800 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2801 - 0x38007,0xe00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x18003000,
2802 - 0x0,0x300000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1800000,0x0,0x0,0x1ff8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,
2803 - 0x0,0x0,0x0,0xfe0000,0xfe000,0x0,0x0,0x0,0x0,0x0,0x607800,0x0,0x3c00000,0x0,0x0,0x1c00,0x7000,0x0,0x0,0x0,0x0,0x78000000,
2804 - 0x3f800e,0x3f8000,0x0,0x0,0x300043,0xc0018200,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc000,
2805 - 0x0,0x38,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x0,0x11800,0x0,0x0,0x6001ff00,0x1800000,0x0,0x0,0x0,0x0,0x23000,0x0,0x0,
2806 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x23000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x78007,
2807 - 0x1e00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x1c007000,0x0,0x0,
2808 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfe0000,
2809 - 0xfe000,0x0,0x0,0x0,0x0,0x0,0x7ff000,0x0,0x7f800000,0x0,0x0,0x1c00,0x7000,0x0,0x0,0x0,0x3,0xf8000000,0x3f800e,0x3f8000,0x0,
2810 - 0x0,0x10007f,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc000,0x0,0x38,0x0,0x0,0x0,0x0,
2811 - 0x0,0x0,0x0,0x0,0x3800,0x0,0x1f800,0x0,0x0,0x6001ff00,0x1800000,0x0,0x0,0x0,0x0,0x3f000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2812 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f8007,0xfe00,0x0,0x0,0x0,0x0,
2813 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2814 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fff8,0x0,0x0,0x0,0x0,0x7fe000,0x0,
2815 - 0x7f000000,0x0,0x0,0x1c00,0x7000,0x0,0x0,0x0,0x3,0xf0000000,0xf800e,0x3e0000,0x0,0x0,0x7f,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2816 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x0,0x1f000,0x0,0x0,0x0,0x0,0x0,
2817 - 0x0,0x0,0x0,0x3e000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e000,0x0,0x0,0x0,0x0,0x0,0x0,
2818 - 0x0,0x0,0x0,0x0,0x0,0x0,0x3f0007,0xfc00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2819 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2820 - 0x0,0x0,0x0,0x0,0x7fff8,0x0,0x0,0x0,0x0,0x1fc000,0x0,0x7e000000,0x0,0x0,0x1c00,0x7000,0x0,0x0,0x0,0x3,0xc0000000,0xe,0x0,
2821 - 0x0,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2822 - 0x0,0x0,0x3800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2823 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c0007,0xf000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2824 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2825 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fff8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2826 - 0xe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2827 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2828 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 };
2829 -
2830 - // Definition of a 29x57 font
2831 - const unsigned int font29x57[29*57*256/32] = {
2832 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2833 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2834 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2835 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2836 - 0x0,0x781e00,0x0,0x0,0x7,0x81e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2837 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7c0000,0xf8000,0x7e00000,0x0,0x7,
2838 - 0xc0000000,0x0,0x7c00,0xf80,0x7e000,0x0,0x7c00000,0xf80000,0x7e000000,0x0,0x0,0x1f00,0x3e0,0x1f800,0x0,0x0,0x0,0x3,0xe0000000,
2839 - 0x7c00003f,0x0,0xf8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2840 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2841 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2842 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2843 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2844 - 0x0,0x0,0x0,0x0,0x0,0x0,0x3c3c00,0x0,0x0,0x3,0xc3c00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e1f00,
2845 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e0000,
2846 - 0x1f0000,0x7e00000,0xf838001f,0xf80001f,0xf0000000,0x0,0x3e00,0x1f00,0x7e000,0x3e1f000,0x3e00000,0x1f00000,0x7e00003e,0x1f000000,
2847 - 0x3e0,0xe0000f80,0x7c0,0x1f800,0x3e0e00,0x7c3e000,0x0,0x1,0xf0000000,0xf800003f,0x1f0f,0x800001f0,0x0,0x0,0x0,0x0,0x0,0x0,
2848 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2849 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2850 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2851 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2852 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1e7800,0x0,0x0,
2853 - 0x1,0xe7800000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e1f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2854 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1e0000,0x1e0000,0xff00001,0xfe38001f,0xf80003f,
2855 - 0xf8000000,0x0,0x1e00,0x1e00,0xff000,0x3e1f000,0x1e00000,0x1e00000,0xff00003e,0x1f000000,0x7f8,0xe0000780,0x780,0x3fc00,0x7f8e00,
2856 - 0x7c3e000,0x0,0x0,0xf0000000,0xf000007f,0x80001f0f,0x800001e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2857 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2858 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2859 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2860 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2861 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xef000,0x0,0x0,0x0,0xef000000,0x0,0x0,0x0,0x0,0x0,0x0,
2862 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e1f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2863 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0000,0x3c0000,0x1e780003,0xfff8001f,0xf80003c,0x78000000,0x0,0xf00,0x3c00,0x1e7800,
2864 - 0x3e1f000,0xf00000,0x3c00001,0xe780003e,0x1f000000,0xfff,0xe00003c0,0xf00,0x79e00,0xfffe00,0x7c3e000,0x0,0x0,0x78000001,0xe00000f3,
2865 - 0xc0001f0f,0x800003c0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0xc0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2866 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2867 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2868 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2869 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2870 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7e000,0x0,0x0,0x0,0x7e000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2871 - 0x3e1f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2872 - 0x0,0x78000,0x780000,0x3c3c0003,0x8ff0001f,0xf800078,0x3c000000,0x0,0x780,0x7800,0x3c3c00,0x3e1f000,0x780000,0x7800003,0xc3c0003e,
2873 - 0x1f000000,0xe3f,0xc00001e0,0x1e00,0xf0f00,0xe3fc00,0x7c3e000,0x0,0x0,0x3c000003,0xc00001e1,0xe0001f0f,0x80000780,0x0,0x0,
2874 - 0x0,0x0,0x0,0x0,0x1f,0xf0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2875 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2876 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2877 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2878 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2879 - 0x0,0x7e000,0x0,0x0,0x0,0x7e000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e1f00,0x0,0x0,0x0,0x0,0x0,0x0,
2880 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfc00,0x7e000,0xfe000,0x0,0x3c000,0xf00000,0x781e0003,
2881 - 0x83e0001f,0xf800070,0x1c000000,0x0,0x3c0,0xf000,0x781e00,0x3e1f000,0x3c0000,0xf000007,0x81e0003e,0x1f000000,0xe0f,0x800000f0,
2882 - 0x3c00,0x1e0780,0xe0f800,0x7c3e000,0x0,0x0,0x1e000007,0x800003c0,0xf0001f0f,0x80000f00,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0xf8000000,
2883 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2884 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2885 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2886 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2887 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2888 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2889 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3fc00,0x1fe000,0x3ff800,0x0,0x0,0x0,0x0,0x0,0x70,0x1c000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2890 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c,0x78000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2891 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2892 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2893 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2894 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1f00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2895 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2896 - 0x0,0x0,0x78,0xf000000,0x0,0x0,0x780f0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7c0,
2897 - 0x0,0x0,0x0,0x0,0x0,0x0,0x3fc00,0x1fe000,0x3ffc00,0x0,0x0,0x0,0x0,0x0,0x70,0x1c000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2898 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1f00000,0x3e000,0x3e00000,0x0,0x78,0x3c000000,0x0,0x1f000,0x3e0,
2899 - 0x3e000,0x0,0x1f000000,0x3e0000,0x3e000000,0x0,0x0,0x7c00,0xf8,0xf800,0x0,0x0,0x0,0xf,0x80000000,0x1f00001f,0x0,0x3e,0x0,
2900 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2901 - 0x0,0x0,0x0,0x30000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2902 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf80000,
2903 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2904 - 0x0,0x0,0x0,0x0,0xf80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x781c0000,0x38,0xe000000,0x0,0x0,0x380e0,0x0,
2905 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf80,0x0,0x0,0x0,0x0,0x0,0x0,0x39c00,0x1ce000,0x303e00,
2906 - 0x0,0x0,0x0,0x0,0x0,0x78,0x3c000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x0,
2907 - 0x0,0x0,0xf80000,0x7c000,0x3e00000,0xf0380000,0x70,0x1c000000,0x0,0xf800,0x7c0,0x3e000,0x0,0xf800000,0x7c0000,0x3e000000,
2908 - 0x0,0x3c0,0xe0003e00,0x1f0,0xf800,0x3c0e00,0x0,0x0,0x7,0xc0000000,0x3e00001f,0x0,0x7c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2909 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0xff,0x0,
2910 - 0xf8,0xf8000,0x1c000,0x0,0x0,0x0,0x0,0x1f,0xc0000000,0x1ff8,0xff00,0x0,0x0,0x3fe000,0x0,0x1fc00001,0xfe000000,0x0,0x0,0x0,
2911 - 0x0,0x7f800,0x0,0x0,0x0,0xff00000,0x0,0x0,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0xf8000000,0xfe,0x0,0x7f80,0x0,0x0,0x0,0x0,0x0,
2912 - 0x0,0x3f,0xf0000000,0x7fe0,0x0,0x0,0x780000,0x1,0xe0000000,0x0,0x780000,0x3,0xfe000000,0x78000,0x3c00,0xf000,0x7800003,0xffe00000,
2913 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfc0000f0,0x3f000,0x0,0x0,0x3fc00,0x0,0x0,0x1fc000,0x0,0x0,0x0,0x1fc0,
2914 - 0x0,0xff000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfe1c0000,0x1c,0x1c000000,0x0,0x0,0x1c1c0,0x0,0x0,0x0,0x0,0x1fe0000,
2915 - 0x0,0x0,0x1ff,0x1f0f8,0x0,0xff000,0x0,0x0,0x0,0x3f,0xff00000f,0x80000000,0xfe0,0x3f80,0xf00,0x0,0x0,0x0,0x1,0xf8000003,0xe0000000,
2916 - 0x1c00,0xe000,0xe00,0x0,0x0,0x0,0x0,0x0,0x3c,0x78000000,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f0,0x3f80,0x1fc00,0xfe000,
2917 - 0x7f0000,0x0,0x1fc07000,0x0,0x0,0x0,0x0,0x0,0x3f800,0x780000,0x78000,0x7f00001,0xfc38001f,0xf800070,0x1c000000,0x0,0x7800,
2918 - 0x780,0x7f000,0x3e1f000,0x7800000,0x780000,0x7f00003e,0x1f0003f0,0x7f0,0xe0001e00,0x1e0,0x1fc00,0x7f0e00,0x7c3e000,0x0,0x3,
2919 - 0xc0000000,0x3c00003f,0x80001f0f,0x80000078,0x1e0000,0x3e1f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2920 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3c1e0000,0x1e078000,0x30000000,0x3ff,0xc00001e0,0xf0,
2921 - 0x78000,0x1c000,0x0,0x0,0x0,0x0,0x1e0007f,0xf000007e,0x1ffff,0x7ffe0,0x1f80,0x3ffff80,0xfff803,0xfffff800,0xfff80007,0xff800000,
2922 - 0x0,0x0,0x0,0x0,0x1ffe00,0x0,0xfe0003,0xfff80000,0x3ffe01ff,0xe00003ff,0xffe01fff,0xff0003ff,0xe01e0007,0x803ffff0,0xfff80,
2923 - 0x3c000fc0,0x7800001f,0x8003f07e,0x1e000f,0xfe0007ff,0xf00003ff,0x8007ffe0,0x1fff8,0x7fffffe,0xf0003c1,0xe000079e,0xf1f,0x1f3e0,
2924 - 0x1f01ff,0xfff8003f,0xf003c000,0x7fe0,0x3f00,0x0,0x3c0000,0x1,0xe0000000,0x0,0x780000,0xf,0xfe000000,0x78000,0x3c00,0xf000,
2925 - 0x7800003,0xffe00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0xfc0000f0,0x3fe00,0x0,0x0,0xfff00,0x0,0x0,0x3fe000,
2926 - 0x0,0x0,0x0,0x1dc0,0x0,0x3fff00,0x0,0x3ffff80,0x1f,0xffff8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff1c07ff,0x3c0f001e,0x3c000000,
2927 - 0x0,0x0,0x1e3c0,0xf80007c,0x0,0x780000,0x0,0xfff8000,0x3e00,0x1f00000,0x7ff,0xc001f0f8,0x0,0x3ffc00,0x0,0x0,0x0,0x3f,0xff00003f,
2928 - 0xe0000000,0x3ff8,0xffe0,0x1e00,0x0,0xfffc00,0x0,0x7,0xf800000f,0xf8000000,0x1c00,0xe000,0xe00,0xf000,0x1fc000,0xfe0000,0x7f00000,
2929 - 0x3f800001,0xfc00003f,0xf80000ff,0xffc003ff,0xe007ffff,0xc03ffffe,0x1fffff0,0xfffff80,0x7fffe003,0xffff001f,0xfff800ff,0xffc01ffc,
2930 - 0xfc00,0x3c001ffc,0xffe0,0x7ff00,0x3ff800,0x1ffc000,0x0,0x7ff8f0f0,0x3c0780,0x1e03c00,0xf01e000,0x783e0001,0xf01e0000,0xffe00,
2931 - 0x3c0000,0xf0000,0x7700001,0xfe38001f,0xf800070,0x1c000000,0x0,0x3c00,0xf00,0x77000,0x3e1f000,0x3c00000,0xf00000,0x7700003e,
2932 - 0x1f0000f8,0xc0007f8,0xe0000f00,0x3c0,0x1dc00,0x7f8e00,0x7c3e000,0x0,0x1,0xe0000000,0x7800003b,0x80001f0f,0x800000f0,0x1e0000,
2933 - 0x3e1f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2934 - 0x0,0x0,0x780000,0x3c1e0000,0x1e070000,0x300001f0,0x7ff,0xc00001e0,0x1e0,0x7c000,0x1c000,0x0,0x0,0x0,0x0,0x3c000ff,0xf80007fe,
2935 - 0x3ffff,0x801ffff8,0x1f80,0x3ffff80,0x3fff803,0xfffff801,0xfffc000f,0xffc00000,0x0,0x0,0x0,0x0,0x7fff80,0x0,0xfe0003,0xffff0000,
2936 - 0xffff01ff,0xfc0003ff,0xffe01fff,0xff000fff,0xf01e0007,0x803ffff0,0xfff80,0x3c001f80,0x7800001f,0xc007f07e,0x1e001f,0xff0007ff,
2937 - 0xfc0007ff,0xc007fffc,0x3fffc,0x7fffffe,0xf0003c1,0xf0000f9e,0xf0f,0x8003e1e0,0x1e01ff,0xfff8003f,0xf001e000,0x7fe0,0x3f00,
2938 - 0x0,0x1e0000,0x1,0xe0000000,0x0,0x780000,0x1f,0xfe000000,0x78000,0x3c00,0xf000,0x7800003,0xffe00000,0x0,0x0,0x0,0x0,0x0,0x0,
2939 - 0x0,0x0,0x0,0x0,0x0,0x0,0xf,0xfc0000f0,0x3ff00,0x0,0x0,0x1fff80,0x0,0x0,0xffe000,0x0,0x0,0x0,0x3de0,0x0,0x7fff80,0x0,0xfffff80,
2940 - 0x1f,0xffff8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0xe7bc07ff,0x3e1f000f,0x78000000,0x0,0x0,0xf780,0x7800078,0x0,0x780000,0x180000,
2941 - 0x1fff8000,0x1e00,0x1e0003c,0xfff,0xc001f0f8,0x0,0x7ffe00,0x0,0x0,0x0,0x3f,0xff00007f,0xf0000000,0x3ffc,0xfff0,0x3c00,0x0,
2942 - 0x7fffc00,0x0,0x7,0xf800003f,0xfe000000,0x1c00,0xe000,0xe00,0xf000,0x1fc000,0xfe0000,0x7f00000,0x3f800001,0xfc00001f,0xe00001ff,
2943 - 0xffc00fff,0xf007ffff,0xc03ffffe,0x1fffff0,0xfffff80,0x7fffe003,0xffff001f,0xfff800ff,0xffc01fff,0xc000fc00,0x3c003ffe,0x1fff0,
2944 - 0xfff80,0x7ffc00,0x3ffe000,0x0,0xfffce0f0,0x3c0780,0x1e03c00,0xf01e000,0x781e0001,0xe01e0000,0x3fff00,0x1e0000,0x1e0000,0xf780003,
2945 - 0xcf78001f,0xf800078,0x3c000000,0x0,0x1e00,0x1e00,0xf7800,0x3e1f000,0x1e00000,0x1e00000,0xf780003e,0x1f0000fc,0x7c000f3d,
2946 - 0xe0000780,0x780,0x3de00,0xf3de00,0x7c3e000,0x0,0x0,0xf0000000,0xf000007b,0xc0001f0f,0x800001e0,0x1e0000,0x3e1f00,0x0,0x0,
2947 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,
2948 - 0x3c1e0000,0x1e0f0000,0x300007fc,0xfff,0xc00001e0,0x1e0,0x3c000,0x1c000,0x0,0x0,0x0,0x0,0x3c001ff,0xfc001ffe,0x3ffff,0xc01ffffc,
2949 - 0x3f80,0x3ffff80,0x7fff803,0xfffff803,0xfffe001f,0xffe00000,0x0,0x0,0x0,0x0,0xffff80,0x7f800,0xfe0003,0xffff8001,0xffff01ff,
2950 - 0xff0003ff,0xffe01fff,0xff001fff,0xf01e0007,0x803ffff0,0xfff80,0x3c003f00,0x7800001f,0xc007f07f,0x1e003f,0xff8007ff,0xff000fff,
2951 - 0xe007ffff,0x7fffc,0x7fffffe,0xf0003c0,0xf0000f1e,0xf07,0x8003c1f0,0x3e01ff,0xfff8003f,0xf001e000,0x7fe0,0x7f80,0x0,0xe0000,
2952 - 0x1,0xe0000000,0x0,0x780000,0x1f,0xfe000000,0x78000,0x3c00,0xf000,0x7800003,0xffe00000,0x0,0x0,0x0,0x0,0x0,0x0,0x3c000,0x0,
2953 - 0x0,0x0,0x0,0x0,0xf,0xfc0000f0,0x3ff00,0x0,0x0,0x3fff80,0x0,0x0,0xffe000,0x0,0x0,0x0,0x78f0,0x0,0xffff80,0x0,0x3fffff80,0x1f,
2954 - 0xffff8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0xc7f80070,0x3e1f0007,0x70000000,0x0,0x0,0x7700,0x7c000f8,0x0,0x780000,0x180000,
2955 - 0x3fff8000,0x1f00,0x3e0003c,0x1f03,0xc001f0f8,0x0,0x703f00,0x0,0x0,0x0,0x3f,0xff0000f0,0xf8000000,0x303e,0xc0f8,0x7800,0x0,
2956 - 0xffffc00,0x0,0x7,0x3800003e,0x3e000000,0x1c00,0xe000,0x3c00,0xf000,0x1fc000,0xfe0000,0x7f00000,0x3f800001,0xfc00000f,0xe00001ff,
2957 - 0xffc01fff,0xf007ffff,0xc03ffffe,0x1fffff0,0xfffff80,0x7fffe003,0xffff001f,0xfff800ff,0xffc01fff,0xf000fe00,0x3c007fff,0x3fff8,
2958 - 0x1fffc0,0xfffe00,0x7fff000,0x1,0xffffc0f0,0x3c0780,0x1e03c00,0xf01e000,0x781f0003,0xe01e0000,0x3fff80,0xe0000,0x3c0000,0x1e3c0003,
2959 - 0x8ff0001f,0xf80003c,0x78000000,0x0,0xe00,0x3c00,0x1e3c00,0x3e1f000,0xe00000,0x3c00001,0xe3c0003e,0x1f00007f,0xf8000e3f,0xc0000380,
2960 - 0xf00,0x78f00,0xe3fc00,0x7c3e000,0x0,0x0,0x70000001,0xe00000f1,0xe0001f0f,0x800003c0,0x1e0000,0x3e1f00,0x0,0x0,0x0,0x0,0x0,
2961 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3c1e0000,0x3c0f0000,
2962 - 0x30000ffe,0xf80,0xc00001e0,0x3c0,0x1e000,0x101c040,0x0,0x0,0x0,0x0,0x78003f0,0x7e001ffe,0x3f807,0xe01f00fe,0x3f80,0x3ffff80,
2963 - 0x7e01803,0xfffff007,0xe03f003f,0x3f00000,0x0,0x0,0x0,0x0,0xfc0fc0,0x3ffe00,0xfe0003,0xffffc003,0xf81f01ff,0xff8003ff,0xffe01fff,
2964 - 0xff003f01,0xf01e0007,0x803ffff0,0xfff80,0x3c007e00,0x7800001f,0xc007f07f,0x1e007e,0xfc007ff,0xff801f83,0xf007ffff,0x800fc07c,
2965 - 0x7fffffe,0xf0003c0,0xf0000f0f,0x1e07,0xc007c0f8,0x7c01ff,0xfff8003c,0xf000,0x1e0,0xffc0,0x0,0xf0000,0x1,0xe0000000,0x0,0x780000,
2966 - 0x3e,0x0,0x78000,0x3c00,0xf000,0x7800000,0x1e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x3c000,0x0,0x0,0x0,0x0,0x0,0x1f,0x800000f0,0x1f80,
2967 - 0x0,0x0,0x7e0780,0x0,0x0,0x1f82000,0x0,0x0,0x0,0x7070,0x0,0x1f80f80,0x0,0x7fffff80,0x1f,0xffff8000,0x0,0x0,0x0,0x0,0x0,0x0,
2968 - 0x0,0x1,0xc3f80070,0x3f3f0007,0xf0000000,0x0,0x0,0x7f00,0x3e001f0,0x0,0x780000,0x180000,0x7f018000,0xf80,0x7c0003c,0x3e00,
2969 - 0x4001f0f8,0xfe00,0x400f00,0x0,0x0,0x0,0x7f000000,0xe0,0x38000000,0x1e,0x38,0x7800,0x0,0x1ffe1c00,0x0,0x0,0x38000078,0xf000000,
2970 - 0x1c00,0xe000,0x7f800,0xf000,0x1fc000,0xfe0000,0x7f00000,0x3f800001,0xfc00001f,0xf00001ff,0xffc03f81,0xf007ffff,0xc03ffffe,
2971 - 0x1fffff0,0xfffff80,0x7fffe003,0xffff001f,0xfff800ff,0xffc01fff,0xf800fe00,0x3c00fc1f,0x8007e0fc,0x3f07e0,0x1f83f00,0xfc1f800,
2972 - 0x3,0xf07fc0f0,0x3c0780,0x1e03c00,0xf01e000,0x780f8007,0xc01e0000,0x7e0fc0,0xf0000,0x3c0000,0x1c1c0003,0x87f0001f,0xf80003f,
2973 - 0xf8000000,0x0,0xf00,0x3c00,0x1c1c00,0x3e1f000,0xf00000,0x3c00001,0xc1c0003e,0x1f00003f,0xc0000e1f,0xc00003c0,0xf00,0x70700,
2974 - 0xe1fc00,0x7c3e000,0x0,0x0,0x78000001,0xe00000e0,0xe0001f0f,0x800003c0,0x1e0000,0x3e1f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2975 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3c1e0000,0x3c0f0001,0xff801e0f,
2976 - 0x1f00,0x1e0,0x3c0,0x1e000,0x3c1c1e0,0x0,0x0,0x0,0x0,0x78007c0,0x1f001f9e,0x3c001,0xf010003e,0x7780,0x3c00000,0xf800000,0xf007,
2977 - 0xc01f007c,0x1f80000,0x0,0x0,0x0,0x0,0xe003e0,0x7fff00,0x1ef0003,0xc007e007,0xc00301e0,0x1fc003c0,0x1e00,0x7c00,0x301e0007,
2978 - 0x80007800,0x780,0x3c00fc00,0x7800001f,0xe00ff07f,0x1e00f8,0x3e00780,0x1fc03e00,0xf807801f,0xc01f001c,0xf000,0xf0003c0,0xf0000f0f,
2979 - 0x1e03,0xc00f8078,0x780000,0xf0003c,0xf000,0x1e0,0x1f3e0,0x0,0x78000,0x1,0xe0000000,0x0,0x780000,0x3c,0x0,0x78000,0x0,0x0,
2980 - 0x7800000,0x1e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x3c000,0x0,0x0,0x0,0x0,0x0,0x1f,0xf0,0xf80,0x0,0x0,0xf80180,0x0,0x0,0x1e00000,
2981 - 0x0,0x0,0x0,0xe038,0x0,0x3e00380,0x0,0xfe0f0000,0x0,0xf0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0xc0f00070,0x3b370003,0xe0000000,
2982 - 0x0,0x0,0x3e00,0x1e001e0,0x0,0x780000,0x180000,0x7c000000,0x780,0x780003c,0x3c00,0x0,0x7ffc0,0x780,0x0,0x0,0x3,0xffe00000,
2983 - 0x1c0,0x3c000000,0xe,0x38,0xf000,0x0,0x3ffe1c00,0x0,0x0,0x38000078,0xf000000,0x1c00,0xe000,0x7f000,0xf000,0x3de000,0x1ef0000,
2984 - 0xf780000,0x7bc00003,0xde00001e,0xf00003e7,0x80007c00,0x30078000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,
2985 - 0xe0001e03,0xfc00fe00,0x3c01f007,0xc00f803e,0x7c01f0,0x3e00f80,0x1f007c00,0x7,0xc01f80f0,0x3c0780,0x1e03c00,0xf01e000,0x78078007,
2986 - 0x801e0000,0x7803c0,0x78000,0x780000,0x380e0003,0x81e00000,0x1f,0xf0000000,0x0,0x780,0x7800,0x380e00,0x0,0x780000,0x7800003,
2987 - 0x80e00000,0x1ff,0x80000e07,0x800001e0,0x1e00,0xe0380,0xe07800,0x0,0x0,0x0,0x3c000003,0xc00001c0,0x70000000,0x780,0x1e0000,
2988 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
2989 - 0x780000,0x3c1e0000,0x3c0e0007,0xfff01c07,0x1e00,0x1e0,0x780,0xf000,0x3e1c3e0,0x0,0x0,0x0,0x0,0xf0007c0,0x1f00181e,0x20000,
2990 - 0xf000001f,0xf780,0x3c00000,0x1f000000,0x1f00f,0x800f8078,0xf80000,0x0,0x0,0x0,0x0,0x8003e0,0x1fc0f80,0x1ef0003,0xc001e007,
2991 - 0x800101e0,0x7e003c0,0x1e00,0x7800,0x101e0007,0x80007800,0x780,0x3c00f800,0x7800001e,0xe00ef07f,0x801e00f0,0x1e00780,0x7c03c00,
2992 - 0x78078007,0xc01e0004,0xf000,0xf0003c0,0x78001e0f,0x1e03,0xe00f807c,0xf80000,0x1f0003c,0x7800,0x1e0,0x3e1f0,0x0,0x3c000,0x1,
2993 - 0xe0000000,0x0,0x780000,0x3c,0x0,0x78000,0x0,0x0,0x7800000,0x1e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x3c000,0x0,0x0,0x0,0x0,0x0,
2994 - 0x1e,0xf0,0x780,0x0,0x0,0x1f00080,0x0,0x0,0x3c00000,0x0,0x0,0x0,0x1e03c,0x0,0x3c00080,0x0,0xf80f0000,0x0,0x1f0000,0x0,0x0,
2995 - 0x0,0x0,0x0,0x0,0x0,0x0,0x70,0x3bf70003,0xe0000000,0x0,0x0,0x3e00,0x1f003e0,0x0,0x780000,0x180000,0x78000000,0x7c0,0xf80003c,
2996 - 0x3c00,0x0,0x1f01f0,0x780,0x0,0x0,0xf,0x80f80000,0x1c0,0x1c000000,0xe,0x38,0x1e000,0x0,0x7ffe1c00,0x0,0x0,0x380000f0,0x7800000,
2997 - 0x1c00,0xe000,0x7fc00,0xf000,0x3de000,0x1ef0000,0xf780000,0x7bc00003,0xde00001e,0xf00003c7,0x80007800,0x10078000,0x3c0000,
2998 - 0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x7e00ff00,0x3c01e003,0xc00f001e,0x7800f0,0x3c00780,0x1e003c00,
2999 - 0x7,0x800f00f0,0x3c0780,0x1e03c00,0xf01e000,0x7807c00f,0x801e0000,0xf803c0,0x3c000,0xf00000,0x780f0000,0x0,0x7,0xc0000000,
3000 - 0x0,0x3c0,0xf000,0x780f00,0x0,0x3c0000,0xf000007,0x80f00000,0x7ff,0xc0000000,0xf0,0x3c00,0x1e03c0,0x0,0x0,0x0,0x0,0x1e000007,
3001 - 0x800003c0,0x78000000,0xf00,0x1e0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3002 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3c1e0000,0x3c1e001f,0xfff03803,0x80001e00,0x1e0,0x780,0xf000,0xf9cf80,
3003 - 0x0,0x0,0x0,0x0,0xf000780,0xf00001e,0x0,0xf800000f,0xe780,0x3c00000,0x1e000000,0x1e00f,0x78078,0x7c0000,0x0,0x0,0x0,0x0,0x1e0,
3004 - 0x3f003c0,0x1ef0003,0xc000f00f,0x800001e0,0x1f003c0,0x1e00,0xf000,0x1e0007,0x80007800,0x780,0x3c01f000,0x7800001e,0xe00ef07f,
3005 - 0x801e01f0,0x1e00780,0x3c07c00,0x78078003,0xc03e0000,0xf000,0xf0003c0,0x78001e0f,0x1e01,0xf01f003c,0xf00000,0x3e0003c,0x7800,
3006 - 0x1e0,0x7c0f8,0x0,0x0,0x1,0xe0000000,0x0,0x780000,0x3c,0x0,0x78000,0x0,0x0,0x7800000,0x1e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x3c000,
3007 - 0x0,0x0,0x0,0x0,0x0,0x1e,0xf0,0x780,0x0,0x0,0x1e00000,0x0,0x0,0x3c00000,0x0,0x8,0x40,0x0,0x7e0000,0x7c00000,0x1,0xf00f0000,
3008 - 0x0,0x3e0000,0x0,0x3f,0xfc0,0xfc3f0,0xfc3f0,0x0,0x0,0x0,0x70,0x39e70000,0x0,0x0,0x0,0x0,0xf003c0,0x0,0x0,0x180000,0xf8000000,
3009 - 0x3c0,0xf00003c,0x3c00,0x0,0x3c0078,0x7ff80,0x0,0x0,0x1e,0x3c0000,0x1c0,0x1c000000,0xe,0xf0,0x0,0x0,0x7ffe1c00,0x0,0x0,0x380000f0,
3010 - 0x7800000,0x1c00,0xe000,0x3c00,0x0,0x3de000,0x1ef0000,0xf780000,0x7bc00003,0xde00001e,0xf00003c7,0x8000f800,0x78000,0x3c0000,
3011 - 0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x1f00ff00,0x3c03e003,0xc01f001e,0xf800f0,0x7c00780,0x3e003c00,
3012 - 0xf,0x800f80f0,0x3c0780,0x1e03c00,0xf01e000,0x7803c00f,0x1fffc0,0xf001e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3013 - 0x0,0x0,0x307,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1e0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3014 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3c1e0000,0x781e003f,0xfff03803,
3015 - 0x80001e00,0x1e0,0xf80,0xf000,0x3dde00,0x0,0x0,0x0,0x0,0xf000f00,0x780001e,0x0,0x7800000f,0x1e780,0x3c00000,0x3e000000,0x3e00f,
3016 - 0x780f0,0x7c0000,0x0,0x0,0x0,0x0,0x1e0,0x7c001e0,0x3ef8003,0xc000f00f,0x1e0,0xf003c0,0x1e00,0xf000,0x1e0007,0x80007800,0x780,
3017 - 0x3c03e000,0x7800001e,0xf01ef07b,0xc01e01e0,0xf00780,0x3e07800,0x3c078003,0xe03c0000,0xf000,0xf0003c0,0x78001e0f,0x1e00,0xf01e003e,
3018 - 0x1f00000,0x3c0003c,0x7800,0x1e0,0x78078,0x0,0x0,0x1,0xe0000000,0x0,0x780000,0x3c,0x0,0x78000,0x0,0x0,0x7800000,0x1e00000,
3019 - 0x0,0x0,0x0,0x0,0x0,0x0,0x3c000,0x0,0x0,0x0,0x0,0x0,0x1e,0xf0,0x780,0x0,0x0,0x1e00000,0x0,0x0,0x3c00000,0x0,0x18,0xc0,0x0,
3020 - 0xe70000,0x7800000,0x1,0xe00f0000,0x0,0x3c0000,0x0,0x3f,0xfc0,0xfc1f0,0x1f83f0,0x0,0x0,0x0,0x70,0x39e70000,0x0,0x0,0x0,0x0,
3021 - 0xf807c0,0x0,0x0,0x180000,0xf0000000,0x3e0,0x1f00003c,0x3e00,0x0,0x70001c,0x3fff80,0x0,0x0,0x38,0xe0000,0x1c0,0x1c000078,
3022 - 0x1c,0x1fe0,0x0,0x0,0xfffe1c00,0x0,0x0,0x380000f0,0x7800000,0x1c00,0xe000,0xe00,0x0,0x7df000,0x3ef8000,0x1f7c0000,0xfbe00007,
3023 - 0xdf00003c,0x780003c7,0x8000f000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0xf00f780,
3024 - 0x3c03c001,0xe01e000f,0xf00078,0x78003c0,0x3c001e00,0xf,0xf80f0,0x3c0780,0x1e03c00,0xf01e000,0x7803e01f,0x1ffff8,0xf001e0,
3025 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0xc000,0x0,0x0,0x0,0x0,0x1e0000,
3026 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3027 - 0x780000,0x3c1e0000,0x781e003e,0x30703803,0x80001e00,0x1e0,0xf00,0x7800,0xff800,0x1e0000,0x0,0x0,0x0,0x1e000f00,0x780001e,
3028 - 0x0,0x7800000f,0x3c780,0x3c00000,0x3c000000,0x3c00f,0x780f0,0x3c0000,0x0,0x0,0x2000000,0x800000,0x1e0,0x78000e0,0x3c78003,
3029 - 0xc000f01e,0x1e0,0xf803c0,0x1e00,0x1e000,0x1e0007,0x80007800,0x780,0x3c07c000,0x7800001e,0x701cf07b,0xc01e01e0,0xf00780,0x1e07800,
3030 - 0x3c078001,0xe03c0000,0xf000,0xf0003c0,0x7c003e0f,0x1e00,0xf83e001e,0x1e00000,0x7c0003c,0x3c00,0x1e0,0xf807c,0x0,0x0,0x1fe0001,
3031 - 0xe1fc0000,0x7f00003,0xf8780007,0xf000003c,0x7f0,0x783f0,0x0,0x0,0x7800000,0x1e00000,0x3e0f8000,0xfc00007,0xf8000007,0xf00001fc,
3032 - 0xf,0xc0003fc0,0x3c000,0x0,0x0,0x0,0x0,0x0,0x1e,0xf0,0x780,0x0,0x0,0x3c00000,0x0,0x0,0x3c00000,0x0,0x18,0xc0,0x0,0x1818000,
3033 - 0x7800000,0x1,0xe00f0000,0x0,0x7c0000,0x0,0x1f,0x80001f80,0x7c1f8,0x1f83e0,0x0,0x0,0x0,0x70,0x38c70007,0xf8000000,0x7f03,
3034 - 0xf0000000,0x0,0x780780,0x0,0x0,0xfe0000,0xf0000000,0x1e0,0x1e00003c,0x3f00,0x0,0xe07f0e,0x7fff80,0x0,0x0,0x70,0x70000,0x1c0,
3035 - 0x1c000078,0x3c,0x1fc0,0x0,0x0,0xfffe1c00,0x0,0x0,0x380000f0,0x7800000,0x1c00,0xe000,0xe00,0x0,0x78f000,0x3c78000,0x1e3c0000,
3036 - 0xf1e00007,0x8f00003c,0x78000787,0x8001e000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,
3037 - 0xf80f780,0x3c03c001,0xe01e000f,0xf00078,0x78003c0,0x3c001e00,0xf,0x1f80f0,0x3c0780,0x1e03c00,0xf01e000,0x7801e01e,0x1ffffc,
3038 - 0xf007e0,0x3fc000,0x1fe0000,0xff00000,0x7f800003,0xfc00001f,0xe0000fc0,0xfc00007f,0xfe0,0x7f00,0x3f800,0x1fc000,0x0,0x0,0x0,
3039 - 0x1,0xf000001f,0x80000ff0,0x7f80,0x3fc00,0x1fe000,0xff0000,0x1f80000,0x1fc1e000,0x0,0x0,0x0,0x0,0x1e1fc0,0x0,0x0,0x0,0x0,
3040 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3c1e0000,
3041 - 0x781c007c,0x30003803,0x80001f00,0x1e0,0xf00,0x7800,0x7f000,0x1e0000,0x0,0x0,0x0,0x1e000f00,0x780001e,0x0,0x7800000f,0x3c780,
3042 - 0x3c00000,0x3c000000,0x3c00f,0x780f0,0x3c0000,0x0,0x0,0x1e000000,0xf00000,0x3e0,0xf0000e0,0x3c78003,0xc000f01e,0x1e0,0x7803c0,
3043 - 0x1e00,0x1e000,0x1e0007,0x80007800,0x780,0x3c0f8000,0x7800001e,0x701cf079,0xe01e01e0,0xf00780,0x1e07800,0x3c078001,0xe03c0000,
3044 - 0xf000,0xf0003c0,0x3c003c0f,0x3e00,0x787c001f,0x3e00000,0xf80003c,0x3c00,0x1e0,0x1f003e,0x0,0x0,0x1fffc001,0xe7ff0000,0x3ffe000f,
3045 - 0xfe78003f,0xfc001fff,0xfe001ffc,0xf0078ffc,0x1ffc00,0x7ff000,0x7800f80,0x1e0000f,0x7f1fc01e,0x3ff0001f,0xfe00079f,0xfc0007ff,
3046 - 0x3c003c7f,0xf001fff8,0x1fffff0,0x3c003c0,0xf0000f1e,0xf1f,0x7c1f0,0x1f00ff,0xffe0001e,0xf0,0x780,0x0,0x0,0x3c00000,0x100000,
3047 - 0x0,0x7800000,0x0,0x18,0xc0,0x0,0x1818000,0x7800000,0x1,0xe00f0000,0x1000000,0xf80000,0x40000002,0xf,0x80001f00,0x7e0f8,0x1f07c0,
3048 - 0x0,0x0,0x0,0x70,0x38c7003f,0xff000000,0xff8f,0xf8000100,0xffffe,0x7c0f80,0x0,0x0,0x3ffc000,0xf0000020,0x1001f0,0x3c00003c,
3049 - 0x1f80,0x0,0x1c3ffc7,0x7c0780,0x0,0x0,0xe3,0xff038000,0xe0,0x38000078,0x78,0x1ff0,0x0,0x3c003c0,0xfffe1c00,0x0,0x0,0x380000f0,
3050 - 0x7800000,0x1c00,0xe000,0xe00,0xf000,0x78f000,0x3c78000,0x1e3c0000,0xf1e00007,0x8f00003c,0x78000787,0x8001e000,0x78000,0x3c0000,
3051 - 0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x780f3c0,0x3c03c001,0xe01e000f,0xf00078,0x78003c0,0x3c001e00,
3052 - 0x4000200f,0x3f80f0,0x3c0780,0x1e03c00,0xf01e000,0x7801f03e,0x1ffffe,0xf01fe0,0x3fff800,0x1fffc000,0xfffe0007,0xfff0003f,
3053 - 0xff8001ff,0xfc003ff3,0xfe0003ff,0xe0007ff8,0x3ffc0,0x1ffe00,0xfff000,0x3ff80001,0xffc0000f,0xfe00007f,0xf000003f,0xf8003c7f,
3054 - 0xe0003ffc,0x1ffe0,0xfff00,0x7ff800,0x3ffc000,0x1f80000,0xfff1c03c,0x3c01e0,0x1e00f00,0xf007800,0x781f0001,0xf01e7ff0,0x7c0007c,
3055 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,
3056 - 0x3c1e003f,0xfffff078,0x30003803,0x80000f00,0x1e0,0x1f00,0x7800,0x7f000,0x1e0000,0x0,0x0,0x0,0x3c000f00,0x780001e,0x0,0x7800000f,
3057 - 0x78780,0x3c00000,0x3c000000,0x7c00f,0x780f0,0x3c0007,0xe000003f,0x0,0xfe000000,0xfe0000,0x3c0,0x1f000070,0x7c7c003,0xc000f01e,
3058 - 0x1e0,0x7803c0,0x1e00,0x1e000,0x1e0007,0x80007800,0x780,0x3c1f0000,0x7800001e,0x783cf079,0xe01e03c0,0xf00780,0x1e0f000,0x3c078001,
3059 - 0xe03c0000,0xf000,0xf0003c0,0x3c003c07,0x81f03c00,0x7c7c000f,0x87c00000,0xf00003c,0x1e00,0x1e0,0x3e001f,0x0,0x0,0x3fffe001,
3060 - 0xefff8000,0x7fff001f,0xff78007f,0xfe001fff,0xfe003ffe,0xf0079ffe,0x1ffc00,0x7ff000,0x7801f00,0x1e0000f,0xffbfe01e,0x7ff8003f,
3061 - 0xff0007bf,0xfe000fff,0xbc003cff,0xf803fffc,0x1fffff0,0x3c003c0,0x78001e1e,0xf0f,0x800f80f0,0x1e00ff,0xffe0001e,0xf0,0x780,
3062 - 0x0,0x0,0x3c00000,0x380000,0x0,0x7800000,0x0,0x18,0xc0,0x0,0x1008000,0x7800000,0x3,0xe00f0000,0x3800000,0xf00000,0xe0000007,
3063 - 0xf,0x80001f00,0x3e0f8,0x1e07c0,0x0,0x0,0x0,0x70,0x3807007f,0xff800000,0x1ffdf,0xfc000380,0xffffe,0x3e1f00,0x0,0x0,0xfffe000,
3064 - 0xf0000030,0x3800f8,0x7c00003c,0xfc0,0x0,0x18780c3,0xf00780,0x80100,0x0,0xc3,0xffc18000,0xf0,0x78000078,0xf0,0xf0,0x0,0x3c003c0,
3065 - 0xfffe1c00,0x0,0x0,0x380000f0,0x7800801,0x1c00,0xe000,0x1e00,0xf000,0xf8f800,0x7c7c000,0x3e3e0001,0xf1f0000f,0x8f80007c,0x7c000787,
3066 - 0x8001e000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x780f3c0,0x3c078001,0xe03c000f,
3067 - 0x1e00078,0xf0003c0,0x78001e00,0xe000701f,0x3fc0f0,0x3c0780,0x1e03c00,0xf01e000,0x7800f87c,0x1e007f,0xf07e00,0x7fffc00,0x3fffe001,
3068 - 0xffff000f,0xfff8007f,0xffc003ff,0xfe007ff7,0xff0007ff,0xf000fffc,0x7ffe0,0x3fff00,0x1fff800,0x3ff80001,0xffc0000f,0xfe00007f,
3069 - 0xf00000ff,0xf8003cff,0xf0007ffe,0x3fff0,0x1fff80,0xfffc00,0x7ffe000,0x1f80001,0xfffb803c,0x3c01e0,0x1e00f00,0xf007800,0x780f0001,
3070 - 0xe01efff8,0x3c00078,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3071 - 0x0,0x0,0x0,0x0,0x0,0x780000,0x3c1e003f,0xfffff078,0x30001c07,0xf80,0x1e0,0x1e00,0x3c00,0xff800,0x1e0000,0x0,0x0,0x0,0x3c001e00,
3072 - 0x3c0001e,0x0,0x7800001e,0x70780,0x3c00000,0x78000000,0x78007,0x800f00f0,0x3e0007,0xe000003f,0x3,0xfe000000,0xff8000,0x7c0,
3073 - 0x1e000070,0x783c003,0xc001f01e,0x1e0,0x7803c0,0x1e00,0x1e000,0x1e0007,0x80007800,0x780,0x3c3e0000,0x7800001e,0x3838f079,
3074 - 0xe01e03c0,0x780780,0x1e0f000,0x1e078001,0xe03c0000,0xf000,0xf0003c0,0x3c007c07,0x81f03c00,0x3ef80007,0x87800000,0x1f00003c,
3075 - 0x1e00,0x1e0,0x7c000f,0x80000000,0x0,0x3ffff001,0xffffc000,0xffff003f,0xff7800ff,0xff001fff,0xfe007ffe,0xf007bffe,0x1ffc00,
3076 - 0x7ff000,0x7803e00,0x1e0000f,0xffffe01e,0xfff8007f,0xff8007ff,0xff001fff,0xbc003dff,0xf807fffc,0x1fffff0,0x3c003c0,0x78001e0f,
3077 - 0x1e07,0xc01f00f0,0x1e00ff,0xffe0001e,0xf0,0x780,0x0,0x0,0x7c00000,0x7c0000,0x0,0x7800000,0x0,0x18,0xc0,0x0,0x1018000,0x7800000,
3078 - 0x3,0xc00f0000,0x7c00000,0x1f00001,0xf000000f,0x80000007,0xc0003e00,0x1e07c,0x3e0780,0x0,0x0,0x0,0x70,0x380700ff,0xff800000,
3079 - 0x3ffff,0xfe0007c0,0xffffe,0x1e1e00,0x0,0x780000,0x1fffe000,0xf0000078,0x7c0078,0x7800003c,0xff0,0x0,0x38e0003,0x80f00780,
3080 - 0x180300,0x0,0x1c3,0x81e1c000,0x7f,0xf0000078,0x1e0,0x38,0x0,0x3c003c0,0xfffe1c00,0x0,0x0,0x380000f0,0x7800c01,0x80001c00,
3081 - 0xe000,0x603e00,0xf000,0xf07800,0x783c000,0x3c1e0001,0xe0f0000f,0x7800078,0x3c000f87,0x8001e000,0x78000,0x3c0000,0x1e00000,
3082 - 0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x780f3c0,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f01,0xf000f81e,
3083 - 0x7bc0f0,0x3c0780,0x1e03c00,0xf01e000,0x78007878,0x1e001f,0xf0f800,0x7fffe00,0x3ffff001,0xffff800f,0xfffc007f,0xffe003ff,
3084 - 0xff007fff,0xff800fff,0xf001fffe,0xffff0,0x7fff80,0x3fffc00,0x3ff80001,0xffc0000f,0xfe00007f,0xf00001ff,0xfc003dff,0xf000ffff,
3085 - 0x7fff8,0x3fffc0,0x1fffe00,0xffff000,0x1f80003,0xffff803c,0x3c01e0,0x1e00f00,0xf007800,0x780f0001,0xe01ffffc,0x3c00078,0x0,
3086 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,
3087 - 0x3c1e003f,0xfffff078,0x30001e0f,0x300780,0x1e0,0x1e00,0x3c00,0x3dde00,0x1e0000,0x0,0x0,0x0,0x78001e00,0x3c0001e,0x0,0xf800003e,
3088 - 0xf0780,0x3dfc000,0x783f8000,0xf8007,0xc01f00f0,0x3e0007,0xe000003f,0x1f,0xfc000000,0x7ff000,0xf80,0x3e007c70,0x783c003,0xc001e03c,
3089 - 0x1e0,0x3c03c0,0x1e00,0x3c000,0x1e0007,0x80007800,0x780,0x3c7c0000,0x7800001e,0x3878f078,0xf01e03c0,0x780780,0x1e0f000,0x1e078001,
3090 - 0xe03e0000,0xf000,0xf0003c0,0x1e007807,0x83f03c00,0x3ef00007,0xcf800000,0x3e00003c,0xf00,0x1e0,0xf80007,0xc0000000,0x0,0x3e01f801,
3091 - 0xfe07e001,0xf80f007e,0x7f801f8,0x1f801fff,0xfe00fc0f,0xf007f83f,0x1ffc00,0x7ff000,0x7807c00,0x1e0000f,0x87e1e01f,0xe0fc00fc,
3092 - 0xfc007f8,0x1f803f03,0xfc003df0,0x3807e03c,0x1fffff0,0x3c003c0,0x78003e0f,0x1e03,0xe03e00f8,0x3e00ff,0xffe0001e,0xf0,0x780,
3093 - 0x0,0x0,0x7800000,0xfe0000,0x0,0x7800000,0x0,0x18,0xc0,0x0,0x1818000,0x7c00000,0x3,0xc00f0000,0xfe00000,0x3e00003,0xf800001f,
3094 - 0xc0000007,0xc0003e00,0x1e03c,0x3c0f80,0x0,0x0,0x0,0x70,0x380700fc,0x7800000,0x7c1fe,0x3e000fe0,0xffffe,0x1f3e00,0x0,0x780000,
3095 - 0x3f98e000,0xf000003c,0xfcf8007c,0xf800003c,0x3ffc,0x0,0x31c0001,0x80f00f80,0x380700,0x0,0x183,0x80e0c000,0x3f,0xe0000078,
3096 - 0x3c0,0x38,0x0,0x3c003c0,0xfffe1c00,0x0,0x0,0x38000078,0xf000e01,0xc003ffe0,0x1fff00,0x7ffc00,0xf000,0xf07800,0x783c000,0x3c1e0001,
3097 - 0xe0f0000f,0x7800078,0x3c000f07,0x8003c000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,
3098 - 0x3c0f1e0,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0xf801f01e,0xf3c0f0,0x3c0780,0x1e03c00,0xf01e000,0x78007cf8,
3099 - 0x1e000f,0x80f0f000,0x7c03f00,0x3e01f801,0xf00fc00f,0x807e007c,0x3f003e0,0x1f80707f,0x8f801f80,0xf003f03f,0x1f81f8,0xfc0fc0,
3100 - 0x7e07e00,0x3ff80001,0xffc0000f,0xfe00007f,0xf00003ff,0xfc003fc1,0xf801f81f,0x800fc0fc,0x7e07e0,0x3f03f00,0x1f81f800,0x1f80007,
3101 - 0xe07f003c,0x3c01e0,0x1e00f00,0xf007800,0x780f8003,0xe01fe07e,0x3e000f8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3102 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3f,0xfffff078,0x30000ffe,0x1f007c0,0x0,0x1e00,
3103 - 0x3c00,0xf9cf80,0x1e0000,0x0,0x0,0x0,0x78001e00,0x3c0001e,0x0,0xf00000fc,0x1e0780,0x3fff800,0x78ffe000,0xf0003,0xe03e00f0,
3104 - 0x3e0007,0xe000003f,0x7f,0xe01fffff,0xf00ffc00,0x1f80,0x3c01ff70,0x783c003,0xc007e03c,0x1e0,0x3c03c0,0x1e00,0x3c000,0x1e0007,
3105 - 0x80007800,0x780,0x3cfc0000,0x7800001e,0x3c78f078,0xf01e03c0,0x780780,0x3e0f000,0x1e078003,0xc01f0000,0xf000,0xf0003c0,0x1e007807,
3106 - 0x83f83c00,0x1ff00003,0xcf000000,0x3e00003c,0xf00,0x1e0,0x0,0x0,0x0,0x20007801,0xfc03e003,0xe003007c,0x3f803e0,0x7c0003c,
3107 - 0xf807,0xf007e00f,0x3c00,0xf000,0x780f800,0x1e0000f,0x87e1f01f,0x803c00f8,0x7c007f0,0xf803e01,0xfc003f80,0x80f8004,0x3c000,
3108 - 0x3c003c0,0x3c003c0f,0x1e03,0xe03e0078,0x3c0000,0x7c0001e,0xf0,0x780,0x0,0x0,0x3ffff800,0x1ff0000,0x0,0x7800000,0x0,0x18,
3109 - 0xc0,0x0,0x1818000,0x3e00000,0x3,0xc00f0000,0x1ff00000,0x3e00007,0xfc00003f,0xe0000003,0xc0003c00,0xf03c,0x3c0f00,0x0,0x0,
3110 - 0x0,0x70,0x380701f0,0x800000,0x780fc,0x1e001ff0,0x7c,0xf3c00,0x0,0x780000,0x7e182000,0xf000001f,0xfff00ffc,0xffc0003c,0x3cfe,
3111 - 0x0,0x31c0001,0x80f01f80,0x780f00,0x0,0x183,0x80e0c000,0xf,0x80000078,0x780,0x38,0x0,0x3c003c0,0x7ffe1c00,0x0,0x0,0x38000078,
3112 - 0xf000f01,0xe003ffe0,0x1fff00,0x7ff800,0xf000,0xf07800,0x783c000,0x3c1e0001,0xe0f0000f,0x78000f8,0x3e000f07,0x8003c000,0x78000,
3113 - 0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x3c0f1e0,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,
3114 - 0x78000f00,0x7c03e01e,0x1e3c0f0,0x3c0780,0x1e03c00,0xf01e000,0x78003cf0,0x1e0007,0x80f1e000,0x4000f00,0x20007801,0x3c008,
3115 - 0x1e0040,0xf00200,0x780403f,0x7803e00,0x3007c00f,0x803e007c,0x1f003e0,0xf801f00,0x780000,0x3c00000,0x1e000000,0xf00007f0,
3116 - 0x3e003f00,0x7801f00f,0x800f807c,0x7c03e0,0x3e01f00,0x1f00f800,0x1f80007,0xc03e003c,0x3c01e0,0x1e00f00,0xf007800,0x78078003,
3117 - 0xc01fc03e,0x1e000f0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3118 - 0x0,0x0,0x0,0x0,0x0,0x780000,0x0,0xf078007c,0x300007fc,0x7e00fe0,0x0,0x1e00,0x3c00,0x3e1c3e0,0x1e0000,0x0,0x0,0x0,0xf0001e00,
3119 - 0x3c0001e,0x1,0xf000fff8,0x1e0780,0x3fffe00,0x79fff000,0x1f0001,0xfffc00f0,0x7e0007,0xe000003f,0x3ff,0x801fffff,0xf003ff80,
3120 - 0x3f00,0x3c03fff0,0xf01e003,0xffffc03c,0x1e0,0x3c03ff,0xffc01fff,0xfe03c000,0x1fffff,0x80007800,0x780,0x3df80000,0x7800001e,
3121 - 0x1c70f078,0x781e03c0,0x780780,0x3c0f000,0x1e078007,0xc01f8000,0xf000,0xf0003c0,0x1e007807,0x83f83c00,0xfe00003,0xff000000,
3122 - 0x7c00003c,0x780,0x1e0,0x0,0x0,0x0,0x7c01,0xf801f007,0xc00100f8,0x1f803c0,0x3c0003c,0x1f003,0xf007c00f,0x80003c00,0xf000,
3123 - 0x783f000,0x1e0000f,0x3c0f01f,0x3e01f0,0x3e007e0,0x7c07c00,0xfc003f00,0xf0000,0x3c000,0x3c003c0,0x3c003c0f,0x1e01,0xf07c007c,
3124 - 0x7c0000,0xfc0001e,0xf0,0x780,0x0,0x0,0x3ffff000,0x3838000,0x0,0x7800000,0x0,0x18,0xc0,0x0,0xff0000,0x3f00000,0x3,0xc00fff00,
3125 - 0x38380000,0x7c0000e,0xe000070,0x70000001,0xe0003c00,0xf01e,0x780e00,0x0,0x0,0x0,0x0,0x1e0,0x0,0x780f8,0xf003838,0xfc,0xffc00,
3126 - 0x0,0x780000,0x7c180000,0xf000000f,0xffe00fff,0xffc0003c,0x783f,0x80000000,0x6380000,0xc0f83f80,0xf81f00,0x0,0x303,0x80e06000,
3127 - 0x0,0x78,0xf00,0x78,0x0,0x3c003c0,0x7ffe1c00,0x0,0x0,0x3800003c,0x3e000f81,0xf003ffe0,0x1fff00,0x1fc000,0xf000,0x1e03c00,
3128 - 0xf01e000,0x780f0003,0xc078001e,0x3c000f0,0x1e000f07,0xff83c000,0x7ffff,0x803ffffc,0x1ffffe0,0xfffff00,0xf00000,0x7800000,
3129 - 0x3c000001,0xe0001e00,0x3c0f0f0,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0x3e07c01e,0x1e3c0f0,0x3c0780,0x1e03c00,
3130 - 0xf01e000,0x78003ff0,0x1e0007,0x80f1e000,0xf80,0x7c00,0x3e000,0x1f0000,0xf80000,0x7c0001e,0x3c07c00,0x10078007,0x803c003c,
3131 - 0x1e001e0,0xf000f00,0x780000,0x3c00000,0x1e000000,0xf00007c0,0x1e003e00,0x7c03e007,0xc01f003e,0xf801f0,0x7c00f80,0x3e007c00,
3132 - 0xf,0x801f003c,0x3c01e0,0x1e00f00,0xf007800,0x7807c007,0xc01f801f,0x1f001f0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3133 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x0,0xe078003c,0x300001f0,0x3f801ff0,0x0,
3134 - 0x3c00,0x1e00,0x3c1c1e0,0x1e0000,0x0,0x0,0x0,0xf0001e0f,0x3c0001e,0x3,0xe000fff0,0x3c0780,0x3ffff00,0x7bfff800,0x1e0000,0x7ff00078,
3135 - 0x7e0007,0xe000003f,0x1ffc,0x1fffff,0xf0007ff0,0x7e00,0x3c07c3f0,0xf01e003,0xffff003c,0x1e0,0x3c03ff,0xffc01fff,0xfe03c000,
3136 - 0x1fffff,0x80007800,0x780,0x3ffc0000,0x7800001e,0x1ef0f078,0x781e03c0,0x780780,0x7c0f000,0x1e07801f,0x800ff000,0xf000,0xf0003c0,
3137 - 0xf00f807,0x83b83c00,0xfc00001,0xfe000000,0xf800003c,0x780,0x1e0,0x0,0x0,0x0,0x3c01,0xf000f007,0xc00000f0,0xf80780,0x3c0003c,
3138 - 0x1e001,0xf007c007,0x80003c00,0xf000,0x787e000,0x1e0000f,0x3c0f01f,0x1e01e0,0x1e007c0,0x3c07800,0x7c003f00,0xf0000,0x3c000,
3139 - 0x3c003c0,0x3e007c07,0x80003c00,0xf8f8003c,0x780000,0xf80001e,0xf0,0x780,0x0,0x0,0x7ffff000,0x601c000,0x3,0xffff0000,0x0,
3140 - 0xfff,0xf8007fff,0xc0000000,0x7e003c,0x1fe0000,0xc0003,0xc00fff00,0x601c0000,0xf800018,0x70000c0,0x38000001,0xe0007800,0x701e,
3141 - 0x701e00,0x0,0x0,0x0,0x0,0x1e0,0x6,0x700f8,0xf00601c,0xf8,0x7f800,0x0,0x780000,0xf8180000,0xf000000f,0x87c00fff,0xffc0003c,
3142 - 0xf01f,0xc0000000,0x6380000,0xc07ff780,0x1f03e03,0xfffffe00,0x303,0x81c06000,0x0,0x1ffff,0xfe001e00,0x180f8,0x0,0x3c003c0,
3143 - 0x3ffe1c00,0x3f00000,0x0,0x3800003f,0xfe0007c0,0xf8000000,0x18000000,0xc0000006,0x1f000,0x1e03c00,0xf01e000,0x780f0003,0xc078001e,
3144 - 0x3c000f0,0x1e001f07,0xff83c000,0x7ffff,0x803ffffc,0x1ffffe0,0xfffff00,0xf00000,0x7800000,0x3c000001,0xe000fff8,0x3c0f0f0,
3145 - 0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0x1f0f801e,0x3c3c0f0,0x3c0780,0x1e03c00,0xf01e000,0x78001fe0,0x1e0007,
3146 - 0x80f1e000,0x780,0x3c00,0x1e000,0xf0000,0x780000,0x3c0001e,0x3c07c00,0xf0007,0x8078003c,0x3c001e0,0x1e000f00,0x780000,0x3c00000,
3147 - 0x1e000000,0xf0000f80,0x1f003e00,0x3c03c003,0xc01e001e,0xf000f0,0x7800780,0x3c003c00,0xf,0x3f003c,0x3c01e0,0x1e00f00,0xf007800,
3148 - 0x7803c007,0x801f000f,0xf001e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3149 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1,0xe078003f,0xb0000000,0xfc003cf0,0x0,0x3c00,0x1e00,0x101c040,0x1e0000,0x0,0x0,0x1,
3150 - 0xe0001e1f,0x83c0001e,0x7,0xe000fff0,0x3c0780,0x3c03f80,0x7fc0fc00,0x1e0000,0xfff80078,0xfe0007,0xe000003f,0x7fe0,0x1fffff,
3151 - 0xf0000ffc,0xfc00,0x780f81f0,0xf01e003,0xffff003c,0x1e0,0x3c03ff,0xffc01fff,0xfe03c000,0x1fffff,0x80007800,0x780,0x3ffc0000,
3152 - 0x7800001e,0x1ef0f078,0x3c1e03c0,0x780780,0x1fc0f000,0x1e07ffff,0x7ff00,0xf000,0xf0003c0,0xf00f007,0xc3b87c00,0x7c00001,0xfe000000,
3153 - 0xf800003c,0x3c0,0x1e0,0x0,0x0,0x0,0x3c01,0xf000f007,0x800000f0,0xf80780,0x1e0003c,0x1e001,0xf0078007,0x80003c00,0xf000,0x78fc000,
3154 - 0x1e0000f,0x3c0f01e,0x1e01e0,0x1e007c0,0x3c07800,0x7c003e00,0xf0000,0x3c000,0x3c003c0,0x1e007807,0x80003c00,0x7df0003c,0x780000,
3155 - 0x1f00001e,0xf0,0x780,0x0,0x0,0x7800000,0xe7ce000,0x3,0xffff0000,0x0,0xfff,0xf8007fff,0xc0000000,0x1f0,0xffe000,0x1c0003,
3156 - 0xc00fff00,0xe7ce0000,0xf800039,0xf38001cf,0x9c000000,0xe0007800,0x780e,0x701c00,0x0,0x0,0x0,0x0,0x1e0,0x7,0xf0078,0xf00e7ce,
3157 - 0x1f0,0x7f800,0x0,0x780000,0xf0180000,0xf000000e,0x1c0001f,0xe000003c,0xf007,0xe0000000,0x6380000,0xc03fe780,0x3e07c03,0xfffffe00,
3158 - 0x303,0xffc06000,0x0,0x1ffff,0xfe003ffe,0x1fff0,0x0,0x3c003c0,0x1ffe1c00,0x3f00000,0x7,0xffc0001f,0xfc0003e0,0x7c000001,0xfc00000f,
3159 - 0xe000007f,0x1e000,0x1e03c00,0xf01e000,0x780f0003,0xc078001e,0x3c000f0,0x1e001e07,0xff83c000,0x7ffff,0x803ffffc,0x1ffffe0,
3160 - 0xfffff00,0xf00000,0x7800000,0x3c000001,0xe000fff8,0x3c0f078,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0xf9f001e,
3161 - 0x783c0f0,0x3c0780,0x1e03c00,0xf01e000,0x78001fe0,0x1e0007,0x80f1e000,0x780,0x3c00,0x1e000,0xf0000,0x780000,0x3c0001e,0x3c07800,
3162 - 0xf0003,0xc078001e,0x3c000f0,0x1e000780,0x780000,0x3c00000,0x1e000000,0xf0000f00,0xf003c00,0x3c03c003,0xc01e001e,0xf000f0,
3163 - 0x7800780,0x3c003c00,0xf,0x7f003c,0x3c01e0,0x1e00f00,0xf007800,0x7803c007,0x801f000f,0xf001e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3164 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1,0xe070001f,0xf8000007,
3165 - 0xf0007cf8,0x7800000,0x3c00,0x1e00,0x1c000,0x1e0000,0x0,0x0,0x1,0xe0001e1f,0x83c0001e,0xf,0xc000fff8,0x780780,0x2000f80,0x7f803e00,
3166 - 0x3e0003,0xfffe007c,0x1fe0000,0x0,0x3ff00,0x0,0x1ff,0x8001f000,0x780f00f0,0x1f00f003,0xffffc03c,0x1e0,0x3c03ff,0xffc01fff,
3167 - 0xfe03c00f,0xf81fffff,0x80007800,0x780,0x3ffe0000,0x7800001e,0xee0f078,0x3c1e03c0,0x7807ff,0xff80f000,0x1e07fffe,0x3ffe0,
3168 - 0xf000,0xf0003c0,0xf00f003,0xc7bc7800,0xfc00000,0xfc000001,0xf000003c,0x3c0,0x1e0,0x0,0x0,0x0,0x3c01,0xe000f80f,0x800001e0,
3169 - 0xf80f00,0x1e0003c,0x3c000,0xf0078007,0x80003c00,0xf000,0x79f8000,0x1e0000f,0x3c0f01e,0x1e03c0,0x1f00780,0x3e0f000,0x7c003e00,
3170 - 0xf0000,0x3c000,0x3c003c0,0x1e007807,0x81e03c00,0x7df0003e,0xf80000,0x3e00003e,0xf0,0x7c0,0xfc000,0x80000000,0x7800000,0x1e7cf000,
3171 - 0x3,0xffff0000,0x0,0x18,0xc0,0x0,0xf80,0x7ffc00,0x380003,0xc00fff01,0xe7cf0000,0x1f000079,0xf3c003cf,0x9e000000,0xe0007000,
3172 - 0x380e,0xe01c00,0x0,0x0,0x0,0x0,0x1e0,0x3,0x800f0078,0xf01e7cf,0x3e0,0x3f000,0x0,0x780000,0xf018001f,0xfff8001e,0x1e0000f,
3173 - 0xc000003c,0xf003,0xe0000000,0x6380000,0xc00fc780,0x7c0f803,0xfffffe00,0x303,0xfe006000,0x0,0x1ffff,0xfe003ffe,0x1ffe0,0x0,
3174 - 0x3c003c0,0xffe1c00,0x3f00000,0x7,0xffc00007,0xf00001f0,0x3e00001f,0xfc0000ff,0xe00007ff,0x3e000,0x3e01e00,0x1f00f000,0xf8078007,
3175 - 0xc03c003e,0x1e001e0,0xf001e07,0xff83c000,0x7ffff,0x803ffffc,0x1ffffe0,0xfffff00,0xf00000,0x7800000,0x3c000001,0xe000fff8,
3176 - 0x3c0f078,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0x7fe001e,0xf03c0f0,0x3c0780,0x1e03c00,0xf01e000,0x78000fc0,
3177 - 0x1e0007,0x80f1f000,0x780,0x3c00,0x1e000,0xf0000,0x780000,0x3c0001e,0x3c0f800,0x1e0003,0xc0f0001e,0x78000f0,0x3c000780,0x780000,
3178 - 0x3c00000,0x1e000000,0xf0000f00,0xf003c00,0x3c078003,0xe03c001f,0x1e000f8,0xf0007c0,0x78003e00,0x1e,0xf7803c,0x3c01e0,0x1e00f00,
3179 - 0xf007800,0x7803e00f,0x801e000f,0x80f803e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3180 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1,0xe0f0000f,0xff00001f,0x8000f87c,0x7800000,0x3c00,0x1e00,0x1c000,0x7fffff80,
3181 - 0x0,0x0,0x3,0xc0001e1f,0x83c0001e,0x1f,0x800000fe,0xf00780,0x7c0,0x7f001e00,0x3c0007,0xe03f003f,0x3fe0000,0x0,0x3fc00,0x0,
3182 - 0x7f,0x8001e000,0x781f00f0,0x1e00f003,0xc007e03c,0x1e0,0x3c03c0,0x1e00,0x3c00f,0xf81e0007,0x80007800,0x780,0x3f9f0000,0x7800001e,
3183 - 0xfe0f078,0x3c1e03c0,0x7807ff,0xff00f000,0x1e07fff8,0xfff8,0xf000,0xf0003c0,0xf81f003,0xc7bc7800,0xfe00000,0x78000003,0xe000003c,
3184 - 0x1e0,0x1e0,0x0,0x0,0x0,0x1fffc01,0xe000780f,0x1e0,0x780f00,0x1e0003c,0x3c000,0xf0078007,0x80003c00,0xf000,0x7bf0000,0x1e0000f,
3185 - 0x3c0f01e,0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0xf8000,0x3c000,0x3c003c0,0x1f00f807,0x81f03c00,0x3fe0001e,0xf00000,0x7c00007c,
3186 - 0xf0,0x3e0,0x3ff801,0x80000000,0x7800000,0x3cfcf800,0x3,0xffff0000,0x0,0x18,0xc0,0x0,0x7c00,0x1fff00,0x700003,0xc00f0003,
3187 - 0xcfcf8000,0x3e0000f3,0xf3e0079f,0x9f000000,0xf000,0x1000,0x0,0x0,0x0,0x0,0x0,0x1f0,0x1,0xc00f0078,0xf03cfcf,0x800007c0,0x1e000,
3188 - 0x0,0x780001,0xe018001f,0xfff8001c,0xe00007,0x8000003c,0xf001,0xf0000000,0x6380000,0xc0000000,0xf81f003,0xfffffe00,0x303,
3189 - 0x87006000,0x0,0x1ffff,0xfe003ffe,0x7f00,0x0,0x3c003c0,0x3fe1c00,0x3f00000,0x7,0xffc00000,0xf8,0x1f0001ff,0xf0000fff,0x80007ffc,
3190 - 0xfc000,0x3c01e00,0x1e00f000,0xf0078007,0x803c003c,0x1e001e0,0xf001e07,0x8003c000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,
3191 - 0x7800000,0x3c000001,0xe000fff8,0x3c0f078,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0x3fc001e,0x1e03c0f0,0x3c0780,
3192 - 0x1e03c00,0xf01e000,0x78000780,0x1e0007,0x80f0fc00,0x3fff80,0x1fffc00,0xfffe000,0x7fff0003,0xfff8001f,0xffc0001e,0x3c0f000,
3193 - 0x1e0003,0xc0f0001e,0x78000f0,0x3c000780,0x780000,0x3c00000,0x1e000000,0xf0001e00,0xf803c00,0x3c078001,0xe03c000f,0x1e00078,
3194 - 0xf0003c0,0x78001e07,0xfffffe1e,0x1e7803c,0x3c01e0,0x1e00f00,0xf007800,0x7801e00f,0x1e0007,0x807803c0,0x0,0x0,0x0,0x0,0x0,
3195 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3,0xc0f00007,
3196 - 0xffc0007e,0xf03e,0x7800000,0x3c00,0x1e00,0x1c000,0x7fffff80,0x0,0x0,0x3,0xc0001e1f,0x83c0001e,0x3f,0x3e,0xf00780,0x3c0,0x7e001e00,
3197 - 0x7c000f,0x800f001f,0xffde0000,0x0,0x3e000,0x0,0xf,0x8003e000,0x781e0070,0x1e00f003,0xc001f03c,0x1e0,0x3c03c0,0x1e00,0x3c00f,
3198 - 0xf81e0007,0x80007800,0x780,0x3f1f0000,0x7800001e,0x7c0f078,0x1e1e03c0,0x7807ff,0xfc00f000,0x1e07fffe,0xffc,0xf000,0xf0003c0,
3199 - 0x781e003,0xc71c7800,0x1ff00000,0x78000003,0xe000003c,0x1e0,0x1e0,0x0,0x0,0x0,0xffffc01,0xe000780f,0x1e0,0x780fff,0xffe0003c,
3200 - 0x3c000,0xf0078007,0x80003c00,0xf000,0x7ff0000,0x1e0000f,0x3c0f01e,0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0x7f000,0x3c000,
3201 - 0x3c003c0,0xf00f007,0xc1f07c00,0x1fc0001f,0x1f00000,0xfc000ff8,0xf0,0x1ff,0xfffe07,0x80000000,0x7800000,0x7ffcfc00,0x0,0xf000000,
3202 - 0x0,0x18,0xc0,0x0,0x3e000,0x1ff80,0xe00003,0xc00f0007,0xffcfc000,0x3e0001ff,0xf3f00fff,0x9f800000,0x6000,0x0,0x0,0x7c000,
3203 - 0x0,0x0,0x0,0xfe,0x0,0xe00f007f,0xff07ffcf,0xc0000fc0,0x1e000,0x0,0x780001,0xe018001f,0xfff8001c,0xe00007,0x80000000,0xf800,
3204 - 0xf0000000,0x6380000,0xc0000000,0x1f03c000,0x1e00,0x303,0x83806000,0x0,0x78,0x0,0x0,0x0,0x3c003c0,0xfe1c00,0x3f00000,0x0,
3205 - 0x0,0x3c,0xf801fff,0xfff8,0x7ffc0,0x1f8000,0x3c01e00,0x1e00f000,0xf0078007,0x803c003c,0x1e001e0,0xf003c07,0x8003c000,0x78000,
3206 - 0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x3c0f03c,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,
3207 - 0x78000f00,0x1f8001e,0x1e03c0f0,0x3c0780,0x1e03c00,0xf01e000,0x78000780,0x1e000f,0x80f0ff00,0x1ffff80,0xffffc00,0x7fffe003,
3208 - 0xffff001f,0xfff800ff,0xffc007ff,0xffc0f000,0x1fffff,0xc0fffffe,0x7fffff0,0x3fffff80,0x780000,0x3c00000,0x1e000000,0xf0001e00,
3209 - 0x7803c00,0x3c078001,0xe03c000f,0x1e00078,0xf0003c0,0x78001e07,0xfffffe1e,0x3c7803c,0x3c01e0,0x1e00f00,0xf007800,0x7801f01f,
3210 - 0x1e0007,0x807c07c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3211 - 0x0,0x0,0x0,0x0,0x780000,0x3,0xc0f00000,0xfff003f0,0x1f00f03e,0x7800000,0x3c00,0x1e00,0x1c000,0x7fffff80,0x0,0x7ff80000,0x3,
3212 - 0xc0001e0f,0x3c0001e,0x7e,0x1f,0x1e00780,0x3e0,0x7e000f00,0x78000f,0x7800f,0xff9e0000,0x0,0x3fc00,0x0,0x7f,0x8003c000,0x781e0070,
3213 - 0x3e00f803,0xc000f03c,0x1e0,0x3c03c0,0x1e00,0x3c00f,0xf81e0007,0x80007800,0x780,0x3e0f8000,0x7800001e,0x7c0f078,0x1e1e03c0,
3214 - 0x7807ff,0xf000f000,0x1e07807f,0xfe,0xf000,0xf0003c0,0x781e003,0xc71c7800,0x3ef00000,0x78000007,0xc000003c,0x1e0,0x1e0,0x0,
3215 - 0x0,0x0,0x1ffffc01,0xe000780f,0x1e0,0x780fff,0xffe0003c,0x3c000,0xf0078007,0x80003c00,0xf000,0x7ff0000,0x1e0000f,0x3c0f01e,
3216 - 0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0x7ff80,0x3c000,0x3c003c0,0xf00f003,0xc1f07800,0x1fc0000f,0x1e00000,0xf8000ff0,0xf0,
3217 - 0xff,0xffffff,0x80000000,0x3fffc000,0xfff9fe00,0x0,0xf000000,0x0,0x18,0xc0,0x0,0x1f0000,0x1fc0,0x1c00003,0xc00f000f,0xff9fe000,
3218 - 0x7c0003ff,0xe7f81fff,0x3fc00000,0x0,0x0,0x0,0xfe000,0x1ffffc0f,0xfffffc00,0x0,0xff,0xf0000000,0x700f007f,0xff0fff9f,0xe0000f80,
3219 - 0x1e000,0x0,0x780001,0xe018001f,0xfff8001c,0xe00fff,0xffc00000,0xf800,0xf0000000,0x6380000,0xc0ffff80,0x3e078000,0x1e00,0x7ff80303,
3220 - 0x83c06000,0x0,0x78,0x0,0x0,0x0,0x3c003c0,0xe1c00,0x3f00000,0x0,0x7f,0xff00001e,0x7c1fff0,0xfff80,0x7ffc00,0x3f0000,0x7c01f00,
3221 - 0x3e00f801,0xf007c00f,0x803e007c,0x1f003e0,0xf803c07,0x8003c000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,
3222 - 0xe0001e00,0x3c0f03c,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0x1f8001e,0x3c03c0f0,0x3c0780,0x1e03c00,0xf01e000,
3223 - 0x78000780,0x1e001f,0xf07f80,0x3ffff80,0x1ffffc00,0xffffe007,0xffff003f,0xfff801ff,0xffc03fff,0xffc0f000,0x1fffff,0xc0fffffe,
3224 - 0x7fffff0,0x3fffff80,0x780000,0x3c00000,0x1e000000,0xf0001e00,0x7803c00,0x3c078001,0xe03c000f,0x1e00078,0xf0003c0,0x78001e07,
3225 - 0xfffffe1e,0x787803c,0x3c01e0,0x1e00f00,0xf007800,0x7800f01e,0x1e0007,0x803c0780,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3226 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1ff,0xffff8000,0x3ff80fc0,0x7fc1e01f,
3227 - 0x7800000,0x3c00,0x1e00,0x0,0x7fffff80,0x0,0x7ff80000,0x7,0x80001e00,0x3c0001e,0xfc,0xf,0x1e00780,0x1e0,0x7c000f00,0x78000f,
3228 - 0x78007,0xff1e0000,0x0,0x3ff00,0x0,0x1ff,0x8003c000,0x781e0070,0x3c007803,0xc000f03c,0x1e0,0x3c03c0,0x1e00,0x3c000,0x781e0007,
3229 - 0x80007800,0x780,0x3c07c000,0x7800001e,0x7c0f078,0xf1e03c0,0x780780,0xf000,0x1e07801f,0x3e,0xf000,0xf0003c0,0x781e003,0xcf1c7800,
3230 - 0x3cf80000,0x7800000f,0x8000003c,0xf0,0x1e0,0x0,0x0,0x0,0x3ffffc01,0xe000780f,0x1e0,0x780fff,0xffe0003c,0x3c000,0xf0078007,
3231 - 0x80003c00,0xf000,0x7ff8000,0x1e0000f,0x3c0f01e,0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0x3fff0,0x3c000,0x3c003c0,0xf81f003,
3232 - 0xc3b87800,0xf80000f,0x1e00001,0xf0000ff0,0xf0,0xff,0xf03fff,0x80000000,0x3fff8001,0xfff1ff00,0x0,0xf000000,0x0,0x18,0xc0,
3233 - 0x0,0x380000,0x7c0,0x3c00003,0xc00f001f,0xff1ff000,0xf80007ff,0xc7fc3ffe,0x3fe00000,0x0,0x0,0x0,0x1ff000,0x7ffffe1f,0xffffff00,
3234 - 0x0,0x7f,0xfe000000,0x780f007f,0xff1fff1f,0xf0001f00,0x1e000,0x0,0x780001,0xe0180000,0xf000001c,0xe00fff,0xffc00000,0x7c00,
3235 - 0xf0000000,0x31c0001,0x80ffff80,0x3e078000,0x1e00,0x7ff80183,0x81c0c000,0x0,0x78,0x0,0x0,0x0,0x3c003c0,0xe1c00,0x3f00000,
3236 - 0x0,0x7f,0xff00001e,0x7c7ff03,0xc03ff8fe,0x1ffc0f0,0x7e0000,0x7800f00,0x3c007801,0xe003c00f,0x1e0078,0xf003c0,0x7803c07,0x8003c000,
3237 - 0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x3c0f01e,0x3c078000,0xf03c0007,0x81e0003c,
3238 - 0xf0001e0,0x78000f00,0x3fc001e,0x7803c0f0,0x3c0780,0x1e03c00,0xf01e000,0x78000780,0x1e007f,0xf03fe0,0x7ffff80,0x3ffffc01,
3239 - 0xffffe00f,0xffff007f,0xfff803ff,0xffc07fff,0xffc0f000,0x1fffff,0xc0fffffe,0x7fffff0,0x3fffff80,0x780000,0x3c00000,0x1e000000,
3240 - 0xf0001e00,0x7803c00,0x3c078001,0xe03c000f,0x1e00078,0xf0003c0,0x78001e07,0xfffffe1e,0x707803c,0x3c01e0,0x1e00f00,0xf007800,
3241 - 0x7800f01e,0x1e0007,0x803c0780,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3242 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1ff,0xffff8000,0x30f81f00,0xffe1e00f,0x87800000,0x3c00,0x1e00,0x0,0x1e0000,0x0,0x7ff80000,
3243 - 0x7,0x80001e00,0x3c0001e,0x1f8,0x7,0x83c00780,0x1e0,0x7c000f00,0xf8001e,0x3c001,0xfc1e0000,0x0,0x7fe0,0x0,0xffc,0x3c000,0x781e0070,
3244 - 0x3ffff803,0xc000783c,0x1e0,0x3c03c0,0x1e00,0x3c000,0x781e0007,0x80007800,0x780,0x3c07c000,0x7800001e,0x380f078,0xf1e03c0,
3245 - 0x780780,0xf000,0x1e07800f,0x8000001e,0xf000,0xf0003c0,0x3c3c003,0xcf1e7800,0x7c780000,0x7800000f,0x8000003c,0xf0,0x1e0,0x0,
3246 - 0x0,0x0,0x7f003c01,0xe000780f,0x1e0,0x780fff,0xffe0003c,0x3c000,0xf0078007,0x80003c00,0xf000,0x7f7c000,0x1e0000f,0x3c0f01e,
3247 - 0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0xfff8,0x3c000,0x3c003c0,0x781e003,0xc3b87800,0x1fc00007,0x83e00003,0xe0000ff8,0xf0,
3248 - 0x1ff,0xc007fe,0x0,0x7fff8001,0xffe3ff00,0x0,0x1e000000,0x0,0x18,0xc0,0x0,0x0,0x3c0,0x7800003,0xc00f001f,0xfe3ff000,0xf80007ff,
3249 - 0x8ffc3ffc,0x7fe00000,0x0,0x0,0x0,0x1ff000,0x0,0x0,0x0,0x1f,0xff000000,0x3c0f007f,0xff1ffe3f,0xf0003e00,0x1e000,0x0,0x780001,
3250 - 0xe0180000,0xf000001e,0x1e00fff,0xffc00000,0x3f00,0xf0000000,0x31c0001,0x80ffff80,0x1f03c000,0x1e00,0x7ff80183,0x81c0c000,
3251 - 0x0,0x78,0x0,0x0,0x0,0x3c003c0,0xe1c00,0x0,0x0,0x7f,0xff00003c,0xf87f007,0xc03f83ff,0x81fc01f0,0x7c0000,0x7ffff00,0x3ffff801,
3252 - 0xffffc00f,0xfffe007f,0xfff003ff,0xff807fff,0x8003c000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,
3253 - 0xe0001e00,0x3c0f01e,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0x7fe001e,0xf003c0f0,0x3c0780,0x1e03c00,0xf01e000,
3254 - 0x78000780,0x1ffffe,0xf00ff0,0xfe00780,0x7f003c03,0xf801e01f,0xc00f00fe,0x7807f0,0x3c0ffff,0xffc0f000,0x1fffff,0xc0fffffe,
3255 - 0x7fffff0,0x3fffff80,0x780000,0x3c00000,0x1e000000,0xf0001e00,0x7803c00,0x3c078001,0xe03c000f,0x1e00078,0xf0003c0,0x78001e00,
3256 - 0x1e,0xf07803c,0x3c01e0,0x1e00f00,0xf007800,0x7800783e,0x1e0007,0x801e0f80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3257 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1ff,0xffff8000,0x307c0801,0xe1f1e00f,0x87000000,
3258 - 0x3c00,0x1e00,0x0,0x1e0000,0x0,0x7ff80000,0xf,0x1e00,0x3c0001e,0x3f0,0x7,0x83fffffc,0x1e0,0x7c000f00,0xf0001e,0x3c000,0x3e0000,
3259 - 0x0,0x1ffc,0x1fffff,0xf0007ff0,0x3c000,0x781e0070,0x7ffffc03,0xc000781e,0x1e0,0x7803c0,0x1e00,0x3c000,0x781e0007,0x80007800,
3260 - 0x780,0x3c03e000,0x7800001e,0xf078,0x79e03c0,0x780780,0xf000,0x1e078007,0x8000000f,0xf000,0xf0003c0,0x3c3c001,0xee0ef000,
3261 - 0xf87c0000,0x7800001f,0x3c,0x78,0x1e0,0x0,0x0,0x0,0x7c003c01,0xe000780f,0x1e0,0x780f00,0x3c,0x3c000,0xf0078007,0x80003c00,
3262 - 0xf000,0x7e3e000,0x1e0000f,0x3c0f01e,0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0x1ffc,0x3c000,0x3c003c0,0x781e003,0xe3b8f800,
3263 - 0x1fc00007,0x83c00007,0xc00000fc,0xf0,0x3e0,0x8001f8,0x0,0x7800000,0xffc7fe00,0x0,0x1e000000,0x0,0x18,0xc0,0x0,0x0,0x1e0,
3264 - 0xf000003,0xc00f000f,0xfc7fe001,0xf00003ff,0x1ff81ff8,0xffc00000,0x0,0x0,0x0,0x1ff000,0x0,0x0,0x0,0x3,0xff800000,0x1e0f0078,
3265 - 0xffc7f,0xe0007c00,0x1e000,0x0,0x780001,0xe0180000,0xf000000e,0x1c00007,0x80000000,0x1f81,0xe0000000,0x38e0003,0x80000000,
3266 - 0xf81f000,0x1e00,0x7ff801c3,0x80e1c000,0x0,0x78,0x0,0x0,0x0,0x3c003c0,0xe1c00,0x0,0x0,0x0,0xf8,0x1f070007,0xc03803ff,0xc1c001f0,
3267 - 0xf80000,0xfffff00,0x7ffff803,0xffffc01f,0xfffe00ff,0xfff007ff,0xffc07fff,0x8001e000,0x78000,0x3c0000,0x1e00000,0xf000000,
3268 - 0xf00000,0x7800000,0x3c000001,0xe0001e00,0x780f00f,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0xf9f001e,0xf003c0f0,
3269 - 0x3c0780,0x1e03c00,0xf01e000,0x78000780,0x1ffffc,0xf003f8,0xf800780,0x7c003c03,0xe001e01f,0xf00f8,0x7807c0,0x3c0fc1e,0xf000,
3270 - 0x1e0000,0xf00000,0x7800000,0x3c000000,0x780000,0x3c00000,0x1e000000,0xf0001e00,0x7803c00,0x3c078001,0xe03c000f,0x1e00078,
3271 - 0xf0003c0,0x78001e00,0x1e,0x1e07803c,0x3c01e0,0x1e00f00,0xf007800,0x7800783c,0x1e0007,0x801e0f00,0x0,0x0,0x0,0x0,0x0,0x0,
3272 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ff,0xffff8000,0x303c0001,
3273 - 0xc071e007,0xcf000000,0x3c00,0x1e00,0x0,0x1e0000,0x0,0x0,0xf,0xf00,0x780001e,0x7e0,0x7,0x83fffffc,0x1e0,0x7c000f00,0x1f0001e,
3274 - 0x3c000,0x3c0000,0x0,0x3ff,0x801fffff,0xf003ff80,0x3c000,0x781e0070,0x7ffffc03,0xc000781e,0x1e0,0x7803c0,0x1e00,0x1e000,0x781e0007,
3275 - 0x80007800,0x780,0x3c01f000,0x7800001e,0xf078,0x79e03c0,0xf00780,0xf000,0x3e078007,0xc000000f,0xf000,0xf0003c0,0x3c3c001,
3276 - 0xee0ef000,0xf03e0000,0x7800003e,0x3c,0x78,0x1e0,0x0,0x0,0x0,0xf8003c01,0xe000780f,0x1e0,0x780f00,0x3c,0x3c000,0xf0078007,
3277 - 0x80003c00,0xf000,0x7c3e000,0x1e0000f,0x3c0f01e,0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0xfc,0x3c000,0x3c003c0,0x3c3e001,0xe7b8f000,
3278 - 0x3fe00007,0xc7c0000f,0xc000003e,0xf0,0x7c0,0x0,0x0,0x7c00000,0x7fcffc00,0x0,0x1e000000,0x0,0x18,0xc0,0x0,0x0,0x1e0,0x1e000003,
3279 - 0xc00f0007,0xfcffc003,0xe00001ff,0x3ff00ff9,0xff800000,0x0,0x0,0x0,0x1ff000,0x0,0x0,0x0,0x0,0x1f800000,0xf0f0078,0x7fcff,
3280 - 0xc000fc00,0x1e000,0x0,0x780001,0xe0180000,0xf000000f,0x87c00007,0x80000000,0xfe3,0xe0000000,0x18780c3,0x0,0x7c0f800,0x1e00,
3281 - 0xc3,0x80e18000,0x0,0x78,0x0,0x0,0x0,0x3c003c0,0xe1c00,0x0,0x0,0x0,0x1f0,0x3e00000f,0xc0000303,0xe00003f0,0xf00000,0xfffff80,
3282 - 0x7ffffc03,0xffffe01f,0xffff00ff,0xfff807ff,0xffc07fff,0x8001e000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,
3283 - 0x3c000001,0xe0001e00,0x780f00f,0x3c078001,0xe03c000f,0x1e00078,0xf0003c0,0x78001e00,0x1f0f801f,0xe00780f0,0x3c0780,0x1e03c00,
3284 - 0xf01e000,0x78000780,0x1ffff8,0xf000f8,0x1f000780,0xf8003c07,0xc001e03e,0xf01f0,0x780f80,0x3c1f01e,0xf000,0x1e0000,0xf00000,
3285 - 0x7800000,0x3c000000,0x780000,0x3c00000,0x1e000000,0xf0001e00,0x7803c00,0x3c078001,0xe03c000f,0x1e00078,0xf0003c0,0x78001e00,
3286 - 0x1e,0x3c07803c,0x3c01e0,0x1e00f00,0xf007800,0x78007c7c,0x1e0007,0x801f1f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3287 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x81c00000,0x303c0003,0x8039e003,0xef000000,
3288 - 0x3c00,0x1e00,0x0,0x1e0000,0x0,0x0,0x1e,0xf00,0x780001e,0xfc0,0x7,0x83fffffc,0x1e0,0x3c000f00,0x1e0001e,0x3c000,0x3c0000,
3289 - 0x0,0x7f,0xe01fffff,0xf00ffc00,0x3c000,0x781f00f0,0x7ffffc03,0xc000781e,0x1e0,0x7803c0,0x1e00,0x1e000,0x781e0007,0x80007800,
3290 - 0x780,0x3c01f000,0x7800001e,0xf078,0x7de01e0,0xf00780,0x7800,0x3c078003,0xc000000f,0xf000,0xf0003c0,0x3e7c001,0xee0ef001,
3291 - 0xf01e0000,0x7800003e,0x3c,0x3c,0x1e0,0x0,0x0,0x0,0xf0003c01,0xe000780f,0x1e0,0x780f00,0x3c,0x3c000,0xf0078007,0x80003c00,
3292 - 0xf000,0x781f000,0x1e0000f,0x3c0f01e,0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0x3e,0x3c000,0x3c003c0,0x3c3c001,0xe71cf000,0x7df00003,
3293 - 0xc780000f,0x8000003e,0xf0,0x780,0x0,0x0,0x3c00000,0x3fcff800,0x0,0x1e000000,0x0,0x18,0xc0,0x0,0x1f00fc,0x1e0,0x1e000001,
3294 - 0xe00f0003,0xfcff8003,0xe00000ff,0x3fe007f9,0xff000000,0x0,0x0,0x0,0x1ff000,0x0,0x0,0x0,0x0,0x7c00000,0xf0f0078,0x3fcff,0x8000f800,
3295 - 0x1e000,0x0,0x780001,0xe0180000,0xf000001f,0xffe00007,0x8000003c,0x7ff,0xc0000000,0x1c3ffc7,0x0,0x3e07c00,0x1e00,0xe3,0x80738000,
3296 - 0x0,0x78,0x0,0x0,0x0,0x3c003c0,0xe1c00,0x0,0x0,0x0,0x3e0,0x7c00001d,0xc0000001,0xe0000770,0x1f00000,0xfffff80,0x7ffffc03,
3297 - 0xffffe01f,0xffff00ff,0xfff807ff,0xffc07fff,0x8001e000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,
3298 - 0xe0001e00,0x780f00f,0x3c03c001,0xe01e000f,0xf00078,0x78003c0,0x3c001e00,0x3e07c01f,0xc00780f0,0x3c0780,0x1e03c00,0xf01e000,
3299 - 0x78000780,0x1fffc0,0xf0007c,0x1e000780,0xf0003c07,0x8001e03c,0xf01e0,0x780f00,0x3c1e01e,0xf000,0x1e0000,0xf00000,0x7800000,
3300 - 0x3c000000,0x780000,0x3c00000,0x1e000000,0xf0001e00,0x7803c00,0x3c078001,0xe03c000f,0x1e00078,0xf0003c0,0x78001e00,0x1e,0x7807803c,
3301 - 0x3c01e0,0x1e00f00,0xf007800,0x78003c78,0x1e0007,0x800f1e00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3302 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x83c00000,0x303c0003,0x8039e001,0xee000000,0x1e00,0x3c00,
3303 - 0x0,0x1e0000,0x0,0x0,0x1e,0xf00,0x780001e,0x1f80,0x7,0x83fffffc,0x1e0,0x3c000f00,0x1e0001e,0x3c000,0x3c0000,0x0,0x1f,0xfc1fffff,
3304 - 0xf07ff000,0x0,0x780f00f0,0x78003c03,0xc000781e,0x1e0,0xf803c0,0x1e00,0x1e000,0x781e0007,0x80007800,0x780,0x3c00f800,0x7800001e,
3305 - 0xf078,0x3de01e0,0xf00780,0x7800,0x3c078003,0xe000000f,0xf000,0xf0003c0,0x1e78001,0xfe0ff003,0xe01f0000,0x7800007c,0x3c,0x3c,
3306 - 0x1e0,0x0,0x0,0x0,0xf0007c01,0xe000f80f,0x800001e0,0xf80f00,0x3c,0x1e001,0xf0078007,0x80003c00,0xf000,0x780f800,0x1e0000f,
3307 - 0x3c0f01e,0x1e03c0,0x1f00780,0x3e0f000,0x7c003c00,0x1e,0x3c000,0x3c003c0,0x3c3c001,0xe71cf000,0xf8f80003,0xe780001f,0x1e,
3308 - 0xf0,0x780,0x0,0x0,0x3c00000,0x1ffff000,0x0,0x1e000000,0x0,0x18,0xc0,0x0,0x3bc1de,0x1e0,0xf000001,0xe00f0001,0xffff0007,0xc000007f,
3309 - 0xffc003ff,0xfe000000,0x0,0x0,0x0,0xfe000,0x0,0x0,0x0,0x0,0x3c00000,0x1e0f0078,0x1ffff,0x1f000,0x1e000,0x0,0x780000,0xf0180000,
3310 - 0xf000001f,0xfff00007,0x8000003c,0x1ff,0x80000000,0xe0ff0e,0x0,0x1f03e00,0x1e00,0x70,0x70000,0x0,0x78,0x0,0x0,0x0,0x3c003c0,
3311 - 0xe1c00,0x0,0x0,0x0,0x7c0,0xf8000019,0xc0000000,0xe0000670,0x1e00000,0xf000780,0x78003c03,0xc001e01e,0xf00f0,0x780780,0x3c0f807,
3312 - 0x8001e000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0xf80f007,0xbc03c001,0xe01e000f,
3313 - 0xf00078,0x78003c0,0x3c001e00,0x7c03e00f,0x800780f0,0x3c0780,0x1e03c00,0xf01e000,0x78000780,0x1e0000,0xf0003c,0x1e000f80,
3314 - 0xf0007c07,0x8003e03c,0x1f01e0,0xf80f00,0x7c1e01e,0xf800,0x1e0000,0xf00000,0x7800000,0x3c000000,0x780000,0x3c00000,0x1e000000,
3315 - 0xf0001e00,0x7803c00,0x3c078003,0xe03c001f,0x1e000f8,0xf0007c0,0x78003e00,0x1f8001f,0xf00f803c,0x3c01e0,0x1e00f00,0xf007800,
3316 - 0x78003e78,0x1e000f,0x800f9e00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3317 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf,0x3c00000,0x303c0003,0x8039f001,0xfe000000,0x1e00,0x3c00,0x0,0x1e0000,0x0,0x0,0x3c,0xf00,
3318 - 0x780001e,0x3f00,0x7,0x80000780,0x3e0,0x3e000f00,0x3c0001e,0x3c000,0x7c0000,0x0,0x3,0xfe000000,0xff8000,0x0,0x3c0f81f0,0xf0001e03,
3319 - 0xc000780f,0x1e0,0xf003c0,0x1e00,0xf000,0x781e0007,0x80007800,0x780,0x3c007c00,0x7800001e,0xf078,0x3de01e0,0xf00780,0x7800,
3320 - 0x3c078001,0xe000000f,0xf000,0xf0003c0,0x1e78001,0xfc07f003,0xe00f0000,0x78000078,0x3c,0x1e,0x1e0,0x0,0x0,0x0,0xf0007c01,
3321 - 0xf000f007,0x800000f0,0xf80780,0x3c,0x1e001,0xf0078007,0x80003c00,0xf000,0x7807c00,0x1e0000f,0x3c0f01e,0x1e01e0,0x1e007c0,
3322 - 0x3c07800,0x7c003c00,0x1e,0x3c000,0x3c007c0,0x1e78001,0xe71df000,0xf8f80001,0xef80003e,0x1e,0xf0,0x780,0x0,0x0,0x3c00000,
3323 - 0xfffe000,0x0,0x3e000000,0x0,0x18,0x7fff,0xc0000000,0x60c306,0x1e0,0x7800001,0xe00f0000,0xfffe0007,0x8000003f,0xff8001ff,
3324 - 0xfc000000,0x0,0x0,0x0,0x7c000,0x0,0x0,0x0,0x0,0x3c00000,0x3c0f0078,0xfffe,0x3e000,0x1e000,0x0,0x780000,0xf0180000,0xf000003c,
3325 - 0xfcf80007,0x8000003c,0x7f,0x0,0x70001c,0x0,0xf81f00,0x0,0x38,0xe0000,0x0,0x0,0x0,0x0,0x0,0x3c003c0,0xe1c00,0x0,0x0,0x0,0xf81,
3326 - 0xf0000039,0xc0000000,0xe0000e70,0x1e00000,0x1e0003c0,0xf0001e07,0x8000f03c,0x781e0,0x3c0f00,0x1e0f007,0x8000f000,0x78000,
3327 - 0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0xf00f007,0xbc03c001,0xe01e000f,0xf00078,0x78003c0,
3328 - 0x3c001e00,0xf801f00f,0x800780f0,0x3c0780,0x1e03c00,0xf01e000,0x78000780,0x1e0000,0xf0003c,0x1e000f80,0xf0007c07,0x8003e03c,
3329 - 0x1f01e0,0xf80f00,0x7c1e01e,0x7800,0xf0000,0x780000,0x3c00000,0x1e000000,0x780000,0x3c00000,0x1e000000,0xf0000f00,0xf003c00,
3330 - 0x3c03c003,0xc01e001e,0xf000f0,0x7800780,0x3c003c00,0x1f8000f,0xe00f003c,0x7c01e0,0x3e00f00,0x1f007800,0xf8001ef8,0x1f000f,
3331 - 0x7be00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3332 - 0x0,0x0,0xf,0x3c00000,0x307c0003,0x8038f000,0xfc000000,0x1e00,0x3c00,0x0,0x1e0000,0xfc0000,0x0,0x7e00003c,0x780,0xf00001e,
3333 - 0x7e00,0xf,0x80000780,0x3c0,0x3e001e00,0x3c0001f,0x7c000,0x780007,0xe000003f,0x0,0xfe000000,0xfe0000,0x0,0x3c07c3f0,0xf0001e03,
3334 - 0xc000f80f,0x800001e0,0x1f003c0,0x1e00,0xf000,0x781e0007,0x80007800,0x4000f80,0x3c003c00,0x7800001e,0xf078,0x1fe01f0,0x1f00780,
3335 - 0x7c00,0x7c078001,0xf000001f,0xf000,0xf0003c0,0x1e78001,0xfc07f007,0xc00f8000,0x780000f8,0x3c,0x1e,0x1e0,0x0,0x0,0x0,0xf0007c01,
3336 - 0xf000f007,0xc00000f0,0xf80780,0x3c,0x1f003,0xf0078007,0x80003c00,0xf000,0x7807c00,0x1e0000f,0x3c0f01e,0x1e01e0,0x1e007c0,
3337 - 0x3c07800,0x7c003c00,0x1e,0x3c000,0x3c007c0,0x1e78000,0xfe0fe001,0xf07c0001,0xef00007c,0x1e,0xf0,0x780,0x0,0x0,0x1e00000,
3338 - 0x7cfc000,0xfc00000,0x3c00000f,0xc3f00000,0x18,0x7fff,0xc0000000,0x406303,0x3e0,0x3c00001,0xf00f0000,0x7cfc000f,0x8000001f,
3339 - 0x3f0000f9,0xf8000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0x780700f8,0x7cfc,0x7c000,0x1e000,0x0,0x780000,0xf8180000,
3340 - 0xf0000070,0x3c0007,0x8000003c,0x3f,0x80000000,0x3c0078,0x0,0x780f00,0x0,0x1e,0x3c0000,0x0,0x0,0x0,0x0,0x0,0x3e007c0,0xe1c00,
3341 - 0x0,0x0,0x0,0xf01,0xe0000071,0xc0000000,0xe0001c70,0x1e00000,0x1e0003c0,0xf0001e07,0x8000f03c,0x781e0,0x3c0f00,0x1e0f007,
3342 - 0x8000f800,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x1f00f003,0xfc03e003,0xe01f001f,
3343 - 0xf800f8,0x7c007c0,0x3e003e01,0xf000f80f,0xf00f0,0x3c0780,0x1e03c00,0xf01e000,0x78000780,0x1e0000,0xf0003c,0x1e000f80,0xf0007c07,
3344 - 0x8003e03c,0x1f01e0,0xf80f00,0x7c1e01e,0x7c00,0xf0000,0x780000,0x3c00000,0x1e000000,0x780000,0x3c00000,0x1e000000,0xf0000f00,
3345 - 0xf003c00,0x3c03c003,0xc01e001e,0xf000f0,0x7800780,0x3c003c00,0x1f8000f,0xc00f003c,0x7c01e0,0x3e00f00,0x1f007800,0xf8001ef0,
3346 - 0x1f000f,0x7bc00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3347 - 0x0,0x0,0x0,0x0,0x780000,0xf,0x3800040,0x30780003,0x8038f800,0x78000000,0x1e00,0x3c00,0x0,0x1e0000,0xfc0000,0x0,0x7e000078,
3348 - 0x780,0x1f00001e,0xfc00,0x20001f,0x780,0x80007c0,0x1f001e00,0x7c0000f,0x78000,0xf80007,0xe000003f,0x0,0x1e000000,0xf00000,
3349 - 0x3c000,0x3c03fff0,0xf0001e03,0xc001f007,0x800101e0,0x7e003c0,0x1e00,0x7800,0x781e0007,0x80007800,0x6000f00,0x3c003e00,0x7800001e,
3350 - 0xf078,0x1fe00f0,0x1e00780,0x3c00,0x78078000,0xf020001e,0xf000,0x7800780,0xff0001,0xfc07f00f,0x8007c000,0x780001f0,0x3c,0xf,
3351 - 0x1e0,0x0,0x0,0x0,0xf800fc01,0xf801f007,0xc00100f8,0x1f807c0,0x40003c,0xf807,0xf0078007,0x80003c00,0xf000,0x7803e00,0x1f0000f,
3352 - 0x3c0f01e,0x1e01f0,0x3e007e0,0x7c07c00,0xfc003c00,0x1e,0x3e000,0x3e007c0,0x1ff8000,0xfe0fe003,0xe03e0001,0xff0000fc,0x1e,
3353 - 0xf0,0x780,0x0,0x0,0x1f00080,0x3cf8000,0xfc00000,0x3c00001f,0x83f00000,0x18,0xc0,0x0,0xc06203,0x40003c0,0x1c00000,0xf80f0000,
3354 - 0x3cf8001f,0xf,0x3e000079,0xf0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0x700780fc,0x3cf8,0xfc000,0x1e000,0x0,0x780000,
3355 - 0x7c180000,0xf0000020,0x100007,0x8000003c,0xf,0x80000000,0x1f01f0,0x0,0x380700,0x0,0xf,0x80f80000,0x0,0x0,0x0,0x0,0x0,0x3e007c0,
3356 - 0xe1c00,0x0,0x0,0x0,0xe01,0xc0000071,0xc0000001,0xc0001c70,0x1e00040,0x1e0003c0,0xf0001e07,0x8000f03c,0x781e0,0x3c0f00,0x1e0f007,
3357 - 0x80007800,0x10078000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x7e00f003,0xfc01e003,0xc00f001e,
3358 - 0x7800f0,0x3c00780,0x1e003c00,0xe000700f,0x800f0078,0x7803c0,0x3c01e00,0x1e00f000,0xf0000780,0x1e0000,0xf0003c,0x1f001f80,
3359 - 0xf800fc07,0xc007e03e,0x3f01f0,0x1f80f80,0xfc1e01f,0x7c00,0x100f8000,0x807c0004,0x3e00020,0x1f000100,0x780000,0x3c00000,0x1e000000,
3360 - 0xf0000f80,0x1f003c00,0x3c03e007,0xc01f003e,0xf801f0,0x7c00f80,0x3e007c00,0x1f8000f,0x801f003e,0x7c01f0,0x3e00f80,0x1f007c00,
3361 - 0xf8001ff0,0x1f801f,0x7fc00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3362 - 0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0xf,0x7800078,0x31f80001,0xc070fc00,0xfc000000,0x1e00,0x7c00,0x0,0x1e0000,0xfc0000,0x0,0x7e000078,
3363 - 0x7c0,0x1f00001e,0x1f000,0x38003f,0x780,0xe000f80,0x1f803e00,0x780000f,0x800f8000,0x1f00007,0xe000003f,0x0,0x2000000,0x800000,
3364 - 0x3c000,0x3e01ff71,0xf0001f03,0xc007f007,0xc00301e0,0x1fc003c0,0x1e00,0x7c00,0x781e0007,0x80007800,0x7801f00,0x3c001f00,0x7800001e,
3365 - 0xf078,0xfe00f8,0x3e00780,0x3e00,0xf8078000,0xf838003e,0xf000,0x7c00f80,0xff0000,0xfc07e00f,0x8003c000,0x780001e0,0x3c,0xf,
3366 - 0x1e0,0x0,0x0,0x0,0xf801fc01,0xfc03e003,0xe003007c,0x3f803e0,0x1c0003c,0xfc0f,0xf0078007,0x80003c00,0xf000,0x7801f00,0xf8000f,
3367 - 0x3c0f01e,0x1e00f8,0x7c007f0,0xf803e01,0xfc003c00,0x8003e,0x1f000,0x1e00fc0,0xff0000,0xfe0fe007,0xc01f0000,0xfe0000f8,0x1e,
3368 - 0xf0,0x780,0x0,0x0,0xf80180,0x1cf0000,0x1f800000,0x3c00001f,0x83e00000,0x18,0xc0,0x0,0xc06203,0x70007c0,0xe00000,0x7e0f0000,
3369 - 0x1cf0001e,0x7,0x3c000039,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100,0x7c00000,0xe00780fc,0x2001cf0,0xf8000,0x1e000,0x0,
3370 - 0x780000,0x7e182000,0xf0000000,0x7,0x8000003c,0x7,0xc0000000,0x7ffc0,0x0,0x180300,0x0,0x3,0xffe00000,0x0,0x0,0x0,0x0,0x0,
3371 - 0x3f00fc0,0xe1c00,0x0,0x0,0x0,0xc01,0x800000e1,0xc0000003,0xc0003870,0x1f001c0,0x3e0003e1,0xf0001f0f,0x8000f87c,0x7c3e0,0x3e1f00,
3372 - 0x1f1e007,0x80007c00,0x30078000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e03,0xfc00f001,0xfc01f007,
3373 - 0xc00f803e,0x7c01f0,0x3e00f80,0x1f007c00,0x4000201f,0xc01f007c,0xf803e0,0x7c01f00,0x3e00f801,0xf0000780,0x1e0000,0xf0007c,
3374 - 0x1f003f80,0xf801fc07,0xc00fe03e,0x7f01f0,0x3f80f80,0x1fc1f03f,0x803e00,0x3007c003,0x803e001c,0x1f000e0,0xf800700,0x780000,
3375 - 0x3c00000,0x1e000000,0xf00007c0,0x3e003c00,0x3c01f00f,0x800f807c,0x7c03e0,0x3e01f00,0x1f00f800,0x1f80007,0xc03e001e,0xfc00f0,
3376 - 0x7e00780,0x3f003c01,0xf8000fe0,0x1fc03e,0x3f800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3377 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1e,0x780007f,0xfff00001,0xe0f07f03,0xfe000000,0xf00,0x7800,0x0,
3378 - 0x1e0000,0xfc0000,0x0,0x7e0000f0,0x3f0,0x7e000fff,0xfc03ffff,0xf83f00fe,0x780,0xfc03f80,0xfc0fc00,0xf800007,0xe03f0018,0x7e00007,
3379 - 0xe000003f,0x0,0x0,0x0,0x3c000,0x1e007c71,0xe0000f03,0xffffe003,0xf01f01ff,0xff8003ff,0xffe01e00,0x3f01,0xf81e0007,0x803ffff0,
3380 - 0x7e03f00,0x3c000f00,0x7ffffe1e,0xf078,0xfe007e,0xfc00780,0x1f83,0xf0078000,0x783f00fe,0xf000,0x3f03f00,0xff0000,0xfc07e01f,
3381 - 0x3e000,0x780003ff,0xfffc003c,0x7,0x800001e0,0x0,0x0,0x0,0x7e07fc01,0xfe07e001,0xf80f007e,0x7f801f8,0xfc0003c,0x7ffe,0xf0078007,
3382 - 0x807ffffe,0xf000,0x7801f00,0xfff00f,0x3c0f01e,0x1e00fc,0xfc007f8,0x1f803f03,0xfc003c00,0xf80fc,0x1fff0,0x1f83fc0,0xff0000,
3383 - 0xfc07e007,0xc01f0000,0xfe0001ff,0xffe0001e,0xf0,0x780,0x0,0x0,0xfe0780,0xfe0000,0x1f000000,0x3c00001f,0x7c00e03,0x81c00018,
3384 - 0xc0,0x0,0x406203,0x7e01fc0,0x700000,0x7fffff80,0xfe0003f,0xffffc003,0xf800001f,0xc0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1f0,
3385 - 0x1f800001,0xc007c1fe,0x6000fe0,0x1ffffe,0x1e000,0x0,0x780000,0x3f98e03f,0xffff8000,0x7,0x8000003c,0x7,0xc0000000,0xfe00,
3386 - 0x0,0x80100,0x0,0x0,0x7f000000,0x0,0x1ffff,0xfe000000,0x0,0x0,0x3f83fe8,0xe1c00,0x0,0x0,0x0,0x801,0xc1,0xc0000007,0x80003070,
3387 - 0xfc0fc0,0x3c0001e1,0xe0000f0f,0x7878,0x3c3c0,0x1e1e00,0xf1e007,0xffc03f01,0xf007ffff,0xc03ffffe,0x1fffff0,0xfffff80,0x7fffe003,
3388 - 0xffff001f,0xfff800ff,0xffc01fff,0xf800f001,0xfc00fc1f,0x8007e0fc,0x3f07e0,0x1f83f00,0xfc1f800,0x1f,0xf07e003f,0x3f001f8,
3389 - 0x1f800fc0,0xfc007e07,0xe0000780,0x1e0000,0xf301f8,0xfc0ff80,0x7e07fc03,0xf03fe01f,0x81ff00fc,0xff807e0,0x7fc0f87f,0x81801f80,
3390 - 0xf003f01f,0x801f80fc,0xfc07e0,0x7e03f00,0xfffffc07,0xffffe03f,0xffff01ff,0xfff807e0,0x7e003c00,0x3c01f81f,0x800fc0fc,0x7e07e0,
3391 - 0x3f03f00,0x1f81f800,0x1f8000f,0xe07e001f,0x83fc00fc,0x1fe007e0,0xff003f07,0xf8000fe0,0x1fe07e,0x3f800,0x0,0x0,0x0,0x0,0x0,
3392 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1e,0x780007f,
3393 - 0xffe00000,0xffe03fff,0xdf000000,0xf00,0x7800,0x0,0x0,0xfc0000,0x0,0x7e0000f0,0x1ff,0xfc000fff,0xfc03ffff,0xf83ffffc,0x780,
3394 - 0xfffff00,0x7fff800,0xf000007,0xffff001f,0xffe00007,0xe000003f,0x0,0x0,0x0,0x3c000,0x1e000001,0xe0000f03,0xffffc001,0xffff01ff,
3395 - 0xff0003ff,0xffe01e00,0x1fff,0xf81e0007,0x803ffff0,0x7fffe00,0x3c000f80,0x7ffffe1e,0xf078,0xfe003f,0xff800780,0xfff,0xf0078000,
3396 - 0x7c3ffffc,0xf000,0x3ffff00,0xff0000,0xf803e01e,0x1e000,0x780003ff,0xfffc003c,0x7,0x800001e0,0x0,0x0,0x0,0x7fffbc01,0xffffc000,
3397 - 0xffff003f,0xfff800ff,0xffc0003c,0x3ffe,0xf0078007,0x807ffffe,0xf000,0x7800f80,0x7ff00f,0x3c0f01e,0x1e007f,0xff8007ff,0xff001fff,
3398 - 0xbc003c00,0xffffc,0x1fff0,0x1fffbc0,0xff0000,0x7c07c00f,0x800f8000,0x7e0001ff,0xffe0001e,0xf0,0x780,0x0,0x0,0x7fff80,0x7c0000,
3399 - 0x1f000000,0x3c00001e,0x7c00f07,0xc1e00018,0xc0,0x0,0x60e303,0x7ffff80,0x380000,0x3fffff80,0x7c0003f,0xffffc001,0xf000000f,
3400 - 0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ff,0xff800003,0x8003ffff,0xfe0007c0,0x1ffffe,0x1e000,0x0,0x780000,0x1fffe03f,0xffff8000,
3401 - 0x7,0x8000003c,0x3,0xc0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ffff,0xfe000000,0x0,0x0,0x3fffdf8,0xe1c00,0x0,0x0,0x0,0x0,0x1c1,
3402 - 0xc000000f,0x7070,0x7fffc0,0x3c0001e1,0xe0000f0f,0x7878,0x3c3c0,0x1e1e00,0xf1e007,0xffc01fff,0xf007ffff,0xc03ffffe,0x1fffff0,
3403 - 0xfffff80,0x7fffe003,0xffff001f,0xfff800ff,0xffc01fff,0xf000f001,0xfc007fff,0x3fff8,0x1fffc0,0xfffe00,0x7fff000,0x3b,0xfffc003f,
3404 - 0xfff001ff,0xff800fff,0xfc007fff,0xe0000780,0x1e0000,0xf3fff8,0xffff780,0x7fffbc03,0xfffde01f,0xffef00ff,0xff7807ff,0xfbc0ffff,
3405 - 0xff800fff,0xf001ffff,0x800ffffc,0x7fffe0,0x3ffff00,0xfffffc07,0xffffe03f,0xffff01ff,0xfff803ff,0xfc003c00,0x3c00ffff,0x7fff8,
3406 - 0x3fffc0,0x1fffe00,0xffff000,0x1f,0xfffc001f,0xffbc00ff,0xfde007ff,0xef003fff,0x780007e0,0x1ffffc,0x1f800,0x0,0x0,0x0,0x0,
3407 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1e,0x700003f,
3408 - 0xffc00000,0x7fc01fff,0x9f800000,0xf80,0xf800,0x0,0x0,0xfc0000,0x0,0x7e0000f0,0xff,0xf8000fff,0xfc03ffff,0xf83ffff8,0x780,
3409 - 0xffffe00,0x7fff000,0xf000003,0xfffe001f,0xffc00007,0xe000003f,0x0,0x0,0x0,0x3c000,0xf000003,0xe0000f83,0xffff0000,0xffff01ff,
3410 - 0xfc0003ff,0xffe01e00,0xfff,0xf01e0007,0x803ffff0,0x7fffc00,0x3c0007c0,0x7ffffe1e,0xf078,0x7e003f,0xff000780,0x7ff,0xe0078000,
3411 - 0x3c3ffff8,0xf000,0x1fffe00,0x7e0000,0xf803e03e,0x1f000,0x780003ff,0xfffc003c,0x7,0x800001e0,0x0,0x0,0x0,0x3fff3c01,0xefff8000,
3412 - 0x7ffe001f,0xff78007f,0xff80003c,0x1ffc,0xf0078007,0x807ffffe,0xf000,0x78007c0,0x3ff00f,0x3c0f01e,0x1e003f,0xff0007bf,0xfe000fff,
3413 - 0xbc003c00,0xffff8,0xfff0,0xfff3c0,0x7e0000,0x7c07c01f,0x7c000,0x7c0001ff,0xffe0001e,0xf0,0x780,0x0,0x0,0x3fff80,0x380000,
3414 - 0x3e000000,0x7c00003e,0x7801f07,0xc1e00018,0xc0,0x0,0x39c1ce,0x7ffff00,0x1c0000,0xfffff80,0x380003f,0xffffc000,0xe0000007,
3415 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ff,0xff000007,0x1ffcf,0xfe000380,0x1ffffe,0x1e000,0x0,0x780000,0xfffe03f,0xffff8000,0x7,
3416 - 0x8000003c,0x3,0xc0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ffff,0xfe000000,0x0,0x0,0x3dffdf8,0xe1c00,0x0,0x0,0x0,0x0,0x381,
3417 - 0xc000001e,0xe070,0x7fff80,0x7c0001f3,0xe0000f9f,0x7cf8,0x3e7c0,0x1f3e00,0xfbe007,0xffc00fff,0xf007ffff,0xc03ffffe,0x1fffff0,
3418 - 0xfffff80,0x7fffe003,0xffff001f,0xfff800ff,0xffc01fff,0xc000f000,0xfc007ffe,0x3fff0,0x1fff80,0xfffc00,0x7ffe000,0x79,0xfff8001f,
3419 - 0xffe000ff,0xff0007ff,0xf8003fff,0xc0000780,0x1e0000,0xf3fff0,0x7ffe780,0x3fff3c01,0xfff9e00f,0xffcf007f,0xfe7803ff,0xf3c07ff3,
3420 - 0xff8007ff,0xe000ffff,0x7fff8,0x3fffc0,0x1fffe00,0xfffffc07,0xffffe03f,0xffff01ff,0xfff801ff,0xf8003c00,0x3c007ffe,0x3fff0,
3421 - 0x1fff80,0xfffc00,0x7ffe000,0x1d,0xfff8000f,0xff3c007f,0xf9e003ff,0xcf001ffe,0x780007c0,0x1efff8,0x1f000,0x0,0x0,0x0,0x0,
3422 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1e,0xf000003,
3423 - 0xfe000000,0x1f000fff,0xfc00000,0x780,0xf000,0x0,0x0,0xf80000,0x0,0x7e0001e0,0x7f,0xf0000fff,0xfc03ffff,0xf81ffff0,0x780,
3424 - 0x7fff800,0x1ffe000,0x1f000000,0xfff8001f,0xff000007,0xe000003e,0x0,0x0,0x0,0x3c000,0xf800003,0xc0000783,0xfff80000,0x3ffe01ff,
3425 - 0xe00003ff,0xffe01e00,0x7ff,0xc01e0007,0x803ffff0,0x3fff800,0x3c0003c0,0x7ffffe1e,0xf078,0x7e000f,0xfe000780,0x3ff,0xc0078000,
3426 - 0x3e1fffe0,0xf000,0x7ff800,0x7e0000,0xf803e07c,0xf800,0x780003ff,0xfffc003c,0x3,0xc00001e0,0x0,0x0,0x0,0xffe3c01,0xe7ff0000,
3427 - 0x3ffc000f,0xfe78003f,0xfe00003c,0x7f0,0xf0078007,0x807ffffe,0xf000,0x78003e0,0xff00f,0x3c0f01e,0x1e001f,0xfe00079f,0xfc0007ff,
3428 - 0x3c003c00,0x7ffe0,0x1ff0,0x7fe3c0,0x7e0000,0x7c07c03e,0x3e000,0x7c0001ff,0xffe0001e,0xf0,0x780,0x0,0x0,0xfff00,0x100000,
3429 - 0x3e000000,0x7800003c,0xf800f07,0xc1e00018,0xc0,0x0,0x1f80fc,0x3fffc00,0xc0000,0x3ffff80,0x100003f,0xffffc000,0x40000002,
3430 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff,0xfc000006,0xff87,0xfc000100,0x1ffffe,0x1e000,0x0,0x780000,0x3ffc03f,0xffff8000,0x7,
3431 - 0x8000003c,0x3,0xc0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ffff,0xfe000000,0x0,0x0,0x3dff9f8,0xe1c00,0x0,0x0,0x0,0x0,0x3ff,
3432 - 0xf800003c,0xfffe,0x1ffe00,0x780000f3,0xc000079e,0x3cf0,0x1e780,0xf3c00,0x7bc007,0xffc003ff,0xe007ffff,0xc03ffffe,0x1fffff0,
3433 - 0xfffff80,0x7fffe003,0xffff001f,0xfff800ff,0xffc01ffc,0xf000,0xfc001ffc,0xffe0,0x7ff00,0x3ff800,0x1ffc000,0x70,0xfff00007,
3434 - 0xff80003f,0xfc0001ff,0xe0000fff,0x780,0x1e0000,0xf3ffe0,0x1ffc780,0xffe3c00,0x7ff1e003,0xff8f001f,0xfc7800ff,0xe3c03fe1,
3435 - 0xff0003ff,0xc0007ffc,0x3ffe0,0x1fff00,0xfff800,0xfffffc07,0xffffe03f,0xffff01ff,0xfff800ff,0xf0003c00,0x3c003ffc,0x1ffe0,
3436 - 0xfff00,0x7ff800,0x3ffc000,0x38,0xfff00007,0xfe3c003f,0xf1e001ff,0x8f000ffc,0x780007c0,0x1e7ff0,0x1f000,0x0,0x0,0x0,0x0,0x0,
3437 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,
3438 - 0x1fc,0x0,0x780,0xf000,0x0,0x0,0x1f80000,0x0,0x1e0,0x1f,0xc0000000,0x0,0x1ff80,0x0,0xffc000,0x7f8000,0x0,0x3fe00007,0xfc000000,
3439 - 0x7e,0x0,0x0,0x0,0x0,0x7c00000,0x0,0x0,0xff00000,0x0,0x0,0xfe,0x0,0x0,0x3fc000,0x0,0x0,0x0,0x3,0xf8000000,0xff,0xc0000000,
3440 - 0x1ff00,0x0,0x1fe000,0x0,0x0,0x0,0x0,0x3c,0x3,0xc00001e0,0x0,0x0,0x0,0x3f80000,0x1fc0000,0x7f00003,0xf8000007,0xf0000000,
3441 - 0x0,0xf0000000,0x0,0xf000,0x0,0x0,0x0,0x7,0xf8000787,0xf00001fc,0x3c000000,0x7f80,0x0,0x1f8000,0x0,0x0,0x0,0x7c000000,0x1e,
3442 - 0xf0,0x780,0x0,0x0,0x3fc00,0x0,0x3c000000,0x7800003c,0xf000601,0xc00018,0xc0,0x0,0x0,0x3fe000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3443 - 0x0,0x0,0x0,0x0,0x0,0x0,0xf,0xf0000000,0x7e03,0xf0000000,0x0,0x0,0x0,0x0,0xfe0000,0x0,0x0,0x3c,0x2007,0x80000000,0x0,0x0,
3444 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c7e0f0,0xe1c00,0x0,0x3800000,0x0,0x0,0x3ff,0xf8000078,0xfffe,0x7f800,0x0,0x0,0x0,0x0,
3445 - 0x0,0x0,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f0,0x3f80,0x1fc00,0xfe000,0x7f0000,0x70,0x3fc00001,0xfe00000f,0xf000007f,
3446 - 0x800003fc,0x0,0x0,0xff00,0x7f0000,0x3f80000,0x1fc00000,0xfe000007,0xf000003f,0x80001f80,0xfc00007f,0xfe0,0x7f00,0x3f800,
3447 - 0x1fc000,0x0,0x0,0x0,0x3f,0xc0000000,0xff0,0x7f80,0x3fc00,0x1fe000,0xff0000,0x78,0x3fc00001,0xf800000f,0xc000007e,0x3f0,0x7c0,
3448 - 0x1e1fc0,0x1f000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3449 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0x0,0x0,0x3c0,0x1e000,0x0,0x0,0x1f00000,0x0,0x3c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3450 - 0x0,0x0,0x7c,0x0,0x0,0x0,0x0,0x3e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0xe0000000,0x0,0x0,0x0,
3451 - 0x0,0x0,0x0,0x0,0x3c,0x1,0xe00001e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0000000,0x0,0xf000,0x0,0x0,0x0,0x0,0x780,0x0,0x3c000000,
3452 - 0x0,0x0,0x0,0x0,0x0,0x0,0x78000000,0x1e,0xf0,0x780,0x0,0x0,0x0,0x0,0x3c000000,0x78000078,0xf000000,0x18,0xc0,0x0,0x0,0x0,
3453 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180000,0x0,0x0,0x3c,0x3c0f,0x80000000,
3454 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0xe1c00,0x0,0x1800000,0x0,0x0,0x3ff,0xf80000f0,0xfffe,0x0,0x0,0x0,0x0,
3455 - 0x0,0x0,0x0,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3456 - 0x0,0x0,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30,0x0,0x0,0x0,0x0,0x780,0x1e0000,0x1e000,0x0,0x0,0x0,
3457 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,
3458 - 0x0,0x0,0x3c0,0x1e000,0x0,0x0,0x1f00000,0x0,0x3c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7c,0x0,0x0,0x0,0x0,0x1f80000,
3459 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0xf0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c,0x1,0xe00001e0,0x0,
3460 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0xe0000000,0x0,0xf000,0x0,0x0,0x0,0x0,0x780,0x0,0x3c000000,0x0,0x0,0x0,0x0,0x0,0x0,0xf8000000,
3461 - 0x1f,0xf0,0xf80,0x0,0x0,0x0,0x0,0x78000000,0xf8000078,0x1e000000,0x8,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3462 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180000,0x0,0x0,0x3c,0x3fff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3463 - 0x0,0x3c00000,0xe1c00,0x0,0x1c00000,0x0,0x0,0x1,0xc00001e0,0x70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3464 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3465 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf80,0x1e0000,0x3e000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3466 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0x0,0x0,0x1e0,0x3c000,0x0,0x0,0x1f00000,
3467 - 0x0,0x780,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7c,0x0,0x0,0x0,0x0,0xfe0100,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3468 - 0x0,0x0,0x0,0x0,0xf8000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0xf0000000,0xf0007fe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0xe0000000,
3469 - 0x0,0xf000,0x0,0x0,0x0,0x0,0x780,0x0,0x3c000000,0x0,0x0,0x0,0x0,0x0,0x0,0xf0000000,0x1f,0x800000f0,0x1f80,0x0,0x0,0x0,0x0,
3470 - 0x78000000,0xf0000070,0x1c000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3471 - 0x0,0x0,0x0,0x0,0x180000,0x0,0x0,0x3c,0x3ffe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0xe1c00,0x0,0xe00000,
3472 - 0x0,0x0,0x1,0xc00003ff,0xe0000070,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3473 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3474 - 0x0,0x0,0x0,0xf00,0x1e0000,0x3c000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3475 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0x0,0x0,0x1e0,0x7c000,0x0,0x0,0x1e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3476 - 0x0,0x0,0x0,0x0,0x0,0x78,0x0,0x0,0x0,0x0,0x7fff80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x78000000,
3477 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0xf0000000,0x7fe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4003,0xe0000000,0x0,0x1f000,0x0,0x0,
3478 - 0x0,0x0,0x780,0x0,0x3c000000,0x0,0x0,0x0,0x0,0x0,0x1,0xf0000000,0xf,0xfc0000f0,0x3ff00,0x0,0x0,0x0,0x0,0x70000001,0xf00000e0,
3479 - 0x1c000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180000,
3480 - 0x0,0x0,0x3c,0xff8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0xe1c00,0x0,0xe00000,0x0,0x0,0x1,0xc00003ff,
3481 - 0xe0000070,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3482 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1f00,0x1e0000,
3483 - 0x7c000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3484 - 0x0,0x0,0x0,0x0,0x30000000,0x0,0x0,0xf0,0x78000,0x0,0x0,0x3e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf8,0x0,
3485 - 0x0,0x0,0x0,0x1fff80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,
3486 - 0xf0000000,0x7fe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780f,0xc0000000,0x0,0x3e000,0x0,0x0,0x0,0x0,0x780,0x0,0x3c000000,0x0,
3487 - 0x0,0x0,0x0,0x0,0x3,0xe0000000,0xf,0xfc0000f0,0x3ff00,0x0,0x0,0x0,0x0,0xf0000103,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3488 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180000,0x0,0x0,0x3c,0x0,0x0,0x0,0x0,0x0,0x0,
3489 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0x0,0x0,0x21e00000,0x0,0x0,0x1,0xc00003ff,0xe0000070,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10f,
3490 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10f,0x0,
3491 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e00,0x1e0000,0xf8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3492 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0x0,0x0,
3493 - 0xf8,0xf8000,0x0,0x0,0x3c00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0,0x0,0x0,0x0,0x0,0x1fe00,0x0,0x0,0x0,0x0,
3494 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0xf0000000,0x7fe0,0x0,0x0,0x0,0x0,0x0,0x0,
3495 - 0x0,0x0,0x7fff,0xc0000000,0x0,0x3ffe000,0x0,0x0,0x0,0x0,0x780,0x0,0x3c000000,0x0,0x0,0x0,0x0,0x0,0x7f,0xe0000000,0x7,0xfc0000f0,
3496 - 0x3fe00,0x0,0x0,0x0,0x0,0x600001ff,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3497 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180000,0x0,0x0,0x3c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0x0,0x0,
3498 - 0x3fe00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3499 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3500 - 0x0,0x0,0x0,0x0,0x7fe00,0x1e0000,0x1ff8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3501 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3502 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3503 - 0x0,0x0,0x0,0x0,0x1fffffe0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fff,0x80000000,0x0,0x3ffc000,0x0,0x0,0x0,0x0,0x780,0x0,0x3c000000,0x0,
3504 - 0x0,0x0,0x0,0x0,0x7f,0xc0000000,0x0,0xfc0000f0,0x3f000,0x0,0x0,0x0,0x0,0x1ff,0xc0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3505 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3506 - 0x0,0x0,0x0,0x0,0x0,0x3c00000,0x0,0x0,0x3fc00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fe,0x0,0x0,0x0,0x0,0x0,
3507 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fe,0x0,0x0,0x0,0x0,0x0,0x0,
3508 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fc00,0x1e0000,0x1ff0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3509 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3510 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3511 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fffffe0,0x0,0x0,0x0,0x0,0x0,0x0,0x3ffe,0x0,0x0,0x3ff8000,0x0,0x0,0x0,
3512 - 0x0,0x780,0x0,0x3c000000,0x0,0x0,0x0,0x0,0x0,0x7f,0x80000000,0x0,0xf0,0x0,0x0,0x0,0x0,0x0,0x1ff,0x80000000,0x0,0x0,0x0,0x0,
3513 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3514 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0x0,0x0,0x3f800000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fc,0x0,
3515 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fc,0x0,0x0,
3516 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f800,0x1e0000,0x1fe0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3517 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3518 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3519 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fffffe0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f8,0x0,0x0,0x3fe0000,
3520 - 0x0,0x0,0x0,0x0,0x780,0x0,0x3c000000,0x0,0x0,0x0,0x0,0x0,0x7e,0x0,0x0,0xf0,0x0,0x0,0x0,0x0,0x0,0xfe,0x0,0x0,0x0,0x0,0x0,0x0,
3521 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3522 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3523 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3524 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7e000,0x1e0000,0x1f80000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3525 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3526 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3527 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fffffe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3528 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3529 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3530 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3531 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3532 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3533 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3534 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3535 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0,0x0,0x0,0x0,
3536 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3537 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3538 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3539 - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 };
3540 -
3541 - // Definition of a 40x38 'danger' color logo
3542 - const unsigned char logo40x38[4576] = {
3543 - 177,200,200,200,3,123,123,0,36,200,200,200,1,123,123,0,2,255,255,0,1,189,189,189,1,0,0,0,34,200,200,200,
3544 - 1,123,123,0,4,255,255,0,1,189,189,189,1,0,0,0,1,123,123,123,32,200,200,200,1,123,123,0,5,255,255,0,1,0,0,
3545 - 0,2,123,123,123,30,200,200,200,1,123,123,0,6,255,255,0,1,189,189,189,1,0,0,0,2,123,123,123,29,200,200,200,
3546 - 1,123,123,0,7,255,255,0,1,0,0,0,2,123,123,123,28,200,200,200,1,123,123,0,8,255,255,0,1,189,189,189,1,0,0,0,
3547 - 2,123,123,123,27,200,200,200,1,123,123,0,9,255,255,0,1,0,0,0,2,123,123,123,26,200,200,200,1,123,123,0,10,255,
3548 - 255,0,1,189,189,189,1,0,0,0,2,123,123,123,25,200,200,200,1,123,123,0,3,255,255,0,1,189,189,189,3,0,0,0,1,189,
3549 - 189,189,3,255,255,0,1,0,0,0,2,123,123,123,24,200,200,200,1,123,123,0,4,255,255,0,5,0,0,0,3,255,255,0,1,189,
3550 - 189,189,1,0,0,0,2,123,123,123,23,200,200,200,1,123,123,0,4,255,255,0,5,0,0,0,4,255,255,0,1,0,0,0,2,123,123,123,
3551 - 22,200,200,200,1,123,123,0,5,255,255,0,5,0,0,0,4,255,255,0,1,189,189,189,1,0,0,0,2,123,123,123,21,200,200,200,
3552 - 1,123,123,0,5,255,255,0,5,0,0,0,5,255,255,0,1,0,0,0,2,123,123,123,20,200,200,200,1,123,123,0,6,255,255,0,5,0,0,
3553 - 0,5,255,255,0,1,189,189,189,1,0,0,0,2,123,123,123,19,200,200,200,1,123,123,0,6,255,255,0,1,123,123,0,3,0,0,0,1,
3554 - 123,123,0,6,255,255,0,1,0,0,0,2,123,123,123,18,200,200,200,1,123,123,0,7,255,255,0,1,189,189,189,3,0,0,0,1,189,
3555 - 189,189,6,255,255,0,1,189,189,189,1,0,0,0,2,123,123,123,17,200,200,200,1,123,123,0,8,255,255,0,3,0,0,0,8,255,255,
3556 - 0,1,0,0,0,2,123,123,123,16,200,200,200,1,123,123,0,9,255,255,0,1,123,123,0,1,0,0,0,1,123,123,0,8,255,255,0,1,189,
3557 - 189,189,1,0,0,0,2,123,123,123,15,200,200,200,1,123,123,0,9,255,255,0,1,189,189,189,1,0,0,0,1,189,189,189,9,255,255,
3558 - 0,1,0,0,0,2,123,123,123,14,200,200,200,1,123,123,0,11,255,255,0,1,0,0,0,10,255,255,0,1,189,189,189,1,0,0,0,2,123,
3559 - 123,123,13,200,200,200,1,123,123,0,23,255,255,0,1,0,0,0,2,123,123,123,12,200,200,200,1,123,123,0,11,255,255,0,1,189,
3560 - 189,189,2,0,0,0,1,189,189,189,9,255,255,0,1,189,189,189,1,0,0,0,2,123,123,123,11,200,200,200,1,123,123,0,11,255,255,
3561 - 0,4,0,0,0,10,255,255,0,1,0,0,0,2,123,123,123,10,200,200,200,1,123,123,0,12,255,255,0,4,0,0,0,10,255,255,0,1,189,189,
3562 - 189,1,0,0,0,2,123,123,123,9,200,200,200,1,123,123,0,12,255,255,0,1,189,189,189,2,0,0,0,1,189,189,189,11,255,255,0,1,
3563 - 0,0,0,2,123,123,123,9,200,200,200,1,123,123,0,27,255,255,0,1,0,0,0,3,123,123,123,8,200,200,200,1,123,123,0,26,255,
3564 - 255,0,1,189,189,189,1,0,0,0,3,123,123,123,9,200,200,200,1,123,123,0,24,255,255,0,1,189,189,189,1,0,0,0,4,123,123,
3565 - 123,10,200,200,200,1,123,123,0,24,0,0,0,5,123,123,123,12,200,200,200,27,123,123,123,14,200,200,200,25,123,123,123,86,
3566 - 200,200,200,91,49,124,118,124,71,32,124,95,49,56,114,52,82,121,0};
3567 -
3568 - // Display a warning message if parameter 'cond' is true.
3569 - inline void warn(const bool cond, const char *format,...) {
3570 - if (cimg::exception_mode()>=1 && cond) {
3571 - std::va_list ap;
3572 - va_start(ap,format);
3573 - std::fprintf(stderr,"\n<CImg Warning> ");
3574 - std::vfprintf(stderr,format,ap);
3575 - std::fputc('\n',stderr);
3576 - va_end(ap);
3577 - }
3578 - }
3579 -
3580 - inline int xln(const int x) {
3581 - return x>0?(int)(1+std::log10((double)x)):1;
3582 - }
3583 -
3584 - inline char uncase(const char x) {
3585 - return (char)((x<'A'||x>'Z')?x:x-'A'+'a');
3586 - }
3587 -
3588 - inline float atof(const char *str) {
3589 - float x=0,y=1;
3590 - if (!str) return 0; else { std::sscanf(str,"%g/%g",&x,&y); return x/y; }
3591 - }
3592 -
3593 - inline int strlen(const char *s) {
3594 - if (s) { int k; for (k=0; s[k]; k++) ; return k; }
3595 - return -1;
3596 - }
3597 -
3598 - inline int strncmp(const char *s1,const char *s2,const int l) {
3599 - if (s1 && s2) { int n=0; for (int k=0; k<l; k++) n+=std::abs(s1[k] - s2[k]); return n; }
3600 - return 0;
3601 - }
3602 -
3603 - inline int strncasecmp(const char *s1,const char *s2,const int l) {
3604 - if (s1 && s2) { int n=0; for (int k=0; k<l; k++) n+=std::abs(uncase(s1[k])-uncase(s2[k])); return n; }
3605 - return 0;
3606 - }
3607 -
3608 - inline int strcmp(const char *s1,const char *s2) {
3609 - const int l1 = cimg::strlen(s1), l2 = cimg::strlen(s2);
3610 - return cimg::strncmp(s1,s2,1+(l1<l2?l1:l2));
3611 - }
3612 -
3613 - inline int strcasecmp(const char *s1,const char *s2) {
3614 - const int l1 = cimg::strlen(s1), l2 = cimg::strlen(s2);
3615 - return cimg::strncasecmp(s1,s2,1+(l1<l2?l1:l2));
3616 - }
3617 -
3618 - inline int strfind(const char *s,const char c) {
3619 - if (s) {
3620 - int l; for (l=cimg::strlen(s); l>=0 && s[l]!=c; l--) ;
3621 - return l;
3622 - }
3623 - return -1;
3624 - }
3625 -
3626 - inline const char* basename(const char *s) {
3627 - return (cimg_OS!=2)?(s?s+1+cimg::strfind(s,'/'):0):(s?s+1+cimg::strfind(s,'\\'):0);
3628 - }
3629 -
3630 - inline void system(const char *command, const char *module_name=0) {
3631 -#if cimg_OS==2
3632 - PROCESS_INFORMATION pi;
3633 - STARTUPINFO si;
3634 - std::memset(&pi, 0, sizeof(PROCESS_INFORMATION));
3635 - std::memset(&si, 0, sizeof(STARTUPINFO));
3636 - GetStartupInfo(&si);
3637 - si.cb = sizeof(si);
3638 - si.wShowWindow = SW_HIDE;
3639 - si.dwFlags |= SW_HIDE;
3640 - const BOOL res = CreateProcess((LPCTSTR)module_name,(LPTSTR)command,0,0,FALSE,0,0,0,&si,&pi);
3641 - if (res) {
3642 - WaitForSingleObject(pi.hProcess, INFINITE);
3643 - CloseHandle(pi.hThread);
3644 - CloseHandle(pi.hProcess);
3645 - } else
3646 -#endif
3647 - std::system(command);
3648 - command=module_name=0;
3649 - }
3650 -
3651 - //! Return path of the ImageMagick's \c convert tool.
3652 - /**
3653 - If you have installed the <a href="http://www.imagemagick.org">ImageMagick package</a>
3654 - in a standard directory, this function should return the correct path of the \c convert tool
3655 - used by the %CImg Library to load and save compressed image formats.
3656 - Conversely, if the \c convert executable is not auto-detected by the function,
3657 - you can define the macro \c cimg_imagemagick_path with the correct path
3658 - of the \c convert executable, before including <tt>CImg.h</tt> in your program :
3659 - \code
3660 - #define cimg_imagemagick_path "/users/thatsme/local/bin/convert"
3661 - #include "CImg.h"
3662 -
3663 - int main() {
3664 - CImg<> img("my_image.jpg"); // Read a JPEG image file.
3665 - return 0;
3666 - }
3667 - \endcode
3668 -
3669 - Note that non compressed image formats can be read without installing ImageMagick.
3670 -
3671 - \sa temporary_path(), get_load_imagemagick(), load_imagemagick(), save_imagemagick().
3672 - **/
3673 - inline const char* imagemagick_path() {
3674 - static char *st_imagemagick_path = 0;
3675 - if (!st_imagemagick_path) {
3676 - st_imagemagick_path = new char[1024];
3677 - bool path_found = false;
3678 - std::FILE *file = 0;
3679 -#ifdef cimg_imagemagick_path
3680 - std::strcpy(st_imagemagick_path,cimg_imagemagick_path);
3681 - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3682 -#endif
3683 -#if cimg_OS==2
3684 - if (!path_found) {
3685 - std::sprintf(st_imagemagick_path,".\\convert.exe");
3686 - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3687 - }
3688 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3689 - std::sprintf(st_imagemagick_path,"C:\\IMAGEM~1.%u-Q\\convert.exe",k);
3690 - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3691 - }}
3692 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3693 - std::sprintf(st_imagemagick_path,"C:\\IMAGEM~1.%u\\convert.exe",k);
3694 - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3695 - }}
3696 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3697 - std::sprintf(st_imagemagick_path,"C:\\IMAGEM~1.%u-Q\\VISUA~1\\BIN\\convert.exe",k);
3698 - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3699 - }}
3700 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3701 - std::sprintf(st_imagemagick_path,"C:\\IMAGEM~1.%u\\VISUA~1\\BIN\\convert.exe",k);
3702 - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3703 - }}
3704 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3705 - std::sprintf(st_imagemagick_path,"C:\\PROGRA~1\\IMAGEM~1.%u-Q\\convert.exe",k);
3706 - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3707 - }}
3708 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3709 - std::sprintf(st_imagemagick_path,"C:\\PROGRA~1\\IMAGEM~1.%u\\convert.exe",k);
3710 - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3711 - }}
3712 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3713 - std::sprintf(st_imagemagick_path,"C:\\PROGRA~1\\IMAGEM~1.%u-Q\\VISUA~1\\BIN\\convert.exe",k);
3714 - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3715 - }}
3716 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3717 - std::sprintf(st_imagemagick_path,"C:\\PROGRA~1\\IMAGEM~1.%u\\VISUA~1\\BIN\\convert.exe",k);
3718 - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3719 - }}
3720 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3721 - std::sprintf(st_imagemagick_path,"D:\\IMAGEM~1.%u-Q\\convert.exe",k);
3722 - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3723 - }}
3724 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3725 - std::sprintf(st_imagemagick_path,"D:\\IMAGEM~1.%u\\convert.exe",k);
3726 - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3727 - }}
3728 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3729 - std::sprintf(st_imagemagick_path,"D:\\IMAGEM~1.%u-Q\\VISUA~1\\BIN\\convert.exe",k);
3730 - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3731 - }}
3732 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3733 - std::sprintf(st_imagemagick_path,"D:\\IMAGEM~1.%u\\VISUA~1\\BIN\\convert.exe",k);
3734 - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3735 - }}
3736 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3737 - std::sprintf(st_imagemagick_path,"D:\\PROGRA~1\\IMAGEM~1.%u-Q\\convert.exe",k);
3738 - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3739 - }}
3740 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3741 - std::sprintf(st_imagemagick_path,"D:\\PROGRA~1\\IMAGEM~1.%u\\convert.exe",k);
3742 - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3743 - }}
3744 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3745 - std::sprintf(st_imagemagick_path,"D:\\PROGRA~1\\IMAGEM~1.%u-Q\\VISUA~1\\BIN\\convert.exe",k);
3746 - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3747 - }}
3748 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3749 - std::sprintf(st_imagemagick_path,"D:\\PROGRA~1\\IMAGEM~1.%u\\VISUA~1\\BIN\\convert.exe",k);
3750 - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3751 - }}
3752 - if (!path_found) std::strcpy(st_imagemagick_path,"convert.exe");
3753 -#else
3754 - if (!path_found) {
3755 - std::sprintf(st_imagemagick_path,"./convert");
3756 - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3757 - }
3758 - if (!path_found) std::strcpy(st_imagemagick_path,"convert");
3759 -#endif
3760 - }
3761 - return st_imagemagick_path;
3762 - }
3763 -
3764 - //! Return path of the GraphicsMagick's \c gm tool.
3765 - /**
3766 - If you have installed the <a href="http://www.graphicsmagick.org">GraphicsMagick package</a>
3767 - in a standard directory, this function should return the correct path of the \c gm tool
3768 - used by the %CImg Library to load and save compressed image formats.
3769 - Conversely, if the \c gm executable is not auto-detected by the function,
3770 - you can define the macro \c cimg_graphicsmagick_path with the correct path
3771 - of the \c gm executable, before including <tt>CImg.h</tt> in your program :
3772 - \code
3773 - #define cimg_graphicsmagick_path "/users/thatsme/local/bin/gm"
3774 - #include "CImg.h"
3775 -
3776 - int main() {
3777 - CImg<> img("my_image.jpg"); // Read a JPEG image file.
3778 - return 0;
3779 - }
3780 - \endcode
3781 -
3782 - Note that non compressed image formats can be read without installing ImageMagick.
3783 -
3784 - \sa temporary_path(), get_load_imagemagick(), load_imagemagick(), save_imagemagick().
3785 - **/
3786 - inline const char* graphicsmagick_path() {
3787 - static char *st_graphicsmagick_path = 0;
3788 - if (!st_graphicsmagick_path) {
3789 - st_graphicsmagick_path = new char[1024];
3790 - bool path_found = false;
3791 - std::FILE *file = 0;
3792 -#ifdef cimg_graphicsmagick_path
3793 - std::strcpy(st_graphicsmagick_path,cimg_graphicsmagick_path);
3794 - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3795 -#endif
3796 -#if cimg_OS==2
3797 - if (!path_found) {
3798 - std::sprintf(st_graphicsmagick_path,".\\gm.exe");
3799 - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3800 - }
3801 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3802 - std::sprintf(st_graphicsmagick_path,"C:\\GRAPHI~1.%u-Q\\gm.exe",k);
3803 - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3804 - }}
3805 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3806 - std::sprintf(st_graphicsmagick_path,"C:\\GRAPHI~1.%u\\gm.exe",k);
3807 - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3808 - }}
3809 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3810 - std::sprintf(st_graphicsmagick_path,"C:\\GRAPHI~1.%u-Q\\VISUA~1\\BIN\\gm.exe",k);
3811 - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3812 - }}
3813 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3814 - std::sprintf(st_graphicsmagick_path,"C:\\GRAPHI~1.%u\\VISUA~1\\BIN\\gm.exe",k);
3815 - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3816 - }}
3817 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3818 - std::sprintf(st_graphicsmagick_path,"C:\\PROGRA~1\\GRAPHI~1.%u-Q\\gm.exe",k);
3819 - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3820 - }}
3821 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3822 - std::sprintf(st_graphicsmagick_path,"C:\\PROGRA~1\\GRAPHI~1.%u\\gm.exe",k);
3823 - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3824 - }}
3825 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3826 - std::sprintf(st_graphicsmagick_path,"C:\\PROGRA~1\\GRAPHI~1.%u-Q\\VISUA~1\\BIN\\gm.exe",k);
3827 - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3828 - }}
3829 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3830 - std::sprintf(st_graphicsmagick_path,"C:\\PROGRA~1\\GRAPHI~1.%u\\VISUA~1\\BIN\\gm.exe",k);
3831 - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3832 - }}
3833 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3834 - std::sprintf(st_graphicsmagick_path,"D:\\GRAPHI~1.%u-Q\\gm.exe",k);
3835 - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3836 - }}
3837 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3838 - std::sprintf(st_graphicsmagick_path,"D:\\GRAPHI~1.%u\\gm.exe",k);
3839 - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3840 - }}
3841 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3842 - std::sprintf(st_graphicsmagick_path,"D:\\GRAPHI~1.%u-Q\\VISUA~1\\BIN\\gm.exe",k);
3843 - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3844 - }}
3845 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3846 - std::sprintf(st_graphicsmagick_path,"D:\\GRAPHI~1.%u\\VISUA~1\\BIN\\gm.exe",k);
3847 - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3848 - }}
3849 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3850 - std::sprintf(st_graphicsmagick_path,"D:\\PROGRA~1\\GRAPHI~1.%u-Q\\gm.exe",k);
3851 - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3852 - }}
3853 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3854 - std::sprintf(st_graphicsmagick_path,"D:\\PROGRA~1\\GRAPHI~1.%u\\gm.exe",k);
3855 - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3856 - }}
3857 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3858 - std::sprintf(st_graphicsmagick_path,"D:\\PROGRA~1\\GRAPHI~1.%u-Q\\VISUA~1\\BIN\\gm.exe",k);
3859 - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3860 - }}
3861 - { for (unsigned int k=0; k<=9 && !path_found; k++) {
3862 - std::sprintf(st_graphicsmagick_path,"D:\\PROGRA~1\\GRAPHI~1.%u\\VISUA~1\\BIN\\gm.exe",k);
3863 - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3864 - }}
3865 - if (!path_found) std::strcpy(st_graphicsmagick_path,"gm.exe");
3866 -#else
3867 - if (!path_found) {
3868 - std::sprintf(st_graphicsmagick_path,"./gm");
3869 - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
3870 - }
3871 - if (!path_found) std::strcpy(st_graphicsmagick_path,"gm");
3872 -#endif
3873 - }
3874 - return st_graphicsmagick_path;
3875 - }
3876 -
3877 - //! Return path of the \c XMedcon tool.
3878 - /**
3879 - If you have installed the <a href="http://xmedcon.sourceforge.net/">XMedcon package</a>
3880 - in a standard directory, this function should return the correct path of the \c medcon tool
3881 - used by the %CIg Library to load DICOM image formats.
3882 - Conversely, if the \c medcon executable is not auto-detected by the function,
3883 - you can define the macro \c cimg_medcon_path with the correct path
3884 - of the \c medcon executable, before including <tt>CImg.h</tt> in your program :
3885 - \code
3886 - #define cimg_medcon_path "/users/thatsme/local/bin/medcon"
3887 - #include "CImg.h"
3888 -
3889 - int main() {
3890 - CImg<> img("my_image.dcm"); // Read a DICOM image file.
3891 - return 0;
3892 - }
3893 - \endcode
3894 -
3895 - Note that \c medcon is only needed if you want to read DICOM image formats.
3896 -
3897 - \sa temporary_path(), get_load_dicom(), load_dicom().
3898 - **/
3899 - inline const char* medcon_path() {
3900 - static char *st_medcon_path = 0;
3901 - if (!st_medcon_path) {
3902 - st_medcon_path = new char[1024];
3903 - bool path_found = false;
3904 - std::FILE *file = 0;
3905 -#ifdef cimg_medcon_path
3906 - std::strcpy(st_medcon_path,cimg_medcon_path);
3907 - if ((file=std::fopen(st_medcon_path,"r"))!=0) { std::fclose(file); path_found = true; }
3908 -#endif
3909 -#if cimg_OS==2
3910 - if (!path_found) {
3911 - std::sprintf(st_medcon_path,".\\medcon.bat");
3912 - if ((file=std::fopen(st_medcon_path,"r"))!=0) { std::fclose(file); path_found = true; }
3913 - }
3914 - if (!path_found) {
3915 - std::sprintf(st_medcon_path,"C:\\PROGRA~1\\XMedCon\\bin\\medcon.bat");
3916 - if ((file=std::fopen(st_medcon_path,"r"))!=0) { std::fclose(file); path_found = true; }
3917 - }
3918 - if (!path_found) {
3919 - std::sprintf(st_medcon_path,"D:\\PROGRA~1\\XMedCon\\bin\\medcon.bat");
3920 - if ((file=std::fopen(st_medcon_path,"r"))!=0) { std::fclose(file); path_found = true; }
3921 - }
3922 - if (!path_found) std::strcpy(st_medcon_path,"medcon.bat");
3923 -#else
3924 - if (!path_found) {
3925 - std::sprintf(st_medcon_path,"./medcon");
3926 - if ((file=std::fopen(st_medcon_path,"r"))!=0) { std::fclose(file); path_found = true; }
3927 - }
3928 - if (!path_found) std::strcpy(st_medcon_path,"medcon");
3929 -#endif
3930 - }
3931 - return st_medcon_path;
3932 - }
3933 -
3934 - //! Return path to store temporary files.
3935 - /**
3936 - If you are running on a standard Unix or Windows system, this function should return a correct path
3937 - where temporary files can be stored. If such a path is not auto-detected by this function,
3938 - you can define the macro \c cimg_temporary_path with a correct path, before including <tt>CImg.h</tt>
3939 - in your program :
3940 - \code
3941 - #define cimg_temporary_path "/users/thatsme/tmp"
3942 - #include "CImg.h"
3943 -
3944 - int main() {
3945 - CImg<> img("my_image.jpg"); // Read a JPEG image file (using the defined temporay path).
3946 - return 0;
3947 - }
3948 - \endcode
3949 -
3950 - A temporary path is necessary to load and save compressed image formats, using \c convert
3951 - or \c medcon.
3952 -
3953 - \sa imagemagick_path(), get_load_imagemagick(), load_imagemagick(), save_imagemagick(), get_load_dicom(), load_dicom().
3954 - **/
3955 - inline const char* temporary_path() {
3956 -
3957 -#define cimg_test_temporary_path(p) \
3958 - if (!path_found) { \
3959 - std::sprintf(st_temporary_path,p); \
3960 - std::sprintf(tmp,"%s%s%s",st_temporary_path,cimg_OS==2?"\\":"/",filetmp); \
3961 - if ((file=std::fopen(tmp,"wb"))!=0) { std::fclose(file); std::remove(tmp); path_found = true; } \
3962 - }
3963 -
3964 - static char *st_temporary_path = 0;
3965 - if (!st_temporary_path) {
3966 - st_temporary_path = new char[1024];
3967 - bool path_found = false;
3968 - char tmp[1024], filetmp[512];
3969 - std::FILE *file = 0;
3970 - std::sprintf(filetmp,"CImg%.4d.tmp",std::rand()%10000);
3971 -#ifdef cimg_temporary_path
3972 - cimg_test_temporary_path(cimg_temporary_path);
3973 -#endif
3974 -#if cimg_OS==2
3975 - cimg_test_temporary_path("C:\\WINNT\\Temp");
3976 - cimg_test_temporary_path("C:\\WINDOWS\\Temp");
3977 - cimg_test_temporary_path("C:\\Temp");
3978 - cimg_test_temporary_path("C:");
3979 - cimg_test_temporary_path("D:\\WINNT\\Temp");
3980 - cimg_test_temporary_path("D:\\WINDOWS\\Temp");
3981 - cimg_test_temporary_path("D:\\Temp");
3982 - cimg_test_temporary_path("D:");
3983 -#else
3984 - cimg_test_temporary_path("/tmp");
3985 - cimg_test_temporary_path("/var/tmp");
3986 -#endif
3987 - if (!path_found) {
3988 - st_temporary_path[0]='\0';
3989 - std::strcpy(tmp,filetmp);
3990 - if ((file=std::fopen(tmp,"wb"))!=0) { std::fclose(file); std::remove(tmp); path_found = true; }
3991 - }
3992 - if (!path_found)
3993 - throw CImgIOException("cimg::temporary_path() : Unable to find a temporary path accessible for writing\n"
3994 - "you have to set the macro 'cimg_temporary_path' to a valid path where you have writing access :\n"
3995 - "#define cimg_temporary_path \"path\" (before including 'CImg.h')");
3996 - }
3997 - return st_temporary_path;
3998 - }
3999 -
4000 - inline const char *filename_split(const char *const filename, char *const body=0) {
4001 - if (!filename) { if (body) body[0]='\0'; return 0; }
4002 - int l = cimg::strfind(filename,'.');
4003 - if (l>=0) { if (body) { std::strncpy(body,filename,l); body[l]='\0'; }}
4004 - else { if (body) std::strcpy(body,filename); l=(int)std::strlen(filename)-1; }
4005 - return filename+l+1;
4006 - }
4007 -
4008 - inline char* filename_number(const char *const filename, const int number, const unsigned int n, char *const string) {
4009 - if (!filename) { if (string) string[0]='\0'; return 0; }
4010 - char format[1024],body[1024];
4011 - const char *ext = cimg::filename_split(filename,body);
4012 - if (n>0) std::sprintf(format,"%s_%%.%ud.%s",body,n,ext);
4013 - else std::sprintf(format,"%s_%%d.%s",body,ext);
4014 - std::sprintf(string,format,number);
4015 - return string;
4016 - }
4017 -
4018 - inline std::FILE *fopen(const char *const path,const char *const mode) {
4019 - if(!path || !mode)
4020 - throw CImgArgumentException("cimg::fopen() : File '%s' cannot be opened with mode '%s'.",
4021 - path?path:"(null)",mode?mode:"(null)");
4022 - if (path[0]=='-') return (mode[0]=='r')?stdin:stdout;
4023 - std::FILE *dest = std::fopen(path,mode);
4024 - if (!dest)
4025 - throw CImgIOException("cimg::fopen() : File '%s' cannot be opened%s",
4026 - path,mode[0]=='r'?" for reading.":(mode[0]=='w'?" for writing.":"."),path);
4027 - return dest;
4028 - }
4029 -
4030 - inline int fclose(std::FILE *file) {
4031 - warn(!file,"cimg::fclose() : Can't close (null) file");
4032 - if (!file || file==stdin || file==stdout) return 0;
4033 - const int errn=std::fclose(file);
4034 - warn(errn!=0,"cimg::fclose() : Error %d during file closing",errn);
4035 - return errn;
4036 - }
4037 -
4038 - template<typename T> inline int fread(T *const ptr, const unsigned int nmemb, std::FILE *stream) {
4039 - if (!ptr || nmemb<=0 || !stream)
4040 - throw CImgArgumentException("cimg::fread() : Can't read %u x %u bytes of file pointer '%p' in buffer '%p'",
4041 - nmemb,sizeof(T),stream,ptr);
4042 - const unsigned long wlimitT = 63*1024*1024, wlimit = wlimitT/sizeof(T);
4043 - unsigned int toread=nmemb, alread=0, ltoread=0, lalread=0;
4044 - do {
4045 - ltoread = (toread*sizeof(T))<wlimitT?toread:wlimit;
4046 - lalread = (unsigned int)std::fread((void*)(ptr+alread),sizeof(T),ltoread,stream);
4047 - alread+=lalread;
4048 - toread-=lalread;
4049 - } while (ltoread==lalread && toread>0);
4050 - cimg::warn(toread>0,"cimg::fread() : File reading problems, only %u/%u elements read",alread,nmemb);
4051 - return alread;
4052 - }
4053 -
4054 - template<typename T> inline int fwrite(const T *ptr, const unsigned int nmemb, std::FILE *stream) {
4055 - if (!ptr || !stream)
4056 - throw CImgArgumentException("cimg::fwrite() : Can't write %u x %u bytes of file pointer '%p' from buffer '%p'",
4057 - nmemb,sizeof(T),stream,ptr);
4058 - if (nmemb<=0) return 0;
4059 - const unsigned long wlimitT = 63*1024*1024, wlimit = wlimitT/sizeof(T);
4060 - unsigned int towrite=nmemb, alwrite=0, ltowrite=0, lalwrite=0;
4061 - do {
4062 - ltowrite = (towrite*sizeof(T))<wlimitT?towrite:wlimit;
4063 - lalwrite = (unsigned int)std::fwrite((void*)(ptr+alwrite),sizeof(T),ltowrite,stream);
4064 - alwrite+=lalwrite;
4065 - towrite-=lalwrite;
4066 - } while (ltowrite==lalwrite && towrite>0);
4067 - cimg::warn(towrite>0,"cimg::fwrite() : File writing problems, only %u/%u elements written",alwrite,nmemb);
4068 - return alwrite;
4069 - }
4070 -
4071 - // Exchange the values of variables \p a and \p b
4072 - template<typename T> inline void swap(T& a,T& b) { T t=a; a=b; b=t; }
4073 - template<typename T1,typename T2> inline void swap(T1& a1,T1& b1,T2& a2,T2& b2) {
4074 - cimg::swap(a1,b1); cimg::swap(a2,b2);
4075 - }
4076 - template<typename T1,typename T2,typename T3> inline void swap(T1& a1,T1& b1,T2& a2,T2& b2,T3& a3,T3& b3) {
4077 - cimg::swap(a1,b1,a2,b2); cimg::swap(a3,b3);
4078 - }
4079 - template<typename T1,typename T2,typename T3,typename T4>
4080 - inline void swap(T1& a1,T1& b1,T2& a2,T2& b2,T3& a3,T3& b3,T4& a4,T4& b4) {
4081 - cimg::swap(a1,b1,a2,b2,a3,b3); cimg::swap(a4,b4);
4082 - }
4083 - template<typename T1,typename T2,typename T3,typename T4,typename T5>
4084 - inline void swap(T1& a1,T1& b1,T2& a2,T2& b2,T3& a3,T3& b3,T4& a4,T4& b4,T5& a5,T5& b5) {
4085 - cimg::swap(a1,b1,a2,b2,a3,b3,a4,b4); cimg::swap(a5,b5);
4086 - }
4087 - template<typename T1,typename T2,typename T3,typename T4,typename T5,typename T6>
4088 - inline void swap(T1& a1,T1& b1,T2& a2,T2& b2,T3& a3,T3& b3,T4& a4,T4& b4,T5& a5,T5& b5,T6& a6,T6& b6) {
4089 - cimg::swap(a1,b1,a2,b2,a3,b3,a4,b4,a5,b5); cimg::swap(a6,b6);
4090 - }
4091 -
4092 - template<typename T> inline void endian_swap(T* const buffer, const unsigned int size) {
4093 - switch (sizeof(T)) {
4094 - case 1: break;
4095 - case 2: {
4096 - for (unsigned short *ptr = (unsigned short*)buffer+size; ptr>(unsigned short*)buffer;) {
4097 - const unsigned short val = *(--ptr);
4098 - *ptr = (val>>8)|((val<<8));
4099 - }
4100 - } break;
4101 - case 4: {
4102 - for (unsigned int *ptr = (unsigned int*)buffer+size; ptr>(unsigned int*)buffer;) {
4103 - const unsigned int val = *(--ptr);
4104 - *ptr = (val>>24)|((val>>8)&0xff00)|((val<<8)&0xff0000)|(val<<24);
4105 - }
4106 - } break;
4107 - default: {
4108 - for (T* ptr = buffer+size; ptr>buffer; --ptr) {
4109 - unsigned char *pb=(unsigned char*)(--ptr), *pe=pb+sizeof(T);
4110 - for (int i=0; i<(int)sizeof(T)/2; i++) cimg::swap(*(pb++),*(--pe));
4111 - } break;
4112 - }
4113 - }
4114 - }
4115 - template<typename T> inline T& endian_swap(T& a) { endian_swap(&a,1); return a; }
4116 -
4117 - inline const char* option(const char *const name, const int argc, char **argv,
4118 - const char *defaut, const char *const usage=0) {
4119 - static bool first=true, visu=false;
4120 - const char *res = 0;
4121 - if (first) {
4122 - first=false;
4123 - visu = (cimg::option("-h",argc,argv,(char*)0)!=0);
4124 - visu |= (cimg::option("-help",argc,argv,(char*)0)!=0);
4125 - visu |= (cimg::option("--help",argc,argv,(char*)0)!=0);
4126 - }
4127 - if (!name && visu) {
4128 - if (usage) {
4129 - std::fprintf(stderr,"\n %s%s%s",cimg::t_red,cimg::basename(argv[0]),cimg::t_normal);
4130 - std::fprintf(stderr," : %s",usage);
4131 - std::fprintf(stderr," (%s, %s)\n\n",__DATE__,__TIME__);
4132 - }
4133 - if (defaut) std::fprintf(stderr,"%s\n",defaut);
4134 - }
4135 - if (name) {
4136 - if (argc>0) {
4137 - int k=0;
4138 - while (k<argc && cimg::strcmp(argv[k],name)) k++;
4139 - res=(k++==argc?defaut:(k==argc?argv[--k]:argv[k]));
4140 - } else res = defaut;
4141 - if (visu && usage) std::fprintf(stderr," %s%-8s%s = %-12s : %s%s%s\n",
4142 - cimg::t_bold,name,cimg::t_normal,res?res:"0",cimg::t_purple,usage,cimg::t_normal);
4143 - }
4144 - return res;
4145 - }
4146 -
4147 - inline bool option(const char *const name, const int argc, char **argv,
4148 - const bool defaut, const char *const usage=0) {
4149 - const char *s = cimg::option(name,argc,argv,(char*)0);
4150 - const bool res = s?(cimg::strcasecmp(s,"false") && cimg::strcasecmp(s,"off") && cimg::strcasecmp(s,"0")):defaut;
4151 - cimg::option(name,0,0,res?"true":"false",usage);
4152 - return res;
4153 - }
4154 -
4155 - inline int option(const char *const name, const int argc, char **argv,
4156 - const int defaut, const char *const usage=0) {
4157 - const char *s = cimg::option(name,argc,argv,(char*)0);
4158 - const int res = s?std::atoi(s):defaut;
4159 - char tmp[256];
4160 - std::sprintf(tmp,"%d",res);
4161 - cimg::option(name,0,0,tmp,usage);
4162 - return res;
4163 - }
4164 -
4165 - inline char option(const char *const name, const int argc, char **argv,
4166 - const char defaut, const char *const usage=0) {
4167 - const char *s = cimg::option(name,argc,argv,(char*)0);
4168 - const char res = s?s[0]:defaut;
4169 - char tmp[8];
4170 - tmp[0] = res;
4171 - tmp[1] ='\0';
4172 - cimg::option(name,0,0,tmp,usage);
4173 - return res;
4174 - }
4175 -
4176 - inline float option(const char *const name, const int argc, char **argv,
4177 - const float defaut, const char *const usage=0) {
4178 - const char *s = cimg::option(name,argc,argv,(char*)0);
4179 - const float res = s?cimg::atof(s):defaut;
4180 - char tmp[256];
4181 - std::sprintf(tmp,"%g",res);
4182 - cimg::option(name,0,0,tmp,usage);
4183 - return res;
4184 - }
4185 -
4186 - inline double option(const char *const name, const int argc, char **argv,
4187 - const double defaut, const char *const usage=0) {
4188 - const char *s = cimg::option(name,argc,argv,(char*)0);
4189 - const double res = s?cimg::atof(s):defaut;
4190 - char tmp[256];
4191 - std::sprintf(tmp,"%g",res);
4192 - cimg::option(name,0,0,tmp,usage);
4193 - return res;
4194 - }
4195 -
4196 - //! Return \c false for little endian CPUs (Intel), \c true for big endian CPUs (Motorola).
4197 - inline bool endian() {
4198 - const int x=1;
4199 - return ((unsigned char*)&x)[0]?false:true;
4200 - }
4201 -
4202 - //! Print informations about %CImg environement variables.
4203 - /**
4204 - Printing is done on the standart error output.
4205 - **/
4206 - inline void info() {
4207 - char tmp[1024] = {0};
4208 - std::fprintf(stderr,"\n %sCImg Library %g%s, compiled %s ( %s ) with the following flags :\n\n",
4209 - cimg::t_red,cimg_version,cimg::t_normal,__DATE__,__TIME__);
4210 -
4211 - std::fprintf(stderr," > CPU endianness : %s%s Endian%s\n",
4212 - cimg::t_bold,
4213 - cimg::endian()?"Big":"Little",
4214 - cimg::t_normal);
4215 -
4216 - std::fprintf(stderr," > Operating System : %s%-13s%s %s('cimg_OS'=%d)%s\n",
4217 - cimg::t_bold,
4218 - cimg_OS==1?"Unix":(cimg_OS==2?"Windows":"Unknow"),
4219 - cimg::t_normal,cimg::t_purple,
4220 - cimg_OS,
4221 - cimg::t_normal);
4222 -
4223 -#ifdef cimg_use_visualcpp6
4224 - std::fprintf(stderr," > Using Visual C++ 6.0 : %s%-13s%s %s('cimg_use_visual_cpp6' defined)%s\n",
4225 - cimg::t_bold,"Yes",cimg::t_normal,cimg::t_purple,cimg::t_normal);
4226 -#endif
4227 -
4228 - std::fprintf(stderr," > Display type : %s%-13s%s %s('cimg_display_type'=%d)%s\n",
4229 - cimg::t_bold,
4230 - cimg_display_type==0?"No display":(cimg_display_type==1?"X11":(cimg_display_type==2?"Windows GDI":"Unknow")),
4231 - cimg::t_normal,cimg::t_purple,
4232 - cimg_display_type,
4233 - cimg::t_normal);
4234 -
4235 - std::fprintf(stderr," > Color terminal : %s%-13s%s %s('cimg_color_terminal' %s)%s\n",
4236 - cimg::t_bold,
4237 -#ifdef cimg_color_terminal
4238 - "Yes",cimg::t_normal,cimg::t_purple,"defined",
4239 -#else
4240 - "No",cimg::t_normal,cimg::t_purple,"undefined",
4241 -#endif
4242 - cimg::t_normal);
4243 -
4244 - std::fprintf(stderr," > Debug messages : %s%-13s%s %s('cimg_debug'=%d)%s\n",
4245 - cimg::t_bold,
4246 - cimg_debug==0?"No":(cimg_debug==1 || cimg_debug==2?"Yes":(cimg_debug==3?"Yes+":"Unknown")),
4247 - cimg::t_normal,cimg::t_purple,
4248 - cimg_debug,
4249 - cimg::t_normal);
4250 -
4251 -#if cimg_display_type==1
4252 - std::fprintf(stderr," > Using XShm for X11 : %s%-13s%s %s('cimg_use_xshm' %s)%s\n",
4253 - cimg::t_bold,
4254 -#ifdef cimg_use_xshm
4255 - "Yes",cimg::t_normal,cimg::t_purple,"defined",
4256 -#else
4257 - "No",cimg::t_normal,cimg::t_purple,"undefined",
4258 -#endif
4259 - cimg::t_normal);
4260 -
4261 - std::fprintf(stderr," > Using XRand for X11 : %s%-13s%s %s('cimg_use_xrandr' %s)%s\n",
4262 - cimg::t_bold,
4263 -#ifdef cimg_use_xrandr
4264 - "Yes",cimg::t_normal,cimg::t_purple,"defined",
4265 -#else
4266 - "No",cimg::t_normal,cimg::t_purple,"undefined",
4267 -#endif
4268 - cimg::t_normal);
4269 -#endif
4270 -
4271 - std::fprintf(stderr," > Using PNG library : %s%-13s%s %s('cimg_use_png' %s)%s\n",
4272 - cimg::t_bold,
4273 -#ifdef cimg_use_png
4274 - "Yes",cimg::t_normal,cimg::t_purple,"defined",
4275 -#else
4276 - "No",cimg::t_normal,cimg::t_purple,"undefined",
4277 -#endif
4278 - cimg::t_normal);
4279 - std::fprintf(stderr," > Using JPEG library : %s%-13s%s %s('cimg_use_jpeg' %s)%s\n",
4280 - cimg::t_bold,
4281 -#ifdef cimg_use_jpeg
4282 - "Yes",cimg::t_normal,cimg::t_purple,"defined",
4283 -#else
4284 - "No",cimg::t_normal,cimg::t_purple,"undefined",
4285 -#endif
4286 - cimg::t_normal);
4287 -
4288 - std::fprintf(stderr," > Using TIFF library : %s%-13s%s %s('cimg_use_tiff' %s)%s\n",
4289 - cimg::t_bold,
4290 -#ifdef cimg_use_tiff
4291 - "Yes",cimg::t_normal,cimg::t_purple,"defined",
4292 -#else
4293 - "No",cimg::t_normal,cimg::t_purple,"undefined",
4294 -#endif
4295 - cimg::t_normal);
4296 -
4297 - std::fprintf(stderr," > Using Magick++ library : %s%-13s%s %s('cimg_use_magick' %s)%s\n",
4298 - cimg::t_bold,
4299 -#ifdef cimg_use_magick
4300 - "Yes",cimg::t_normal,cimg::t_purple,"defined",
4301 -#else
4302 - "No",cimg::t_normal,cimg::t_purple,"undefined",
4303 -#endif
4304 - cimg::t_normal);
4305 -
4306 - std::fprintf(stderr," > Using FFTW3 library : %s%-13s%s %s('cimg_use_fftw3' %s)%s\n",
4307 - cimg::t_bold,
4308 -#ifdef cimg_use_fftw3
4309 - "Yes",cimg::t_normal,cimg::t_purple,"defined",
4310 -#else
4311 - "No",cimg::t_normal,cimg::t_purple,"undefined",
4312 -#endif
4313 - cimg::t_normal);
4314 -
4315 - std::sprintf(tmp,"\"%.1020s\"",cimg::imagemagick_path());
4316 - std::fprintf(stderr," > Path of ImageMagick : %s%-13s%s %s('cimg_imagemagick_path'%s)%s\n",
4317 - cimg::t_bold,
4318 - tmp,
4319 - cimg::t_normal,
4320 -#ifdef cimg_imagemagick_path
4321 - cimg::t_purple,"=\""cimg_imagemagick_path"\"",
4322 -#else
4323 - cimg::t_purple," undefined",
4324 -#endif
4325 - cimg::t_normal);
4326 -
4327 - std::sprintf(tmp,"\"%.1020s\"",cimg::graphicsmagick_path());
4328 - std::fprintf(stderr," > Path of GraphicsMagick : %s%-13s%s %s('cimg_graphicsmagick_path'%s)%s\n",
4329 - cimg::t_bold,
4330 - tmp,
4331 - cimg::t_normal,
4332 -#ifdef cimg_graphicsmagick_path
4333 - cimg::t_purple,"=\""cimg_graphicsmagick_path"\"",
4334 -#else
4335 - cimg::t_purple," undefined",
4336 -#endif
4337 - cimg::t_normal);
4338 -
4339 - std::sprintf(tmp,"\"%.1020s\"",cimg::medcon_path());
4340 - std::fprintf(stderr," > Path of 'medcon' : %s%-13s%s %s('cimg_medcon_path'%s)%s\n",
4341 - cimg::t_bold,
4342 - tmp,
4343 - cimg::t_normal,
4344 -#ifdef cimg_medcon_path
4345 - cimg::t_purple,"=\""cimg_medcon_path"\"",
4346 -#else
4347 - cimg::t_purple," undefined",
4348 -#endif
4349 - cimg::t_normal);
4350 -
4351 - std::sprintf(tmp,"\"%.1020s\"",cimg::temporary_path());
4352 - std::fprintf(stderr," > Temporary path : %s%-13s%s %s('cimg_temporary_path'%s)%s\n",
4353 - cimg::t_bold,
4354 - tmp,
4355 - cimg::t_normal,
4356 -#ifdef cimg_temporary_path
4357 - cimg::t_purple,"=\""cimg_temporary_path"\"",
4358 -#else
4359 - cimg::t_purple," undefined",
4360 -#endif
4361 - cimg::t_normal);
4362 -
4363 - std::fprintf(stderr,"\n");
4364 - }
4365 -
4366 - //! Get the value of a system timer with a millisecond precision.
4367 - inline unsigned long time() {
4368 -#if cimg_OS==1
4369 - struct timeval st_time;
4370 - gettimeofday(&st_time,0);
4371 - return (unsigned long)(st_time.tv_usec/1000 + st_time.tv_sec*1000);
4372 -#elif cimg_OS==2
4373 - static SYSTEMTIME st_time;
4374 - GetSystemTime(&st_time);
4375 - return (unsigned long)(st_time.wMilliseconds + 1000*(st_time.wSecond + 60*(st_time.wMinute + 60*st_time.wHour)));
4376 -#else
4377 - return 0;
4378 -#endif
4379 - }
4380 -
4381 - //! Sleep for a certain numbers of milliseconds.
4382 - /**
4383 - This function frees the CPU ressources during the sleeping time.
4384 - It may be used to temporize your program properly, without wasting CPU time.
4385 - \sa wait(), time().
4386 - **/
4387 - inline void sleep(const unsigned int milliseconds) {
4388 -#if cimg_OS==1
4389 - struct timespec tv;
4390 - tv.tv_sec = milliseconds/1000;
4391 - tv.tv_nsec = (milliseconds%1000)*1000000;
4392 - nanosleep(&tv,0);
4393 -#elif cimg_OS==2
4394 - Sleep(milliseconds);
4395 -#endif
4396 - }
4397 -
4398 - inline unsigned int wait(const unsigned int milliseconds, unsigned long& timer) {
4399 - if (!timer) timer = cimg::time();
4400 - const unsigned long current_time = cimg::time();
4401 - if (current_time>=timer+milliseconds) { timer = current_time; return 0; }
4402 - const unsigned long time_diff = timer + milliseconds - current_time;
4403 - timer = current_time + time_diff;
4404 - cimg::sleep(time_diff);
4405 - return (unsigned int)time_diff;
4406 - }
4407 -
4408 - //! Wait for a certain number of milliseconds since the last call.
4409 - /**
4410 - This function is equivalent to sleep() but the waiting time is computed with regard to the last call
4411 - of wait(). It may be used to temporize your program properly.
4412 - \sa sleep(), time().
4413 - **/
4414 - inline unsigned int wait(const unsigned int milliseconds) {
4415 - static unsigned long timer = 0;
4416 - if (!timer) timer = cimg::time();
4417 - return wait(milliseconds,timer);
4418 - }
4419 -
4420 - template<typename T> inline const T rol(const T& a, const unsigned int n=1) {
4421 - return (T)((a<<n)|(a>>((sizeof(T)<<3)-n)));
4422 - }
4423 -
4424 - template<typename T> inline const T ror(const T& a, const unsigned int n=1) {
4425 - return (T)((a>>n)|(a<<((sizeof(T)<<3)-n)));
4426 - }
4427 -
4428 - //! Return the absolute value of \p a
4429 - template<typename T> inline T abs(const T a) { return a>=0?a:-a; }
4430 - inline bool abs(const bool a) { return a; }
4431 - inline unsigned char abs(const unsigned char a) { return a; }
4432 - inline unsigned short abs(const unsigned short a) { return a; }
4433 - inline unsigned int abs(const unsigned int a) { return a; }
4434 - inline unsigned long abs(const unsigned long a) { return a; }
4435 - inline double abs(const double a) { return std::fabs(a); }
4436 - inline float abs(const float a) { return (float)std::fabs((double)a); }
4437 - inline int abs(const int a) { return std::abs(a); }
4438 -
4439 - //! Return the minimum between \p a and \p b.
4440 - template<typename T> inline const T min(const T a,const T b) { return a<=b?a:b; }
4441 -
4442 - //! Return the minimum between \p a,\p b and \a c.
4443 - template<typename T> inline const T min(const T a,const T b,const T c) { return cimg::min(cimg::min(a,b),c); }
4444 -
4445 - //! Return the minimum between \p a,\p b,\p c and \p d.
4446 - template<typename T> inline const T min(const T a,const T b,const T c,const T d) { return cimg::min(cimg::min(a,b,c),d); }
4447 -
4448 - //! Return the maximum between \p a and \p b.
4449 - template<typename T> inline const T max(const T a,const T b) { return a>=b?a:b; }
4450 -
4451 - //! Return the maximum between \p a,\p b and \p c.
4452 - template<typename T> inline const T max(const T a,const T b,const T c) { return cimg::max(cimg::max(a,b),c); }
4453 -
4454 - //! Return the maximum between \p a,\p b,\p c and \p d.
4455 - template<typename T> inline const T max(const T a,const T b,const T c,const T d) { return cimg::max(cimg::max(a,b,c),d); }
4456 -
4457 - //! Return the sign of \p x.
4458 - template<typename T> inline T sign(const T x) { return (x<0)?(T)(-1):(x==0?(T)0:(T)1); }
4459 -
4460 - //! Return the nearest power of 2 higher than \p x.
4461 - template<typename T> inline unsigned long nearest_pow2(const T& x) {
4462 - unsigned long i=1;
4463 - while (x>i) i<<=1;
4464 - return i;
4465 - }
4466 -
4467 - //! Return \p x modulo \p m (generic modulo).
4468 - /**
4469 - This modulo function accepts negative and floating-points modulo numbers \p m.
4470 - **/
4471 - inline double mod(const double x, const double m) { return x-m*std::floor(x/m); }
4472 - inline float mod(const float x, const float m) { return (float)(x-m*std::floor((double)x/m)); }
4473 - inline int mod(const int x, const int m) { return x>=0?x%m:(x%m?m+x%m:0); }
4474 -
4475 - //! Return minmod(\p a,\p b).
4476 - /**
4477 - The operator minmod(\p a,\p b) is defined to be :
4478 - - minmod(\p a,\p b) = min(\p a,\p b), if (\p a * \p b)>0.
4479 - - minmod(\p a,\p b) = 0, if (\p a * \p b)<=0
4480 - **/
4481 - template<typename T> inline T minmod(const T& a,const T& b) { return a*b<=0?0:(a>0?(a<b?a:b):(a<b?b:a)); }
4482 -
4483 - //! Return a random variable between [0,1], followin a uniform distribution.
4484 - inline double rand() { return (double)std::rand()/RAND_MAX; }
4485 -
4486 - //! Return a random variable between [-1,1], following a uniform distribution.
4487 - inline double crand() { return 1-2*cimg::rand(); }
4488 -
4489 - //! Return a random variable following a gaussian distribution and a standard deviation of 1.
4490 - inline double grand() {
4491 - return std::sqrt(-2*std::log((double)(1e-10 + (1-2e-10)*cimg::rand())))*std::cos((double)(2*PI*cimg::rand()));
4492 - }
4493 -
4494 - inline double pythagore(double a, double b) {
4495 - const double absa = cimg::abs(a), absb = cimg::abs(b);
4496 - if (absa>absb) { const double tmp = absb/absa; return absa*std::sqrt(1.0+tmp*tmp); }
4497 - else { const double tmp = absa/absb; return (absb==0?0:absb*std::sqrt(1.0+tmp*tmp)); }
4498 - }
4499 -
4500 - // End of the 'cimg' namespace
4501 - }
4502 -
4503 - /*
4504 - #----------------------------------------
4505 - #
4506 - #
4507 - #
4508 - # Definition of the CImgStats structure
4509 - #
4510 - #
4511 - #
4512 - #----------------------------------------
4513 - */
4514 - //! Class used to compute basic statistics on pixel values of a \ref CImg image.
4515 - /**
4516 - Constructing a CImgStats instance from an image CImg<T> or a list CImgList<T>
4517 - will compute the minimum, maximum and average pixel values of the input object.
4518 - Optionally, the variance of the pixel values can be computed.
4519 - Coordinates of the pixels whose values are minimum and maximum are also stored.
4520 - The example below shows how to use CImgStats objects to retrieve simple statistics of an image :
4521 - \code
4522 - const CImg<float> img("my_image.jpg"); // Read JPEG image file.
4523 - const CImgStats stats(img); // Compute basic statistics on the image.
4524 - stats.print("My statistics"); // Display statistics.
4525 - std::printf("Max-Min = %lf",stats.max-stats.min); // Compute the difference between extremum values.
4526 - \endcode
4527 -
4528 - Note that statistics are computed by considering the set of \a scalar values of the image pixels.
4529 - No vector-valued statistics are computed.
4530 - **/
4531 - struct CImgStats {
4532 - double min; //!< Minimum of the pixel values.
4533 - double max; //!< Maximum of the pixel values.
4534 - double mean; //!< Mean of the pixel values.
4535 - double variance; //!< Variance of the pixel values.
4536 - int xmin; //!< X-coordinate of the pixel with minimum value.
4537 - int ymin; //!< Y-coordinate of the pixel with minimum value.
4538 - int zmin; //!< Z-coordinate of the pixel with minimum value.
4539 - int vmin; //!< V-coordinate of the pixel with minimum value.
4540 - int lmin; //!< Image number (for a list) containing the minimum pixel.
4541 - int xmax; //!< X-coordinate of the pixel with maximum value.
4542 - int ymax; //!< Y-coordinate of the pixel with maximum value.
4543 - int zmax; //!< Z-coordinate of the pixel with maximum value.
4544 - int vmax; //!< V-coordinate of the pixel with maximum value.
4545 - int lmax; //!< Image number (for a list) containing the maximum pixel.
4546 -
4547 -#ifdef cimgstats_plugin
4548 -#include cimgstats_plugin
4549 -#endif
4550 -
4551 - //! Default constructor.
4552 - CImgStats():min(0),max(0),mean(0),variance(0),xmin(-1),ymin(-1),zmin(-1),vmin(-1),lmin(-1),
4553 - xmax(-1),ymax(-1),zmax(-1),vmax(-1),lmax(-1) {}
4554 -
4555 - //! In-place version of the default constructor
4556 - CImgStats& assign() {
4557 - min = max = mean = variance = 0;
4558 - xmin = ymin = zmin = vmin = lmin = xmax = ymax = zmax = vmax = lmax = -1;
4559 - return *this;
4560 - }
4561 -
4562 - //! Copy constructor.
4563 - CImgStats(const CImgStats& stats) {
4564 - assign(stats);
4565 - };
4566 -
4567 - //! In-place version of the copy constructor.
4568 - CImgStats& assign(const CImgStats& stats) {
4569 - min = stats.min;
4570 - max = stats.max;
4571 - mean = stats.mean;
4572 - variance = stats.variance;
4573 - xmin = stats.xmin; ymin = stats.ymin; zmin = stats.zmin; vmin = stats.vmin; lmin = stats.lmin;
4574 - xmax = stats.xmax; ymax = stats.ymax; zmax = stats.zmax; vmax = stats.vmax; lmax = stats.lmax;
4575 - return *this;
4576 - }
4577 -
4578 - //! Constructor that computes statistics of an input image \p img.
4579 - /**
4580 - \param img The input image.
4581 - \param compute_variance If true, the \c variance field is computed, else it is set to 0.
4582 - **/
4583 - template<typename T> CImgStats(const CImg<T>& img, const bool compute_variance=true) {
4584 - assign(img,compute_variance);
4585 - }
4586 -
4587 - //! In-place version of the previous constructor.
4588 - template<typename T> CImgStats& assign(const CImg<T>& img, const bool compute_variance=true) {
4589 - if (img.is_empty())
4590 - throw CImgArgumentException("CImgStats::CImgStats() : Specified input image (%u,%u,%u,%u,%p) is empty.",
4591 - img.width,img.height,img.depth,img.dim,img.data);
4592 - mean = variance = 0;
4593 - lmin = lmax = -1;
4594 - T pmin=img[0], pmax=pmin, *ptrmin=img.data, *ptrmax=ptrmin;
4595 - cimg_for(img,ptr,T) {
4596 - const T& a=*ptr;
4597 - mean+=(double)a;
4598 - if (a<pmin) { pmin=a; ptrmin = ptr; }
4599 - if (a>pmax) { pmax=a; ptrmax = ptr; }
4600 - }
4601 - mean/=img.size();
4602 - min=(double)pmin;
4603 - max=(double)pmax;
4604 - unsigned long offmin = (unsigned long)(ptrmin-img.data), offmax = (unsigned long)(ptrmax-img.data);
4605 - const unsigned long whz = img.width*img.height*img.depth, wh = img.width*img.height;
4606 - vmin = offmin/whz; offmin%=whz; zmin = offmin/wh; offmin%=wh; ymin = offmin/img.width; xmin = offmin%img.width;
4607 - vmax = offmax/whz; offmax%=whz; zmax = offmax/wh; offmax%=wh; ymax = offmax/img.width; xmax = offmax%img.width;
4608 - if (compute_variance) {
4609 - cimg_for(img,ptr,T) { const double tmpf=(*ptr)-mean; variance+=tmpf*tmpf; }
4610 - const unsigned int siz = img.size();
4611 - if (siz>1) variance/=(siz-1); else variance=0;
4612 - }
4613 - return *this;
4614 - }
4615 -
4616 - //! Constructor that computes statistics of an input image list \p list.
4617 - /**
4618 - \param list The input list of images.
4619 - \param compute_variance If true, the \c variance field is computed, else it is set to 0.
4620 - **/
4621 - template<typename T> CImgStats(const CImgList<T>& list, const bool compute_variance=true) {
4622 - assign(list,compute_variance);
4623 - }
4624 -
4625 - //! In-place version of the previous constructor.
4626 - template<typename T> CImgStats& assign(const CImgList<T>& list,const bool compute_variance=true) {
4627 - if (list.is_empty())
4628 - throw CImgArgumentException("CImgStats::CImgStats() : Specified input list (%u,%p) is empty.",
4629 - list.size,list.data);
4630 - mean = variance = lmin = lmax = 0;
4631 - T pmin = list[0][0], pmax = pmin, *ptrmin = list[0].data, *ptrmax = ptrmin;
4632 - int psize = 0;
4633 - cimglist_for(list,l) {
4634 - cimg_for(list[l],ptr,T) {
4635 - const T& a=*ptr;
4636 - mean+=(double)a;
4637 - if (a<pmin) { pmin=a; ptrmin = ptr; lmin = l; }
4638 - if (a>pmax) { pmax=a; ptrmax = ptr; lmax = l; }
4639 - }
4640 - psize+=list[l].size();
4641 - }
4642 - mean/=psize;
4643 - min=(double)pmin;
4644 - max=(double)pmax;
4645 - const CImg<T> &imin = list[lmin], &imax = list[lmax];
4646 - unsigned long offmin = (ptrmin-imin.data), offmax = (ptrmax-imax.data);
4647 - const unsigned long whz1 = imin.width*imin.height*imin.depth, wh1 = imin.width*imin.height;
4648 - vmin = offmin/whz1; offmin%=whz1; zmin = offmin/wh1; offmin%=wh1; ymin = offmin/imin.width; xmin = offmin%imin.width;
4649 - const unsigned long whz2 = imax.width*imax.height*imax.depth, wh2 = imax.width*imax.height;
4650 - vmax = offmax/whz2; offmax%=whz2; zmax = offmax/wh2; offmax%=wh2; ymax = offmax/imax.width; xmax = offmax%imax.width;
4651 - if (compute_variance) {
4652 - cimglist_for(list,l) cimg_for(list[l],ptr,T) { const double tmpf=(*ptr)-mean; variance+=tmpf*tmpf; }
4653 - if (psize>1) variance/=(psize-1); else variance=0;
4654 - }
4655 - return *this;
4656 - }
4657 -
4658 - //! Assignement operator.
4659 - CImgStats& operator=(const CImgStats& stats) {
4660 - return assign(stats);
4661 - }
4662 -
4663 - //! Return true if the current instance contains valid statistics
4664 - bool is_empty() const {
4665 - return (xmin>=0 && ymin>=0 && zmin>=0 && vmin>=0 && xmax>=0 && ymax>=0 && zmax>=0 && vmax>=0);
4666 - }
4667 -
4668 - //! Print the current statistics.
4669 - /**
4670 - Printing is done on the standart error output.
4671 - **/
4672 - const CImgStats& print(const char* title=0) const {
4673 - if (lmin>=0 && lmax>=0)
4674 - std::fprintf(stderr,"%-8s(this=%p) : { min=%g, mean=%g [var=%g], max=%g, "
4675 - "pmin=[%d](%d,%d,%d,%d), pmax=[%d](%d,%d,%d,%d) }\n",
4676 - title?title:"CImgStats",(void*)this,min,mean,variance,max,
4677 - lmin,xmin,ymin,zmin,vmin,lmax,xmax,ymax,zmax,vmax);
4678 - else
4679 - std::fprintf(stderr,"%-8s(this=%p) : { min=%g, mean=%g [var=%g], max=%g, "
4680 - "pmin=(%d,%d,%d,%d), pmax=(%d,%d,%d,%d) }\n",
4681 - title?title:"CImgStats",(void*)this,min,mean,variance,max,
4682 - xmin,ymin,zmin,vmin,xmax,ymax,zmax,vmax);
4683 - return *this;
4684 - }
4685 -
4686 - };
4687 -
4688 - /*
4689 - #-------------------------------------------
4690 - #
4691 - #
4692 - #
4693 - # Definition of the CImgDisplay structure
4694 - #
4695 - #
4696 - #
4697 - #-------------------------------------------
4698 - */
4699 -
4700 - //! This class represents a window which can display \ref CImg images and handles mouse and keyboard events.
4701 - /**
4702 - Creating a \c CImgDisplay instance opens a window that can be used to display a \c CImg<T> image
4703 - of a \c CImgList<T> image list inside. When a display is created, associated window events
4704 - (such as mouse motion, keyboard and window size changes) are handled and can be easily
4705 - detected by testing specific \c CImgDisplay data fields.
4706 - See \ref cimg_displays for a complete tutorial on using the \c CImgDisplay class.
4707 - **/
4708 -
4709 - struct CImgDisplay {
4710 -
4711 - //! Width of the display
4712 - unsigned int width;
4713 -
4714 - //! Height of the display
4715 - unsigned int height;
4716 -
4717 - //! Normalization type used for the display
4718 - unsigned int normalization;
4719 -
4720 - //! Range of events detected by the display
4721 - unsigned int events;
4722 -
4723 - //! Fullscreen state of the display
4724 - bool is_fullscreen;
4725 -
4726 - //! Display title
4727 - char* title;
4728 -
4729 - //! X-pos of the display on the screen
4730 - volatile int window_x;
4731 -
4732 - //! Y-pos of the display on the screen
4733 - volatile int window_y;
4734 -
4735 - //! Width of the underlying window
4736 - volatile unsigned int window_width;
4737 -
4738 - //! Height of the underlying window
4739 - volatile unsigned int window_height;
4740 -
4741 - //! X-coordinate of the mouse pointer on the display
4742 - volatile int mouse_x;
4743 -
4744 - //! Y-coordinate of the mouse pointer on the display
4745 - volatile int mouse_y;
4746 -
4747 - //! Button state of the mouse
4748 - volatile unsigned int buttons[256];
4749 - volatile unsigned int& button;
4750 -
4751 - //! Wheel state of the mouse
4752 - volatile int wheel;
4753 -
4754 - //! Key value if pressed
4755 - volatile unsigned int& key;
4756 - volatile unsigned int keys[256];
4757 -
4758 - //! Key value if released
4759 - volatile unsigned int& released_key;
4760 - volatile unsigned int released_keys[256];
4761 -
4762 - //! Closed state of the window
4763 - volatile bool is_closed;
4764 -
4765 - //! Resized state of the window
4766 - volatile bool is_resized;
4767 -
4768 - //! Moved state of the window
4769 - volatile bool is_moved;
4770 -
4771 - //! Event state of the window
4772 - volatile bool is_event;
4773 -
4774 - float fps_fps, min, max;
4775 - unsigned long timer, fps_frames, fps_timer;
4776 -
4777 -#ifdef cimgdisplay_plugin
4778 -#include cimgdisplay_plugin
4779 -#endif
4780 -
4781 - //! Create a display window with a specified size \p pwidth x \p height.
4782 - /** \param dimw : Width of the display window.
4783 - \param dimh : Height of the display window.
4784 - \param title : Title of the display window.
4785 - \param normalization_type : Normalization type of the display window (see CImgDisplay::normalize).
4786 - \param events_type : Type of events handled by the display window.
4787 - \param fullscreen_flag : Fullscreen mode.
4788 - \param closed_flag : Initially visible mode.
4789 - A black image will be initially displayed in the display window.
4790 - **/
4791 - CImgDisplay(const unsigned int dimw, const unsigned int dimh, const char *title=0,
4792 - const unsigned int normalization_type=3, const unsigned int events_type=3,
4793 - const bool fullscreen_flag=false, const bool closed_flag=false):
4794 - width(0),height(0),normalization(0),events(0),is_fullscreen(false),title(0),
4795 - window_x(0),window_y(0),window_width(0),window_height(0),
4796 - mouse_x(0),mouse_y(0),button(*buttons),wheel(0),key(*keys),released_key(*released_keys),
4797 - is_closed(true),is_resized(false),is_moved(false),is_event(false),
4798 - min(0),max(0) {
4799 - assign(dimw,dimh,title,normalization_type,events_type,fullscreen_flag,closed_flag);
4800 - }
4801 -
4802 - //! Create a display window from an image.
4803 - /** \param img : Image that will be used to create the display window.
4804 - \param title : Title of the display window
4805 - \param normalization_type : Normalization type of the display window.
4806 - \param events_type : Type of events handled by the display window.
4807 - \param fullscreen_flag : Fullscreen mode.
4808 - \param closed_flag : Initially visible mode.
4809 - **/
4810 - template<typename T>
4811 - CImgDisplay(const CImg<T>& img, const char *title=0,
4812 - const unsigned int normalization_type=3, const unsigned int events_type=3,
4813 - const bool fullscreen_flag=false, const bool closed_flag=false):
4814 - width(0),height(0),normalization(0),events(0),is_fullscreen(false),title(0),
4815 - window_x(0),window_y(0),window_width(0),window_height(0),
4816 - mouse_x(0),mouse_y(0),button(*buttons),wheel(0),key(*keys),released_key(*released_keys),
4817 - is_closed(true),is_resized(false),is_moved(false),is_event(false),min(0),max(0) {
4818 - assign(img,title,normalization_type,events_type,fullscreen_flag,closed_flag);
4819 - }
4820 -
4821 - //! Create a display window from an image list.
4822 - /** \param list : The list of images to display.
4823 - \param title : Title of the display window
4824 - \param normalization_type : Normalization type of the display window.
4825 - \param events_type : Type of events handled by the display window.
4826 - \param fullscreen_flag : Fullscreen mode.
4827 - \param closed_flag : Initially visible mode.
4828 - **/
4829 - template<typename T>
4830 - CImgDisplay(const CImgList<T>& list,const char *title=0,
4831 - const unsigned int normalization_type=3,const unsigned int events_type=3,
4832 - const bool fullscreen_flag=false,const bool closed_flag=false):
4833 - width(0),height(0),normalization(0),events(0),is_fullscreen(false),title(0),
4834 - window_x(0),window_y(0),window_width(0),window_height(0),
4835 - mouse_x(0),mouse_y(0),button(*buttons),wheel(0),key(*keys),released_key(*released_keys),
4836 - is_closed(true),is_resized(false),is_moved(false),is_event(false),min(0),max(0) {
4837 - assign(list,title,normalization_type,events_type,fullscreen_flag,closed_flag);
4838 - }
4839 -
4840 - //! Create a display window by copying another one.
4841 - /** \param win : Display window to copy.
4842 - \param title : Title of the new display window.
4843 - **/
4844 - CImgDisplay(const CImgDisplay& disp):
4845 - width(0),height(0),normalization(0),events(0),is_fullscreen(false),title(0),
4846 - window_x(0),window_y(0),window_width(0),window_height(0),
4847 - mouse_x(0),mouse_y(0),button(*buttons),wheel(0),key(*keys),released_key(*released_keys),
4848 - is_closed(true),is_resized(false),is_moved(false),is_event(false),min(0),max(0) {
4849 - assign(disp);
4850 - }
4851 -
4852 - //! Destructor
4853 - ~CImgDisplay() {
4854 - _assign();
4855 - }
4856 -
4857 - //! Assignement operator
4858 - CImgDisplay& operator=(const CImgDisplay& disp) {
4859 - return assign(disp);
4860 - }
4861 -
4862 - //! Return display width
4863 - int dimx() const {
4864 - return (int)width;
4865 - }
4866 -
4867 - //! Return display height
4868 - int dimy() const {
4869 - return (int)height;
4870 - }
4871 -
4872 - //! Return display window width
4873 - int window_dimx() const {
4874 - return (int)window_width;
4875 - }
4876 -
4877 - //! Return display window height
4878 - int window_dimy() const {
4879 - return (int)window_height;
4880 - }
4881 -
4882 - //! Return X-coordinate of the window
4883 - int window_posx() const {
4884 - return window_x;
4885 - }
4886 -
4887 - //! Return Y-coordinate of the window
4888 - int window_posy() const {
4889 - return window_y;
4890 - }
4891 -
4892 - //! Synchronized waiting function. Same as cimg::wait().
4893 - /** \see cimg::wait()
4894 - **/
4895 - CImgDisplay& wait(const unsigned int milliseconds) {
4896 - cimg::wait(milliseconds, timer);
4897 - return *this;
4898 - }
4899 -
4900 - //! Wait for an event occuring on the current display
4901 - CImgDisplay& wait() {
4902 - wait(*this);
4903 - return *this;
4904 - }
4905 -
4906 - //! Wait for any event occuring on the display \c disp1
4907 - static void wait(CImgDisplay& disp1) {
4908 - disp1.is_event = 0;
4909 - while (!disp1.is_event) wait_all();
4910 - }
4911 -
4912 - //! Wait for any event occuring either on the display \c disp1 or \c disp2
4913 - static void wait(CImgDisplay& disp1, CImgDisplay& disp2) {
4914 - disp1.is_event = disp2.is_event = 0;
4915 - while (!disp1.is_event && !disp2.is_event) wait_all();
4916 - }
4917 -
4918 - //! Wait for any event occuring either on the display \c disp1, \c disp2 or \c disp3
4919 - static void wait(CImgDisplay& disp1, CImgDisplay& disp2, CImgDisplay& disp3) {
4920 - disp1.is_event = disp2.is_event = disp3.is_event = 0;
4921 - while (!disp1.is_event && !disp2.is_event && !disp3.is_event) wait_all();
4922 - }
4923 -
4924 - //! Wait for any event occuring either on the display \c disp1, \c disp2, \c disp3 or \c disp4
4925 - static void wait(CImgDisplay& disp1, CImgDisplay& disp2, CImgDisplay& disp3, CImgDisplay& disp4) {
4926 - disp1.is_event = disp2.is_event = disp3.is_event = disp4.is_event = 0;
4927 - while (!disp1.is_event && !disp2.is_event && !disp3.is_event && !disp4.is_event) wait_all();
4928 - }
4929 -
4930 - //! Return the frame per second rate
4931 - float frames_per_second() {
4932 - if (!fps_timer) fps_timer = cimg::time();
4933 - const float delta = (cimg::time()-fps_timer)/1000.0f;
4934 - fps_frames++;
4935 - if (delta>=1.0f) {
4936 - fps_fps = fps_frames/delta;
4937 - fps_frames = 0;
4938 - fps_timer = cimg::time();
4939 - }
4940 - return fps_fps;
4941 - }
4942 -
4943 - //! Display an image list CImgList<T> into a display window.
4944 - /** First, all images of the list are appended into a single image used for visualization,
4945 - then this image is displayed in the current display window.
4946 - \param list : The list of images to display.
4947 - \param axe : The axe used to append the image for visualization. Can be 'x' (default),'y','z' or 'v'.
4948 - \param align : Defines the relative alignment of images when displaying images of different sizes.
4949 - Can be '\p c' (centered, which is the default), '\p p' (top alignment) and '\p n' (bottom aligment).
4950 -
4951 - \see CImg::get_append()
4952 - **/
4953 - template<typename T> CImgDisplay& display(const CImgList<T>& list,const char axe='x',const char align='c') {
4954 - return display(list.get_append(axe,align));
4955 - }
4956 -
4957 - //! Display an image CImg<T> into a display window.
4958 - template<typename T> CImgDisplay& operator<<(const CImg<T>& img) {
4959 - return display(img);
4960 - }
4961 -
4962 - //! Display an image CImg<T> into a display window.
4963 - template<typename T> CImgDisplay& operator<<(const CImgList<T>& list) {
4964 - return display(list);
4965 - }
4966 -
4967 - //! Resize a display window with the size of an image.
4968 - /** \param img : Input image. \p image.width and \p image.height give the new dimensions of the display window.
4969 - \param redraw : If \p true (default), the current displayed image in the display window will
4970 - be bloc-interpolated to fit the new dimensions. If \p false, a black image will be drawn in the resized window.
4971 - \see CImgDisplay::is_resized, CImgDisplay::resizedimx(), CImgDisplay::resizedimy()
4972 - **/
4973 - template<typename T> CImgDisplay& resize(const CImg<T>& img, const bool redraw=true) {
4974 - return resize(img.width,img.height,redraw);
4975 - }
4976 -
4977 - //! Resize a display window using the size of the given display \p disp
4978 - CImgDisplay& resize(const CImgDisplay& disp, const bool redraw=true) {
4979 - return resize(disp.width,disp.height,redraw);
4980 - }
4981 -
4982 - //! Resize a display window in its current size.
4983 - CImgDisplay& resize(const bool redraw=true) {
4984 - resize(window_width,window_height,redraw);
4985 - return *this;
4986 - }
4987 -
4988 - //! Display a 3d object
4989 - template<typename tp, typename tf, typename T, typename to>
4990 - CImgDisplay& display_object3d(const tp& points, const CImgList<tf>& primitives,
4991 - const CImgList<T>& colors, const to& opacities,
4992 - const bool centering=true,
4993 - const int render_static=4, const int render_motion=1,
4994 - const bool double_sided=false,
4995 - const float focale=500.0f, const float ambiant_light=0.05f,
4996 - const bool display_axes = true, float *const pose_matrix=0) {
4997 - CImg<T>(width,height,1,3,0).display_object3d(points,primitives,colors,opacities,*this,
4998 - centering,render_static,render_motion,
4999 - double_sided,focale,ambiant_light,display_axes,pose_matrix);
5000 - return *this;
5001 - }
5002 -
5003 - //! Display a 3D object.
5004 - template<typename tp, typename tf, typename T>
5005 - CImgDisplay& display_object3d(const tp& points, const CImgList<tf>& primitives,
5006 - const CImgList<T>& colors,
5007 - const bool centering=true,
5008 - const int render_static=4, const int render_motion=1,
5009 - const bool double_sided=false,
5010 - const float focale=500.0f, const float ambiant_light=0.05f,
5011 - const float opacity=1.0f, const bool display_axes = true, float *const pose_matrix=0) {
5012 - typedef typename cimg::largest<tp,float>::type to;
5013 - CImg<T>(width,height,1,3,0).display_object3d(points,primitives,colors,
5014 - CImg<to>(primitives.size)=(to)opacity,*this,
5015 - centering,render_static,render_motion,
5016 - double_sided,focale,ambiant_light,display_axes,pose_matrix);
5017 - return *this;
5018 - }
5019 -
5020 - //! Toggle fullscreen mode
5021 - CImgDisplay& toggle_fullscreen() {
5022 - return assign(width,height,title,normalization,events,!is_fullscreen,is_closed);
5023 - }
5024 -
5025 - // Inner routine used for fast resizing of buffer to display size.
5026 - template<typename t, typename T> static void _render_resize(const T *ptrs, const unsigned int ws, const unsigned int hs,
5027 - t *ptrd, const unsigned int wd, const unsigned int hd) {
5028 - unsigned int *const offx = new unsigned int[wd], *const offy = new unsigned int[hd+1], *poffx, *poffy;
5029 - float s, curr, old;
5030 - s = (float)ws/wd;
5031 - poffx = offx; curr=0; for (unsigned int x=0; x<wd; x++) { old=curr; curr+=s; *(poffx++) = (unsigned int)curr-(unsigned int)old; }
5032 - s = (float)hs/hd;
5033 - poffy = offy; curr=0; for (unsigned int y=0; y<hd; y++) { old=curr; curr+=s; *(poffy++) = ws*((unsigned int)curr-(unsigned int)old); }
5034 - *poffy=0;
5035 - poffy = offy;
5036 - {for (unsigned int y=0; y<hd; ) {
5037 - const T *ptr = ptrs;
5038 - poffx = offx;
5039 - for (unsigned int x=0; x<wd; x++) { *(ptrd++)=*ptr; ptr+=*(poffx++); }
5040 - y++;
5041 - unsigned int dy=*(poffy++);
5042 - for (;!dy && y<hd; std::memcpy(ptrd, ptrd-wd, sizeof(t)*wd), y++, ptrd+=wd, dy=*(poffy++));
5043 - ptrs+=dy;
5044 - }}
5045 - delete[] offx; delete[] offy;
5046 - }
5047 -
5048 - //! Test if a specific key is pressed
5049 - bool is_pressed(const unsigned int key1) const {
5050 - bool pressed = false;
5051 - for (unsigned int i=0; i<256; ++i) {
5052 - if (released_keys[i]==key1) { pressed = false; break; }
5053 - if (keys[i]==key1) { pressed = true; break; }
5054 - }
5055 - return pressed;
5056 - }
5057 -
5058 - //! Test if a key sequence has been typed
5059 - bool is_typed(const unsigned int *const keyseq, const unsigned int N, const bool remove=true) {
5060 - if (keyseq && N) {
5061 - const unsigned int *const ps_end = keyseq+N-1, k = *ps_end, *const pk_end = (unsigned int*)keys+257-N;
5062 - for (unsigned int *pk = (unsigned int*)keys; pk<pk_end; ) {
5063 - if (*(pk++)==k) {
5064 - bool res = true;
5065 - const unsigned int *ps = ps_end, *pk2 = pk;
5066 - for (unsigned int i=1; i<N; ++i) res = (*(--ps)==*(pk2++));
5067 - if (res) {
5068 - if (remove) std::memset((void*)(pk-1),0,sizeof(unsigned int)*N);
5069 - return true;
5070 - }
5071 - }
5072 - }
5073 - }
5074 - return false;
5075 - }
5076 -
5077 - //! Test if a key combination has been typed
5078 - bool is_typed(const unsigned int key1, const bool remove=true) {
5079 - return is_typed(&key1,1,remove);
5080 - }
5081 -
5082 - //! Test if a key combination has been typed
5083 - bool is_typed(const unsigned int key1, const unsigned int key2, const bool remove=true) {
5084 - const unsigned int seq[2] = { key1, key2 };
5085 - return is_typed(seq,2,remove);
5086 - }
5087 -
5088 - //! Test if a key combination has been typed
5089 - bool is_typed(const unsigned int key1, const unsigned int key2, const unsigned int key3, const bool remove=true) {
5090 - const unsigned int seq[3] = { key1, key2, key3 };
5091 - return is_typed(seq,3,remove);
5092 - }
5093 -
5094 - //! Test if a key combination has been typed
5095 - bool is_typed(const unsigned int key1, const unsigned int key2, const unsigned int key3,
5096 - const unsigned int key4, const bool remove=true) {
5097 - const unsigned int seq[4] = { key1, key2, key3, key4 };
5098 - return is_typed(seq,4,remove);
5099 - }
5100 -
5101 - //! Test if a key combination has been typed
5102 - bool is_typed(const unsigned int key1, const unsigned int key2, const unsigned int key3,
5103 - const unsigned int key4, const unsigned int key5, const bool remove=true) {
5104 - const unsigned int seq[5] = { key1, key2, key3, key4,key5 };
5105 - return is_typed(seq,5,remove);
5106 - }
5107 -
5108 - //! Test if a key combination has been typed
5109 - bool is_typed(const unsigned int key1, const unsigned int key2, const unsigned int key3,
5110 - const unsigned int key4, const unsigned int key5, const unsigned int key6, const bool remove=true) {
5111 - const unsigned int seq[6] = { key1, key2, key3, key4,key5,key6 };
5112 - return is_typed(seq,6,remove);
5113 - }
5114 -
5115 - //! Test if a key combination has been typed
5116 - bool is_typed(const unsigned int key1, const unsigned int key2, const unsigned int key3,
5117 - const unsigned int key4, const unsigned int key5, const unsigned int key6,
5118 - const unsigned int key7, const bool remove=true) {
5119 - const unsigned int seq[7] = { key1, key2, key3, key4,key5,key6,key7 };
5120 - return is_typed(seq,7,remove);
5121 - }
5122 -
5123 - //! Test if a key combination has been typed
5124 - bool is_typed(const unsigned int key1, const unsigned int key2, const unsigned int key3,
5125 - const unsigned int key4, const unsigned int key5, const unsigned int key6,
5126 - const unsigned int key7, const unsigned int key8, const bool remove=true) {
5127 - const unsigned int seq[8] = { key1, key2, key3, key4,key5,key6,key7,key8 };
5128 - return is_typed(seq,8,remove);
5129 - }
5130 -
5131 - //! Test if a key combination has been typed
5132 - bool is_typed(const unsigned int key1, const unsigned int key2, const unsigned int key3,
5133 - const unsigned int key4, const unsigned int key5, const unsigned int key6,
5134 - const unsigned int key7, const unsigned int key8, const unsigned int key9, const bool remove=true) {
5135 - const unsigned int seq[9] = { key1, key2, key3, key4,key5,key6,key7,key8,key9 };
5136 - return is_typed(seq,9,remove);
5137 - }
5138 -
5139 - // When no display available
5140 - //---------------------------
5141 -#if cimg_display_type==0
5142 -
5143 - //! Return the width of the screen resolution.
5144 - static int screen_dimx() {
5145 - return 0;
5146 - }
5147 -
5148 - //! Return the height of the screen resolution.
5149 - static int screen_dimy() {
5150 - return 0;
5151 - }
5152 -
5153 - //! In-place version of the previous constructor
5154 - CImgDisplay& assign(const unsigned int dimw, const unsigned int dimh, const char *title=0,
5155 - const unsigned int normalization_type=3, const unsigned int events_type=3,
5156 - const bool fullscreen_flag=false, const bool closed_flag=false) {
5157 - throw CImgDisplayException("CImgDisplay() : Display has been required but is not available (cimg_display_type=0)");
5158 - fps_timer = 0*(unsigned long)(dimw + dimh + title + normalization_type + events_type + (int)fullscreen_flag + (int)closed_flag);
5159 - return *this;
5160 - }
5161 -
5162 - //! In-place version of the previous constructor
5163 - template<typename T> CImgDisplay& assign(const CImg<T>& img, const char *title=0,
5164 - const unsigned int normalization_type=3, const unsigned int events_type=3,
5165 - const bool fullscreen_flag=false, const bool closed_flag=false) {
5166 - fps_timer = 0*(unsigned long)(img.width + title + normalization_type + events_type + (int)fullscreen_flag + (int)closed_flag);
5167 - return assign(0,0);
5168 - }
5169 -
5170 - //! In-place version of the previous constructor
5171 - template<typename T> CImgDisplay& assign(const CImgList<T>& list, const char *title=0,
5172 - const unsigned int normalization_type=3, const unsigned int events_type=3,
5173 - const bool fullscreen_flag=false, const bool closed_flag=false) {
5174 - fps_timer = 0*(unsigned long)(list.size + title + normalization_type + events_type + (int)fullscreen_flag + (int)closed_flag);
5175 - return assign(0,0);
5176 - }
5177 -
5178 - //! In-place version of the previous constructor
5179 - CImgDisplay& assign(const CImgDisplay &disp) {
5180 - return assign(disp.width,disp.height);
5181 - }
5182 -
5183 - // In-place version of the destructor (should not be used by the user).
5184 - CImgDisplay& _assign() {
5185 - return *this;
5186 - }
5187 -
5188 - //! Display an image in a window.
5189 - template<typename T> CImgDisplay& display(const CImg<T>& img) {
5190 - fps_timer = 0*img.width;
5191 - return *this;
5192 - }
5193 -
5194 - //! Resize window
5195 - CImgDisplay& resize(const int width, const int height, const bool redraw=true) {
5196 - fps_timer = 0*width*height*(int)redraw;
5197 - return *this;
5198 - }
5199 -
5200 - //! Move window
5201 - CImgDisplay& move(const int posx, const int posy) {
5202 - fps_timer = 0*posx*posy;
5203 - return *this;
5204 - }
5205 -
5206 - //! Move mouse pointer to a specific location
5207 - CImgDisplay& set_mouse(const int posx, const int posy) {
5208 - fps_timer = 0*posx*posy;
5209 - return *this;
5210 - }
5211 -
5212 - //! Hide mouse pointer
5213 - CImgDisplay& hide_mouse() {
5214 - return *this;
5215 - }
5216 -
5217 - //! Show mouse pointer
5218 - CImgDisplay& show_mouse() {
5219 - return *this;
5220 - }
5221 -
5222 - //! Wait for a window event in any CImg window
5223 - static void wait_all() {}
5224 -
5225 - //! Show a closed display
5226 - CImgDisplay& show() {
5227 - return *this;
5228 - }
5229 -
5230 - //! Close a visible display
5231 - CImgDisplay& close() {
5232 - return *this;
5233 - }
5234 -
5235 - //! Set the window title
5236 - CImgDisplay& set_title(const char *format,...) {
5237 - fps_timer = 0*(unsigned long)format;
5238 - return *this;
5239 - }
5240 -
5241 - //! Re-paint image content in window
5242 - CImgDisplay& paint() {
5243 - return *this;
5244 - }
5245 -
5246 - //! Render image buffer into GDI native image format
5247 - template<typename T> CImgDisplay& render(const CImg<T>& img) {
5248 - fps_timer = 0*img.width;
5249 - return *this;
5250 - }
5251 -
5252 - // X11-based display
5253 - //-------------------
5254 -#elif cimg_display_type==1
5255 - void *data;
5256 - Window window;
5257 - Window background_window;
5258 - XImage *image;
5259 - Colormap colormap;
5260 - Atom wm_delete_window, wm_delete_protocol;
5261 -#ifdef cimg_use_xshm
5262 - XShmSegmentInfo *shminfo;
5263 -#endif
5264 -
5265 - static int screen_dimx() {
5266 - int res = 0;
5267 - if (!cimg::X11attr().display) {
5268 - Display *disp = XOpenDisplay((std::getenv("DISPLAY") ? std::getenv("DISPLAY") : ":0.0"));
5269 - if (!disp) throw CImgDisplayException("CImgDisplay::screen_dimx() : Can't open X11 display");
5270 - res = DisplayWidth(disp,DefaultScreen(disp));
5271 - XCloseDisplay(disp);
5272 - } else {
5273 -#ifdef cimg_use_xrandr
5274 - if (cimg::X11attr().resolutions && cimg::X11attr().curr_resolution)
5275 - res = cimg::X11attr().resolutions[cimg::X11attr().curr_resolution].width;
5276 - else
5277 -#endif
5278 - res = DisplayWidth(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display));
5279 - }
5280 - return res;
5281 - }
5282 -
5283 - static int screen_dimy() {
5284 - int res = 0;
5285 - if (!cimg::X11attr().display) {
5286 - Display *disp = XOpenDisplay((std::getenv("DISPLAY") ? std::getenv("DISPLAY") : ":0.0"));
5287 - if (!disp) throw CImgDisplayException("CImgDisplay::screen_dimy() : Can't open X11 display");
5288 - res = DisplayHeight(disp,DefaultScreen(disp));
5289 - XCloseDisplay(disp);
5290 - } else {
5291 -#ifdef cimg_use_xrandr
5292 - if (cimg::X11attr().resolutions && cimg::X11attr().curr_resolution)
5293 - res = cimg::X11attr().resolutions[cimg::X11attr().curr_resolution].height; else
5294 -#endif
5295 - res = DisplayHeight(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display));
5296 - }
5297 - return res;
5298 - }
5299 -
5300 - CImgDisplay& assign(const unsigned int dimw, const unsigned int dimh, const char *title=0,
5301 - const unsigned int normalization_type=3, const unsigned int events_type=3,
5302 - const bool fullscreen_flag=false, const bool closed_flag=false) {
5303 - if (!dimw || !dimh)
5304 - throw CImgArgumentException("CImgDisplay::assign() : Specified window size (%u,%u) is not valid.",dimw,dimh);
5305 - assign_lowlevel(dimw,dimh,title,normalization_type,events_type,fullscreen_flag,closed_flag);
5306 - min = max = 0;
5307 - std::memset(data,0,(cimg::X11attr().nb_bits==8?sizeof(unsigned char):
5308 - (cimg::X11attr().nb_bits==16?sizeof(unsigned short):sizeof(unsigned int)))*width*height);
5309 - return paint();
5310 - }
5311 -
5312 - template<typename T> CImgDisplay& assign(const CImg<T>& img, const char *title=0,
5313 - const unsigned int normalization_type=3, const unsigned int events_type=3,
5314 - const bool fullscreen_flag=false, const bool closed_flag=false) {
5315 - if (img.is_empty())
5316 - throw CImgArgumentException("CImgDisplay::CImgDisplay() : Specified input image (%u,%u,%u,%u,%p) is empty.",
5317 - img.width,img.height,img.depth,img.dim,img.data);
5318 - CImg<T> tmp;
5319 - const CImg<T>& nimg = (img.depth==1)?img:(tmp=img.get_projections2d(img.width/2,img.height/2,img.depth/2));
5320 - assign_lowlevel(nimg.width,nimg.height,title,normalization_type,events_type,fullscreen_flag,closed_flag);
5321 - if (normalization==2) { const CImgStats st(nimg,false); min = (float)st.min; max = (float)st.max; }
5322 - return render(nimg).paint();
5323 - }
5324 -
5325 - template<typename T> CImgDisplay& assign(const CImgList<T>& list, const char *title=0,
5326 - const unsigned int normalization_type=3, const unsigned int events_type=3,
5327 - const bool fullscreen_flag=false, const bool closed_flag=false) {
5328 - if (list.is_empty())
5329 - throw CImgArgumentException("CImgDisplay::CImgDisplay() : Specified input list (%u,%p) is empty.",
5330 - list.size,list.data);
5331 - CImg<T> tmp;
5332 - const CImg<T> img = list.get_append('x'),
5333 - &nimg = (img.depth==1)?img:(tmp=img.get_projections2d(img.width/2,img.height/2,img.depth/2));
5334 - assign_lowlevel(nimg.width,nimg.height,title,normalization_type,events_type,fullscreen_flag,closed_flag);
5335 - if (normalization==2) { const CImgStats st(nimg,false); min = (float)st.min; max = (float)st.max; }
5336 - return render(nimg).paint();
5337 - }
5338 -
5339 - CImgDisplay& assign(const CImgDisplay& win) {
5340 - assign_lowlevel(win.width,win.height,win.title,win.normalization,win.events,win.is_fullscreen,win.is_closed);
5341 - std::memcpy(data,win.data,(cimg::X11attr().nb_bits==8?sizeof(unsigned char):
5342 - cimg::X11attr().nb_bits==16?sizeof(unsigned short):
5343 - sizeof(unsigned int))*width*height);
5344 - return paint();
5345 - }
5346 -
5347 - CImgDisplay& _assign() {
5348 - if (width && height) {
5349 - pthread_mutex_lock(cimg::X11attr().mutex);
5350 -
5351 - // Remove display window from event thread list
5352 - unsigned int i;
5353 - for (i=0; i<cimg::X11attr().nb_wins && cimg::X11attr().wins[i]!=this; i++);
5354 - for (; i<cimg::X11attr().nb_wins-1; i++) cimg::X11attr().wins[i]=cimg::X11attr().wins[i+1];
5355 - cimg::X11attr().nb_wins--;
5356 -
5357 - // Destroy window, image, colormap and title
5358 - if (is_fullscreen) _desinit_fullscreen();
5359 - XDestroyWindow(cimg::X11attr().display,window);
5360 - window = 0;
5361 -#ifdef cimg_use_xshm
5362 - if (shminfo) {
5363 - XShmDetach(cimg::X11attr().display, shminfo);
5364 - XDestroyImage(image);
5365 - shmdt(shminfo->shmaddr);
5366 - shmctl(shminfo->shmid,IPC_RMID,0);
5367 - delete shminfo;
5368 - shminfo = 0;
5369 - } else
5370 -#endif
5371 - XDestroyImage(image);
5372 - data = 0;
5373 - image = 0;
5374 - if (cimg::X11attr().nb_bits==8) XFreeColormap(cimg::X11attr().display,colormap);
5375 - colormap = 0;
5376 - XSync(cimg::X11attr().display, False);
5377 -
5378 - // Reset display variables
5379 - if (title) delete[] title;
5380 - width = height = normalization = events = 0;
5381 - is_fullscreen = is_resized = is_moved = is_event = false;
5382 - is_closed = true;
5383 - title = 0;
5384 - window_x = window_y = window_width = window_height = mouse_x = mouse_y = wheel = 0;
5385 - std::memset((void*)buttons,0,256*sizeof(unsigned int));
5386 - std::memset((void*)keys,0,256*sizeof(unsigned int));
5387 - std::memset((void*)released_keys,0,256*sizeof(unsigned int));
5388 - min = max = 0;
5389 -
5390 - // End event thread and close display if necessary
5391 - if (!cimg::X11attr().nb_wins) {
5392 -
5393 - // Kill event thread
5394 - pthread_cancel(*cimg::X11attr().event_thread);
5395 - pthread_mutex_unlock(cimg::X11attr().mutex);
5396 - pthread_join(*cimg::X11attr().event_thread,0);
5397 - delete cimg::X11attr().event_thread;
5398 - cimg::X11attr().event_thread = 0;
5399 - pthread_mutex_destroy(cimg::X11attr().mutex);
5400 - delete cimg::X11attr().mutex;
5401 - cimg::X11attr().mutex = 0;
5402 - XSync(cimg::X11attr().display, False);
5403 - XCloseDisplay(cimg::X11attr().display);
5404 - cimg::X11attr().display=0;
5405 - delete cimg::X11attr().gc;
5406 - cimg::X11attr().gc = 0;
5407 - } else pthread_mutex_unlock(cimg::X11attr().mutex);
5408 - }
5409 - return *this;
5410 - }
5411 -
5412 - template<typename T> CImgDisplay& display(const CImg<T>& img) {
5413 - return render(img).paint(false);
5414 - }
5415 -
5416 - CImgDisplay& resize(const int nwidth, const int nheight, const bool redraw=true) {
5417 - if (!(nwidth && nheight))
5418 - throw CImgArgumentException("CImgDisplay::resize() : Specified window size (%d,%d) is not valid.",
5419 - nwidth,nheight);
5420 - const unsigned int
5421 - tmpdimx=(nwidth>0)?nwidth:(-nwidth*width/100),
5422 - tmpdimy=(nheight>0)?nheight:(-nheight*height/100),
5423 - dimx = tmpdimx?tmpdimx:1,
5424 - dimy = tmpdimy?tmpdimy:1;
5425 - const bool
5426 - is_disp_different = (width!=dimx || height!=dimy),
5427 - is_win_different = (window_width!=dimx || window_height!=dimy);
5428 - if (is_disp_different || is_win_different) {
5429 - pthread_mutex_lock(cimg::X11attr().mutex);
5430 - XResizeWindow(cimg::X11attr().display,window,dimx,dimy);
5431 - window_width = dimx;
5432 - window_height = dimy;
5433 - is_resized = false;
5434 - if (is_disp_different) {
5435 - switch (cimg::X11attr().nb_bits) {
5436 - case 8: { unsigned char foo=0; _resize(foo,dimx,dimy,redraw); } break;
5437 - case 16: { unsigned short foo=0; _resize(foo,dimx,dimy,redraw); } break;
5438 - default: { unsigned int foo=0; _resize(foo,dimx,dimy,redraw); } break;
5439 - }
5440 - width = dimx;
5441 - height = dimy;
5442 - }
5443 - pthread_mutex_unlock(cimg::X11attr().mutex);
5444 - if (is_fullscreen) move((screen_dimx()-width)/2,(screen_dimy()-height)/2);
5445 - if (redraw) return paint();
5446 - }
5447 - return *this;
5448 - }
5449 -
5450 - CImgDisplay& move(const int posx, const int posy) {
5451 - show();
5452 - pthread_mutex_lock(cimg::X11attr().mutex);
5453 - XMoveWindow(cimg::X11attr().display,window,posx,posy);
5454 - is_moved = false;
5455 - window_x = posx;
5456 - window_y = posy;
5457 - pthread_mutex_unlock(cimg::X11attr().mutex);
5458 - return paint();
5459 - }
5460 -
5461 - CImgDisplay& set_mouse(const int posx, const int posy) {
5462 - if (!is_closed && posx>=0 && posy>=0) {
5463 - pthread_mutex_lock(cimg::X11attr().mutex);
5464 - XWarpPointer(cimg::X11attr().display,None,window,0,0,0,0,posx,posy);
5465 - is_moved = false;
5466 - mouse_x = posx;
5467 - mouse_y = posy;
5468 - XSync(cimg::X11attr().display, False);
5469 - pthread_mutex_unlock(cimg::X11attr().mutex);
5470 - }
5471 - return *this;
5472 - }
5473 -
5474 - CImgDisplay& hide_mouse() {
5475 - pthread_mutex_lock(cimg::X11attr().mutex);
5476 - const char pix_data[8] = { 0 };
5477 - XColor col;
5478 - col.red = col.green = col.blue = 0;
5479 - Pixmap pix = XCreateBitmapFromData(cimg::X11attr().display,window,pix_data,8,8);
5480 - Cursor cur = XCreatePixmapCursor(cimg::X11attr().display,pix,pix,&col,&col,0,0);
5481 - XFreePixmap(cimg::X11attr().display,pix);
5482 - XDefineCursor(cimg::X11attr().display,window,cur);
5483 - pthread_mutex_unlock(cimg::X11attr().mutex);
5484 - return *this;
5485 - }
5486 -
5487 - CImgDisplay& show_mouse() {
5488 - pthread_mutex_lock(cimg::X11attr().mutex);
5489 - XDefineCursor(cimg::X11attr().display,window,None);
5490 - pthread_mutex_unlock(cimg::X11attr().mutex);
5491 - return *this;
5492 - }
5493 -
5494 - static void wait_all() {
5495 - pthread_mutex_lock(cimg::X11attr().mutex);
5496 - bool flag = true;
5497 - XEvent event;
5498 - while (flag) {
5499 - for (unsigned int i=0; i<cimg::X11attr().nb_wins; i++) {
5500 - cimg::X11attr().wins[i]->is_event = false;
5501 - const unsigned int xevent_type = (cimg::X11attr().wins[i]->events)&3;
5502 - const unsigned int emask =
5503 - ((xevent_type>=1)?ExposureMask|StructureNotifyMask:0)|
5504 - ((xevent_type>=2)?ButtonPressMask|KeyPressMask|PointerMotionMask|LeaveWindowMask:0)|
5505 - ((xevent_type>=3)?ButtonReleaseMask|KeyReleaseMask:0);
5506 - XSelectInput(cimg::X11attr().display,cimg::X11attr().wins[i]->window,emask);
5507 - }
5508 - XNextEvent(cimg::X11attr().display, &event);
5509 - for (unsigned int i=0; i<cimg::X11attr().nb_wins; i++)
5510 - if (!cimg::X11attr().wins[i]->is_closed && event.xany.window==cimg::X11attr().wins[i]->window) {
5511 - cimg::X11attr().wins[i]->_handle_events(&event);
5512 - if (cimg::X11attr().wins[i]->is_event) flag = false;
5513 - }
5514 - }
5515 - pthread_mutex_unlock(cimg::X11attr().mutex);
5516 - }
5517 -
5518 - CImgDisplay& show() {
5519 - if (is_closed) {
5520 - pthread_mutex_lock(cimg::X11attr().mutex);
5521 - if (is_fullscreen) _init_fullscreen();
5522 - _map_window();
5523 - is_closed = false;
5524 - pthread_mutex_unlock(cimg::X11attr().mutex);
5525 - }
5526 - return paint();
5527 - }
5528 -
5529 - CImgDisplay& close() {
5530 - if (!is_closed) {
5531 - pthread_mutex_lock(cimg::X11attr().mutex);
5532 - if (is_fullscreen) _desinit_fullscreen();
5533 - XUnmapWindow(cimg::X11attr().display,window);
5534 - window_x = window_y = -1;
5535 - is_closed = true;
5536 - pthread_mutex_unlock(cimg::X11attr().mutex);
5537 - }
5538 - return *this;
5539 - }
5540 -
5541 - CImgDisplay& set_title(const char *format,...) {
5542 - char tmp[1024]={0};
5543 - va_list ap;
5544 - va_start(ap, format);
5545 - std::vsprintf(tmp,format,ap);
5546 - va_end(ap);
5547 - if (title) delete[] title;
5548 - const int s = cimg::strlen(tmp)+1;
5549 - title = new char[s];
5550 - std::memcpy(title,tmp,s*sizeof(char));
5551 - pthread_mutex_lock(cimg::X11attr().mutex);
5552 - XStoreName(cimg::X11attr().display,window,tmp);
5553 - pthread_mutex_unlock(cimg::X11attr().mutex);
5554 - return *this;
5555 - }
5556 -
5557 - CImgDisplay& paint(const bool wait_expose=true) {
5558 - pthread_mutex_lock(cimg::X11attr().mutex);
5559 - _paint(wait_expose);
5560 - pthread_mutex_unlock(cimg::X11attr().mutex);
5561 - return *this;
5562 - }
5563 -
5564 - template<typename T> CImgDisplay& render(const CImg<T>& img, const bool flag8=false) {
5565 - if (img.is_empty())
5566 - throw CImgArgumentException("CImgDisplay::_render_image() : Specified input image (%u,%u,%u,%u,%p) is empty.",
5567 - img.width,img.height,img.depth,img.dim,img.data);
5568 - if (img.depth!=1) return render(img.get_projections2d(img.width/2,img.height/2,img.depth/2));
5569 - if (cimg::X11attr().nb_bits==8 && (img.width!=width || img.height!=height)) return render(img.get_resize(width,height,1,-100,1));
5570 - if (cimg::X11attr().nb_bits==8 && !flag8 && img.dim==3) return render(img.get_RGBtoLUT(true),true);
5571 -
5572 - const unsigned int xymax = img.width*img.height;
5573 - const T
5574 - *data1 = img.ptr(),
5575 - *data2 = (img.dim>=2)?img.ptr(0,0,0,1):data1,
5576 - *data3 = (img.dim>=3)?img.ptr(0,0,0,2):data1;
5577 - if (cimg::X11attr().blue_first) cimg::swap(data1,data3);
5578 - pthread_mutex_lock(cimg::X11attr().mutex);
5579 -
5580 - if (!normalization || (normalization==3 && cimg::type<T>::id()==cimg::type<unsigned char>::id())) {
5581 - min = max = 0;
5582 - switch (cimg::X11attr().nb_bits) {
5583 - case 8: {
5584 - _set_colormap(colormap,img.dim);
5585 - unsigned char *const ndata = (img.width==width && img.height==height)?(unsigned char*)data:new unsigned char[img.width*img.height];
5586 - unsigned char *ptrd = (unsigned char*)ndata;
5587 - switch (img.dim) {
5588 - case 1: for (unsigned int xy=0; xy<xymax; xy++) (*ptrd++) = (unsigned char)*(data1++);
5589 - break;
5590 - case 2: for (unsigned int xy=0; xy<xymax; xy++) {
5591 - const unsigned char R = (unsigned char)*(data1++), G = (unsigned char)*(data2++);
5592 - (*ptrd++) = (R&0xf0)|(G>>4);
5593 - } break;
5594 - default: for (unsigned int xy=0; xy<xymax; xy++) {
5595 - const unsigned char R = (unsigned char)*(data1++), G = (unsigned char)*(data2++), B = (unsigned char)*(data3++);
5596 - (*ptrd++) = (R&0xe0) | ((G>>5)<<2) | (B>>6);
5597 - } break;
5598 - }
5599 - if (ndata!=data) { _render_resize(ndata,img.width,img.height,(unsigned char*)data,width,height); delete[] ndata; }
5600 - } break;
5601 - case 16: {
5602 - unsigned short *const ndata = (img.width==width && img.height==height)?(unsigned short*)data:new unsigned short[img.width*img.height];
5603 - unsigned char *ptrd = (unsigned char*)ndata;
5604 - const unsigned int M = 248;
5605 - if (cimg::X11attr().byte_order) for (unsigned int xy=0; xy<xymax; xy++) {
5606 - const unsigned char G = (unsigned char)*(data2++)>>2;
5607 - *(ptrd++) = (unsigned char)*(data1++)&M | (G>>3);
5608 - *(ptrd++) = (G<<5) | ((unsigned char)*(data3++)>>3);
5609 - } else for (unsigned int xy=0; xy<xymax; xy++) {
5610 - const unsigned char G = (unsigned char)*(data2++)>>2;
5611 - *(ptrd++) = (G<<5) | ((unsigned char)*(data3++)>>3);
5612 - *(ptrd++) = (unsigned char)*(data1++)&M | (G>>3);
5613 - }
5614 - if (ndata!=data) { _render_resize(ndata,img.width,img.height,(unsigned short*)data,width,height); delete[] ndata; }
5615 - } break;
5616 - default: {
5617 - unsigned int *const ndata = (img.width==width && img.height==height)?(unsigned int*)data:new unsigned int[img.width*img.height];
5618 - unsigned char *ptrd = (unsigned char*)ndata;
5619 - if (cimg::X11attr().byte_order) for (unsigned int xy=0; xy<xymax; xy++) {
5620 - *(ptrd++) = 0;
5621 - *(ptrd++) = (unsigned char)*(data1++);
5622 - *(ptrd++) = (unsigned char)*(data2++);
5623 - *(ptrd++) = (unsigned char)*(data3++);
5624 - } else for (unsigned int xy=0; xy<xymax; xy++) {
5625 - *(ptrd++) = (unsigned char)*(data3++);
5626 - *(ptrd++) = (unsigned char)*(data2++);
5627 - *(ptrd++) = (unsigned char)*(data1++);
5628 - *(ptrd++) = 0;
5629 - }
5630 - if (ndata!=data) { _render_resize(ndata,img.width,img.height,(unsigned int*)data,width,height); delete[] ndata; }
5631 - } break;
5632 - };
5633 - } else {
5634 - if (normalization==3) {
5635 - if (cimg::type<T>::is_float()) { const CImgStats st(img,false); min = (float)st.min; max = (float)st.max; }
5636 - else { min = (float)cimg::type<T>::min(); max = (float)cimg::type<T>::max(); }
5637 - } else if ((min>max) || normalization==1) { const CImgStats st(img,false); min = (float)st.min; max = (float)st.max; }
5638 - const float delta = max-min, mm = delta?delta:1.0f;
5639 - switch (cimg::X11attr().nb_bits) {
5640 - case 8: {
5641 - _set_colormap(colormap,img.dim);
5642 - unsigned char *const ndata = (img.width==width && img.height==height)?(unsigned char*)data:new unsigned char[img.width*img.height];
5643 - unsigned char *ptrd = (unsigned char*)ndata;
5644 - switch (img.dim) {
5645 - case 1: for (unsigned int xy=0; xy<xymax; xy++) {
5646 - const unsigned char R = (unsigned char)(255*(*(data1++)-min)/mm);
5647 - *(ptrd++) = R;
5648 - } break;
5649 - case 2: for (unsigned int xy=0; xy<xymax; xy++) {
5650 - const unsigned char
5651 - R = (unsigned char)(255*(*(data1++)-min)/mm),
5652 - G = (unsigned char)(255*(*(data2++)-min)/mm);
5653 - (*ptrd++) = (R&0xf0) | (G>>4);
5654 - } break;
5655 - default:
5656 - for (unsigned int xy=0; xy<xymax; xy++) {
5657 - const unsigned char
5658 - R = (unsigned char)(255*(*(data1++)-min)/mm),
5659 - G = (unsigned char)(255*(*(data2++)-min)/mm),
5660 - B = (unsigned char)(255*(*(data3++)-min)/mm);
5661 - *(ptrd++) = (R&0xe0) | ((G>>5)<<2) | (B>>6);
5662 - } break;
5663 - }
5664 - if (ndata!=data) { _render_resize(ndata,img.width,img.height,(unsigned char*)data,width,height); delete[] ndata; }
5665 - } break;
5666 - case 16: {
5667 - unsigned short *const ndata = (img.width==width && img.height==height)?(unsigned short*)data:new unsigned short[img.width*img.height];
5668 - unsigned char *ptrd = (unsigned char*)ndata;
5669 - const unsigned int M = 248;
5670 - if (cimg::X11attr().byte_order) for (unsigned int xy=0; xy<xymax; xy++) {
5671 - const unsigned char G = (unsigned char)(255*(*(data2++)-min)/mm)>>2;
5672 - *(ptrd++) = (unsigned char)(255*(*(data1++)-min)/mm)&M | (G>>3);
5673 - *(ptrd++) = (G<<5) | ((unsigned char)(255*(*(data3++)-min)/mm)>>3);
5674 - } else for (unsigned int xy=0; xy<xymax; xy++) {
5675 - const unsigned char G = (unsigned char)(255*(*(data2++)-min)/mm)>>2;
5676 - *(ptrd++) = (G<<5) | ((unsigned char)(255*(*(data3++)-min)/mm)>>3);
5677 - *(ptrd++) = (unsigned char)(255*(*(data1++)-min)/mm)&M | (G>>3);
5678 - }
5679 - if (ndata!=data) { _render_resize(ndata,img.width,img.height,(unsigned short*)data,width,height); delete[] ndata; }
5680 - } break;
5681 - default: {
5682 - unsigned int *const ndata = (img.width==width && img.height==height)?(unsigned int*)data:new unsigned int[img.width*img.height];
5683 - unsigned char *ptrd = (unsigned char*)ndata;
5684 - if (cimg::X11attr().byte_order) for (unsigned int xy=0; xy<xymax; xy++) {
5685 - (*ptrd++) = 0;
5686 - (*ptrd++) = (unsigned char)(255*(*(data1++)-min)/mm);
5687 - (*ptrd++) = (unsigned char)(255*(*(data2++)-min)/mm);
5688 - (*ptrd++) = (unsigned char)(255*(*(data3++)-min)/mm);
5689 - } else for (unsigned int xy=0; xy<xymax; xy++) {
5690 - (*ptrd++) = (unsigned char)(255*(*(data3++)-min)/mm);
5691 - (*ptrd++) = (unsigned char)(255*(*(data2++)-min)/mm);
5692 - (*ptrd++) = (unsigned char)(255*(*(data1++)-min)/mm);
5693 - (*ptrd++) = 0;
5694 - }
5695 - if (ndata!=data) { _render_resize(ndata,img.width,img.height,(unsigned int*)data,width,height); delete[] ndata; }
5696 - } break;
5697 - }
5698 - }
5699 -
5700 - pthread_mutex_unlock(cimg::X11attr().mutex);
5701 - return *this;
5702 - }
5703 -
5704 - static int _assign_lowlevel_xshm(Display *dpy, XErrorEvent *error) {
5705 - dpy = 0; error = 0;
5706 - cimg::X11attr().shm_enabled = false;
5707 - return 0;
5708 - }
5709 -
5710 - void assign_lowlevel(const unsigned int dimw, const unsigned int dimh, const char *ptitle=0,
5711 - const unsigned int normalization_type=3, const unsigned int events_type=3,
5712 - const bool fullscreen_flag=false, const bool closed_flag=false) {
5713 -
5714 - // Allocate space for window title
5715 - const int s = cimg::strlen(ptitle)+1;
5716 - char *tmp_title = s?new char[s]:0;
5717 - if (s) std::memcpy(tmp_title,ptitle,s*sizeof(char));
5718 -
5719 - // Destroy previous display window if existing
5720 - if (width && height) _assign();
5721 -
5722 - // Open X11 display if necessary.
5723 - if (!cimg::X11attr().display) {
5724 - cimg::X11attr().nb_wins = 0;
5725 - cimg::X11attr().mutex = new pthread_mutex_t;
5726 - pthread_mutex_init(cimg::X11attr().mutex,0);
5727 -
5728 - cimg::X11attr().display = XOpenDisplay((std::getenv("DISPLAY") ? std::getenv("DISPLAY") : ":0.0"));
5729 - if (!cimg::X11attr().display)
5730 - throw CImgDisplayException("CImgDisplay::_create_window() : Can't open X11 display");
5731 - cimg::X11attr().nb_bits = DefaultDepth(cimg::X11attr().display, DefaultScreen(cimg::X11attr().display));
5732 - if (cimg::X11attr().nb_bits!=8 && cimg::X11attr().nb_bits!=16 && cimg::X11attr().nb_bits!=24 && cimg::X11attr().nb_bits!=32)
5733 - throw CImgDisplayException("CImgDisplay::_create_window() : %u bits mode is not supported "
5734 - "(only 8, 16, 24 and 32 bits modes are supported)",cimg::X11attr().nb_bits);
5735 - cimg::X11attr().gc = new GC;
5736 - *cimg::X11attr().gc = DefaultGC(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display));
5737 - Visual *visual = DefaultVisual(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display));
5738 - XVisualInfo vtemplate;
5739 - vtemplate.visualid = XVisualIDFromVisual(visual);
5740 - int nb_visuals;
5741 - XVisualInfo *vinfo = XGetVisualInfo(cimg::X11attr().display,VisualIDMask,&vtemplate,&nb_visuals);
5742 - if (vinfo && vinfo->red_mask<vinfo->blue_mask) cimg::X11attr().blue_first = true;
5743 - cimg::X11attr().byte_order = ImageByteOrder(cimg::X11attr().display);
5744 -
5745 - pthread_mutex_lock(cimg::X11attr().mutex);
5746 - cimg::X11attr().event_thread = new pthread_t;
5747 - pthread_create(cimg::X11attr().event_thread,0,_events_thread,0);
5748 - } else pthread_mutex_lock(cimg::X11attr().mutex);
5749 -
5750 - // Set display variables
5751 - width = dimw;
5752 - height = dimh;
5753 - normalization = normalization_type%4;
5754 - events = events_type%4;
5755 - is_fullscreen = fullscreen_flag;
5756 - title = tmp_title;
5757 - window_x = window_y = wheel = 0;
5758 - mouse_x = mouse_y = -1;
5759 - std::memset((void*)buttons,0,256*sizeof(unsigned int));
5760 - std::memset((void*)keys,0,256*sizeof(unsigned int));
5761 - std::memset((void*)released_keys,0,256*sizeof(unsigned int));
5762 - is_resized = is_moved = is_event = false;
5763 - is_closed = closed_flag;
5764 - fps_timer = fps_frames = timer = 0;
5765 - fps_fps = 0;
5766 -
5767 - // Create X11 window and palette (if 8bits display)
5768 - if (is_fullscreen) {
5769 - _init_fullscreen();
5770 - const unsigned int sx = screen_dimx(), sy = screen_dimy();
5771 - XSetWindowAttributes winattr;
5772 - winattr.override_redirect = True;
5773 - window = XCreateWindow(cimg::X11attr().display,
5774 - RootWindow(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)),
5775 - (sx-width)/2,(sy-height)/2,
5776 - width,height,0,0,InputOutput,CopyFromParent,CWOverrideRedirect,&winattr);
5777 - } else
5778 - window = XCreateSimpleWindow(cimg::X11attr().display,
5779 - RootWindow(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)),
5780 - 0,0,width,height,2,0,0x0L);
5781 - XStoreName(cimg::X11attr().display,window,title?title:" ");
5782 - if (cimg::X11attr().nb_bits==8) {
5783 - colormap = XCreateColormap(cimg::X11attr().display,window,DefaultVisual(cimg::X11attr().display,
5784 - DefaultScreen(cimg::X11attr().display)),AllocAll);
5785 - _set_colormap(colormap,3);
5786 - XSetWindowColormap(cimg::X11attr().display,window,colormap);
5787 - }
5788 - window_width = width;
5789 - window_height = height;
5790 -
5791 - // Create XImage
5792 - const unsigned int bufsize = width*height*(cimg::X11attr().nb_bits==8?1:(cimg::X11attr().nb_bits==16?2:4));
5793 -#ifdef cimg_use_xshm
5794 - shminfo = 0;
5795 - if (XShmQueryExtension(cimg::X11attr().display)) {
5796 - shminfo = new XShmSegmentInfo;
5797 - image = XShmCreateImage(cimg::X11attr().display,DefaultVisual(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)),
5798 - cimg::X11attr().nb_bits,ZPixmap,0,shminfo,width,height);
5799 - if (!image) { delete shminfo; shminfo = 0; }
5800 - else {
5801 - shminfo->shmid = shmget(IPC_PRIVATE, bufsize, IPC_CREAT | 0777);
5802 - if (shminfo->shmid==-1) { XDestroyImage(image); delete shminfo; shminfo = 0; }
5803 - else {
5804 - shminfo->shmaddr = image->data = (char*)(data = shmat(shminfo->shmid,0,0));
5805 - if (shminfo->shmaddr==(char*)-1) { XDestroyImage(image); shmctl(shminfo->shmid,IPC_RMID,0); delete shminfo; shminfo = 0; }
5806 - shminfo->readOnly = False;
5807 - cimg::X11attr().shm_enabled = true;
5808 - XErrorHandler oldXErrorHandler = XSetErrorHandler(_assign_lowlevel_xshm);
5809 - XShmAttach(cimg::X11attr().display, shminfo);
5810 - XSync(cimg::X11attr().display, False);
5811 - XSetErrorHandler(oldXErrorHandler);
5812 - if (!cimg::X11attr().shm_enabled) {
5813 - XDestroyImage(image);
5814 - shmdt(shminfo->shmaddr);
5815 - shmctl(shminfo->shmid,IPC_RMID,0);
5816 - delete shminfo; shminfo = 0;
5817 - }
5818 - }
5819 - }
5820 - }
5821 - if (!shminfo)
5822 -#endif
5823 - {
5824 - data = std::malloc(bufsize);
5825 - image = XCreateImage(cimg::X11attr().display,DefaultVisual(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)),
5826 - cimg::X11attr().nb_bits,ZPixmap,0,(char*)data,width,height,8,0);
5827 - }
5828 -
5829 - if (!is_closed) _map_window(); else { window_x = window_y = cimg::type<int>::min(); }
5830 -
5831 - if (events) {
5832 - wm_delete_window = XInternAtom(cimg::X11attr().display, "WM_DELETE_WINDOW", False);
5833 - wm_delete_protocol = XInternAtom(cimg::X11attr().display, "WM_PROTOCOLS", False);
5834 - XSetWMProtocols(cimg::X11attr().display, window, &wm_delete_window, 1);
5835 - if (is_fullscreen) XGrabKeyboard(cimg::X11attr().display, window, True, GrabModeAsync, GrabModeAsync, CurrentTime);
5836 - }
5837 - cimg::X11attr().wins[cimg::X11attr().nb_wins++]=this;
5838 - pthread_mutex_unlock(cimg::X11attr().mutex);
5839 - }
5840 -
5841 - void _map_window() {
5842 - XWindowAttributes attr;
5843 - XEvent event;
5844 - XSelectInput(cimg::X11attr().display,window,ExposureMask | StructureNotifyMask);
5845 - bool exposed = false, mapped = false;
5846 - XMapRaised(cimg::X11attr().display,window);
5847 - XSync(cimg::X11attr().display,False);
5848 - do {
5849 - XWindowEvent(cimg::X11attr().display,window,StructureNotifyMask | ExposureMask,&event);
5850 - switch (event.type) {
5851 - case MapNotify: mapped = true; break;
5852 - case Expose: exposed = true; break;
5853 - default: XSync(cimg::X11attr().display, False); cimg::sleep(10);
5854 - }
5855 - } while (!(exposed && mapped));
5856 - do {
5857 - XGetWindowAttributes(cimg::X11attr().display, window, &attr);
5858 - if (attr.map_state!=IsViewable) { XSync(cimg::X11attr().display,False); cimg::sleep(10); }
5859 - } while (attr.map_state != IsViewable);
5860 - window_x = attr.x;
5861 - window_y = attr.y;
5862 - }
5863 -
5864 - void _set_colormap(Colormap& colormap, const unsigned int dim) {
5865 - XColor palette[256];
5866 - switch (dim) {
5867 - case 1: // palette for greyscale images
5868 - for (unsigned int index=0; index<256; index++) {
5869 - palette[index].pixel = index;
5870 - palette[index].red = palette[index].green = palette[index].blue = index<<8;
5871 - palette[index].flags = DoRed | DoGreen | DoBlue;
5872 - }
5873 - break;
5874 - case 2: // palette for RG images
5875 - for (unsigned int index=0, r=8; r<256; r+=16)
5876 - for (unsigned int g=8; g<256; g+=16) {
5877 - palette[index].pixel = index;
5878 - palette[index].red = palette[index].blue = r<<8;
5879 - palette[index].green = g<<8;
5880 - palette[index++].flags = DoRed | DoGreen | DoBlue;
5881 - }
5882 - break;
5883 - default: // palette for RGB images
5884 - for (unsigned int index=0, r=16; r<256; r+=32)
5885 - for (unsigned int g=16; g<256; g+=32)
5886 - for (unsigned int b=32; b<256; b+=64) {
5887 - palette[index].pixel = index;
5888 - palette[index].red = r<<8;
5889 - palette[index].green = g<<8;
5890 - palette[index].blue = b<<8;
5891 - palette[index++].flags = DoRed | DoGreen | DoBlue;
5892 - }
5893 - break;
5894 - }
5895 - XStoreColors(cimg::X11attr().display,colormap,palette,256);
5896 - }
5897 -
5898 - void _paint(const bool wait_expose=true) {
5899 - if (!is_closed) {
5900 - if (wait_expose) {
5901 - static XEvent event;
5902 - event.xexpose.type = Expose;
5903 - event.xexpose.serial = 0;
5904 - event.xexpose.send_event = True;
5905 - event.xexpose.display = cimg::X11attr().display;
5906 - event.xexpose.window = window;
5907 - event.xexpose.x = 0;
5908 - event.xexpose.y = 0;
5909 - event.xexpose.width = (int)width;
5910 - event.xexpose.height = (int)height;
5911 - event.xexpose.count = 0;
5912 - XSendEvent(cimg::X11attr().display, window, False, 0, &event);
5913 - } else {
5914 -#if cimg_use_xshm
5915 - if (shminfo) XShmPutImage(cimg::X11attr().display,window,*cimg::X11attr().gc,image,0,0,0,0,width,height,False);
5916 - else
5917 -#endif
5918 - XPutImage(cimg::X11attr().display,window,*cimg::X11attr().gc,image,0,0,0,0,width,height);
5919 - XSync(cimg::X11attr().display, False);
5920 - }
5921 - }
5922 - }
5923 -
5924 - template<typename T> void _resize(T foo, const unsigned int ndimx, const unsigned int ndimy, const bool redraw) {
5925 - foo = 0;
5926 -#ifdef cimg_use_xshm
5927 - if (shminfo) {
5928 - XShmSegmentInfo *nshminfo = new XShmSegmentInfo;
5929 - XImage *nimage = XShmCreateImage(cimg::X11attr().display,DefaultVisual(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)),
5930 - cimg::X11attr().nb_bits,ZPixmap,0,nshminfo,ndimx,ndimy);
5931 - nshminfo->shmid = shmget(IPC_PRIVATE, ndimx*ndimy*sizeof(T), IPC_CREAT | 0777);
5932 - nshminfo->shmaddr = nimage->data = (char*)shmat(nshminfo->shmid,0,0);
5933 - nshminfo->readOnly = False;
5934 - XShmAttach(cimg::X11attr().display, nshminfo);
5935 - XSync(cimg::X11attr().display, False);
5936 - T *const ndata = (T*)nimage->data;
5937 - if (redraw) _render_resize((T*)data,width,height,ndata,ndimx,ndimy);
5938 - else std::memset(ndata,0,sizeof(T)*ndimx*ndimy);
5939 - XShmDetach(cimg::X11attr().display, shminfo);
5940 - XDestroyImage(image);
5941 - shmdt(shminfo->shmaddr);
5942 - shmctl(shminfo->shmid,IPC_RMID,0);
5943 - delete shminfo;
5944 - shminfo = nshminfo;
5945 - image = nimage;
5946 - data = (void*)ndata;
5947 - } else
5948 -#endif
5949 - {
5950 - T *ndata = (T*)std::malloc(ndimx*ndimy*sizeof(T));
5951 - if (redraw) _render_resize((T*)data,width,height,ndata,ndimx,ndimy);
5952 - else std::memset(ndata,0,sizeof(T)*ndimx*ndimy);
5953 - data = (void*)ndata;
5954 - XDestroyImage(image);
5955 - image = XCreateImage(cimg::X11attr().display,DefaultVisual(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)),
5956 - cimg::X11attr().nb_bits,ZPixmap,0,(char*)data,ndimx,ndimy,8,0);
5957 - }
5958 - }
5959 -
5960 - void _init_fullscreen() {
5961 - background_window = 0;
5962 - if (is_fullscreen && !is_closed) {
5963 -#ifdef cimg_use_xrandr
5964 - int foo;
5965 - if (XRRQueryExtension(cimg::X11attr().display,&foo,&foo)) {
5966 - XRRRotations(cimg::X11attr().display, DefaultScreen(cimg::X11attr().display), &cimg::X11attr().curr_rotation);
5967 - if (!cimg::X11attr().resolutions) {
5968 - cimg::X11attr().resolutions = XRRSizes(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display),&foo);
5969 - cimg::X11attr().nb_resolutions = (unsigned int)foo;
5970 - }
5971 - if (cimg::X11attr().resolutions) {
5972 - cimg::X11attr().curr_resolution = 0;
5973 - for (unsigned int i=0; i<cimg::X11attr().nb_resolutions; i++) {
5974 - const unsigned int
5975 - nw = (unsigned int)(cimg::X11attr().resolutions[i].width),
5976 - nh = (unsigned int)(cimg::X11attr().resolutions[i].height);
5977 - if (nw>=width && nh>=height &&
5978 - nw<=(unsigned int)(cimg::X11attr().resolutions[cimg::X11attr().curr_resolution].width) &&
5979 - nh<=(unsigned int)(cimg::X11attr().resolutions[cimg::X11attr().curr_resolution].height))
5980 - cimg::X11attr().curr_resolution = i;
5981 - }
5982 - if (cimg::X11attr().curr_resolution>0) {
5983 - XRRScreenConfiguration *config = XRRGetScreenInfo(cimg::X11attr().display, DefaultRootWindow(cimg::X11attr().display));
5984 - XRRSetScreenConfig(cimg::X11attr().display, config, DefaultRootWindow(cimg::X11attr().display),
5985 - cimg::X11attr().curr_resolution, cimg::X11attr().curr_rotation, CurrentTime);
5986 - XRRFreeScreenConfigInfo(config);
5987 - XSync(cimg::X11attr().display, False);
5988 - }
5989 - }
5990 - }
5991 - cimg::warn(!cimg::X11attr().resolutions,"CImgDisplay::_create_window() : Xrandr extension is not supported by the X server.");
5992 -#endif
5993 - const unsigned int sx = screen_dimx(), sy = screen_dimy();
5994 - XSetWindowAttributes winattr;
5995 - winattr.override_redirect = True;
5996 - if (sx!=width || sy!=height) {
5997 - background_window = XCreateWindow(cimg::X11attr().display,
5998 - RootWindow(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)),0,0,
5999 - sx,sy,0,0,InputOutput,CopyFromParent,CWOverrideRedirect,&winattr);
6000 - const unsigned int bufsize = sx*sy*(cimg::X11attr().nb_bits==8?1:(cimg::X11attr().nb_bits==16?2:4));
6001 - void *background_data = std::malloc(bufsize);
6002 - std::memset(background_data,0,bufsize);
6003 - XImage *background_image = XCreateImage(cimg::X11attr().display,DefaultVisual(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)),
6004 - cimg::X11attr().nb_bits,ZPixmap,0,(char*)background_data,sx,sy,8,0);
6005 - XEvent event;
6006 - XSelectInput(cimg::X11attr().display,background_window,StructureNotifyMask);
6007 - XMapRaised(cimg::X11attr().display,background_window);
6008 - do XWindowEvent(cimg::X11attr().display,background_window,StructureNotifyMask,&event);
6009 - while (event.type!=MapNotify);
6010 - XPutImage(cimg::X11attr().display,background_window,*cimg::X11attr().gc,background_image,0,0,0,0,sx,sy);
6011 - XWindowAttributes attr;
6012 - XGetWindowAttributes(cimg::X11attr().display, background_window, &attr);
6013 - while (attr.map_state != IsViewable) XSync(cimg::X11attr().display, False);
6014 - XDestroyImage(background_image);
6015 - }
6016 - }
6017 - }
6018 -
6019 - void _desinit_fullscreen() {
6020 - if (is_fullscreen) {
6021 - XUngrabKeyboard(cimg::X11attr().display,CurrentTime);
6022 -#if cimg_use_xrandr
6023 - if (cimg::X11attr().resolutions && cimg::X11attr().curr_resolution) {
6024 - XRRScreenConfiguration *config = XRRGetScreenInfo(cimg::X11attr().display, DefaultRootWindow(cimg::X11attr().display));
6025 - XRRSetScreenConfig(cimg::X11attr().display, config, DefaultRootWindow(cimg::X11attr().display),
6026 - 0, cimg::X11attr().curr_rotation, CurrentTime);
6027 - XRRFreeScreenConfigInfo(config);
6028 - XSync(cimg::X11attr().display, False);
6029 - cimg::X11attr().curr_resolution = 0;
6030 - }
6031 -#endif
6032 - if (background_window) XDestroyWindow(cimg::X11attr().display,background_window);
6033 - background_window = 0;
6034 - is_fullscreen = false;
6035 - }
6036 - }
6037 -
6038 - void _handle_events(const XEvent *const pevent) {
6039 - XEvent event=*pevent;
6040 - switch (event.type) {
6041 - case ClientMessage:
6042 - if ((int)event.xclient.message_type==(int)wm_delete_protocol &&
6043 - (int)event.xclient.data.l[0]==(int)wm_delete_window) {
6044 - XUnmapWindow(cimg::X11attr().display,window);
6045 - mouse_x = mouse_y = -1;
6046 - std::memmove((void*)(buttons+1),(void*)buttons,255);
6047 - std::memmove((void*)(keys+1),(void*)keys,255);
6048 - if (key) { std::memmove((void*)(released_keys+1),(void*)released_keys,255); released_key = key; }
6049 - key = button = 0;
6050 - is_closed = is_event = true;
6051 - }
6052 - break;
6053 - case ConfigureNotify: {
6054 - while (XCheckWindowEvent(cimg::X11attr().display,window,StructureNotifyMask,&event));
6055 - const unsigned int
6056 - nw = event.xconfigure.width,
6057 - nh = event.xconfigure.height;
6058 - const int
6059 - nx = event.xconfigure.x,
6060 - ny = event.xconfigure.y;
6061 - if (nw && nh && (nw!=window_width || nh!=window_height)) {
6062 - window_width = nw;
6063 - window_height = nh;
6064 - mouse_x = mouse_y = -1;
6065 - XResizeWindow(cimg::X11attr().display,window,window_width,window_height);
6066 - is_resized = is_event = true;
6067 - }
6068 - if (nx!=window_x || ny!=window_y) {
6069 - window_x = nx;
6070 - window_y = ny;
6071 - is_moved = is_event = true;
6072 - }
6073 - } break;
6074 - case Expose: {
6075 - while (XCheckWindowEvent(cimg::X11attr().display,window,ExposureMask,&event));
6076 - _paint(false);
6077 - if (is_fullscreen) {
6078 - XWindowAttributes attr;
6079 - XGetWindowAttributes(cimg::X11attr().display, window, &attr);
6080 - while (attr.map_state != IsViewable) XSync(cimg::X11attr().display, False);
6081 - XSetInputFocus(cimg::X11attr().display, window, RevertToParent, CurrentTime);
6082 - }
6083 - } break;
6084 - case ButtonPress: {
6085 - do {
6086 - switch (event.xbutton.button) {
6087 - case 1: std::memmove((void*)(buttons+1),(void*)buttons,255); button|=1; is_event = true; break;
6088 - case 2: std::memmove((void*)(buttons+1),(void*)buttons,255); button|=4; is_event = true; break;
6089 - case 3: std::memmove((void*)(buttons+1),(void*)buttons,255); button|=2; is_event = true; break;
6090 - default: break;
6091 - }
6092 - } while (XCheckWindowEvent(cimg::X11attr().display,window,ButtonPressMask,&event));
6093 - } break;
6094 - case ButtonRelease: {
6095 - do {
6096 - switch (event.xbutton.button) {
6097 - case 1: std::memmove((void*)(buttons+1),(void*)buttons,255); button&=~1U; is_event = true; break;
6098 - case 2: std::memmove((void*)(buttons+1),(void*)buttons,255); button&=~4U; is_event = true; break;
6099 - case 3: std::memmove((void*)(buttons+1),(void*)buttons,255); button&=~2U; is_event = true; break;
6100 - case 4: wheel++; is_event = true; break;
6101 - case 5: wheel--; is_event = true; break;
6102 - default: break;
6103 - }
6104 - } while (XCheckWindowEvent(cimg::X11attr().display,window,ButtonReleaseMask,&event));
6105 - } break;
6106 - case KeyPress: {
6107 - char tmp;
6108 - KeySym ksym;
6109 - XLookupString(&event.xkey,&tmp,1,&ksym,0);
6110 - std::memmove((void*)(keys+1),(void*)keys,255); key = (unsigned int)ksym;
6111 - std::memmove((void*)(released_keys+1),(void*)released_keys,255); released_key = 0;
6112 - is_event = true;
6113 - } break;
6114 - case KeyRelease: {
6115 - char tmp;
6116 - KeySym ksym;
6117 - XLookupString(&event.xkey,&tmp,1,&ksym,0);
6118 - std::memmove((void*)(keys+1),(void*)keys,255); key = 0;
6119 - std::memmove((void*)(released_keys+1),(void*)released_keys,255); released_key = (unsigned int)ksym;
6120 - is_event = true;
6121 - } break;
6122 - case LeaveNotify:
6123 - while (XCheckWindowEvent(cimg::X11attr().display,window,LeaveWindowMask,&event));
6124 - mouse_x = mouse_y =-1;
6125 - is_event = true;
6126 - break;
6127 - case MotionNotify:
6128 - while (XCheckWindowEvent(cimg::X11attr().display,window,PointerMotionMask,&event));
6129 - mouse_x = event.xmotion.x;
6130 - mouse_y = event.xmotion.y;
6131 - if (mouse_x<0 || mouse_y<0 || mouse_x>=dimx() || mouse_y>=dimy()) mouse_x = mouse_y = -1;
6132 - is_event = true;
6133 - break;
6134 - }
6135 - }
6136 -
6137 - static void* _events_thread(void *arg) {
6138 - arg = 0;
6139 - XEvent event;
6140 - pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,0);
6141 - pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,0);
6142 - for (;;) {
6143 - pthread_mutex_lock(cimg::X11attr().mutex);
6144 - for (unsigned int i=0; i<cimg::X11attr().nb_wins; i++) {
6145 - const unsigned int xevent_type = (cimg::X11attr().wins[i]->events)&3;
6146 - const unsigned int emask =
6147 - ((xevent_type>=1)?ExposureMask|StructureNotifyMask:0)|
6148 - ((xevent_type>=2)?ButtonPressMask|KeyPressMask|PointerMotionMask|LeaveWindowMask:0)|
6149 - ((xevent_type>=3)?ButtonReleaseMask|KeyReleaseMask:0);
6150 - XSelectInput(cimg::X11attr().display,cimg::X11attr().wins[i]->window,emask);
6151 - }
6152 - bool event_flag = XCheckTypedEvent(cimg::X11attr().display, ClientMessage, &event);
6153 - if (!event_flag) event_flag = XCheckMaskEvent(cimg::X11attr().display,
6154 - ExposureMask|StructureNotifyMask|ButtonPressMask|
6155 - KeyPressMask|PointerMotionMask|LeaveWindowMask|ButtonReleaseMask|
6156 - KeyReleaseMask,&event);
6157 - if (event_flag) {
6158 - for (unsigned int i=0; i<cimg::X11attr().nb_wins; i++)
6159 - if (!cimg::X11attr().wins[i]->is_closed && event.xany.window==cimg::X11attr().wins[i]->window)
6160 - cimg::X11attr().wins[i]->_handle_events(&event);
6161 - }
6162 - pthread_mutex_unlock(cimg::X11attr().mutex);
6163 - pthread_testcancel();
6164 - cimg::sleep(7);
6165 - }
6166 - return 0;
6167 - }
6168 -
6169 - // Windows-based display
6170 - //-----------------------
6171 -#elif cimg_display_type==2
6172 - CLIENTCREATESTRUCT ccs;
6173 - BITMAPINFO bmi;
6174 - unsigned int *data;
6175 - DEVMODE curr_mode;
6176 - HWND window;
6177 - HWND background_window;
6178 - HDC hdc;
6179 - HANDLE thread;
6180 - HANDLE created;
6181 - HANDLE mutex;
6182 - bool visible_cursor;
6183 -
6184 - static int screen_dimx() {
6185 - DEVMODE mode;
6186 - mode.dmSize = sizeof(DEVMODE);
6187 - mode.dmDriverExtra = 0;
6188 - EnumDisplaySettings(0,ENUM_CURRENT_SETTINGS,&mode);
6189 - return mode.dmPelsWidth;
6190 - }
6191 -
6192 - static int screen_dimy() {
6193 - DEVMODE mode;
6194 - mode.dmSize = sizeof(DEVMODE);
6195 - mode.dmDriverExtra = 0;
6196 - EnumDisplaySettings(0,ENUM_CURRENT_SETTINGS,&mode);
6197 - return mode.dmPelsHeight;
6198 - }
6199 -
6200 - CImgDisplay& assign(const unsigned int dimw, const unsigned int dimh, const char *title=0,
6201 - const unsigned int normalization_type=3, const unsigned int events_type=3,
6202 - const bool fullscreen_flag=false, const bool closed_flag=false) {
6203 - if (!dimw || !dimh)
6204 - throw CImgArgumentException("CImgDisplay::assign() : Specified window size (%u,%u) is not valid.",dimw,dimh);
6205 - assign_lowlevel(dimw,dimh,title,normalization_type,events_type,fullscreen_flag,closed_flag);
6206 - min = max = 0;
6207 - std::memset(data,0,sizeof(unsigned int)*width*height);
6208 - return paint();
6209 - }
6210 -
6211 - template<typename T> CImgDisplay& assign(const CImg<T>& img, const char *title=0,
6212 - const unsigned int normalization_type=3, const unsigned int events_type=3,
6213 - const bool fullscreen_flag=false, const bool closed_flag=false) {
6214 - if (img.is_empty())
6215 - throw CImgArgumentException("CImgDisplay::CImgDisplay() : Specified input image (%u,%u,%u,%u,%p) is empty.",
6216 - img.width,img.height,img.depth,img.dim,img.data);
6217 - CImg<T> tmp;
6218 - const CImg<T>& nimg = (img.depth==1)?img:(tmp=img.get_projections2d(img.width/2,img.height/2,img.depth/2));
6219 - assign_lowlevel(nimg.width,nimg.height,title,normalization_type,events_type,fullscreen_flag,closed_flag);
6220 - if (normalization==2) { const CImgStats st(nimg,false); min = (float)st.min; max = (float)st.max; }
6221 - return display(nimg);
6222 - }
6223 -
6224 - template<typename T> CImgDisplay& assign(const CImgList<T>& list,const char *title=0,
6225 - const unsigned int normalization_type=3, const unsigned int events_type=3,
6226 - const bool fullscreen_flag=false, const bool closed_flag=false) {
6227 - if (list.is_empty())
6228 - throw CImgArgumentException("CImgDisplay::CImgDisplay() : Specified input list (%u,%p) is empty.",
6229 - list.size,list.data);
6230 - CImg<T> tmp;
6231 - const CImg<T> img = list.get_append('x'),
6232 - &nimg = (img.depth==1)?img:(tmp=img.get_projections2d(img.width/2,img.height/2,img.depth/2));
6233 - assign_lowlevel(nimg.width,nimg.height,title,normalization_type,events_type,fullscreen_flag,closed_flag);
6234 - if (normalization==2) { const CImgStats st(nimg,false); min = (float)st.min; max = (float)st.max; }
6235 - return display(nimg);
6236 - }
6237 -
6238 - CImgDisplay& assign(const CImgDisplay& win) {
6239 - assign_lowlevel(win.width,win.height,win.title,win.normalization,win.events,win.is_fullscreen,win.is_closed);
6240 - std::memcpy(data,win.data,sizeof(unsigned int)*width*height);
6241 - return paint();
6242 - }
6243 -
6244 - CImgDisplay& _assign() {
6245 - DestroyWindow(window);
6246 - if (events) TerminateThread(thread,0);
6247 - if (data) delete[] data;
6248 - if (title) delete[] title;
6249 - if (is_fullscreen) _desinit_fullscreen();
6250 - width = height = normalization = events = 0;
6251 - is_fullscreen = is_resized = is_moved = is_event = false;
6252 - is_closed = true;
6253 - title = 0;
6254 - window_x = window_y = window_width = window_height = mouse_x = mouse_y = wheel = 0;
6255 - std::memset((void*)buttons,0,256*sizeof(unsigned int));
6256 - std::memset((void*)keys,0,256*sizeof(unsigned int));
6257 - std::memset((void*)released_keys,0,256*sizeof(unsigned int));
6258 - min = max = 0;
6259 - return *this;
6260 - }
6261 -
6262 - template<typename T> CImgDisplay& display(const CImg<T>& img) {
6263 - return render(img).paint();
6264 - }
6265 -
6266 - CImgDisplay& resize(const int nwidth, const int nheight, const bool redraw=true) {
6267 - if (!(nwidth && nheight))
6268 - throw CImgArgumentException("CImgDisplay::resize() : Specified window size (%d,%d) is not valid.",
6269 - nwidth,nheight);
6270 - const unsigned int
6271 - tmpdimx=(nwidth>0)?nwidth:(-nwidth*width/100),
6272 - tmpdimy=(nheight>0)?nheight:(-nheight*height/100),
6273 - dimx = tmpdimx?tmpdimx:1,
6274 - dimy = tmpdimy?tmpdimy:1;
6275 - const bool
6276 - is_disp_different = (width!=dimx || height!=dimy),
6277 - is_win_different = (window_width!=dimx || window_height!=dimy);
6278 -
6279 - if (is_disp_different || is_win_different) {
6280 - RECT rect; rect.left=rect.top=0; rect.right = dimx-1; rect.bottom = dimy-1;
6281 - AdjustWindowRect(&rect,WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,false);
6282 - const int cwidth = rect.right-rect.left+1, cheight = rect.bottom-rect.top+1;
6283 - SetWindowPos(window,0,0,0,cwidth,cheight,SWP_NOMOVE | SWP_NOZORDER | SWP_NOCOPYBITS);
6284 - window_width = dimx;
6285 - window_height = dimy;
6286 - is_resized = false;
6287 - if (is_disp_different) {
6288 - unsigned int *ndata = new unsigned int[dimx*dimy];
6289 - if (redraw) _render_resize(data,width,height,ndata,dimx,dimy);
6290 - else std::memset(ndata,0x80,sizeof(unsigned int)*dimx*dimy);
6291 - delete[] data;
6292 - data = ndata;
6293 - bmi.bmiHeader.biWidth = dimx;
6294 - bmi.bmiHeader.biHeight = -(int)dimy;
6295 - width = dimx;
6296 - height = dimy;
6297 - }
6298 - if (is_fullscreen) move((screen_dimx()-width)/2,(screen_dimy()-height)/2);
6299 - if (redraw) return paint();
6300 - }
6301 - return *this;
6302 - }
6303 -
6304 - CImgDisplay& move(const int posx,const int posy) {
6305 - if (!is_fullscreen) {
6306 - RECT rect; rect.left=rect.top=0; rect.right=window_width-1; rect.bottom=window_height-1;
6307 - AdjustWindowRect(&rect,WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,false);
6308 - const int border1 = (rect.right-rect.left+1-width)/2, border2 = rect.bottom-rect.top+1-height-border1;
6309 - SetWindowPos(window,0,posx-border1,posy-border2,0,0,SWP_NOSIZE | SWP_NOZORDER);
6310 - } else SetWindowPos(window,0,posx,posy,0,0,SWP_NOSIZE | SWP_NOZORDER);
6311 - window_x = posx;
6312 - window_y = posy;
6313 - is_moved = false;
6314 - return show();
6315 - }
6316 -
6317 - // Internal routine to retrieve the position of the current window.
6318 - CImgDisplay& _update_window_pos() {
6319 - if (!is_closed) {
6320 - RECT rect;
6321 - rect.left = rect.top = 0; rect.right = width-1; rect.bottom = height-1;
6322 - AdjustWindowRect(&rect,WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,false);
6323 - const int border1 = (rect.right-rect.left+1-width)/2, border2 = rect.bottom-rect.top+1-height-border1;
6324 - GetWindowRect(window,&rect);
6325 - window_x = rect.left + border1;
6326 - window_y = rect.top + border2;
6327 - } else window_x = window_y = -1;
6328 - return *this;
6329 - }
6330 -
6331 - CImgDisplay& set_mouse(const int posx, const int posy) {
6332 - if (!is_closed && posx>=0 && posy>=0) {
6333 - _update_window_pos();
6334 - SetCursorPos(window_x+posx,window_y+posy);
6335 - mouse_x = posx;
6336 - mouse_y = posy;
6337 - }
6338 - return *this;
6339 - }
6340 -
6341 - CImgDisplay& hide_mouse() {
6342 - visible_cursor = false;
6343 - ShowCursor(FALSE);
6344 - SendMessage(window,WM_SETCURSOR,0,0);
6345 - return *this;
6346 - }
6347 -
6348 - CImgDisplay& show_mouse() {
6349 - visible_cursor = true;
6350 - ShowCursor(TRUE);
6351 - SendMessage(window,WM_SETCURSOR,0,0);
6352 - return *this;
6353 - }
6354 -
6355 - static void wait_all() {
6356 - WaitForSingleObject(cimg::Win32attr().wait_event,INFINITE);
6357 - }
6358 -
6359 - CImgDisplay& show() {
6360 - if (is_closed) {
6361 - is_closed = false;
6362 - if (is_fullscreen) _init_fullscreen();
6363 - ShowWindow(window,SW_SHOW);
6364 - _update_window_pos();
6365 - }
6366 - return paint();
6367 - }
6368 -
6369 - CImgDisplay& close() {
6370 - if (!is_closed && !is_fullscreen) {
6371 - if (is_fullscreen) _desinit_fullscreen();
6372 - ShowWindow(window,SW_HIDE);
6373 - is_closed = true;
6374 - window_x = window_y = 0;
6375 - }
6376 - return *this;
6377 - }
6378 -
6379 - CImgDisplay& set_title(const char *format,...) {
6380 - char tmp[1024]={0};
6381 - va_list ap;
6382 - va_start(ap, format);
6383 - std::vsprintf(tmp,format,ap);
6384 - va_end(ap);
6385 - if (title) delete[] title;
6386 - const int s = cimg::strlen(tmp)+1;
6387 - title = new char[s];
6388 - std::memcpy(title,tmp,s*sizeof(char));
6389 - SetWindowTextA(window, tmp);
6390 - return *this;
6391 - }
6392 -
6393 - CImgDisplay& paint() {
6394 - if (!is_closed) {
6395 - WaitForSingleObject(mutex,INFINITE);
6396 - SetDIBitsToDevice(hdc,0,0,width,height,0,0,0,height,data,&bmi,DIB_RGB_COLORS);
6397 - ReleaseMutex(mutex);
6398 - }
6399 - return *this;
6400 - }
6401 -
6402 - template<typename T> CImgDisplay& render(const CImg<T>& img) {
6403 - if (img.is_empty())
6404 - throw CImgArgumentException("CImgDisplay::_render_image() : Specified input image (%u,%u,%u,%u,%p) is empty.",
6405 - img.width,img.height,img.depth,img.dim,img.data);
6406 - if (img.depth!=1) return render(img.get_projections2d(img.width/2,img.height/2,img.depth/2));
6407 -
6408 - const T
6409 - *data1 = img.ptr(),
6410 - *data2 = (img.dim>=2)?img.ptr(0,0,0,1):data1,
6411 - *data3 = (img.dim>=3)?img.ptr(0,0,0,2):data1;
6412 -
6413 - WaitForSingleObject(mutex,INFINITE);
6414 - unsigned int
6415 - *const ndata = (img.width==width && img.height==height)?data:new unsigned int[img.width*img.height],
6416 - *ptrd = ndata;
6417 -
6418 - if (!normalization || (normalization==3 && cimg::type<T>::id()==cimg::type<unsigned char>::id())) {
6419 - min = max = 0;
6420 - for (unsigned int xy = img.width*img.height; xy>0; xy--)
6421 - *(ptrd++) = ((unsigned char)*(data1++)<<16) | ((unsigned char)*(data2++)<<8) | (unsigned char)*(data3++);
6422 - } else {
6423 - if (normalization==3) {
6424 - if (cimg::type<T>::is_float()) { const CImgStats st(img,false); min = (float)st.min; max = (float)st.max; }
6425 - else { min = (float)cimg::type<T>::min(); max = (float)cimg::type<T>::max(); }
6426 - } else if ((min>max) || normalization==1) { const CImgStats st(img,false); min = (float)st.min; max = (float)st.max; }
6427 - const float delta = max-min, mm = delta?delta:1.0f;
6428 - for (unsigned int xy = img.width*img.height; xy>0; xy--) {
6429 - const unsigned char
6430 - R = (unsigned char)(255*(*(data1++)-min)/mm),
6431 - G = (unsigned char)(255*(*(data2++)-min)/mm),
6432 - B = (unsigned char)(255*(*(data3++)-min)/mm);
6433 - *(ptrd++) = (R<<16) | (G<<8) | (B);
6434 - }
6435 - }
6436 - if (ndata!=data) { _render_resize(ndata,img.width,img.height,data,width,height); delete[] ndata; }
6437 - ReleaseMutex(mutex);
6438 - return *this;
6439 - }
6440 -
6441 - CImgDisplay& assign_lowlevel(const unsigned int dimw,const unsigned int dimh,const char *ptitle=0,
6442 - const unsigned int normalization_type=3,const unsigned int events_type=3,
6443 - const bool fullscreen_flag=false,const bool closed_flag=false) {
6444 -
6445 -
6446 - // Allocate space for window title
6447 - const int s = cimg::strlen(ptitle)+1;
6448 - char *tmp_title = s?new char[s]:0;
6449 - if (s) std::memcpy(tmp_title,ptitle,s*sizeof(char));
6450 -
6451 - // Destroy previous window if existing
6452 - if (width && height) _assign();
6453 -
6454 - // Set display variables
6455 - width = dimw;
6456 - height = dimh;
6457 - normalization = normalization_type%4;
6458 - events = events_type%4;
6459 - is_fullscreen = fullscreen_flag;
6460 - title = tmp_title;
6461 - window_x = window_y = wheel = 0;
6462 - mouse_x = mouse_y = -1;
6463 - std::memset((void*)buttons,0,256*sizeof(unsigned int));
6464 - std::memset((void*)keys,0,256*sizeof(unsigned int));
6465 - std::memset((void*)released_keys,0,256*sizeof(unsigned int));
6466 - is_resized = is_moved = is_event = false;
6467 - is_closed = closed_flag;
6468 - fps_timer = fps_frames = timer = 0;
6469 - fps_fps = 0;
6470 - visible_cursor = true;
6471 -
6472 - if (is_fullscreen) _init_fullscreen();
6473 -
6474 - // Create event thread
6475 - void *arg = (void*)(new void*[2]);
6476 - ((void**)arg)[0]=(void*)this;
6477 - ((void**)arg)[1]=(void*)title;
6478 - if (events) {
6479 - unsigned long ThreadID = 0;
6480 - mutex = CreateMutex(0,FALSE,0);
6481 - created = CreateEvent(0,FALSE,FALSE,0);
6482 - thread = CreateThread(0,0,_events_thread,arg,0,&ThreadID);
6483 - WaitForSingleObject(created,INFINITE);
6484 - } else _events_thread(arg);
6485 -
6486 - return *this;
6487 - }
6488 -
6489 - static LRESULT APIENTRY _handle_events(HWND window,UINT msg,WPARAM wParam,LPARAM lParam) {
6490 -#ifdef _WIN64
6491 - CImgDisplay* disp = (CImgDisplay*)GetWindowLongPtr(window,GWLP_USERDATA);
6492 -#else
6493 - CImgDisplay* disp = (CImgDisplay*)GetWindowLong(window,GWL_USERDATA);
6494 -#endif
6495 - MSG st_msg;
6496 -
6497 - switch(msg) {
6498 - case WM_CLOSE:
6499 - disp->mouse_x = disp->mouse_y = -1;
6500 - disp->window_x = disp->window_y = 0;
6501 - std::memmove((void*)(disp->buttons+1),(void*)disp->buttons,255);
6502 - std::memmove((void*)(disp->keys+1),(void*)disp->keys,255);
6503 - if (disp->key) {
6504 - std::memmove((void*)(disp->released_keys+1),(void*)disp->released_keys,255);
6505 - disp->released_key = disp->key;
6506 - }
6507 - disp->key = disp->button = 0;
6508 - disp->is_closed=true;
6509 - ReleaseMutex(disp->mutex);
6510 - ShowWindow(disp->window,SW_HIDE);
6511 - disp->is_event = true;
6512 - SetEvent(cimg::Win32attr().wait_event);
6513 - return 0;
6514 - case WM_SIZE: {
6515 - while (PeekMessage(&st_msg,window,WM_SIZE,WM_SIZE,PM_REMOVE));
6516 - WaitForSingleObject(disp->mutex,INFINITE);
6517 - const unsigned int nw = LOWORD(lParam),nh = HIWORD(lParam);
6518 - if (nw && nh && (nw!=disp->width || nh!=disp->height)) {
6519 - disp->window_width = nw;
6520 - disp->window_height = nh;
6521 - disp->mouse_x = disp->mouse_y = -1;
6522 - disp->is_resized = disp->is_event = true;
6523 - SetEvent(cimg::Win32attr().wait_event);
6524 - }
6525 - ReleaseMutex(disp->mutex);
6526 - } break;
6527 - case WM_MOVE: {
6528 - while (PeekMessage(&st_msg,window,WM_SIZE,WM_SIZE,PM_REMOVE));
6529 - WaitForSingleObject(disp->mutex,INFINITE);
6530 - const int nx = (int)(short)(LOWORD(lParam)), ny = (int)(short)(HIWORD(lParam));
6531 - if (nx!=disp->window_x || ny!=disp->window_y) {
6532 - disp->window_x = nx;
6533 - disp->window_y = ny;
6534 - disp->is_moved = disp->is_event = true;
6535 - SetEvent(cimg::Win32attr().wait_event);
6536 - }
6537 - ReleaseMutex(disp->mutex);
6538 - } break;
6539 - case WM_PAINT:
6540 - disp->paint();
6541 - break;
6542 - }
6543 - if (disp->events>=2) switch(msg) {
6544 - case WM_KEYDOWN:
6545 - std::memmove((void*)(disp->keys+1),(void*)disp->keys,255); disp->key = (int)wParam;
6546 - std::memmove((void*)(disp->released_keys+1),(void*)disp->released_keys,255); disp->released_key = 0;
6547 - disp->is_event = true;
6548 - SetEvent(cimg::Win32attr().wait_event);
6549 - break;
6550 - case WM_MOUSEMOVE: {
6551 - while (PeekMessage(&st_msg,window,WM_MOUSEMOVE,WM_MOUSEMOVE,PM_REMOVE));
6552 - disp->mouse_x = LOWORD(lParam);
6553 - disp->mouse_y = HIWORD(lParam);
6554 - if (disp->mouse_x<0 || disp->mouse_y<0 || disp->mouse_x>=disp->dimx() || disp->mouse_y>=disp->dimy())
6555 - disp->mouse_x=disp->mouse_y=-1;
6556 - disp->is_event = true;
6557 - SetEvent(cimg::Win32attr().wait_event);
6558 - } break;
6559 - case WM_LBUTTONDOWN:
6560 - std::memmove((void*)(disp->buttons+1),(void*)disp->buttons,255);
6561 - disp->button|=1U;
6562 - disp->is_event = true;
6563 - SetEvent(cimg::Win32attr().wait_event);
6564 - break;
6565 - case WM_RBUTTONDOWN:
6566 - std::memmove((void*)(disp->buttons+1),(void*)disp->buttons,255);
6567 - disp->button|=2U;
6568 - disp->is_event = true;
6569 - SetEvent(cimg::Win32attr().wait_event);
6570 - break;
6571 - case WM_MBUTTONDOWN:
6572 - std::memmove((void*)(disp->buttons+1),(void*)disp->buttons,255);
6573 - disp->button|=4U;
6574 - disp->is_event = true;
6575 - SetEvent(cimg::Win32attr().wait_event);
6576 - break;
6577 - case 0x020A: // WM_MOUSEWHEEL:
6578 - disp->wheel+=(int)((short)HIWORD(wParam))/120;
6579 - disp->is_event = true;
6580 - SetEvent(cimg::Win32attr().wait_event);
6581 - }
6582 - if (disp->events>=3) switch(msg) {
6583 - case WM_KEYUP:
6584 - std::memmove((void*)(disp->keys+1),(void*)disp->keys,255); disp->key = 0;
6585 - std::memmove((void*)(disp->released_keys+1),(void*)disp->released_keys,255); disp->released_key = (int)wParam;
6586 - disp->is_event = true;
6587 - SetEvent(cimg::Win32attr().wait_event);
6588 - break;
6589 - case WM_LBUTTONUP:
6590 - std::memmove((void*)(disp->buttons+1),(void*)disp->buttons,255);
6591 - disp->button&=~1U;
6592 - disp->is_event = true;
6593 - SetEvent(cimg::Win32attr().wait_event);
6594 - break;
6595 - case WM_RBUTTONUP:
6596 - std::memmove((void*)(disp->buttons+1),(void*)disp->buttons,255);
6597 - disp->button&=~2U;
6598 - disp->is_event = true;
6599 - SetEvent(cimg::Win32attr().wait_event);
6600 - break;
6601 - case WM_MBUTTONUP:
6602 - std::memmove((void*)(disp->buttons+1),(void*)disp->buttons,255);
6603 - disp->button&=~4U;
6604 - disp->is_event = true;
6605 - SetEvent(cimg::Win32attr().wait_event);
6606 - break;
6607 - case WM_SETCURSOR:
6608 - if (disp->visible_cursor) ShowCursor(TRUE);
6609 - else ShowCursor(FALSE);
6610 - break;
6611 - }
6612 - return DefWindowProc(window,msg,wParam,lParam);
6613 - }
6614 -
6615 - static DWORD WINAPI _events_thread(void* arg) {
6616 - CImgDisplay *disp = (CImgDisplay*)(((void**)arg)[0]);
6617 - const char *title = (const char*)(((void**)arg)[1]);
6618 - MSG msg;
6619 - delete[] (void**)arg;
6620 - disp->bmi.bmiHeader.biSize=sizeof(BITMAPINFOHEADER);
6621 - disp->bmi.bmiHeader.biWidth=disp->width;
6622 - disp->bmi.bmiHeader.biHeight=-(int)disp->height;
6623 - disp->bmi.bmiHeader.biPlanes=1;
6624 - disp->bmi.bmiHeader.biBitCount=32;
6625 - disp->bmi.bmiHeader.biCompression=BI_RGB;
6626 - disp->bmi.bmiHeader.biSizeImage=0;
6627 - disp->bmi.bmiHeader.biXPelsPerMeter=1;
6628 - disp->bmi.bmiHeader.biYPelsPerMeter=1;
6629 - disp->bmi.bmiHeader.biClrUsed=0;
6630 - disp->bmi.bmiHeader.biClrImportant=0;
6631 - disp->data = new unsigned int[disp->width*disp->height];
6632 - if (!disp->is_fullscreen) { // Normal window
6633 - RECT rect;
6634 - rect.left=rect.top=0; rect.right=disp->width-1; rect.bottom=disp->height-1;
6635 - AdjustWindowRect(&rect,WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,false);
6636 - const int border1 = (rect.right-rect.left+1-disp->width)/2, border2 = rect.bottom-rect.top+1-disp->height-border1;
6637 - disp->window = CreateWindowA("MDICLIENT",title?title:" ",
6638 - WS_OVERLAPPEDWINDOW | (disp->is_closed?0:WS_VISIBLE), CW_USEDEFAULT,CW_USEDEFAULT,
6639 - disp->width + 2*border1, disp->height + border1 + border2,
6640 - 0,0,0,&(disp->ccs));
6641 - if (!disp->is_closed) {
6642 - GetWindowRect(disp->window,&rect);
6643 - disp->window_x = rect.left + border1;
6644 - disp->window_y = rect.top + border2;
6645 - } else disp->window_x = disp->window_y = 0;
6646 - } else { // Fullscreen window
6647 - const unsigned int sx = screen_dimx(), sy = screen_dimy();
6648 - disp->window = CreateWindowA("MDICLIENT",title?title:" ",
6649 - WS_POPUP | (disp->is_closed?0:WS_VISIBLE), (sx-disp->width)/2, (sy-disp->height)/2,
6650 - disp->width,disp->height,0,0,0,&(disp->ccs));
6651 - disp->window_x = disp->window_y = 0;
6652 - }
6653 - SetForegroundWindow(disp->window);
6654 - disp->hdc = GetDC(disp->window);
6655 - disp->window_width = disp->width;
6656 - disp->window_height = disp->height;
6657 - disp->mouse_x = disp->mouse_y = -1;
6658 - disp->wheel = 0;
6659 - std::memset((void*)disp->buttons,0,256*sizeof(unsigned int));
6660 - std::memset((void*)disp->keys,0,256*sizeof(unsigned int));
6661 - std::memset((void*)disp->released_keys,0,256*sizeof(unsigned int));
6662 - disp->is_resized = disp->is_moved = disp->is_event = false;
6663 - if (disp->events) {
6664 -#ifdef _WIN64
6665 - SetWindowLongPtr(disp->window,GWLP_USERDATA,(LONG_PTR)disp);
6666 - SetWindowLongPtr(disp->window,GWLP_WNDPROC,(LONG_PTR)_handle_events);
6667 -#else
6668 - SetWindowLong(disp->window,GWL_USERDATA,(LONG)disp);
6669 - SetWindowLong(disp->window,GWL_WNDPROC,(LONG)_handle_events);
6670 -#endif
6671 - SetEvent(disp->created);
6672 - while( GetMessage(&msg,0,0,0) ) DispatchMessage( &msg );
6673 - }
6674 - return 0;
6675 - }
6676 -
6677 - void _init_fullscreen() {
6678 - background_window = 0;
6679 - if (is_fullscreen && !is_closed) {
6680 - DEVMODE mode;
6681 - unsigned int imode=0, ibest=0, bestbpp=0, bw=~0U, bh=~0U;
6682 - for (mode.dmSize = sizeof(DEVMODE), mode.dmDriverExtra = 0; EnumDisplaySettings(0,imode,&mode); imode++) {
6683 - const unsigned int nw = mode.dmPelsWidth, nh = mode.dmPelsHeight;
6684 - if (nw>=width && nh>=height && mode.dmBitsPerPel>=bestbpp && nw<=bw && nh<=bh) {
6685 - bestbpp = mode.dmBitsPerPel;
6686 - ibest = imode;
6687 - bw = nw; bh = nh;
6688 - }
6689 - }
6690 - if (bestbpp) {
6691 - curr_mode.dmSize = sizeof(DEVMODE); curr_mode.dmDriverExtra = 0;
6692 - EnumDisplaySettings(0,ENUM_CURRENT_SETTINGS,&curr_mode);
6693 - EnumDisplaySettings(0,ibest,&mode);
6694 - ChangeDisplaySettings(&mode,0);
6695 - } else curr_mode.dmSize = 0;
6696 -
6697 - const unsigned int sx = screen_dimx(), sy = screen_dimy();
6698 - if (sx!=width || sy!=height) {
6699 - CLIENTCREATESTRUCT background_ccs;
6700 - background_window = CreateWindowA("MDICLIENT"," ",WS_POPUP | WS_VISIBLE, 0,0,sx,sy,0,0,0,&background_ccs);
6701 - SetForegroundWindow(background_window);
6702 - }
6703 - } else curr_mode.dmSize = 0;
6704 - }
6705 -
6706 - void _desinit_fullscreen() {
6707 - if (is_fullscreen) {
6708 - if (background_window) DestroyWindow(background_window);
6709 - background_window = 0;
6710 - if (curr_mode.dmSize) ChangeDisplaySettings(&curr_mode,0);
6711 - is_fullscreen = false;
6712 - }
6713 - }
6714 -
6715 -#endif
6716 -
6717 - };
6718 -
6719 - /*
6720 - #--------------------------------------
6721 - #
6722 - #
6723 - #
6724 - # Definition of the CImg<T> structure
6725 - #
6726 - #
6727 - #
6728 - #--------------------------------------
6729 - */
6730 -
6731 - //! Class representing an image (up to 4 dimensions wide), each pixel being of type \c T.
6732 - /**
6733 - This is the main class of the %CImg Library. It declares and constructs
6734 - an image, allows access to its pixel values, and is able to perform various image operations.
6735 -
6736 - \par Image representation
6737 -
6738 - A %CImg image is defined as an instance of the container \ref CImg<T>, which contains a regular grid of pixels,
6739 - each pixel value being of type \c T. The image grid can have up to 4 dimensions : width, height, depth
6740 - and number of channels.
6741 - Usually, the three first dimensions are used to describe spatial coordinates <tt>(x,y,z)</tt>, while the number of channels
6742 - is rather used as a vector-valued dimension (it may describe the R,G,B color channels for instance).
6743 - If you need a fifth dimension, you can use image lists \ref CImgList<T> rather than simple images \ref CImg<T>.
6744 -
6745 - Thus, the \ref CImg<T> class is able to represent volumetric images of vector-valued pixels,
6746 - as well as images with less dimensions (1D scalar signal, 2D color images, ...).
6747 - Most member functions of the class CImg<T> are designed to handle this maximum case of (3+1) dimensions.
6748 -
6749 - Concerning the pixel value type \c T :
6750 - fully supported template types are the basic C++ types : <tt>unsigned char, char, short, unsigned int, int,
6751 - unsigned long, long, float, double, ... </tt>.
6752 - Typically, fast image display can be done using <tt>CImg<unsigned char></tt> images,
6753 - while complex image processing algorithms may be rather coded using <tt>CImg<float></tt> or <tt>CImg<double></tt>
6754 - images that have floating-point pixel values. The default value for the template T is \c float.
6755 - Using your own template types may be possible. However, you will certainly have to define the complete set
6756 - of arithmetic and logical operators for your class.
6757 -
6758 - \par Image structure
6759 -
6760 - The \ref CImg<\c T> structure contains \a five fields :
6761 - - \ref width defines the number of \a columns of the image (size along the X-axis).
6762 - - \ref height defines the number of \a rows of the image (size along the Y-axis).
6763 - - \ref depth defines the number of \a slices of the image (size along the Z-axis).
6764 - - \ref dim defines the number of \a channels of the image (size along the V-axis).
6765 - - \ref data defines a \a pointer to the \a pixel \a data (of type \c T).
6766 -
6767 - You can access these fields publicly although it is recommended to use the dedicated functions
6768 - dimx(), dimy(), dimz(), dimv() and ptr() to do so.
6769 - Image dimensions are not limited to a specific range (as long as you got enough available memory).
6770 - A value of \e 1 usually means that the corresponding dimension is \a flat.
6771 - If one of the dimensions is \e 0, or if the data pointer is null, the image is considered as \e empty.
6772 - Empty images should not contain any pixel data and thus, will not be processed by CImg member functions
6773 - (a CImgInstanceException will be thrown instead).
6774 - Pixel data are stored in memory, in a non interlaced mode (See \ref cimg_storage).
6775 -
6776 - \par Image declaration and construction
6777 -
6778 - Declaring an image can be done by using one of the several available constructors.
6779 - Here is a list of the most used :
6780 -
6781 - - Construct images from arbitrary dimensions :
6782 - - <tt>CImg<char> img;</tt> declares an empty image.
6783 - - <tt>CImg<unsigned char> img(128,128);</tt> declares a 128x128 greyscale image with
6784 - \c unsigned \c char pixel values.
6785 - - <tt>CImg<double> img(3,3);</tt> declares a 3x3 matrix with \c double coefficients.
6786 - - <tt>CImg<unsigned char> img(256,256,1,3);</tt> declares a 256x256x1x3 (color) image
6787 - (colors are stored as an image with three channels).
6788 - - <tt>CImg<double> img(128,128,128);</tt> declares a 128x128x128 volumetric and greyscale image
6789 - (with \c double pixel values).
6790 - - <tt>CImg<> img(128,128,128,3);</tt> declares a 128x128x128 volumetric color image
6791 - (with \c float pixels, which is the default value of the template parameter \c T).
6792 - - \b Note : images pixels are <b>not automatically initialized to 0</b>. You may use the function \ref fill() to
6793 - do it, or use the specific constructor taking 5 parameters like this :
6794 - <tt>CImg<> img(128,128,128,3,0);</tt> declares a 128x128x128 volumetric color image with all pixel values to 0.
6795 -
6796 - - Construct images from filenames :
6797 - - <tt>CImg<unsigned char> img("image.jpg");</tt> reads a JPEG color image from the file "image.jpg".
6798 - - <tt>CImg<float> img("analyze.hdr");</tt> reads a volumetric image (ANALYZE7.5 format) from the file "analyze.hdr".
6799 - - \b Note : You need to install <a href="http://www.imagemagick.org">ImageMagick</a>
6800 - to be able to read common compressed image formats (JPG,PNG,...) (See \ref cimg_files_io).
6801 -
6802 - - Construct images from C-style arrays :
6803 - - <tt>CImg<int> img(data_buffer,256,256);</tt> constructs a 256x256 greyscale image from a \c int* buffer
6804 - \c data_buffer (of size 256x256=65536).
6805 - - <tt>CImg<unsigned char> img(data_buffer,256,256,1,3,false);</tt> constructs a 256x256 color image
6806 - from a \c unsigned \c char* buffer \c data_buffer (where R,G,B channels follow each others).
6807 - - <tt>CImg<unsigned char> img(data_buffer,256,256,1,3,true);</tt> constructs a 256x256 color image
6808 - from a \c unsigned \c char* buffer \c data_buffer (where R,G,B channels are multiplexed).
6809 -
6810 - The complete list of constructors can be found <a href="#constructors">here</a>.
6811 -
6812 - \par Most useful functions
6813 -
6814 - The \ref CImg<T> class contains a lot of functions that operates on images.
6815 - Some of the most useful are :
6816 -
6817 - - operator()(), operator[]() : allows to access or write pixel values.
6818 - - display() : displays the image in a new window.
6819 -
6820 - \sa CImgList, CImgStats, CImgDisplay, CImgException.
6821 -
6822 - **/
6823 - template<typename T> struct CImg {
6824 -
6825 - //! Variable representing the width of the instance image (i.e. dimensions along the X-axis).
6826 - /**
6827 - \remark
6828 - - Prefer using the function CImg<T>::dimx() to get information about the width of an image.
6829 - - Use function CImg<T>::resize() to set a new width for an image. Setting directly the variable \c width would probably
6830 - result in a library crash.
6831 - - Empty images have \c width defined to \c 0.
6832 - **/
6833 - unsigned int width;
6834 -
6835 - //! Variable representing the height of the instance image (i.e. dimensions along the Y-axis).
6836 - /**
6837 - \remark
6838 - - Prefer using the function CImg<T>::dimy() to get information about the height of an image.
6839 - - Use function CImg<T>::resize() to set a new height for an image. Setting directly the variable \c height would probably
6840 - result in a library crash.
6841 - - 1D signals have \c height defined to \c 1.
6842 - - Empty images have \c height defined to \c 0.
6843 - **/
6844 - unsigned int height;
6845 -
6846 - //! Variable representing the depth of the instance image (i.e. dimensions along the Z-axis).
6847 - /**
6848 - \remark
6849 - - Prefer using the function CImg<T>::dimz() to get information about the depth of an image.
6850 - - Use function CImg<T>::resize() to set a new depth for an image. Setting directly the variable \c depth would probably
6851 - result in a library crash.
6852 - - Classical 2D images have \c depth defined to \c 1.
6853 - - Empty images have \c depth defined to \c 0.
6854 - **/
6855 - unsigned int depth;
6856 -
6857 - //! Variable representing the number of channels of the instance image (i.e. dimensions along the V-axis).
6858 - /**
6859 - \remark
6860 - - Prefer using the function CImg<T>::dimv() to get information about the depth of an image.
6861 - - Use function CImg<T>::resize() to set a new vector dimension for an image. Setting directly the variable \c dim would probably
6862 - result in a library crash.
6863 - - Scalar-valued images (one value per pixel) have \c dim defined to \c 1.
6864 - - Empty images have \c depth defined to \c 0.
6865 - **/
6866 - unsigned int dim;
6867 -
6868 - //! Variable telling if pixel buffer of the instance image is shared with another one.
6869 - bool is_shared;
6870 -
6871 - //! Pointer to the first pixel of the pixel buffer.
6872 - T *data;
6873 -
6874 - //! Iterator type for CImg<T>.
6875 - /**
6876 - \remark
6877 - - An \p iterator is a <tt>T*</tt> pointer (address of a pixel value in the pixel buffer).
6878 - - Iterators are not directly used in %CImg functions, they have been introduced for compatibility with the STL.
6879 - **/
6880 - typedef T* iterator;
6881 -
6882 - //! Const iterator type for CImg<T>.
6883 - /**
6884 - \remark
6885 - - A \p const_iterator is a <tt>const T*</tt> pointer (address of a pixel value in the pixel buffer).
6886 - - Iterators are not directly used in %CImg functions, they have been introduced for compatibility with the STL.
6887 - **/
6888 - typedef const T* const_iterator;
6889 -
6890 - //! Get value type
6891 - typedef T value_type;
6892 -
6893 - //@}
6894 - //---------------------------
6895 - //
6896 - //! \name Plugins
6897 - //@{
6898 - //---------------------------
6899 -#ifdef cimg_plugin
6900 -#include cimg_plugin
6901 -#endif
6902 - //@}
6903 -
6904 - //--------------------------------------
6905 - //
6906 - //! \name Constructors-Destructor-Copy
6907 - //@{
6908 - //--------------------------------------
6909 -
6910 - //! Default constructor.
6911 - /**
6912 - The default constructor creates an empty instance image.
6913 - \remark
6914 - - An empty image does not contain any data and has all of its dimensions \ref width, \ref height, \ref depth, \ref dim
6915 - set to 0 as well as its pointer to the pixel buffer \ref data.
6916 - - An empty image is non-shared.
6917 - \see ~CImg(), assign(), is_empty().
6918 - **/
6919 - CImg():
6920 - width(0),height(0),depth(0),dim(0),is_shared(false),data(0) {}
6921 -
6922 - //! Destructor.
6923 - /**
6924 - The destructor destroys the instance image.
6925 - \remark
6926 - - Destructing an empty or shared image does nothing.
6927 - - Otherwise, all memory used to store the pixel data of the instance image is freed.
6928 - - When destroying a non-shared image, be sure that every shared instances of the same image are
6929 - also destroyed to avoid further access to desallocated memory buffers.
6930 - \see CImg(), assign(), is_empty().
6931 - **/
6932 - ~CImg() {
6933 - if (data && !is_shared) delete[] data;
6934 - }
6935 -
6936 - //! In-place version of the default constructor.
6937 - /**
6938 - This function replaces the instance image by an empty image.
6939 - \remark
6940 - - Memory used by the previous content of the instance image is freed if necessary.
6941 - - If the instance image was initially shared, it is replaced by a (non-shared) empty image.
6942 - - This function is useful to free memory used by an image that is not of use, but which
6943 - has been created in the current code scope (i.e. not destroyed yet).
6944 - \see ~CImg(), assign(), is_empty().
6945 - **/
6946 - CImg& assign() {
6947 - if (data && !is_shared) delete[] data;
6948 - width = height = depth = dim = 0; is_shared = false; data = 0;
6949 - return *this;
6950 - }
6951 -
6952 - //! In-place version of the default constructor.
6953 - /**
6954 - This function is strictly equivalent to \ref assign() and has been
6955 - introduced for having a STL-compliant function name.
6956 - \see assign().
6957 - **/
6958 - CImg& clear() {
6959 - return assign();
6960 - }
6961 -
6962 - //! Default copy constructor.
6963 - /**
6964 - The default copy constructor creates a new instance image having same dimensions
6965 - (\ref width, \ref height, \ref depth, \ref dim) and same pixel values as the input image \p img.
6966 - \param img The input image to copy.
6967 - \remark
6968 - - If the input image \p img is non-shared or have a different template type \p t != \p T,
6969 - the default copy constructor allocates a new pixel buffer and copy the pixel data
6970 - of \p img into it. In this case, the pointers \ref data to the pixel buffers of the two images are different
6971 - and the resulting instance image is non-shared.
6972 - - If the input image \p img is shared and has the same template type \p t == \p T,
6973 - the default copy constructor does not allocate a new pixel buffer and the resulting instance image
6974 - shares its pixel buffer with the input image \p img, which means that modifying pixels of \p img also modifies
6975 - the created instance image.
6976 - - Copying an image having a different template type \p t != \p T performs a crude static cast conversion of each pixel value from
6977 - type \p t to type \p T.
6978 - - Copying an image having the same template type \p t == \p T is significantly faster.
6979 - \see assign(const CImg< t >&), CImg(const CImg< t >&,const bool).
6980 - **/
6981 - template<typename t> CImg(const CImg<t>& img):is_shared(false) {
6982 - const unsigned int siz = img.size();
6983 - if (img.data && siz) {
6984 - width = img.width; height = img.height; depth = img.depth; dim = img.dim; data = new T[siz];
6985 - const t *ptrs = img.data+siz; cimg_for(*this,ptrd,T) *ptrd = (T)*(--ptrs);
6986 - } else { width = height = depth = dim = 0; data = 0; }
6987 - }
6988 -
6989 - CImg(const CImg& img) {
6990 - const unsigned int siz = img.size();
6991 - if (img.data && siz) {
6992 - width = img.width; height = img.height; depth = img.depth; dim = img.dim; is_shared = img.is_shared;
6993 - if (is_shared) data = const_cast<T*>(img.data);
6994 - else { data = new T[siz]; std::memcpy(data,img.data,siz*sizeof(T)); }
6995 - } else { width = height = depth = dim = 0; is_shared = false; data = 0; }
6996 - }
6997 -
6998 - //! In-place version of the default copy constructor.
6999 - /**
7000 - This function assigns a copy of the input image \p img to the current instance image.
7001 - \param img The input image to copy.
7002 - \remark
7003 - - If the instance image is not shared, the content of the input image \p img is copied into a new buffer
7004 - becoming the new pixel buffer of the instance image, while the old pixel buffer is freed if necessary.
7005 - - If the instance image is shared, the content of the input image \p img is copied into the current (shared) pixel buffer
7006 - of the instance image, modifying then the image referenced by the shared instance image. The instance image still remains shared.
7007 - \see CImg(const CImg< t >&), operator=(const CImg< t >&).
7008 - **/
7009 - template<typename t> CImg& assign(const CImg<t>& img) {
7010 - return assign(img.data,img.width,img.height,img.depth,img.dim);
7011 - }
7012 -
7013 - //! Advanced copy constructor.
7014 - /**
7015 - The advanced copy constructor - as the default constructor CImg(const CImg< t >&) - creates a new instance image having same dimensions
7016 - \ref width, \ref height, \ref depth, \ref dim and same pixel values as the input image \p img.
7017 - But it also decides if the created instance image shares its memory with the input image \p img (if the input parameter
7018 - \p shared is set to \p true) or not (if the input parameter \p shared is set to \p false).
7019 - \param img The input image to copy.
7020 - \param shared Boolean flag that decides if the copy is shared on non-shared.
7021 - \remark
7022 - - It is not possible to create a shared copy if the input image \p img is empty or has a different pixel type \p t != \p T.
7023 - - If a non-shared copy of the input image \p img is created, a new memory buffer is allocated for pixel data.
7024 - - If a shared copy of the input image \p img is created, no extra memory is allocated and the pixel buffer of the instance
7025 - image is the same as the one used by the input image \p img.
7026 - \see CImg(const CImg< t >&), assign(const CImg< t >&,const bool).
7027 - **/
7028 - template<typename t> CImg(const CImg<t>& img, const bool shared):is_shared(false) {
7029 - if (shared) throw CImgArgumentException("CImg<%s>::CImg() : Cannot construct a shared copy from a CImg<%s> image "
7030 - "(different pixel types).",pixel_type(),CImg<t>::pixel_type());
7031 - const unsigned int siz = img.size();
7032 - if (img.data && siz) {
7033 - width = img.width; height = img.height; depth = img.depth; dim = img.dim; data = new T[siz];
7034 - const t *ptrs = img.data+siz; cimg_for(*this,ptrd,T) *ptrd = (T)*(--ptrs);
7035 - } else { width = height = depth = dim = 0; data = 0; }
7036 - }
7037 -
7038 - CImg(const CImg& img, const bool shared) {
7039 - const unsigned int siz = img.size();
7040 - if (img.data && siz) {
7041 - width = img.width; height = img.height; depth = img.depth; dim = img.dim; is_shared = shared;
7042 - if (is_shared) data = const_cast<T*>(img.data);
7043 - else { data = new T[siz]; std::memcpy(data,img.data,siz*sizeof(T)); }
7044 - } else { width = height = depth = dim = 0; is_shared = false; data = 0; }
7045 - }
7046 -
7047 - //! In-place version of the advanced constructor.
7048 - /**
7049 - This function - as the simpler function assign(const CImg< t >&) - assigns a copy of the input image \p img to the
7050 - current instance image. But it also decides if the copy is shared (if the input parameter \p shared is set to \true) or non-shared
7051 - (if the input parameter \p shared is set to false).
7052 - \param img The input image to copy.
7053 - \param shared Boolean flag that decides if the copy is shared or non-shared.
7054 - \remark
7055 - - It is not possible to assign a shared copy if the input image \p img is empty or has a different pixel type \p t != \p T.
7056 - - If a non-shared copy of the input image \p img is assigned, a new memory buffer is allocated for pixel data.
7057 - - If a shared copy of the input image \p img is assigned, no extra memory is allocated and the pixel buffer of the instance
7058 - image is the same as the one used by the input image \p img.
7059 - \see CImg(const CImg< t >&,const bool), assign(const CImg< t >&).
7060 - **/
7061 - template<typename t> CImg& assign(const CImg<t>& img, const bool shared) {
7062 - return assign(img.data,img.width,img.height,img.depth,img.dim,shared);
7063 - }
7064 -
7065 - //! Constructs a new image with given size (\p dx,\p dy,\p dz,\p dv).
7066 - /**
7067 - This constructors create an instance image of size (\p dx,\p dy,\p dz,\p dv) with pixels of type \p T.
7068 - \param dx Desired size along the X-axis, i.e. the \ref width of the image.
7069 - \param dy Desired size along the Y-axis, i.e. the \ref height of the image.
7070 - \param dz Desired size along the Z-axis, i.e. the \ref depth of the image.
7071 - \param dv Desired size along the V-axis, i.e. the number of image channels \ref dim.
7072 - \remark
7073 - - If one of the input dimension \p dx,\p dy,\p dz or \p dv is set to 0, the created image is empty
7074 - and all has its dimensions set to 0. No memory for pixel data is then allocated.
7075 - - This constructor creates only non-shared images.
7076 - - Image pixels allocated by this constructor are \b not \b initialized.
7077 - Use the constructor CImg(const unsigned int,const unsigned int,const unsigned int,const unsigned int,const T&)
7078 - to get an image of desired size with pixels set to a particular value.
7079 - \see assign(const unsigned int,const unsigned int,const unsigned int,const unsigned int),
7080 - CImg(const unsigned int,const unsigned int,const unsigned int,const unsigned int,const T&).
7081 - **/
7082 - explicit CImg(const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const unsigned int dv=1):
7083 - is_shared(false) {
7084 - const unsigned int siz = dx*dy*dz*dv;
7085 - if (siz) { width = dx; height = dy; depth = dz; dim = dv; data = new T[siz]; }
7086 - else { width = height = depth = dim = 0; data = 0; }
7087 - }
7088 -
7089 - //! In-place version of the previous constructor.
7090 - /**
7091 - This function replaces the instance image by a new image of size (\p dx,\p dy,\p dz,\p dv) with pixels of type \p T.
7092 - \param dx Desired size along the X-axis, i.e. the \ref width of the image.
7093 - \param dy Desired size along the Y-axis, i.e. the \ref height of the image.
7094 - \param dz Desired size along the Z-axis, i.e. the \ref depth of the image.
7095 - \param dv Desired size along the V-axis, i.e. the number of image channels \p dim.
7096 - - If one of the input dimension \p dx,\p dy,\p dz or \p dv is set to 0, the instance image becomes empty
7097 - and all has its dimensions set to 0. No memory for pixel data is then allocated.
7098 - - Memory buffer used to store previous pixel values is freed if necessary.
7099 - - If the instance image is shared, this constructor actually does nothing more than verifying
7100 - that new and old image dimensions fit.
7101 - - Image pixels allocated by this function are \b not \b initialized.
7102 - Use the function assign(const unsigned int,const unsigned int,const unsigned int,const unsigned int,const T&)
7103 - to assign an image of desired size with pixels set to a particular value.
7104 - \see CImg(), assign(const unsigned int,const unsigned int,const unsigned int,const unsigned int).
7105 - **/
7106 - CImg& assign(const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const unsigned int dv=1) {
7107 - const unsigned long siz = dx*dy*dz*dv, curr_siz = size();
7108 - if (is_shared) {
7109 - if (siz!=curr_siz)
7110 - throw CImgArgumentException("CImg<%s>::assign() : Cannot assign image (%u,%u,%u,%u) to shared instance image (%u,%u,%u,%u,%p).",
7111 - pixel_type(),dx,dy,dz,dv,width,height,depth,dim,data);
7112 - } else {
7113 - if (siz) {
7114 - if (siz!=curr_siz) { if (data) delete[] data; data = new T[siz]; }
7115 - width = dx; height = dy; depth = dz; dim = dv;
7116 - } else {
7117 - if (data) delete[] data;
7118 - width = height = depth = dim = 0; data = 0;
7119 - }
7120 - }
7121 - return *this;
7122 - }
7123 -
7124 - //! Construct an image with given size (\p dx,\p dy,\p dz,\p dv) and with pixel having a default value \p val.
7125 - /**
7126 - This constructor creates an instance image of size (\p dx,\p dy,\p dz,\p dv) with pixels of type \p T and sets all pixel
7127 - values of the created instance image to \p val.
7128 - \param dx Desired size along the X-axis, i.e. the \ref width of the image.
7129 - \param dy Desired size along the Y-axis, i.e. the \ref height of the image.
7130 - \param dz Desired size along the Z-axis, i.e. the \ref depth of the image.
7131 - \param dv Desired size along the V-axis, i.e. the number of image channels \p dim.
7132 - \param val Default value for image pixels.
7133 - \remark
7134 - - This constructor has the same properties as CImg(const unsigned int,const unsigned int,const unsigned int,const unsigned int).
7135 - \see CImg(const unsigned int,const unsigned int,const unsigned int,const unsigned int).
7136 - **/
7137 - CImg(const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dv, const T& val):
7138 - is_shared(false) {
7139 - const unsigned int siz = dx*dy*dz*dv;
7140 - if (siz) { width = dx; height = dy; depth = dz; dim = dv; data = new T[siz]; fill(val); }
7141 - else { width = height = depth = dim = 0; data = 0; }
7142 - }
7143 -
7144 - //! In-place version of the previous constructor.
7145 - /**
7146 - This function replaces the instance image by a new image of size (\p dx,\p dy,\p dz,\p dv) with pixels of type \p T
7147 - and sets all pixel values of the instance image to \p val.
7148 - \param dx Desired size along the X-axis, i.e. the \ref width of the image.
7149 - \param dy Desired size along the Y-axis, i.e. the \ref height of the image.
7150 - \param dz Desired size along the Z-axis, i.e. the \ref depth of the image.
7151 - \param dv Desired size along the V-axis, i.e. the number of image channels \p dim.
7152 - \param val Default value for image pixels.
7153 - \remark
7154 - - This function has the same properties as assign(const unsigned int,const unsigned int,const unsigned int,const unsigned int).
7155 - \see assign(const unsigned int,const unsigned int,const unsigned int,const unsigned int).
7156 - **/
7157 - CImg& assign(const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dv, const T& val) {
7158 - return assign(dx,dy,dz,dv).fill(val);
7159 - }
7160 -
7161 - //! Construct an image from an image file.
7162 - /**
7163 - This constructor creates an instance image by reading it from a file.
7164 - \param filename Filename of the image file.
7165 - \remark
7166 - - The image format is deduced from the filename only by looking for the filename extension i.e. without
7167 - analyzing the file itself.
7168 - - Recognized image formats depend on the tools installed on your system or the external libraries you use to link your code with.
7169 - More informations on this topic can be found in cimg_files_io.
7170 - - If the filename is not found, a CImgIOException is thrown by this constructor.
7171 - \see assign(const char *const), load(const char *const)
7172 - **/
7173 - CImg(const char *const filename):width(0),height(0),depth(0),dim(0),is_shared(false),data(0) {
7174 - assign(filename);
7175 - }
7176 -
7177 - //! In-place version of the previous constructor.
7178 - /**
7179 - This function replaces the instance image by the one that have been read from the given file.
7180 - \param filename Filename of the image file.
7181 - - The image format is deduced from the filename only by looking for the filename extension i.e. without
7182 - analyzing the file itself.
7183 - - Recognized image formats depend on the tools installed on your system or the external libraries you use to link your code with.
7184 - More informations on this topic can be found in cimg_files_io.
7185 - - If the filename is not found, a CImgIOException is thrown by this constructor.
7186 - **/
7187 - CImg& assign(const char *const filename) {
7188 - return load(filename);
7189 - }
7190 -
7191 - //! Construct an image from raw memory buffer.
7192 - /**
7193 - This constructor creates an instance image of size (\p dx,\p dy,\p dz,\p dv) and fill its pixel buffer by
7194 - copying data values from the input raw pixel buffer \p data_buffer.
7195 - **/
7196 - template<typename t> CImg(const t *const data_buffer, const unsigned int dx, const unsigned int dy=1,
7197 - const unsigned int dz=1, const unsigned int dv=1, const bool shared=false):is_shared(false) {
7198 - if (shared) throw CImgArgumentException("CImg<%s>::CImg() : Cannot construct a shared copy from a (%s*) buffer "
7199 - "(different pixel types).",pixel_type(),CImg<t>::pixel_type());
7200 - const unsigned int siz = dx*dy*dz*dv;
7201 - if (data_buffer && siz) {
7202 - width = dx; height = dy; depth = dz; dim = dv; data = new T[siz];
7203 - const t *ptrs = data_buffer+siz; cimg_for(*this,ptrd,T) *ptrd = (T)*(--ptrs);
7204 - } else { width = height = depth = dim = 0; data = 0; }
7205 - }
7206 -
7207 -#ifdef cimg_use_visualcpp6
7208 - CImg(const T *const data_buffer, const unsigned int dx, const unsigned int dy,
7209 - const unsigned int dz, const unsigned int dv, const bool shared) {
7210 -#else
7211 - CImg(const T *const data_buffer, const unsigned int dx, const unsigned int dy=1,
7212 - const unsigned int dz=1, const unsigned int dv=1, const bool shared=false) {
7213 -#endif
7214 - const unsigned int siz = dx*dy*dz*dv;
7215 - if (data_buffer && siz) {
7216 - width = dx; height = dy; depth = dz; dim = dv; is_shared = shared;
7217 - if (is_shared) data = const_cast<T*>(data_buffer);
7218 - else { data = new T[siz]; std::memcpy(data,data_buffer,siz*sizeof(T)); }
7219 - } else { width = height = depth = dim = 0; is_shared = false; data = 0; }
7220 - }
7221 -
7222 - template<typename t> CImg(const t *const data_buffer, const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1) {
7223 -
7224 - }
7225 -
7226 - //! In-place version of the previous constructor.
7227 -#ifdef cimg_use_visualcpp6
7228 - template<typename t> CImg& assign(const t *const data_buffer, const unsigned int dx, const unsigned int dy,
7229 - const unsigned int dz, const unsigned int dv) {
7230 -#else
7231 - template<typename t> CImg& assign(const t *const data_buffer, const unsigned int dx, const unsigned int dy=1,
7232 - const unsigned int dz=1, const unsigned int dv=1) {
7233 -#endif
7234 - assign(dx,dy,dz,dv);
7235 - const unsigned int siz = dx*dy*dz*dv;
7236 - if (data_buffer && siz) { const t *ptrs = data_buffer+siz; cimg_for(*this,ptrd,T) *ptrd = (T)*(--ptrs); }
7237 - else { width = height = depth = dim = 0; is_shared = false; data = 0; }
7238 - return *this;
7239 - }
7240 -
7241 - CImg& assign(const T *const data_buffer, const unsigned int dx, const unsigned int dy=1,
7242 - const unsigned int dz=1, const unsigned int dv=1) {
7243 - assign(dx,dy,dz,dv);
7244 - const unsigned int siz = dx*dy*dz*dv;
7245 - if (data_buffer && siz) std::memcpy(data,data_buffer,siz*sizeof(T));
7246 - else { width = height = depth = dim = 0; is_shared = false; data = 0; }
7247 - return *this;
7248 - }
7249 -
7250 - //! In-place version of the previous constructor, allowing to force the shared state of the instance image.
7251 - template<typename t> CImg& assign(const t *const data_buffer, const unsigned int dx, const unsigned int dy,
7252 - const unsigned int dz, const unsigned int dv, const bool shared) {
7253 - if (shared) throw CImgArgumentException("CImg<%s>::assign() : Cannot define a shared copy from a CImg<%s> image "
7254 - "(different pixel types).",pixel_type(),CImg<t>::pixel_type());
7255 - if (data && !is_shared) delete[] data;
7256 - is_shared = false;
7257 - const unsigned int siz = dx*dy*dz*dv;
7258 - if (data_buffer && siz) {
7259 - width = dx; height = dy; depth = dz; dim = dv; data = new T[siz];
7260 - const t *ptrs = data_buffer+siz; cimg_for(*this,ptrd,T) *ptrd = (T)*(--ptrs);
7261 - } else { width = height = depth = dim = 0; data = 0; }
7262 - return *this;
7263 - }
7264 -
7265 - CImg& assign(const T *const data_buffer, const unsigned int dx, const unsigned int dy,
7266 - const unsigned int dz, const unsigned int dv, const bool shared) {
7267 - if (data && !is_shared) delete[] data;
7268 - const unsigned int siz = dx*dy*dz*dv;
7269 - if (data_buffer && siz) {
7270 - width = dx; height = dy; depth = dz; dim = dv; is_shared = shared;
7271 - if (is_shared) data = const_cast<T*>(data_buffer);
7272 - else { data = new T[siz]; std::memcpy(data,data_buffer,siz*sizeof(T)); }
7273 - } else { width = height = depth = dim = 0; is_shared = false; data = 0; }
7274 - return *this;
7275 - }
7276 -
7277 - // INNER ROUTINE : Swap fields of an image (use it carefully!)
7278 - // If one of the image is shared, its content is replaced by the non-shared image (which remains unchanged).
7279 - CImg& swap(CImg& img) {
7280 - if (img.is_shared==is_shared) {
7281 - cimg::swap(width,img.width);
7282 - cimg::swap(height,img.height);
7283 - cimg::swap(depth,img.depth);
7284 - cimg::swap(dim,img.dim);
7285 - cimg::swap(data,img.data);
7286 - } else {
7287 - if (img.is_shared) img.assign(*this);
7288 - else assign(img);
7289 - }
7290 - return img;
7291 - }
7292 -
7293 - //@}
7294 - //-------------------------------------
7295 - //
7296 - //! \name Image Informations
7297 - //@{
7298 - //-------------------------------------
7299 -
7300 - //! Return the type of the pixel values.
7301 - /**
7302 - \return a string describing the type of the image pixels (template parameter \p T).
7303 - - The string returned may contains spaces (<tt>"unsigned char"</tt>).
7304 - - If the template parameter T does not correspond to a registered type, the string <tt>"unknown"</tt> is returned.
7305 - **/
7306 - static const char* pixel_type() {
7307 - return cimg::type<T>::id();
7308 - }
7309 -
7310 - //! Return the total number of pixel values in an image.
7311 - /**
7312 - - Equivalent to : dimx() * dimy() * dimz() * dimv().
7313 -
7314 - \par example:
7315 - \code
7316 - CImg<> img(100,100,1,3);
7317 - if (img.size()==100*100*3) std::fprintf(stderr,"This statement is true");
7318 - \endcode
7319 - \sa dimx(), dimy(), dimz(), dimv()
7320 - **/
7321 - unsigned long size() const {
7322 - return width*height*depth*dim;
7323 - }
7324 -
7325 - //! Return the number of columns of the instance image (size along the X-axis, i.e image width).
7326 - /**
7327 - \sa width, dimy(), dimz(), dimv(), size().
7328 - **/
7329 - int dimx() const {
7330 - return (int)width;
7331 - }
7332 -
7333 - //! Return the number of rows of the instance image (size along the Y-axis, i.e image height).
7334 - /**
7335 - \sa height, dimx(), dimz(), dimv(), size().
7336 - **/
7337 - int dimy() const {
7338 - return (int)height;
7339 - }
7340 -
7341 - //! Return the number of slices of the instance image (size along the Z-axis).
7342 - /**
7343 - \sa depth, dimx(), dimy(), dimv(), size().
7344 - **/
7345 - int dimz() const {
7346 - return (int)depth;
7347 - }
7348 -
7349 - //! Return the number of vector channels of the instance image (size along the V-axis).
7350 - /**
7351 - \sa dim, dimx(), dimy(), dimz(), size().
7352 - **/
7353 - int dimv() const {
7354 - return (int)dim;
7355 - }
7356 -
7357 - //! Return \c true if images \c (*this) and \c img have same width.
7358 - template<typename t> bool is_sameX(const CImg<t>& img) const {
7359 - return (width==img.width);
7360 - }
7361 -
7362 - //! Return \c true if images \c (*this) and the display \c disp have same width.
7363 - bool is_sameX(const CImgDisplay& disp) const {
7364 - return (width==disp.width);
7365 - }
7366 -
7367 - //! Return \c true if images \c (*this) and \c img have same height.
7368 - template<typename t> bool is_sameY(const CImg<t>& img) const {
7369 - return (height==img.height);
7370 - }
7371 -
7372 - //! Return \c true if images \c (*this) and the display \c disp have same height.
7373 - bool is_sameY(const CImgDisplay& disp) const {
7374 - return (height==disp.height);
7375 - }
7376 -
7377 - //! Return \c true if images \c (*this) and \c img have same depth.
7378 - template<typename t> bool is_sameZ(const CImg<t>& img) const {
7379 - return (depth==img.depth);
7380 - }
7381 -
7382 - //! Return \c true if images \c (*this) and \c img have same dim.
7383 - template<typename t> bool is_sameV(const CImg<t>& img) const {
7384 - return (dim==img.dim);
7385 - }
7386 -
7387 - //! Return \c true if images have same width and same height.
7388 - template<typename t> bool is_sameXY(const CImg<t>& img) const {
7389 - return (is_sameX(img) && is_sameY(img));
7390 - }
7391 -
7392 - //! Return \c true if image \c (*this) and the display \c disp have same width and same height.
7393 - bool is_sameXY(const CImgDisplay& disp) const {
7394 - return (is_sameX(disp) && is_sameY(disp));
7395 - }
7396 -
7397 - //! Return \c true if images have same width, same height and same depth.
7398 - template<typename t> bool is_sameXYZ(const CImg<t>& img) const {
7399 - return (is_sameXY(img) && is_sameZ(img));
7400 - }
7401 -
7402 - //! Return \c true if images \c (*this) and \c img have same width, same height, same depth and same number of channels.
7403 - template<typename t> bool is_sameXYZV(const CImg<t>& img) const {
7404 - return (is_sameXYZ(img) && is_sameV(img));
7405 - }
7406 -
7407 - //! Return \c true if pixel (x,y,z,v) is inside the image boundaries.
7408 - bool contains(const int x, const int y=0, const int z=0, const int v=0) const {
7409 - return data && x>=0 && x<(int)width && y>=0 && y<(int)height && z>=0 && z<(int)depth && v>=0 && v<(int)dim;
7410 - }
7411 -
7412 - //! Return \c true if current image is empty.
7413 - bool is_empty() const {
7414 - return !(data && width && height && depth && dim);
7415 - }
7416 -
7417 - //! Return the offset of the pixel coordinates (\p x,\p y,\p z,\p v) with respect to the data pointer \c data.
7418 - /**
7419 - \param x X-coordinate of the pixel.
7420 - \param y Y-coordinate of the pixel.
7421 - \param z Z-coordinate of the pixel.
7422 - \param v V-coordinate of the pixel.
7423 -
7424 - - No checking is done on the validity of the given coordinates.
7425 -
7426 - \par example:
7427 - \code
7428 - CImg<float> img(100,100,1,3,0); // Define a 100x100 color image with float-valued black pixels.
7429 - long off = img.offset(10,10,0,2); // Get the offset of the blue value of the pixel located at (10,10).
7430 - float val = img[off]; // Get the blue value of the pixel.
7431 - \endcode
7432 - \sa ptr(), operator()(), operator[](), cimg_storage.
7433 - **/
7434 - long offset(const int x=0, const int y=0, const int z=0, const int v=0) const {
7435 - return x + y*width + z*width*height + v*width*height*depth;
7436 - }
7437 -
7438 - //! Return a pointer to the pixel value located at (\p x,\p y,\p z,\p v).
7439 - /**
7440 - \param x X-coordinate of the pixel.
7441 - \param y Y-coordinate of the pixel.
7442 - \param z Z-coordinate of the pixel.
7443 - \param v V-coordinate of the pixel.
7444 -
7445 - - When called without parameters, ptr() returns a pointer to the begining of the pixel buffer.
7446 - - If the macro \c cimg_debug == 3, boundary checking is performed and warning messages may appear if
7447 - given coordinates are outside the image range (but function performances decrease).
7448 -
7449 - \par example:
7450 - \code
7451 - CImg<float> img(100,100,1,1,0); // Define a 100x100 greyscale image with float-valued pixels.
7452 - float *ptr = ptr(10,10); // Get a pointer to the pixel located at (10,10).
7453 - float val = *ptr; // Get the pixel value.
7454 - \endcode
7455 - \sa data, offset(), operator()(), operator[](), cimg_storage, cimg_environment.
7456 - **/
7457 - T* ptr(const unsigned int x=0, const unsigned int y=0, const unsigned int z=0, const unsigned int v=0) {
7458 - const long off = offset(x,y,z,v);
7459 -#if cimg_debug>=3
7460 - if (off<0 || off>=(long)size()) {
7461 - cimg::warn(true,"CImg<%s>::ptr() : Asked for a pointer at coordinates (%u,%u,%u,%u) (offset=%u), "
7462 - "outside image range (%u,%u,%u,%u) (size=%u)",
7463 - pixel_type(),x,y,z,v,off,width,height,depth,dim,size());
7464 - return data;
7465 - }
7466 -#endif
7467 - return data+off;
7468 - }
7469 -
7470 - const T* ptr(const unsigned int x=0, const unsigned int y=0, const unsigned int z=0, const unsigned int v=0) const {
7471 - const long off = offset(x,y,z,v);
7472 -#if cimg_debug>=3
7473 - if (off<0 || off>=(long)size()) {
7474 - cimg::warn(true,"CImg<%s>::ptr() : Trying to get a pointer at (%u,%u,%u,%u) (offset=%d) which is"
7475 - "outside the data of the image (%u,%u,%u,%u) (size=%u)",
7476 - pixel_type(),x,y,z,v,off,width,height,depth,dim,size());
7477 - return data;
7478 - }
7479 -#endif
7480 - return data+off;
7481 - }
7482 -
7483 - //! Return an iterator to the first image pixel
7484 - iterator begin() {
7485 - return data;
7486 - }
7487 -
7488 - const_iterator begin() const {
7489 - return data;
7490 - }
7491 -
7492 - //! Return an iterator to the last image pixel
7493 - iterator end() {
7494 - return data + size();
7495 - }
7496 -
7497 - const_iterator end() const {
7498 - return data + size();
7499 - }
7500 -
7501 - //! Fast access to pixel value for reading or writing.
7502 - /**
7503 - \param x X-coordinate of the pixel.
7504 - \param y Y-coordinate of the pixel.
7505 - \param z Z-coordinate of the pixel.
7506 - \param v V-coordinate of the pixel.
7507 -
7508 - - If one image dimension is equal to 1, it can be omitted in the coordinate list (see example below).
7509 - - If the macro \c cimg_debug == 3, boundary checking is performed and warning messages may appear
7510 - (but function performances decrease).
7511 -
7512 - \par example:
7513 - \code
7514 - CImg<float> img(100,100,1,3,0); // Define a 100x100 color image with float-valued black pixels.
7515 - const float valR = img(10,10,0,0); // Read the red component at coordinates (10,10).
7516 - const float valG = img(10,10,0,1); // Read the green component at coordinates (10,10)
7517 - const float valB = img(10,10,2); // Read the blue component at coordinates (10,10) (Z-coordinate omitted here).
7518 - const float avg = (valR + valG + valB)/3; // Compute average pixel value.
7519 - img(10,10,0) = img(10,10,1) = img(10,10,2) = avg; // Replace the pixel (10,10) by the average grey value.
7520 - \endcode
7521 -
7522 - \sa operator[](), ptr(), offset(), cimg_storage, cimg_environment.
7523 - **/
7524 - T& operator()(const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int v=0) {
7525 - const long off = offset(x,y,z,v);
7526 -#if cimg_debug>=3
7527 - if (!data || off>=(long)size()) {
7528 - cimg::warn(true,"CImg<%s>::operator() : Pixel access requested at (%u,%u,%u,%u) (offset=%d) "
7529 - "outside the image range (%u,%u,%u,%u) (size=%u)",
7530 - pixel_type(),x,y,z,v,off,width,height,depth,dim,size());
7531 - return *data;
7532 - }
7533 -#endif
7534 - return data[off];
7535 - }
7536 -
7537 - const T& operator()(const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int v=0) const {
7538 - const long off = offset(x,y,z,v);
7539 -#if cimg_debug>=3
7540 - if (!data || off>=(long)size()) {
7541 - cimg::warn(true,"CImg<%s>::operator() : Pixel access requested at (%u,%u,%u,%u) (offset=%d) "
7542 - "outside the image range (%u,%u,%u,%u) (size=%u)",
7543 - pixel_type(),x,y,z,v,off,width,height,depth,dim,size());
7544 - return *data;
7545 - }
7546 -#endif
7547 - return data[off];
7548 - }
7549 -
7550 - //! Return pixel value at a given position. Equivalent to operator().
7551 - T& at(const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int v=0) {
7552 - const long off = offset(x,y,z,v);
7553 - if (!data || off>=(long)size())
7554 - throw CImgArgumentException("CImg<%s>::at() : Pixel access requested at (%u,%u,%u,%u) (offset=%d) "
7555 - "outside the image range (%u,%u,%u,%u) (size=%u)",
7556 - pixel_type(),x,y,z,v,off,width,height,depth,dim,size());
7557 - return data[off];
7558 - }
7559 -
7560 - const T& at(const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int v=0) const {
7561 - const long off = offset(x,y,z,v);
7562 - if (!data || off>=(long)size())
7563 - throw CImgArgumentException("CImg<%s>::at() : Pixel access requested at (%u,%u,%u,%u) (offset=%d) "
7564 - "outside the image range (%u,%u,%u,%u) (size=%u)",
7565 - pixel_type(),x,y,z,v,off,width,height,depth,dim,size());
7566 - return data[off];
7567 - }
7568 -
7569 - //! Fast access to pixel value for reading or writing, using an offset to the image pixel.
7570 - /**
7571 - \param off Offset of the pixel according to the begining of the pixel buffer, given by ptr().
7572 -
7573 - - If the macro \c cimg_debug==3, boundary checking is performed and warning messages may appear
7574 - (but function performances decrease).
7575 - - As pixel values are aligned in memory, this operator can sometime useful to access values easier than
7576 - with operator()() (see example below).
7577 -
7578 - \par example:
7579 - \code
7580 - CImg<float> vec(1,10); // Define a vector of float values (10 lines, 1 row).
7581 - const float val1 = vec(0,4); // Get the fifth element using operator()().
7582 - const float val2 = vec[4]; // Get the fifth element using operator[]. Here, val2==val1.
7583 - \endcode
7584 -
7585 - \sa operator()(), ptr(), offset(), cimg_storage, cimg_environment.
7586 - **/
7587 - T& operator[](const unsigned long off) {
7588 - return operator()(off);
7589 - }
7590 -
7591 - const T& operator[](const unsigned long off) const {
7592 - return operator()(off);
7593 - }
7594 -
7595 - //! Return a reference to the last image value
7596 - T& back() {
7597 - return operator()(size()-1);
7598 - }
7599 -
7600 - const T& back() const {
7601 - return operator()(size()-1);
7602 - }
7603 -
7604 - //! Return a reference to the first image value
7605 - T& front() {
7606 - return *data;
7607 - }
7608 -
7609 - const T& front() const {
7610 - return *data;
7611 - }
7612 -
7613 - //! Read a pixel value with Dirichlet or Neumann boundary conditions.
7614 - /**
7615 - \param x X-coordinate of the pixel.
7616 - \param y Y-coordinate of the pixel.
7617 - \param z Z-coordinate of the pixel.
7618 - \param v V-coordinate of the pixel.
7619 - \param out_val Desired value if pixel coordinates are outside the image range (optional parameter).
7620 -
7621 - - This function allows to read pixel values with boundary checking on all coordinates.
7622 - - If given coordinates are outside the image range and the parameter out_val is specified, the value \c out_val is returned.
7623 - - If given coordinates are outside the image range and the parameter out_val is not specified, the closest pixel value
7624 - is returned.
7625 -
7626 - \par example:
7627 - \code
7628 - CImg<float> img(100,100,1,1,128); // Define a 100x100 images with all pixel values equal to 128.
7629 - const float val1 = img.pix4d(10,10,0,0,0); // Equivalent to val1=img(10,10) (but slower).
7630 - const float val2 = img.pix4d(-4,5,0,0,0); // Return 0, since coordinates are outside the image range.
7631 - const float val3 = img.pix4d(10,10,5,0,64); // Return 64, since coordinates are outside the image range.
7632 - \endcode
7633 -
7634 - \sa operator()(), linear_pix4d(), cubic_pix2d().
7635 - **/
7636 - T pix4d(const int x, const int y, const int z, const int v, const T& out_val) const {
7637 - return (x<0 || y<0 || z<0 || v<0 || x>=dimx() || y>=dimy() || z>=dimz() || v>=dimv())?out_val:(*this)(x,y,z,v);
7638 - }
7639 -
7640 - T pix4d(const int x, const int y, const int z, const int v) const {
7641 - return (*this)(x<0?0:(x>=dimx()?dimx()-1:x), y<0?0:(y>=dimy()?dimy()-1:y),
7642 - z<0?0:(z>=dimz()?dimz()-1:z), v<0?0:(v>=dimv()?dimv()-1:v));
7643 - }
7644 -
7645 - //! Read a pixel value with Dirichlet or Neumann boundary conditions for the three first coordinates (\c x,\c y,\c z).
7646 - T pix3d(const int x, const int y, const int z, const int v, const T& out_val) const {
7647 - return (x<0 || y<0 || z<0 || x>=dimx() || y>=dimy() || z>=dimz())?out_val:(*this)(x,y,z,v);
7648 - }
7649 -
7650 - const T& pix3d(const int x, const int y, const int z, const int v=0) const {
7651 - return (*this)(x<0?0:(x>=dimx()?dimx()-1:x), y<0?0:(y>=dimy()?dimy()-1:y),
7652 - z<0?0:(z>=dimz()?dimz()-1:z),v);
7653 - }
7654 -
7655 - //! Read a pixel value with Dirichlet or Neumann boundary conditions for the two first coordinates (\c x,\c y).
7656 - T pix2d(const int x, const int y, const int z, const int v, const T& out_val) const {
7657 - return (x<0 || y<0 || x>=dimx() || y>=dimy())?out_val:(*this)(x,y,z,v);
7658 - }
7659 -
7660 - const T& pix2d(const int x,const int y,const int z=0,const int v=0) const {
7661 - return (*this)(x<0?0:(x>=dimx()?dimx()-1:x), y<0?0:(y>=dimy()?dimy()-1:y),z,v);
7662 - }
7663 -
7664 - //! Read a pixel value with Dirichlet or Neumann boundary conditions for the first coordinate \c x.
7665 - T pix1d(const int x, const int y, const int z, const int v, const T& out_val) const {
7666 - return (x<0 || x>=dimx())?out_val:(*this)(x,y,z,v);
7667 - }
7668 -
7669 - const T& pix1d(const int x, const int y=0, const int z=0, const int v=0) const {
7670 - return (*this)(x<0?0:(x>=dimx()?dimx()-1:x),y,z,v);
7671 - }
7672 -
7673 - //! Read a pixel value using linear interpolation.
7674 - /**
7675 - \param ffx X-coordinate of the pixel (float-valued).
7676 - \param ffy Y-coordinate of the pixel (float-valued).
7677 - \param ffz Z-coordinate of the pixel (float-valued).
7678 - \param ffv V-coordinate of the pixel (float-valued).
7679 - \param out_val Out-of-border pixel value
7680 -
7681 - - This function allows to read pixel values with boundary checking on all coordinates.
7682 - - If given coordinates are outside the image range, the value of the nearest pixel inside the image is returned
7683 - (Neumann boundary conditions).
7684 - - If given coordinates are float-valued, a linear interpolation is performed in order to compute the returned value.
7685 -
7686 - \par example:
7687 - \code
7688 - CImg<float> img(2,2); // Define a greyscale 2x2 image.
7689 - img(0,0) = 0; // Fill image with specified pixel values.
7690 - img(1,0) = 1;
7691 - img(0,1) = 2;
7692 - img(1,1) = 3;
7693 - const double val = img.linear_pix4d(0.5,0.5); // Return val=1.5, which is the average intensity of the four pixels values.
7694 - \endcode
7695 -
7696 - \sa operator()(), linear_pix3d(), linear_pix2d(), linear_pix1d(), cubic_pix2d().
7697 - **/
7698 - typename cimg::largest<T,float>::type linear_pix4d(const float fx,const float fy,const float fz,const float fv,
7699 - const T& out_val) const {
7700 - const int x = (int)fx-(fx>=0?0:1), y = (int)fy-(fy>=0?0:1), z = (int)fz-(fz>=0?0:1), v = (int)fv-(fv>=0?0:1),
7701 - nx = x+1, ny = y+1, nz = z+1, nv = v+1;
7702 - const float dx = fx-x, dy = fy-y, dz = fz-z, dv = fv-v;
7703 - const T
7704 - Icccc = pix4d(x,y,z,v,out_val), Inccc = pix4d(nx,y,z,v,out_val),
7705 - Icncc = pix4d(x,ny,z,v,out_val), Inncc = pix4d(nx,ny,z,v,out_val),
7706 - Iccnc = pix4d(x,y,nz,v,out_val), Incnc = pix4d(nx,y,nz,v,out_val),
7707 - Icnnc = pix4d(x,ny,nz,v,out_val), Innnc = pix4d(nx,ny,nz,v,out_val),
7708 - Icccn = pix4d(x,y,z,nv,out_val), Inccn = pix4d(nx,y,z,nv,out_val),
7709 - Icncn = pix4d(x,ny,z,nv,out_val), Inncn = pix4d(nx,ny,z,nv,out_val),
7710 - Iccnn = pix4d(x,y,nz,nv,out_val), Incnn = pix4d(nx,y,nz,nv,out_val),
7711 - Icnnn = pix4d(x,ny,nz,nv,out_val), Innnn = pix4d(nx,ny,nz,nv,out_val);
7712 - return Icccc +
7713 - dx*(Inccc-Icccc +
7714 - dy*(Icccc+Inncc-Icncc-Inccc +
7715 - dz*(Iccnc+Innnc+Icncc+Inccc-Icnnc-Incnc-Icccc-Inncc +
7716 - dv*(Iccnn+Innnn+Icncn+Inccn+Icnnc+Incnc+Icccc+Inncc-Icnnn-Incnn-Icccn-Inncn-Iccnc-Innnc-Icncc-Inccc)) +
7717 - dv*(Icccn+Inncn+Icncc+Inccc-Icncn-Inccn-Icccc-Inncc)) +
7718 - dz*(Icccc+Incnc-Iccnc-Inccc +
7719 - dv*(Icccn+Incnn+Iccnc+Inccc-Iccnn-Inccn-Icccc-Incnc)) +
7720 - dv*(Icccc+Inccn-Inccc-Icccn)) +
7721 - dy*(Icncc-Icccc +
7722 - dz*(Icccc+Icnnc-Iccnc-Icncc +
7723 - dv*(Icccn+Icnnn+Iccnc+Icncc-Iccnn-Icncn-Icccc-Icnnc)) +
7724 - dv*(Icccc+Icncn-Icncc-Icccn)) +
7725 - dz*(Iccnc-Icccc +
7726 - dv*(Icccc+Iccnn-Iccnc-Icccn)) +
7727 - dv*(Icccn-Icccc);
7728 - }
7729 -
7730 - typename cimg::largest<T,float>::type linear_pix4d(const float ffx,const float ffy=0,const float ffz=0,const float ffv=0) const {
7731 - const float
7732 - fx = ffx<0?0:(ffx>width-1?width-1:ffx), fy = ffy<0?0:(ffy>height-1?height-1:ffy),
7733 - fz = ffz<0?0:(ffz>depth-1?depth-1:ffz), fv = ffv<0?0:(ffv>dim-1?dim-1:ffv);
7734 - const unsigned int x = (unsigned int)fx, y = (unsigned int)fy, z = (unsigned int)fz, v = (unsigned int)fv;
7735 - const float dx = fx-x, dy = fy-y, dz = fz-z, dv = fv-v;
7736 - const unsigned int nx = dx>0?x+1:x, ny = dy>0?y+1:y, nz = dz>0?z+1:z, nv = dv>0?v+1:v;
7737 - const T
7738 - &Icccc = (*this)(x,y,z,v), &Inccc = (*this)(nx,y,z,v), &Icncc = (*this)(x,ny,z,v), &Inncc = (*this)(nx,ny,z,v),
7739 - &Iccnc = (*this)(x,y,nz,v), &Incnc = (*this)(nx,y,nz,v), &Icnnc = (*this)(x,ny,nz,v), &Innnc = (*this)(nx,ny,nz,v),
7740 - &Icccn = (*this)(x,y,z,nv), &Inccn = (*this)(nx,y,z,nv), &Icncn = (*this)(x,ny,z,nv), &Inncn = (*this)(nx,ny,z,nv),
7741 - &Iccnn = (*this)(x,y,nz,nv), &Incnn = (*this)(nx,y,nz,nv), &Icnnn = (*this)(x,ny,nz,nv), &Innnn = (*this)(nx,ny,nz,nv);
7742 - return Icccc +
7743 - dx*(Inccc-Icccc +
7744 - dy*(Icccc+Inncc-Icncc-Inccc +
7745 - dz*(Iccnc+Innnc+Icncc+Inccc-Icnnc-Incnc-Icccc-Inncc +
7746 - dv*(Iccnn+Innnn+Icncn+Inccn+Icnnc+Incnc+Icccc+Inncc-Icnnn-Incnn-Icccn-Inncn-Iccnc-Innnc-Icncc-Inccc)) +
7747 - dv*(Icccn+Inncn+Icncc+Inccc-Icncn-Inccn-Icccc-Inncc)) +
7748 - dz*(Icccc+Incnc-Iccnc-Inccc +
7749 - dv*(Icccn+Incnn+Iccnc+Inccc-Iccnn-Inccn-Icccc-Incnc)) +
7750 - dv*(Icccc+Inccn-Inccc-Icccn)) +
7751 - dy*(Icncc-Icccc +
7752 - dz*(Icccc+Icnnc-Iccnc-Icncc +
7753 - dv*(Icccn+Icnnn+Iccnc+Icncc-Iccnn-Icncn-Icccc-Icnnc)) +
7754 - dv*(Icccc+Icncn-Icncc-Icccn)) +
7755 - dz*(Iccnc-Icccc +
7756 - dv*(Icccc+Iccnn-Iccnc-Icccn)) +
7757 - dv*(Icccn-Icccc);
7758 - }
7759 -
7760 - //! Read a pixel value using linear interpolation for the three first coordinates (\c cx,\c cy,\c cz).
7761 - /**
7762 - - Same as linear_pix4d(), except that linear interpolation and boundary checking is performed only on the three first coordinates.
7763 -
7764 - \sa operator()(), linear_pix4d(), linear_pix2d(), linear_pix1d(), linear_pix3d(), cubic_pix2d().
7765 - **/
7766 - typename cimg::largest<T,float>::type linear_pix3d(const float fx,const float fy,const float fz,const int v,
7767 - const T& out_val) const {
7768 - const int x = (int)fx-(fx>=0?0:1), y = (int)fy-(fy>=0?0:1), z = (int)fz-(fz>=0?0:1), nx = x+1, ny = y+1, nz = z+1;
7769 - const float dx = fx-x, dy = fy-y, dz = fz-z;
7770 - const T
7771 - Iccc = pix3d(x,y,z,v,out_val), Incc = pix3d(nx,y,z,v,out_val), Icnc = pix3d(x,ny,z,v,out_val), Innc = pix3d(nx,ny,z,v,out_val),
7772 - Iccn = pix3d(x,y,nz,v,out_val), Incn = pix3d(nx,y,nz,v,out_val), Icnn = pix3d(x,ny,nz,v,out_val), Innn = pix3d(nx,ny,nz,v,out_val);
7773 - return Iccc +
7774 - dx*(Incc-Iccc +
7775 - dy*(Iccc+Innc-Icnc-Incc +
7776 - dz*(Iccn+Innn+Icnc+Incc-Icnn-Incn-Iccc-Innc)) +
7777 - dz*(Iccc+Incn-Iccn-Incc)) +
7778 - dy*(Icnc-Iccc +
7779 - dz*(Iccc+Icnn-Iccn-Icnc)) +
7780 - dz*(Iccn-Iccc);
7781 - }
7782 -
7783 - typename cimg::largest<T,float>::type linear_pix3d(const float ffx,const float ffy=0,const float ffz=0,const int v=0) const {
7784 - const float fx = ffx<0?0:(ffx>width-1?width-1:ffx), fy = ffy<0?0:(ffy>height-1?height-1:ffy), fz = ffz<0?0:(ffz>depth-1?depth-1:ffz);
7785 - const unsigned int x = (unsigned int)fx, y = (unsigned int)fy, z = (unsigned int)fz;
7786 - const float dx = fx-x, dy = fy-y, dz = fz-z;
7787 - const unsigned int nx = dx>0?x+1:x, ny = dy>0?y+1:y, nz = dz>0?z+1:z;
7788 - const T
7789 - &Iccc = (*this)(x,y,z,v), &Incc = (*this)(nx,y,z,v), &Icnc = (*this)(x,ny,z,v), &Innc = (*this)(nx,ny,z,v),
7790 - &Iccn = (*this)(x,y,nz,v), &Incn = (*this)(nx,y,nz,v), &Icnn = (*this)(x,ny,nz,v), &Innn = (*this)(nx,ny,nz,v);
7791 - return Iccc +
7792 - dx*(Incc-Iccc +
7793 - dy*(Iccc+Innc-Icnc-Incc +
7794 - dz*(Iccn+Innn+Icnc+Incc-Icnn-Incn-Iccc-Innc)) +
7795 - dz*(Iccc+Incn-Iccn-Incc)) +
7796 - dy*(Icnc-Iccc +
7797 - dz*(Iccc+Icnn-Iccn-Icnc)) +
7798 - dz*(Iccn-Iccc);
7799 - }
7800 -
7801 - //! Read a pixel value using linear interpolation for the two first coordinates (\c cx,\c cy).
7802 - /**
7803 - - Same as linear_pix4d(), except that linear interpolation and boundary checking is performed only on the two first coordinates.
7804 -
7805 - \sa operator()(), linear_pix4d(), linear_pix3d(), linear_pix1d(), linear_pix2d(), cubic_pix2d().
7806 - **/
7807 - typename cimg::largest<T,float>::type linear_pix2d(const float fx, const float fy, const int z, const int v,
7808 - const T& out_val) const {
7809 - const int x = (int)fx-(fx>0?0:1), y = (int)fy-(fy>0?0:1), nx = x+1, ny = y+1;
7810 - const float dx = fx-x, dy = fy-y;
7811 - const T
7812 - Icc = pix2d(x,y,z,v,out_val), Inc = pix2d(nx,y,z,v,out_val),
7813 - Icn = pix2d(x,ny,z,v,out_val), Inn = pix2d(nx,ny,z,v,out_val);
7814 - return Icc + dx*(Inc-Icc + dy*(Icc+Inn-Icn-Inc)) + dy*(Icn-Icc);
7815 - }
7816 -
7817 - typename cimg::largest<T,float>::type linear_pix2d(const float ffx, const float ffy=0, const int z=0, const int v=0) const {
7818 - const float fx = ffx<0?0:(ffx>width-1?width-1:ffx), fy = ffy<0?0:(ffy>height-1?height-1:ffy);
7819 - const unsigned int x = (unsigned int)fx, y = (unsigned int)fy;
7820 - const float dx = fx-x, dy = fy-y;
7821 - const unsigned int nx = dx>0?x+1:x, ny = dy>0?y+1:y;
7822 - const T &Icc = (*this)(x,y,z,v), &Inc = (*this)(nx,y,z,v), &Icn = (*this)(x,ny,z,v), &Inn = (*this)(nx,ny,z,v);
7823 - return Icc + dx*(Inc-Icc + dy*(Icc+Inn-Icn-Inc)) + dy*(Icn-Icc);
7824 - }
7825 -
7826 - //! Read a pixel value using linear interpolation for the first coordinate \c cx.
7827 - /**
7828 - - Same as linear_pix4d(), except that linear interpolation and boundary checking is performed only on the first coordinate.
7829 -
7830 - \sa operator()(), linear_pix4d(), linear_pix3d(), linear_pix2d(), linear_pix1d(), cubic_pix1d().
7831 - **/
7832 - typename cimg::largest<T,float>::type linear_pix1d(const float fx,const int y,const int z,const int v,
7833 - const T& out_val) const {
7834 - const int x = (int)fx-(fx>0?0:1), nx = x+1;
7835 - const float dx = fx-x;
7836 - const T Ic = pix1d(x,y,z,v,out_val), In = pix2d(nx,y,z,v,out_val);
7837 - return Ic + dx*(In-Ic);
7838 - }
7839 -
7840 - typename cimg::largest<T,float>::type linear_pix1d(const float ffx,const int y=0,const int z=0,const int v=0) const {
7841 - const float fx = ffx<0?0:(ffx>width-1?width-1:ffx);
7842 - const unsigned int x = (unsigned int)fx;
7843 - const float dx = fx-x;
7844 - const unsigned int nx = dx>0?x+1:x;
7845 - const T &Ic = (*this)(x,y,z,v), &In = (*this)(nx,y,z,v);
7846 - return Ic + dx*(In-Ic);
7847 - }
7848 -
7849 - // This function is used as a subroutine for cubic interpolation
7850 - static float _cubic_R(const float x) {
7851 - const float xp2 = x+2, xp1 = x+1, xm1 = x-1,
7852 - nxp2 = xp2>0?xp2:0, nxp1 = xp1>0?xp1:0, nx = x>0?x:0, nxm1 = xm1>0?xm1:0;
7853 - return (nxp2*nxp2*nxp2 - 4*nxp1*nxp1*nxp1 + 6*nx*nx*nx - 4*nxm1*nxm1*nxm1)/6.0f;
7854 - }
7855 -
7856 - //! Read a pixel value using cubic interpolation for the first coordinate \c cx.
7857 - /**
7858 - - Same as cubic_pix2d(), except that cubic interpolation and boundary checking is performed only on the first coordinate.
7859 -
7860 - \sa operator()(), cubic_pix2d(), linear_pix1d().
7861 - **/
7862 - typename cimg::largest<T,float>::type cubic_pix1d(const float fx, const int y, const int z, const int v,
7863 - const T& out_val) const {
7864 - const int x = (int)fx-(fx>=0?0:1), px = x-1, nx = x+1, ax = nx+1;
7865 - const float dx = fx-x;
7866 - const T a = pix2d(px,y,z,v,out_val), b = pix2d(x,y,z,v,out_val), c = pix2d(nx,y,z,v,out_val), d = pix2d(ax,y,z,v,out_val);
7867 - const float Rxp = _cubic_R(-1-dx), Rxc = _cubic_R(dx), Rxn = _cubic_R(1-dx), Rxa = _cubic_R(2-dx);
7868 - return Rxp*a + Rxc*b + Rxn*c + Rxa*d;
7869 - }
7870 -
7871 - typename cimg::largest<T,float>::type cubic_pix1d(const float pfx, const int y=0, const int z=0, const int v=0) const {
7872 - const float fx = pfx<0?0:(pfx>width-1?width-1:pfx);
7873 - const unsigned int x = (unsigned int)fx, px = (int)x-1>=0?x-1:0, nx = x+1<width?x+1:width-1, ax = nx+1<width?nx+1:width-1;
7874 - const float dx = fx-x;
7875 - const T& a = (*this)(px,y,z,v), b = (*this)(x,y,z,v), c = (*this)(nx,y,z,v), d = (*this)(ax,y,z,v);
7876 - const float Rxp = _cubic_R(-1-dx), Rxc = _cubic_R(dx), Rxn = _cubic_R(1-dx), Rxa = _cubic_R(2-dx);
7877 - return Rxp*a + Rxc*b + Rxn*c + Rxa*d;
7878 - }
7879 -
7880 - //! Read a pixel value using bicubic interpolation.
7881 - /**
7882 - \param pfx X-coordinate of the pixel (float-valued).
7883 - \param pfy Y-coordinate of the pixel (float-valued).
7884 - \param z Z-coordinate of the pixel.
7885 - \param v V-coordinate of the pixel.
7886 -
7887 - - This function allows to read pixel values with boundary checking on the two first coordinates.
7888 - - If given coordinates are outside the image range, the value of the nearest pixel inside the image is returned
7889 - (Neumann boundary conditions).
7890 - - If given coordinates are float-valued, a cubic interpolation is performed in order to compute the returned value.
7891 -
7892 - \sa operator()(), cubic_pix1d(), linear_pix2d().
7893 - **/
7894 - typename cimg::largest<T,float>::type cubic_pix2d(const float fx, const float fy, const int z, const int v,
7895 - const T& out_val) const {
7896 - const int
7897 - x = (int)fx-(fx>=0?0:1), y = (int)fy-(fy>=0?0:1),
7898 - px = x-1, nx = x+1, ax = nx+1, py = y-1, ny = y+1, ay = ny+1;
7899 - const float dx = fx-x, dy = fy-y;
7900 - const T
7901 - a = pix2d(px,py,z,v,out_val), b = pix2d(x,py,z,v,out_val), c = pix2d(nx,py,z,v,out_val), d = pix2d(ax,py,z,v,out_val),
7902 - e = pix2d(px, y,z,v,out_val), f = pix2d(x, y,z,v,out_val), g = pix2d(nx, y,z,v,out_val), h = pix2d(ax, y,z,v,out_val),
7903 - i = pix2d(px,ny,z,v,out_val), j = pix2d(x,ny,z,v,out_val), k = pix2d(nx,ny,z,v,out_val), l = pix2d(ax,ny,z,v,out_val),
7904 - m = pix2d(px,ay,z,v,out_val), n = pix2d(x,ay,z,v,out_val), o = pix2d(nx,ay,z,v,out_val), p = pix2d(ax,ay,z,v,out_val);
7905 - const float
7906 - Rxp = _cubic_R(-1-dx), Rxc = _cubic_R(dx), Rxn = _cubic_R(1-dx), Rxa = _cubic_R(2-dx),
7907 - Ryp = _cubic_R(dy+1), Ryc = _cubic_R(dy), Ryn = _cubic_R(dy-1), Rya = _cubic_R(dy-2);
7908 - return
7909 - Rxp*Ryp*a + Rxc*Ryp*b + Rxn*Ryp*c + Rxa*Ryp*d +
7910 - Rxp*Ryc*e + Rxc*Ryc*f + Rxn*Ryc*g + Rxa*Ryc*h +
7911 - Rxp*Ryn*i + Rxc*Ryn*j + Rxn*Ryn*k + Rxa*Ryn*l +
7912 - Rxp*Rya*m + Rxc*Rya*n + Rxn*Rya*o + Rxa*Rya*p;
7913 - }
7914 -
7915 - typename cimg::largest<T,float>::type cubic_pix2d(const float pfx, const float pfy=0, const int z=0, const int v=0) const {
7916 - const float fx = pfx<0?0:(pfx>width-1?width-1:pfx), fy = pfy<0?0:(pfy>height-1?height-1:pfy);
7917 - const unsigned int
7918 - x = (unsigned int)fx, px = (int)x-1>=0?x-1:0, nx = x+1<width?x+1:width-1, ax = nx+1<width?nx+1:width-1,
7919 - y = (unsigned int)fy, py = (int)y-1>=0?y-1:0, ny = y+1<height?y+1:height-1, ay = ny+1<height?ny+1:height-1;
7920 - const float dx = fx-x, dy = fy-y;
7921 - const T&
7922 - a = (*this)(px,py,z,v), b = (*this)(x,py,z,v), c = (*this)(nx,py,z,v), d = (*this)(ax,py,z,v),
7923 - e = (*this)(px, y,z,v), f = (*this)(x, y,z,v), g = (*this)(nx, y,z,v), h = (*this)(ax, y,z,v),
7924 - i = (*this)(px,ny,z,v), j = (*this)(x,ny,z,v), k = (*this)(nx,ny,z,v), l = (*this)(ax,ny,z,v),
7925 - m = (*this)(px,ay,z,v), n = (*this)(x,ay,z,v), o = (*this)(nx,ay,z,v), p = (*this)(ax,ay,z,v);
7926 - const float
7927 - Rxp = _cubic_R(-1-dx), Rxc = _cubic_R(dx), Rxn = _cubic_R(1-dx), Rxa = _cubic_R(2-dx),
7928 - Ryp = _cubic_R(dy+1), Ryc = _cubic_R(dy), Ryn = _cubic_R(dy-1), Rya = _cubic_R(dy-2);
7929 - return
7930 - Rxp*Ryp*a + Rxc*Ryp*b + Rxn*Ryp*c + Rxa*Ryp*d +
7931 - Rxp*Ryc*e + Rxc*Ryc*f + Rxn*Ryc*g + Rxa*Ryc*h +
7932 - Rxp*Ryn*i + Rxc*Ryn*j + Rxn*Ryn*k + Rxa*Ryn*l +
7933 - Rxp*Rya*m + Rxc*Rya*n + Rxn*Rya*o + Rxa*Rya*p;
7934 - }
7935 -
7936 - //! Display informations about the image on the standard error output.
7937 - /**
7938 - \param title Name for the considered image (optional).
7939 - \param print_flag Level of informations to be printed.
7940 -
7941 - - The possible values for \c print_flag are :
7942 - - 0 : print only informations about image size and pixel buffer.
7943 - - 1 : print also statistics on the image pixels.
7944 - - 2 : print also the content of the pixel buffer, in a matlab-style.
7945 -
7946 - \par example:
7947 - \code
7948 - CImg<float> img("foo.jpg"); // Load image from a JPEG file.
7949 - img.print("Image : foo.jpg",1); // Print image informations and statistics.
7950 - \endcode
7951 -
7952 - \sa CImgStats
7953 - **/
7954 - const CImg& print(const char *title=0, const unsigned int print_flag=1) const {
7955 - std::fprintf(stderr,"%-8s(this=%p): { size=(%u,%u,%u,%u), data=(%s*)%p (%s)",
7956 - title?title:"CImg",(void*)this,
7957 - width,height,depth,dim,pixel_type(),(void*)data,
7958 - is_shared?"shared":"not shared");
7959 - if (is_empty()) { std::fprintf(stderr,", [Undefined pixel data] }\n"); return *this; }
7960 - if (print_flag>=1) {
7961 - const CImgStats st(*this);
7962 - std::fprintf(stderr,", min=%g, mean=%g [var=%g], max=%g, pmin=(%d,%d,%d,%d), pmax=(%d,%d,%d,%d)",
7963 - st.min,st.mean,st.variance,st.max,st.xmin,st.ymin,st.zmin,st.vmin,st.xmax,st.ymax,st.zmax,st.vmax);
7964 - }
7965 - if (print_flag>=2 || size()<=16) {
7966 - std::fprintf(stderr," }\n%s = [ ",title?title:"data");
7967 - cimg_forXYZV(*this,x,y,z,k)
7968 - std::fprintf(stderr,"%g%s",(double)(*this)(x,y,z,k),
7969 - ((x+1)*(y+1)*(z+1)*(k+1)==(int)size()?" ]\n":(((x+1)%width==0)?" ; ":" ")));
7970 - } else std::fprintf(stderr," }\n");
7971 - return *this;
7972 - }
7973 -
7974 - //! Display informations about the image on the standart output.
7975 - const CImg& print(const unsigned int print_flag) const {
7976 - return print(0,print_flag);
7977 - }
7978 -
7979 - //@}
7980 - //------------------------------------------
7981 - //
7982 - //! \name Arithmetic and Boolean Operators
7983 - //@{
7984 - //------------------------------------------
7985 -
7986 - //! Assignement operator.
7987 - /**
7988 - This operator assigns a copy of the input image \p img to the current instance image.
7989 - \param img The input image to copy.
7990 - \remark
7991 - - This operator is strictly equivalent to the function assign(const CImg< t >&) and has exactly the same properties.
7992 - \see assign(const CImg< t >&).
7993 - **/
7994 - template<typename t> CImg<T>& operator=(const CImg<t>& img) {
7995 - return assign(img);
7996 - }
7997 -
7998 - CImg& operator=(const CImg& img) {
7999 - return assign(img);
8000 - }
8001 -
8002 - //! Assign values of a C-array to the instance image.
8003 - /**
8004 - \param buf Pointer to a C-style array having a size of (at least) <tt>this->size()</tt>.
8005 -
8006 - - Replace pixel values by the content of the array \c buf.
8007 - - Warning : the value types in the array and in the image must be the same.
8008 -
8009 - \par example:
8010 - \code
8011 - float tab[4*4] = { 1,2,3,4, 5,6,7,8, 9,10,11,12, 13,14,15,16 }; // Define a 4x4 matrix in C-style.
8012 - CImg<float> matrice(4,4); // Define a 4x4 greyscale image.
8013 - matrice = tab; // Fill the image by the values in tab.
8014 - \endcode
8015 - **/
8016 - CImg& operator=(const T *buf) {
8017 - if (buf) std::memcpy(data,buf,size()*sizeof(T));
8018 - else assign();
8019 - return *this;
8020 - }
8021 -
8022 - //! Assign a value to each image pixel of the instance image.
8023 - CImg& operator=(const T& val) {
8024 - return fill(val);
8025 - }
8026 -
8027 - //! Operator+
8028 - /**
8029 - \remark
8030 - - This operator can be used to get a non-shared copy of an image.
8031 - **/
8032 - CImg operator+() const {
8033 - return CImg<T>(*this,false);
8034 - }
8035 -
8036 - //! Operator+=;
8037 -#ifdef cimg_use_visualcpp6
8038 - CImg& operator+=(const T& val) {
8039 -#else
8040 - template<typename t> CImg& operator+=(const t& val) {
8041 -#endif
8042 - cimg_for(*this,ptr,T) (*ptr)=(T)((*ptr)+val);
8043 - return *this;
8044 - }
8045 -
8046 - //! Operator+=
8047 - template<typename t> CImg& operator+=(const CImg<t>& img) {
8048 - const unsigned int smin = cimg::min(size(),img.size());
8049 - t *ptrs = img.data+smin;
8050 - for (T *ptrd = data+smin; ptrd>data; --ptrd, (*ptrd)=(T)((*ptrd)+(*(--ptrs))));
8051 - return *this;
8052 - }
8053 -
8054 - //! Operator++;
8055 - CImg& operator++() {
8056 - cimg_for(*this,ptr,T) (*ptr)++;
8057 - return *this;
8058 - }
8059 -
8060 - //! Operator-.
8061 - CImg operator-() const {
8062 - return CImg<T>(width,height,depth,dim,0)-=*this;
8063 - }
8064 -
8065 - //! Operator-=.
8066 -#ifdef cimg_use_visualcpp6
8067 - CImg& operator-=(const T& val) {
8068 -#else
8069 - template<typename t> CImg& operator-=(const t& val) {
8070 -#endif
8071 - cimg_for(*this,ptr,T) (*ptr)=(T)((*ptr)-val);
8072 - return *this;
8073 - }
8074 -
8075 - //! Operator-=.
8076 - template<typename t> CImg& operator-=(const CImg<t>& img) {
8077 - const unsigned int smin = cimg::min(size(),img.size());
8078 - t *ptrs = img.data+smin;
8079 - for (T *ptrd = data+smin; ptrd>data; --ptrd, (*ptrd)=(T)((*ptrd)-(*(--ptrs))));
8080 - return *this;
8081 - }
8082 -
8083 - //! Operator--.
8084 - CImg& operator--() {
8085 - cimg_for(*this,ptr,T) (*ptr)--;
8086 - return *this;
8087 - }
8088 -
8089 - //! Operator*=.
8090 -#ifdef cimg_use_visualcpp6
8091 - CImg& operator*=(const double val) {
8092 -#else
8093 - template<typename t> CImg& operator*=(const t& val) {
8094 -#endif
8095 - cimg_for(*this,ptr,T) (*ptr)=(T)((*ptr)*val);
8096 - return *this;
8097 - }
8098 -
8099 - //! Operator*=.
8100 - template<typename t> CImg& operator*=(const CImg<t>& img) {
8101 - return ((*this)*img).swap(*this);
8102 - }
8103 -
8104 - //! Operator/=.
8105 -#ifdef cimg_use_visualcpp6
8106 - CImg& operator/=(const double val) {
8107 -#else
8108 - template<typename t> CImg& operator/=(const t& val) {
8109 -#endif
8110 - cimg_for(*this,ptr,T) (*ptr)=(T)((*ptr)/val);
8111 - return *this;
8112 - }
8113 -
8114 - //! Operator/=.
8115 - template<typename t> CImg& operator/=(const CImg<t>& img) {
8116 - return assign(*this*img.get_inverse());
8117 - }
8118 -
8119 - //! Modulo.
8120 - CImg operator%(const CImg& img) const {
8121 - return (+*this)%=img;
8122 - }
8123 -
8124 - //! Modulo.
8125 - CImg operator%(const T& val) const {
8126 - return (+*this)%=val;
8127 - }
8128 -
8129 - //! In-place modulo.
8130 - CImg& operator%=(const T& val) {
8131 - cimg_for(*this,ptr,T) (*ptr)%=val;
8132 - return *this;
8133 - }
8134 -
8135 - //! In-place modulo.
8136 - CImg& operator%=(const CImg& img) {
8137 - const unsigned int smin = cimg::min(size(),img.size());
8138 - for (T *ptrs=img.data+smin, *ptrd=data+smin; ptrd>data; *(--ptrd)%=*(--ptrs));
8139 - return *this;
8140 - }
8141 -
8142 - //! Bitwise AND.
8143 - CImg operator&(const CImg& img) const {
8144 - return (+*this)&=img;
8145 - }
8146 -
8147 - //! Bitwise AND.
8148 - CImg operator&(const T& val) const {
8149 - return (+*this)&=val;
8150 - }
8151 -
8152 - //! In-place bitwise AND.
8153 - CImg& operator&=(const CImg& img) {
8154 - const unsigned int smin = cimg::min(size(),img.size());
8155 - for (T *ptrs=img.data+smin, *ptrd=data+smin; ptrd>data; *(--ptrd)&=*(--ptrs));
8156 - return *this;
8157 - }
8158 -
8159 - //! In-place bitwise AND.
8160 - CImg& operator&=(const T& val) {
8161 - cimg_for(*this,ptr,T) (*ptr)&=val;
8162 - return *this;
8163 - }
8164 -
8165 - //! Bitwise OR.
8166 - CImg operator|(const CImg& img) const {
8167 - return (+*this)|=img;
8168 - }
8169 -
8170 - //! Bitwise OR.
8171 - CImg operator|(const T& val) const {
8172 - return (+*this)|=val;
8173 - }
8174 -
8175 - //! In-place bitwise OR.
8176 - CImg& operator|=(const CImg& img) {
8177 - const unsigned int smin = cimg::min(size(),img.size());
8178 - for (T *ptrs=img.data+smin, *ptrd=data+smin; ptrd>data; *(--ptrd)|=*(--ptrs));
8179 - return *this;
8180 - }
8181 -
8182 - //! In-place bitwise OR.
8183 - CImg& operator|=(const T& val) {
8184 - cimg_for(*this,ptr,T) (*ptr)|=val;
8185 - return *this;
8186 - }
8187 -
8188 - //! Bitwise XOR.
8189 - CImg operator^(const CImg& img) const {
8190 - return (+*this)^=img;
8191 - }
8192 -
8193 - //! Bitwise XOR.
8194 - CImg operator^(const T& val) const {
8195 - return (+*this)^=val;
8196 - }
8197 -
8198 - //! In-place bitwise XOR.
8199 - CImg& operator^=(const CImg& img) {
8200 - const unsigned int smin = cimg::min(size(),img.size());
8201 - for (T *ptrs=img.data+smin, *ptrd=data+smin; ptrd>data; *(--ptrd)^=*(--ptrs));
8202 - return *this;
8203 - }
8204 -
8205 - //! In-place bitwise XOR.
8206 - CImg& operator^=(const T& val) {
8207 - cimg_for(*this,ptr,T) (*ptr)^=val;
8208 - return *this;
8209 - }
8210 -
8211 - //! Boolean NOT.
8212 - CImg operator!() const {
8213 - CImg<T> res(width,height,depth,dim);
8214 - const T *ptrs = end();
8215 - cimg_for(res,ptrd,T) *ptrd=!(*(--ptrs));
8216 - return res;
8217 - }
8218 -
8219 - //! Bitwise NOT.
8220 - CImg operator~() const {
8221 - CImg<T> res(width,height,depth,dim);
8222 - const T *ptrs = end();
8223 - cimg_for(res,ptrd,T) *ptrd=~(*(--ptrs));
8224 - return res;
8225 - }
8226 -
8227 - //! Bitwise shift
8228 - CImg& operator<<=(const unsigned int n) {
8229 - cimg_for(*this,ptr,T) (*ptr)<<=n;
8230 - return *this;
8231 - }
8232 -
8233 - //! Bitwise shift
8234 - CImg operator<<(const unsigned int n) const {
8235 - return (+*this)<<=n;
8236 - }
8237 -
8238 - //! Bitwise shift
8239 - CImg& operator>>=(const unsigned int n) {
8240 - cimg_for(*this,ptr,T) (*ptr)>>=n;
8241 - return *this;
8242 - }
8243 -
8244 - //! Bitwise shift
8245 - CImg operator>>(const unsigned int n) const {
8246 - return (+*this)>>=n;
8247 - }
8248 -
8249 - //! Boolean equality.
8250 - template<typename t> bool operator==(const CImg<t>& img) const {
8251 - const unsigned int siz = size();
8252 - bool vequal = true;
8253 - if (siz!=img.size()) return false;
8254 - t *ptrs=img.data+siz;
8255 - for (T *ptrd=data+siz; vequal && ptrd>data; vequal=vequal&&((*(--ptrd))==(*(--ptrs))));
8256 - return vequal;
8257 - }
8258 -
8259 - //! Boolean difference.
8260 - template<typename t> bool operator!=(const CImg<t>& img) const {
8261 - return !((*this)==img);
8262 - }
8263 -
8264 - //! Get a new list
8265 - template<typename t> CImgList<typename cimg::largest<T,t>::type> operator<<(const CImg<t>& img) const {
8266 - typedef typename cimg::largest<T,t>::type restype;
8267 - return CImgList<restype>(*this,img);
8268 - }
8269 -
8270 - //@}
8271 - //---------------------------------------
8272 - //
8273 - //! \name Usual Mathematics
8274 - //@{
8275 - //---------------------------------------
8276 -
8277 - //! Apply a R->R function on all image value.
8278 - template<typename ts, typename td> CImg& apply(td (*func)(ts)) {
8279 - cimg_for(*this,ptr,T) *ptr = (T)func(*ptr);
8280 - return *this;
8281 - }
8282 -
8283 - //! Return an image where each pixel value is equal to func(x).
8284 - template<typename ts, typename td> CImg<typename cimg::largest<T,td>::type> get_apply(td (*func)(ts)) {
8285 - typedef typename cimg::largest<T,td>::type restype;
8286 - return CImg<restype>(*this,false).apply(func);
8287 - }
8288 -
8289 - //! In-place pointwise multiplication between \c *this and \c img.
8290 - /**
8291 - This is the in-place version of get_mul().
8292 - \sa get_mul().
8293 - **/
8294 - template<typename t> CImg& mul(const CImg<t>& img) {
8295 - t *ptrs = img.data;
8296 - T *ptrf = data + cimg::min(size(),img.size());
8297 - for (T* ptrd = data; ptrd<ptrf; ptrd++) (*ptrd)=(T)(*ptrd*(*(ptrs++)));
8298 - return *this;
8299 - }
8300 -
8301 - //! Pointwise multiplication between \c *this and \c img.
8302 - /**
8303 - \param img Argument of the multiplication.
8304 - - if \c *this and \c img have different size, the multiplication is applied on the maximum possible range.
8305 - \sa get_div(),mul(),div()
8306 - **/
8307 - template<typename t> CImg<typename cimg::largest<T,t>::type> get_mul(const CImg<t>& img) const {
8308 - typedef typename cimg::largest<T,t>::type restype;
8309 - return CImg<restype>(*this,false).mul(img);
8310 - }
8311 -
8312 - //! Replace the image by the pointwise division between \p *this and \p img.
8313 - /**
8314 - This is the in-place version of get_div().
8315 - \see get_div().
8316 - **/
8317 - template<typename t> CImg& div(const CImg<t>& img) {
8318 - t *ptrs = img.data;
8319 - T *ptrf = data + cimg::min(size(),img.size());
8320 - for (T* ptrd = data; ptrd<ptrf; ptrd++) (*ptrd)=(T)(*ptrd/(*(ptrs++)));
8321 - return *this;
8322 - }
8323 -
8324 - //! Return an image from a pointwise division between \p *this and \p img.
8325 - /**
8326 - \param img = argument of the division.
8327 - \note if \c *this and \c img have different size, the division is applied
8328 - only on possible values.
8329 - \see get_mul(),mul(),div()
8330 - **/
8331 - template<typename t> CImg<typename cimg::largest<T,t>::type> get_div(const CImg<t>& img) const {
8332 - typedef typename cimg::largest<T,t>::type restype;
8333 - return CImg<restype>(*this,false).div(img);
8334 - }
8335 -
8336 - //! Replace the image by the pointwise max operator between \p *this and \p img
8337 - /**
8338 - This is the in-place version of get_max().
8339 - \see get_max().
8340 - **/
8341 - template<typename t> CImg& max(const CImg<t>& img) {
8342 - t *ptrs = img.data;
8343 - T *ptrf = data + cimg::min(size(),img.size());
8344 - for (T* ptrd = data; ptrd<ptrf; ptrd++) (*ptrd)=cimg::max((T)*(ptrs++),*ptrd);
8345 - return *this;
8346 - }
8347 -
8348 - //! Return the image corresponding to the max value for each pixel.
8349 - /**
8350 - \param img = second argument of the max operator (the first one is *this).
8351 - \see max(), min(), get_min()
8352 - **/
8353 - template<typename t> CImg<typename cimg::largest<T,t>::type> get_max(const CImg<t>& img) const {
8354 - typedef typename cimg::largest<T,t>::type restype;
8355 - return CImg<restype>(*this,false).max(img);
8356 - }
8357 -
8358 - //! Replace the image by the pointwise max operator between \p *this and \p val
8359 - /**
8360 - This is the in-place version of get_max().
8361 - \see get_max().
8362 - **/
8363 -#ifdef cimg_use_visualcpp6
8364 - CImg& max(const T val) {
8365 -#else
8366 - CImg& max(const T& val) {
8367 -#endif
8368 - cimg_for(*this,ptr,T) (*ptr)=cimg::max(*ptr,val);
8369 - return *this;
8370 - }
8371 -
8372 - //! Return the image corresponding to the max value for each pixel.
8373 - /**
8374 - \param val = second argument of the max operator (the first one is *this).
8375 - \see max(), min(), get_min()
8376 - **/
8377 -#ifdef cimg_use_visualcpp6
8378 - CImg get_max(const T val) const {
8379 -#else
8380 - CImg get_max(const T& val) const {
8381 -#endif
8382 - return (+*this).max(val);
8383 - }
8384 -
8385 - //! Replace the image by the pointwise min operator between \p *this and \p img
8386 - /**
8387 - This is the in-place version of get_min().
8388 - \see get_min().
8389 - **/
8390 - template<typename t> CImg& min(const CImg<t>& img) {
8391 - t *ptrs = img.data;
8392 - T *ptrf = data + cimg::min(size(),img.size());
8393 - for (T* ptrd = data; ptrd<ptrf; ptrd++) (*ptrd)=cimg::min((T)*(ptrs++),*ptrd);
8394 - return *this;
8395 - }
8396 - //! Return the image corresponding to the min value for each pixel.
8397 - /**
8398 - \param img = second argument of the min operator (the first one is *this).
8399 - \see min(), max(), get_max()
8400 - **/
8401 - template<typename t> CImg<typename cimg::largest<T,t>::type> get_min(const CImg<t>& img) const {
8402 - typedef typename cimg::largest<T,t>::type restype;
8403 - return CImg<restype>(*this,false).min(img);
8404 - }
8405 -
8406 - //! Replace the image by the pointwise min operator between \p *this and \p val
8407 - /**
8408 - This is the in-place version of get_min().
8409 - \see get_min().
8410 - **/
8411 -#ifdef cimg_use_visualcpp6
8412 - CImg& min(const T val) {
8413 -#else
8414 - CImg& min(const T& val) {
8415 -#endif
8416 - cimg_for(*this,ptr,T) (*ptr)=cimg::min(*ptr,val);
8417 - return *this;
8418 - }
8419 -
8420 - //! Return the image corresponding to the min value for each pixel.
8421 - /**
8422 - \param val = second argument of the min operator (the first one is *this).
8423 - \see min(), max(), get_max()
8424 - **/
8425 -#ifdef cimg_use_visualcpp6
8426 - CImg get_min(const T val) const {
8427 -#else
8428 - CImg get_min(const T& val) const {
8429 -#endif
8430 - return (+*this).min(val);
8431 - }
8432 -
8433 - //! Replace each image pixel by its square root.
8434 - /**
8435 - \see get_sqrt()
8436 - **/
8437 - CImg& sqrt() {
8438 - cimg_for(*this,ptr,T) (*ptr)=(T)std::sqrt((double)(*ptr));
8439 - return *this;
8440 - }
8441 -
8442 - //! Return the image of the square root of the pixel values.
8443 - /**
8444 - \see sqrt()
8445 - **/
8446 - CImg<typename cimg::largest<T,float>::type> get_sqrt() const {
8447 - typedef typename cimg::largest<T,float>::type restype;
8448 - return CImg<restype>(*this,false).sqrt();
8449 - }
8450 -
8451 - //! Replace each image pixel by its exponential.
8452 - CImg& exp() {
8453 - cimg_for(*this,ptr,T) (*ptr)=(T)std::exp((double)(*ptr));
8454 - return *this;
8455 - }
8456 -
8457 - //! Return the image of the exponential of the pixel values.
8458 - CImg<typename cimg::largest<T,float>::type> get_exp() const {
8459 - typedef typename cimg::largest<T,float>::type restype;
8460 - return CImg<restype>(*this,false).exp();
8461 - }
8462 -
8463 - //! Replace each image pixel by its log.
8464 - /**
8465 - \see get_log(), log10(), get_log10()
8466 - **/
8467 - CImg& log() {
8468 - cimg_for(*this,ptr,T) (*ptr)=(T)std::log((double)(*ptr));
8469 - return *this;
8470 - }
8471 -
8472 - //! Return the image of the log of the pixel values.
8473 - /**
8474 - \see log(), log10(), get_log10()
8475 - **/
8476 - CImg<typename cimg::largest<T,float>::type> get_log() const {
8477 - typedef typename cimg::largest<T,float>::type restype;
8478 - return CImg<restype>(*this,false).log();
8479 - }
8480 -
8481 - //! Replace each image pixel by its log10.
8482 - /**
8483 - \see get_log10(), log(), get_log()
8484 - **/
8485 - CImg& log10() {
8486 - cimg_for(*this,ptr,T) (*ptr)=(T)std::log10((double)(*ptr));
8487 - return *this;
8488 - }
8489 -
8490 - //! Return the image of the log10 of the pixel values.
8491 - /**
8492 - \see log10(), log(), get_log()
8493 - **/
8494 - CImg<typename cimg::largest<T,float>::type> get_log10() const {
8495 - typedef typename cimg::largest<T,float>::type restype;
8496 - return CImg<restype>(*this,false).log10();
8497 - }
8498 -
8499 - //! Replace each image pixel by its power by \p p.
8500 - /**
8501 - \param p = power
8502 - \see get_pow(), sqrt(), get_sqrt()
8503 - **/
8504 - CImg& pow(const double p) {
8505 - if (p==0) return fill(1);
8506 - if (p==1) return *this;
8507 - if (p==2) { cimg_for(*this,ptr,T) { const T& val = *ptr; *ptr=val*val; } return *this; }
8508 - if (p==3) { cimg_for(*this,ptr,T) { const T& val = *ptr; *ptr=val*val*val; } return *this; }
8509 - if (p==4) { cimg_for(*this,ptr,T) { const T& val = *ptr; *ptr=val*val*val*val; } return *this; }
8510 - cimg_for(*this,ptr,T) (*ptr)=(T)std::pow((double)(*ptr),p);
8511 - return *this;
8512 - }
8513 -
8514 - //! Return the image of the square root of the pixel values.
8515 - /**
8516 - \param p = power
8517 - \see pow(), sqrt(), get_sqrt()
8518 - **/
8519 - CImg<typename cimg::largest<T,float>::type> get_pow(const double p) const {
8520 - typedef typename cimg::largest<T,float>::type restype;
8521 - return CImg<restype>(*this,false).pow(p);
8522 - }
8523 -
8524 - //! Return each image pixel (*this)(x,y,z,k) by its power by \p img(x,y,z,k)
8525 - /**
8526 - In-place version
8527 - **/
8528 - template<typename t> CImg& pow(const CImg<t>& img) {
8529 - t *ptrs = img.data;
8530 - T *ptrf = data + cimg::min(size(),img.size());
8531 - for (T* ptrd = data; ptrd<ptrf; ptrd++) (*ptrd)=(T)std::pow((double)*ptrd,(double)(*(ptrs++)));
8532 - return *this;
8533 - }
8534 -
8535 - //! Return each image pixel (*this)(x,y,z,k) by its power by \p img(x,y,z,k)
8536 - template<typename t> CImg<typename cimg::largest<T,float>::type> get_pow(const CImg<t>& img) const {
8537 - typedef typename cimg::largest<T,float>::type restype;
8538 - return CImg<restype>(*this,false).pow(img);
8539 - }
8540 -
8541 - //! Replace each pixel value by its absolute value.
8542 - /**
8543 - \see get_abs()
8544 - **/
8545 - CImg& abs() {
8546 - cimg_for(*this,ptr,T) (*ptr)=cimg::abs(*ptr);
8547 - return *this;
8548 - }
8549 -
8550 - //! Return the image of the absolute value of the pixel values.
8551 - /**
8552 - \see abs()
8553 - **/
8554 - CImg<typename cimg::largest<T,float>::type> get_abs() const {
8555 - typedef typename cimg::largest<T,float>::type restype;
8556 - return CImg<restype>(*this,false).abs();
8557 - }
8558 -
8559 - //! Replace each image pixel by its cosinus.
8560 - /**
8561 - \see get_cos(), sin(), get_sin(), tan(), get_tan()
8562 - **/
8563 - CImg& cos() {
8564 - cimg_for(*this,ptr,T) (*ptr)=(T)std::cos((double)(*ptr));
8565 - return *this;
8566 - }
8567 -
8568 - //! Return the image of the cosinus of the pixel values.
8569 - /**
8570 - \see cos(), sin(), get_sin(), tan(), get_tan()
8571 - **/
8572 - CImg<typename cimg::largest<T,float>::type> get_cos() const {
8573 - typedef typename cimg::largest<T,float>::type restype;
8574 - return CImg<restype>(*this,false).cos();
8575 - }
8576 -
8577 - //! Replace each image pixel by its sinus.
8578 - /**
8579 - \see get_sin(), cos(), get_cos(), tan(), get_tan()
8580 - **/
8581 - CImg& sin() {
8582 - cimg_for(*this,ptr,T) (*ptr)=(T)std::sin((double)(*ptr));
8583 - return *this;
8584 - }
8585 -
8586 - //! Return the image of the sinus of the pixel values.
8587 - /**
8588 - \see sin(), cos(), get_cos(), tan(), get_tan()
8589 - **/
8590 - CImg<typename cimg::largest<T,float>::type> get_sin() const {
8591 - typedef typename cimg::largest<T,float>::type restype;
8592 - return CImg<restype>(*this,false).sin();
8593 - }
8594 -
8595 - //! Replace each image pixel by its tangent.
8596 - /**
8597 - \see get_tan(), cos(), get_cos(), sin(), get_sin()
8598 - **/
8599 - CImg& tan() {
8600 - cimg_for(*this,ptr,T) (*ptr)=(T)std::tan((double)(*ptr));
8601 - return *this;
8602 - }
8603 -
8604 - //! Return the image of the tangent of the pixel values.
8605 - /**
8606 - \see tan(), cos(), get_cos(), sin(), get_sin()
8607 - **/
8608 - CImg<typename cimg::largest<T,float>::type> get_tan() const {
8609 - typedef typename cimg::largest<T,float>::type restype;
8610 - return CImg<restype>(*this,false).tan();
8611 - }
8612 -
8613 - //! Replace each image pixel by its arc-cosinus.
8614 - CImg& acos() {
8615 - cimg_for(*this,ptr,T) (*ptr)=(T)std::acos((double)(*ptr));
8616 - return *this;
8617 - }
8618 -
8619 - //! Return the image of the arc-cosinus of the pixel values.
8620 - CImg<typename cimg::largest<T,float>::type> get_acos() const {
8621 - typedef typename cimg::largest<T,float>::type restype;
8622 - return CImg<restype>(*this,false).acos();
8623 - }
8624 -
8625 - //! Replace each image pixel by its arc-sinus.
8626 - CImg& asin() {
8627 - cimg_for(*this,ptr,T) (*ptr)=(T)std::asin((double)(*ptr));
8628 - return *this;
8629 - }
8630 -
8631 - //! Return the image of the arc-sinus of the pixel values.
8632 - CImg<typename cimg::largest<T,float>::type> get_asin() const {
8633 - typedef typename cimg::largest<T,float>::type restype;
8634 - return CImg<restype>(*this,false).asin();
8635 - }
8636 -
8637 - //! Replace each image pixel by its arc-tangent.
8638 - CImg& atan() {
8639 - cimg_for(*this,ptr,T) (*ptr)=(T)std::atan((double)(*ptr));
8640 - return *this;
8641 - }
8642 -
8643 - //! Return the image of the arc-tangent of the pixel values.
8644 - CImg<typename cimg::largest<T,float>::type> get_atan() const {
8645 - typedef typename cimg::largest<T,float>::type restype;
8646 - return CImg<restype>(*this,false).atan();
8647 - }
8648 -
8649 - //! Return the MSE (Mean-Squared Error) between two images.
8650 - template<typename t> double MSE(const CImg<t>& img) const {
8651 - if (img.size()!=size())
8652 - throw CImgArgumentException("CImg<%s>::MSE() : Instance image (%u,%u,%u,%u) and given image (%u,%u,%u,%u) have different dimensions.",
8653 - pixel_type(),width,height,depth,dim,img.width,img.height,img.depth,img.dim);
8654 -
8655 - double vMSE = 0;
8656 - const t* ptr2 = img.end();
8657 - cimg_for(*this,ptr1,T) {
8658 - const double diff = (double)*ptr1 - (double)*(--ptr2);
8659 - vMSE += diff*diff;
8660 - }
8661 - vMSE/=img.size();
8662 - return vMSE;
8663 - }
8664 -
8665 - //! Return the PSNR between two images.
8666 - template<typename t> double PSNR(const CImg<t>& img, const double valmax=255.0) const {
8667 - const double vMSE = std::sqrt(MSE(img));
8668 - return (vMSE!=0)?(20*std::log10(valmax/vMSE)):(cimg::type<double>::max());
8669 - }
8670 -
8671 - //@}
8672 - //-----------------------------------
8673 - //
8674 - //! \name Usual Image Transformations
8675 - //@{
8676 - //-----------------------------------
8677 -
8678 - //! Fill an image by a value \p val.
8679 - /**
8680 - \param val = fill value
8681 - \note All pixel values of the instance image will be initialized by \p val.
8682 - \see operator=().
8683 - **/
8684 - CImg& fill(const T& val) {
8685 - if (!is_empty()) {
8686 - if (val!=0 && sizeof(T)!=1) cimg_for(*this,ptr,T) *ptr=val;
8687 - else std::memset(data,(int)val,size()*sizeof(T));
8688 - }
8689 - return *this;
8690 - }
8691 -
8692 - CImg get_fill(const T& val) const {
8693 - return (+*this).fill(val);
8694 - }
8695 -
8696 - //! Fill sequentially all pixel values with values \a val0 and \a val1 respectively.
8697 - /**
8698 - \param val0 = fill value 1
8699 - \param val1 = fill value 2
8700 - **/
8701 - CImg& fill(const T& val0,const T& val1) {
8702 - if (!is_empty()) {
8703 - T *ptr, *ptr_end = end()-1;
8704 - for (ptr=data; ptr<ptr_end; ) { *(ptr++)=val0; *(ptr++)=val1; }
8705 - if (ptr!=ptr_end+1) *(ptr++)=val0;
8706 - }
8707 - return *this;
8708 - }
8709 -
8710 - CImg get_fill(const T& val0, const T& val1) const {
8711 - return (+*this).fill(val0,val1);
8712 - }
8713 -
8714 - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2.
8715 - /**
8716 - \param val0 = fill value 1
8717 - \param val1 = fill value 2
8718 - \param val2 = fill value 3
8719 - **/
8720 - CImg& fill(const T& val0,const T& val1,const T& val2) {
8721 - if (!is_empty()) {
8722 - T *ptr, *ptr_end = end()-2;
8723 - for (ptr=data; ptr<ptr_end; ) { *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; }
8724 - ptr_end+=2;
8725 - switch (ptr_end-ptr) {
8726 - case 2: *(--ptr_end)=val1;
8727 - case 1: *(--ptr_end)=val0;
8728 - }
8729 - }
8730 - return *this;
8731 - }
8732 -
8733 - CImg get_fill(const T& val0, const T& val1, const T& val2) const {
8734 - return (+*this).fill(val0,val1,val2);
8735 - }
8736 -
8737 - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3.
8738 - /**
8739 - \param val0 = fill value 1
8740 - \param val1 = fill value 2
8741 - \param val2 = fill value 3
8742 - \param val3 = fill value 4
8743 - **/
8744 - CImg& fill(const T& val0,const T& val1,const T& val2,const T& val3) {
8745 - if (!is_empty()) {
8746 - T *ptr, *ptr_end = end()-3;
8747 - for (ptr=data; ptr<ptr_end; ) { *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; *(ptr++)=val3; }
8748 - ptr_end+=3;
8749 - switch (ptr_end-ptr) {
8750 - case 3: *(--ptr_end)=val2;
8751 - case 2: *(--ptr_end)=val1;
8752 - case 1: *(--ptr_end)=val0;
8753 - }
8754 - }
8755 - return *this;
8756 - }
8757 -
8758 - CImg get_fill(const T& val0, const T& val1, const T& val2, const T& val3) const {
8759 - return (+*this).fill(val0,val1,val2,val3);
8760 - }
8761 -
8762 - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3 and \a val4.
8763 - /**
8764 - \param val0 = fill value 1
8765 - \param val1 = fill value 2
8766 - \param val2 = fill value 3
8767 - \param val3 = fill value 4
8768 - \param val4 = fill value 5
8769 - **/
8770 - CImg& fill(const T& val0,const T& val1,const T& val2,const T& val3,const T& val4) {
8771 - if (!is_empty()) {
8772 - T *ptr, *ptr_end = end()-4;
8773 - for (ptr=data; ptr<ptr_end; ) { *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; *(ptr++)=val3; *(ptr++)=val4; }
8774 - ptr_end+=4;
8775 - switch (ptr_end-ptr) {
8776 - case 4: *(--ptr_end)=val3;
8777 - case 3: *(--ptr_end)=val2;
8778 - case 2: *(--ptr_end)=val1;
8779 - case 1: *(--ptr_end)=val0;
8780 - }
8781 - }
8782 - return *this;
8783 - }
8784 -
8785 - CImg get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4) const {
8786 - return (+*this).fill(val0,val1,val2,val3,val4);
8787 - }
8788 -
8789 - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3 and \a val4 and \a val5
8790 - /**
8791 - \param val0 = fill value 1
8792 - \param val1 = fill value 2
8793 - \param val2 = fill value 3
8794 - \param val3 = fill value 4
8795 - \param val4 = fill value 5
8796 - \param val5 = fill value 6
8797 - **/
8798 - CImg& fill(const T& val0,const T& val1,const T& val2,const T& val3,const T& val4,const T& val5) {
8799 - if (!is_empty()) {
8800 - T *ptr, *ptr_end = end()-5;
8801 - for (ptr=data; ptr<ptr_end; ) {
8802 - *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; *(ptr++)=val3; *(ptr++)=val4; *(ptr++)=val5;
8803 - }
8804 - ptr_end+=5;
8805 - switch (ptr_end-ptr) {
8806 - case 5: *(--ptr_end)=val4;
8807 - case 4: *(--ptr_end)=val3;
8808 - case 3: *(--ptr_end)=val2;
8809 - case 2: *(--ptr_end)=val1;
8810 - case 1: *(--ptr_end)=val0;
8811 - }
8812 - }
8813 - return *this;
8814 - }
8815 -
8816 - CImg get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5) const {
8817 - return (+*this).fill(val0,val1,val2,val3,val4,val5);
8818 - }
8819 -
8820 - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3 and \a val4 and \a val5
8821 - /**
8822 - \param val0 = fill value 1
8823 - \param val1 = fill value 2
8824 - \param val2 = fill value 3
8825 - \param val3 = fill value 4
8826 - \param val4 = fill value 5
8827 - \param val5 = fill value 6
8828 - \param val6 = fill value 7
8829 - **/
8830 - CImg& fill(const T& val0,const T& val1,const T& val2,const T& val3,
8831 - const T& val4,const T& val5,const T& val6) {
8832 - if (!is_empty()) {
8833 - T *ptr, *ptr_end = end()-6;
8834 - for (ptr=data; ptr<ptr_end; ) {
8835 - *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; *(ptr++)=val3; *(ptr++)=val4; *(ptr++)=val5; *(ptr++)=val6;
8836 - }
8837 - ptr_end+=6;
8838 - switch (ptr_end-ptr) {
8839 - case 6: *(--ptr_end)=val5;
8840 - case 5: *(--ptr_end)=val4;
8841 - case 4: *(--ptr_end)=val3;
8842 - case 3: *(--ptr_end)=val2;
8843 - case 2: *(--ptr_end)=val1;
8844 - case 1: *(--ptr_end)=val0;
8845 - }
8846 - }
8847 - return *this;
8848 - }
8849 -
8850 - CImg get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5,
8851 - const T& val6) const {
8852 - return (+*this).fill(val0,val1,val2,val3,val4,val5,val6);
8853 - }
8854 -
8855 - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3 and \a ... and \a val7.
8856 - /**
8857 - \param val0 = fill value 1
8858 - \param val1 = fill value 2
8859 - \param val2 = fill value 3
8860 - \param val3 = fill value 4
8861 - \param val4 = fill value 5
8862 - \param val5 = fill value 6
8863 - \param val6 = fill value 7
8864 - \param val7 = fill value 8
8865 - **/
8866 - CImg& fill(const T& val0,const T& val1,const T& val2,const T& val3,
8867 - const T& val4,const T& val5,const T& val6,const T& val7) {
8868 - if (!is_empty()) {
8869 - T *ptr, *ptr_end = end()-7;
8870 - for (ptr=data; ptr<ptr_end; ) {
8871 - *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; *(ptr++)=val3;
8872 - *(ptr++)=val4; *(ptr++)=val5; *(ptr++)=val6; *(ptr++)=val7;
8873 - }
8874 - ptr_end+=7;
8875 - switch (ptr_end-ptr) {
8876 - case 7: *(--ptr_end)=val6;
8877 - case 6: *(--ptr_end)=val5;
8878 - case 5: *(--ptr_end)=val4;
8879 - case 4: *(--ptr_end)=val3;
8880 - case 3: *(--ptr_end)=val2;
8881 - case 2: *(--ptr_end)=val1;
8882 - case 1: *(--ptr_end)=val0;
8883 - }
8884 - }
8885 - return *this;
8886 - }
8887 -
8888 - CImg get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5,
8889 - const T& val6, const T& val7) const {
8890 - return (+*this).fill(val0,val1,val2,val3,val4,val5,val6,val7);
8891 - }
8892 -
8893 - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3 and \a ... and \a val8.
8894 - /**
8895 - \param val0 = fill value 1
8896 - \param val1 = fill value 2
8897 - \param val2 = fill value 3
8898 - \param val3 = fill value 4
8899 - \param val4 = fill value 5
8900 - \param val5 = fill value 6
8901 - \param val6 = fill value 7
8902 - \param val7 = fill value 8
8903 - \param val8 = fill value 9
8904 - **/
8905 - CImg& fill(const T& val0,const T& val1,const T& val2,
8906 - const T& val3,const T& val4,const T& val5,
8907 - const T& val6,const T& val7,const T& val8) {
8908 - if (!is_empty()) {
8909 - T *ptr, *ptr_end = end()-8;
8910 - for (ptr=data; ptr<ptr_end; ) {
8911 - *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2;
8912 - *(ptr++)=val3; *(ptr++)=val4; *(ptr++)=val5;
8913 - *(ptr++)=val6; *(ptr++)=val7; *(ptr++)=val8;
8914 - }
8915 - ptr_end+=8;
8916 - switch (ptr_end-ptr) {
8917 - case 8: *(--ptr_end)=val7;
8918 - case 7: *(--ptr_end)=val6;
8919 - case 6: *(--ptr_end)=val5;
8920 - case 5: *(--ptr_end)=val4;
8921 - case 4: *(--ptr_end)=val3;
8922 - case 3: *(--ptr_end)=val2;
8923 - case 2: *(--ptr_end)=val1;
8924 - case 1: *(--ptr_end)=val0;
8925 - }
8926 - }
8927 - return *this;
8928 - }
8929 -
8930 - CImg get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5,
8931 - const T& val6, const T& val7, const T& val8) const {
8932 - return (+*this).fill(val0,val1,val2,val3,val4,val5,val6,val7,val8);
8933 - }
8934 -
8935 - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3 and \a ... and \a val9.
8936 - /**
8937 - \param val0 = fill value 1
8938 - \param val1 = fill value 2
8939 - \param val2 = fill value 3
8940 - \param val3 = fill value 4
8941 - \param val4 = fill value 5
8942 - \param val5 = fill value 6
8943 - \param val6 = fill value 7
8944 - \param val7 = fill value 8
8945 - \param val8 = fill value 9
8946 - \param val9 = fill value 10
8947 - **/
8948 - CImg& fill(const T& val0,const T& val1,const T& val2,const T& val3,const T& val4,
8949 - const T& val5,const T& val6,const T& val7,const T& val8,const T& val9) {
8950 - if (!is_empty()) {
8951 - T *ptr, *ptr_end = end()-9;
8952 - for (ptr=data; ptr<ptr_end; ) {
8953 - *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; *(ptr++)=val3; *(ptr++)=val4;
8954 - *(ptr++)=val5; *(ptr++)=val6; *(ptr++)=val7; *(ptr++)=val8; *(ptr++)=val9;
8955 - }
8956 - ptr_end+=9;
8957 - switch (ptr_end-ptr) {
8958 - case 9: *(--ptr_end)=val8;
8959 - case 8: *(--ptr_end)=val7;
8960 - case 7: *(--ptr_end)=val6;
8961 - case 6: *(--ptr_end)=val5;
8962 - case 5: *(--ptr_end)=val4;
8963 - case 4: *(--ptr_end)=val3;
8964 - case 3: *(--ptr_end)=val2;
8965 - case 2: *(--ptr_end)=val1;
8966 - case 1: *(--ptr_end)=val0;
8967 - }
8968 - }
8969 - return *this;
8970 - }
8971 -
8972 - CImg get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5,
8973 - const T& val6, const T& val7, const T& val8, const T& val9) const {
8974 - return (+*this).fill(val0,val1,val2,val3,val4,val5,val6,val7,val8,val9);
8975 - }
8976 -
8977 - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3 and \a ... and \a val11.
8978 - /**
8979 - \param val0 = fill value 1
8980 - \param val1 = fill value 2
8981 - \param val2 = fill value 3
8982 - \param val3 = fill value 4
8983 - \param val4 = fill value 5
8984 - \param val5 = fill value 6
8985 - \param val6 = fill value 7
8986 - \param val7 = fill value 8
8987 - \param val8 = fill value 9
8988 - \param val9 = fill value 10
8989 - \param val10 = fill value 11
8990 - \param val11 = fill value 12
8991 - **/
8992 - CImg& fill(const T& val0,const T& val1,const T& val2,const T& val3,
8993 - const T& val4,const T& val5,const T& val6,const T& val7,
8994 - const T& val8,const T& val9,const T& val10,const T& val11) {
8995 - if (!is_empty()) {
8996 - T *ptr, *ptr_end = end()-11;
8997 - for (ptr=data; ptr<ptr_end; ) {
8998 - *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; *(ptr++)=val3; *(ptr++)=val4; *(ptr++)=val5;
8999 - *(ptr++)=val6; *(ptr++)=val7; *(ptr++)=val8; *(ptr++)=val9; *(ptr++)=val10; *(ptr++)=val11;
9000 - }
9001 - ptr_end+=11;
9002 - switch (ptr_end-ptr) {
9003 - case 11: *(--ptr_end)=val10;
9004 - case 10: *(--ptr_end)=val9;
9005 - case 9: *(--ptr_end)=val8;
9006 - case 8: *(--ptr_end)=val7;
9007 - case 7: *(--ptr_end)=val6;
9008 - case 6: *(--ptr_end)=val5;
9009 - case 5: *(--ptr_end)=val4;
9010 - case 4: *(--ptr_end)=val3;
9011 - case 3: *(--ptr_end)=val2;
9012 - case 2: *(--ptr_end)=val1;
9013 - case 1: *(--ptr_end)=val0;
9014 - }
9015 - }
9016 - return *this;
9017 - }
9018 -
9019 - CImg get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5,
9020 - const T& val6, const T& val7, const T& val8, const T& val9, const T& val10, const T& val11) const {
9021 - return (+*this).fill(val0,val1,val2,val3,val4,val5,val6,val7,val8,val9,val10,val11);
9022 - }
9023 -
9024 - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3 and \a ... and \a val11.
9025 - /**
9026 - \param val0 = fill value 1
9027 - \param val1 = fill value 2
9028 - \param val2 = fill value 3
9029 - \param val3 = fill value 4
9030 - \param val4 = fill value 5
9031 - \param val5 = fill value 6
9032 - \param val6 = fill value 7
9033 - \param val7 = fill value 8
9034 - \param val8 = fill value 9
9035 - \param val9 = fill value 10
9036 - \param val10 = fill value 11
9037 - \param val11 = fill value 12
9038 - \param val12 = fill value 13
9039 - **/
9040 - CImg& fill(const T& val0,const T& val1,const T& val2,const T& val3,
9041 - const T& val4,const T& val5,const T& val6,const T& val7,
9042 - const T& val8,const T& val9,const T& val10,const T& val11,
9043 - const T& val12) {
9044 - if (!is_empty()) {
9045 - T *ptr, *ptr_end = end()-12;
9046 - for (ptr=data; ptr<ptr_end; ) {
9047 - *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; *(ptr++)=val3; *(ptr++)=val4; *(ptr++)=val5;
9048 - *(ptr++)=val6; *(ptr++)=val7; *(ptr++)=val8; *(ptr++)=val9; *(ptr++)=val10; *(ptr++)=val11;
9049 - *(ptr++)=val12;
9050 - }
9051 - ptr_end+=12;
9052 - switch (ptr_end-ptr) {
9053 - case 12: *(--ptr_end)=val11;
9054 - case 11: *(--ptr_end)=val10;
9055 - case 10: *(--ptr_end)=val9;
9056 - case 9: *(--ptr_end)=val8;
9057 - case 8: *(--ptr_end)=val7;
9058 - case 7: *(--ptr_end)=val6;
9059 - case 6: *(--ptr_end)=val5;
9060 - case 5: *(--ptr_end)=val4;
9061 - case 4: *(--ptr_end)=val3;
9062 - case 3: *(--ptr_end)=val2;
9063 - case 2: *(--ptr_end)=val1;
9064 - case 1: *(--ptr_end)=val0;
9065 - }
9066 - }
9067 - return *this;
9068 - }
9069 -
9070 - CImg get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5,
9071 - const T& val6, const T& val7, const T& val8, const T& val9, const T& val10, const T& val11,
9072 - const T& val12, const T& val13) const {
9073 - return (+*this).fill(val0,val1,val2,val3,val4,val5,val6,val7,val8,val9,val10,val11,val12,val13);
9074 - }
9075 -
9076 -
9077 - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3 and \a ... and \a val15.
9078 - /**
9079 - \param val0 = fill value 1
9080 - \param val1 = fill value 2
9081 - \param val2 = fill value 3
9082 - \param val3 = fill value 4
9083 - \param val4 = fill value 5
9084 - \param val5 = fill value 6
9085 - \param val6 = fill value 7
9086 - \param val7 = fill value 8
9087 - \param val8 = fill value 9
9088 - \param val9 = fill value 10
9089 - \param val10 = fill value 11
9090 - \param val11 = fill value 12
9091 - \param val12 = fill value 13
9092 - \param val13 = fill value 14
9093 - \param val14 = fill value 15
9094 - \param val15 = fill value 16
9095 - **/
9096 - CImg& fill(const T& val0,const T& val1,const T& val2,const T& val3,
9097 - const T& val4,const T& val5,const T& val6,const T& val7,
9098 - const T& val8,const T& val9,const T& val10,const T& val11,
9099 - const T& val12,const T& val13,const T& val14,const T& val15) {
9100 - if (!is_empty()) {
9101 - T *ptr, *ptr_end = end()-15;
9102 - for (ptr=data; ptr<ptr_end; ) {
9103 - *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; *(ptr++)=val3; *(ptr++)=val4; *(ptr++)=val5;
9104 - *(ptr++)=val6; *(ptr++)=val7; *(ptr++)=val8; *(ptr++)=val9; *(ptr++)=val10; *(ptr++)=val11;
9105 - *(ptr++)=val12; *(ptr++)=val13; *(ptr++)=val14; *(ptr++)=val15;
9106 - }
9107 - ptr_end+=15;
9108 - switch (ptr_end-ptr) {
9109 - case 15: *(--ptr_end)=val14;
9110 - case 14: *(--ptr_end)=val13;
9111 - case 13: *(--ptr_end)=val12;
9112 - case 12: *(--ptr_end)=val11;
9113 - case 11: *(--ptr_end)=val10;
9114 - case 10: *(--ptr_end)=val9;
9115 - case 9: *(--ptr_end)=val8;
9116 - case 8: *(--ptr_end)=val7;
9117 - case 7: *(--ptr_end)=val6;
9118 - case 6: *(--ptr_end)=val5;
9119 - case 5: *(--ptr_end)=val4;
9120 - case 4: *(--ptr_end)=val3;
9121 - case 3: *(--ptr_end)=val2;
9122 - case 2: *(--ptr_end)=val1;
9123 - case 1: *(--ptr_end)=val0;
9124 - }
9125 - }
9126 - return *this;
9127 - }
9128 -
9129 - CImg get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5,
9130 - const T& val6, const T& val7, const T& val8, const T& val9, const T& val10, const T& val11,
9131 - const T& val12, const T& val13, const T& val14, const T& val15) const {
9132 - return (+*this).fill(val0,val1,val2,val3,val4,val5,val6,val7,val8,val9,val10,val11,val12,val13,val14,val15);
9133 - }
9134 -
9135 - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3 and \a ... and \a val24.
9136 - /**
9137 - \param val0 = fill value 1
9138 - \param val1 = fill value 2
9139 - \param val2 = fill value 3
9140 - \param val3 = fill value 4
9141 - \param val4 = fill value 5
9142 - \param val5 = fill value 6
9143 - \param val6 = fill value 7
9144 - \param val7 = fill value 8
9145 - \param val8 = fill value 9
9146 - \param val9 = fill value 10
9147 - \param val10 = fill value 11
9148 - \param val11 = fill value 12
9149 - \param val12 = fill value 13
9150 - \param val13 = fill value 14
9151 - \param val14 = fill value 15
9152 - \param val15 = fill value 16
9153 - \param val16 = fill value 17
9154 - \param val17 = fill value 18
9155 - \param val18 = fill value 19
9156 - \param val19 = fill value 20
9157 - \param val20 = fill value 21
9158 - \param val21 = fill value 22
9159 - \param val22 = fill value 23
9160 - \param val23 = fill value 24
9161 - \param val24 = fill value 25
9162 - **/
9163 - CImg& fill(const T& val0,const T& val1,const T& val2,const T& val3,const T& val4,
9164 - const T& val5,const T& val6,const T& val7,const T& val8,const T& val9,
9165 - const T& val10,const T& val11,const T& val12,const T& val13,const T& val14,
9166 - const T& val15,const T& val16,const T& val17,const T& val18,const T& val19,
9167 - const T& val20,const T& val21,const T& val22,const T& val23,const T& val24) {
9168 - if (!is_empty()) {
9169 - T *ptr, *ptr_end = end()-24;
9170 - for (ptr=data; ptr<ptr_end; ) {
9171 - *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; *(ptr++)=val3; *(ptr++)=val4;
9172 - *(ptr++)=val5; *(ptr++)=val6; *(ptr++)=val7; *(ptr++)=val8; *(ptr++)=val9;
9173 - *(ptr++)=val10; *(ptr++)=val11; *(ptr++)=val12; *(ptr++)=val13; *(ptr++)=val14;
9174 - *(ptr++)=val15; *(ptr++)=val16; *(ptr++)=val17; *(ptr++)=val18; *(ptr++)=val19;
9175 - *(ptr++)=val20; *(ptr++)=val21; *(ptr++)=val22; *(ptr++)=val23; *(ptr++)=val24;
9176 - }
9177 - ptr_end+=24;
9178 - switch (ptr_end-ptr) {
9179 - case 24: *(--ptr_end)=val23;
9180 - case 23: *(--ptr_end)=val22;
9181 - case 22: *(--ptr_end)=val21;
9182 - case 21: *(--ptr_end)=val20;
9183 - case 20: *(--ptr_end)=val19;
9184 - case 19: *(--ptr_end)=val18;
9185 - case 18: *(--ptr_end)=val17;
9186 - case 17: *(--ptr_end)=val16;
9187 - case 16: *(--ptr_end)=val15;
9188 - case 15: *(--ptr_end)=val14;
9189 - case 14: *(--ptr_end)=val13;
9190 - case 13: *(--ptr_end)=val12;
9191 - case 12: *(--ptr_end)=val11;
9192 - case 11: *(--ptr_end)=val10;
9193 - case 10: *(--ptr_end)=val9;
9194 - case 9: *(--ptr_end)=val8;
9195 - case 8: *(--ptr_end)=val7;
9196 - case 7: *(--ptr_end)=val6;
9197 - case 6: *(--ptr_end)=val5;
9198 - case 5: *(--ptr_end)=val4;
9199 - case 4: *(--ptr_end)=val3;
9200 - case 3: *(--ptr_end)=val2;
9201 - case 2: *(--ptr_end)=val1;
9202 - case 1: *(--ptr_end)=val0;
9203 - }
9204 - }
9205 - return *this;
9206 - }
9207 -
9208 - CImg get_fill(const T& val0,const T& val1,const T& val2,const T& val3,const T& val4,
9209 - const T& val5,const T& val6,const T& val7,const T& val8,const T& val9,
9210 - const T& val10,const T& val11,const T& val12,const T& val13,const T& val14,
9211 - const T& val15,const T& val16,const T& val17,const T& val18,const T& val19,
9212 - const T& val20,const T& val21,const T& val22,const T& val23,const T& val24) const {
9213 - return (+*this).fill(val0,val1,val2,val3,val4,val5,val6,val7,val8,val9,
9214 - val10,val11,val12,val13,val14,val15,val16,val17,val18,val19,
9215 - val20,val21,val22,val23,val24);
9216 - }
9217 -
9218 - //! Linear normalization of the pixel values between \a a and \a b.
9219 - /**
9220 - \param a = minimum pixel value after normalization.
9221 - \param b = maximum pixel value after normalization.
9222 - \see get_normalize(), cut(), get_cut().
9223 - **/
9224 - CImg& normalize(const T& a, const T& b) {
9225 - if (!is_empty()) {
9226 - const CImgStats st(*this,false);
9227 - if (st.min==st.max) return fill(0);
9228 - if (st.min!=a || st.max!=b) cimg_for(*this,ptr,T) *ptr=(T)((*ptr-st.min)/(st.max-st.min)*(b-a)+a);
9229 - }
9230 - return *this;
9231 - }
9232 -
9233 - //! Return the image of normalized values.
9234 - /**
9235 - \param a = minimum pixel value after normalization.
9236 - \param b = maximum pixel value after normalization.
9237 - \see normalize(), cut(), get_cut().
9238 - **/
9239 - CImg get_normalize(const T& a, const T& b) const {
9240 - return (+*this).normalize(a,b);
9241 - }
9242 -
9243 - //! Cut pixel values between \a a and \a b.
9244 - /**
9245 - \param a = minimum pixel value after cut.
9246 - \param b = maximum pixel value after cut.
9247 - \see get_cut(), normalize(), get_normalize().
9248 - **/
9249 - CImg& cut(const T& a, const T& b) {
9250 - if (!is_empty())
9251 - cimg_for(*this,ptr,T) *ptr = (*ptr<a)?a:((*ptr>b)?b:*ptr);
9252 - return *this;
9253 - }
9254 -
9255 - //! Return the image of cutted values.
9256 - /**
9257 - \param a = minimum pixel value after cut.
9258 - \param b = maximum pixel value after cut.
9259 - \see cut(), normalize(), get_normalize().
9260 - **/
9261 - CImg get_cut(const T& a, const T& b) const {
9262 - return (+*this).cut(a,b);
9263 - }
9264 -
9265 - //! Quantize pixel values into \n levels.
9266 - /**
9267 - \param n = number of quantification levels
9268 - \see get_quantize().
9269 - **/
9270 - CImg& quantize(const unsigned int n=256) {
9271 - if (!is_empty()) {
9272 - if (!n) throw CImgArgumentException("CImg<%s>::quantize() : Cannot quantize image to 0 values.",
9273 - pixel_type());
9274 - const CImgStats st(*this,false);
9275 - const double range = st.max-st.min;
9276 - if (range>0) cimg_for(*this,ptr,T) {
9277 - const unsigned int val = (unsigned int)((*ptr-st.min)*n/range);
9278 - *ptr = (T)(st.min + cimg::min(val,n-1)*range);
9279 - }
9280 - }
9281 - return *this;
9282 - }
9283 -
9284 - //! Return a quantified image, with \n levels.
9285 - /**
9286 - \param n = number of quantification levels
9287 - \see quantize().
9288 - **/
9289 - CImg get_quantize(const unsigned int n=256) const {
9290 - return (+*this).quantize(n);
9291 - }
9292 -
9293 - //! Threshold the image.
9294 - /**
9295 - \param thres = threshold
9296 - \see get_threshold().
9297 - **/
9298 - CImg& threshold(const T& thres) {
9299 - if (!is_empty()) cimg_for(*this,ptr,T) *ptr = *ptr<=thres?(T)0:(T)1;
9300 - return *this;
9301 - }
9302 -
9303 - //! Return a thresholded image.
9304 - /**
9305 - \param thres = threshold.
9306 - \see threshold().
9307 - **/
9308 - CImg get_threshold(const T& thres) const {
9309 - return (+*this).threshold(thres);
9310 - }
9311 -
9312 - //! Return a rotated image.
9313 - /**
9314 - \param angle = rotation angle (in degrees).
9315 - \param cond = rotation type. can be :
9316 - - 0 = zero-value at borders
9317 - - 1 = repeat image at borders
9318 - - 2 = zero-value at borders and linear interpolation
9319 - \note Returned image will probably have a different size than the instance image *this.
9320 - \see rotate()
9321 - **/
9322 - CImg get_rotate(const float angle, const unsigned int cond=3) const {
9323 - if (is_empty()) return CImg<T>();
9324 - CImg dest;
9325 - const float nangle = cimg::mod(angle,360.0f), rad = (float)((nangle*cimg::PI)/180.0),
9326 - ca=(float)std::cos(rad), sa=(float)std::sin(rad);
9327 - if (cond!=1 && cimg::mod(nangle,90.0f)==0) { // optimized version for orthogonal angles
9328 - const int wm1 = dimx()-1, hm1 = dimy()-1;
9329 - const int iangle = (int)nangle/90;
9330 - switch (iangle) {
9331 - case 1: {
9332 - dest.assign(height,width,depth,dim);
9333 - cimg_forXYZV(dest,x,y,z,v) dest(x,y,z,v) = (*this)(y,hm1-x,z,v);
9334 - } break;
9335 - case 2: {
9336 - dest.assign(width,height,depth,dim);
9337 - cimg_forXYZV(dest,x,y,z,v) dest(x,y,z,v) = (*this)(wm1-x,hm1-y,z,v);
9338 - } break;
9339 - case 3: {
9340 - dest.assign(height,width,depth,dim);
9341 - cimg_forXYZV(dest,x,y,z,v) dest(x,y,z,v) = (*this)(wm1-y,x,z,v);
9342 - } break;
9343 - default:
9344 - return *this;
9345 - }
9346 - } else { // generic version
9347 - const float
9348 - ux = (float)(cimg::abs(width*ca)), uy = (float)(cimg::abs(width*sa)),
9349 - vx = (float)(cimg::abs(height*sa)), vy = (float)(cimg::abs(height*ca)),
9350 - w2 = 0.5f*width, h2 = 0.5f*height,
9351 - dw2 = 0.5f*(ux+vx), dh2 = 0.5f*(uy+vy);
9352 - dest.assign((int)(ux+vx), (int)(uy+vy),depth,dim);
9353 - switch (cond) {
9354 - case 0: {
9355 - cimg_forXY(dest,x,y)
9356 - cimg_forZV(*this,z,v)
9357 - dest(x,y,z,v) = pix2d((int)(w2 + (x-dw2)*ca + (y-dh2)*sa),(int)(h2 - (x-dw2)*sa + (y-dh2)*ca),z,v,0);
9358 - } break;
9359 - case 1: {
9360 - cimg_forXY(dest,x,y)
9361 - cimg_forZV(*this,z,v)
9362 - dest(x,y,z,v) = (*this)(cimg::mod((int)(w2 + (x-dw2)*ca + (y-dh2)*sa),width),
9363 - cimg::mod((int)(h2 - (x-dw2)*sa + (y-dh2)*ca),height),z,v);
9364 - } break;
9365 - case 2: {
9366 - cimg_forXY(dest,x,y) {
9367 - const float X = w2 + (x-dw2)*ca + (y-dh2)*sa, Y = h2 - (x-dw2)*sa + (y-dh2)*ca;
9368 - cimg_forZV(*this,z,v) dest(x,y,z,v) = (T)linear_pix2d(X,Y,z,v,0);
9369 - }
9370 - } break;
9371 - default: {
9372 - cimg_forXY(dest,x,y) {
9373 - const float X = w2 + (x-dw2)*ca + (y-dh2)*sa, Y = h2 - (x-dw2)*sa + (y-dh2)*ca;
9374 - cimg_forZV(*this,z,v) dest(x,y,z,v) = (T)cubic_pix2d(X,Y,z,v,0);
9375 - }
9376 - } break;
9377 - }
9378 - }
9379 - return dest;
9380 - }
9381 -
9382 - //! Rotate the image
9383 - /**
9384 - \param angle = rotation angle (in degrees).
9385 - \param cond = rotation type. can be :
9386 - - 0 = zero-value at borders
9387 - - 1 = repeat image at borders
9388 - - 2 = zero-value at borders and linear interpolation
9389 - \see get_rotate()
9390 - **/
9391 - CImg& rotate(const float angle,const unsigned int cond=3) { return get_rotate(angle,cond).swap(*this); }
9392 -
9393 - //! Return a rotated image around the point (\c cx,\c cy).
9394 - /**
9395 - \param angle = rotation angle (in degrees).
9396 - \param cx = X-coordinate of the rotation center.
9397 - \param cy = Y-coordinate of the rotation center.
9398 - \param zoom = zoom.
9399 - \param cond = rotation type. can be :
9400 - - 0 = zero-value at borders
9401 - - 1 = repeat image at borders
9402 - - 2 = zero-value at borders and linear interpolation
9403 - \see rotate()
9404 - **/
9405 - CImg get_rotate(const float angle,const float cx,const float cy,const float zoom=1,const unsigned int cond=3) const {
9406 - if (is_empty()) return CImg<T>();
9407 - CImg dest(width,height,depth,dim);
9408 - const float nangle = cimg::mod(angle,360.0f), rad = (float)((nangle*cimg::PI)/180.0),
9409 - ca=(float)std::cos(rad)/zoom, sa=(float)std::sin(rad)/zoom;
9410 - if (cond!=1 && zoom==1 && cimg::mod(nangle,90.0f)==0) { // optimized version for orthogonal angles
9411 - const int iangle = (int)nangle/90;
9412 - switch (iangle) {
9413 - case 1: {
9414 - dest.fill(0);
9415 - const unsigned int
9416 - xmin = cimg::max(0,(dimx()-dimy())/2), xmax = cimg::min(width,xmin+height),
9417 - ymin = cimg::max(0,(dimy()-dimx())/2), ymax = cimg::min(height,ymin+width),
9418 - xoff = xmin + cimg::min(0,(dimx()-dimy())/2),
9419 - yoff = ymin + cimg::min(0,(dimy()-dimx())/2);
9420 - cimg_forZV(dest,z,v) for (unsigned int y=ymin; y<ymax; y++) for (unsigned int x=xmin; x<xmax; x++)
9421 - dest(x,y,z,v) = (*this)(y-yoff,height-1-x+xoff,z,v);
9422 - } break;
9423 - case 2: {
9424 - cimg_forXYZV(dest,x,y,z,v) dest(x,y,z,v) = (*this)(width-1-x,height-1-y,z,v);
9425 - } break;
9426 - case 3: {
9427 - dest.fill(0);
9428 - const unsigned int
9429 - xmin = cimg::max(0,(dimx()-dimy())/2), xmax = cimg::min(width,xmin+height),
9430 - ymin = cimg::max(0,(dimy()-dimx())/2), ymax = cimg::min(height,ymin+width),
9431 - xoff = xmin + cimg::min(0,(dimx()-dimy())/2),
9432 - yoff = ymin + cimg::min(0,(dimy()-dimx())/2);
9433 - cimg_forZV(dest,z,v) for (unsigned int y=ymin; y<ymax; y++) for (unsigned int x=xmin; x<xmax; x++)
9434 - dest(x,y,z,v) = (*this)(width-1-y+yoff,x-xoff,z,v);
9435 - } break;
9436 - default:
9437 - return *this;
9438 - }
9439 - } else
9440 - switch (cond) { // generic version
9441 - case 0: {
9442 - cimg_forXY(dest,x,y)
9443 - cimg_forZV(*this,z,v)
9444 - dest(x,y,z,v) = pix2d((int)(cx + (x-cx)*ca + (y-cy)*sa),(int)(cy - (x-cx)*sa + (y-cy)*ca),z,v,0);
9445 - } break;
9446 - case 1: {
9447 - cimg_forXY(dest,x,y)
9448 - cimg_forZV(*this,z,v)
9449 - dest(x,y,z,v) = (*this)(cimg::mod((int)(cx + (x-cx)*ca + (y-cy)*sa),width),
9450 - cimg::mod((int)(cy - (x-cx)*sa + (y-cy)*ca),height),z,v);
9451 - } break;
9452 - case 2: {
9453 - cimg_forXY(dest,x,y) {
9454 - const float X = cx + (x-cx)*ca + (y-cy)*sa, Y = cy - (x-cx)*sa + (y-cy)*ca;
9455 - cimg_forZV(*this,z,v) dest(x,y,z,v) = (T)linear_pix2d(X,Y,z,v,0);
9456 - }
9457 - } break;
9458 - default: {
9459 - cimg_forXY(dest,x,y) {
9460 - const float X = cx + (x-cx)*ca + (y-cy)*sa, Y = cy - (x-cx)*sa + (y-cy)*ca;
9461 - cimg_forZV(*this,z,v) dest(x,y,z,v) = (T)cubic_pix2d(X,Y,z,v,0);
9462 - }
9463 - } break;
9464 - }
9465 - return dest;
9466 - }
9467 -
9468 - //! Rotate the image around the point (\c cx,\c cy).
9469 - /**
9470 - \param angle = rotation angle (in degrees).
9471 - \param cx = X-coordinate of the rotation center.
9472 - \param cy = Y-coordinate of the rotation center.
9473 - \param zoom = zoom.
9474 - \param cond = rotation type. can be :
9475 - - 0 = zero-value at borders
9476 - - 1 = repeat image at borders
9477 - - 2 = zero-value at borders and linear interpolation
9478 - \note Rotation does not change the image size. If you want to get an image with a new size, use get_rotate() instead.
9479 - \see get_rotate()
9480 - **/
9481 - CImg& rotate(const float angle,const float cx,const float cy,const float zoom=1,const unsigned int cond=3) {
9482 - return get_rotate(angle,cx,cy,zoom,cond).swap(*this);
9483 - }
9484 -
9485 - //! Return a resized image.
9486 - /**
9487 - \param pdx = Number of columns (new size along the X-axis).
9488 - \param pdy = Number of rows (new size along the Y-axis).
9489 - \param pdz = Number of slices (new size along the Z-axis).
9490 - \param pdv = Number of vector-channels (new size along the V-axis).
9491 - \param interp = Resizing type :
9492 - - 0 = no interpolation : additionnal space is filled with 0.
9493 - - 1 = bloc interpolation (nearest point).
9494 - - 2 = mosaic : image is repeated if necessary.
9495 - - 3 = linear interpolation.
9496 - - 4 = grid interpolation.
9497 - - 5 = bi-cubic interpolation.
9498 - \note If pd[x,y,z,v]<0, it corresponds to a percentage of the original size (the default value is -100).
9499 - **/
9500 - CImg get_resize(const int pdx=-100, const int pdy=-100, const int pdz=-100, const int pdv=-100,
9501 - const unsigned int interp=1, const int border_condition=-1) const {
9502 - if (!pdx || !pdy || !pdz || !pdv) return CImg<T>();
9503 - const unsigned int
9504 - tdx = pdx<0?-pdx*width/100:pdx,
9505 - tdy = pdy<0?-pdy*height/100:pdy,
9506 - tdz = pdz<0?-pdz*depth/100:pdz,
9507 - tdv = pdv<0?-pdv*dim/100:pdv,
9508 - dx = tdx?tdx:1,
9509 - dy = tdy?tdy:1,
9510 - dz = tdz?tdz:1,
9511 - dv = tdv?tdv:1;
9512 - if (is_empty()) return CImg<T>(dx,dy,dz,dv,0);
9513 - if (width==dx && height==dy && depth==dz && dim==dv) return *this;
9514 - CImg res;
9515 -
9516 - switch (interp) {
9517 - case 0: // Zero filling
9518 - res.assign(dx,dy,dz,dv,0).draw_image(*this,0,0,0,0);
9519 - break;
9520 -
9521 - case 1: { // Nearest-neighbor interpolation
9522 - res.assign(dx,dy,dz,dv);
9523 - unsigned int
9524 - *const offx = new unsigned int[dx],
9525 - *const offy = new unsigned int[dy+1],
9526 - *const offz = new unsigned int[dz+1],
9527 - *const offv = new unsigned int[dv+1],
9528 - *poffx, *poffy, *poffz, *poffv,
9529 - curr, old;
9530 - const unsigned int wh = width*height, whd = width*height*depth, rwh = dx*dy, rwhd = dx*dy*dz;
9531 - poffx = offx; curr=0; { cimg_forX(res,x) { old=curr; curr=(x+1)*width/dx; *(poffx++) = (unsigned int)curr-(unsigned int)old; }}
9532 - poffy = offy; curr=0; { cimg_forY(res,y) { old=curr; curr=(y+1)*height/dy; *(poffy++) = width*((unsigned int)curr-(unsigned int)old); }} *poffy=0;
9533 - poffz = offz; curr=0; { cimg_forZ(res,z) { old=curr; curr=(z+1)*depth/dz; *(poffz++) = wh*((unsigned int)curr-(unsigned int)old); }} *poffz=0;
9534 - poffv = offv; curr=0; { cimg_forV(res,k) { old=curr; curr=(k+1)*dim/dv; *(poffv++) = whd*((unsigned int)curr-(unsigned int)old); }} *poffv=0;
9535 - T *ptrd = res.ptr();
9536 - const T* ptrv = ptr();
9537 - poffv = offv;
9538 - for (unsigned int k=0; k<dv; ) {
9539 - const T *ptrz = ptrv;
9540 - poffz = offz;
9541 - for (unsigned int z=0; z<dz; ) {
9542 - const T *ptry = ptrz;
9543 - poffy = offy;
9544 - for (unsigned int y=0; y<dy; ) {
9545 - const T *ptrx = ptry;
9546 - poffx = offx;
9547 - cimg_forX(res,x) { *(ptrd++)=*ptrx; ptrx+=*(poffx++); }
9548 - y++;
9549 - unsigned int dy=*(poffy++);
9550 - for (;!dy && y<dy; std::memcpy(ptrd, ptrd-dx, sizeof(T)*dx), y++, ptrd+=dx, dy=*(poffy++));
9551 - ptry+=dy;
9552 - }
9553 - z++;
9554 - unsigned int dz=*(poffz++);
9555 - for (;!dz && z<dz; std::memcpy(ptrd, ptrd-rwh, sizeof(T)*rwh), z++, ptrd+=rwh, dz=*(poffz++));
9556 - ptrz+=dz;
9557 - }
9558 - k++;
9559 - unsigned int dv=*(poffv++);
9560 - for (;!dv && k<dv; std::memcpy(ptrd, ptrd-rwhd, sizeof(T)*rwhd), k++, ptrd+=rwhd, dv=*(poffv++));
9561 - ptrv+=dv;
9562 - }
9563 - delete[] offx; delete[] offy; delete[] offz; delete[] offv;
9564 - } break;
9565 -
9566 - case 2: { // Mosaic filling
9567 - res.assign(dx,dy,dz,dv);
9568 - for (unsigned int k=0; k<dv; k+=dim)
9569 - for (unsigned int z=0; z<dz; z+=depth)
9570 - for (unsigned int y=0; y<dy; y+=height)
9571 - for (unsigned int x=0; x<dx; x+=width) res.draw_image(*this,x,y,z,k);
9572 - } break;
9573 -
9574 - case 3: { // Linear interpolation
9575 - const unsigned int dimmax = cimg::max(dx,dy,dz,dv);
9576 - const bool bborder = (interp>1 && border_condition<0);
9577 - const float
9578 - sx = bborder?(dx>0?(width-1.0f)/(dx-1) :0):(float)width/dx,
9579 - sy = bborder?(dy>0?(height-1.0f)/(dy-1):0):(float)height/dy,
9580 - sz = bborder?(dz>0?(depth-1.0f)/(dz-1) :0):(float)depth/dz,
9581 - sv = bborder?(dv>0?(dim-1.0f)/(dv-1) :0):(float)dim/dv;
9582 - unsigned int *const off = new unsigned int[dimmax], *poff;
9583 - float *const foff = new float[dimmax], *pfoff, old, curr;
9584 - CImg resx, resy, resz, resv;
9585 - T *ptrd;
9586 -
9587 - if (dx!=width) {
9588 - if (width==1) resx = get_resize(dx,height,depth,dim,1,0);
9589 - else {
9590 - resx.assign(dx,height,depth,dim);
9591 - curr = old = 0; poff = off; pfoff = foff;
9592 - cimg_forX(resx,x) { *(pfoff++) = curr-(unsigned int)curr; old = curr; curr+=sx; *(poff++) = (unsigned int)curr-(unsigned int)old; }
9593 - ptrd = resx.ptr();
9594 - const T *ptrs0 = ptr();
9595 - cimg_forYZV(resx,y,z,k) {
9596 - poff = off; pfoff = foff;
9597 - const T *ptrs = ptrs0, *const ptrsmax = ptrs0 + (width-1);
9598 - cimg_forX(resx,x) {
9599 - const float alpha = *(pfoff++);
9600 - const T val1 = *ptrs, val2 = ptrs<ptrsmax?*(ptrs+1):(border_condition?val1:0);
9601 - *(ptrd++) = (T)((1-alpha)*val1 + alpha*val2);
9602 - ptrs+=*(poff++);
9603 - }
9604 - ptrs0+=width;
9605 - }
9606 - }
9607 - } else resx.assign(*this,true);
9608 -
9609 - if (dy!=height) {
9610 - if (height==1) resy = resx.get_resize(dx,dy,depth,dim,1,0);
9611 - else {
9612 - resy.assign(dx,dy,depth,dim);
9613 - curr = old = 0; poff = off; pfoff = foff;
9614 - cimg_forY(resy,y) { *(pfoff++) = curr-(unsigned int)curr; old = curr; curr+=sy; *(poff++) = dx*((unsigned int)curr-(unsigned int)old); }
9615 - cimg_forXZV(resy,x,z,k) {
9616 - ptrd = resy.ptr(x,0,z,k);
9617 - const T *ptrs = resx.ptr(x,0,z,k), *const ptrsmax = ptrs + (height-1)*dx;
9618 - poff = off; pfoff = foff;
9619 - cimg_forY(resy,y) {
9620 - const float alpha = *(pfoff++);
9621 - const T val1 = *ptrs, val2 = ptrs<ptrsmax?*(ptrs+dx):(border_condition?val1:0);
9622 - *ptrd = (T)((1-alpha)*val1 + alpha*val2);
9623 - ptrd+=dx;
9624 - ptrs+=*(poff++);
9625 - }
9626 - }
9627 - }
9628 - resx.assign();
9629 - } else resy.assign(resx,true);
9630 -
9631 - if (dz!=depth) {
9632 - if (depth==1) resz = resy.get_resize(dx,dy,dz,dim,1,0);
9633 - else {
9634 - const unsigned int wh = dx*dy;
9635 - resz.assign(dx,dy,dz,dim);
9636 - curr = old = 0; poff = off; pfoff = foff;
9637 - cimg_forZ(resz,z) { *(pfoff++) = curr-(unsigned int)curr; old = curr; curr+=sz; *(poff++) = wh*((unsigned int)curr-(unsigned int)old); }
9638 - cimg_forXYV(resz,x,y,k) {
9639 - ptrd = resz.ptr(x,y,0,k);
9640 - const T *ptrs = resy.ptr(x,y,0,k), *const ptrsmax = ptrs + (depth-1)*wh;
9641 - poff = off; pfoff = foff;
9642 - cimg_forZ(resz,z) {
9643 - const float alpha = *(pfoff++);
9644 - const T val1 = *ptrs, val2 = ptrs<ptrsmax?*(ptrs+wh):(border_condition?val1:0);
9645 - *ptrd = (T)((1-alpha)*val1 + alpha*val2);
9646 - ptrd+=wh;
9647 - ptrs+=*(poff++);
9648 - }
9649 - }
9650 - }
9651 - resy.assign();
9652 - } else resz.assign(resy,true);
9653 -
9654 - if (dv!=dim) {
9655 - if (dim==1) resv = resz.get_resize(dx,dy,dz,dv,1,0);
9656 - else {
9657 - const unsigned int whd = dx*dy*dz;
9658 - resv.assign(dx,dy,dz,dv);
9659 - curr = old = 0; poff = off; pfoff = foff;
9660 - cimg_forV(resv,k) { *(pfoff++) = curr-(unsigned int)curr; old = curr; curr+=sv; *(poff++) = whd*((unsigned int)curr-(unsigned int)old); }
9661 - cimg_forXYZ(resv,x,y,z) {
9662 - ptrd = resv.ptr(x,y,z,0);
9663 - const T *ptrs = resz.ptr(x,y,z,0), *const ptrsmax = ptrs + (dim-1)*whd;
9664 - poff = off; pfoff = foff;
9665 - cimg_forV(resv,k) {
9666 - const float alpha = *(pfoff++);
9667 - const T val1 = *ptrs, val2 = ptrs<ptrsmax?*(ptrs+whd):(border_condition?val1:0);
9668 - *ptrd = (T)((1-alpha)*val1 + alpha*val2);
9669 - ptrd+=whd;
9670 - ptrs+=*(poff++);
9671 - }
9672 - }
9673 - }
9674 - resz.assign();
9675 - } else resv.assign(resz,true);
9676 -
9677 - delete[] off; delete[] foff;
9678 - return resv.is_shared?(resz.is_shared?(resy.is_shared?(resx.is_shared?(+(*this)):resx):resy):resz):resv;
9679 - } break;
9680 -
9681 - case 4: { // Grid filling
9682 - res.assign(dx,dy,dz,dv,0);
9683 - cimg_forXYZV(*this,x,y,z,k) res(x*dx/width,y*dy/height,z*dz/depth,k*dv/dim) = (*this)(x,y,z,k);
9684 - } break;
9685 -
9686 - case 5: { // Cubic interpolation
9687 - const bool bborder = (interp>1 && border_condition<0);
9688 - const float
9689 - sx = bborder?(dx>0?(width-1.0f)/(dx-1) :0):(float)width/dx,
9690 - sy = bborder?(dy>0?(height-1.0f)/(dy-1):0):(float)height/dy,
9691 - sz = bborder?(dz>0?(depth-1.0f)/(dz-1) :0):(float)depth/dz,
9692 - sv = bborder?(dv>0?(dim-1.0f)/(dv-1) :0):(float)dim/dv;
9693 - res.assign(dx,dy,dz,dv);
9694 - float cx, cy, cz, ck = 0;
9695 - cimg_forV(res,k) { cz = 0;
9696 - cimg_forZ(res,z) { cy = 0;
9697 - cimg_forY(res,y) { cx = 0;
9698 - cimg_forX(res,x) { res(x,y,z,k) = (T)(border_condition?cubic_pix2d(cx,cy,(int)cz,(int)ck):cubic_pix2d(cx,cy,(int)cz,(int)ck,0));
9699 - cx+=sx;
9700 - } cy+=sy;
9701 - } cz+=sz;
9702 - } ck+=sv;
9703 - }
9704 - } break;
9705 -
9706 - }
9707 -
9708 - return res;
9709 - }
9710 -
9711 - //! Return a resized image.
9712 - /**
9713 - \param src = Image giving the geometry of the resize.
9714 - \param interp = Resizing type :
9715 - - 0 = no interpolation : additionnal space is filled with 0.
9716 - - 1 = bloc interpolation (nearest point).
9717 - - 2 = mosaic : image is repeated if necessary.
9718 - - 3 = linear interpolation.
9719 - - 4 = grid interpolation.
9720 - - 5 = bi-cubic interpolation.
9721 - \note If pd[x,y,z,v]<0, it corresponds to a percentage of the original size (the default value is -100).
9722 - **/
9723 - template<typename t> CImg get_resize(const CImg<t>& src, const unsigned int interp=1, const int border_condition=-1) const {
9724 - return get_resize(src.width,src.height,src.depth,src.dim,interp,border_condition);
9725 - }
9726 -
9727 - //! Return a resized image.
9728 - /**
9729 - \param disp = Display giving the geometry of the resize.
9730 - \param interp = Resizing type :
9731 - - 0 = no interpolation : additionnal space is filled with 0.
9732 - - 1 = bloc interpolation (nearest point).
9733 - - 2 = mosaic : image is repeated if necessary.
9734 - - 3 = linear interpolation.
9735 - - 4 = grid interpolation.
9736 - - 5 = bi-cubic interpolation.
9737 - \note If pd[x,y,z,v]<0, it corresponds to a percentage of the original size (the default value is -100).
9738 - **/
9739 - CImg get_resize(const CImgDisplay& disp,const unsigned int interp=1, const int border_condition=-1) const {
9740 - return get_resize(disp.width,disp.height,depth,dim,interp,border_condition);
9741 - }
9742 -
9743 - //! Resize the image.
9744 - /**
9745 - \param pdx = Number of columns (new size along the X-axis).
9746 - \param pdy = Number of rows (new size along the Y-axis).
9747 - \param pdz = Number of slices (new size along the Z-axis).
9748 - \param pdv = Number of vector-channels (new size along the V-axis).
9749 - \param interp = Resizing type :
9750 - - 0 = no interpolation : additionnal space is filled with 0.
9751 - - 1 = bloc interpolation (nearest point).
9752 - - 2 = mosaic : image is repeated if necessary.
9753 - - 3 = linear interpolation.
9754 - - 4 = grid interpolation.
9755 - - 5 = bi-cubic interpolation.
9756 - \note If pd[x,y,z,v]<0, it corresponds to a percentage of the original size (the default value is -100).
9757 - **/
9758 - CImg& resize(const int pdx=-100, const int pdy=-100, const int pdz=-100, const int pdv=-100,
9759 - const unsigned int interp=1, const int border_condition=-1) {
9760 - if (!pdx || !pdy || !pdz || !pdv) return assign();
9761 - const unsigned int
9762 - dx = pdx<0?-pdx*width/100:pdx,
9763 - dy = pdy<0?-pdy*height/100:pdy,
9764 - dz = pdz<0?-pdz*depth/100:pdz,
9765 - dv = pdv<0?-pdv*dim/100:pdv;
9766 - if (width==dx && height==dy && depth==dz && dim==dv) return *this;
9767 - return get_resize(dx,dy,dz,dv,interp,border_condition).swap(*this);
9768 - }
9769 -
9770 - //! Resize the image.
9771 - /**
9772 - \param src = Image giving the geometry of the resize.
9773 - \param interp = Resizing type :
9774 - - 0 = no interpolation : additionnal space is filled with 0.
9775 - - 1 = bloc interpolation (nearest point).
9776 - - 2 = mosaic : image is repeated if necessary.
9777 - - 3 = linear interpolation.
9778 - - 4 = grid interpolation.
9779 - - 5 = bi-cubic interpolation.
9780 - \note If pd[x,y,z,v]<0, it corresponds to a percentage of the original size (the default value is -100).
9781 - **/
9782 - template<typename t> CImg& resize(const CImg<t>& src, const unsigned int interp=1, const int border_condition=-1) {
9783 - return resize(src.width,src.height,src.depth,src.dim,interp,border_condition);
9784 - }
9785 -
9786 - //! Resize the image
9787 - /**
9788 - \param disp = Display giving the geometry of the resize.
9789 - \param interp = Resizing type :
9790 - - 0 = no interpolation : additionnal space is filled with 0.
9791 - - 1 = bloc interpolation (nearest point).
9792 - - 2 = mosaic : image is repeated if necessary.
9793 - - 3 = linear interpolation.
9794 - - 4 = grid interpolation.
9795 - - 5 = bi-cubic interpolation.
9796 - \note If pd[x,y,z,v]<0, it corresponds to a percentage of the original size (the default value is -100).
9797 - **/
9798 - CImg& resize(const CImgDisplay& disp, const unsigned int interp=1, const int border_condition=-1) {
9799 - return resize(disp.width,disp.height,depth,dim,interp,border_condition);
9800 - }
9801 -
9802 - //! Return an half-resized image, using a special filter.
9803 - /**
9804 - \see resize_halfXY(), resize(), get_resize().
9805 - **/
9806 - CImg get_resize_halfXY() const {
9807 - typedef typename cimg::largest<T,float>::type ftype;
9808 - if (is_empty()) return CImg<T>();
9809 - CImg<ftype> mask = CImg<ftype>::matrix(0.07842776544f, 0.1231940459f, 0.07842776544f,
9810 - 0.1231940459f, 0.1935127547f, 0.1231940459f,
9811 - 0.07842776544f, 0.1231940459f, 0.07842776544f);
9812 - CImg_3x3(I,ftype);
9813 - CImg dest(width/2,height/2,depth,dim);
9814 - cimg_forZV(*this,z,k) cimg_for3x3(*this,x,y,z,k,I)
9815 - if (x%2 && y%2) dest(x/2,y/2,z,k) = (T)cimg_conv3x3(I,mask);
9816 - return dest;
9817 - }
9818 -
9819 - //! Half-resize the image, using a special filter
9820 - /**
9821 - \see get_resize_halfXY(), resize(), get_resize().
9822 - **/
9823 - CImg& resize_halfXY() {
9824 - return get_resize_halfXY().swap(*this);
9825 - }
9826 -
9827 - //! Return a square region of the image, as a new image
9828 - /**
9829 - \param x0 = X-coordinate of the upper-left crop rectangle corner.
9830 - \param y0 = Y-coordinate of the upper-left crop rectangle corner.
9831 - \param z0 = Z-coordinate of the upper-left crop rectangle corner.
9832 - \param v0 = V-coordinate of the upper-left crop rectangle corner.
9833 - \param x1 = X-coordinate of the lower-right crop rectangle corner.
9834 - \param y1 = Y-coordinate of the lower-right crop rectangle corner.
9835 - \param z1 = Z-coordinate of the lower-right crop rectangle corner.
9836 - \param v1 = V-coordinate of the lower-right crop rectangle corner.
9837 - \param border_condition = Dirichlet (false) or Neumann border conditions.
9838 - \see crop()
9839 - **/
9840 - CImg get_crop(const unsigned int x0,const unsigned int y0,const unsigned int z0,const unsigned int v0,
9841 - const unsigned int x1,const unsigned int y1,const unsigned int z1,const unsigned int v1,
9842 - const bool border_condition = false) const {
9843 - if (is_empty())
9844 - throw CImgInstanceException("CImg<%s>::get_crop() : Instance image (%u,%u,%u,%u,%p) is empty.",
9845 - pixel_type(),width,height,depth,dim,data);
9846 - const unsigned int dx=x1-x0+1, dy=y1-y0+1, dz=z1-z0+1, dv=v1-v0+1;
9847 - CImg dest(dx,dy,dz,dv);
9848 - if (x0>=width || x1>=width || y0>=height || y1>=height || z0>=depth || z1>=depth ||
9849 - v0>=dim || v1>=dim || x1<x0 || y1<y0 || z1<z0 || v1<v0)
9850 - switch (border_condition) {
9851 - case false: { cimg_forXYZV(dest,x,y,z,v) dest(x,y,z,v) = pix4d(x0+x,y0+y,z0+z,v0+v,0); } break;
9852 - default: { cimg_forXYZV(dest,x,y,z,v) dest(x,y,z,v) = pix4d(x0+x,y0+y,z0+z,v0+v); } break;
9853 - } else {
9854 - const T *psrc = ptr(x0,y0,z0,v0);
9855 - T *pdest = dest.ptr(0,0,0,0);
9856 - if (dx!=width)
9857 - for (unsigned int k=0; k<dv; k++) {
9858 - for (unsigned int z=0; z<dz; z++) {
9859 - for (unsigned int y=0; y<dy; y++) {
9860 - std::memcpy(pdest,psrc,dx*sizeof(T));
9861 - pdest+=dx;
9862 - psrc+=width;
9863 - }
9864 - psrc+=width*(height-dy);
9865 - }
9866 - psrc+=width*height*(depth-dz);
9867 - }
9868 - else {
9869 - if (dy!=height)
9870 - for (unsigned int k=0; k<dv; k++) {
9871 - for (unsigned int z=0; z<dz; z++) {
9872 - std::memcpy(pdest,psrc,dx*dy*sizeof(T));
9873 - pdest+=dx*dy;
9874 - psrc+=width*height;
9875 - }
9876 - psrc+=width*height*(depth-dz);
9877 - }
9878 - else {
9879 - if (dz!=depth)
9880 - for (unsigned int k=0; k<dv; k++) {
9881 - std::memcpy(pdest,psrc,dx*dy*dz*sizeof(T));
9882 - pdest+=dx*dy*dz;
9883 - psrc+=width*height*depth;
9884 - }
9885 - else std::memcpy(pdest,psrc,dx*dy*dz*dv*sizeof(T));
9886 - }
9887 - }
9888 - }
9889 - return dest;
9890 - }
9891 -
9892 - //! Return a square region of the image, as a new image
9893 - /**
9894 - \param x0 = X-coordinate of the upper-left crop rectangle corner.
9895 - \param y0 = Y-coordinate of the upper-left crop rectangle corner.
9896 - \param z0 = Z-coordinate of the upper-left crop rectangle corner.
9897 - \param x1 = X-coordinate of the lower-right crop rectangle corner.
9898 - \param y1 = Y-coordinate of the lower-right crop rectangle corner.
9899 - \param z1 = Z-coordinate of the lower-right crop rectangle corner.
9900 - \param border_condition = determine the type of border condition if
9901 - some of the desired region is outside the image.
9902 - \see crop()
9903 - **/
9904 - CImg get_crop(const unsigned int x0,const unsigned int y0,const unsigned int z0,
9905 - const unsigned int x1,const unsigned int y1,const unsigned int z1,
9906 - const bool border_condition=false) const {
9907 - return get_crop(x0,y0,z0,0,x1,y1,z1,dim-1,border_condition);
9908 - }
9909 -
9910 - //! Return a square region of the image, as a new image
9911 - /**
9912 - \param x0 = X-coordinate of the upper-left crop rectangle corner.
9913 - \param y0 = Y-coordinate of the upper-left crop rectangle corner.
9914 - \param x1 = X-coordinate of the lower-right crop rectangle corner.
9915 - \param y1 = Y-coordinate of the lower-right crop rectangle corner.
9916 - \param border_condition = determine the type of border condition if
9917 - some of the desired region is outside the image.
9918 - \see crop()
9919 - **/
9920 - CImg get_crop(const unsigned int x0,const unsigned int y0,
9921 - const unsigned int x1,const unsigned int y1,
9922 - const bool border_condition=false) const {
9923 - return get_crop(x0,y0,0,0,x1,y1,depth-1,dim-1,border_condition);
9924 - }
9925 -
9926 - //! Return a square region of the image, as a new image
9927 - /**
9928 - \param x0 = X-coordinate of the upper-left crop rectangle corner.
9929 - \param x1 = X-coordinate of the lower-right crop rectangle corner.
9930 - \param border_condition = determine the type of border condition if
9931 - some of the desired region is outside the image.
9932 - \see crop()
9933 - **/
9934 - CImg get_crop(const unsigned int x0,const unsigned int x1,const bool border_condition=false) const {
9935 - return get_crop(x0,0,0,0,x1,height-1,depth-1,dim-1,border_condition);
9936 - }
9937 -
9938 - //! Replace the image by a square region of the image
9939 - /**
9940 - \param x0 = X-coordinate of the upper-left crop rectangle corner.
9941 - \param y0 = Y-coordinate of the upper-left crop rectangle corner.
9942 - \param z0 = Z-coordinate of the upper-left crop rectangle corner.
9943 - \param v0 = V-coordinate of the upper-left crop rectangle corner.
9944 - \param x1 = X-coordinate of the lower-right crop rectangle corner.
9945 - \param y1 = Y-coordinate of the lower-right crop rectangle corner.
9946 - \param z1 = Z-coordinate of the lower-right crop rectangle corner.
9947 - \param v1 = V-coordinate of the lower-right crop rectangle corner.
9948 - \param border_condition = determine the type of border condition if
9949 - some of the desired region is outside the image.
9950 - \see get_crop()
9951 - **/
9952 - CImg& crop(const unsigned int x0,const unsigned int y0,const unsigned int z0,const unsigned int v0,
9953 - const unsigned int x1,const unsigned int y1,const unsigned int z1,const unsigned int v1,
9954 - const bool border_condition=false) {
9955 - return get_crop(x0,y0,z0,v0,x1,y1,z1,v1,border_condition).swap(*this);
9956 - }
9957 -
9958 - //! Replace the image by a square region of the image
9959 - /**
9960 - \param x0 = X-coordinate of the upper-left crop rectangle corner.
9961 - \param y0 = Y-coordinate of the upper-left crop rectangle corner.
9962 - \param z0 = Z-coordinate of the upper-left crop rectangle corner.
9963 - \param x1 = X-coordinate of the lower-right crop rectangle corner.
9964 - \param y1 = Y-coordinate of the lower-right crop rectangle corner.
9965 - \param z1 = Z-coordinate of the lower-right crop rectangle corner.
9966 - \param border_condition = determine the type of border condition if
9967 - some of the desired region is outside the image.
9968 - \see get_crop()
9969 - **/
9970 - CImg& crop(const unsigned int x0,const unsigned int y0,const unsigned int z0,
9971 - const unsigned int x1,const unsigned int y1,const unsigned int z1,
9972 - const bool border_condition=false) {
9973 - return crop(x0,y0,z0,0,x1,y1,z1,dim-1,border_condition);
9974 - }
9975 -
9976 - //! Replace the image by a square region of the image
9977 - /**
9978 - \param x0 = X-coordinate of the upper-left crop rectangle corner.
9979 - \param y0 = Y-coordinate of the upper-left crop rectangle corner.
9980 - \param x1 = X-coordinate of the lower-right crop rectangle corner.
9981 - \param y1 = Y-coordinate of the lower-right crop rectangle corner.
9982 - \param border_condition = determine the type of border condition if
9983 - some of the desired region is outside the image.
9984 - \see get_crop()
9985 - **/
9986 - CImg& crop(const unsigned int x0,const unsigned int y0,
9987 - const unsigned int x1,const unsigned int y1,
9988 - const bool border_condition=false) {
9989 - return crop(x0,y0,0,0,x1,y1,depth-1,dim-1,border_condition);
9990 - }
9991 -
9992 - //! Replace the image by a square region of the image
9993 - /**
9994 - \param x0 = X-coordinate of the upper-left crop rectangle corner.
9995 - \param x1 = X-coordinate of the lower-right crop rectangle corner.
9996 - \param border_condition = determine the type of border condition if
9997 - some of the desired region is outside the image.
9998 - \see get_crop()
9999 - **/
10000 - CImg& crop(const unsigned int x0,const unsigned int x1,const bool border_condition=false) {
10001 - return crop(x0,0,0,0,x1,height-1,depth-1,dim-1,border_condition);
10002 - }
10003 -
10004 - //! Return a set of columns
10005 - CImg get_columns(const unsigned int x0, const unsigned int x1) const {
10006 - return get_crop(x0,0,0,0,x1,height-1,depth-1,dim-1);
10007 - }
10008 -
10009 - //! Replace the instance image by a set of its columns
10010 - CImg& columns(const unsigned int x0, const unsigned int x1) {
10011 - return get_columns(x0,x1).swap(*this);
10012 - }
10013 -
10014 - //! Return one column
10015 - CImg get_column(const unsigned int x0) const {
10016 - return get_columns(x0,x0);
10017 - }
10018 -
10019 - //! Replace the instance image by one of its column
10020 - CImg& column(const unsigned int x0) {
10021 - return columns(x0,x0);
10022 - }
10023 -
10024 - //! Get a copy of a set of lines of the instance image.
10025 - CImg get_lines(const unsigned int y0, const unsigned int y1) const {
10026 - return get_crop(0,y0,0,0,width-1,y1,depth-1,dim-1);
10027 - }
10028 -
10029 - //! Replace the instance image by a set of lines of the instance image.
10030 - CImg& lines(const unsigned int y0, const unsigned int y1) {
10031 - return get_lines(y0,y1).swap(*this);
10032 - }
10033 -
10034 - //! Get a copy of a line of the instance image.
10035 - CImg get_line(const unsigned int y0) const {
10036 - return get_lines(y0,y0);
10037 - }
10038 -
10039 - //! Replace the instance image by one of its line.
10040 - CImg& line(const unsigned int y0) {
10041 - return lines(y0,y0);
10042 - }
10043 -
10044 - //! Get a set of slices
10045 - CImg get_slices(const unsigned int z0, const unsigned int z1) const {
10046 - return get_crop(0,0,z0,0,width-1,height-1,z1,dim-1);
10047 - }
10048 -
10049 - // Replace the image by a set of its z-slices
10050 - CImg& slices(const unsigned int z0, const unsigned int z1) {
10051 - return get_slices(z0,z1).swap(*this);
10052 - }
10053 -
10054 - //! Get the z-slice \a z of *this, as a new image.
10055 - CImg get_slice(const unsigned int z0) const {
10056 - return get_slices(z0,z0);
10057 - }
10058 -
10059 - //! Replace the image by one of its slice.
10060 - CImg& slice(const unsigned int z0) {
10061 - return slices(z0,z0);
10062 - }
10063 -
10064 - //! Return a copy of a set of channels of the instance image.
10065 - CImg get_channels(const unsigned int v0, const unsigned int v1) const {
10066 - return get_crop(0,0,0,v0,width-1,height-1,depth-1,v1);
10067 - }
10068 -
10069 - //! Replace the instance image by a set of channels of the instance image.
10070 - CImg& channels(const unsigned int v0, const unsigned int v1) {
10071 - return get_channels(v0,v1).swap(*this);
10072 - }
10073 -
10074 - //! Return a copy of a channel of the instance image.
10075 - CImg get_channel(const unsigned int v0) const {
10076 - return get_channels(v0,v0);
10077 - }
10078 -
10079 - //! Replace the instance image by one of its channel.
10080 - CImg& channel(const unsigned int v0) {
10081 - return channels(v0,v0);
10082 - }
10083 -
10084 - //! Get a shared-memory image referencing a set of points of the instance image.
10085 - CImg get_shared_points(const unsigned int x0, const unsigned int x1,
10086 - const unsigned int y0=0, const unsigned int z0=0, const unsigned int v0=0) {
10087 - const unsigned long beg = offset(x0,y0,z0,v0), end = offset(x1,y0,z0,v0);
10088 - if (beg>end || beg>=size() || end>=size())
10089 - throw CImgArgumentException("CImg<%s>::get_shared_points() : Cannot return a shared-memory subset (%u->%u,%u,%u,%u) from "
10090 - "a (%u,%u,%u,%u) image.",pixel_type(),x0,x1,y0,z0,v0,width,height,depth,dim);
10091 - return CImg<T>(data+beg,x1-x0+1,1,1,1,true);
10092 - }
10093 -
10094 - //! Get a shared-memory image referencing a set of points of the instance image (const version).
10095 - const CImg get_shared_points(const unsigned int x0, const unsigned int x1,
10096 - const unsigned int y0=0, const unsigned int z0=0, const unsigned int v0=0) const {
10097 - const unsigned long beg = offset(x0,y0,z0,v0), end = offset(x1,y0,z0,v0);
10098 - if (beg>end || beg>=size() || end>=size())
10099 - throw CImgArgumentException("CImg<%s>::get_shared_points() : Cannot return a shared-memory subset (%u->%u,%u,%u,%u) from "
10100 - "a (%u,%u,%u,%u) image.",pixel_type(),x0,x1,y0,z0,v0,width,height,depth,dim);
10101 - return CImg<T>(data+beg,x1-x0+1,1,1,1,true);
10102 - }
10103 -
10104 - //! Return a shared-memory image referencing a set of lines of the instance image.
10105 - CImg get_shared_lines(const unsigned int y0, const unsigned int y1,
10106 - const unsigned int z0=0, const unsigned int v0=0) {
10107 - const unsigned long beg = offset(0,y0,z0,v0), end = offset(0,y1,z0,v0);
10108 - if (beg>end || beg>=size() || end>=size())
10109 - throw CImgArgumentException("CImg<%s>::get_shared_lines() : Cannot return a shared-memory subset (0->%u,%u->%u,%u,%u) from "
10110 - "a (%u,%u,%u,%u) image.",pixel_type(),width-1,y0,y1,z0,v0,width,height,depth,dim);
10111 - return CImg<T>(data+beg,width,y1-y0+1,1,1,true);
10112 - }
10113 -
10114 - //! Return a shared-memory image referencing a set of lines of the instance image (const version).
10115 - const CImg get_shared_lines(const unsigned int y0, const unsigned int y1,
10116 - const unsigned int z0=0, const unsigned int v0=0) const {
10117 - const unsigned long beg = offset(0,y0,z0,v0), end = offset(0,y1,z0,v0);
10118 - if (beg>end || beg>=size() || end>=size())
10119 - throw CImgArgumentException("CImg<%s>::get_shared_lines() : Cannot return a shared-memory subset (0->%u,%u->%u,%u,%u) from "
10120 - "a (%u,%u,%u,%u) image.",pixel_type(),width-1,y0,y1,z0,v0,width,height,depth,dim);
10121 - return CImg<T>(data+beg,width,y1-y0+1,1,1,true);
10122 - }
10123 -
10124 - //! Return a shared-memory image referencing one particular line (y0,z0,v0) of the instance image.
10125 - CImg get_shared_line(const unsigned int y0, const unsigned int z0=0, const unsigned int v0=0) {
10126 - return get_shared_lines(y0,y0,z0,v0);
10127 - }
10128 -
10129 - //! Return a shared-memory image referencing one particular line (y0,z0,v0) of the instance image (const version).
10130 - const CImg get_shared_line(const unsigned int y0,const unsigned int z0=0,const unsigned int v0=0) const {
10131 - return get_shared_lines(y0,y0,z0,v0);
10132 - }
10133 -
10134 - //! Return a shared memory image referencing a set of planes (z0->z1,v0) of the instance image.
10135 - CImg get_shared_planes(const unsigned int z0, const unsigned int z1, const unsigned int v0=0) {
10136 - const unsigned long beg = offset(0,0,z0,v0), end = offset(0,0,z1,v0);
10137 - if (beg>end || beg>=size() || end>=size())
10138 - throw CImgArgumentException("CImg<%s>::get_shared_planes() : Cannot return a shared-memory subset (0->%u,0->%u,%u->%u,%u) from "
10139 - "a (%u,%u,%u,%u) image.",pixel_type(),width-1,height-1,z0,z1,v0,width,height,depth,dim);
10140 - return CImg<T>(data+beg,width,height,z1-z0+1,1,true);
10141 - }
10142 -
10143 - //! Return a shared-memory image referencing a set of planes (z0->z1,v0) of the instance image (const version).
10144 - const CImg get_shared_planes(const unsigned int z0, const unsigned int z1, const unsigned int v0=0) const {
10145 - const unsigned long beg = offset(0,0,z0,v0), end = offset(0,0,z1,v0);
10146 - if (beg>end || beg>=size() || end>=size())
10147 - throw CImgArgumentException("CImg<%s>::get_shared_planes() : Cannot return a shared-memory subset (0->%u,0->%u,%u->%u,%u) from "
10148 - "a (%u,%u,%u,%u) image.",pixel_type(),width-1,height-1,z0,z1,v0,width,height,depth,dim);
10149 - return CImg<T>(data+beg,width,height,z1-z0+1,1,true);
10150 - }
10151 -
10152 - //! Return a shared-memory image referencing one plane (z0,v0) of the instance image.
10153 - CImg get_shared_plane(const unsigned int z0, const unsigned int v0=0) {
10154 - return get_shared_planes(z0,z0,v0);
10155 - }
10156 -
10157 - //! Return a shared-memory image referencing one plane (z0,v0) of the instance image (const version).
10158 - const CImg get_shared_plane(const unsigned int z0, const unsigned int v0=0) const {
10159 - return get_shared_planes(z0,z0,v0);
10160 - }
10161 -
10162 - //! Return a shared-memory image referencing a set of channels (v0->v1) of the instance image.
10163 - CImg get_shared_channels(const unsigned int v0, const unsigned int v1) {
10164 - const unsigned long beg = offset(0,0,0,v0), end = offset(0,0,0,v1);
10165 - if (beg>end || beg>=size() || end>=size())
10166 - throw CImgArgumentException("CImg<%s>::get_shared_channels() : Cannot return a shared-memory subset (0->%u,0->%u,0->%u,%u->%u) from "
10167 - "a (%u,%u,%u,%u) image.",pixel_type(),width-1,height-1,depth-1,v0,v1,width,height,depth,dim);
10168 - return CImg<T>(data+beg,width,height,depth,v1-v0+1,true);
10169 - }
10170 -
10171 - //! Return a shared-memory image referencing a set of channels (v0->v1) of the instance image (const version).
10172 - const CImg get_shared_channels(const unsigned int v0, const unsigned int v1) const {
10173 - const unsigned long beg = offset(0,0,0,v0), end = offset(0,0,0,v1);
10174 - if (beg>end || beg>=size() || end>=size())
10175 - throw CImgArgumentException("CImg<%s>::get_shared_channels() : Cannot return a shared-memory subset (0->%u,0->%u,0->%u,%u->%u) from "
10176 - "a (%u,%u,%u,%u) image.",pixel_type(),width-1,height-1,depth-1,v0,v1,width,height,depth,dim);
10177 - return CImg<T>(data+beg,width,height,depth,v1-v0+1,true);
10178 - }
10179 -
10180 - //! Return a shared-memory image referencing one channel v0 of the instance image.
10181 - CImg get_shared_channel(const unsigned int v0) {
10182 - return get_shared_channels(v0,v0);
10183 - }
10184 -
10185 - //! Return a shared-memory image referencing one channel v0 of the instance image (const version).
10186 - const CImg get_shared_channel(const unsigned int v0) const {
10187 - return get_shared_channels(v0,v0);
10188 - }
10189 -
10190 - //! Return a shared version of the instance image.
10191 - CImg get_shared() {
10192 - return CImg<T>(data,width,height,depth,dim,true);
10193 - }
10194 -
10195 - //! Return a shared version of the instance image (const version).
10196 - const CImg get_shared() const {
10197 - return CImg<T>(data,width,height,depth,dim,true);
10198 - }
10199 -
10200 - //! Mirror an image along the specified axis.
10201 - /**
10202 - This is the in-place version of get_mirror().
10203 - \sa get_mirror().
10204 - **/
10205 - CImg& mirror(const char axe='x') {
10206 - if (!is_empty()) {
10207 - T *pf,*pb,*buf=0;
10208 - switch (cimg::uncase(axe)) {
10209 - case 'x': {
10210 - pf = ptr(); pb = ptr(width-1);
10211 - for (unsigned int yzv=0; yzv<height*depth*dim; yzv++) {
10212 - for (unsigned int x=0; x<width/2; x++) { const T val = *pf; *(pf++)=*pb; *(pb--)=val; }
10213 - pf+=width-width/2;
10214 - pb+=width+width/2;
10215 - }
10216 - } break;
10217 - case 'y': {
10218 - buf = new T[width];
10219 - pf = ptr(); pb = ptr(0,height-1);
10220 - for (unsigned int zv=0; zv<depth*dim; zv++) {
10221 - for (unsigned int y=0; y<height/2; y++) {
10222 - std::memcpy(buf,pf,width*sizeof(T));
10223 - std::memcpy(pf,pb,width*sizeof(T));
10224 - std::memcpy(pb,buf,width*sizeof(T));
10225 - pf+=width;
10226 - pb-=width;
10227 - }
10228 - pf+=width*(height-height/2);
10229 - pb+=width*(height+height/2);
10230 - }
10231 - } break;
10232 - case 'z': {
10233 - buf = new T[width*height];
10234 - pf = ptr(); pb = ptr(0,0,depth-1);
10235 - cimg_forV(*this,v) {
10236 - for (unsigned int z=0; z<depth/2; z++) {
10237 - std::memcpy(buf,pf,width*height*sizeof(T));
10238 - std::memcpy(pf,pb,width*height*sizeof(T));
10239 - std::memcpy(pb,buf,width*height*sizeof(T));
10240 - pf+=width*height;
10241 - pb-=width*height;
10242 - }
10243 - pf+=width*height*(depth-depth/2);
10244 - pb+=width*height*(depth+depth/2);
10245 - }
10246 - } break;
10247 - case 'v': {
10248 - buf = new T[width*height*depth];
10249 - pf = ptr(); pb = ptr(0,0,0,dim-1);
10250 - for (unsigned int v=0; v<dim/2; v++) {
10251 - std::memcpy(buf,pf,width*height*depth*sizeof(T));
10252 - std::memcpy(pf,pb,width*height*depth*sizeof(T));
10253 - std::memcpy(pb,buf,width*height*depth*sizeof(T));
10254 - pf+=width*height*depth;
10255 - pb-=width*height*depth;
10256 - }
10257 - } break;
10258 - default:
10259 - throw CImgArgumentException("CImg<%s>::mirror() : unknow axe '%c', must be 'x','y','z' or 'v'",pixel_type(),axe);
10260 - }
10261 - if (buf) delete[] buf;
10262 - }
10263 - return *this;
10264 - }
10265 -
10266 - //! Get a mirrored version of the image, along the specified axis.
10267 - /**
10268 - \param axe Axe used to mirror the image. Can be \c 'x', \c 'y', \c 'z' or \c 'v'.
10269 - \sa mirror().
10270 - **/
10271 - CImg get_mirror(const char axe='x') {
10272 - return (+*this).mirror(axe);
10273 - }
10274 -
10275 - //! Translate the image
10276 - /**
10277 - This is the in-place version of get_translate().
10278 - \sa get_translate().
10279 - **/
10280 - CImg& translate(const int deltax,const int deltay=0,const int deltaz=0,const int deltav=0,const int border_condition=0) {
10281 - if (!is_empty()) {
10282 -
10283 - if (deltax) // Translate along X-axis
10284 - switch (border_condition) {
10285 - case 0:
10286 - if (cimg::abs(deltax)>=(int)width) return fill(0);
10287 - if (deltax>0) cimg_forYZV(*this,y,z,k) {
10288 - std::memmove(ptr(0,y,z,k),ptr(deltax,y,z,k),(width-deltax)*sizeof(T));
10289 - std::memset(ptr(width-deltax,y,z,k),0,deltax*sizeof(T));
10290 - } else cimg_forYZV(*this,y,z,k) {
10291 - std::memmove(ptr(-deltax,y,z,k),ptr(0,y,z,k),(width+deltax)*sizeof(T));
10292 - std::memset(ptr(0,y,z,k),0,-deltax*sizeof(T));
10293 - }
10294 - break;
10295 - case 1:
10296 - if (deltax>0) {
10297 - const int ndeltax = (deltax>=(int)width)?width-1:deltax;
10298 - if (!ndeltax) return *this;
10299 - cimg_forYZV(*this,y,z,k) {
10300 - std::memmove(ptr(0,y,z,k),ptr(ndeltax,y,z,k),(width-ndeltax)*sizeof(T));
10301 - T *ptrd = ptr(width-1,y,z,k);
10302 - const T &val = *ptrd;
10303 - for (int l=0; l<ndeltax-1; l++) *(--ptrd) = val;
10304 - }
10305 - } else {
10306 - const int ndeltax = (-deltax>=(int)width)?width-1:-deltax;
10307 - if (!ndeltax) return *this;
10308 - cimg_forYZV(*this,y,z,k) {
10309 - std::memmove(ptr(ndeltax,y,z,k),ptr(0,y,z,k),(width-ndeltax)*sizeof(T));
10310 - T *ptrd = ptr(0,y,z,k);
10311 - const T &val = *ptrd;
10312 - for (int l=0; l<ndeltax-1; l++) *(++ptrd) = val;
10313 - }
10314 - }
10315 - break;
10316 - case 2: {
10317 - const int ml = cimg::mod(deltax,width), ndeltax = (ml<=(int)width/2)?ml:(ml-(int)width);
10318 - if (!ndeltax) return *this;
10319 - T* buf = new T[cimg::abs(ndeltax)];
10320 - if (ndeltax>0) cimg_forYZV(*this,y,z,k) {
10321 - std::memcpy(buf,ptr(0,y,z,k),ndeltax*sizeof(T));
10322 - std::memmove(ptr(0,y,z,k),ptr(ndeltax,y,z,k),(width-ndeltax)*sizeof(T));
10323 - std::memcpy(ptr(width-ndeltax,y,z,k),buf,ndeltax*sizeof(T));
10324 - } else cimg_forYZV(*this,y,z,k) {
10325 - std::memcpy(buf,ptr(width+ndeltax,y,z,k),-ndeltax*sizeof(T));
10326 - std::memmove(ptr(-ndeltax,y,z,k),ptr(0,y,z,k),(width+ndeltax)*sizeof(T));
10327 - std::memcpy(ptr(0,y,z,k),buf,-ndeltax*sizeof(T));
10328 - }
10329 - delete[] buf;
10330 - } break;
10331 - }
10332 -
10333 - if (deltay) // Translate along Y-axis
10334 - switch (border_condition) {
10335 - case 0:
10336 - if (cimg::abs(deltay)>=(int)height) return fill(0);
10337 - if (deltay>0) cimg_forZV(*this,z,k) {
10338 - std::memmove(ptr(0,0,z,k),ptr(0,deltay,z,k),width*(height-deltay)*sizeof(T));
10339 - std::memset(ptr(0,height-deltay,z,k),0,width*deltay*sizeof(T));
10340 - } else cimg_forZV(*this,z,k) {
10341 - std::memmove(ptr(0,-deltay,z,k),ptr(0,0,z,k),width*(height+deltay)*sizeof(T));
10342 - std::memset(ptr(0,0,z,k),0,-deltay*width*sizeof(T));
10343 - }
10344 - break;
10345 - case 1:
10346 - if (deltay>0) {
10347 - const int ndeltay = (deltay>=(int)height)?height-1:deltay;
10348 - if (!ndeltay) return *this;
10349 - cimg_forZV(*this,z,k) {
10350 - std::memmove(ptr(0,0,z,k),ptr(0,ndeltay,z,k),width*(height-ndeltay)*sizeof(T));
10351 - T *ptrd = ptr(0,height-ndeltay,z,k), *ptrs = ptr(0,height-1,z,k);
10352 - for (int l=0; l<ndeltay-1; l++) { std::memcpy(ptrd,ptrs,width*sizeof(T)); ptrd+=width; }
10353 - }
10354 - } else {
10355 - const int ndeltay = (-deltay>=(int)height)?height-1:-deltay;
10356 - if (!ndeltay) return *this;
10357 - cimg_forZV(*this,z,k) {
10358 - std::memmove(ptr(0,ndeltay,z,k),ptr(0,0,z,k),width*(height-ndeltay)*sizeof(T));
10359 - T *ptrd = ptr(0,1,z,k), *ptrs = ptr(0,0,z,k);
10360 - for (int l=0; l<ndeltay-1; l++) { std::memcpy(ptrd,ptrs,width*sizeof(T)); ptrd+=width; }
10361 - }
10362 - }
10363 - break;
10364 - case 2: {
10365 - const int ml = cimg::mod(deltay,height), ndeltay = (ml<=(int)height/2)?ml:(ml-(int)height);
10366 - if (!ndeltay) return *this;
10367 - T* buf = new T[width*cimg::abs(ndeltay)];
10368 - if (ndeltay>0) cimg_forZV(*this,z,k) {
10369 - std::memcpy(buf,ptr(0,0,z,k),width*ndeltay*sizeof(T));
10370 - std::memmove(ptr(0,0,z,k),ptr(0,ndeltay,z,k),width*(height-ndeltay)*sizeof(T));
10371 - std::memcpy(ptr(0,height-ndeltay,z,k),buf,width*ndeltay*sizeof(T));
10372 - } else cimg_forZV(*this,z,k) {
10373 - std::memcpy(buf,ptr(0,height+ndeltay,z,k),-ndeltay*width*sizeof(T));
10374 - std::memmove(ptr(0,-ndeltay,z,k),ptr(0,0,z,k),width*(height+ndeltay)*sizeof(T));
10375 - std::memcpy(ptr(0,0,z,k),buf,-ndeltay*width*sizeof(T));
10376 - }
10377 - delete[] buf;
10378 - } break;
10379 - }
10380 -
10381 - if (deltaz) // Translate along Z-axis
10382 - switch (border_condition) {
10383 - case 0:
10384 - if (cimg::abs(deltaz)>=(int)depth) return fill(0);
10385 - if (deltaz>0) cimg_forV(*this,k) {
10386 - std::memmove(ptr(0,0,0,k),ptr(0,0,deltaz,k),width*height*(depth-deltaz)*sizeof(T));
10387 - std::memset(ptr(0,0,depth-deltaz,k),0,width*height*deltaz*sizeof(T));
10388 - } else cimg_forV(*this,k) {
10389 - std::memmove(ptr(0,0,-deltaz,k),ptr(0,0,0,k),width*height*(depth+deltaz)*sizeof(T));
10390 - std::memset(ptr(0,0,0,k),0,-deltaz*width*height*sizeof(T));
10391 - }
10392 - break;
10393 - case 1:
10394 - if (deltaz>0) {
10395 - const int ndeltaz = (deltaz>=(int)depth)?depth-1:deltaz;
10396 - if (!ndeltaz) return *this;
10397 - cimg_forV(*this,k) {
10398 - std::memmove(ptr(0,0,0,k),ptr(0,0,ndeltaz,k),width*height*(depth-ndeltaz)*sizeof(T));
10399 - T *ptrd = ptr(0,0,depth-ndeltaz,k), *ptrs = ptr(0,0,depth-1,k);
10400 - for (int l=0; l<ndeltaz-1; l++) { std::memcpy(ptrd,ptrs,width*height*sizeof(T)); ptrd+=width*height; }
10401 - }
10402 - } else {
10403 - const int ndeltaz = (-deltaz>=(int)depth)?depth-1:-deltaz;
10404 - if (!ndeltaz) return *this;
10405 - cimg_forV(*this,k) {
10406 - std::memmove(ptr(0,0,ndeltaz,k),ptr(0,0,0,k),width*height*(depth-ndeltaz)*sizeof(T));
10407 - T *ptrd = ptr(0,0,1,k), *ptrs = ptr(0,0,0,k);
10408 - for (int l=0; l<ndeltaz-1; l++) { std::memcpy(ptrd,ptrs,width*height*sizeof(T)); ptrd+=width*height; }
10409 - }
10410 - }
10411 - break;
10412 - case 2: {
10413 - const int ml = cimg::mod(deltaz,depth), ndeltaz = (ml<=(int)depth/2)?ml:(ml-(int)depth);
10414 - if (!ndeltaz) return *this;
10415 - T* buf = new T[width*height*cimg::abs(ndeltaz)];
10416 - if (ndeltaz>0) cimg_forV(*this,k) {
10417 - std::memcpy(buf,ptr(0,0,0,k),width*height*ndeltaz*sizeof(T));
10418 - std::memmove(ptr(0,0,0,k),ptr(0,0,ndeltaz,k),width*height*(depth-ndeltaz)*sizeof(T));
10419 - std::memcpy(ptr(0,0,depth-ndeltaz,k),buf,width*height*ndeltaz*sizeof(T));
10420 - } else cimg_forV(*this,k) {
10421 - std::memcpy(buf,ptr(0,0,depth+ndeltaz,k),-ndeltaz*width*height*sizeof(T));
10422 - std::memmove(ptr(0,0,-ndeltaz,k),ptr(0,0,0,k),width*height*(depth+ndeltaz)*sizeof(T));
10423 - std::memcpy(ptr(0,0,0,k),buf,-ndeltaz*width*height*sizeof(T));
10424 - }
10425 - delete[] buf;
10426 - } break;
10427 - }
10428 -
10429 - if (deltav) // Translate along V-axis
10430 - switch (border_condition) {
10431 - case 0:
10432 - if (cimg::abs(deltav)>=(int)dim) return fill(0);
10433 - if (deltav>0) {
10434 - std::memmove(data,ptr(0,0,0,deltav),width*height*depth*(dim-deltav)*sizeof(T));
10435 - std::memset(ptr(0,0,0,dim-deltav),0,width*height*depth*deltav*sizeof(T));
10436 - } else cimg_forV(*this,k) {
10437 - std::memmove(ptr(0,0,0,-deltav),data,width*height*depth*(dim+deltav)*sizeof(T));
10438 - std::memset(data,0,-deltav*width*height*depth*sizeof(T));
10439 - }
10440 - break;
10441 - case 1:
10442 - if (deltav>0) {
10443 - const int ndeltav = (deltav>=(int)dim)?dim-1:deltav;
10444 - if (!ndeltav) return *this;
10445 - std::memmove(data,ptr(0,0,0,ndeltav),width*height*depth*(dim-ndeltav)*sizeof(T));
10446 - T *ptrd = ptr(0,0,0,dim-ndeltav), *ptrs = ptr(0,0,0,dim-1);
10447 - for (int l=0; l<ndeltav-1; l++) { std::memcpy(ptrd,ptrs,width*height*depth*sizeof(T)); ptrd+=width*height*depth; }
10448 - } else {
10449 - const int ndeltav = (-deltav>=(int)dim)?dim-1:-deltav;
10450 - if (!ndeltav) return *this;
10451 - std::memmove(ptr(0,0,0,ndeltav),data,width*height*depth*(dim-ndeltav)*sizeof(T));
10452 - T *ptrd = ptr(0,0,0,1);
10453 - for (int l=0; l<ndeltav-1; l++) { std::memcpy(ptrd,data,width*height*depth*sizeof(T)); ptrd+=width*height*depth; }
10454 - }
10455 - break;
10456 - case 2: {
10457 - const int ml = cimg::mod(deltav,dim), ndeltav = (ml<=(int)dim/2)?ml:(ml-(int)dim);
10458 - if (!ndeltav) return *this;
10459 - T* buf = new T[width*height*depth*cimg::abs(ndeltav)];
10460 - if (ndeltav>0) {
10461 - std::memcpy(buf,data,width*height*depth*ndeltav*sizeof(T));
10462 - std::memmove(data,ptr(0,0,0,ndeltav),width*height*depth*(dim-ndeltav)*sizeof(T));
10463 - std::memcpy(ptr(0,0,0,dim-ndeltav),buf,width*height*depth*ndeltav*sizeof(T));
10464 - } else {
10465 - std::memcpy(buf,ptr(0,0,0,dim+ndeltav),-ndeltav*width*height*depth*sizeof(T));
10466 - std::memmove(ptr(0,0,0,-ndeltav),data,width*height*depth*(dim+ndeltav)*sizeof(T));
10467 - std::memcpy(data,buf,-ndeltav*width*height*depth*sizeof(T));
10468 - }
10469 - delete[] buf;
10470 - } break;
10471 - }
10472 - }
10473 - return *this;
10474 - }
10475 -
10476 - //! Return a translated image.
10477 - /**
10478 - \param deltax Amount of displacement along the X-axis.
10479 - \param deltay Amount of displacement along the Y-axis.
10480 - \param deltaz Amount of displacement along the Z-axis.
10481 - \param deltav Amount of displacement along the V-axis.
10482 - \param border_condition Border condition.
10483 -
10484 - - \c border_condition can be :
10485 - - 0 : Zero border condition (Dirichlet).
10486 - - 1 : Nearest neighbors (Neumann).
10487 - - 2 : Repeat Pattern (Fourier style).
10488 - **/
10489 - CImg get_translate(const int deltax,const int deltay=0,const int deltaz=0,const int deltav=0,
10490 - const int border_condition=0) const {
10491 - return (+*this).translate(deltax,deltay,deltaz,deltav,border_condition);
10492 - }
10493 -
10494 - //! Return a 2D representation of a 3D image, with three slices.
10495 - CImg get_projections2d(const unsigned int px0,const unsigned int py0,const unsigned int pz0) const {
10496 - if (is_empty()) return CImg<T>();
10497 - const unsigned int
10498 - x0=(px0>=width)?width-1:px0,
10499 - y0=(py0>=height)?height-1:py0,
10500 - z0=(pz0>=depth)?depth-1:pz0;
10501 - CImg res(width+depth,height+depth,1,dim);
10502 - res.fill((*this)[0]);
10503 - { cimg_forXYV(*this,x,y,k) res(x,y,0,k) = (*this)(x,y,z0,k); }
10504 - { cimg_forYZV(*this,y,z,k) res(width+z,y,0,k) = (*this)(x0,y,z,k); }
10505 - { cimg_forXZV(*this,x,z,k) res(x,height+z,0,k) = (*this)(x,y0,z,k); }
10506 - return res;
10507 - }
10508 -
10509 - //! Return the image histogram.
10510 - /**
10511 - The histogram H of an image I is a 1D-function where H(x) is the number of
10512 - occurences of the value x in I.
10513 - \param nblevels = Number of different levels of the computed histogram.
10514 - For classical images, this value is 256 (default value). You should specify more levels
10515 - if you are working with CImg<float> or images with high range of pixel values.
10516 - \param val_min = Minimum value considered for the histogram computation. All pixel values lower than val_min
10517 - won't be counted.
10518 - \param val_max = Maximum value considered for the histogram computation. All pixel values higher than val_max
10519 - won't be counted.
10520 - \note If val_min==val_max==0 (default values), the function first estimates the minimum and maximum
10521 - pixel values of the current image, then uses these values for the histogram computation.
10522 - \result The histogram is returned as a 1D CImg<float> image H, having a size of (nblevels,1,1,1) such that
10523 - H(0) and H(nblevels-1) are respectively equal to the number of occurences of the values val_min and val_max in I.
10524 - \note Histogram computation always returns a 1D function. Histogram of multi-valued (such as color) images
10525 - are not multi-dimensional.
10526 - \see get_equalize_histogram(), equalize_histogram()
10527 - **/
10528 - CImg<float> get_histogram(const unsigned int nblevels=256,const T val_min=(T)0,const T val_max=(T)0) const {
10529 - if (is_empty()) return CImg<float>();
10530 - if (nblevels<1)
10531 - throw CImgArgumentException("CImg<%s>::get_histogram() : Can't compute an histogram with %u levels",
10532 - pixel_type(),nblevels);
10533 - T vmin=val_min, vmax=val_max;
10534 - CImg<float> res(nblevels,1,1,1,0);
10535 - if (vmin==vmax && vmin==0) { const CImgStats st(*this,false); vmin = (T)st.min; vmax = (T)st.max; }
10536 - cimg_for(*this,ptr,T) {
10537 - const int pos = (int)((*ptr-vmin)*(nblevels-1)/(vmax-vmin));
10538 - if (pos>=0 && pos<(int)nblevels) res[pos]++;
10539 - }
10540 - return res;
10541 - }
10542 -
10543 - //! Equalize the image histogram
10544 - /** This is the in-place version of \ref get_equalize_histogram() **/
10545 - CImg& equalize_histogram(const unsigned int nblevels=256,const T val_min=(T)0,const T val_max=(T)0) {
10546 - if (!is_empty()) {
10547 - T vmin=val_min, vmax=val_max;
10548 - if (vmin==vmax && vmin==0) { const CImgStats st(*this,false); vmin = (T)st.min; vmax = (T)st.max; }
10549 - CImg<float> hist = get_histogram(nblevels,vmin,vmax);
10550 - float cumul=0;
10551 - cimg_forX(hist,pos) { cumul+=hist[pos]; hist[pos]=cumul; }
10552 - cimg_for(*this,ptr,T) {
10553 - const int pos = (unsigned int)((*ptr-vmin)*(nblevels-1)/(vmax-vmin));
10554 - if (pos>=0 && pos<(int)nblevels) *ptr = (T)(vmin + (vmax-vmin)*hist[pos]/size());
10555 - }
10556 - }
10557 - return *this;
10558 - }
10559 -
10560 - //! Return the histogram-equalized version of the current image.
10561 - /**
10562 - The histogram equalization is a classical image processing algorithm that enhances the image contrast
10563 - by expanding its histogram.
10564 - \param nblevels = Number of different levels of the computed histogram.
10565 - For classical images, this value is 256 (default value). You should specify more levels
10566 - if you are working with CImg<float> or images with high range of pixel values.
10567 - \param val_min = Minimum value considered for the histogram computation. All pixel values lower than val_min
10568 - won't be changed.
10569 - \param val_max = Maximum value considered for the histogram computation. All pixel values higher than val_max
10570 - won't be changed.
10571 - \note If val_min==val_max==0 (default values), the function acts on all pixel values of the image.
10572 - \return A new image with same size is returned, where pixels have been equalized.
10573 - \see get_histogram(), equalize_histogram()
10574 - **/
10575 - CImg get_equalize_histogram(const unsigned int nblevels=256,const T val_min=(T)0,const T val_max=(T)0) const {
10576 - return (+*this).equalize_histogram(nblevels,val_min,val_max);
10577 - }
10578 -
10579 - //! Return the scalar image of vector norms.
10580 - /**
10581 - When dealing with vector-valued images (i.e images with dimv()>1), this function computes the L1,L2 or Linf norm of each
10582 - vector-valued pixel.
10583 - \param norm_type = Type of the norm being computed (1 = L1, 2 = L2, -1 = Linf).
10584 - \return A scalar-valued image CImg<float> with size (dimx(),dimy(),dimz(),1), where each pixel is the norm
10585 - of the corresponding pixels in the original vector-valued image.
10586 - \see get_orientation_pointwise, orientation_pointwise, norm_pointwise.
10587 - **/
10588 - CImg<typename cimg::largest<T,float>::type> get_norm_pointwise(int norm_type=2) const {
10589 - typedef typename cimg::largest<T,float>::type restype;
10590 - if (is_empty()) return CImg<restype>();
10591 - CImg<restype> res(width,height,depth);
10592 - switch(norm_type) {
10593 - case -1: { // Linf norm
10594 - cimg_forXYZ(*this,x,y,z) {
10595 - restype n=0; cimg_forV(*this,v) {
10596 - const restype tmp = (restype)cimg::abs((*this)(x,y,z,v));
10597 - if (tmp>n) n=tmp; res(x,y,z) = n;
10598 - }
10599 - }
10600 - } break;
10601 - case 1: { // L1 norm
10602 - cimg_forXYZ(*this,x,y,z) {
10603 - restype n=0; cimg_forV(*this,v) n+=cimg::abs((*this)(x,y,z,v)); res(x,y,z) = n;
10604 - }
10605 - } break;
10606 - default: { // L2 norm
10607 - cimg_forXYZ(*this,x,y,z) {
10608 - restype n=0; cimg_forV(*this,v) n+=(*this)(x,y,z,v)*(*this)(x,y,z,v); res(x,y,z) = (restype)std::sqrt((double)n);
10609 - }
10610 - } break;
10611 - }
10612 - return res;
10613 - }
10614 -
10615 - //! Replace each pixel value with its vector norm.
10616 - /**
10617 - This is the in-place version of \ref get_norm_pointwise().
10618 - \note Be careful when using this function on CImg<T> with T=char, unsigned char,unsigned int or int. The vector norm
10619 - is usually a floating point value, and a rough cast will be done here.
10620 - **/
10621 - CImg& norm_pointwise() {
10622 - return CImg<T>(get_norm_pointwise()).swap(*this);
10623 - }
10624 -
10625 - //! Return the image of normalized vectors
10626 - /**
10627 - When dealing with vector-valued images (i.e images with dimv()>1), this function return the image of normalized vectors
10628 - (unit vectors). Null vectors are unchanged. The L2-norm is computed for the normalization.
10629 - \return A new vector-valued image with same size, where each vector-valued pixels have been normalized.
10630 - \see get_norm_pointwise, norm_pointwise, orientation_pointwise.
10631 - **/
10632 - CImg<typename cimg::largest<T,float>::type> get_orientation_pointwise() const {
10633 - typedef typename cimg::largest<T,float>::type restype;
10634 - if (is_empty()) return CImg<restype>();
10635 - return CImg<restype>(*this,false).orientation_pointwise();
10636 - }
10637 -
10638 - //! Replace each pixel value by its normalized vector
10639 - /** This is the in-place version of \ref get_orientation_pointwise() **/
10640 - CImg& orientation_pointwise() {
10641 - cimg_forXYZ(*this,x,y,z) {
10642 - float n = 0.0f;
10643 - cimg_forV(*this,v) n+=(float)((*this)(x,y,z,v)*(*this)(x,y,z,v));
10644 - n = (float)std::sqrt(n);
10645 - if (n>0) cimg_forV(*this,v) (*this)(x,y,z,v)=(T)((*this)(x,y,z,v)/n);
10646 - else cimg_forV(*this,v) (*this)(x,y,z,v)=0;
10647 - }
10648 - return *this;
10649 - }
10650 -
10651 - //! Split image into a list CImgList<>.
10652 - CImgList<T> get_split(const char axe='x', const unsigned int nb=0) const {
10653 - if (is_empty()) return CImgList<T>();
10654 - CImgList<T> res;
10655 - switch (cimg::uncase(axe)) {
10656 - case 'x': {
10657 - if (nb>width)
10658 - throw CImgArgumentException("CImg<%s>::get_split() : Cannot split instance image (%u,%u,%u,%u,%p) along 'x' into %u images.",
10659 - pixel_type(),width,height,depth,dim,data,nb);
10660 - res.assign(nb?nb:width);
10661 - const unsigned int delta = width/res.size + ((width%res.size)?1:0);
10662 - unsigned int l,x;
10663 - for (l=0, x=0; l<res.size-1; l++, x+=delta) res[l] = get_crop(x,0,0,0,x+delta-1,height-1,depth-1,dim-1);
10664 - res[res.size-1] = get_crop(x,0,0,0,width-1,height-1,depth-1,dim-1);
10665 - } break;
10666 - case 'y': {
10667 - if (nb>height)
10668 - throw CImgArgumentException("CImg<%s>::get_split() : Cannot split instance image (%u,%u,%u,%u,%p) along 'y' into %u images.",
10669 - pixel_type(),width,height,depth,dim,data,nb);
10670 - res.assign(nb?nb:height);
10671 - const unsigned int delta = height/res.size + ((height%res.size)?1:0);
10672 - unsigned int l,x;
10673 - for (l=0, x=0; l<res.size-1; l++, x+=delta) res[l] = get_crop(0,x,0,0,width-1,x+delta-1,depth-1,dim-1);
10674 - res[res.size-1] = get_crop(0,x,0,0,width-1,height-1,depth-1,dim-1);
10675 - } break;
10676 - case 'z': {
10677 - if (nb>depth)
10678 - throw CImgArgumentException("CImg<%s>::get_split() : Cannot split instance image (%u,%u,%u,%u,%p) along 'z' into %u images.",
10679 - pixel_type(),width,height,depth,dim,data,nb);
10680 - res.assign(nb?nb:depth);
10681 - const unsigned int delta = depth/res.size + ((depth%res.size)?1:0);
10682 - unsigned int l,x;
10683 - for (l=0, x=0; l<res.size-1; l++, x+=delta) res[l] = get_crop(0,0,x,0,width-1,height-1,x+delta-1,dim-1);
10684 - res[res.size-1] = get_crop(0,0,x,0,width-1,height-1,depth-1,dim-1);
10685 - } break;
10686 - case 'v': {
10687 - if (nb>dim)
10688 - throw CImgArgumentException("CImg<%s>::get_split() : Cannot split instance image (%u,%u,%u,%u,%p) along 'v' into %u images.",
10689 - pixel_type(),width,height,depth,dim,data,nb);
10690 - res.assign(nb?nb:dim);
10691 - const unsigned int delta = dim/res.size + ((dim%res.size)?1:0);
10692 - unsigned int l,x;
10693 - for (l=0, x=0; l<res.size-1; l++, x+=delta) res[l] = get_crop(0,0,0,x,width-1,height-1,depth-1,x+delta-1);
10694 - res[res.size-1] = get_crop(0,0,0,x,width-1,height-1,depth-1,dim-1);
10695 - } break;
10696 - default:
10697 - throw CImgArgumentException("CImg<%s>::get_split() : Unknow axe '%c', must be 'x','y','z' or 'v'",pixel_type(),axe);
10698 - break;
10699 - }
10700 - return res;
10701 - }
10702 -
10703 - //! Append an image to another one
10704 - CImg get_append(const CImg<T>& img, const char axis='x', const char align='c') const {
10705 - if (img.is_empty()) return *this;
10706 - if (is_empty()) return img;
10707 - CImgList<T> temp(2);
10708 - temp[0].width = width; temp[0].height = height; temp[0].depth = depth;
10709 - temp[0].dim = dim; temp[0].data = data;
10710 - temp[1].width = img.width; temp[1].height = img.height; temp[1].depth = img.depth;
10711 - temp[1].dim = img.dim; temp[1].data = img.data;
10712 - const CImg<T> res = temp.get_append(axis,align);
10713 - temp[0].width = temp[0].height = temp[0].depth = temp[0].dim = 0; temp[0].data = 0;
10714 - temp[1].width = temp[1].height = temp[1].depth = temp[1].dim = 0; temp[1].data = 0;
10715 - return res;
10716 - }
10717 -
10718 - //! Append an image to another one (in-place version)
10719 - CImg& append(const CImg<T>& img, const char axis='x', const char align='c') {
10720 - if (img.is_empty()) return *this;
10721 - if (is_empty()) return (*this=img);
10722 - return get_append(img,axis,align).swap(*this);
10723 - }
10724 -
10725 - //! Return a list of images, corresponding to the XY-gradients of an image.
10726 - /**
10727 - \param scheme = Numerical scheme used for the gradient computation :
10728 - - -1 = Backward finite differences
10729 - - 0 = Centered finite differences
10730 - - 1 = Forward finite differences
10731 - - 2 = Using Sobel masks
10732 - - 3 = Using rotation invariant masks
10733 - - 4 = Using Deriche recusrsive filter.
10734 - **/
10735 - CImgList<typename cimg::largest<T,float>::type> get_gradientXY(const int scheme=0) const {
10736 - typedef typename cimg::largest<T,float>::type restype;
10737 - if (is_empty()) return CImgList<restype>(2);
10738 - CImgList<restype> res(2,width,height,depth,dim);
10739 - switch(scheme) {
10740 - case -1: { // backward finite differences
10741 - CImg_3x3(I,restype);
10742 - cimg_forZV(*this,z,k) cimg_for3x3(*this,x,y,z,k,I) { res[0](x,y,z,k) = Icc-Ipc; res[1](x,y,z,k) = Icc-Icp; }
10743 - } break;
10744 - case 1: { // forward finite differences
10745 - CImg_2x2(I,restype);
10746 - cimg_forZV(*this,z,k) cimg_for2x2(*this,x,y,z,k,I) { res[0](x,y,0,k) = Inc-Icc; res[1](x,y,z,k) = Icn-Icc; }
10747 - } break;
10748 - case 2: { // using Sobel mask
10749 - CImg_3x3(I,restype);
10750 - const float a = 1, b = 2;
10751 - cimg_forZV(*this,z,k) cimg_for3x3(*this,x,y,z,k,I) {
10752 - res[0](x,y,z,k) = -a*Ipp-b*Ipc-a*Ipn+a*Inp+b*Inc+a*Inn;
10753 - res[1](x,y,z,k) = -a*Ipp-b*Icp-a*Inp+a*Ipn+b*Icn+a*Inn;
10754 - }
10755 - } break;
10756 - case 3: { // using rotation invariant mask
10757 - CImg_3x3(I,restype);
10758 - const float a = (float)(0.25*(2-std::sqrt(2.0))), b = (float)(0.5f*(std::sqrt(2.0)-1));
10759 - cimg_forZV(*this,z,k) cimg_for3x3(*this,x,y,z,k,I) {
10760 - res[0](x,y,z,k) = -a*Ipp-b*Ipc-a*Ipn+a*Inp+b*Inc+a*Inn;
10761 - res[1](x,y,z,k) = -a*Ipp-b*Icp-a*Inp+a*Ipn+b*Icn+a*Inn;
10762 - }
10763 - } break;
10764 - case 4: { // using Deriche filter with low standard variation
10765 - res[0] = get_deriche(0,1,'x');
10766 - res[1] = get_deriche(0,1,'y');
10767 - } break;
10768 - default: { // central finite differences
10769 - CImg_3x3(I,restype);
10770 - cimg_forZV(*this,z,k) cimg_for3x3(*this,x,y,z,k,I) {
10771 - res[0](x,y,z,k) = 0.5f*(Inc-Ipc);
10772 - res[1](x,y,z,k) = 0.5f*(Icn-Icp);
10773 - }
10774 - } break;
10775 - }
10776 - return res;
10777 - }
10778 -
10779 - //! Return a list of images, corresponding to the XYZ-gradients of an image.
10780 - /**
10781 - \see get_gradientXY().
10782 - **/
10783 - CImgList<typename cimg::largest<T,float>::type> get_gradientXYZ(const int scheme=0) const {
10784 - typedef typename cimg::largest<T,float>::type restype;
10785 - if (is_empty()) return CImgList<restype>(3);
10786 - CImgList<restype> res(3,width,height,depth,dim);
10787 - CImg_3x3x3(I,restype);
10788 - switch(scheme) {
10789 - case -1: { // backward finite differences
10790 - cimg_forV(*this,k) cimg_for3x3x3(*this,x,y,z,k,I) {
10791 - res[0](x,y,z,k) = Iccc-Ipcc;
10792 - res[1](x,y,z,k) = Iccc-Icpc;
10793 - res[2](x,y,z,k) = Iccc-Iccp;
10794 - }
10795 - } break;
10796 - case 1: { // forward finite differences
10797 - cimg_forV(*this,k) cimg_for3x3x3(*this,x,y,z,k,I) {
10798 - res[0](x,y,z,k) = Incc-Iccc;
10799 - res[1](x,y,z,k) = Icnc-Iccc;
10800 - res[2](x,y,z,k) = Iccn-Iccc;
10801 - }
10802 - } break;
10803 - case 4: { // using Deriche filter with low standard variation
10804 - res[0] = get_deriche(0,1,'x');
10805 - res[1] = get_deriche(0,1,'y');
10806 - res[2] = get_deriche(0,1,'z');
10807 - } break;
10808 - default: { // central finite differences
10809 - cimg_forV(*this,k) cimg_for3x3x3(*this,x,y,z,k,I) {
10810 - res[0](x,y,z,k) = 0.5f*(Incc-Ipcc);
10811 - res[1](x,y,z,k) = 0.5f*(Icnc-Icpc);
10812 - res[2](x,y,z,k) = 0.5f*(Iccn-Iccp);
10813 - }
10814 - } break;
10815 - }
10816 - return res;
10817 - }
10818 -
10819 - //! Return the 2D structure tensor field of an image
10820 - CImg<typename cimg::largest<T,float>::type> get_structure_tensorXY(const int scheme=1) const {
10821 - typedef typename cimg::largest<T,float>::type restype;
10822 - if (is_empty()) return CImg<restype>();
10823 - CImg<restype> res(width,height,depth,3,0);
10824 - CImg_3x3(I,restype);
10825 - switch (scheme) {
10826 - case 0: { // classical central finite differences
10827 - cimg_forZV(*this,z,k) cimg_for3x3(*this,x,y,0,k,I) {
10828 - const restype
10829 - ix = 0.5f*(Inc-Ipc),
10830 - iy = 0.5f*(Icn-Icp);
10831 - res(x,y,z,0)+=ix*ix;
10832 - res(x,y,z,1)+=ix*iy;
10833 - res(x,y,z,2)+=iy*iy;
10834 - }
10835 - } break;
10836 - default: { // Precise forward/backward finite differences
10837 - cimg_forZV(*this,z,k) cimg_for3x3(*this,x,y,0,k,I) {
10838 - const restype
10839 - ixf = Inc-Icc, ixb = Icc-Ipc,
10840 - iyf = Icn-Icc, iyb = Icc-Icp;
10841 - res(x,y,z,0) += 0.5f*(ixf*ixf+ixb*ixb);
10842 - res(x,y,z,1) += 0.25f*(ixf*iyf+ixf*iyb+ixb*iyf+ixb*iyb);
10843 - res(x,y,z,2) += 0.5f*(iyf*iyf+iyb*iyb);
10844 - }
10845 - } break;
10846 - }
10847 - return res;
10848 - }
10849 -
10850 - //! In-place version of the previous function
10851 - CImg& structure_tensorXY(const int scheme=1) {
10852 - return get_structure_tensorXY(scheme).swap(*this);
10853 - }
10854 -
10855 - //! Return the 3D structure tensor field of an image
10856 - CImg<typename cimg::largest<T,float>::type> get_structure_tensorXYZ(const int scheme=1) const {
10857 - typedef typename cimg::largest<T,float>::type restype;
10858 - if (is_empty()) return CImg<restype>();
10859 - CImg<restype> res(width,height,depth,6,0);
10860 - CImg_3x3x3(I,restype);
10861 - switch (scheme) {
10862 - case 0: { // classical central finite differences
10863 - cimg_forV(*this,k) cimg_for3x3x3(*this,x,y,z,k,I) {
10864 - const restype
10865 - ix = 0.5f*(Incc-Ipcc),
10866 - iy = 0.5f*(Icnc-Icpc),
10867 - iz = 0.5f*(Iccn-Iccp);
10868 - res(x,y,z,0)+=ix*ix;
10869 - res(x,y,z,1)+=ix*iy;
10870 - res(x,y,z,2)+=ix*iz;
10871 - res(x,y,z,3)+=iy*iy;
10872 - res(x,y,z,4)+=iy*iz;
10873 - res(x,y,z,5)+=iz*iz;
10874 - }
10875 - } break;
10876 - default: { // Precise forward/backward finite differences
10877 - cimg_forV(*this,k) cimg_for3x3x3(*this,x,y,z,k,I) {
10878 - const restype
10879 - ixf = Incc-Iccc, ixb = Iccc-Ipcc,
10880 - iyf = Icnc-Iccc, iyb = Iccc-Icpc,
10881 - izf = Iccn-Iccc, izb = Iccc-Iccp;
10882 - res(x,y,z,0) += 0.5f*(ixf*ixf + ixb*ixb);
10883 - res(x,y,z,1) += 0.25f*(ixf*iyf + ixf*iyb + ixb*iyf + ixb*iyb);
10884 - res(x,y,z,2) += 0.25f*(ixf*izf + ixf*izb + ixb*izf + ixb*izb);
10885 - res(x,y,z,3) += 0.5f*(iyf*iyf + iyb*iyb);
10886 - res(x,y,z,4) += 0.25f*(iyf*izf + iyf*izb + iyb*izf + iyb*izb);
10887 - res(x,y,z,5) += 0.5f*(izf*izf + izb*izb);
10888 - }
10889 - } break;
10890 - }
10891 - return res;
10892 - }
10893 -
10894 - //! In-place version of the previous function
10895 - CImg& structure_tensorXYZ(const int scheme=1) {
10896 - return get_structure_tensorXYZ(scheme).swap(*this);
10897 - }
10898 -
10899 - //@}
10900 - //-------------------------------------
10901 - //
10902 - //! \name Meshes and Triangulations
10903 - //@{
10904 - //-------------------------------------
10905 -
10906 - struct _marching_squares_func {
10907 - const CImg<T>& ref;
10908 - _marching_squares_func(const CImg<T>& pref):ref(pref) {}
10909 - float operator()(const float x, const float y) const {
10910 - return (float)ref((int)x,(int)y);
10911 - }
10912 - };
10913 -
10914 - struct _marching_cubes_func {
10915 - const CImg<T>& ref;
10916 - _marching_cubes_func(const CImg<T>& pref):ref(pref) {}
10917 - float operator()(const float x, const float y, const float z) const {
10918 - return (float)ref((int)x,(int)y,(int)z);
10919 - }
10920 - };
10921 -
10922 - struct _marching_squares_func_float {
10923 - const CImg<T>& ref;
10924 - _marching_squares_func_float(const CImg<T>& pref):ref(pref) {}
10925 - float operator()(const float x, const float y) const {
10926 - return (float)ref.linear_pix2d(x,y);
10927 - }
10928 - };
10929 -
10930 - struct _marching_cubes_func_float {
10931 - const CImg<T>& ref;
10932 - _marching_cubes_func_float(const CImg<T>& pref):ref(pref) {}
10933 - float operator()(const float x, const float y, const float z) const {
10934 - return (float)ref.linear_pix3d(x,y,z);
10935 - }
10936 - };
10937 -
10938 - //! Get a vectorization of an implicit function defined by the instance image.
10939 - template<typename tp, typename tf>
10940 - const CImg& marching_squares(const float isovalue,CImgList<tp>& points, CImgList<tf>& primitives) const {
10941 - if (height<=1 || depth>1 || dim>1)
10942 - throw CImgInstanceException("CImg<%s>::marching_squares() : Instance image (%u,%u,%u,%u,%p) is not a 2D scalar image.",
10943 - pixel_type(),width,height,depth,dim,data);
10944 - const _marching_squares_func func(*this);
10945 - cimg::marching_squares(func,isovalue,0.0f,0.0f,dimx()-1.0f,dimy()-1.0f,1.0f,1.0f,points,primitives);
10946 - return *this;
10947 - }
10948 -
10949 - //! Get a vectorization of an implicit function defined by the instance image.
10950 - /**
10951 - This version allows to specify the marching squares resolution along x,y, and z.
10952 - **/
10953 - template<typename tp, typename tf>
10954 - const CImg& marching_squares(const float isovalue,
10955 - const float resx, const float resy,
10956 - CImgList<tp>& points, CImgList<tf>& primitives) const {
10957 - if (height<=1 || depth>1 || dim>1)
10958 - throw CImgInstanceException("CImg<%s>::marching_squares() : Instance image (%u,%u,%u,%u,%p) is not a 2D scalar image.",
10959 - pixel_type(),width,height,depth,dim,data);
10960 - const _marching_squares_func_float func(*this);
10961 - cimg::marching_squares(func,isovalue,0.0f,0.0f,dimx()-1.0f,dimy()-1.0f,resx,resy,points,primitives);
10962 - return *this;
10963 - }
10964 -
10965 - //! Get a triangulation of an implicit function defined by the instance image
10966 - template<typename tp, typename tf>
10967 - const CImg& marching_cubes(const float isovalue,CImgList<tp>& points, CImgList<tf>& primitives,
10968 - const bool invert_faces = false) const {
10969 - if (depth<=1 || dim>1)
10970 - throw CImgInstanceException("CImg<%s>::marching_cubes() : Instance image (%u,%u,%u,%u,%p) is not a 3D scalar image.",
10971 - pixel_type(),width,height,depth,dim,data);
10972 - const _marching_cubes_func func(*this);
10973 - cimg::marching_cubes(func,isovalue,0.0f,0.0f,0.0f,dimx()-1.0f,dimy()-1.0f,dimz()-1.0f,
10974 - 1.0f,1.0f,1.0f,points,primitives,invert_faces);
10975 - return *this;
10976 - }
10977 -
10978 - //! Get a triangulation of an implicit function defined by the instance image
10979 - /**
10980 - This version allows to specify the marching cube resolution along x,y and z.
10981 - **/
10982 - template<typename tp, typename tf>
10983 - const CImg& marching_cubes(const float isovalue,
10984 - const float resx, const float resy, const float resz,
10985 - CImgList<tp>& points, CImgList<tf>& primitives,
10986 - const bool invert_faces = false) const {
10987 - if (depth<=1 || dim>1)
10988 - throw CImgInstanceException("CImg<%s>::marching_cubes() : Instance image (%u,%u,%u,%u,%p) is not a 3D scalar image.",
10989 - pixel_type(),width,height,depth,dim,data);
10990 - const _marching_cubes_func_float func(*this);
10991 - cimg::marching_cubes(func,isovalue,0.0f,0.0f,0.0f,dimx()-1.0f,dimy()-1.0f,dimz()-1.0f,
10992 - resx,resy,resz,points,primitives,invert_faces);
10993 - return *this;
10994 - }
10995 -
10996 - //@}
10997 - //----------------------------
10998 - //
10999 - //! \name Color conversions
11000 - //@{
11001 - //----------------------------
11002 -
11003 - //! Return the default 256 colors palette.
11004 - /**
11005 - The default color palette is used by %CImg when displaying images on 256 colors displays.
11006 - It consists in the quantification of the (R,G,B) color space using 3:3:2 bits for color coding
11007 - (i.e 8 levels for the Red and Green and 4 levels for the Blue).
11008 - \return A 256x1x1x3 color image defining the palette entries.
11009 - **/
11010 - static CImg<T> get_default_LUT8() {
11011 - static CImg<T> palette;
11012 - if (!palette.data) {
11013 - palette.assign(256,1,1,3);
11014 - for (unsigned int index=0, r=16; r<256; r+=32)
11015 - for (unsigned int g=16; g<256; g+=32)
11016 - for (unsigned int b=32; b<256; b+=64) {
11017 - palette(index,0) = r;
11018 - palette(index,1) = g;
11019 - palette(index++,2) = b;
11020 - }
11021 - }
11022 - return palette;
11023 - }
11024 -
11025 - //! Convert color pixels from (R,G,B) to match a specified palette.
11026 - /**
11027 - This function return a (R,G,B) image where colored pixels are constrained to match entries
11028 - of the specified color \c palette.
11029 - \param palette User-defined palette that will constraint the color conversion.
11030 - \param dithering Enable/Disable Floyd-Steinberg dithering.
11031 - \param indexing If \c true, each resulting image pixel is an index to the given color palette.
11032 - Otherwise, (R,G,B) values of the palette are copied instead.
11033 - **/
11034 - template<typename t> CImg<t> get_RGBtoLUT(const CImg<t>& palette, const bool dithering=true,const bool indexing=false) const {
11035 - if (is_empty()) return CImg<t>();
11036 - if (dim!=3) throw CImgInstanceException("CImg<%s>::RGBtoLUT() : Input image dimension is dim=%u, "
11037 - "should be a (R,G,B) image.",pixel_type(),dim);
11038 - if (palette.data && palette.dim!=3)
11039 - throw CImgArgumentException("CImg<%s>::RGBtoLUT() : Given palette dimension is dim=%u, "
11040 - "should be a (R,G,B) palette",pixel_type(),palette.dim);
11041 - CImg<t> res(width,height,depth,indexing?1:3), pal = palette.data?palette:CImg<t>::get_default_LUT8();
11042 - float *line1 = new float[3*width], *line2 = new float[3*width], *pline1 = line1, *pline2 = line2;
11043 - cimg_forZ(*this,z) {
11044 - float *ptr=pline2; cimg_forX(*this,x) { *(ptr++)=(*this)(x,0,z,0); *(ptr++)=(*this)(x,0,z,1); *(ptr++)=(*this)(x,0,z,2); }
11045 - cimg_forY(*this,y) {
11046 - cimg::swap(pline1,pline2);
11047 - if (y<dimy()-1) {
11048 - const int ny = y+1;
11049 - float *ptr=pline2; cimg_forX(*this,x) { *(ptr++)=(*this)(x,ny,z,0); *(ptr++)=(*this)(x,ny,z,1); *(ptr++)=(*this)(x,ny,z,2); }
11050 - }
11051 - float *ptr1=pline1, *ptr2=pline2;
11052 - cimg_forX(*this,x) {
11053 - float R = *(ptr1++), G = *(ptr1++), B = *(ptr1++);
11054 - R = R<0?0:(R>255?255:R); G = G<0?0:(G>255?255:G); B = B<0?0:(B>255?255:B);
11055 - int best_index = 0;
11056 - t Rbest=0,Gbest=0,Bbest=0;
11057 - if (palette.data) { // find best match in given color palette
11058 - float min = cimg::type<float>::max();
11059 - cimg_forX(palette,off) {
11060 - const t Rp = palette(off,0), Gp = palette(off,1), Bp = palette(off,2);
11061 - const float error = (float)((Rp-R)*(Rp-R) + (Gp-G)*(Gp-G) + (Bp-B)*(Bp-B));
11062 - if (error<min) { min=error; best_index=off; Rbest=Rp; Gbest=Gp; Bbest=Bp; }
11063 - }
11064 - } else {
11065 - Rbest = (t)((unsigned char)R&0xe0); Gbest = (t)((unsigned char)G&0xe0); Bbest = (t)((unsigned char)B&0xc0);
11066 - best_index = (unsigned char)Rbest | ((unsigned char)Gbest>>3) | ((unsigned char)Bbest>>6);
11067 - }
11068 - if (indexing) res(x,y,z) = best_index;
11069 - else { res(x,y,z,0) = Rbest; res(x,y,z,1) = Gbest; res(x,y,z,2) = Bbest; }
11070 - if (dithering) { // apply dithering to neighborhood pixels if needed
11071 - const float dR = (float)(R-Rbest), dG = (float)(G-Gbest), dB = (float)(B-Bbest);
11072 - if (x<dimx()-1) { *(ptr1++)+= dR*7/16; *(ptr1++)+= dG*7/16; *(ptr1++)+= dB*7/16; ptr1-=3; }
11073 - if (y<dimy()-1) {
11074 - *(ptr2++)+= dR*5/16; *(ptr2++)+= dG*5/16; *ptr2+= dB*5/16; ptr2-=2;
11075 - if (x>0) { *(--ptr2)+= dB*3/16; *(--ptr2)+= dG*3/16; *(--ptr2)+= dR*3/16; ptr2+=3; }
11076 - if (x<dimx()-1) { ptr2+=3; *(ptr2++)+= dR/16; *(ptr2++)+= dG/16; *ptr2+= dB/16; ptr2-=5; }
11077 - }
11078 - }
11079 - ptr2+=3;
11080 - }
11081 - }
11082 - }
11083 - delete[] line1; delete[] line2;
11084 - return res;
11085 - }
11086 -
11087 - //! Convert color pixels from (R,G,B) to match the default 256 colors palette.
11088 - /**
11089 - Same as get_RGBtoLUT() with the default color palette given by get_default_LUT8().
11090 - **/
11091 - CImg<T> get_RGBtoLUT(const bool dithering=true, const bool indexing=false) const {
11092 - CImg<T> foo;
11093 - return get_RGBtoLUT(foo,dithering,indexing);
11094 - }
11095 -
11096 - //! Convert color pixels from (R,G,B) to match the specified color palette.
11097 - /** This is the in-place version of get_RGBtoLUT(). **/
11098 - CImg& RGBtoLUT(const CImg<T>& palette,const bool dithering=true,const bool indexing=false) {
11099 - return get_RGBtoLUT(palette,dithering,indexing).swap(*this);
11100 - }
11101 -
11102 - //! Convert color pixels from (R,G,B) to match the specified color palette.
11103 - /** This is the in-place version of get_RGBtoLUT(). **/
11104 - CImg& RGBtoLUT(const bool dithering=true,const bool indexing=false) {
11105 - CImg<T> foo;
11106 - return get_RGBtoLUT(foo,dithering,indexing).swap(*this);
11107 - }
11108 -
11109 - //! Convert an indexed image to a (R,G,B) image using the specified color palette.
11110 - template<typename t> CImg<t> get_LUTtoRGB(const CImg<t>& palette) const {
11111 - if (is_empty()) return CImg<t>();
11112 - if (dim!=1) throw CImgInstanceException("CImg<%s>::LUTtoRGB() : Input image dimension is dim=%u, "
11113 - "should be a LUT image",pixel_type(),dim);
11114 - if (palette.data && palette.dim!=3)
11115 - throw CImgArgumentException("CImg<%s>::LUTtoRGB() : Given palette dimension is dim=%u, "
11116 - "should be a (R,G,B) palette",pixel_type(),palette.dim);
11117 - CImg<t> res(width,height,depth,3);
11118 - CImg<t> pal = palette.data?palette:get_default_LUT8();
11119 - cimg_forXYZ(*this,x,y,z) {
11120 - const unsigned int index = (unsigned int)(*this)(x,y,z);
11121 - res(x,y,z,0) = pal(index,0);
11122 - res(x,y,z,1) = pal(index,1);
11123 - res(x,y,z,2) = pal(index,2);
11124 - }
11125 - return res;
11126 - }
11127 -
11128 - //! Convert an indexed image (with the default palette) to a (R,G,B) image.
11129 - CImg<T> get_LUTtoRGB() const {
11130 - CImg<T> foo;
11131 - return get_LUTtoRGB(foo);
11132 - }
11133 -
11134 - //! In-place version of get_LUTtoRGB().
11135 - CImg& LUTtoRGB(const CImg<T>& palette) {
11136 - return get_LUTtoRGB(palette).swap(*this);
11137 - }
11138 -
11139 - //! In-place version of get_LUTroRGB().
11140 - CImg& LUTtoRGB() {
11141 - CImg<T> foo;
11142 - return get_LUTtoRGB(foo).swap(*this);
11143 - }
11144 -
11145 - //! Convert color pixels from (R,G,B) to (H,S,V).
11146 - CImg& RGBtoHSV() {
11147 - if (!is_empty()) {
11148 - if (dim!=3) throw CImgInstanceException("CImg<%s>::RGBtoHSV() : Input image dimension is dim=%u, "
11149 - "should be a (R,G,B) image.",pixel_type(),dim);
11150 - cimg_forXYZ(*this,x,y,z) {
11151 - const float
11152 - R = (float)((*this)(x,y,z,0)/255.0f),
11153 - G = (float)((*this)(x,y,z,1)/255.0f),
11154 - B = (float)((*this)(x,y,z,2)/255.0f);
11155 - const float m = cimg::min(R,G,B), v = cimg::max(R,G,B);
11156 - float h,s;
11157 - if (v==m) { h=-1; s=0; } else {
11158 - const float
11159 - f = (R==m)?(G-B):((G==m)?(B-R):(R-G)),
11160 - i = (R==m)?3.0f:((G==m)?5.0f:1.0f);
11161 - h = (i-f/(v-m));
11162 - s = (v-m)/v;
11163 - if (h>=6.0f) h-=6.0f;
11164 - h*=(float)cimg::PI/3.0f;
11165 - }
11166 - (*this)(x,y,z,0) = (T)h;
11167 - (*this)(x,y,z,1) = (T)s;
11168 - (*this)(x,y,z,2) = (T)v;
11169 - }
11170 - }
11171 - return *this;
11172 - }
11173 -
11174 - //! Convert color pixels from (H,S,V) to (R,G,B).
11175 - CImg& HSVtoRGB() {
11176 - if (!is_empty()) {
11177 - if (dim!=3) throw CImgInstanceException("CImg<%s>::HSVtoRGB() : Input image dimension is dim=%u, "
11178 - "should be a (H,S,V) image",pixel_type(),dim);
11179 - cimg_forXYZ(*this,x,y,z) {
11180 - float
11181 - H = (float)((*this)(x,y,z,0)),
11182 - S = (float)((*this)(x,y,z,1)),
11183 - V = (float)((*this)(x,y,z,2));
11184 - float R=0,G=0,B=0;
11185 - if (H<0) R=G=B=V;
11186 - else {
11187 - H/=(float)cimg::PI/3.0f;
11188 - const int i = (int)std::floor(H);
11189 - const float
11190 - f = (i&1)?(H-i):(1.0f-H+i),
11191 - m = V*(1.0f-S),
11192 - n = V*(1.0f-S*f);
11193 - switch(i) {
11194 - case 6:
11195 - case 0: R=V; G=n; B=m; break;
11196 - case 1: R=n; G=V; B=m; break;
11197 - case 2: R=m; G=V; B=n; break;
11198 - case 3: R=m; G=n; B=V; break;
11199 - case 4: R=n; G=m; B=V; break;
11200 - case 5: R=V; G=m; B=n; break;
11201 - }
11202 - }
11203 - (*this)(x,y,z,0) = (T)(R*255.0f);
11204 - (*this)(x,y,z,1) = (T)(G*255.0f);
11205 - (*this)(x,y,z,2) = (T)(B*255.0f);
11206 - }
11207 - }
11208 - return *this;
11209 - }
11210 -
11211 - //! Convert color pixels from (R,G,B) to (Y,Cb,Cr)_8 (Thanks to Chen Wang).
11212 - CImg& RGBtoYCbCr() {
11213 - if (!is_empty()) {
11214 - if (dim!=3) throw CImgInstanceException("CImg<%s>::RGBtoYCbCr() : Input image dimension is dim=%u, "
11215 - "should be a (R,G,B) image (dim=3)",pixel_type(),dim);
11216 - cimg_forXYZ(*this,x,y,z) {
11217 - const int
11218 - R = (int)((*this)(x,y,z,0)),
11219 - G = (int)((*this)(x,y,z,1)),
11220 - B = (int)((*this)(x,y,z,2));
11221 - const int
11222 - Y = ((66*R+129*G+25*B+128)>>8) + 16,
11223 - Cb = ((-38*R-74*G+112*B+128)>>8) + 128,
11224 - Cr = ((112*R-94*G-18*B+128)>>8) + 128;
11225 - (*this)(x,y,z,0) = (T)(Y<0?0:(Y>255?255:Y));
11226 - (*this)(x,y,z,1) = (T)(Cb<0?0:(Cb>255?255:Cb));
11227 - (*this)(x,y,z,2) = (T)(Cr<0?0:(Cr>255?255:Cr));
11228 - }
11229 - }
11230 - return *this;
11231 - }
11232 -
11233 - //! Convert color pixels from (Y,Cb,Cr)_8 to (R,G,B).
11234 - CImg& YCbCrtoRGB() {
11235 - if (!is_empty()) {
11236 - if (dim!=3) throw CImgInstanceException("CImg<%s>::YCbCrtoRGB() : Input image dimension is dim=%u, "
11237 - "should be a (Y,Cb,Cr)_8 image (dim=3)",pixel_type(),dim);
11238 - cimg_forXYZ(*this,x,y,z) {
11239 - const int
11240 - Y = (int)((*this)(x, y, z, 0)-16),
11241 - Cb = (int)((*this)(x, y, z, 1)-128),
11242 - Cr = (int)((*this)(x, y, z, 2)-128);
11243 - const int
11244 - R = ((298*Y + 409*Cr + 128) >> 8 ),
11245 - G = ((298*Y - 100*Cb - 208*Cr + 128) >> 8 ),
11246 - B = ((298*Y + 516*Cb + 128) >> 8 );
11247 - (*this)(x,y,z,0) = (T)(R<0?0:(R>255?255:R));
11248 - (*this)(x,y,z,1) = (T)(G<0?0:(G>255?255:G));
11249 - (*this)(x,y,z,2) = (T)(B<0?0:(B>255?255:B));
11250 - }
11251 - }
11252 - return *this;
11253 - }
11254 -
11255 - //! Convert color pixels from (R,G,B) to (Y,U,V).
11256 - CImg& RGBtoYUV() {
11257 - if (!is_empty()) {
11258 - if (dim!=3) throw CImgInstanceException("CImg<%s>::RGBtoYUV() : Input image dimension is dim=%u, "
11259 - "should be a (R,G,B) image (dim=3)",pixel_type(),dim);
11260 - cimg_forXYZ(*this,x,y,z) {
11261 - const float
11262 - R = (*this)(x,y,z,0)/255.0f,
11263 - G = (*this)(x,y,z,1)/255.0f,
11264 - B = (*this)(x,y,z,2)/255.0f,
11265 - Y = (T)(0.299*R + 0.587*G + 0.114*B);
11266 - (*this)(x,y,z,0) = Y;
11267 - (*this)(x,y,z,1) = (T)(0.492*(B-Y));
11268 - (*this)(x,y,z,2) = (T)(0.877*(R-Y));
11269 - }
11270 - }
11271 - return *this;
11272 - }
11273 -
11274 - //! Convert color pixels from (Y,U,V) to (R,G,B).
11275 - CImg& YUVtoRGB() {
11276 - if (!is_empty()) {
11277 - if (dim!=3) throw CImgInstanceException("CImg<%s>::YUVtoRGB() : Input image dimension is dim=%u, "
11278 - "should be a (Y,U,V) image (dim=3)",pixel_type(),dim);
11279 - cimg_forXYZ(*this,x,y,z) {
11280 - const T Y = (*this)(x,y,z,0), U = (*this)(x,y,z,1), V = (*this)(x,y,z,2);
11281 - (*this)(x,y,z,0) = (T)((Y + 1.140*V)*255.0f);
11282 - (*this)(x,y,z,1) = (T)((Y - 0.395*U - 0.581*V)*255.0f);
11283 - (*this)(x,y,z,2) = (T)((Y + 2.032*U)*255.0f);
11284 - }
11285 - }
11286 - return *this;
11287 - }
11288 -
11289 - //! Convert color pixels from (R,G,B) to (X,Y,Z)_709.
11290 - CImg& RGBtoXYZ() {
11291 - if (!is_empty()) {
11292 - if (dim!=3) throw CImgInstanceException("CImg<%s>::RGBtoXYZ() : Input image dimension is dim=%u, "
11293 - "should be a (R,G,B) image (dim=3)",pixel_type(),dim);
11294 - cimg_forXYZ(*this,x,y,z) {
11295 - const float
11296 - R = (float)((*this)(x,y,z,0)/255.0f),
11297 - G = (float)((*this)(x,y,z,1)/255.0f),
11298 - B = (float)((*this)(x,y,z,2)/255.0f);
11299 - (*this)(x,y,z,0) = (T)(0.412453*R + 0.357580*G + 0.180423*B);
11300 - (*this)(x,y,z,1) = (T)(0.212671*R + 0.715160*G + 0.072169*B);
11301 - (*this)(x,y,z,2) = (T)(0.019334*R + 0.119193*G + 0.950227*B);
11302 - }
11303 - }
11304 - return *this;
11305 - }
11306 -
11307 - //! Convert (X,Y,Z)_709 pixels of a color image into the (R,G,B) color space.
11308 - CImg& XYZtoRGB() {
11309 - if (!is_empty()) {
11310 - if (dim!=3) throw CImgInstanceException("CImg<%s>::XYZtoRGB() : Input image dimension is dim=%u, "
11311 - "should be a (X,Y,Z) image (dim=3)",pixel_type(),dim);
11312 - cimg_forXYZ(*this,x,y,z) {
11313 - const float
11314 - X = (float)(255.0f*(*this)(x,y,z,0)),
11315 - Y = (float)(255.0f*(*this)(x,y,z,1)),
11316 - Z = (float)(255.0f*(*this)(x,y,z,2));
11317 - (*this)(x,y,z,0) = (T)(3.240479*X - 1.537150*Y - 0.498535*Z);
11318 - (*this)(x,y,z,1) = (T)(-0.969256*X + 1.875992*Y + 0.041556*Z);
11319 - (*this)(x,y,z,2) = (T)(0.055648*X - 0.204043*Y + 1.057311*Z);
11320 - }
11321 - }
11322 - return *this;
11323 - }
11324 -
11325 - //! Convert (X,Y,Z)_709 pixels of a color image into the (L*,a*,b*) color space.
11326 -#define cimg_Labf(x) ((x)>=0.008856?(std::pow(x,1/3.0)):(7.787*(x)+16.0/116.0))
11327 -#define cimg_Labfi(x) ((x)>=0.206893?((x)*(x)*(x)):(((x)-16.0/116.0)/7.787))
11328 -
11329 - CImg& XYZtoLab() {
11330 - if (!is_empty()) {
11331 - if (dim!=3) throw CImgInstanceException("CImg<%s>::XYZtoLab() : Input image dimension is dim=%u, "
11332 - "should be a (X,Y,Z) image (dim=3)",pixel_type(),dim);
11333 - const double
11334 - Xn = 0.412453 + 0.357580 + 0.180423,
11335 - Yn = 0.212671 + 0.715160 + 0.072169,
11336 - Zn = 0.019334 + 0.119193 + 0.950227;
11337 - cimg_forXYZ(*this,x,y,z) {
11338 - const T X = (*this)(x,y,z,0), Y = (*this)(x,y,z,1), Z = (*this)(x,y,z,2);
11339 - const double
11340 - XXn = X/Xn, YYn = Y/Yn, ZZn = Z/Zn,
11341 - fX = cimg_Labf(XXn), fY = cimg_Labf(YYn), fZ = cimg_Labf(ZZn);
11342 - (*this)(x,y,z,0) = (T)(116*fY-16);
11343 - (*this)(x,y,z,1) = (T)(500*(fX-fY));
11344 - (*this)(x,y,z,2) = (T)(200*(fY-fZ));
11345 - }
11346 - }
11347 - return *this;
11348 - }
11349 -
11350 - //! Convert (L,a,b) pixels of a color image into the (X,Y,Z) color space.
11351 - CImg& LabtoXYZ() {
11352 - if (!is_empty()) {
11353 - if (dim!=3) throw CImgInstanceException("CImg<%s>::LabtoXYZ() : Input image dimension is dim=%u, "
11354 - "should be a (X,Y,Z) image (dim=3)",pixel_type(),dim);
11355 - const double
11356 - Xn = 0.412453 + 0.357580 + 0.180423,
11357 - Yn = 0.212671 + 0.715160 + 0.072169,
11358 - Zn = 0.019334 + 0.119193 + 0.950227;
11359 - cimg_forXYZ(*this,x,y,z) {
11360 - const T L = (*this)(x,y,z,0), a = (*this)(x,y,z,1), b = (*this)(x,y,z,2);
11361 - const double
11362 - cY = (L+16)/116.0,
11363 - Y = Yn*cimg_Labfi(cY),
11364 - pY = std::pow(Y/Yn,1.0/3),
11365 - cX = a/500+pY,
11366 - X = Xn*cX*cX*cX,
11367 - cZ = pY-b/200,
11368 - Z = Zn*cZ*cZ*cZ;
11369 - (*this)(x,y,z,0) = (T)(X);
11370 - (*this)(x,y,z,1) = (T)(Y);
11371 - (*this)(x,y,z,2) = (T)(Z);
11372 - }
11373 - }
11374 - return *this;
11375 - }
11376 -
11377 - //! Convert (X,Y,Z)_709 pixels of a color image into the (x,y,Y) color space.
11378 - CImg& XYZtoxyY() {
11379 - if (!is_empty()) {
11380 - if (dim!=3) throw CImgInstanceException("CImg<%s>::XYZtoxyY() : Input image dimension is dim=%u, "
11381 - "should be a (X,Y,Z) image (dim=3)",pixel_type(),dim);
11382 - cimg_forXYZ(*this,x,y,z) {
11383 - const T X = (*this)(x,y,z,0), Y = (*this)(x,y,z,1), Z = (*this)(x,y,z,2), sum = (X+Y+Z), nsum = sum>0?sum:1;
11384 - (*this)(x,y,z,0) = X/nsum;
11385 - (*this)(x,y,z,1) = Y/nsum;
11386 - (*this)(x,y,z,2) = Y;
11387 - }
11388 - }
11389 - return *this;
11390 - }
11391 -
11392 - //! Convert (x,y,Y) pixels of a color image into the (X,Y,Z)_709 color space.
11393 - CImg& xyYtoXYZ() {
11394 - if (!is_empty()) {
11395 - if (dim!=3) throw CImgInstanceException("CImg<%s>::xyYtoXYZ() : Input image dimension is dim=%u, "
11396 - "should be a (x,y,Y) image (dim=3)",pixel_type(),dim);
11397 - cimg_forXYZ(*this,x,y,z) {
11398 - const T px = (*this)(x,y,z,0), py = (*this)(x,y,z,1), Y = (*this)(x,y,z,2), ny = py>0?py:1;
11399 - (*this)(x,y,z,0) = (T)(px*Y/ny);
11400 - (*this)(x,y,z,1) = Y;
11401 - (*this)(x,y,z,2) = (T)((1-px-py)*Y/ny);
11402 - }
11403 - }
11404 - return *this;
11405 - }
11406 -
11407 - //! In-place version of get_RGBtoLab().
11408 - CImg& RGBtoLab() {
11409 - return RGBtoXYZ().XYZtoLab();
11410 - }
11411 -
11412 - //! In-place version of get_LabtoRGb().
11413 - CImg& LabtoRGB() {
11414 - return LabtoXYZ().XYZtoRGB();
11415 - }
11416 -
11417 - //! In-place version of get_RGBtoxyY().
11418 - CImg& RGBtoxyY() {
11419 - return RGBtoXYZ().XYZtoxyY();
11420 - }
11421 -
11422 - //! In-place version of get_xyYtoRGB().
11423 - CImg& xyYtoRGB() {
11424 - return xyYtoXYZ().XYZtoRGB();
11425 - }
11426 -
11427 - //! Convert a (R,G,B) image to a (H,S,V) one.
11428 - CImg get_RGBtoHSV() const {
11429 - return (+*this).RGBtoHSV();
11430 - }
11431 -
11432 - //! Convert a (H,S,V) image to a (R,G,B) one.
11433 - CImg get_HSVtoRGB() const {
11434 - return (+*this).HSVtoRGB();
11435 - }
11436 -
11437 - //! Convert a (R,G,B) image to a (Y,Cb,Cr) one.
11438 - CImg get_RGBtoYCbCr() const {
11439 - return (+*this).RGBtoYCbCr();
11440 - }
11441 -
11442 - //! Convert a (Y,Cb,Cr) image to a (R,G,B) one.
11443 - CImg get_YCbCrtoRGB() const {
11444 - return (+*this).YCbCrtoRGB();
11445 - }
11446 -
11447 - //! Convert a (R,G,B) image into a (Y,U,V) one.
11448 - CImg<typename cimg::largest<T,float>::type> get_RGBtoYUV() const {
11449 - typedef typename cimg::largest<T,float>::type restype;
11450 - return CImg<restype>(*this,false).RGBtoYUV();
11451 - }
11452 -
11453 - //! Convert a (Y,U,V) image into a (R,G,B) one.
11454 - CImg get_YUVtoRGB() const {
11455 - return (+*this).YUVtoRGB();
11456 - }
11457 -
11458 - //! Convert a (R,G,B) image to a (X,Y,Z) one.
11459 - CImg<typename cimg::largest<T,float>::type> get_RGBtoXYZ() const {
11460 - typedef typename cimg::largest<T,float>::type restype;
11461 - return CImg<restype>(*this,false).RGBtoXYZ();
11462 - }
11463 -
11464 - //! Convert a (X,Y,Z) image to a (R,G,B) one.
11465 - CImg get_XYZtoRGB() const {
11466 - return (+*this).XYZtoRGB();
11467 - }
11468 -
11469 - //! Convert a (X,Y,Z) image to a (L,a,b) one.
11470 - CImg get_XYZtoLab() const {
11471 - return (+*this).XYZtoLab();
11472 - }
11473 -
11474 - //! Convert a (L,a,b) image to a (X,Y,Z) one.
11475 - CImg get_LabtoXYZ() const {
11476 - return (+*this).LabtoXYZ();
11477 - }
11478 -
11479 - //! Convert a (X,Y,Z) image to a (x,y,Y) one.
11480 - CImg get_XYZtoxyY() const {
11481 - return (+*this).XYZtoxyY();
11482 - }
11483 -
11484 - //! Convert a (x,y,Y) image to a (X,Y,Z) one.
11485 - CImg get_xyYtoXYZ() const {
11486 - return (+*this).xyYtoXYZ();
11487 - }
11488 -
11489 - //! Convert a (R,G,B) image to a (L,a,b) one.
11490 - CImg get_RGBtoLab() const {
11491 - return (+*this).RGBtoLab();
11492 - }
11493 -
11494 - //! Convert a (L,a,b) image to a (R,G,B) one.
11495 - CImg get_LabtoRGB() const {
11496 - return (+*this).LabtoRGB();
11497 - }
11498 -
11499 - //! Convert a (R,G,B) image to a (x,y,Y) one.
11500 - CImg get_RGBtoxyY() const {
11501 - return (+*this).RGBtoxyY();
11502 - }
11503 -
11504 - //! Convert a (x,y,Y) image to a (R,G,B) one.
11505 - CImg get_xyYtoRGB() const {
11506 - return (+*this).xyYtoRGB();
11507 - }
11508 -
11509 - //@}
11510 - //-------------------
11511 - //
11512 - //! \name Drawing
11513 - //@{
11514 - //-------------------
11515 -
11516 - // Should be used only by member functions. Not an user-friendly function.
11517 - // Pre-requisites : x0<x1, y-coordinate is valid, col is valid.
11518 - CImg& draw_scanline(const int x0, const int x1, const int y, const T *const color,
11519 - const float opacity=1, const float brightness=1, const bool init=false) {
11520 - static float nopacity=0, copacity=0;
11521 - static unsigned int whz=0;
11522 - static const T* col = 0;
11523 - if (init) {
11524 - nopacity = cimg::abs(opacity);
11525 - copacity = 1-cimg::max(opacity,0.0f);
11526 - whz = width*height*depth;
11527 - col = color;
11528 - } else {
11529 - const int nx0 = cimg::max(x0,0), nx1 = cimg::min(x1,(int)width-1), dx = nx1-nx0;
11530 - T *ptrd = ptr(0,y) + nx0;
11531 - if (dx>=0) {
11532 - if (opacity>=1) {
11533 - int off = whz-dx-1;
11534 - if (sizeof(T)!=1) cimg_forV(*this,k) {
11535 - const T val = (T)(*(col++)*brightness);
11536 - for (int x=dx; x>=0; x--) *(ptrd++)=val;
11537 - ptrd+=off;
11538 - } else cimg_forV(*this,k) { std::memset(ptrd,(int)(*(col++)*brightness),dx+1); ptrd+=whz; }
11539 - col-=dim;
11540 - } else {
11541 - int off = whz-dx-1;
11542 - cimg_forV(*this,k) {
11543 - const T val = (T)(*(col++)*brightness);
11544 - for (int x=dx; x>=0; x--) { *ptrd = (T)(val*nopacity + *ptrd*copacity); ptrd++; }
11545 - ptrd+=off;
11546 - }
11547 - col-=dim;
11548 - }
11549 - }
11550 - }
11551 - return *this;
11552 - }
11553 -
11554 - CImg& draw_scanline(const T *const color,const float opacity=1) { return draw_scanline(0,0,0,color,opacity,1.0f,true); }
11555 -
11556 - //! Draw a colored point in the instance image, at coordinates (\c x0,\c y0,\c z0).
11557 - /**
11558 - \param x0 = X-coordinate of the vector-valued pixel to plot.
11559 - \param y0 = Y-coordinate of the vector-valued pixel to plot.
11560 - \param z0 = Z-coordinate of the vector-valued pixel to plot.
11561 - \param color = array of dimv() values of type \c T, defining the drawing color.
11562 - \param opacity = opacity of the drawing.
11563 - \note Clipping is supported.
11564 - **/
11565 - CImg& draw_point(const int x0,const int y0,const int z0,
11566 - const T *const color,const float opacity=1) {
11567 - if (!is_empty()) {
11568 - if (!color) throw CImgArgumentException("CImg<%s>::draw_point() : Specified color is (null)",pixel_type());
11569 - if (x0>=0 && y0>=0 && z0>=0 && x0<dimx() && y0<dimy() && z0<dimz()) {
11570 - const T *col=color;
11571 - const unsigned int whz = width*height*depth;
11572 - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
11573 - T *ptrd = ptr(x0,y0,z0,0);
11574 - if (opacity>=1) cimg_forV(*this,k) { *ptrd = *(col++); ptrd+=whz; }
11575 - else cimg_forV(*this,k) { *ptrd=(T)(*(col++)*nopacity + *ptrd*copacity); ptrd+=whz; }
11576 - }
11577 - }
11578 - return *this;
11579 - }
11580 -
11581 - //! Draw a colored point in the instance image, at coordinates (\c x0,\c y0).
11582 - /**
11583 - \param x0 = X-coordinate of the vector-valued pixel to plot.
11584 - \param y0 = Y-coordinate of the vector-valued pixel to plot.
11585 - \param color = array of dimv() values of type \c T, defining the drawing color.
11586 - \param opacity = opacity of the drawing.
11587 - \note Clipping is supported.
11588 - **/
11589 - CImg& draw_point(const int x0,const int y0,const T *const color,const float opacity=1) {
11590 - return draw_point(x0,y0,0,color,opacity);
11591 - }
11592 -
11593 - //! Draw a 2D colored line in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1).
11594 - /**
11595 - \param x0 = X-coordinate of the starting point of the line.
11596 - \param y0 = Y-coordinate of the starting point of the line.
11597 - \param x1 = X-coordinate of the ending point of the line.
11598 - \param y1 = Y-coordinate of the ending point of the line.
11599 - \param color = array of dimv() values of type \c T, defining the drawing color.
11600 - \param pattern = An integer whose bits describes the line pattern.
11601 - \param opacity = opacity of the drawing.
11602 - \note Clipping is supported.
11603 - **/
11604 - CImg& draw_line(const int x0,const int y0,const int x1,const int y1,
11605 - const T *const color,const unsigned int pattern=~0L,const float opacity=1) {
11606 - if (!is_empty()) {
11607 - if (!color) throw CImgArgumentException("CImg<%s>::draw_line() : Specified color is (null)",pixel_type());
11608 - const T* col=color;
11609 - int nx0 = x0, nx1 = x1, ny0 = y0, ny1 = y1;
11610 -
11611 - if (nx0>nx1) cimg::swap(nx0,nx1,ny0,ny1);
11612 - if (nx1<0 || nx0>=dimx()) return *this;
11613 - if (nx0<0) { ny0-=nx0*(ny1-ny0)/(nx1-nx0); nx0=0; }
11614 - if (nx1>=dimx()) { ny1+=(nx1-dimx())*(ny0-ny1)/(nx1-nx0); nx1=dimx()-1;}
11615 - if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1);
11616 - if (ny1<0 || ny0>=dimy()) return *this;
11617 - if (ny0<0) { nx0-=ny0*(nx1-nx0)/(ny1-ny0); ny0=0; }
11618 - if (ny1>=dimy()) { nx1+=(ny1-dimy())*(nx0-nx1)/(ny1-ny0); ny1=dimy()-1;}
11619 -
11620 - const bool steep = (ny1-ny0)>cimg::abs(nx1-nx0);
11621 - if (steep) cimg::swap(nx0,ny0,nx1,ny1);
11622 - if (nx0>nx1) cimg::swap(nx0,nx1,ny0,ny1);
11623 - const int
11624 - dx = nx1-nx0, dy = cimg::abs(ny1-ny0),
11625 - offx = steep?width:1,
11626 - offy = (ny0<ny1?1:-1)*(steep?1:width);
11627 -
11628 - if (opacity>=1) cimg_forV(*this,k) {
11629 - unsigned int hatch=1;
11630 - T *ptrd = steep?ptr(ny0,nx0,0,k):ptr(nx0,ny0,0,k);
11631 - const T c = *(col++);
11632 - for (int error=0, x=nx0; x<=nx1; x++) {
11633 - if (!(~pattern) || (~pattern && pattern&hatch)) *ptrd=c;
11634 - ptrd+=offx;
11635 - if (((error+=dy)<<1)>=dx) { ptrd+=offy; error-=dx; }
11636 - if (pattern) hatch=(hatch<<1)+(hatch>>(sizeof(unsigned int)*8-1));
11637 - }
11638 - } else {
11639 - const float nopacity = cimg::abs(opacity), copacity=1-cimg::max(opacity,0.0f);
11640 - cimg_forV(*this,k) {
11641 - unsigned int hatch=1;
11642 - T *ptrd = steep?ptr(ny0,nx0,0,k):ptr(nx0,ny0,0,k);
11643 - const T c = *(col++);
11644 - for (int error=0, x=nx0; x<=nx1; x++) {
11645 - if (!(~pattern) || (~pattern && pattern&hatch)) *ptrd = (T)(c*nopacity + copacity*(*ptrd));
11646 - ptrd+=offx;
11647 - if (((error+=dy)<<1)>=dx) { ptrd+=offy; error-=dx; }
11648 - if (pattern) hatch=(hatch<<1)+(hatch>>(sizeof(unsigned int)*8-1));
11649 - }
11650 - }
11651 - }
11652 - }
11653 - return *this;
11654 - }
11655 -
11656 - //! Draw a 3D colored line in the instance image, at coordinates (\c x0,\c y0,\c z0)-(\c x1,\c y1,\c z1).
11657 - /**
11658 - \param x0 = X-coordinate of the starting point of the line.
11659 - \param y0 = Y-coordinate of the starting point of the line.
11660 - \param z0 = Z-coordinate of the starting point of the line.
11661 - \param x1 = X-coordinate of the ending point of the line.
11662 - \param y1 = Y-coordinate of the ending point of the line.
11663 - \param z1 = Z-coordinate of the ending point of the line.
11664 - \param color = array of dimv() values of type \c T, defining the drawing color.
11665 - \param pattern = An integer whose bits describes the line pattern.
11666 - \param opacity = opacity of the drawing.
11667 - \note Clipping is supported.
11668 - **/
11669 - CImg& draw_line(const int x0, const int y0, const int z0, const int x1, const int y1, const int z1,
11670 - const T *const color, const unsigned int pattern=~0L, const float opacity=1) {
11671 - if (!is_empty()) {
11672 - if (!color) throw CImgArgumentException("CImg<%s>::draw_line() : Specified color is (null)",pixel_type());
11673 - const T* col=color;
11674 - unsigned int hatch=1;
11675 - int nx0 = x0, ny0 = y0, nz0 = z0, nx1 = x1, ny1 = y1, nz1 = z1;
11676 - if (nx0>nx1) cimg::swap(nx0,nx1,ny0,ny1,nz0,nz1);
11677 - if (nx1<0 || nx0>=dimx()) return *this;
11678 - if (nx0<0) { const int D=1+nx1-nx0; ny0-=nx0*(1+ny1-ny0)/D; nz0-=nx0*(1+nz1-nz0)/D; nx0=0; }
11679 - if (nx1>=dimx()) { const int d=nx1-dimx(), D=1+nx1-nx0; ny1+=d*(1+ny0-ny1)/D; nz1+=d*(1+nz0-nz1)/D; nx1=dimx()-1;}
11680 - if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1,nz0,nz1);
11681 - if (ny1<0 || ny0>=dimy()) return *this;
11682 - if (ny0<0) { const int D=1+ny1-ny0; nx0-=ny0*(1+nx1-nx0)/D; nz0-=ny0*(1+nz1-nz0)/D; ny0=0; }
11683 - if (ny1>=dimy()) { const int d=ny1-dimy(), D=1+ny1-ny0; nx1+=d*(1+nx0-nx1)/D; nz1+=d*(1+nz0-nz1)/D; ny1=dimy()-1;}
11684 - if (nz0>nz1) cimg::swap(nx0,nx1,ny0,ny1,nz0,nz1);
11685 - if (nz1<0 || nz0>=dimz()) return *this;
11686 - if (nz0<0) { const int D=1+nz1-nz0; nx0-=nz0*(1+nx1-nx0)/D; ny0-=nz0*(1+ny1-ny0)/D; nz0=0; }
11687 - if (nz1>=dimz()) { const int d=nz1-dimz(), D=1+nz1-nz0; nx1+=d*(1+nx0-nx1)/D; ny1+=d*(1+ny0-ny1)/D; nz1=dimz()-1;}
11688 - const unsigned int dmax = cimg::max(cimg::abs(nx1-nx0),cimg::abs(ny1-ny0),nz1-nz0), whz = width*height*depth;
11689 - const float px = (nx1-nx0)/(float)dmax, py = (ny1-ny0)/(float)dmax, pz = (nz1-nz0)/(float)dmax;
11690 - float x = (float)nx0, y = (float)ny0, z = (float)nz0;
11691 - if (opacity>=1) for (unsigned int t=0; t<=dmax; t++) {
11692 - if (!(~pattern) || (~pattern && pattern&hatch)) {
11693 - T* ptrd = ptr((unsigned int)x,(unsigned int)y,(unsigned int)z,0);
11694 - cimg_forV(*this,k) { *ptrd=*(col++); ptrd+=whz; }
11695 - col-=dim;
11696 - }
11697 - x+=px; y+=py; z+=pz; if (pattern) hatch=(hatch<<1)+(hatch>>(sizeof(unsigned int)*8-1));
11698 - } else {
11699 - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
11700 - for (unsigned int t=0; t<=dmax; t++) {
11701 - if (!(~pattern) || (~pattern && pattern&hatch)) {
11702 - T* ptrd = ptr((unsigned int)x,(unsigned int)y,(unsigned int)z,0);
11703 - cimg_forV(*this,k) { *ptrd = (T)(*(col++)*nopacity + copacity*(*ptrd)); ptrd+=whz; }
11704 - col-=dim;
11705 - }
11706 - x+=px; y+=py; z+=pz; if (pattern) hatch=(hatch<<1)+(hatch>>(sizeof(unsigned int)*8-1));
11707 - }
11708 - }
11709 - }
11710 - return *this;
11711 - }
11712 -
11713 - //! Draw a 2D textured line in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1).
11714 - /**
11715 - \param x0 = X-coordinate of the starting point of the line.
11716 - \param y0 = Y-coordinate of the starting point of the line.
11717 - \param x1 = X-coordinate of the ending point of the line.
11718 - \param y1 = Y-coordinate of the ending point of the line.
11719 - \param texture = a colored texture image used to draw the line color.
11720 - \param tx0 = X-coordinate of the starting point of the texture.
11721 - \param ty0 = Y-coordinate of the starting point of the texture.
11722 - \param tx1 = X-coordinate of the ending point of the texture.
11723 - \param ty1 = Y-coordinate of the ending point of the texture.
11724 - \param opacity = opacity of the drawing.
11725 - \note Clipping is supported, but texture coordinates do not support clipping.
11726 - **/
11727 - template<typename t> CImg& draw_line(const int x0,const int y0,const int x1,const int y1,
11728 - const CImg<t>& texture,
11729 - const int tx0,const int ty0,const int tx1,const int ty1,
11730 - const float opacity=1) {
11731 - if (!is_empty()) {
11732 - if (texture.is_empty() || texture.dim<dim)
11733 - throw CImgArgumentException("CImg<%s>::draw_line() : specified texture (%u,%u,%u,%u,%p) has wrong dimensions.",
11734 - pixel_type(),texture.width,texture.height,texture.depth,texture.dim,texture.data);
11735 - int nx0=x0, ny0=y0, nx1=x1, ny1=y1, ntx0=tx0, nty0=ty0, ntx1=tx1, nty1=ty1;
11736 - if (nx0>nx1) cimg::swap(nx0,nx1,ny0,ny1,ntx0,ntx1,nty0,nty1);
11737 - if (nx1<0 || nx0>=dimx()) return *this;
11738 - if (nx0<0) { const int D=nx1-nx0; ny0-=nx0*(ny1-ny0)/D; ntx0-=nx0*(ntx1-ntx0)/D; nty0-=nx0*(nty1-nty0)/D; nx0=0; }
11739 - if (nx1>=dimx()) { const int d=nx1-dimx(),D=nx1-nx0; ny1+=d*(ny0-ny1)/D; ntx1+=d*(ntx0-ntx1)/D; nty1+=d*(nty0-nty1)/D; nx1=dimx()-1; }
11740 - if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1,ntx0,ntx1,nty0,nty1);
11741 - if (ny1<0 || ny0>=dimy()) return *this;
11742 - if (ny0<0) { const int D=ny1-ny0; nx0-=ny0*(nx1-nx0)/D; ntx0-=ny0*(ntx1-ntx0)/D; nty0-=ny0*(nty1-nty0)/D; ny0=0; }
11743 - if (ny1>=dimy()) { const int d=ny1-dimy(),D=ny1-ny0; nx1+=d*(nx0-nx1)/D; ntx1+=d*(ntx0-ntx1)/D; nty1+=d*(nty0-nty1)/D; ny1=dimy()-1; }
11744 - const unsigned int dmax = (unsigned int)cimg::max(cimg::abs(nx1-nx0),ny1-ny0),
11745 - whz = width*height*depth, twhz = texture.width*texture.height*texture.depth;
11746 - const float px = dmax?(nx1-nx0)/(float)dmax:0, py = dmax?(ny1-ny0)/(float)dmax:0,
11747 - tpx = dmax?(ntx1-ntx0)/(float)dmax:0, tpy = dmax?(nty1-nty0)/(float)dmax:0;
11748 - float x = (float)nx0, y = (float)ny0, tx = (float)ntx0, ty = (float)nty0;
11749 - if (opacity>=1) for (unsigned int tt=0; tt<=dmax; tt++) {
11750 - T *ptrd = ptr((unsigned int)x,(unsigned int)y,0,0);
11751 - const t *ptrs = texture.ptr((unsigned int)tx,(unsigned int)ty,0,0);
11752 - cimg_forV(*this,k) { *ptrd = (T)*ptrs; ptrd+=whz; ptrs+=twhz; }
11753 - x+=px; y+=py; tx+=tpx; ty+=tpy;
11754 - } else {
11755 - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
11756 - for (unsigned int tt=0; tt<=dmax; tt++) {
11757 - T *ptrd = ptr((unsigned int)x,(unsigned int)y,0,0);
11758 - const t *ptrs = texture.ptr((unsigned int)tx,(unsigned int)ty,0,0);
11759 - cimg_forV(*this,k) { *ptrd = (T)(nopacity*(*ptrs) + copacity*(*ptrd)); ptrd+=whz; ptrs+=twhz; }
11760 - x+=px; y+=py; tx+=tpx; ty+=tpy;
11761 - }
11762 - }
11763 - }
11764 - return *this;
11765 - }
11766 -
11767 - //! Draw a 2D colored arrow in the instance image, at coordinates (\c x0,\c y0)->(\c x1,\c y1).
11768 - /**
11769 - \param x0 = X-coordinate of the starting point of the arrow (tail).
11770 - \param y0 = Y-coordinate of the starting point of the arrow (tail).
11771 - \param x1 = X-coordinate of the ending point of the arrow (head).
11772 - \param y1 = Y-coordinate of the ending point of the arrow (head).
11773 - \param color = array of dimv() values of type \c T, defining the drawing color.
11774 - \param angle = aperture angle of the arrow head
11775 - \param length = length of the arrow head. If <0, described as a percentage of the arrow length.
11776 - \param pattern = An integer whose bits describes the line pattern.
11777 - \param opacity = opacity of the drawing.
11778 - \note Clipping is supported.
11779 - **/
11780 - CImg& draw_arrow(const int x0,const int y0,const int x1,const int y1,
11781 - const T *const color,
11782 - const float angle=30,const float length=-10,const unsigned int pattern=~0L,const float opacity=1) {
11783 - if (!is_empty()) {
11784 - const float u = (float)(x0-x1), v = (float)(y0-y1), sq = u*u+v*v,
11785 - deg = (float)(angle*cimg::PI/180), ang = (sq>0)?(float)std::atan2(v,u):0.0f,
11786 - l = (length>=0)?length:-length*(float)std::sqrt(sq)/100;
11787 - if (sq>0) {
11788 - const double cl = std::cos(ang-deg), sl = std::sin(ang-deg), cr = std::cos(ang+deg), sr = std::sin(ang+deg);
11789 - const int
11790 - xl = x1+(int)(l*cl), yl = y1+(int)(l*sl),
11791 - xr = x1+(int)(l*cr), yr = y1+(int)(l*sr),
11792 - xc = x1+(int)((l+1)*(cl+cr))/2, yc = y1+(int)((l+1)*(sl+sr))/2;
11793 - draw_line(x0,y0,xc,yc,color,pattern,opacity).draw_triangle(x1,y1,xl,yl,xr,yr,color,opacity);
11794 - } else draw_point(x0,y0,color,opacity);
11795 - }
11796 - return *this;
11797 - }
11798 -
11799 - //! Draw a sprite image in the instance image, at coordinates (\c x0,\c y0,\c z0,\c v0).
11800 - /**
11801 - \param sprite = sprite image.
11802 - \param x0 = X-coordinate of the sprite position in the instance image.
11803 - \param y0 = Y-coordinate of the sprite position in the instance image.
11804 - \param z0 = Z-coordinate of the sprite position in the instance image.
11805 - \param v0 = V-coordinate of the sprite position in the instance image.
11806 - \param opacity = opacity of the drawing.
11807 - \note Clipping is supported.
11808 - **/
11809 - template<typename t> CImg& draw_image(const CImg<t>& sprite,
11810 - const int x0=0,const int y0=0,const int z0=0,const int v0=0,const float opacity=1) {
11811 - if (!is_empty()) {
11812 - if (sprite.is_empty())
11813 - throw CImgArgumentException("CImg<%s>::draw_image() : Specified sprite image (%u,%u,%u,%u,%p) is empty.",
11814 - pixel_type(),sprite.width,sprite.height,sprite.depth,sprite.dim,sprite.data);
11815 - const bool bx=(x0<0), by=(y0<0), bz=(z0<0), bv=(v0<0);
11816 - const int
11817 - lX = sprite.dimx() - (x0+sprite.dimx()>dimx()?x0+sprite.dimx()-dimx():0) + (bx?x0:0),
11818 - lY = sprite.dimy() - (y0+sprite.dimy()>dimy()?y0+sprite.dimy()-dimy():0) + (by?y0:0),
11819 - lZ = sprite.dimz() - (z0+sprite.dimz()>dimz()?z0+sprite.dimz()-dimz():0) + (bz?z0:0),
11820 - lV = sprite.dimv() - (v0+sprite.dimv()>dimv()?v0+sprite.dimv()-dimv():0) + (bv?v0:0);
11821 - const t *ptrs = sprite.ptr()-(bx?x0:0)-(by?y0*sprite.dimx():0)+(bz?z0*sprite.dimx()*sprite.dimy():0)+
11822 - (bv?v0*sprite.dimx()*sprite.dimy()*sprite.dimz():0);
11823 - const unsigned int
11824 - offX = width-lX, soffX = sprite.width-lX,
11825 - offY = width*(height-lY), soffY = sprite.width*(sprite.height-lY),
11826 - offZ = width*height*(depth-lZ), soffZ = sprite.width*sprite.height*(sprite.depth-lZ);
11827 - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
11828 - T *ptrd = ptr(x0<0?0:x0,y0<0?0:y0,z0<0?0:z0,v0<0?0:v0);
11829 - if (lX>0 && lY>0 && lZ>0 && lV>0)
11830 - for (int v=0; v<lV; v++) {
11831 - for (int z=0; z<lZ; z++) {
11832 - for (int y=0; y<lY; y++) {
11833 - if (opacity>=1) for (int x=0; x<lX; x++) *(ptrd++) = (T)*(ptrs++);
11834 - else for (int x=0; x<lX; x++) { *ptrd = (T)(nopacity*(*(ptrs++)) + copacity*(*ptrd)); ptrd++; }
11835 - ptrd+=offX; ptrs+=soffX;
11836 - }
11837 - ptrd+=offY; ptrs+=soffY;
11838 - }
11839 - ptrd+=offZ; ptrs+=soffZ;
11840 - }
11841 - }
11842 - return *this;
11843 - }
11844 -
11845 -#ifndef cimg_use_visualcpp6
11846 - CImg& draw_image(const CImg& sprite,const int x0=0,const int y0=0,const int z0=0,const int v0=0,const float opacity=1) {
11847 - if (!is_empty()) {
11848 - if (sprite.is_empty())
11849 - throw CImgArgumentException("CImg<%s>::draw_image() : Specified sprite image (%u,%u,%u,%u,%p) is empty.",
11850 - pixel_type(),sprite.width,sprite.height,sprite.depth,sprite.dim,sprite.data);
11851 - if (this==&sprite) return draw_image(CImg<T>(sprite),x0,y0,z0,v0,opacity);
11852 - const bool bx=(x0<0), by=(y0<0), bz=(z0<0), bv=(v0<0);
11853 - const int
11854 - lX = sprite.dimx() - (x0+sprite.dimx()>dimx()?x0+sprite.dimx()-dimx():0) + (bx?x0:0),
11855 - lY = sprite.dimy() - (y0+sprite.dimy()>dimy()?y0+sprite.dimy()-dimy():0) + (by?y0:0),
11856 - lZ = sprite.dimz() - (z0+sprite.dimz()>dimz()?z0+sprite.dimz()-dimz():0) + (bz?z0:0),
11857 - lV = sprite.dimv() - (v0+sprite.dimv()>dimv()?v0+sprite.dimv()-dimv():0) + (bv?v0:0);
11858 - const T *ptrs = sprite.ptr()-(bx?x0:0)-(by?y0*sprite.dimx():0)+(bz?z0*sprite.dimx()*sprite.dimy():0)+
11859 - (bv?v0*sprite.dimx()*sprite.dimy()*sprite.dimz():0);
11860 - const unsigned int
11861 - offX = width-lX, soffX = sprite.width-lX,
11862 - offY = width*(height-lY), soffY = sprite.width*(sprite.height-lY),
11863 - offZ = width*height*(depth-lZ), soffZ = sprite.width*sprite.height*(sprite.depth-lZ),
11864 - slX = lX*sizeof(T);
11865 - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
11866 - T *ptrd = ptr(x0<0?0:x0,y0<0?0:y0,z0<0?0:z0,v0<0?0:v0);
11867 - if (lX>0 && lY>0 && lZ>0 && lV>0)
11868 - for (int v=0; v<lV; v++) {
11869 - for (int z=0; z<lZ; z++) {
11870 - if (opacity>=1) for (int y=0; y<lY; y++) { std::memcpy(ptrd,ptrs,slX); ptrd+=width; ptrs+=sprite.width; }
11871 - else for (int y=0; y<lY; y++) {
11872 - for (int x=0; x<lX; x++) { *ptrd = (T)(nopacity*(*(ptrs++)) + copacity*(*ptrd)); ptrd++; }
11873 - ptrd+=offX; ptrs+=soffX;
11874 - }
11875 - ptrd+=offY; ptrs+=soffY;
11876 - }
11877 - ptrd+=offZ; ptrs+=soffZ;
11878 - }
11879 - }
11880 - return *this;
11881 - }
11882 -#endif
11883 -
11884 - //! Draw a masked sprite image in the instance image, at coordinates (\c x0,\c y0,\c z0,\c v0).
11885 - /**
11886 - \param sprite = sprite image.
11887 - \param mask = mask image.
11888 - \param x0 = X-coordinate of the sprite position in the instance image.
11889 - \param y0 = Y-coordinate of the sprite position in the instance image.
11890 - \param z0 = Z-coordinate of the sprite position in the instance image.
11891 - \param v0 = V-coordinate of the sprite position in the instance image.
11892 - \param mask_valmax = Maximum pixel value of the mask image \c mask.
11893 - \param opacity = opacity of the drawing.
11894 - \note Pixel values of \c mask set the opacity of the corresponding pixels in \c sprite.
11895 - \note Clipping is supported.
11896 - \note Dimensions along x,y and z of \c sprite and \c mask must be the same.
11897 - **/
11898 - template<typename ti,typename tm> CImg& draw_image(const CImg<ti>& sprite, const CImg<tm>& mask,
11899 - const int x0=0, const int y0=0, const int z0=0, const int v0=0,
11900 - const tm mask_valmax='\1', const float opacity=1) {
11901 - if (!is_empty()) {
11902 - if (sprite.is_empty())
11903 - throw CImgArgumentException("CImg<%s>::draw_image() : Specified sprite image (%u,%u,%u,%u,%p) is empty.",
11904 - pixel_type(),sprite.width,sprite.height,sprite.depth,sprite.dim,sprite.data);
11905 - if (mask.is_empty())
11906 - throw CImgArgumentException("CImg<%s>::draw_image() : Specified mask image (%u,%u,%u,%u,%p) is empty.",
11907 - pixel_type(),mask.width,mask.height,mask.depth,mask.dim,mask.data);
11908 - if ((void*)this==(void*)&sprite) return draw_image(CImg<T>(sprite),mask,x0,y0,z0,v0);
11909 - if(mask.width!=sprite.width || mask.height!=sprite.height || mask.depth!=sprite.depth)
11910 - throw CImgArgumentException("CImg<%s>::draw_image() : Mask dimension is (%u,%u,%u,%u), while sprite is (%u,%u,%u,%u)",
11911 - pixel_type(),mask.width,mask.height,mask.depth,mask.dim,sprite.width,sprite.height,sprite.depth,sprite.dim);
11912 - const bool bx=(x0<0), by=(y0<0), bz=(z0<0), bv=(v0<0);
11913 - const int
11914 - lX = sprite.dimx() - (x0+sprite.dimx()>dimx()?x0+sprite.dimx()-dimx():0) + (bx?x0:0),
11915 - lY = sprite.dimy() - (y0+sprite.dimy()>dimy()?y0+sprite.dimy()-dimy():0) + (by?y0:0),
11916 - lZ = sprite.dimz() - (z0+sprite.dimz()>dimz()?z0+sprite.dimz()-dimz():0) + (bz?z0:0),
11917 - lV = sprite.dimv() - (v0+sprite.dimv()>dimv()?v0+sprite.dimv()-dimv():0) + (bv?v0:0);
11918 - const int coff = -(bx?x0:0)-(by?y0*mask.dimx():0)-(bz?z0*mask.dimx()*mask.dimy():0)-
11919 - (bv?v0*mask.dimx()*mask.dimy()*mask.dimz():0),
11920 - ssize = mask.dimx()*mask.dimy()*mask.dimz();
11921 - const ti *ptrs = sprite.ptr() + coff;
11922 - const tm *ptrm = mask.ptr() + coff;
11923 - const unsigned int
11924 - offX = width-lX, soffX = sprite.width-lX,
11925 - offY = width*(height-lY), soffY = sprite.width*(sprite.height-lY),
11926 - offZ = width*height*(depth-lZ), soffZ = sprite.width*sprite.height*(sprite.depth-lZ);
11927 - T *ptrd = ptr(x0<0?0:x0,y0<0?0:y0,z0<0?0:z0,v0<0?0:v0);
11928 - if (lX>0 && lY>0 && lZ>0 && lV>0)
11929 - for (int v=0; v<lV; v++) {
11930 - ptrm = mask.data + (ptrm - mask.data)%ssize;
11931 - for (int z=0; z<lZ; z++) {
11932 - for (int y=0; y<lY; y++) {
11933 - for (int x=0; x<lX; x++) {
11934 - const float mopacity = *(ptrm++)*opacity,
11935 - nopacity = cimg::abs(mopacity), copacity = mask_valmax-cimg::max(mopacity,0.0f);
11936 - *ptrd = (T)((nopacity*(*(ptrs++))+copacity*(*ptrd))/mask_valmax);
11937 - ptrd++;
11938 - }
11939 - ptrd+=offX; ptrs+=soffX; ptrm+=soffX;
11940 - }
11941 - ptrd+=offY; ptrs+=soffY; ptrm+=soffY;
11942 - }
11943 - ptrd+=offZ; ptrs+=soffZ; ptrm+=soffZ;
11944 - }
11945 - }
11946 - return *this;
11947 - }
11948 -
11949 - //! Draw a 4D filled rectangle in the instance image, at coordinates (\c x0,\c y0,\c z0,\c v0)-(\c x1,\c y1,\c z1,\c v1).
11950 - /**
11951 - \param x0 = X-coordinate of the upper-left rectangle corner in the instance image.
11952 - \param y0 = Y-coordinate of the upper-left rectangle corner in the instance image.
11953 - \param z0 = Z-coordinate of the upper-left rectangle corner in the instance image.
11954 - \param v0 = V-coordinate of the upper-left rectangle corner in the instance image.
11955 - \param x1 = X-coordinate of the lower-right rectangle corner in the instance image.
11956 - \param y1 = Y-coordinate of the lower-right rectangle corner in the instance image.
11957 - \param z1 = Z-coordinate of the lower-right rectangle corner in the instance image.
11958 - \param v1 = V-coordinate of the lower-right rectangle corner in the instance image.
11959 - \param val = scalar value used to fill the rectangle area.
11960 - \param opacity = opacity of the drawing.
11961 - \note Clipping is supported.
11962 - **/
11963 - CImg& draw_rectangle(const int x0,const int y0,const int z0,const int v0,
11964 - const int x1,const int y1,const int z1,const int v1,
11965 - const T& val,const float opacity=1.0f) {
11966 - if (!is_empty()) {
11967 - const bool bx=(x0<x1), by=(y0<y1), bz=(z0<z1), bv=(v0<v1);
11968 - const int nx0=bx?x0:x1, nx1=bx?x1:x0, ny0=by?y0:y1, ny1=by?y1:y0, nz0=bz?z0:z1, nz1=bz?z1:z0, nv0=bv?v0:v1, nv1=bv?v1:v0;
11969 - const int
11970 - lX = (1+nx1-nx0) + (nx1>=dimx()?dimx()-1-nx1:0) + (nx0<0?nx0:0),
11971 - lY = (1+ny1-ny0) + (ny1>=dimy()?dimy()-1-ny1:0) + (ny0<0?ny0:0),
11972 - lZ = (1+nz1-nz0) + (nz1>=dimz()?dimz()-1-nz1:0) + (nz0<0?nz0:0),
11973 - lV = (1+nv1-nv0) + (nv1>=dimv()?dimv()-1-nv1:0) + (nv0<0?nv0:0);
11974 - const unsigned int offX = width-lX, offY = width*(height-lY), offZ = width*height*(depth-lZ);
11975 - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
11976 - T *ptrd = ptr(nx0<0?0:nx0,ny0<0?0:ny0,nz0<0?0:nz0,nv0<0?0:nv0);
11977 - if (lX>0 && lY>0 && lZ>0 && lV>0)
11978 - for (int v=0; v<lV; v++) {
11979 - for (int z=0; z<lZ; z++) {
11980 - for (int y=0; y<lY; y++) {
11981 - if (opacity>=1) {
11982 - if (sizeof(T)!=1) { for (int x=0; x<lX; x++) *(ptrd++) = val; ptrd+=offX; }
11983 - else { std::memset(ptrd,(int)val,lX); ptrd+=width; }
11984 - } else { for (int x=0; x<lX; x++) { *ptrd = (T)(nopacity*val+copacity*(*ptrd)); ptrd++; } ptrd+=offX; }
11985 - }
11986 - ptrd+=offY;
11987 - }
11988 - ptrd+=offZ;
11989 - }
11990 - }
11991 - return *this;
11992 - }
11993 -
11994 - //! Draw a 3D filled colored rectangle in the instance image, at coordinates (\c x0,\c y0,\c z0)-(\c x1,\c y1,\c z1).
11995 - /**
11996 - \param x0 = X-coordinate of the upper-left rectangle corner in the instance image.
11997 - \param y0 = Y-coordinate of the upper-left rectangle corner in the instance image.
11998 - \param z0 = Z-coordinate of the upper-left rectangle corner in the instance image.
11999 - \param x1 = X-coordinate of the lower-right rectangle corner in the instance image.
12000 - \param y1 = Y-coordinate of the lower-right rectangle corner in the instance image.
12001 - \param z1 = Z-coordinate of the lower-right rectangle corner in the instance image.
12002 - \param color = array of dimv() values of type \c T, defining the drawing color.
12003 - \param opacity = opacity of the drawing.
12004 - \note Clipping is supported.
12005 - **/
12006 - CImg& draw_rectangle(const int x0,const int y0,const int z0,
12007 - const int x1,const int y1,const int z1,
12008 - const T *const color,const float opacity=1) {
12009 - if (!color) throw CImgArgumentException("CImg<%s>::draw_rectangle : specified color is (null)",pixel_type());
12010 - cimg_forV(*this,k) draw_rectangle(x0,y0,z0,k,x1,y1,z1,k,color[k],opacity);
12011 - return *this;
12012 - }
12013 -
12014 - //! Draw a 2D filled colored rectangle in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1).
12015 - /**
12016 - \param x0 = X-coordinate of the upper-left rectangle corner in the instance image.
12017 - \param y0 = Y-coordinate of the upper-left rectangle corner in the instance image.
12018 - \param x1 = X-coordinate of the lower-right rectangle corner in the instance image.
12019 - \param y1 = Y-coordinate of the lower-right rectangle corner in the instance image.
12020 - \param color = array of dimv() values of type \c T, defining the drawing color.
12021 - \param opacity = opacity of the drawing.
12022 - \note Clipping is supported.
12023 - **/
12024 - CImg& draw_rectangle(const int x0,const int y0,const int x1,const int y1,
12025 - const T *const color,const float opacity=1) {
12026 - draw_rectangle(x0,y0,0,x1,y1,depth-1,color,opacity);
12027 - return *this;
12028 - }
12029 -
12030 - //! Draw a 2D filled colored triangle in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1)-(\c x2,\c y2).
12031 - /**
12032 - \param x0 = X-coordinate of the first corner in the instance image.
12033 - \param y0 = Y-coordinate of the first corner in the instance image.
12034 - \param x1 = X-coordinate of the second corner in the instance image.
12035 - \param y1 = Y-coordinate of the second corner in the instance image.
12036 - \param x2 = X-coordinate of the third corner in the instance image.
12037 - \param y2 = Y-coordinate of the third corner in the instance image.
12038 - \param color = array of dimv() values of type \c T, defining the drawing color.
12039 - \param opacity = opacity of the drawing (<1)
12040 - \param brightness = brightness of the drawing (in [0,1])
12041 - \note Clipping is supported.
12042 - **/
12043 - CImg& draw_triangle(const int x0,const int y0,
12044 - const int x1,const int y1,
12045 - const int x2,const int y2,
12046 - const T *const color,
12047 - const float opacity=1,
12048 - const float brightness=1) {
12049 - draw_scanline(color,opacity);
12050 - int nx0 = x0, ny0 = y0, nx1 = x1, ny1 = y1, nx2 = x2, ny2 = y2;
12051 - if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1);
12052 - if (ny0>ny2) cimg::swap(nx0,nx2,ny0,ny2);
12053 - if (ny1>ny2) cimg::swap(nx1,nx2,ny1,ny2);
12054 - if (ny0>=dimy() || ny2<0) return *this;
12055 - const float
12056 - p1 = (ny1-ny0)?(nx1-nx0)/(float)(ny1-ny0):(nx1-nx0),
12057 - p2 = (ny2-ny0)?(nx2-nx0)/(float)(ny2-ny0):(nx2-nx0),
12058 - p3 = (ny2-ny1)?(nx2-nx1)/(float)(ny2-ny1):(nx2-nx1);
12059 - float xleft = (float)nx0, xright = xleft, pleft = (p1<p2)?p1:p2, pright = (p1<p2)?p2:p1;
12060 - if (ny0<0) { xleft-=ny0*pleft; xright-=ny0*pright; }
12061 - const int ya = ny1>dimy()?height:ny1;
12062 - for (int y=ny0<0?0:ny0; y<ya; y++) {
12063 - draw_scanline((int)xleft,(int)xright,y,color,opacity,brightness);
12064 - xleft+=pleft; xright+=pright;
12065 - }
12066 - if (p1<p2) { xleft=(float)nx1; pleft=p3; if (ny1<0) xleft-=ny1*pleft; }
12067 - else { xright=(float)nx1; pright=p3; if (ny1<0) xright-=ny1*pright; }
12068 - const int yb = ny2>=dimy()?height-1:ny2;
12069 - for (int yy=ny1<0?0:ny1; yy<=yb; yy++) {
12070 - draw_scanline((int)xleft,(int)xright,yy,color,opacity,brightness);
12071 - xleft+=pleft; xright+=pright;
12072 - }
12073 - return *this;
12074 - }
12075 -
12076 - //! Draw a 2D Gouraud-filled triangle in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1)-(\c x2,\c y2).
12077 - /**
12078 - \param x0 = X-coordinate of the first corner in the instance image.
12079 - \param y0 = Y-coordinate of the first corner in the instance image.
12080 - \param x1 = X-coordinate of the second corner in the instance image.
12081 - \param y1 = Y-coordinate of the second corner in the instance image.
12082 - \param x2 = X-coordinate of the third corner in the instance image.
12083 - \param y2 = Y-coordinate of the third corner in the instance image.
12084 - \param color = array of dimv() values of type \c T, defining the global drawing color.
12085 - \param c0 = brightness of the first corner.
12086 - \param c1 = brightness of the second corner.
12087 - \param c2 = brightness of the third corner.
12088 - \param opacity = opacity of the drawing.
12089 - \note Clipping is supported.
12090 - **/
12091 - CImg& draw_triangle(const int x0, const int y0,
12092 - const int x1, const int y1,
12093 - const int x2, const int y2,
12094 - const T *const color,
12095 - const float c0, const float c1, const float c2,
12096 - const float opacity=1) {
12097 - if (!is_empty()) {
12098 - int nx0=x0,ny0=y0,nx1=x1,ny1=y1,nx2=x2,ny2=y2,whz=width*height*depth;
12099 - float nc0=c0,nc1=c1,nc2=c2;
12100 - if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1,nc0,nc1);
12101 - if (ny0>ny2) cimg::swap(nx0,nx2,ny0,ny2,nc0,nc2);
12102 - if (ny1>ny2) cimg::swap(nx1,nx2,ny1,ny2,nc1,nc2);
12103 - if (ny0>=dimy() || ny2<0) return *this;
12104 - const float
12105 - p1 = (ny1-ny0)?(nx1-nx0)/(float)(ny1-ny0):(nx1-nx0),
12106 - p2 = (ny2-ny0)?(nx2-nx0)/(float)(ny2-ny0):(nx2-nx0),
12107 - p3 = (ny2-ny1)?(nx2-nx1)/(float)(ny2-ny1):(nx2-nx1),
12108 - cp1 = (ny1-ny0)?(nc1-nc0)/(float)(ny1-ny0):0,
12109 - cp2 = (ny2-ny0)?(nc2-nc0)/(float)(ny2-ny0):0,
12110 - cp3 = (ny2-ny1)?(nc2-nc1)/(float)(ny2-ny1):0;
12111 - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
12112 - float pleft,pright,cpleft,cpright,xleft=(float)nx0,xright=xleft,cleft=nc0,cright=cleft;
12113 - if (p1<p2) { pleft=p1; pright=p2; cpleft=cp1; cpright=cp2; }
12114 - else { pleft=p2; pright=p1; cpleft=cp2; cpright=cp1; }
12115 - if (ny0<0) { xleft-=ny0*pleft; xright-=ny0*pright; cleft-=ny0*cpleft; cright-=ny0*cpright; }
12116 - const int ya = ny1<dimy()?ny1:height;
12117 - for (int y=(ny0<0?0:ny0); y<ya; y++) {
12118 - const int dx = (int)xright-(int)xleft;
12119 - const float
12120 - cp = dx?(cright-cleft)/dx:0,
12121 - ci = (xleft>=0)?cleft:(cleft-xleft*cp);
12122 - const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright<dimx())?(int)xright:(width-1);
12123 - if (xmin<=xmax) {
12124 - const int offx=whz-xmax+xmin-1;
12125 - T* ptrd = ptr(xmin,y,0,0);
12126 - if (opacity>=1) cimg_forV(*this,k) {
12127 - const T col = color[k];
12128 - float c=ci;
12129 - for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(c*col); c+=cp; }
12130 - ptrd+=offx;
12131 - } else cimg_forV(*this,k) {
12132 - const T col = color[k];
12133 - float c=ci;
12134 - for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*c*col+copacity*(*ptrd)); ptrd++; c+=cp; }
12135 - ptrd+=offx;
12136 - }
12137 - }
12138 - xleft+=pleft; xright+=pright; cleft+=cpleft; cright+=cpright;
12139 - }
12140 -
12141 - if (p1<p2) {
12142 - xleft=(float)nx1; pleft=p3; cleft=nc1; cpleft=cp3;
12143 - if (ny1<0) { xleft-=ny1*pleft; cleft-=ny1*cpleft; }
12144 - } else {
12145 - xright=(float)nx1; pright=p3; cright=nc1; cpright=cp3;
12146 - if (ny1<0) { xright-=ny1*pright; cright-=ny1*cpright; }
12147 - }
12148 - const int yb = ny2>=dimy()?(height-1):ny2;
12149 - for (int yy=(ny1<0?0:ny1); yy<=yb; yy++) {
12150 - const int dx = (int)xright-(int)xleft;
12151 - const float
12152 - cp = dx?(cright-cleft)/dx:0,
12153 - ci = (xleft>=0)?cleft:(cleft-xleft*cp);
12154 - const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright<dimx())?(int)xright:(width-1);
12155 - if (xmin<=xmax) {
12156 - const int offx=whz-xmax+xmin-1;
12157 - T* ptrd = ptr(xmin,yy,0,0);
12158 - if (opacity>=1) cimg_forV(*this,k) {
12159 - const T col = color[k];
12160 - float c=ci;
12161 - for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(c*col); c+=cp; }
12162 - ptrd+=offx;
12163 - } else cimg_forV(*this,k) {
12164 - const T col = color[k];
12165 - float c=ci;
12166 - for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*c*col+copacity*(*ptrd)); ptrd++; c+=cp; }
12167 - ptrd+=offx;
12168 - }
12169 - }
12170 - xleft+=pleft; xright+=pright; cleft+=cpleft; cright+=cpright;
12171 - }
12172 - }
12173 - return *this;
12174 - }
12175 -
12176 - //! Draw a 2D phong-shaded triangle in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1)-(\c x2,\c y2).
12177 - /**
12178 - \param x0 = X-coordinate of the first corner in the instance image.
12179 - \param y0 = Y-coordinate of the first corner in the instance image.
12180 - \param x1 = X-coordinate of the second corner in the instance image.
12181 - \param y1 = Y-coordinate of the second corner in the instance image.
12182 - \param x2 = X-coordinate of the third corner in the instance image.
12183 - \param y2 = Y-coordinate of the third corner in the instance image.
12184 - \param color = array of dimv() values of type \c T, defining the global drawing color.
12185 - \param light = light image.
12186 - \param lx0 = X-coordinate of the first corner in the light image.
12187 - \param ly0 = Y-coordinate of the first corner in the light image.
12188 - \param lx1 = X-coordinate of the second corner in the light image.
12189 - \param ly1 = Y-coordinate of the second corner in the light image.
12190 - \param lx2 = X-coordinate of the third corner in the light image.
12191 - \param ly2 = Y-coordinate of the third corner in the light image.
12192 - \param opacity = opacity of the drawing.
12193 - \note Clipping is supported, but texture coordinates do not support clipping.
12194 - **/
12195 - template<typename t> CImg& draw_triangle(const int x0,const int y0,
12196 - const int x1,const int y1,
12197 - const int x2,const int y2,
12198 - const T *const color,
12199 - const CImg<t>& light,
12200 - const int lx0,const int ly0,
12201 - const int lx1,const int ly1,
12202 - const int lx2,const int ly2,
12203 - const float opacity=1.0f) {
12204 - if (!is_empty()) {
12205 - if (light.is_empty())
12206 - throw CImgArgumentException("CImg<%s>::draw_triangle() : Specified light texture (%u,%u,%u,%u,%p) is empty.",
12207 - pixel_type(),light.width,light.height,light.depth,light.dim,light.data);
12208 - int nx0=x0,ny0=y0,nx1=x1,ny1=y1,nx2=x2,ny2=y2,nlx0=lx0,nly0=ly0,nlx1=lx1,nly1=ly1,nlx2=lx2,nly2=ly2,whz=width*height*depth;
12209 - if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1,nlx0,nlx1,nly0,nly1);
12210 - if (ny0>ny2) cimg::swap(nx0,nx2,ny0,ny2,nlx0,nlx2,nly0,nly2);
12211 - if (ny1>ny2) cimg::swap(nx1,nx2,ny1,ny2,nlx1,nlx2,nly1,nly2);
12212 - if (ny0>=dimy() || ny2<0) return *this;
12213 - const float
12214 - p1 = (ny1-ny0)?(nx1-nx0)/(float)(ny1-ny0):(nx1-nx0),
12215 - p2 = (ny2-ny0)?(nx2-nx0)/(float)(ny2-ny0):(nx2-nx0),
12216 - p3 = (ny2-ny1)?(nx2-nx1)/(float)(ny2-ny1):(nx2-nx1),
12217 - lpx1 = (ny1-ny0)?(nlx1-nlx0)/(float)(ny1-ny0):0,
12218 - lpy1 = (ny1-ny0)?(nly1-nly0)/(float)(ny1-ny0):0,
12219 - lpx2 = (ny2-ny0)?(nlx2-nlx0)/(float)(ny2-ny0):0,
12220 - lpy2 = (ny2-ny0)?(nly2-nly0)/(float)(ny2-ny0):0,
12221 - lpx3 = (ny2-ny1)?(nlx2-nlx1)/(float)(ny2-ny1):0,
12222 - lpy3 = (ny2-ny1)?(nly2-nly1)/(float)(ny2-ny1):0;
12223 - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
12224 - float pleft,pright,lpxleft,lpyleft,lpxright,lpyright,
12225 - xleft=(float)nx0,xright=xleft,lxleft=(float)nlx0,lyleft=(float)nly0,lxright=lxleft,lyright=lyleft;
12226 - if (p1<p2) { pleft=p1; pright=p2; lpxleft=lpx1; lpyleft=lpy1; lpxright=lpx2; lpyright=lpy2; }
12227 - else { pleft=p2; pright=p1; lpxleft=lpx2; lpyleft=lpy2; lpxright=lpx1; lpyright=lpy1; }
12228 - if (ny0<0) { xleft-=ny0*pleft; xright-=ny0*pright; lxleft-=ny0*lpxleft; lyleft-=ny0*lpyleft;
12229 - lxright-=ny0*lpxright; lyright-=ny0*lpyright; }
12230 - const int ya = ny1<dimy()?ny1:height;
12231 - for (int y=(ny0<0?0:ny0); y<ya; y++) {
12232 - const int dx = (int)xright-(int)xleft;
12233 - const float
12234 - lpx = dx?((int)lxright-(int)lxleft)/(float)dx:0,
12235 - lpy = dx?((int)lyright-(int)lyleft)/(float)dx:0,
12236 - lxi = (float)((xleft>=0)?(int)lxleft:(int)(lxleft-(int)xleft*lpx)),
12237 - lyi = (float)((xleft>=0)?(int)lyleft:(int)(lyleft-(int)xleft*lpy));
12238 - const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright<dimx())?(int)xright:(width-1);
12239 - if (xmin<=xmax) {
12240 - const int offx=whz-xmax+xmin-1;
12241 - T* ptrd = ptr(xmin,y,0,0);
12242 - if (opacity>=1) cimg_forV(*this,k) {
12243 - float lx=lxi, ly=lyi;
12244 - for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(light((unsigned int)lx,(unsigned int)ly)*color[k]); lx+=lpx; ly+=lpy; }
12245 - ptrd+=offx;
12246 - } else cimg_forV(*this,k) {
12247 - float lx=lxi, ly=lyi;
12248 - for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*light((unsigned int)lx,(unsigned int)ly)*color[k]+copacity*(*ptrd)); ptrd++; lx+=lpx; ly+=lpy; }
12249 - ptrd+=offx;
12250 - }
12251 - }
12252 - xleft+=pleft; xright+=pright; lxleft+=lpxleft; lyleft+=lpyleft; lxright+=lpxright; lyright+=lpyright;
12253 - }
12254 -
12255 - if (p1<p2) {
12256 - xleft=(float)nx1; pleft=p3; lxleft=(float)nlx1; lyleft=(float)nly1; lpxleft=lpx3; lpyleft=lpy3;
12257 - if (ny1<0) { xleft-=ny1*pleft; lxleft-=ny1*lpxleft; lyleft-=ny1*lpyleft; }
12258 - } else {
12259 - xright=(float)nx1; pright=p3; lxright=(float)nlx1; lyright=(float)nly1; lpxright=lpx3; lpyright=lpy3;
12260 - if (ny1<0) { xright-=ny1*pright; lxright-=ny1*lpxright; lyright-=ny1*lpyright; }
12261 - }
12262 - const int yb = ny2>=dimy()?(height-1):ny2;
12263 - for (int yy=(ny1<0?0:ny1); yy<=yb; yy++) {
12264 - const int dx = (int)xright-(int)xleft;
12265 - const float
12266 - lpx = dx?((int)lxright-(int)lxleft)/(float)dx:0,
12267 - lpy = dx?((int)lyright-(int)lyleft)/(float)dx:0,
12268 - lxi = (float)((xleft>=0)?(int)lxleft:(int)(lxleft-(int)xleft*lpx)),
12269 - lyi = (float)((xleft>=0)?(int)lyleft:(int)(lyleft-(int)xleft*lpy));
12270 - const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright<dimx())?(int)xright:(width-1);
12271 - if (xmin<=xmax) {
12272 - const int offx=whz-xmax+xmin-1;
12273 - T* ptrd = ptr(xmin,yy,0,0);
12274 - if (opacity>=1) cimg_forV(*this,k) {
12275 - float lx=lxi, ly=lyi;
12276 - for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(light((unsigned int)lx,(unsigned int)ly)*color[k]); lx+=lpx; ly+=lpy; }
12277 - ptrd+=offx;
12278 - } else cimg_forV(*this,k) {
12279 - float lx=lxi, ly=lyi;
12280 - for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*light((unsigned int)lx,(unsigned int)ly)*color[k]+copacity*(*ptrd)); ptrd++; lx+=lpx; ly+=lpy; }
12281 - ptrd+=offx;
12282 - }
12283 - }
12284 - xleft+=pleft; xright+=pright; lxleft+=lpxleft; lyleft+=lpyleft; lxright+=lpxright; lyright+=lpyright;
12285 - }
12286 - }
12287 - return *this;
12288 - }
12289 -
12290 - //! Draw a 2D textured triangle in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1)-(\c x2,\c y2).
12291 - /**
12292 - \param x0 = X-coordinate of the first corner in the instance image.
12293 - \param y0 = Y-coordinate of the first corner in the instance image.
12294 - \param x1 = X-coordinate of the second corner in the instance image.
12295 - \param y1 = Y-coordinate of the second corner in the instance image.
12296 - \param x2 = X-coordinate of the third corner in the instance image.
12297 - \param y2 = Y-coordinate of the third corner in the instance image.
12298 - \param texture = texture image used to fill the triangle.
12299 - \param tx0 = X-coordinate of the first corner in the texture image.
12300 - \param ty0 = Y-coordinate of the first corner in the texture image.
12301 - \param tx1 = X-coordinate of the second corner in the texture image.
12302 - \param ty1 = Y-coordinate of the second corner in the texture image.
12303 - \param tx2 = X-coordinate of the third corner in the texture image.
12304 - \param ty2 = Y-coordinate of the third corner in the texture image.
12305 - \param opacity = opacity of the drawing.
12306 - \param brightness = brightness of the drawing.
12307 - \note Clipping is supported, but texture coordinates do not support clipping.
12308 - **/
12309 - template<typename t> CImg& draw_triangle(const int x0,const int y0,
12310 - const int x1,const int y1,
12311 - const int x2,const int y2,
12312 - const CImg<t>& texture,
12313 - const int tx0,const int ty0,
12314 - const int tx1,const int ty1,
12315 - const int tx2,const int ty2,
12316 - const float opacity=1.0f, const float brightness=1.0f) {
12317 - if (!is_empty()) {
12318 - if (texture.is_empty())
12319 - throw CImgArgumentException("CImg<%s>::draw_triangle() : Specified texture (%u,%u,%u,%u,%p) is empty.",
12320 - pixel_type(),texture.width,texture.height,texture.depth,texture.dim,texture.data);
12321 - int nx0=x0,ny0=y0,nx1=x1,ny1=y1,nx2=x2,ny2=y2,ntx0=tx0,nty0=ty0,ntx1=tx1,nty1=ty1,ntx2=tx2,nty2=ty2,whz=width*height*depth;
12322 - if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1,ntx0,ntx1,nty0,nty1);
12323 - if (ny0>ny2) cimg::swap(nx0,nx2,ny0,ny2,ntx0,ntx2,nty0,nty2);
12324 - if (ny1>ny2) cimg::swap(nx1,nx2,ny1,ny2,ntx1,ntx2,nty1,nty2);
12325 - if (ny0>=dimy() || ny2<0) return *this;
12326 - const float
12327 - p1 = (ny1-ny0)?(nx1-nx0)/(float)(ny1-ny0):(nx1-nx0),
12328 - p2 = (ny2-ny0)?(nx2-nx0)/(float)(ny2-ny0):(nx2-nx0),
12329 - p3 = (ny2-ny1)?(nx2-nx1)/(float)(ny2-ny1):(nx2-nx1),
12330 - tpx1 = (ny1-ny0)?(ntx1-ntx0)/(float)(ny1-ny0):0,
12331 - tpy1 = (ny1-ny0)?(nty1-nty0)/(float)(ny1-ny0):0,
12332 - tpx2 = (ny2-ny0)?(ntx2-ntx0)/(float)(ny2-ny0):0,
12333 - tpy2 = (ny2-ny0)?(nty2-nty0)/(float)(ny2-ny0):0,
12334 - tpx3 = (ny2-ny1)?(ntx2-ntx1)/(float)(ny2-ny1):0,
12335 - tpy3 = (ny2-ny1)?(nty2-nty1)/(float)(ny2-ny1):0;
12336 - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
12337 - float pleft,pright,tpxleft,tpyleft,tpxright,tpyright,
12338 - xleft=(float)nx0,xright=xleft,txleft=(float)ntx0,tyleft=(float)nty0,txright=txleft,tyright=tyleft;
12339 - if (p1<p2) { pleft=p1; pright=p2; tpxleft=tpx1; tpyleft=tpy1; tpxright=tpx2; tpyright=tpy2; }
12340 - else { pleft=p2; pright=p1; tpxleft=tpx2; tpyleft=tpy2; tpxright=tpx1; tpyright=tpy1; }
12341 - if (ny0<0) { xleft-=ny0*pleft; xright-=ny0*pright; txleft-=ny0*tpxleft; tyleft-=ny0*tpyleft;
12342 - txright-=ny0*tpxright; tyright-=ny0*tpyright; }
12343 - const int ya = ny1<dimy()?ny1:height;
12344 - for (int y=(ny0<0?0:ny0); y<ya; y++) {
12345 - const int dx = (int)xright-(int)xleft;
12346 - const float
12347 - tpx = dx?((int)txright-(int)txleft)/(float)dx:0,
12348 - tpy = dx?((int)tyright-(int)tyleft)/(float)dx:0,
12349 - txi = (float)((xleft>=0)?(int)txleft:(int)(txleft-(int)xleft*tpx)),
12350 - tyi = (float)((xleft>=0)?(int)tyleft:(int)(tyleft-(int)xleft*tpy));
12351 - const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright<dimx())?(int)xright:(width-1);
12352 - if (xmin<=xmax) {
12353 - const int offx=whz-xmax+xmin-1;
12354 - T* ptrd = ptr(xmin,y,0,0);
12355 - if (opacity>=1) cimg_forV(*this,k) {
12356 - float tx=txi, ty=tyi;
12357 - for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(brightness*texture((unsigned int)tx,(unsigned int)ty,0,k)); tx+=tpx; ty+=tpy; }
12358 - ptrd+=offx;
12359 - } else cimg_forV(*this,k) {
12360 - float tx=txi, ty=tyi;
12361 - for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*brightness*texture((unsigned int)tx,(unsigned int)ty,0,k)+copacity*(*ptrd)); ptrd++; tx+=tpx; ty+=tpy; }
12362 - ptrd+=offx;
12363 - }
12364 - }
12365 - xleft+=pleft; xright+=pright; txleft+=tpxleft; tyleft+=tpyleft; txright+=tpxright; tyright+=tpyright;
12366 - }
12367 -
12368 - if (p1<p2) {
12369 - xleft=(float)nx1; pleft=p3; txleft=(float)ntx1; tyleft=(float)nty1; tpxleft=tpx3; tpyleft=tpy3;
12370 - if (ny1<0) { xleft-=ny1*pleft; txleft-=ny1*tpxleft; tyleft-=ny1*tpyleft; }
12371 - } else {
12372 - xright=(float)nx1; pright=p3; txright=(float)ntx1; tyright=(float)nty1; tpxright=tpx3; tpyright=tpy3;
12373 - if (ny1<0) { xright-=ny1*pright; txright-=ny1*tpxright; tyright-=ny1*tpyright; }
12374 - }
12375 - const int yb = ny2>=dimy()?(height-1):ny2;
12376 - for (int yy=(ny1<0?0:ny1); yy<=yb; yy++) {
12377 - const int dx = (int)xright-(int)xleft;
12378 - const float
12379 - tpx = dx?((int)txright-(int)txleft)/(float)dx:0,
12380 - tpy = dx?((int)tyright-(int)tyleft)/(float)dx:0,
12381 - txi = (float)((xleft>=0)?(int)txleft:(int)(txleft-(int)xleft*tpx)),
12382 - tyi = (float)((xleft>=0)?(int)tyleft:(int)(tyleft-(int)xleft*tpy));
12383 - const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright<dimx())?(int)xright:(width-1);
12384 - if (xmin<=xmax) {
12385 - const int offx=whz-xmax+xmin-1;
12386 - T* ptrd = ptr(xmin,yy,0,0);
12387 - if (opacity>=1) cimg_forV(*this,k) {
12388 - float tx=txi, ty=tyi;
12389 - for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(brightness*texture((unsigned int)tx,(unsigned int)ty,0,k)); tx+=tpx; ty+=tpy; }
12390 - ptrd+=offx;
12391 - } else cimg_forV(*this,k) {
12392 - float tx=txi, ty=tyi;
12393 - for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*brightness*texture((unsigned int)tx,(unsigned int)ty,0,k)+copacity*(*ptrd)); ptrd++; tx+=tpx; ty+=tpy; }
12394 - ptrd+=offx;
12395 - }
12396 - }
12397 - xleft+=pleft; xright+=pright; txleft+=tpxleft; tyleft+=tpyleft; txright+=tpxright; tyright+=tpyright;
12398 - }
12399 - }
12400 - return *this;
12401 - }
12402 -
12403 - //! Draw a 2D textured triangle with Gouraud-Shading in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1)-(\c x2,\c y2).
12404 - /**
12405 - \param x0 = X-coordinate of the first corner in the instance image.
12406 - \param y0 = Y-coordinate of the first corner in the instance image.
12407 - \param x1 = X-coordinate of the second corner in the instance image.
12408 - \param y1 = Y-coordinate of the second corner in the instance image.
12409 - \param x2 = X-coordinate of the third corner in the instance image.
12410 - \param y2 = Y-coordinate of the third corner in the instance image.
12411 - \param texture = texture image used to fill the triangle.
12412 - \param tx0 = X-coordinate of the first corner in the texture image.
12413 - \param ty0 = Y-coordinate of the first corner in the texture image.
12414 - \param tx1 = X-coordinate of the second corner in the texture image.
12415 - \param ty1 = Y-coordinate of the second corner in the texture image.
12416 - \param tx2 = X-coordinate of the third corner in the texture image.
12417 - \param ty2 = Y-coordinate of the third corner in the texture image.
12418 - \param c0 = brightness value of the first corner.
12419 - \param c1 = brightness value of the second corner.
12420 - \param c2 = brightness value of the third corner.
12421 - \param opacity = opacity of the drawing.
12422 - \note Clipping is supported, but texture coordinates do not support clipping.
12423 - **/
12424 - template<typename t> CImg& draw_triangle(const int x0,const int y0,
12425 - const int x1,const int y1,
12426 - const int x2,const int y2,
12427 - const CImg<t>& texture,
12428 - const int tx0,const int ty0,
12429 - const int tx1,const int ty1,
12430 - const int tx2,const int ty2,
12431 - const float c0,const float c1,const float c2,
12432 - const float opacity=1) {
12433 - if (!is_empty()) {
12434 - if (texture.is_empty())
12435 - throw CImgArgumentException("CImg<%s>::draw_triangle() : Specified texture (%u,%u,%u,%u,%p) is empty.",
12436 - pixel_type(),texture.width,texture.height,texture.depth,texture.dim,texture.data);
12437 - int nx0=x0,ny0=y0,nx1=x1,ny1=y1,nx2=x2,ny2=y2,ntx0=tx0,nty0=ty0,ntx1=tx1,nty1=ty1,ntx2=tx2,nty2=ty2,whz=width*height*depth;
12438 - float nc0=c0,nc1=c1,nc2=c2;
12439 - if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1,ntx0,ntx1,nty0,nty1,nc0,nc1);
12440 - if (ny0>ny2) cimg::swap(nx0,nx2,ny0,ny2,ntx0,ntx2,nty0,nty2,nc0,nc2);
12441 - if (ny1>ny2) cimg::swap(nx1,nx2,ny1,ny2,ntx1,ntx2,nty1,nty2,nc1,nc2);
12442 - if (ny0>=dimy() || ny2<0) return *this;
12443 - const float
12444 - p1 = (ny1-ny0)?(nx1-nx0)/(float)(ny1-ny0):(nx1-nx0),
12445 - p2 = (ny2-ny0)?(nx2-nx0)/(float)(ny2-ny0):(nx2-nx0),
12446 - p3 = (ny2-ny1)?(nx2-nx1)/(float)(ny2-ny1):(nx2-nx1),
12447 - tpx1 = (ny1-ny0)?(ntx1-ntx0)/(float)(ny1-ny0):0,
12448 - tpy1 = (ny1-ny0)?(nty1-nty0)/(float)(ny1-ny0):0,
12449 - tpx2 = (ny2-ny0)?(ntx2-ntx0)/(float)(ny2-ny0):0,
12450 - tpy2 = (ny2-ny0)?(nty2-nty0)/(float)(ny2-ny0):0,
12451 - tpx3 = (ny2-ny1)?(ntx2-ntx1)/(float)(ny2-ny1):0,
12452 - tpy3 = (ny2-ny1)?(nty2-nty1)/(float)(ny2-ny1):0,
12453 - cp1 = (ny1-ny0)?(nc1-nc0)/(float)(ny1-ny0):0,
12454 - cp2 = (ny2-ny0)?(nc2-nc0)/(float)(ny2-ny0):0,
12455 - cp3 = (ny2-ny1)?(nc2-nc1)/(float)(ny2-ny1):0;
12456 - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
12457 - float pleft,pright,tpxleft,tpyleft,tpxright,tpyright,cpleft,cpright,
12458 - xleft=(float)nx0,xright=xleft,txleft=(float)ntx0,tyleft=(float)nty0,txright=txleft,tyright=tyleft,cleft=nc0,cright=cleft;
12459 - if (p1<p2) { pleft=p1; pright=p2; tpxleft=tpx1; tpyleft=tpy1; tpxright=tpx2; tpyright=tpy2; cpleft=cp1; cpright=cp2; }
12460 - else { pleft=p2; pright=p1; tpxleft=tpx2; tpyleft=tpy2; tpxright=tpx1; tpyright=tpy1; cpleft=cp2, cpright=cp1; }
12461 - if (ny0<0) {
12462 - xleft-=ny0*pleft; xright-=ny0*pright; txleft-=ny0*tpxleft; tyleft-=ny0*tpyleft; cleft-=ny0*cpleft;
12463 - txright-=ny0*tpxright; tyright-=ny0*tpyright; cright-=ny0*cpright;
12464 - }
12465 - const int ya = ny1<dimy()?ny1:height;
12466 - for (int y=(ny0<0?0:ny0); y<ya; y++) {
12467 - const int dx = (int)xright-(int)xleft;
12468 - const float
12469 - tpx = dx?((int)txright-(int)txleft)/(float)dx:0,
12470 - tpy = dx?((int)tyright-(int)tyleft)/(float)dx:0,
12471 - cp = dx?(cright-cleft)/dx:0,
12472 - txi = (float)((xleft>=0)?(int)txleft:(int)(txleft-(int)xleft*tpx)),
12473 - tyi = (float)((xleft>=0)?(int)tyleft:(int)(tyleft-(int)xleft*tpy)),
12474 - ci = (xleft>=0)?cleft:(cleft-xleft*cp);
12475 - const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright<dimx())?(int)xright:(width-1);
12476 - if (xmin<=xmax) {
12477 - const int offx=whz-xmax+xmin-1;
12478 - T* ptrd = ptr(xmin,y,0,0);
12479 - if (opacity>=1) cimg_forV(*this,k) {
12480 - float tx=txi, ty=tyi, c=ci;
12481 - for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(c*texture((unsigned int)tx,(unsigned int)ty,0,k)); tx+=tpx; ty+=tpy; c+=cp; }
12482 - ptrd+=offx;
12483 - } else cimg_forV(*this,k) {
12484 - float tx=txi, ty=tyi, c=ci;
12485 - for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*c*texture((unsigned int)tx,(unsigned int)ty,0,k)+copacity*(*ptrd)); ptrd++; tx+=tpx; ty+=tpy; c+=cp; }
12486 - ptrd+=offx;
12487 - }
12488 - }
12489 - xleft+=pleft; xright+=pright; txleft+=tpxleft; tyleft+=tpyleft; txright+=tpxright; tyright+=tpyright; cleft+=cpleft; cright+=cpright;
12490 - }
12491 -
12492 - if (p1<p2) {
12493 - xleft=(float)nx1; pleft=p3; txleft=(float)ntx1; tyleft=(float)nty1; tpxleft=tpx3; tpyleft=tpy3; cleft=nc1; cpleft=cp3;
12494 - if (ny1<0) { xleft-=ny1*pleft; txleft-=ny1*tpxleft; tyleft-=ny1*tpyleft; cleft-=ny1*cpleft; }
12495 - } else {
12496 - xright=(float)nx1; pright=p3; txright=(float)ntx1; tyright=(float)nty1; tpxright=tpx3; tpyright=tpy3; cright=nc1; cpright=cp3;
12497 - if (ny1<0) { xright-=ny1*pright; txright-=ny1*tpxright; tyright-=ny1*tpyright; cright-=ny1*cpright; }
12498 - }
12499 - const int yb = ny2>=dimy()?(height-1):ny2;
12500 - for (int yy=(ny1<0?0:ny1); yy<=yb; yy++) {
12501 - const int dx = (int)xright-(int)xleft;
12502 - const float
12503 - tpx = dx?((int)txright-(int)txleft)/(float)dx:0,
12504 - tpy = dx?((int)tyright-(int)tyleft)/(float)dx:0,
12505 - cp = dx?(cright-cleft)/dx:0,
12506 - txi = (float)((xleft>=0)?(int)txleft:(int)(txleft-(int)xleft*tpx)),
12507 - tyi = (float)((xleft>=0)?(int)tyleft:(int)(tyleft-(int)xleft*tpy)),
12508 - ci = (xleft>=0)?cleft:(cleft-xleft*cp);
12509 - const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright<dimx())?(int)xright:(width-1);
12510 - if (xmin<=xmax) {
12511 - const int offx=whz-xmax+xmin-1;
12512 - T* ptrd = ptr(xmin,yy,0,0);
12513 - if (opacity>=1) cimg_forV(*this,k) {
12514 - float tx=txi, ty=tyi, c=ci;
12515 - for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(c*texture((unsigned int)tx,(unsigned int)ty,0,k)); tx+=tpx; ty+=tpy; c+=cp; }
12516 - ptrd+=offx;
12517 - } else cimg_forV(*this,k) {
12518 - float tx=txi, ty=tyi, c=ci;
12519 - for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*c*texture((unsigned int)tx,(unsigned int)ty,0,k)+copacity*(*ptrd)); ptrd++; tx+=tpx; ty+=tpy; c+=ci; }
12520 - ptrd+=offx;
12521 - }
12522 - }
12523 - xleft+=pleft; xright+=pright; txleft+=tpxleft; tyleft+=tpyleft; txright+=tpxright; tyright+=tpyright; cleft+=cpleft; cright+=cpright;
12524 - }
12525 - }
12526 - return *this;
12527 - }
12528 -
12529 - //! Draw a phong-shaded 2D textured triangle in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1)-(\c x2,\c y2).
12530 - /**
12531 - \param x0 = X-coordinate of the first corner in the instance image.
12532 - \param y0 = Y-coordinate of the first corner in the instance image.
12533 - \param x1 = X-coordinate of the second corner in the instance image.
12534 - \param y1 = Y-coordinate of the second corner in the instance image.
12535 - \param x2 = X-coordinate of the third corner in the instance image.
12536 - \param y2 = Y-coordinate of the third corner in the instance image.
12537 - \param texture = texture image used to fill the triangle.
12538 - \param tx0 = X-coordinate of the first corner in the texture image.
12539 - \param ty0 = Y-coordinate of the first corner in the texture image.
12540 - \param tx1 = X-coordinate of the second corner in the texture image.
12541 - \param ty1 = Y-coordinate of the second corner in the texture image.
12542 - \param tx2 = X-coordinate of the third corner in the texture image.
12543 - \param ty2 = Y-coordinate of the third corner in the texture image.
12544 - \param light = light image.
12545 - \param lx0 = X-coordinate of the first corner in the light image.
12546 - \param ly0 = Y-coordinate of the first corner in the light image.
12547 - \param lx1 = X-coordinate of the second corner in the light image.
12548 - \param ly1 = Y-coordinate of the second corner in the light image.
12549 - \param lx2 = X-coordinate of the third corner in the light image.
12550 - \param ly2 = Y-coordinate of the third corner in the light image.
12551 - \param opacity = opacity of the drawing.
12552 - \note Clipping is supported, but texture coordinates do not support clipping.
12553 - **/
12554 - template<typename t, typename tl> CImg& draw_triangle(const int x0,const int y0,
12555 - const int x1,const int y1,
12556 - const int x2,const int y2,
12557 - const CImg<t>& texture,
12558 - const int tx0,const int ty0,
12559 - const int tx1,const int ty1,
12560 - const int tx2,const int ty2,
12561 - const CImg<tl>& light,
12562 - const int lx0,const int ly0,
12563 - const int lx1,const int ly1,
12564 - const int lx2,const int ly2,
12565 - const float opacity=1.0f) {
12566 - if (!is_empty()) {
12567 - if (texture.is_empty())
12568 - throw CImgArgumentException("CImg<%s>::draw_triangle() : Specified texture (%u,%u,%u,%u,%p) is empty.",
12569 - pixel_type(),texture.width,texture.height,texture.depth,texture.dim,texture.data);
12570 - if (light.is_empty())
12571 - throw CImgArgumentException("CImg<%s>::draw_triangle() : Specified light (%u,%u,%u,%u,%p) is empty.",
12572 - pixel_type(),light.width,light.height,light.depth,light.dim,light.data);
12573 - int
12574 - nx0=x0,ny0=y0,nx1=x1,ny1=y1,nx2=x2,ny2=y2,
12575 - ntx0=tx0,nty0=ty0,ntx1=tx1,nty1=ty1,ntx2=tx2,nty2=ty2,
12576 - nlx0=lx0,nly0=ly0,nlx1=lx1,nly1=ly1,nlx2=lx2,nly2=ly2,
12577 - whz=width*height*depth;
12578 - if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1,ntx0,ntx1,nty0,nty1,nlx0,nlx1,nly0,nly1);
12579 - if (ny0>ny2) cimg::swap(nx0,nx2,ny0,ny2,ntx0,ntx2,nty0,nty2,nlx0,nlx2,nly0,nly2);
12580 - if (ny1>ny2) cimg::swap(nx1,nx2,ny1,ny2,ntx1,ntx2,nty1,nty2,nlx1,nlx2,nly1,nly2);
12581 - if (ny0>=dimy() || ny2<0) return *this;
12582 - const float
12583 - p1 = (ny1-ny0)?(nx1-nx0)/(float)(ny1-ny0):(nx1-nx0),
12584 - p2 = (ny2-ny0)?(nx2-nx0)/(float)(ny2-ny0):(nx2-nx0),
12585 - p3 = (ny2-ny1)?(nx2-nx1)/(float)(ny2-ny1):(nx2-nx1),
12586 - tpx1 = (ny1-ny0)?(ntx1-ntx0)/(float)(ny1-ny0):0,
12587 - tpy1 = (ny1-ny0)?(nty1-nty0)/(float)(ny1-ny0):0,
12588 - tpx2 = (ny2-ny0)?(ntx2-ntx0)/(float)(ny2-ny0):0,
12589 - tpy2 = (ny2-ny0)?(nty2-nty0)/(float)(ny2-ny0):0,
12590 - tpx3 = (ny2-ny1)?(ntx2-ntx1)/(float)(ny2-ny1):0,
12591 - tpy3 = (ny2-ny1)?(nty2-nty1)/(float)(ny2-ny1):0,
12592 - lpx1 = (ny1-ny0)?(nlx1-nlx0)/(float)(ny1-ny0):0,
12593 - lpy1 = (ny1-ny0)?(nly1-nly0)/(float)(ny1-ny0):0,
12594 - lpx2 = (ny2-ny0)?(nlx2-nlx0)/(float)(ny2-ny0):0,
12595 - lpy2 = (ny2-ny0)?(nly2-nly0)/(float)(ny2-ny0):0,
12596 - lpx3 = (ny2-ny1)?(nlx2-nlx1)/(float)(ny2-ny1):0,
12597 - lpy3 = (ny2-ny1)?(nly2-nly1)/(float)(ny2-ny1):0;
12598 - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
12599 - float pleft,pright,tpxleft,tpyleft,tpxright,tpyright,lpxleft,lpyleft,lpxright,lpyright,
12600 - xleft=(float)nx0,xright=xleft,
12601 - txleft=(float)ntx0,tyleft=(float)nty0,txright=txleft,tyright=tyleft,
12602 - lxleft=(float)nlx0,lyleft=(float)nly0,lxright=lxleft,lyright=lyleft;
12603 - if (p1<p2) {
12604 - pleft=p1; pright=p2;
12605 - tpxleft=tpx1; tpyleft=tpy1; tpxright=tpx2; tpyright=tpy2;
12606 - lpxleft=lpx1; lpyleft=lpy1; lpxright=lpx2; lpyright=lpy2;
12607 - } else {
12608 - pleft=p2; pright=p1;
12609 - tpxleft=tpx2; tpyleft=tpy2; tpxright=tpx1; tpyright=tpy1;
12610 - lpxleft=tpx2; lpyleft=tpy2; lpxright=tpx1; lpyright=tpy1;
12611 - }
12612 - if (ny0<0) {
12613 - xleft-=ny0*pleft; xright-=ny0*pright;
12614 - txleft-=ny0*tpxleft; tyleft-=ny0*tpyleft; txright-=ny0*tpxright; tyright-=ny0*tpyright;
12615 - lxleft-=ny0*lpxleft; lyleft-=ny0*lpyleft; lxright-=ny0*lpxright; lyright-=ny0*lpyright;
12616 - }
12617 - const int ya = ny1<dimy()?ny1:height;
12618 - for (int y=(ny0<0?0:ny0); y<ya; y++) {
12619 - const int dx = (int)xright-(int)xleft;
12620 - const float
12621 - tpx = dx?((int)txright-(int)txleft)/(float)dx:0,
12622 - tpy = dx?((int)tyright-(int)tyleft)/(float)dx:0,
12623 - txi = (float)((xleft>=0)?(int)txleft:(int)(txleft-(int)xleft*tpx)),
12624 - tyi = (float)((xleft>=0)?(int)tyleft:(int)(tyleft-(int)xleft*tpy)),
12625 - lpx = dx?((int)lxright-(int)lxleft)/(float)dx:0,
12626 - lpy = dx?((int)lyright-(int)lyleft)/(float)dx:0,
12627 - lxi = (float)((xleft>=0)?(int)lxleft:(int)(lxleft-(int)xleft*lpx)),
12628 - lyi = (float)((xleft>=0)?(int)lyleft:(int)(lyleft-(int)xleft*lpy));
12629 - const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright<dimx())?(int)xright:(width-1);
12630 - if (xmin<=xmax) {
12631 - const int offx=whz-xmax+xmin-1;
12632 - T* ptrd = ptr(xmin,y,0,0);
12633 - if (opacity>=1) cimg_forV(*this,k) {
12634 - float tx=txi, ty=tyi, lx=lxi, ly=lyi;
12635 - for (int x=xmin; x<=xmax; x++) {
12636 - *(ptrd++)=(T)(light((unsigned int)lx,(unsigned int)ly)*texture((unsigned int)tx,(unsigned int)ty,0,k));
12637 - tx+=tpx; ty+=tpy; lx+=lpx; ly+=lpy;
12638 - }
12639 - ptrd+=offx;
12640 - } else cimg_forV(*this,k) {
12641 - float tx=txi, ty=tyi, lx=lxi, ly=lyi;
12642 - for (int x=xmin; x<=xmax; x++) {
12643 - *ptrd=(T)(nopacity*light((unsigned int)lx,(unsigned int)ly)*texture((unsigned int)tx,(unsigned int)ty,0,k)+copacity*(*ptrd)); ptrd++;
12644 - tx+=tpx; ty+=tpy; lx+=lpx; ly+=lpy;
12645 - }
12646 - ptrd+=offx;
12647 - }
12648 - }
12649 - xleft+=pleft; xright+=pright;
12650 - txleft+=tpxleft; tyleft+=tpyleft; txright+=tpxright; tyright+=tpyright;
12651 - lxleft+=lpxleft; lyleft+=lpyleft; lxright+=lpxright; lyright+=lpyright;
12652 - }
12653 -
12654 - if (p1<p2) {
12655 - xleft=(float)nx1; pleft=p3;
12656 - txleft=(float)ntx1; tyleft=(float)nty1; tpxleft=tpx3; tpyleft=tpy3;
12657 - lxleft=(float)nlx1; lyleft=(float)nly1; lpxleft=lpx3; lpyleft=lpy3;
12658 - if (ny1<0) { xleft-=ny1*pleft; txleft-=ny1*tpxleft; tyleft-=ny1*tpyleft; lxleft-=ny1*lpxleft; lyleft-=ny1*lpyleft; }
12659 - } else {
12660 - xright=(float)nx1; pright=p3;
12661 - txright=(float)ntx1; tyright=(float)nty1; tpxright=tpx3; tpyright=tpy3;
12662 - lxright=(float)nlx1; lyright=(float)nly1; lpxright=lpx3; lpyright=lpy3;
12663 - if (ny1<0) { xright-=ny1*pright; txright-=ny1*tpxright; tyright-=ny1*tpyright; lxright-=ny1*lpxright; lyright-=ny1*lpyright; }
12664 - }
12665 - const int yb = ny2>=dimy()?(height-1):ny2;
12666 - for (int yy=(ny1<0?0:ny1); yy<=yb; yy++) {
12667 - const int dx = (int)xright-(int)xleft;
12668 - const float
12669 - tpx = dx?((int)txright-(int)txleft)/(float)dx:0,
12670 - tpy = dx?((int)tyright-(int)tyleft)/(float)dx:0,
12671 - txi = (float)((xleft>=0)?(int)txleft:(int)(txleft-(int)xleft*tpx)),
12672 - tyi = (float)((xleft>=0)?(int)tyleft:(int)(tyleft-(int)xleft*tpy)),
12673 - lpx = dx?((int)lxright-(int)lxleft)/(float)dx:0,
12674 - lpy = dx?((int)lyright-(int)lyleft)/(float)dx:0,
12675 - lxi = (float)((xleft>=0)?(int)lxleft:(int)(lxleft-(int)xleft*lpx)),
12676 - lyi = (float)((xleft>=0)?(int)lyleft:(int)(lyleft-(int)xleft*lpy));
12677 - const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright<dimx())?(int)xright:(width-1);
12678 - if (xmin<=xmax) {
12679 - const int offx=whz-xmax+xmin-1;
12680 - T* ptrd = ptr(xmin,yy,0,0);
12681 - if (opacity>=1) cimg_forV(*this,k) {
12682 - float tx=txi, ty=tyi, lx=lxi, ly=lyi;
12683 - for (int x=xmin; x<=xmax; x++) {
12684 - *(ptrd++)=(T)(light((unsigned int)lx,(unsigned int)ly)*texture((unsigned int)tx,(unsigned int)ty,0,k));
12685 - tx+=tpx; ty+=tpy; lx+=lpx; ly+=lpy;
12686 - }
12687 - ptrd+=offx;
12688 - } else cimg_forV(*this,k) {
12689 - float tx=txi, ty=tyi, lx=lxi, ly=lyi;
12690 - for (int x=xmin; x<=xmax; x++) {
12691 - *ptrd=(T)(nopacity*light((unsigned int)lx,(unsigned int)ly)*texture((unsigned int)tx,(unsigned int)ty,0,k)+copacity*(*ptrd)); ptrd++;
12692 - tx+=tpx; ty+=tpy; lx+=lpx; ly+=lpy;
12693 - }
12694 - ptrd+=offx;
12695 - }
12696 - }
12697 - xleft+=pleft; xright+=pright;
12698 - txleft+=tpxleft; tyleft+=tpyleft; txright+=tpxright; tyright+=tpyright;
12699 - lxleft+=lpxleft; lyleft+=lpyleft; lxright+=lpxright; lyright+=lpyright;
12700 - }
12701 - }
12702 - return *this;
12703 - }
12704 -
12705 -
12706 - //! Draw an ellipse on the instance image
12707 - /**
12708 - \param x0 = X-coordinate of the ellipse center.
12709 - \param y0 = Y-coordinate of the ellipse center.
12710 - \param r1 = First radius of the ellipse.
12711 - \param r2 = Second radius of the ellipse.
12712 - \param ru = X-coordinate of the orientation vector related to the first radius.
12713 - \param rv = Y-coordinate of the orientation vector related to the first radius.
12714 - \param color = array of dimv() values of type \c T, defining the drawing color.
12715 - \param pattern = If zero, the ellipse is filled, else pattern is an integer whose bits describe the outline pattern.
12716 - \param opacity = opacity of the drawing.
12717 - **/
12718 - CImg& draw_ellipse(const int x0,const int y0,const float r1,const float r2,const float ru,const float rv,
12719 - const T *const color,const unsigned int pattern=0L, const float opacity=1) {
12720 - if (!is_empty()) {
12721 - draw_scanline(color,opacity);
12722 - if (!color) throw CImgArgumentException("CImg<%s>::draw_ellipse : Specified color is (null).",pixel_type());
12723 - unsigned int hatch=1;
12724 - const float
12725 - nr1 = cimg::abs(r1), nr2 = cimg::abs(r2),
12726 - norm = (float)std::sqrt(ru*ru+rv*rv),
12727 - u = norm>0?ru/norm:1,
12728 - v = norm>0?rv/norm:0,
12729 - rmax = cimg::max(nr1,nr2),
12730 - l1 = (float)std::pow(rmax/(nr1>0?nr1:1e-6),2),
12731 - l2 = (float)std::pow(rmax/(nr2>0?nr2:1e-6),2),
12732 - a = l1*u*u + l2*v*v,
12733 - b = u*v*(l1-l2),
12734 - c = l1*v*v + l2*u*u;
12735 - const int
12736 - yb = (int)std::sqrt(a*rmax*rmax/(a*c-b*b)),
12737 - ymin = (y0-yb<0)?0:(y0-yb),
12738 - ymax = (1+y0+yb>=dimy())?height-1:(1+y0+yb);
12739 - int oxmin=0, oxmax=0;
12740 - bool first_line = true;
12741 - for (int y=ymin; y<ymax; y++) {
12742 - const float
12743 - Y = (float)(y-y0)+0.25f,
12744 - delta = b*b*Y*Y-a*(c*Y*Y-rmax*rmax),
12745 - sdelta = (float)((delta>0?std::sqrt(delta):0)),
12746 - fxmin = x0-(b*Y+sdelta)/a,
12747 - fxmax = x0-(b*Y-sdelta)/a;
12748 - const int xmin = (int)fxmin, xmax = (int)fxmax;
12749 - if (!pattern) draw_scanline(xmin,xmax,y,color,opacity);
12750 - else {
12751 - if (!(~pattern) || (~pattern && pattern&hatch)) {
12752 - if (first_line) { draw_scanline(xmin,xmax,y,color,opacity); first_line = false; }
12753 - else {
12754 - if (xmin<oxmin) draw_scanline(xmin,oxmin-1,y,color,opacity);
12755 - else draw_scanline(oxmin+(oxmin==xmin?0:1),xmin,y,color,opacity);
12756 - if (xmax<oxmax) draw_scanline(xmax,oxmax-1,y,color,opacity);
12757 - else draw_scanline(oxmax+(oxmax==xmax?0:1),xmax,y,color,opacity);
12758 - }
12759 - }
12760 - }
12761 - oxmin = xmin; oxmax = xmax;
12762 - if (pattern) hatch=(hatch<<1)+(hatch>>(sizeof(unsigned int)*8-1));
12763 - }
12764 - }
12765 - return *this;
12766 - }
12767 -
12768 - //! Draw an ellipse on the instance image
12769 - /**
12770 - \param x0 = X-coordinate of the ellipse center.
12771 - \param y0 = Y-coordinate of the ellipse center.
12772 - \param tensor = Diffusion tensor describing the ellipse.
12773 - \param color = array of dimv() values of type \c T, defining the drawing color.
12774 - \param pattern = If zero, the ellipse is filled, else pattern is an integer whose bits describe the outline pattern.
12775 - \param opacity = opacity of the drawing.
12776 - **/
12777 - template<typename t> CImg& draw_ellipse(const int x0,const int y0,const CImg<t> &tensor,
12778 - const T *color,const unsigned int pattern=0L,const float opacity=1) {
12779 - CImgList<t> eig = tensor.get_symmetric_eigen();
12780 - const CImg<t> &val = eig[0], &vec = eig[1];
12781 - return draw_ellipse(x0,y0,val(0),val(1),vec(0,0),vec(0,1),color,pattern,opacity);
12782 - }
12783 -
12784 - //! Draw a circle on the instance image
12785 - /**
12786 - \param x0 = X-coordinate of the circle center.
12787 - \param y0 = Y-coordinate of the circle center.
12788 - \param r = radius of the circle.
12789 - \param color = an array of dimv() values of type \c T, defining the drawing color.
12790 - \param pattern = If zero, the circle is filled, else pattern is an integer whose bits describe the outline pattern.
12791 - \param opacity = opacity of the drawing.
12792 - **/
12793 - CImg& draw_circle(const int x0,const int y0,float r,const T *const color,const unsigned int pattern=0L,const float opacity=1) {
12794 - return draw_ellipse(x0,y0,r,r,1,0,color,pattern,opacity);
12795 - }
12796 -
12797 - //! Draw a text into the instance image.
12798 - /**
12799 - \param text = a C-string containing the text to display.
12800 - \param x0 = X-coordinate of the text in the instance image.
12801 - \param y0 = Y-coordinate of the text in the instance image.
12802 - \param fgcolor = an array of dimv() values of type \c T, defining the foreground color (0 means 'transparent').
12803 - \param bgcolor = an array of dimv() values of type \c T, defining the background color (0 means 'transparent').
12804 - \param font = List of font characters used for the drawing.
12805 - \param opacity = opacity of the drawing.
12806 - \note Clipping is supported.
12807 - \see get_font().
12808 - **/
12809 - template<typename t> CImg& draw_text(const char *const text,
12810 - const int x0,const int y0,
12811 - const T *const fgcolor,const T *const bgcolor,
12812 - const CImgList<t>& font,const float opacity=1) {
12813 - if (!text)
12814 - throw CImgArgumentException("CImg<%s>::draw_text() : Specified input string is (null).",pixel_type());
12815 - if (font.is_empty())
12816 - throw CImgArgumentException("CImg<%s>::draw_text() : Specified font (%u,%p) is empty.",
12817 - pixel_type(),font.size,font.data);
12818 -
12819 - if (is_empty()) {
12820 - // If needed, pre-compute needed size of the image
12821 - int x=0, y=0, w=0;
12822 - for (int i=0; i<cimg::strlen(text); i++) {
12823 - const unsigned char c = text[i];
12824 - switch (c) {
12825 - case '\n': y+=font[' '].height; if (x>w) w=x; x=0; break;
12826 - case '\t': x+=4*font[' '].width; break;
12827 - default: if (c<font.size) x+=font[c].width;
12828 - }
12829 - }
12830 - if (x!=0) {
12831 - if (x>w) w=x;
12832 - y+=font[' '].height;
12833 - }
12834 - assign(x0+w,y0+y,1,font[' '].dim,0);
12835 - if (bgcolor) cimg_forV(*this,k) get_shared_channel(k).fill(bgcolor[k]);
12836 - }
12837 -
12838 - int x = x0, y = y0;
12839 - CImg<T> letter;
12840 - for (int i=0; i<cimg::strlen(text); i++) {
12841 - const unsigned char c = text[i];
12842 - switch (c) {
12843 - case '\n': y+=font[' '].height; x=x0; break;
12844 - case '\t': x+=4*font[' '].width; break;
12845 - default: if (c<font.size) {
12846 - letter = font[c];
12847 - const CImg& mask = (c+256)<(int)font.size?font[c+256]:font[c];
12848 - if (fgcolor) for (unsigned int p=0; p<letter.width*letter.height; p++)
12849 - if (mask(p)) cimg_forV(*this,k) letter(p,0,0,k) = (T)(letter(p,0,0,k)*fgcolor[k]);
12850 - if (bgcolor) for (unsigned int p=0; p<letter.width*letter.height; p++)
12851 - if (!mask(p)) cimg_forV(*this,k) letter(p,0,0,k) = bgcolor[k];
12852 - if (!bgcolor && font.size>=512) draw_image(letter,mask,x,y,0,0,(T)1,opacity);
12853 - else draw_image(letter,x,y,0,0,opacity);
12854 - x+=letter.width;
12855 - }
12856 - break;
12857 - }
12858 - }
12859 - return *this;
12860 - }
12861 -
12862 - //! Draw a text into the instance image.
12863 - /**
12864 - \param text = a C-string containing the text to display.
12865 - \param x0 = X-coordinate of the text in the instance image.
12866 - \param y0 = Y-coordinate of the text in the instance image.
12867 - \param fgcolor = an array of dimv() values of type \c T, defining the foreground color (0 means 'transparent').
12868 - \param bgcolor = an array of dimv() values of type \c T, defining the background color (0 means 'transparent').
12869 - \param font_size = Height of the desired font (11,13,24,38 or 57)
12870 - \param opacity = opacity of the drawing.
12871 - \note Clipping is supported.
12872 - \see get_font().
12873 - **/
12874 - CImg& draw_text(const char *const text,
12875 - const int x0,const int y0,
12876 - const T *const fgcolor,const T *const bgcolor=0,
12877 - const unsigned int font_size=11,const float opacity=1.0f) {
12878 - return draw_text(text,x0,y0,fgcolor,bgcolor,CImgList<T>::get_font(font_size),opacity);
12879 - }
12880 -
12881 -
12882 - //! Draw a text into the instance image.
12883 - /**
12884 - \param x0 = X-coordinate of the text in the instance image.
12885 - \param y0 = Y-coordinate of the text in the instance image.
12886 - \param fgcolor = an array of dimv() values of type \c T, defining the foreground color (0 means 'transparent').
12887 - \param bgcolor = an array of dimv() values of type \c T, defining the background color (0 means 'transparent').
12888 - \param opacity = opacity of the drawing.
12889 - \param format = a 'printf'-style format, followed by arguments.
12890 - \note Clipping is supported.
12891 - **/
12892 - CImg& draw_text(const int x0,const int y0,
12893 - const T *const fgcolor,const T *const bgcolor, const unsigned int font_size,
12894 - const float opacity,const char *format,...) {
12895 - char tmp[2048]={0};
12896 - std::va_list ap;
12897 - va_start(ap,format);
12898 - std::vsprintf(tmp,format,ap);
12899 - va_end(ap);
12900 - return draw_text(tmp,x0,y0,fgcolor,bgcolor,font_size,opacity);
12901 - }
12902 -
12903 - template<typename t> CImg& draw_text(const int x0,const int y0,
12904 - const T *const fgcolor,const T *const bgcolor,
12905 - const CImgList<t>& font, const float opacity, const char *format,...) {
12906 - char tmp[2048]={0};
12907 - std::va_list ap;
12908 - va_start(ap,format);
12909 - std::vsprintf(tmp,format,ap);
12910 - va_end(ap);
12911 - return draw_text(tmp,x0,y0,fgcolor,bgcolor,font,opacity);
12912 - }
12913 -
12914 -
12915 - //! Draw a vector field in the instance image.
12916 - /**
12917 - \param flow = a 2d image of 2d vectors used as input data.
12918 - \param color = an array of dimv() values of type \c T, defining the drawing color.
12919 - \param sampling = length (in pixels) between each arrow.
12920 - \param factor = length factor of each arrow (if <0, computed as a percentage of the maximum length).
12921 - \param quiver_type = type of plot. Can be 0 (arrows) or 1 (segments).
12922 - \param opacity = opacity of the drawing.
12923 - \note Clipping is supported.
12924 - **/
12925 - template<typename t>
12926 - CImg& draw_quiver(const CImg<t>& flow, const T *const color,
12927 - const unsigned int sampling=25, const float factor=-20,
12928 - const int quiver_type=0, const float opacity=1) {
12929 - if (!is_empty()) {
12930 - if (flow.is_empty() || flow.dim!=2)
12931 - throw CImgArgumentException("CImg<%s>::draw_quiver() : Specified flow (%u,%u,%u,%u,%p) has wrong dimensions.",
12932 - pixel_type(),flow.width,flow.height,flow.depth,flow.dim,flow.data);
12933 - if (!color)
12934 - throw CImgArgumentException("CImg<%s>::draw_quiver() : Specified color is (null)",
12935 - pixel_type());
12936 - if (sampling<=0)
12937 - throw CImgArgumentException("CImg<%s>::draw_quiver() : Incorrect sampling value = %g",
12938 - pixel_type(),sampling);
12939 -
12940 - float vmax,fact;
12941 - if (factor<=0) {
12942 - const CImgStats st(flow.get_norm_pointwise(2),false);
12943 - vmax = (float)cimg::max(cimg::abs(st.min),cimg::abs(st.max));
12944 - fact = -factor;
12945 - } else { fact = factor; vmax = 1; }
12946 -
12947 - for (unsigned int y=sampling/2; y<height; y+=sampling)
12948 - for (unsigned int x=sampling/2; x<width; x+=sampling) {
12949 - const unsigned int X = x*flow.width/width, Y = y*flow.height/height;
12950 - float u = (float)flow(X,Y,0,0)*fact/vmax, v = (float)flow(X,Y,0,1)*fact/vmax;
12951 - if (!quiver_type) {
12952 - const int xx = x+(int)u, yy = y+(int)v;
12953 - draw_arrow(x,y,xx,yy,color,45.0f,sampling/5.0f,~0L,opacity);
12954 - } else draw_line((int)(x-0.5*u),(int)(y-0.5*v),(int)(x+0.5*u),(int)(y+0.5*v),color,~0L,opacity);
12955 - }
12956 - }
12957 - return *this;
12958 - }
12959 -
12960 - //! Draw a vector field in the instance image, using a colormap.
12961 - /**
12962 - \param flow = a 2d image of 2d vectors used as input data.
12963 - \param color = a 2d image of dimv()-D vectors corresponding to the color of each arrow.
12964 - \param sampling = length (in pixels) between each arrow.
12965 - \param factor = length factor of each arrow (if <0, computed as a percentage of the maximum length).
12966 - \param quiver_type = type of plot. Can be 0 (arrows) or 1 (segments).
12967 - \param opacity = opacity of the drawing.
12968 - \note Clipping is supported.
12969 - **/
12970 - template<typename t1,typename t2>
12971 - CImg& draw_quiver(const CImg<t1>& flow, const CImg<t2>& color,
12972 - const unsigned int sampling=25, const float factor=-20,
12973 - const int quiver_type=0, const float opacity=1) {
12974 - if (!is_empty()) {
12975 - if (flow.is_empty() || flow.dim!=2)
12976 - throw CImgArgumentException("CImg<%s>::draw_quiver() : Specified flow (%u,%u,%u,%u,%p) has wrong dimensions.",
12977 - pixel_type(),flow.width,flow.height,flow.depth,flow.dim,flow.data);
12978 - if (color.is_empty() || color.width!=flow.width || color.height!=flow.height)
12979 - throw CImgArgumentException("CImg<%s>::draw_quiver() : Specified color (%u,%u,%u,%u,%p) has wrong dimensions.",
12980 - pixel_type(),color.width,color.height,color.depth,color.dim,color.data);
12981 - if (sampling<=0)
12982 - throw CImgArgumentException("CImg<%s>::draw_quiver() : Incorrect sampling value = %g",pixel_type(),sampling);
12983 -
12984 - float vmax,fact;
12985 - if (factor<=0) {
12986 - const CImgStats st(flow.get_norm_pointwise(2),false);
12987 - vmax = (float)cimg::max(cimg::abs(st.min),cimg::abs(st.max));
12988 - fact = -factor;
12989 - } else { fact = factor; vmax = 1; }
12990 -
12991 - for (unsigned int y=sampling/2; y<height; y+=sampling)
12992 - for (unsigned int x=sampling/2; x<width; x+=sampling) {
12993 - const unsigned int X = x*flow.width/width, Y = y*flow.height/height;
12994 - float u = (float)flow(X,Y,0,0)*fact/vmax, v = (float)flow(X,Y,0,1)*fact/vmax;
12995 - if (!quiver_type) {
12996 - const int xx = x+(int)u, yy = y+(int)v;
12997 - draw_arrow(x,y,xx,yy,color.get_vector_at(X,Y).data,45.0f,sampling/5.0f,~0L,opacity);
12998 - } else draw_line((int)(x-0.5*u),(int)(y-0.5*v),(int)(x+0.5*u),(int)(y+0.5*v),color.get_vector_at(X,Y).data,~0L,opacity);
12999 - }
13000 - }
13001 - return *this;
13002 - }
13003 -
13004 - //! Draw a 1D graph on the instance image.
13005 - /**
13006 - \param data = an image containing the graph values I = f(x).
13007 - \param color = an array of dimv() values of type \c T, defining the drawing color.
13008 - \param gtype = define the type of the plot :
13009 - - 0 = Plot using linear interpolation (segments).
13010 - - 1 = Plot with bars.
13011 - - 2 = Plot using cubic interpolation (3-polynomials).
13012 - \param ymin = lower bound of the y-range.
13013 - \param ymax = upper bound of the y-range.
13014 - \param opacity = opacity of the drawing.
13015 - \note
13016 - - if \c ymin==ymax==0, the y-range is computed automatically from the input sample.
13017 - \see draw_axis().
13018 - **/
13019 - template<typename t>
13020 - CImg& draw_graph(const CImg<t>& data, const T *const color, const unsigned int gtype=0,
13021 - const double ymin=0, const double ymax=0, const float opacity=1) {
13022 - if (!is_empty()) {
13023 - if (!color) throw CImgArgumentException("CImg<%s>::draw_graph() : Specified color is (null)",pixel_type());
13024 - T *color1 = new T[dim], *color2 = new T[dim];
13025 - cimg_forV(*this,k) { color1[k]=(T)(color[k]*0.6f); color2[k]=(T)(color[k]*0.3f); }
13026 - CImgStats st;
13027 - if (ymin==ymax) { st = CImgStats(data,false); cimg::swap(st.min,st.max); } else { st.min = ymin; st.max = ymax; }
13028 - if (st.min==st.max) { st.min--; st.max++; }
13029 - const float ca = height>1?(float)(st.max-st.min)/(height-1):0, cb = (float)st.min;
13030 - const int Y0 = (int)(-cb/ca);
13031 - int pY=0;
13032 - cimg_foroff(data,off) {
13033 - const int Y = (int)((data[off]-cb)/ca);
13034 - switch (gtype) {
13035 - case 0: // plot with segments
13036 - if (off>0) draw_line((int)((off-1)*width/data.size()),pY,(int)(off*width/data.size()),Y,color,~0L,opacity);
13037 - break;
13038 - case 1: { // plot with bars
13039 - const unsigned int X = off*width/data.size(), nX = (off+1)*width/data.size()-1;
13040 - draw_rectangle(X,(int)Y0,nX,Y,color1,opacity);
13041 - draw_line(X,Y,X,(int)Y0,color2,~0L,opacity);
13042 - draw_line(X,(int)Y0,nX,(int)Y0,Y<=Y0?color2:color,~0L,opacity);
13043 - draw_line(nX,Y,nX,(int)Y0,color,~0L,opacity);
13044 - draw_line(X,Y,nX,Y,Y<=Y0?color:color2,~0L,opacity);
13045 - } break;
13046 - }
13047 - pY=Y;
13048 - }
13049 - if (gtype==2) { // plot with cubic interpolation
13050 - const CImg<t> ndata = data.get_shared_points(0,data.size()-1);
13051 - cimg_forX(*this,x) {
13052 - const int Y = (int)((ndata.cubic_pix1d((float)x*ndata.width/width)-cb)/ca);
13053 - if (x>0) draw_line(x,pY,x+1,Y,color,~0L,opacity);
13054 - pY=Y;
13055 - }
13056 - }
13057 - delete[] color1; delete[] color2;
13058 - }
13059 - return *this;
13060 - }
13061 -
13062 - //! Draw a labelled horizontal axis on the instance image.
13063 - /**
13064 - \param x0 = lower bound of the x-range.
13065 - \param x1 = upper bound of the x-range.
13066 - \param y = Y-coordinate of the horizontal axis in the instance image.
13067 - \param color = an array of dimv() values of type \c T, defining the drawing color.
13068 - \param precision = precision of the labels.
13069 - \param grid_pattern = pattern of the grid
13070 - \param opacity = opacity of the drawing.
13071 - \note if \c precision==0, precision of the labels is automatically computed.
13072 - \see draw_graph().
13073 - **/
13074 - template<typename t> CImg& draw_axis(const CImg<t>& xvalues, const int y, const T *const color,
13075 - const int precision=-1, const float opacity=1.0f) {
13076 - if (!is_empty()) {
13077 - int siz = (int)xvalues.size()-1;
13078 - if (siz<=0) draw_line(0,y,width-1,y,color,~0L,opacity);
13079 - else {
13080 - if (xvalues[0]<xvalues[siz]) draw_arrow(0,y,width-1,y,color,30,5,~0L,opacity);
13081 - else draw_arrow(width-1,y,0,y,color,30,5,~0L,opacity);
13082 - const int yt = (y+14)<dimy()?(y+3):(y-14);
13083 - char txt[32];
13084 - cimg_foroff(xvalues,x) {
13085 - if (precision>=0) std::sprintf(txt,"%.*g",precision,(double)xvalues(x));
13086 - else std::sprintf(txt,"%g",(double)xvalues(x));
13087 - const int xi=(int)(x*(width-1)/siz), xt = xi-(int)std::strlen(txt)*3;
13088 - draw_point(xi,y-1,color,opacity).draw_point(xi,y+1,color,opacity).
13089 - draw_text(txt,xt<0?0:xt,yt,color,0,11,opacity);
13090 - }
13091 - }
13092 - }
13093 - return *this;
13094 - }
13095 -
13096 - //! Draw a labelled vertical axis on the instance image.
13097 - template<typename t> CImg& draw_axis(const int x, const CImg<t>& yvalues, const T *const color,
13098 - const int precision=-1, const float opacity=1.0f) {
13099 - if (!is_empty()) {
13100 - int siz = (int)yvalues.size()-1;
13101 - if (siz<=0) draw_line(x,0,x,height-1,color,~0L,opacity);
13102 - else {
13103 - if (yvalues[0]<yvalues[siz]) draw_arrow(x,0,x,height-1,color,30,5,~0L,opacity);
13104 - else draw_arrow(x,height-1,x,0,color,30,5,~0L,opacity);
13105 - char txt[32];
13106 - cimg_foroff(yvalues,y) {
13107 - if (precision>=0) std::sprintf(txt,"%.*g",precision,(double)yvalues(y));
13108 - else std::sprintf(txt,"%g",(double)yvalues(y));
13109 - const int
13110 - yi = (int)(y*(height-1)/siz),
13111 - tmp = yi-5,
13112 - nyi = tmp<0?0:(tmp>=(int)height-11?(int)height-11:tmp),
13113 - xt = x-(int)std::strlen(txt)*7;
13114 - draw_point(x-1,yi,color,opacity).draw_point(x+1,yi,color,opacity);
13115 - if (xt>0) draw_text(txt,xt,nyi,color,0,11,opacity);
13116 - else draw_text(txt,x+3,nyi,color,0,11,opacity);
13117 - }
13118 - }
13119 - }
13120 - return *this;
13121 - }
13122 -
13123 - //! Draw a labelled horizontal+vertical axis on the instance image.
13124 - template<typename tx, typename ty> CImg& draw_axis(const CImg<tx>& xvalues, const CImg<ty>& yvalues, const T *const color,
13125 - const int precisionx=-1, const int precisiony=-1,
13126 - const float opacity=1.0f) {
13127 - if (!is_empty()) {
13128 - const CImg<tx> nxvalues(xvalues.data,xvalues.size(),1,1,1,true);
13129 - const int sizx = (int)xvalues.size()-1, wm1 = (int)(width)-1;
13130 - if (sizx>0) {
13131 - float ox = (float)nxvalues[0];
13132 - for (unsigned int x=1; x<width; x++) {
13133 - const float nx = (float)nxvalues.linear_pix1d((float)x*sizx/wm1);
13134 - if (nx*ox<=0) { draw_axis(nx==0?x:x-1,yvalues,color,precisiony,opacity); break; }
13135 - ox = nx;
13136 - }
13137 - }
13138 - const CImg<ty> nyvalues(yvalues.data,yvalues.size(),1,1,1,true);
13139 - const int sizy = (int)yvalues.size()-1, hm1 = (int)(height)-1;
13140 - if (sizy>0) {
13141 - float oy = (float)nyvalues[0];
13142 - for (unsigned int y=1; y<height; y++) {
13143 - const float ny = (float)nyvalues.linear_pix1d((float)y*sizy/hm1);
13144 - if (ny*oy<=0) { draw_axis(xvalues,ny==0?y:y-1,color,precisionx,opacity); break; }
13145 - oy = ny;
13146 - }
13147 - }
13148 - }
13149 - return *this;
13150 - }
13151 -
13152 - //! Draw a labelled horizontal+vertical axis on the instance image.
13153 - template<typename tx, typename ty> CImg& draw_axis(const tx& x0, const tx& x1, const ty& y0, const ty& y1,
13154 - const T *const color,
13155 - const int subdivisionx=-60, const int subdivisiony=-60,
13156 - const int precisionx=-1, const int precisiony=-1,
13157 - const float opacity=1.0f) {
13158 - return draw_axis(CImg<tx>::sequence(subdivisionx>0?subdivisionx:1-(int)width/subdivisionx,x0,x1),
13159 - CImg<ty>::sequence(subdivisiony>0?subdivisiony:1-(int)height/subdivisiony,y0,y1),
13160 - color,precisionx,precisiony,opacity);
13161 - }
13162 -
13163 - //! Draw grid on the instance image
13164 - template<typename tx, typename ty>
13165 - CImg& draw_grid(const CImg<tx>& xvalues, const CImg<ty>& yvalues, const T *const color,
13166 - const unsigned int patternx=~0U, const unsigned int patterny=~0U,
13167 - const float opacity=1.0f) {
13168 - if (!is_empty()) {
13169 - if (!xvalues.is_empty()) cimg_foroff(xvalues,x) {
13170 - const int xi = (int)xvalues[x];
13171 - if (xi>=0 && xi<(int)width) draw_line(xi,0,xi,height-1,color,patternx,opacity);
13172 - }
13173 - if (!yvalues.is_empty()) cimg_foroff(yvalues,y) {
13174 - const int yi = (int)yvalues[y];
13175 - if (yi>=0 && yi<(int)height) draw_line(0,yi,width-1,yi,color,patterny,opacity);
13176 - }
13177 - }
13178 - return *this;
13179 - }
13180 -
13181 - //! Draw grid on the instance image
13182 - CImg& draw_grid(const float deltax, const float deltay,
13183 - const float offsetx, const float offsety,
13184 - const T *const color,
13185 - const unsigned int patternx=~0U, const unsigned int patterny=~0U,
13186 - const bool invertx=false, const bool inverty=false,
13187 - const float opacity=1.0f) {
13188 -
13189 - CImg<unsigned int> seqx, seqy;
13190 -
13191 - if (deltax!=0) {
13192 - const float dx = deltax>0?deltax:width*-deltax/100;
13193 - const unsigned int nx = (unsigned int)(width/dx);
13194 - seqx = CImg<unsigned int>::sequence(1+nx,0,(unsigned int)(dx*nx));
13195 - if (offsetx) cimg_foroff(seqx,x) seqx(x) = (unsigned int)cimg::mod(seqx(x)+offsetx,(float)width);
13196 - if (invertx) cimg_foroff(seqx,x) seqx(x) = width-1-seqx(x);
13197 - }
13198 -
13199 - if (deltay!=0) {
13200 - const float dy = deltay>0?deltay:height*-deltay/100;
13201 - const unsigned int ny = (unsigned int)(height/dy);
13202 - seqy = CImg<unsigned int>::sequence(1+ny,0,(unsigned int)(dy*ny));
13203 - if (offsety) cimg_foroff(seqy,y) seqy(y) = (unsigned int)cimg::mod(seqy(y)+offsety,(float)height);
13204 - if (inverty) cimg_foroff(seqy,y) seqy(y) = height-1-seqy(y);
13205 - }
13206 -
13207 - return draw_grid(seqx,seqy,color,patternx,patterny,opacity);
13208 - }
13209 -
13210 - // INNER CLASS used by function CImg<>::draw_fill()
13211 - template<typename T1,typename T2> struct _draw_fill {
13212 - const T1 *const color;
13213 - const float sigma,opacity;
13214 - const CImg<T1> value;
13215 - CImg<T2> region;
13216 -
13217 - _draw_fill(const CImg<T1>& img,const int x,const int y,const int z,
13218 - const T *const pcolor,const float psigma,const float popacity):
13219 - color(pcolor),sigma(psigma),opacity(popacity),
13220 - value(img.get_vector_at(x,y,z)), region(CImg<T2>(img.width,img.height,img.depth,1,(T2)false)) {
13221 - }
13222 -
13223 - _draw_fill& operator=(const _draw_fill& d) {
13224 - color = d.color;
13225 - sigma = d.sigma;
13226 - opacity = d.opacity;
13227 - value = d.value;
13228 - region = d.region;
13229 - return *this;
13230 - }
13231 -
13232 - bool comp(const CImg<T1>& A,const CImg<T1>& B) const {
13233 - bool res=true;
13234 - const T *pA=A.data+A.size();
13235 - for (const T *pB=B.data+B.size(); res && pA>A.data; res=(cimg::abs(*(--pA)-(*(--pB)))<=sigma) );
13236 - return res;
13237 - }
13238 -
13239 - void fill(CImg<T1>& img,const int x,const int y,const int z) {
13240 - if (x<0 || x>=img.dimx() || y<0 || y>=img.dimy() || z<0 || z>=img.dimz()) return;
13241 - if (!region(x,y,z) && comp(value,img.get_vector_at(x,y,z))) {
13242 - const T *col=color;
13243 - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
13244 - int xmin,xmax;
13245 - if (opacity>=1) cimg_forV(img,k) img(x,y,z,k)=*(col++);
13246 - else cimg_forV(img,k) img(x,y,z,k)=(T1)(*(col++)*opacity+copacity*img(x,y,z,k));
13247 - col-=img.dim;
13248 - region(x,y,z) = (T2)true;
13249 - for (xmin=x-1; xmin>=0 && comp(value,img.get_vector_at(xmin,y,z)); xmin--) {
13250 - if (opacity>=1) cimg_forV(img,k) img(xmin,y,z,k) = *(col++);
13251 - else cimg_forV(img,k) img(xmin,y,z,k)=(T1)(*(col++)*nopacity+copacity*img(xmin,y,z,k));
13252 - col-=img.dim;
13253 - region(xmin,y,z)=(T2)true;
13254 - }
13255 - for (xmax=x+1; xmax<img.dimx() && comp(value,img.get_vector_at(xmax,y,z)); xmax++) {
13256 - if (opacity>=1) cimg_forV(img,k) img(xmax,y,z,k) = *(col++);
13257 - else cimg_forV(img,k) img(xmax,y,z,k)=(T1)(*(col++)*nopacity+copacity*img(xmax,y,z,k));
13258 - col-=img.dim;
13259 - region(xmax,y,z)=(T2)true;
13260 - }
13261 - xmin++; xmax--;
13262 - for (; xmin<=xmax; xmin++) {
13263 - fill(img,xmin,y-1,z);
13264 - fill(img,xmin,y+1,z);
13265 - fill(img,xmin,y,z-1);
13266 - fill(img,xmin,y,z+1);
13267 - }
13268 - }
13269 - }
13270 - };
13271 -
13272 - //! Draw a 3D filled region starting from a point (\c x,\c y,\ z) in the instance image.
13273 - /**
13274 - \param x = X-coordinate of the starting point of the region to fill.
13275 - \param y = Y-coordinate of the starting point of the region to fill.
13276 - \param z = Z-coordinate of the starting point of the region to fill.
13277 - \param color = an array of dimv() values of type \c T, defining the drawing color.
13278 - \param region = image that will contain the mask of the filled region mask, as an output.
13279 - \param sigma = tolerance concerning neighborhood values.
13280 - \param opacity = opacity of the drawing.
13281 -
13282 - \return \p region is initialized with the binary mask of the filled region.
13283 - **/
13284 - template<typename t> CImg& draw_fill(const int x,const int y,const int z,
13285 - const T *const color, CImg<t>& region,const float sigma=0,
13286 - const float opacity=1) {
13287 - _draw_fill<T,t> F(*this,x,y,z,color,sigma,opacity);
13288 - F.fill(*this,x,y,z);
13289 - region = F.region;
13290 - return *this;
13291 - }
13292 -
13293 - //! Draw a 3D filled region starting from a point (\c x,\c y,\ z) in the instance image.
13294 - /**
13295 - \param x = X-coordinate of the starting point of the region to fill.
13296 - \param y = Y-coordinate of the starting point of the region to fill.
13297 - \param z = Z-coordinate of the starting point of the region to fill.
13298 - \param color = an array of dimv() values of type \c T, defining the drawing color.
13299 - \param sigma = tolerance concerning neighborhood values.
13300 - \param opacity = opacity of the drawing.
13301 - **/
13302 - CImg& draw_fill(const int x,const int y,const int z,const T *const color,const float sigma=0,const float opacity=1) {
13303 - CImg<bool> tmp;
13304 - return draw_fill(x,y,z,color,tmp,sigma,opacity);
13305 - }
13306 -
13307 - //! Draw a 2D filled region starting from a point (\c x,\c y) in the instance image.
13308 - /**
13309 - \param x = X-coordinate of the starting point of the region to fill.
13310 - \param y = Y-coordinate of the starting point of the region to fill.
13311 - \param color = an array of dimv() values of type \c T, defining the drawing color.
13312 - \param sigma = tolerance concerning neighborhood values.
13313 - \param opacity = opacity of the drawing.
13314 - **/
13315 - CImg& draw_fill(const int x,const int y,const T *const color,const float sigma=0,const float opacity=1) {
13316 - CImg<bool> tmp;
13317 - return draw_fill(x,y,0,color,tmp,sigma,opacity);
13318 - }
13319 -
13320 - //! Draw a plasma square in the instance image.
13321 - /**
13322 - \param x0 = X-coordinate of the upper-left corner of the plasma.
13323 - \param y0 = Y-coordinate of the upper-left corner of the plasma.
13324 - \param x1 = X-coordinate of the lower-right corner of the plasma.
13325 - \param y1 = Y-coordinate of the lower-right corner of the plasma.
13326 - \param alpha = Alpha-parameter of the plasma.
13327 - \param beta = Beta-parameter of the plasma.
13328 - \param opacity = opacity of the drawing.
13329 - **/
13330 - CImg& draw_plasma(const int x0, const int y0, const int x1, const int y1,
13331 - const double alpha=1.0, const double beta=1.0, const float opacity=1) {
13332 - if (!is_empty()) {
13333 - int nx0=x0,nx1=x1,ny0=y0,ny1=y1;
13334 - if (nx1<nx0) cimg::swap(nx0,nx1);
13335 - if (ny1<ny0) cimg::swap(ny0,ny1);
13336 - if (nx0<0) nx0=0;
13337 - if (nx1>=dimx()) nx1=width-1;
13338 - if (ny0<0) ny0=0;
13339 - if (ny1>=dimy()) ny1=height-1;
13340 - const int xc = (nx0+nx1)/2, yc = (ny0+ny1)/2, dx=(xc-nx0), dy=(yc-ny0);
13341 - const double dc = std::sqrt((double)(dx*dx+dy*dy))*alpha + beta;
13342 - float val = 0;
13343 - cimg_forV(*this,k) {
13344 - if (opacity>=1) {
13345 - (*this)(xc,ny0,0,k) = (T)(0.5f*((*this)(nx0,ny0,0,k)+(*this)(nx1,ny0,0,k)));
13346 - (*this)(xc,ny1,0,k) = (T)(0.5f*((*this)(nx0,ny1,0,k)+(*this)(nx1,ny1,0,k)));
13347 - (*this)(nx0,yc,0,k) = (T)(0.5f*((*this)(nx0,ny0,0,k)+(*this)(nx0,ny1,0,k)));
13348 - (*this)(nx1,yc,0,k) = (T)(0.5f*((*this)(nx1,ny0,0,k)+(*this)(nx1,ny1,0,k)));
13349 - do {
13350 - val = (float)(0.25f*((*this)(nx0,ny0,0,k)+(*this)(nx1,ny0,0,k) +
13351 - (*this)(nx1,ny1,0,k)+(*this)(nx0,ny1,0,k)) + dc*cimg::grand());
13352 - } while (val<(float)cimg::type<T>::min() || val>(float)cimg::type<T>::max());
13353 - (*this)(xc,yc,0,k) = (T)val;
13354 - } else {
13355 - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
13356 - (*this)(xc,ny0,0,k) = (T)(0.5f*((*this)(nx0,ny0,0,k)+(*this)(nx1,ny0,0,k))*nopacity + copacity*(*this)(xc,ny0,0,k));
13357 - (*this)(xc,ny1,0,k) = (T)(0.5f*((*this)(nx0,ny1,0,k)+(*this)(nx1,ny1,0,k))*nopacity + copacity*(*this)(xc,ny1,0,k));
13358 - (*this)(nx0,yc,0,k) = (T)(0.5f*((*this)(nx0,ny0,0,k)+(*this)(nx0,ny1,0,k))*nopacity + copacity*(*this)(nx0,yc,0,k));
13359 - (*this)(nx1,yc,0,k) = (T)(0.5f*((*this)(nx1,ny0,0,k)+(*this)(nx1,ny1,0,k))*nopacity + copacity*(*this)(nx1,yc,0,k));
13360 - do {
13361 - val = (float)(0.25f*(((*this)(nx0,ny0,0,k)+(*this)(nx1,ny0,0,k) +
13362 - (*this)(nx1,ny1,0,k)+(*this)(nx0,ny1,0,k)) + dc*cimg::grand())*nopacity
13363 - + copacity*(*this)(xc,yc,0,k));
13364 - } while (val<(float)cimg::type<T>::min() || val>(float)cimg::type<T>::max());
13365 - (*this)(xc,yc,0,k) = (T)val;
13366 - }
13367 - }
13368 - if (xc!=nx0 || yc!=ny0) {
13369 - draw_plasma(nx0,ny0,xc,yc,alpha,beta,opacity);
13370 - draw_plasma(xc,ny0,nx1,yc,alpha,beta,opacity);
13371 - draw_plasma(nx0,yc,xc,ny1,alpha,beta,opacity);
13372 - draw_plasma(xc,yc,nx1,ny1,alpha,beta,opacity);
13373 - }
13374 - }
13375 - return *this;
13376 - }
13377 -
13378 - //! Draw a plasma in the instance image.
13379 - /**
13380 - \param alpha = Alpha-parameter of the plasma.
13381 - \param beta = Beta-parameter of the plasma.
13382 - \param opacity = opacity of the drawing.
13383 - **/
13384 - CImg& draw_plasma(const double alpha=1.0,const double beta=1.0,const float opacity=1) {
13385 - return draw_plasma(0,0,width-1,height-1,alpha,beta,opacity);
13386 - }
13387 -
13388 - //! Draw a 1D gaussian function in the instance image.
13389 - /**
13390 - \param xc = X-coordinate of the gaussian center.
13391 - \param sigma = Standard variation of the gaussian distribution.
13392 - \param color = array of dimv() values of type \c T, defining the drawing color.
13393 - \param opacity = opacity of the drawing.
13394 - **/
13395 - CImg& draw_gaussian(const float xc,const double sigma,const T *const color,const float opacity=1) {
13396 - if (!is_empty()) {
13397 - if (!color) throw CImgArgumentException("CImg<%s>::draw_gaussian() : Specified color is (null)",pixel_type());
13398 - const double sigma2 = 2*sigma*sigma;
13399 - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
13400 - const unsigned int whz = width*height*depth;
13401 - const T *col = color;
13402 - cimg_forX(*this,x) {
13403 - const float dx = (x-xc);
13404 - const double val = std::exp( -dx*dx/sigma2 );
13405 - T *ptrd = ptr(x,0,0,0);
13406 - if (opacity>=1) cimg_forV(*this,k) { *ptrd = (T)(val*(*col++)); ptrd+=whz; }
13407 - else cimg_forV(*this,k) { *ptrd = (T)(nopacity*val*(*col++) + copacity*(*ptrd)); ptrd+=whz; }
13408 - col-=dim;
13409 - }
13410 - }
13411 - return *this;
13412 - }
13413 -
13414 - //! Draw an anisotropic 2D gaussian function in the instance image.
13415 - /**
13416 - \param xc = X-coordinate of the gaussian center.
13417 - \param yc = Y-coordinate of the gaussian center.
13418 - \param tensor = 2x2 covariance matrix.
13419 - \param color = array of dimv() values of type \c T, defining the drawing color.
13420 - \param opacity = opacity of the drawing.
13421 - **/
13422 - template<typename t> CImg& draw_gaussian(const float xc,const float yc,const CImg<t>& tensor,
13423 - const T *const color,const float opacity=1) {
13424 - if (!is_empty()) {
13425 - if (tensor.width!=2 || tensor.height!=2 || tensor.depth!=1 || tensor.dim!=1)
13426 - throw CImgArgumentException("CImg<%s>::draw_gaussian() : Tensor parameter (%u,%u,%u,%u,%p) is not a 2x2 matrix.",
13427 - pixel_type(),tensor.width,tensor.height,tensor.depth,tensor.dim,tensor.data);
13428 - if (!color) throw CImgArgumentException("CImg<%s>::draw_gaussian() : Specified color is (null)",pixel_type());
13429 - const CImg<t> invT = tensor.get_inverse(), invT2 = (invT*invT)/(-2.0);
13430 - const t &a=invT2(0,0), &b=2*invT2(1,0), &c=invT2(1,1);
13431 - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
13432 - const unsigned int whz = width*height*depth;
13433 - const T *col = color;
13434 - float dy = -yc;
13435 - cimg_forY(*this,y) {
13436 - float dx = -xc;
13437 - cimg_forX(*this,x) {
13438 - const float val = (float)std::exp(a*dx*dx + b*dx*dy + c*dy*dy);
13439 - T *ptrd = ptr(x,y,0,0);
13440 - if (opacity>=1) cimg_forV(*this,k) { *ptrd = (T)(val*(*col++)); ptrd+=whz; }
13441 - else cimg_forV(*this,k) { *ptrd = (T)(nopacity*val*(*col++) + copacity*(*ptrd)); ptrd+=whz; }
13442 - col-=dim;
13443 - dx++;
13444 - }
13445 - dy++;
13446 - }
13447 - }
13448 - return *this;
13449 - }
13450 -
13451 - //! Draw an isotropic 2D gaussian function in the instance image
13452 - /**
13453 - \param xc = X-coordinate of the gaussian center.
13454 - \param yc = Y-coordinate of the gaussian center.
13455 - \param sigma = standard variation of the gaussian distribution.
13456 - \param color = array of dimv() values of type \c T, defining the drawing color.
13457 - \param opacity = opacity of the drawing.
13458 - **/
13459 - CImg& draw_gaussian(const float xc,const float yc,const float sigma,const T *const color,const float opacity=1) {
13460 - return draw_gaussian(xc,yc,CImg<float>::diagonal(sigma,sigma),color,opacity);
13461 - }
13462 -
13463 - //! Draw an anisotropic 3D gaussian function in the instance image.
13464 - /**
13465 - \param xc = X-coordinate of the gaussian center.
13466 - \param yc = Y-coordinate of the gaussian center.
13467 - \param zc = Z-coordinate of the gaussian center.
13468 - \param tensor = 3x3 covariance matrix.
13469 - \param color = array of dimv() values of type \c T, defining the drawing color.
13470 - \param opacity = opacity of the drawing.
13471 - **/
13472 - template<typename t> CImg& draw_gaussian(const float xc,const float yc,const float zc,const CImg<t>& tensor,
13473 - const T *const color,const float opacity=1) {
13474 - if (!is_empty()) {
13475 - if (tensor.width!=3 || tensor.height!=3 || tensor.depth!=1 || tensor.dim!=1)
13476 - throw CImgArgumentException("CImg<%s>::draw_gaussian() : Tensor parameter (%u,%u,%u,%u,%p) is not a 3x3 matrix.",
13477 - pixel_type(),tensor.width,tensor.height,tensor.depth,tensor.dim,tensor.data);
13478 - const CImg<t> invT = tensor.get_inverse(), invT2 = (invT*invT)/(-2.0);
13479 - const t a=invT(0,0), b=2*invT(1,0), c=2*invT(2,0), d=invT(1,1), e=2*invT(2,1), f=invT(2,2);
13480 - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
13481 - const unsigned int whz = width*height*depth;
13482 - const T *col = color;
13483 - cimg_forXYZ(*this,x,y,z) {
13484 - const float dx = (x-xc), dy = (y-yc), dz = (z-zc);
13485 - const double val = std::exp(a*dx*dx + b*dx*dy + c*dx*dz + d*dy*dy + e*dy*dz + f*dz*dz);
13486 - T *ptrd = ptr(x,y,z,0);
13487 - if (opacity>=1) cimg_forV(*this,k) { *ptrd = (T)(val*(*col++)); ptrd+=whz; }
13488 - else cimg_forV(*this,k) { *ptrd = (T)(nopacity*val*(*col++) + copacity*(*ptrd)); ptrd+=whz; }
13489 - col-=dim;
13490 - }
13491 - }
13492 - return *this;
13493 - }
13494 -
13495 - //! Draw an isotropic 3D gaussian function in the instance image
13496 - /**
13497 - \param xc = X-coordinate of the gaussian center.
13498 - \param yc = Y-coordinate of the gaussian center.
13499 - \param zc = Z-coordinate of the gaussian center.
13500 - \param sigma = standard variation of the gaussian distribution.
13501 - \param color = array of dimv() values of type \c T, defining the drawing color.
13502 - \param opacity = opacity of the drawing.
13503 - **/
13504 - CImg& draw_gaussian(const float xc,const float yc,const float zc,
13505 - const double sigma,const T *const color,const float opacity=1) {
13506 - return draw_gaussian(xc,yc,zc,CImg<float>::diagonal(sigma,sigma,sigma),color,opacity);
13507 - }
13508 -
13509 - //! Draw a 3D object in the instance image
13510 - /**
13511 - \param X = X-coordinate of the 3d object position
13512 - \param Y = Y-coordinate of the 3d object position
13513 - \param Z = Z-coordinate of the 3d object position
13514 - \param points = Image N*3 describing 3D point coordinates
13515 - \param primitives = List of P primitives
13516 - \param colors = List of P color (or textures)
13517 - \param opacities = Image of P opacities
13518 - \param render_type = Render type (0=Points, 1=Lines, 2=Faces (no light), 3=Faces (flat), 4=Faces(Gouraud)
13519 - \param double_sided = Tell if object faces have two sides or are oriented.
13520 - \param focale = length of the focale
13521 - \param lightx = X-coordinate of the light
13522 - \param lighty = Y-coordinate of the light
13523 - \param lightz = Z-coordinate of the light
13524 - \param ambiant_light = Brightness (between 0..1) of the ambiant light
13525 - **/
13526 - template<typename tp, typename tf, typename to>
13527 - CImg& draw_object3d(const float X, const float Y, const float Z,
13528 - const CImg<tp>& points, const CImgList<tf>& primitives,
13529 - const CImgList<T>& colors, const CImgList<to>& opacities,
13530 - const unsigned int render_type=4,
13531 - const bool double_sided=false, const float focale=500,
13532 - const float lightx=0, const float lighty=0, const float lightz=-5000,
13533 - const float ambiant_light = 0.05f) {
13534 -
13535 - static CImg<float> light_texture;
13536 - if (is_empty() || points.is_empty() || primitives.is_empty()) return *this;
13537 - if (colors.is_empty() || opacities.is_empty())
13538 - throw CImgArgumentException("CImg<%s>::draw_object3d() : Undefined colors or opacities",pixel_type());
13539 -
13540 - if (points.height<3)
13541 - return draw_object3d(X,Y,Z,points.get_resize(-100,3,1,1,0),primitives,colors,opacities,
13542 - render_type,double_sided,focale,lightx,lighty,lightz,ambiant_light);
13543 -
13544 - // Create light texture for phong-like rendering
13545 - if (render_type==5) {
13546 - if (colors.size>primitives.size) light_texture = colors[primitives.size];
13547 - else {
13548 - static float olightx=0, olighty=0, olightz=0, oambiant_light=0;
13549 - if (light_texture.is_empty() || lightx!=olightx || lighty!=olighty || lightz!=olightz || ambiant_light!=oambiant_light) {
13550 - light_texture.assign(512,512);
13551 - const float white[1]={ 1.0f },
13552 - dlx = lightx-X, dly = lighty-Y, dlz = lightz-Z,
13553 - nl = (float)std::sqrt(dlx*dlx+dly*dly+dlz*dlz),
13554 - nlx = light_texture.width/2*(1+dlx/nl),
13555 - nly = light_texture.height/2*(1+dly/nl);
13556 - (light_texture.draw_gaussian(nlx,nly,light_texture.width/3.0f,white)+=ambiant_light).cut(0.0f,1.0f);
13557 - olightx = lightx; olighty = lighty; olightz = lightz; oambiant_light = ambiant_light;
13558 - }
13559 - }
13560 - }
13561 -
13562 - // Compute 3D to 2D projection
13563 - CImg<float> projections(points.width,2);
13564 - cimg_forX(points,l) {
13565 - const float
13566 - x = (float)points(l,0),
13567 - y = (float)points(l,1),
13568 - z = (float)points(l,2);
13569 - const float projectedz = z + Z + focale;
13570 - projections(l,1) = Y + focale*y/projectedz;
13571 - projections(l,0) = X + focale*x/projectedz;
13572 - }
13573 -
13574 - // Compute and sort visible primitives
13575 - CImg<unsigned int> visibles(primitives.size);
13576 - CImg<float> zrange(primitives.size);
13577 - unsigned int nb_visibles = 0;
13578 - const float zmin = -focale+1.5f;
13579 - { cimglist_for(primitives,l) {
13580 - const CImg<tf>& primitive = primitives[l];
13581 - switch (primitive.size()) {
13582 - case 1: { // Point
13583 - const unsigned int i0 = (unsigned int)primitive(0);
13584 - const float x0 = projections(i0,0), y0 = projections(i0,1), z0 = (float)(Z+points(i0,2));
13585 - if (z0>zmin && x0>=0 && x0<width && y0>=0 && y0<height) {
13586 - visibles(nb_visibles) = (unsigned int)l;
13587 - zrange(nb_visibles++) = z0;
13588 - }
13589 - } break;
13590 - case 2: // Line or textured line
13591 - case 6: {
13592 - const unsigned int
13593 - i0 = (unsigned int)primitive(0),
13594 - i1 = (unsigned int)primitive(1);
13595 - const float
13596 - x0 = projections(i0,0), y0 = projections(i0,1), z0 = (float)(Z+points(i0,2)),
13597 - x1 = projections(i1,0), y1 = projections(i1,1), z1 = (float)(Z+points(i1,2));
13598 - float xm, xM, ym, yM;
13599 - if (x0<x1) { xm = x0; xM = x1; } else { xm = x1; xM = x0; }
13600 - if (y0<y1) { ym = y0; yM = y1; } else { ym = y1; yM = y0; }
13601 - if (z0>zmin && z1>zmin && xM>=0 && xm<width && yM>=0 && ym<height) {
13602 - visibles(nb_visibles) = (unsigned int)l;
13603 - zrange(nb_visibles++) = 0.5f*(z0+z1);
13604 - }
13605 - } break;
13606 - case 3: // Triangle or textured triangle
13607 - case 9: {
13608 - const unsigned int
13609 - i0 = (unsigned int)primitive(0),
13610 - i1 = (unsigned int)primitive(1),
13611 - i2 = (unsigned int)primitive(2);
13612 - const float
13613 - x0 = projections(i0,0), y0 = projections(i0,1), z0 = (float)(Z+points(i0,2)),
13614 - x1 = projections(i1,0), y1 = projections(i1,1), z1 = (float)(Z+points(i1,2)),
13615 - x2 = projections(i2,0), y2 = projections(i2,1), z2 = (float)(Z+points(i2,2));
13616 - float xm, xM, ym, yM;
13617 - if (x0<x1) { xm = x0; xM = x1; } else { xm = x1; xM = x0; }
13618 - if (x2<xm) xm = x2;
13619 - if (x2>xM) xM = x2;
13620 - if (y0<y1) { ym = y0; yM = y1; } else { ym = y1; yM = y0; }
13621 - if (y2<ym) ym = y2;
13622 - if (y2>yM) yM = y2;
13623 - if (z0>zmin && z1>zmin && z2>zmin && xM>=0 && xm<width && yM>=0 && ym<height) {
13624 - if (double_sided || (x1-x0)*(y2-y0)-(x2-x0)*(y1-y0)<0) {
13625 - visibles(nb_visibles) = (unsigned int)l;
13626 - zrange(nb_visibles++) = (z0+z1+z2)/3;
13627 - }
13628 - }
13629 - } break;
13630 - case 4: // Rectangle or textured rectangle
13631 - case 12: {
13632 - const unsigned int
13633 - i0 = (unsigned int)primitive(0),
13634 - i1 = (unsigned int)primitive(1),
13635 - i2 = (unsigned int)primitive(2),
13636 - i3 = (unsigned int)primitive(3);
13637 - const float
13638 - x0 = projections(i0,0), y0 = projections(i0,1), z0 = (float)(Z+points(i0,2)),
13639 - x1 = projections(i1,0), y1 = projections(i1,1), z1 = (float)(Z+points(i1,2)),
13640 - x2 = projections(i2,0), y2 = projections(i2,1), z2 = (float)(Z+points(i2,2)),
13641 - x3 = projections(i3,0), y3 = projections(i3,1), z3 = (float)(Z+points(i3,2));
13642 - float xm, xM, ym, yM;
13643 - if (x0<x1) { xm = x0; xM = x1; } else { xm = x1; xM = x0; }
13644 - if (x2<xm) xm = x2;
13645 - if (x2>xM) xM = x2;
13646 - if (x3<xm) xm = x3;
13647 - if (x3>xM) xM = x3;
13648 - if (y0<y1) { ym = y0; yM = y1; } else { ym = y1; yM = y0; }
13649 - if (y2<ym) ym = y2;
13650 - if (y2>yM) yM = y2;
13651 - if (y3<ym) ym = y3;
13652 - if (y3>yM) yM = y3;
13653 - if (z0>zmin && z1>zmin && z2>zmin && z3>zmin && xM>=0 && xm<width && yM>=0 && ym<height) {
13654 - if (double_sided || (x1-x0)*(y2-y0)-(x2-x0)*(y1-y0)<0) {
13655 - visibles(nb_visibles) = (unsigned int)l;
13656 - zrange(nb_visibles++) = (z0+z1+z2+z3)/4;
13657 - }
13658 - }
13659 - } break;
13660 - default:
13661 - throw CImgArgumentException("CImg<%s>::draw_object3d() : Primitive %u is invalid (size = %u, can be 1,2,3,4,6,9 or 12)",
13662 - pixel_type(),l,primitive.size());
13663 - }}
13664 - }
13665 - if (nb_visibles<=0) return *this;
13666 - CImg<unsigned int> permutations;
13667 - CImg<float>(zrange.data,nb_visibles,1,1,1,true).sort(permutations,false);
13668 -
13669 - // Compute light properties
13670 - CImg<float> lightprops;
13671 - switch (render_type) {
13672 - case 3: { // Flat Shading
13673 - lightprops.assign(nb_visibles);
13674 - cimg_forX(lightprops,l) {
13675 - const CImg<tf>& primitive = primitives(visibles(permutations(l)));
13676 - const unsigned int psize = primitive.size();
13677 - if (psize==3 || psize==4 || psize==9 || psize==12) {
13678 - const unsigned int
13679 - i0 = (unsigned int)primitive(0),
13680 - i1 = (unsigned int)primitive(1),
13681 - i2 = (unsigned int)primitive(2);
13682 - const float
13683 - x0 = (float)points(i0,0), y0 = (float)points(i0,1), z0 = (float)points(i0,2),
13684 - x1 = (float)points(i1,0), y1 = (float)points(i1,1), z1 = (float)points(i1,2),
13685 - x2 = (float)points(i2,0), y2 = (float)points(i2,1), z2 = (float)points(i2,2),
13686 - dx1 = x1-x0, dy1 = y1-y0, dz1 = z1-z0,
13687 - dx2 = x2-x0, dy2 = y2-y0, dz2 = z2-z0,
13688 - nx = dy1*dz2-dz1*dy2,
13689 - ny = dz1*dx2-dx1*dz2,
13690 - nz = dx1*dy2-dy1*dx2,
13691 - norm = (float)std::sqrt(1e-5f+nx*nx+ny*ny+nz*nz),
13692 - lx = X+(x0+x1+x2)/3-lightx,
13693 - ly = Y+(y0+y1+y2)/3-lighty,
13694 - lz = Z+(z0+z1+z2)/3-lightz,
13695 - nl = (float)std::sqrt(1e-5f+lx*lx+ly*ly+lz*lz),
13696 - factor = (-lx*nx-ly*ny-lz*nz)/(norm*nl),
13697 - nfactor = double_sided?cimg::abs(factor):cimg::max(factor,0.0f);
13698 - lightprops[l] = cimg::min(nfactor+ambiant_light,1.0f);
13699 - } else lightprops[l] = 1.0f;
13700 - }
13701 - } break;
13702 -
13703 - case 4: // Gouraud Shading
13704 - case 5: { // Phong-Shading
13705 - CImg<float> points_normals(points.width,3,1,1,0);
13706 - cimglist_for(primitives,l) {
13707 - const CImg<tf>& primitive = primitives[l];
13708 - const unsigned int psize = primitive.size();
13709 - const bool
13710 - triangle_flag = (psize==3) || (psize==9),
13711 - rectangle_flag = (psize==4) || (psize==12);
13712 - if (triangle_flag || rectangle_flag) {
13713 - const unsigned int
13714 - i0 = (unsigned int)primitive(0),
13715 - i1 = (unsigned int)primitive(1),
13716 - i2 = (unsigned int)primitive(2),
13717 - i3 = rectangle_flag?(unsigned int)primitive(3):0;
13718 - const float
13719 - x0 = (float)points(i0,0), y0 = (float)points(i0,1), z0 = (float)points(i0,2),
13720 - x1 = (float)points(i1,0), y1 = (float)points(i1,1), z1 = (float)points(i1,2),
13721 - x2 = (float)points(i2,0), y2 = (float)points(i2,1), z2 = (float)points(i2,2),
13722 - dx1 = x1-x0, dy1 = y1-y0, dz1 = z1-z0,
13723 - dx2 = x2-x0, dy2 = y2-y0, dz2 = z2-z0,
13724 - nx = dy1*dz2-dz1*dy2,
13725 - ny = dz1*dx2-dx1*dz2,
13726 - nz = dx1*dy2-dy1*dx2,
13727 - norm = (float)std::sqrt(1e-5f+nx*nx+ny*ny+nz*nz),
13728 - nnx = nx/norm,
13729 - nny = ny/norm,
13730 - nnz = nz/norm;
13731 - points_normals(i0,0)+=nnx; points_normals(i0,1)+=nny; points_normals(i0,2)+=nnz;
13732 - points_normals(i1,0)+=nnx; points_normals(i1,1)+=nny; points_normals(i1,2)+=nnz;
13733 - points_normals(i2,0)+=nnx; points_normals(i2,1)+=nny; points_normals(i2,2)+=nnz;
13734 - if (rectangle_flag) {
13735 - points_normals(i3,0)+=nnx; points_normals(i3,1)+=nny; points_normals(i3,2)+=nnz;
13736 - }
13737 - }
13738 - }
13739 -
13740 - if (render_type==4) {
13741 - lightprops.assign(points.width);
13742 - cimg_forX(points,ll) {
13743 - const float
13744 - nx = points_normals(ll,0),
13745 - ny = points_normals(ll,1),
13746 - nz = points_normals(ll,2),
13747 - norm = (float)std::sqrt(1e-5f+nx*nx+ny*ny+nz*nz),
13748 - lx = (float)(X+points(ll,0)-lightx),
13749 - ly = (float)(Y+points(ll,1)-lighty),
13750 - lz = (float)(Z+points(ll,2)-lightz),
13751 - nl = (float)std::sqrt(1e-5f+lx*lx+ly*ly+lz*lz),
13752 - factor = (-lx*nx-ly*ny-lz*nz)/(norm*nl),
13753 - nfactor = double_sided?cimg::abs(factor):cimg::max(factor,0.0f);
13754 - lightprops[ll] = cimg::min(nfactor+ambiant_light,1.0f);
13755 - }
13756 - } else {
13757 - lightprops.assign(points.width,2);
13758 - cimg_forX(points,ll) {
13759 - const float
13760 - nx = points_normals(ll,0),
13761 - ny = points_normals(ll,1),
13762 - nz = points_normals(ll,2),
13763 - norm = (float)std::sqrt(1e-5f+nx*nx+ny*ny+nz*nz),
13764 - nnx = nx/norm, nny = ny/norm;
13765 - lightprops(ll,0) = (light_texture.width/2-1)*(1+nnx);
13766 - lightprops(ll,1) = (light_texture.height/2-1)*(1+nny);
13767 - }
13768 - }
13769 - } break;
13770 - }
13771 -
13772 - // Draw visible primitives
13773 - const unsigned int opacsize = opacities.size;
13774 - { for (unsigned int l=0; l<nb_visibles; l++) {
13775 - const unsigned int n_primitive = visibles(permutations(l));
13776 - const CImg<tf>& primitive = primitives[n_primitive];
13777 - const CImg<T>& color = colors[n_primitive%colors.size];
13778 - const CImg<to>& opacity = opacities[n_primitive%opacsize];
13779 - const float opac = opacity.size()?(float)opacity(0):1.0f;
13780 -
13781 - switch (primitive.size()) {
13782 - case 1: { // colored point or sprite
13783 - const unsigned int n0 = (unsigned int)primitive[0];
13784 - const int x0 = (int)projections(n0,0), y0 = (int)projections(n0,1);
13785 - if (color.size()==dim) draw_point(x0,y0,color.ptr(),opac);
13786 - else {
13787 - const float z = Z + points(n0,2);
13788 - const int factor = (int)(focale*100/(z+focale));
13789 - const int sw = color.width*factor/200, sh = color.height*factor/200;
13790 - if (x0+sw>=0 && x0-sw<(int)width && y0+sh>=0 && y0-sh<(int)height) {
13791 - const CImg<T> sprite = color.get_resize(-factor,-factor,1,-100,render_type<=3?1:3);
13792 - if (opacity.width==color.width && opacity.height==color.height)
13793 - draw_image(sprite,opacity.get_resize(sprite.width,sprite.height,1,sprite.dim,1),x0-sw,y0-sh,0,0);
13794 - else draw_image(sprite,x0-sw,y0-sh,0,0,opac);
13795 - }
13796 - }
13797 - } break;
13798 - case 2: { // colored line
13799 - const unsigned int
13800 - n0 = (unsigned int)primitive[0],
13801 - n1 = (unsigned int)primitive[1];
13802 - const int
13803 - x0 = (int)projections(n0,0), y0 = (int)projections(n0,1),
13804 - x1 = (int)projections(n1,0), y1 = (int)projections(n1,1);
13805 - if (render_type) draw_line(x0,y0,x1,y1,color.ptr(),~0L,opac);
13806 - else draw_point(x0,y0,color.ptr(),opac).draw_point(x1,y1,color.ptr(),opac);
13807 - } break;
13808 - case 6: { // textured line
13809 - const unsigned int
13810 - n0 = (unsigned int)primitive[0],
13811 - n1 = (unsigned int)primitive[1],
13812 - tx0 = (unsigned int)primitive[2],
13813 - ty0 = (unsigned int)primitive[3],
13814 - tx1 = (unsigned int)primitive[4],
13815 - ty1 = (unsigned int)primitive[5];
13816 - const int
13817 - x0 = (int)projections(n0,0), y0 = (int)projections(n0,1),
13818 - x1 = (int)projections(n1,0), y1 = (int)projections(n1,1);
13819 - if (render_type) draw_line(x0,y0,x1,y1,color,tx0,ty0,tx1,ty1,opac);
13820 - else draw_point(x0,y0,color.get_vector_at(tx0,ty0).ptr(),opac).
13821 - draw_point(x1,y1,color.get_vector_at(tx1,ty1).ptr(),opac);
13822 - } break;
13823 - case 3: { // colored triangle
13824 - const unsigned int
13825 - n0 = (unsigned int)primitive[0],
13826 - n1 = (unsigned int)primitive[1],
13827 - n2 = (unsigned int)primitive[2];
13828 - const int
13829 - x0 = (int)projections(n0,0), y0 = (int)projections(n0,1),
13830 - x1 = (int)projections(n1,0), y1 = (int)projections(n1,1),
13831 - x2 = (int)projections(n2,0), y2 = (int)projections(n2,1);
13832 - switch(render_type) {
13833 - case 0:
13834 - draw_point(x0,y0,color.ptr(),opac).draw_point(x1,y1,color.ptr(),opac).draw_point(x2,y2,color.ptr(),opac);
13835 - break;
13836 - case 1:
13837 - draw_line(x0,y0,x1,y1,color.ptr(),~0L,opac).draw_line(x0,y0,x2,y2,color.ptr(),~0L,opac).
13838 - draw_line(x1,y1,x2,y2,color.ptr(),~0L,opac);
13839 - break;
13840 - case 2:
13841 - draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),opac);
13842 - break;
13843 - case 3:
13844 - draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),opac,lightprops(l));
13845 - break;
13846 - case 4:
13847 - draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),lightprops(n0),lightprops(n1),lightprops(n2),opac);
13848 - break;
13849 - case 5:
13850 - draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),light_texture,
13851 - (unsigned int)lightprops(n0,0), (unsigned int)lightprops(n0,1),
13852 - (unsigned int)lightprops(n1,0), (unsigned int)lightprops(n1,1),
13853 - (unsigned int)lightprops(n2,0), (unsigned int)lightprops(n2,1),
13854 - opac);
13855 - break;
13856 - }
13857 - } break;
13858 - case 4: { // colored rectangle
13859 - const unsigned int
13860 - n0 = (unsigned int)primitive[0],
13861 - n1 = (unsigned int)primitive[1],
13862 - n2 = (unsigned int)primitive[2],
13863 - n3 = (unsigned int)primitive[3];
13864 - const int
13865 - x0 = (int)projections(n0,0), y0 = (int)projections(n0,1),
13866 - x1 = (int)projections(n1,0), y1 = (int)projections(n1,1),
13867 - x2 = (int)projections(n2,0), y2 = (int)projections(n2,1),
13868 - x3 = (int)projections(n3,0), y3 = (int)projections(n3,1);
13869 - switch(render_type) {
13870 - case 0:
13871 - draw_point(x0,y0,color.ptr(),opac).draw_point(x1,y1,color.ptr(),opac).
13872 - draw_point(x2,y2,color.ptr(),opac).draw_point(x3,y3,color.ptr(),opac);
13873 - break;
13874 - case 1:
13875 - draw_line(x0,y0,x1,y1,color.ptr(),~0L,opac).draw_line(x1,y1,x2,y2,color.ptr(),~0L,opac).
13876 - draw_line(x2,y2,x3,y3,color.ptr(),~0L,opac).draw_line(x3,y3,x0,y0,color.ptr(),~0L,opac);
13877 - break;
13878 - case 2:
13879 - draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),opac).draw_triangle(x0,y0,x2,y2,x3,y3,color.ptr(),opac);
13880 - break;
13881 - case 3:
13882 - draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),opac,lightprops(l)).
13883 - draw_triangle(x0,y0,x2,y2,x3,y3,color.ptr(),opac,lightprops(l));
13884 - break;
13885 - case 4: {
13886 - const float
13887 - lightprop0 = lightprops(n0), lightprop1 = lightprops(n1),
13888 - lightprop2 = lightprops(n2), lightprop3 = lightprops(n3);
13889 - draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),lightprop0,lightprop1,lightprop2,opac).
13890 - draw_triangle(x0,y0,x2,y2,x3,y3,color.ptr(),lightprop0,lightprop2,lightprop3,opac);
13891 - } break;
13892 - case 5: {
13893 - const unsigned int
13894 - lx0 = (unsigned int)lightprops(n0,0), ly0 = (unsigned int)lightprops(n0,1),
13895 - lx1 = (unsigned int)lightprops(n1,0), ly1 = (unsigned int)lightprops(n1,1),
13896 - lx2 = (unsigned int)lightprops(n2,0), ly2 = (unsigned int)lightprops(n2,1),
13897 - lx3 = (unsigned int)lightprops(n3,0), ly3 = (unsigned int)lightprops(n3,1);
13898 - draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),light_texture,lx0,ly0,lx1,ly1,lx2,ly2,opac).
13899 - draw_triangle(x0,y0,x2,y2,x3,y3,color.ptr(),light_texture,lx0,ly0,lx2,ly2,lx3,ly3,opac);
13900 - } break;
13901 - }
13902 - } break;
13903 - case 9: { // Textured triangle
13904 - const unsigned int
13905 - n0 = (unsigned int)primitive[0],
13906 - n1 = (unsigned int)primitive[1],
13907 - n2 = (unsigned int)primitive[2],
13908 - tx0 = (unsigned int)primitive[3],
13909 - ty0 = (unsigned int)primitive[4],
13910 - tx1 = (unsigned int)primitive[5],
13911 - ty1 = (unsigned int)primitive[6],
13912 - tx2 = (unsigned int)primitive[7],
13913 - ty2 = (unsigned int)primitive[8];
13914 - const int
13915 - x0 = (int)projections(n0,0), y0 = (int)projections(n0,1),
13916 - x1 = (int)projections(n1,0), y1 = (int)projections(n1,1),
13917 - x2 = (int)projections(n2,0), y2 = (int)projections(n2,1);
13918 - switch(render_type) {
13919 - case 0:
13920 - draw_point(x0,y0,color.get_vector_at(tx0,ty0).ptr(),opac).
13921 - draw_point(x1,y1,color.get_vector_at(tx1,ty1).ptr(),opac).
13922 - draw_point(x2,y2,color.get_vector_at(tx2,ty2).ptr(),opac);
13923 - break;
13924 - case 1:
13925 - draw_line(x0,y0,x1,y1,color,tx0,ty0,tx1,ty1,opac).
13926 - draw_line(x0,y0,x2,y2,color,tx0,ty0,tx2,ty2,opac).
13927 - draw_line(x1,y1,x2,y2,color,tx1,ty1,tx2,ty2,opac);
13928 - break;
13929 - case 2:
13930 - draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,opac);
13931 - break;
13932 - case 3:
13933 - draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,opac,lightprops(l));
13934 - break;
13935 - case 4:
13936 - draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,lightprops(n0),lightprops(n1),lightprops(n2),opac);
13937 - break;
13938 - case 5:
13939 - draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,light_texture,
13940 - (unsigned int)lightprops(n0,0), (unsigned int)lightprops(n0,1),
13941 - (unsigned int)lightprops(n1,0), (unsigned int)lightprops(n1,1),
13942 - (unsigned int)lightprops(n2,0), (unsigned int)lightprops(n2,1),
13943 - opac);
13944 - break;
13945 - }
13946 - } break;
13947 - case 12: { // Textured rectangle
13948 - const unsigned int
13949 - n0 = (unsigned int)primitive[0],
13950 - n1 = (unsigned int)primitive[1],
13951 - n2 = (unsigned int)primitive[2],
13952 - n3 = (unsigned int)primitive[3],
13953 - tx0 = (unsigned int)primitive[4],
13954 - ty0 = (unsigned int)primitive[5],
13955 - tx1 = (unsigned int)primitive[6],
13956 - ty1 = (unsigned int)primitive[7],
13957 - tx2 = (unsigned int)primitive[8],
13958 - ty2 = (unsigned int)primitive[9],
13959 - tx3 = (unsigned int)primitive[10],
13960 - ty3 = (unsigned int)primitive[11];
13961 - const int
13962 - x0 = (int)projections(n0,0), y0 = (int)projections(n0,1),
13963 - x1 = (int)projections(n1,0), y1 = (int)projections(n1,1),
13964 - x2 = (int)projections(n2,0), y2 = (int)projections(n2,1),
13965 - x3 = (int)projections(n3,0), y3 = (int)projections(n3,1);
13966 - switch(render_type) {
13967 - case 0:
13968 - draw_point(x0,y0,color.get_vector_at(tx0,ty0).ptr(),opac).
13969 - draw_point(x1,y1,color.get_vector_at(tx1,ty1).ptr(),opac).
13970 - draw_point(x2,y2,color.get_vector_at(tx2,ty2).ptr(),opac).
13971 - draw_point(x3,y3,color.get_vector_at(tx3,ty3).ptr(),opac);
13972 - break;
13973 - case 1:
13974 - draw_line(x0,y0,x1,y1,color,tx0,ty0,tx1,ty1,opac).
13975 - draw_line(x1,y1,x2,y2,color,tx1,ty1,tx2,ty2,opac).
13976 - draw_line(x2,y2,x3,y3,color,tx2,ty2,tx3,ty3,opac).
13977 - draw_line(x3,y3,x0,y0,color,tx3,ty3,tx0,ty0,opac);
13978 - break;
13979 - case 2:
13980 - draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,opac).
13981 - draw_triangle(x0,y0,x2,y2,x3,y3,color,tx0,ty0,tx2,ty2,tx3,ty3,opac);
13982 - break;
13983 - case 3:
13984 - draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,opac,lightprops(l)).
13985 - draw_triangle(x0,y0,x2,y2,x3,y3,color,tx0,ty0,tx2,ty2,tx3,ty3,opac,lightprops(l));
13986 - break;
13987 - case 4: {
13988 - const float
13989 - lightprop0 = lightprops(n0), lightprop1 = lightprops(n1),
13990 - lightprop2 = lightprops(n2), lightprop3 = lightprops(n3);
13991 - draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,lightprop0,lightprop1,lightprop2,opac).
13992 - draw_triangle(x0,y0,x2,y2,x3,y3,color,tx0,ty0,tx2,ty2,tx3,ty3,lightprop0,lightprop2,lightprop3,opac);
13993 - } break;
13994 - case 5: {
13995 - const unsigned int
13996 - lx0 = (unsigned int)lightprops(n0,0), ly0 = (unsigned int)lightprops(n0,1),
13997 - lx1 = (unsigned int)lightprops(n1,0), ly1 = (unsigned int)lightprops(n1,1),
13998 - lx2 = (unsigned int)lightprops(n2,0), ly2 = (unsigned int)lightprops(n2,1),
13999 - lx3 = (unsigned int)lightprops(n3,0), ly3 = (unsigned int)lightprops(n3,1);
14000 - draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,light_texture,lx0,ly0,lx1,ly1,lx2,ly2,opac).
14001 - draw_triangle(x0,y0,x2,y2,x3,y3,color,tx0,ty0,tx1,ty1,tx2,ty2,light_texture,lx0,ly0,lx2,ly2,lx3,ly3,opac);
14002 - } break;
14003 - }
14004 - } break;
14005 - }
14006 - }
14007 - }
14008 - return *this;
14009 - }
14010 -
14011 - //! Draw a 3D object in the instance image
14012 - template<typename tp, typename tf, typename to>
14013 - CImg& draw_object3d(const float X, const float Y, const float Z,
14014 - const CImgList<tp>& points, const CImgList<tf>& primitives,
14015 - const CImgList<T>& colors, const CImgList<to>& opacities,
14016 - const unsigned int render_type=4,
14017 - const bool double_sided=false, const float focale=500,
14018 - const float lightx=0, const float lighty=0, const float lightz=-5000,
14019 - const float ambiant_light = 0.05f) {
14020 - if (points.is_empty()) return *this;
14021 - CImg<tp> npoints(points.size,3,1,1,0);
14022 - tp *ptrX = npoints.ptr(), *ptrY = npoints.ptr(0,1), *ptrZ = npoints.ptr(0,2);
14023 - cimg_forX(npoints,l) {
14024 - const CImg<tp>& point = points[l];
14025 - const unsigned int siz = point.size();
14026 - if (!siz)
14027 - throw CImgArgumentException("CImg<%s>::draw_object3d() : Given points (size=%u) contains a null element at "
14028 - "position %u.",pixel_type(),points.size,l);
14029 - *(ptrZ++) = (siz>2)?point(2):0;
14030 - *(ptrY++) = (siz>1)?point(1):0;
14031 - *(ptrX++) = point(0);
14032 - }
14033 - return draw_object3d(X,Y,Z,npoints,primitives,colors,opacities,
14034 - render_type,double_sided,focale,lightx,lighty,lightz,ambiant_light);
14035 - }
14036 -
14037 - //! Draw a 3D object in the instance image
14038 - template<typename tp, typename tf, typename to>
14039 - CImg& draw_object3d(const float X, const float Y, const float Z,
14040 - const CImg<tp>& points, const CImgList<tf>& primitives,
14041 - const CImgList<T>& colors, const CImg<to>& opacities,
14042 - const unsigned int render_type=4,
14043 - const bool double_sided=false, const float focale=500,
14044 - const float lightx=0, const float lighty=0, const float lightz=-5000,
14045 - const float ambiant_light = 0.05f) {
14046 - CImgList<to> nopacities(opacities.size(),1);
14047 - cimglist_for(nopacities,l) nopacities(l,0) = opacities(l);
14048 - return draw_object3d(X,Y,Z,points,primitives,colors,nopacities,
14049 - render_type,double_sided,focale,lightx,lighty,lightz,ambiant_light);
14050 - }
14051 -
14052 - //! Draw a 3D object in the instance image
14053 - template<typename tp, typename tf, typename to>
14054 - CImg& draw_object3d(const float X, const float Y, const float Z,
14055 - const CImgList<tp>& points, const CImgList<tf>& primitives,
14056 - const CImgList<T>& colors, const CImg<to>& opacities,
14057 - const unsigned int render_type=4,
14058 - const bool double_sided=false, const float focale=500,
14059 - const float lightx=0, const float lighty=0, const float lightz=-5000,
14060 - const float ambiant_light = 0.05f) {
14061 - CImgList<to> nopacities(opacities.size(),1);
14062 - { cimglist_for(nopacities,l) nopacities(l,0) = opacities(l); }
14063 - if (points.is_empty()) return *this;
14064 - CImg<tp> npoints(points.size,3,1,1,0);
14065 - tp *ptrX = npoints.ptr(), *ptrY = npoints.ptr(0,1), *ptrZ = npoints.ptr(0,2);
14066 - cimg_forX(npoints,l) {
14067 - const CImg<tp>& point = points[l];
14068 - const unsigned int siz = point.size();
14069 - if (!siz)
14070 - throw CImgArgumentException("CImg<%s>::draw_object3d() : Given points (size=%u) contains a null element at "
14071 - "position %u.",pixel_type(),points.size,l);
14072 - *(ptrZ++) = (siz>2)?point(2):0;
14073 - *(ptrY++) = (siz>1)?point(1):0;
14074 - *(ptrX++) = point(0);
14075 - }
14076 - return draw_object3d(X,Y,Z,npoints,primitives,colors,nopacities,
14077 - render_type,double_sided,focale,lightx,lighty,lightz,ambiant_light);
14078 - }
14079 -
14080 - //! Draw a 3D object in the instance image
14081 - template<typename tp, typename tf>
14082 - CImg& draw_object3d(const float X, const float Y, const float Z,
14083 - const tp& points, const CImgList<tf>& primitives,
14084 - const CImgList<T>& colors,
14085 - const unsigned int render_type=4,
14086 - const bool double_sided=false, const float focale=500,
14087 - const float lightx=0, const float lighty=0, const float lightz=-5000,
14088 - const float ambiant_light = 0.05f, const float opacity=1.0f) {
14089 - return draw_object3d(X,Y,Z,points,primitives,colors,
14090 - CImg<float>(primitives.size,1,1,1,opacity),
14091 - render_type,double_sided,focale,lightx,lighty,lightz,
14092 - ambiant_light);
14093 - }
14094 -
14095 - //! Rescale and center a 3D object
14096 - CImg& resize_object3d(const float siz=100, const bool centering=true) {
14097 - T *ptrx = ptr(0,0), *ptry = ptr(0,1), *ptrz = ptr(0,2);
14098 - float xm = (float)*(ptrx++), ym = (float)*(ptry++), zm = (float)*(ptrz++), xM = xm, yM = ym, zM = zm;
14099 - for (unsigned int p=1; p<width; p++) {
14100 - const float x = (float)*(ptrx++), y = (float)*(ptry++), z = (float)*(ptrz++);
14101 - if (x<xm) xm = x;
14102 - if (y<ym) ym = y;
14103 - if (z<zm) zm = z;
14104 - if (x>xM) xM = x;
14105 - if (y>yM) yM = y;
14106 - if (z>zM) zM = z;
14107 - }
14108 - const float
14109 - cx = 0.5f*(xm+xM),
14110 - cy = 0.5f*(ym+yM),
14111 - cz = 0.5f*(zm+zM),
14112 - delta = cimg::max(xM-xm,yM-ym,zM-zm),
14113 - ratio = (siz>=0)?(delta<=0?0:(siz/delta)):-siz/100;
14114 - ptrx = ptr(0,0);
14115 - ptry = ptr(0,1);
14116 - ptrz = ptr(0,2);
14117 - if (centering) cimg_forX(*this,l) {
14118 - T &x = *(ptrx++), &y = *(ptry++), &z = *(ptrz++);
14119 - x = (T)((x-cx)*ratio);
14120 - y = (T)((y-cy)*ratio);
14121 - z = (T)((z-cz)*ratio);
14122 - } else cimg_forX(*this,l) {
14123 - T &x = *(ptrx++), &y = *(ptry++), &z = *(ptrz++);
14124 - x = (T)(cx+(x-cx)*ratio);
14125 - y = (T)(cy+(y-cy)*ratio);
14126 - z = (T)(cz+(z-cz)*ratio);
14127 - }
14128 - return *this;
14129 - }
14130 -
14131 - //! Get a rescaled and centered version of the 3D object
14132 - CImg get_resize_object3d(const float siz=100, const bool centering=true) const {
14133 - return CImg<T>(*this,false).resize_object3d(siz,centering);
14134 - }
14135 -
14136 - //@}
14137 - //----------------------------
14138 - //
14139 - //! \name Image Filtering
14140 - //@{
14141 - //----------------------------
14142 -
14143 - //! Return the correlation of the image by a mask.
14144 - /**
14145 - The result \p res of the correlation of an image \p img by a mask \p mask is defined to be :
14146 -
14147 - res(x,y,z) = sum_{i,j,k} img(x+i,y+j,z+k)*mask(i,j,k)
14148 -
14149 - \param mask = the correlation kernel.
14150 - \param cond = the border condition type (0=zero, 1=dirichlet)
14151 - \param weighted_correl = enable local normalization.
14152 - **/
14153 - template<typename t> CImg<typename cimg::largest<T,t>::type>
14154 - get_correlate(const CImg<t>& mask,const unsigned int cond=1,const bool weighted_correl=false) const {
14155 - typedef typename cimg::largest<T,t>::type restype;
14156 - typedef typename cimg::largest<t,float>::type fftype;
14157 - typedef typename cimg::largest<T,fftype>::type ftype;
14158 -
14159 - if (is_empty()) return CImg<restype>();
14160 - if (mask.is_empty() || mask.dim!=1)
14161 - throw CImgArgumentException("CImg<%s>::get_correlate() : Specified mask (%u,%u,%u,%u,%p) is not scalar.",
14162 - pixel_type(),mask.width,mask.height,mask.depth,mask.dim,mask.data);
14163 - CImg<restype> dest(width,height,depth,dim);
14164 - if (cond && mask.width==mask.height && ((mask.depth==1 && mask.width<=5) || (mask.depth==mask.width && mask.width<=3))) {
14165 - // A special optimization is done for 2x2,3x3,4x4,5x5,2x2x2 and 3x3x3 mask (with cond=1)
14166 - switch (mask.depth) {
14167 - case 3: {
14168 - CImg_3x3x3(I,T);
14169 - if (!weighted_correl) cimg_forZV(*this,z,v) cimg_for3x3x3(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr3x3x3(I,mask);
14170 - else cimg_forZV(*this,z,v) cimg_for3x3x3(*this,x,y,z,v,I) {
14171 - const double norm = (double)cimg_squaresum3x3x3(I);
14172 - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr3x3x3(I,mask)/std::sqrt(norm)):0;
14173 - }
14174 - } break;
14175 - case 2: {
14176 - CImg_2x2x2(I,T);
14177 - if (!weighted_correl) cimg_forZV(*this,z,v) cimg_for2x2x2(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr2x2x2(I,mask);
14178 - else cimg_forZV(*this,z,v) cimg_for2x2x2(*this,x,y,z,v,I) {
14179 - const double norm = (double)cimg_squaresum2x2x2(I);
14180 - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr2x2x2(I,mask)/std::sqrt(norm)):0;
14181 - }
14182 - } break;
14183 - default:
14184 - case 1:
14185 - switch (mask.width) {
14186 - case 5: {
14187 - CImg_5x5(I,T);
14188 - if (!weighted_correl) cimg_forZV(*this,z,v) cimg_for5x5(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr5x5(I,mask);
14189 - else cimg_forZV(*this,z,v) cimg_for5x5(*this,x,y,z,v,I) {
14190 - const double norm = (double)cimg_squaresum5x5(I);
14191 - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr5x5(I,mask)/std::sqrt(norm)):0;
14192 - }
14193 - } break;
14194 - case 4: {
14195 - CImg_4x4(I,T);
14196 - if (!weighted_correl) cimg_forZV(*this,z,v) cimg_for4x4(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr4x4(I,mask);
14197 - else cimg_forZV(*this,z,v) cimg_for4x4(*this,x,y,z,v,I) {
14198 - const double norm = (double)cimg_squaresum4x4(I);
14199 - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr4x4(I,mask)/std::sqrt(norm)):0;
14200 - }
14201 - } break;
14202 - case 3: {
14203 - CImg_3x3(I,T);
14204 - if (!weighted_correl) cimg_forZV(*this,z,v) cimg_for3x3(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr3x3(I,mask);
14205 - else cimg_forZV(*this,z,v) cimg_for3x3(*this,x,y,z,v,I) {
14206 - const double norm = (double)cimg_squaresum3x3(I);
14207 - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr3x3(I,mask)/std::sqrt(norm)):0;
14208 - }
14209 - } break;
14210 - case 2: {
14211 - CImg_2x2(I,T);
14212 - if (!weighted_correl) cimg_forZV(*this,z,v) cimg_for2x2(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr2x2(I,mask);
14213 - else cimg_forZV(*this,z,v) cimg_for2x2(*this,x,y,z,v,I) {
14214 - const double norm = (double)cimg_squaresum2x2(I);
14215 - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr2x2(I,mask)/std::sqrt(norm)):0;
14216 - }
14217 - } break;
14218 - case 1: dest = mask(0)*(*this); break;
14219 - }
14220 - }
14221 - } else {
14222 - // Generic version for other masks
14223 - const int cxm=mask.width/2, cym=mask.height/2, czm=mask.depth/2, fxm=cxm-1+(mask.width%2), fym=cym-1+(mask.height%2), fzm=czm-1+(mask.depth%2);
14224 - cimg_forV(*this,v)
14225 - if (!weighted_correl) { // Classical correlation
14226 - for (int z=czm; z<dimz()-czm; z++) for (int y=cym; y<dimy()-cym; y++) for (int x=cxm; x<dimx()-cxm; x++) {
14227 - ftype val = 0;
14228 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
14229 - val+= (*this)(x+xm,y+ym,z+zm,v)*mask(cxm+xm,cym+ym,czm+zm,0);
14230 - dest(x,y,z,v)=(restype)val;
14231 - }
14232 - if (cond) cimg_forYZV(*this,y,z,v)
14233 - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
14234 - ftype val = 0;
14235 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
14236 - val+= pix3d(x+xm,y+ym,z+zm,v)*mask(cxm+xm,cym+ym,czm+zm,0);
14237 - dest(x,y,z,v)=(restype)val;
14238 - }
14239 - else cimg_forYZV(*this,y,z,v)
14240 - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
14241 - ftype val = 0;
14242 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
14243 - val+= pix3d(x+xm,y+ym,z+zm,v,0)*mask(cxm+xm,cym+ym,czm+zm,0);
14244 - dest(x,y,z,v)=(restype)val;
14245 - }
14246 - } else { // Weighted correlation
14247 - for (int z=czm; z<dimz()-czm; z++) for (int y=cym; y<dimy()-cym; y++) for (int x=cxm; x<dimx()-cxm; x++) {
14248 - ftype val = 0, norm = 0;
14249 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) {
14250 - const T cval = (*this)(x+xm,y+ym,z+zm,v);
14251 - val+= cval*mask(cxm+xm,cym+ym,czm+zm,0);
14252 - norm+= cval*cval;
14253 - }
14254 - dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt((double)norm)):0;
14255 - }
14256 - if (cond) cimg_forYZV(*this,y,z,v)
14257 - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
14258 - ftype val = 0, norm = 0;
14259 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) {
14260 - const T cval = pix3d(x+xm,y+ym,z+zm,v);
14261 - val+= cval*mask(cxm+xm,cym+ym,czm+zm,0);
14262 - norm+=cval*cval;
14263 - }
14264 - dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt((double)norm)):0;
14265 - }
14266 - else cimg_forYZV(*this,y,z,v)
14267 - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
14268 - ftype val = 0, norm = 0;
14269 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) {
14270 - const T cval = pix3d(x+xm,y+ym,z+zm,v,0);
14271 - val+= cval*mask(cxm+xm,cym+ym,czm+zm,0);
14272 - norm+= cval*cval;
14273 - }
14274 - dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt((double)norm)):0;
14275 - }
14276 - }
14277 - }
14278 - return dest;
14279 - }
14280 -
14281 -
14282 - //! Correlate the image by a mask
14283 - /**
14284 - This is the in-place version of get_correlate.
14285 - \see get_correlate
14286 - **/
14287 - template<typename t> CImg& correlate(const CImg<t>& mask,const unsigned int cond=1,const bool weighted_correl=false) {
14288 - return get_correlate(mask,cond,weighted_correl).swap(*this);
14289 - }
14290 -
14291 - //! Return the convolution of the image by a mask
14292 - /**
14293 - The result \p res of the convolution of an image \p img by a mask \p mask is defined to be :
14294 -
14295 - res(x,y,z) = sum_{i,j,k} img(x-i,y-j,z-k)*mask(i,j,k)
14296 -
14297 - \param mask = the correlation kernel.
14298 - \param cond = the border condition type (0=zero, 1=dirichlet)
14299 - \param weighted_convol = enable local normalization.
14300 - **/
14301 - template<typename t> CImg<typename cimg::largest<T,t>::type>
14302 - get_convolve(const CImg<t>& mask, const unsigned int cond=1, const bool weighted_convol=false) const {
14303 - typedef typename cimg::largest<T,t>::type restype;
14304 - typedef typename cimg::largest<t,float>::type fftype;
14305 - typedef typename cimg::largest<T,fftype>::type ftype;
14306 -
14307 - if (is_empty()) return CImg<restype>();
14308 - if (mask.is_empty() || mask.dim!=1)
14309 - throw CImgArgumentException("CImg<%s>::get_convolve() : Specified mask (%u,%u,%u,%u,%p) is not scalar.",
14310 - pixel_type(),mask.width,mask.height,mask.depth,mask.dim,mask.data);
14311 - CImg<restype> dest(width,height,depth,dim);
14312 - if (cond && mask.width==mask.height && ((mask.depth==1 && mask.width<=5) || (mask.depth==mask.width && mask.width<=3))) { // optimized version
14313 - switch (mask.depth) {
14314 - case 3: {
14315 - CImg_3x3x3(I,T);
14316 - if (!weighted_convol) cimg_forZV(*this,z,v) cimg_for3x3x3(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_conv3x3x3(I,mask);
14317 - else cimg_forZV(*this,z,v) cimg_for3x3x3(*this,x,y,z,v,I) {
14318 - const double norm = (double)cimg_squaresum3x3x3(I);
14319 - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv3x3x3(I,mask)/std::sqrt(norm)):0;
14320 - }
14321 - } break;
14322 - case 2: {
14323 - CImg_2x2x2(I,T);
14324 - if (!weighted_convol) cimg_forZV(*this,z,v) cimg_for2x2x2(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_conv2x2x2(I,mask);
14325 - else cimg_forZV(*this,z,v) cimg_for2x2x2(*this,x,y,z,v,I) {
14326 - const double norm = (double)cimg_squaresum2x2x2(I);
14327 - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv2x2x2(I,mask)/std::sqrt(norm)):0;
14328 - }
14329 - } break;
14330 - default:
14331 - case 1:
14332 - switch (mask.width) {
14333 - case 5: {
14334 - CImg_5x5(I,T);
14335 - if (!weighted_convol) cimg_forZV(*this,z,v) cimg_for5x5(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_conv5x5(I,mask);
14336 - else cimg_forZV(*this,z,v) cimg_for5x5(*this,x,y,z,v,I) {
14337 - const double norm = (double)cimg_squaresum5x5(I);
14338 - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv5x5(I,mask)/std::sqrt(norm)):0;
14339 - }
14340 - } break;
14341 - case 4: {
14342 - CImg_4x4(I,T);
14343 - if (!weighted_convol) cimg_forZV(*this,z,v) cimg_for4x4(*this,x,y,z,v,I) dest(x,y,z,v) = (T)cimg_conv4x4(I,mask);
14344 - else cimg_forZV(*this,z,v) cimg_for4x4(*this,x,y,z,v,I) {
14345 - const double norm = (double)cimg_squaresum4x4(I);
14346 - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv4x4(I,mask)/std::sqrt(norm)):0;
14347 - }
14348 - } break;
14349 - case 3: {
14350 - CImg_3x3(I,T);
14351 - if (!weighted_convol) cimg_forZV(*this,z,v) cimg_for3x3(*this,x,y,z,v,I) dest(x,y,z,v) = (T)cimg_conv3x3(I,mask);
14352 - else cimg_forZV(*this,z,v) cimg_for3x3(*this,x,y,z,v,I) {
14353 - const double norm = (double)cimg_squaresum3x3(I);
14354 - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv3x3(I,mask)/std::sqrt(norm)):0;
14355 - }
14356 - } break;
14357 - case 2: {
14358 - CImg_2x2(I,T);
14359 - if (!weighted_convol) cimg_forZV(*this,z,v) cimg_for2x2(*this,x,y,z,v,I) dest(x,y,z,v) = (T)cimg_conv2x2(I,mask);
14360 - else cimg_forZV(*this,z,v) cimg_for2x2(*this,x,y,z,v,I) {
14361 - const double norm = (double)cimg_squaresum2x2(I);
14362 - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv2x2(I,mask)/std::sqrt(norm)):0;
14363 - }
14364 - } break;
14365 - case 1: dest = mask(0)*(*this); break;
14366 - }
14367 - }
14368 - } else { // generic version
14369 -
14370 - const int cxm=mask.width/2, cym=mask.height/2, czm=mask.depth/2, fxm=cxm-1+(mask.width%2), fym=cym-1+(mask.height%2), fzm=czm-1+(mask.depth%2);
14371 - cimg_forV(*this,v)
14372 - if (!weighted_convol) { // Classical convolution
14373 - for (int z=czm; z<dimz()-czm; z++) for (int y=cym; y<dimy()-cym; y++) for (int x=cxm; x<dimx()-cxm; x++) {
14374 - ftype val = 0;
14375 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
14376 - val+= (*this)(x-xm,y-ym,z-zm,v)*mask(cxm+xm,cym+ym,czm+zm,0);
14377 - dest(x,y,z,v)=(restype)val;
14378 - }
14379 - if (cond) cimg_forYZV(*this,y,z,v)
14380 - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
14381 - ftype val = 0;
14382 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
14383 - val+= pix3d(x-xm,y-ym,z-zm,v)*mask(cxm+xm,cym+ym,czm+zm,0);
14384 - dest(x,y,z,v)=(restype)val;
14385 - }
14386 - else cimg_forYZV(*this,y,z,v)
14387 - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
14388 - ftype val = 0;
14389 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
14390 - val+= pix3d(x-xm,y-ym,z-zm,v,0)*mask(cxm+xm,cym+ym,czm+zm,0);
14391 - dest(x,y,z,v)=(restype)val;
14392 - }
14393 - } else { // Weighted convolution
14394 - for (int z=czm; z<dimz()-czm; z++) for (int y=cym; y<dimy()-cym; y++) for (int x=cxm; x<dimx()-cxm; x++) {
14395 - ftype val = 0, norm = 0;
14396 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) {
14397 - const T cval = (*this)(x-xm,y-ym,z-zm,v);
14398 - val+= cval*mask(cxm+xm,cym+ym,czm+zm,0);
14399 - norm+= cval*cval;
14400 - }
14401 - dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt(norm)):0;
14402 - }
14403 - if (cond) cimg_forYZV(*this,y,z,v)
14404 - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
14405 - ftype val = 0, norm = 0;
14406 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) {
14407 - const T cval = pix3d(x-xm,y-ym,z-zm,v);
14408 - val+= cval*mask(cxm+xm,cym+ym,czm+zm,0);
14409 - norm+=cval*cval;
14410 - }
14411 - dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt(norm)):0;
14412 - }
14413 - else cimg_forYZV(*this,y,z,v)
14414 - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
14415 - double val = 0, norm = 0;
14416 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) {
14417 - const T cval = pix3d(x-xm,y-ym,z-zm,v,0);
14418 - val+= cval*mask(cxm+xm,cym+ym,czm+zm,0);
14419 - norm+= cval*cval;
14420 - }
14421 - dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt(norm)):0;
14422 - }
14423 - }
14424 - }
14425 - return dest;
14426 - }
14427 -
14428 - //! Convolve the image by a mask
14429 - /**
14430 - This is the in-place version of get_convolve().
14431 - \see get_convolve()
14432 - **/
14433 - template<typename t> CImg& convolve(const CImg<t>& mask,const unsigned int cond=1,const bool weighted_convol=false) {
14434 - return get_convolve(mask,cond,weighted_convol).swap(*this);
14435 - }
14436 -
14437 - //! Return the erosion of the image by a structuring element.
14438 - template<typename t> CImg<typename cimg::largest<T,t>::type>
14439 - get_erode(const CImg<t>& mask, const unsigned int cond=1, const bool weighted_erosion=false) const {
14440 - typedef typename cimg::largest<T,t>::type restype;
14441 - if (is_empty()) return CImg<restype>();
14442 - if (mask.is_empty() || mask.dim!=1)
14443 - throw CImgArgumentException("CImg<%s>::get_erosion() : Specified mask (%u,%u,%u,%u,%p) is not a scalar image.",
14444 - pixel_type(),mask.width,mask.height,mask.depth,mask.dim,mask.data);
14445 - CImg<restype> dest(width,height,depth,dim);
14446 - const int cxm=mask.width/2, cym=mask.height/2, czm=mask.depth/2,
14447 - fxm=cxm-1+(mask.width%2), fym=cym-1+(mask.height%2), fzm=czm-1+(mask.depth%2);
14448 - cimg_forV(*this,v)
14449 - if (!weighted_erosion) { // Classical erosion
14450 - for (int z=czm; z<dimz()-czm; z++) for (int y=cym; y<dimy()-cym; y++) for (int x=cxm; x<dimx()-cxm; x++) {
14451 - restype min_val = cimg::type<restype>::max();
14452 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
14453 - if (mask(cxm+xm,cym+ym,czm+zm,0)) min_val = cimg::min((restype)(*this)(x+xm,y+ym,z+zm,v),min_val);
14454 - dest(x,y,z,v)=min_val;
14455 - }
14456 - if (cond) cimg_forYZV(*this,y,z,v)
14457 - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
14458 - restype min_val = cimg::type<restype>::max();
14459 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
14460 - if (mask(cxm+xm,cym+ym,czm+zm,0)) min_val = cimg::min((restype)pix3d(x+xm,y+ym,z+zm,v),min_val);
14461 - dest(x,y,z,v)=min_val;
14462 - }
14463 - else cimg_forYZV(*this,y,z,v)
14464 - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
14465 - restype min_val = cimg::type<restype>::max();
14466 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
14467 - if (mask(cxm+xm,cym+ym,czm+zm,0)) min_val = cimg::min((restype)pix3d(x+xm,y+ym,z+zm,v,0),min_val);
14468 - dest(x,y,z,v)=min_val;
14469 - }
14470 - } else { // Weighted erosion
14471 - t mval=0;
14472 - for (int z=czm; z<dimz()-czm; z++) for (int y=cym; y<dimy()-cym; y++) for (int x=cxm; x<dimx()-cxm; x++) {
14473 - restype min_val = cimg::type<restype>::max();
14474 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
14475 - if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) min_val = cimg::min((restype)((*this)(x+xm,y+ym,z+zm,v)+mval),min_val);
14476 - dest(x,y,z,v)=min_val;
14477 - }
14478 - if (cond) cimg_forYZV(*this,y,z,v)
14479 - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
14480 - restype min_val = cimg::type<restype>::max();
14481 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
14482 - if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) min_val = cimg::min((restype)(pix3d(x+xm,y+ym,z+zm,v)+mval),min_val);
14483 - dest(x,y,z,v)=min_val;
14484 - }
14485 - else cimg_forYZV(*this,y,z,v)
14486 - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
14487 - restype min_val = cimg::type<restype>::max();
14488 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
14489 - if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) min_val = cimg::min((restype)(pix3d(x+xm,y+ym,z+zm,v,0)+mval),min_val);
14490 - dest(x,y,z,v)=min_val;
14491 - }
14492 - }
14493 - return dest;
14494 - }
14495 -
14496 - //! Erode the image by a structuring element
14497 - /**
14498 - This is the in-place version of get_erode().
14499 - \see get_erode()
14500 - **/
14501 - template<typename t> CImg& erode(const CImg<t>& mask,const unsigned int cond=1,const bool weighted_erosion=false) {
14502 - return get_erode(mask,cond,weighted_erosion).swap(*this);
14503 - }
14504 -
14505 - //! Erode the image by a square structuring element of size n
14506 - CImg get_erode(const unsigned int n, const unsigned int cond=1) const {
14507 - static CImg<T> mask;
14508 - if (mask.width!=n) mask.assign(n,n,1,1,1);
14509 - const CImg<T> res = get_erode(mask,cond,false);
14510 - if (n>20) mask.assign();
14511 - return res;
14512 - }
14513 -
14514 - //! Erode the image by a square structuring element of size n
14515 - CImg& erode(const unsigned int n, const unsigned int cond=1) {
14516 - return get_erode(n,cond).swap(*this);
14517 - }
14518 -
14519 - //! Return the dilatation of the image by a structuring element.
14520 - template<typename t> CImg<typename cimg::largest<T,t>::type>
14521 - get_dilate(const CImg<t>& mask, const unsigned int cond=1, const bool weighted_dilatation=false) const {
14522 - typedef typename cimg::largest<T,t>::type restype;
14523 - if (is_empty()) return CImg<restype>();
14524 - if (mask.is_empty() || mask.dim!=1)
14525 - throw CImgArgumentException("CImg<%s>::get_dilate() : Specified mask (%u,%u,%u,%u,%p) is not a scalar image.",
14526 - pixel_type(),mask.width,mask.height,mask.depth,mask.dim,mask.data);
14527 - CImg<restype> dest(width,height,depth,dim);
14528 - const int cxm=mask.width/2, cym=mask.height/2, czm=mask.depth/2,
14529 - fxm=cxm-1+(mask.width%2), fym=cym-1+(mask.height%2), fzm=czm-1+(mask.depth%2);
14530 - cimg_forV(*this,v)
14531 - if (!weighted_dilatation) { // Classical dilatation
14532 - for (int z=czm; z<dimz()-czm; z++) for (int y=cym; y<dimy()-cym; y++) for (int x=cxm; x<dimx()-cxm; x++) {
14533 - restype max_val = cimg::type<restype>::min();
14534 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
14535 - if (mask(cxm+xm,cym+ym,czm+zm,0)) max_val = cimg::max((restype)(*this)(x+xm,y+ym,z+zm,v),max_val);
14536 - dest(x,y,z,v)=max_val;
14537 - }
14538 - if (cond) cimg_forYZV(*this,y,z,v)
14539 - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
14540 - restype max_val = cimg::type<restype>::min();
14541 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
14542 - if (mask(cxm+xm,cym+ym,czm+zm,0)) max_val = cimg::max((restype)pix3d(x+xm,y+ym,z+zm,v),max_val);
14543 - dest(x,y,z,v)=max_val;
14544 - }
14545 - else cimg_forYZV(*this,y,z,v)
14546 - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
14547 - restype max_val = cimg::type<restype>::min();
14548 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
14549 - if (mask(cxm+xm,cym+ym,czm+zm,0)) max_val = cimg::max((restype)pix3d(x+xm,y+ym,z+zm,v,0),max_val);
14550 - dest(x,y,z,v)=max_val;
14551 - }
14552 - } else { // Weighted dilatation
14553 - t mval=0;
14554 - for (int z=czm; z<dimz()-czm; z++) for (int y=cym; y<dimy()-cym; y++) for (int x=cxm; x<dimx()-cxm; x++) {
14555 - restype max_val = cimg::type<restype>::min();
14556 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
14557 - if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) max_val = cimg::max((restype)((*this)(x+xm,y+ym,z+zm,v)-mval),max_val);
14558 - dest(x,y,z,v)=max_val;
14559 - }
14560 - if (cond) cimg_forYZV(*this,y,z,v)
14561 - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
14562 - restype max_val = cimg::type<restype>::min();
14563 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
14564 - if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) max_val = cimg::max((restype)(pix3d(x+xm,y+ym,z+zm,v)-mval),max_val);
14565 - dest(x,y,z,v)=max_val;
14566 - }
14567 - else cimg_forYZV(*this,y,z,v)
14568 - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
14569 - restype max_val = cimg::type<restype>::min();
14570 - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
14571 - if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) max_val = cimg::max((restype)(pix3d(x+xm,y+ym,z+zm,v,0)-mval),max_val);
14572 - dest(x,y,z,v)=max_val;
14573 - }
14574 - }
14575 - return dest;
14576 - }
14577 -
14578 - //! Dilate the image by a structuring element
14579 - /**
14580 - This is the in-place version of get_dilate().
14581 - \see get_dilate()
14582 - **/
14583 - template<typename t> CImg& dilate(const CImg<t>& mask,const unsigned int cond=1,const bool weighted_dilatation=false) {
14584 - return get_dilate(mask,cond,weighted_dilatation).swap(*this);
14585 - }
14586 -
14587 - //! Dilate the image by a square structuring element of size n
14588 - CImg get_dilate(const unsigned int n, const unsigned int cond=1) const {
14589 - static CImg<T> mask;
14590 - if (mask.width!=n) mask.assign(n,n,1,1,1);
14591 - const CImg<T> res = get_dilate(mask,cond,false);
14592 - if (n>20) mask.assign();
14593 - return res;
14594 - }
14595 -
14596 - //! Dilate the image by a square structuring element of size n
14597 - CImg& dilate(const unsigned int n, const unsigned int cond=1) {
14598 - return get_dilate(n,cond).swap(*this);
14599 - }
14600 -
14601 - //! Add noise to the image
14602 - /**
14603 - This is the in-place version of get_noise.
14604 - \see get_noise.
14605 - **/
14606 - CImg& noise(const double sigma=-20, const unsigned int ntype=0) {
14607 - if (!is_empty()) {
14608 - double nsigma = sigma, max = (double)cimg::type<T>::max(), min = (double)cimg::type<T>::min();
14609 - static bool first_time = true;
14610 - if (first_time) { std::srand((unsigned int)::time(0)); first_time = false; }
14611 - CImgStats st;
14612 - if (nsigma==0) return *this;
14613 - if (nsigma<0 || ntype==2) st = CImgStats(*this,false);
14614 - if (nsigma<0) nsigma = -nsigma*(st.max-st.min)/100.0;
14615 - switch (ntype) {
14616 - case 0: { // Gaussian noise
14617 - cimg_for(*this,ptr,T) {
14618 - double val = *ptr+nsigma*cimg::grand();
14619 - if (val>max) val = max;
14620 - if (val<min) val = min;
14621 - *ptr = (T)val;
14622 - }
14623 - } break;
14624 - case 1: { // Uniform noise
14625 - cimg_for(*this,ptr,T) {
14626 - double val = *ptr+nsigma*cimg::crand();
14627 - if (val>max) val = max;
14628 - if (val<min) val = min;
14629 - *ptr = (T)val;
14630 - }
14631 - } break;
14632 - case 2: { // Salt & Pepper noise
14633 - if (st.max==st.min) { st.min=0; st.max=255; }
14634 - cimg_for(*this,ptr,T) if (cimg::rand()*100<nsigma) *ptr=(T)(cimg::rand()<0.5?st.max:st.min);
14635 - } break;
14636 - case 3: { // Poisson Noise
14637 - cimg_for(*this,ptr,T) {
14638 - const double z = (double)*ptr;
14639 - if (z<=1.0e-10) *ptr=(T)0;
14640 - else {
14641 - if (z>100.0) *ptr = (T)(unsigned int)((std::sqrt(z) * cimg::grand()) + z);
14642 - else {
14643 - unsigned int k = 0;
14644 - const double y=std::exp(-z);
14645 - for (double s=1.0; s>=y; k++) s *= cimg::rand();
14646 - *ptr=(T)(k-1);
14647 - }
14648 - }
14649 - }
14650 - } break;
14651 - case 4: { // Rice noise
14652 - const double sqrt2 = (double)std::sqrt(2.0);
14653 - cimg_for(*this,ptr,T) {
14654 - const double
14655 - val0 = (double)*ptr/sqrt2,
14656 - re = val0 + nsigma*cimg::grand(),
14657 - im = val0 + nsigma*cimg::grand();
14658 - double val = std::sqrt(re*re + im*im);
14659 - if (val>max) val = max;
14660 - if (val<min) val = min;
14661 - *ptr = (T)val;
14662 - }
14663 - } break;
14664 - }
14665 - }
14666 - return *this;
14667 - }
14668 -
14669 - //! Return a noisy image
14670 - /**
14671 - \param sigma = power of the noise. if sigma<0, it corresponds to the percentage of the maximum image value.
14672 - \param ntype = noise type. can be 0=gaussian, 1=uniform or 2=Salt and Pepper.
14673 - \return A noisy version of the instance image.
14674 - **/
14675 - CImg get_noise(const double sigma=-20,const unsigned int ntype=0) const {
14676 - return (+*this).noise(sigma,ntype);
14677 - }
14678 -
14679 -#define cimg_deriche_apply(x0,y0,z0,k0,nb,offset,T) { \
14680 - ima = ptr(x0,y0,z0,k0); \
14681 - I2 = *ima; ima+=offset; I1 = *ima; ima+=offset; \
14682 - Y2 = *(Y++) = sumg0*I2; Y1 = *(Y++) = g0*I1 + sumg1*I2; \
14683 - for (i=2; i<(nb); i++) { I1 = *ima; ima+=offset; \
14684 - Y0 = *(Y++) = a1*I1 + a2*I2 + b1*Y1 + b2*Y2; \
14685 - I2=I1; Y2=Y1; Y1=Y0; } \
14686 - ima-=offset; I2 = *ima; Y2 = Y1 = parity*sumg1*I2; *ima = (T)(*(--Y)+Y2); \
14687 - ima-=offset; I1 = *ima; *ima = (T)(*(--Y)+Y1); \
14688 - for (i=(nb)-3; i>=0; i--) { Y0=a3*I1+a4*I2+b1*Y1+b2*Y2; ima-=offset; \
14689 - I2=I1; I1=*ima; *ima=(T)(*(--Y)+Y0); Y2=Y1; Y1=Y0; } \
14690 - }
14691 -
14692 - //! Apply a deriche filter on the image
14693 - /**
14694 - This is the in-place version of get_deriche
14695 - \see get_deriche.
14696 - **/
14697 - CImg& deriche(const float sigma=1,const int order=0,const char axe='x',const unsigned int cond=1) {
14698 - if (!is_empty()) {
14699 - if (sigma<0 || order<0 || order>2)
14700 - throw CImgArgumentException("CImg<%s>::deriche() : Bad arguments (sigma=%g, order=%d)",pixel_type(),sigma,order);
14701 - const float alpha=sigma>0?(1.695f/sigma):20,ea=(float)std::exp(alpha),ema=(float)std::exp(-alpha),em2a=ema*ema,b1=2*ema,b2=-em2a;
14702 - float ek,ekn,parity,a1,a2,a3,a4,g0,sumg1,sumg0;
14703 - double *Y,Y0,Y1,Y2;
14704 - int i,offset,nb;
14705 - T *ima,I1,I2;
14706 - switch(order) {
14707 - case 1: // first derivative
14708 - ek = -(1-ema)*(1-ema)*(1-ema)/(2*(ema+1)*ema); a1 = a4 = 0; a2 = ek*ema; a3 = -ek*ema; parity =-1;
14709 - if (cond) { sumg1 = (ek*ea) / ((ea-1)*(ea-1)); g0 = 0; sumg0 = g0+sumg1; }
14710 - else g0 = sumg0 = sumg1 = 0;
14711 - break;
14712 - case 2: // second derivative
14713 - ekn = ( -2*(-1+3*ea-3*ea*ea+ea*ea*ea)/(3*ea+1+3*ea*ea+ea*ea*ea) );
14714 - ek = -(em2a-1)/(2*alpha*ema); a1 = ekn; a2 = -ekn*(1+ek*alpha)*ema; a3 = ekn*(1-ek*alpha)*ema; a4 = -ekn*em2a; parity =1;
14715 - if (cond) { sumg1 = ekn/2; g0 = ekn; sumg0 = g0+sumg1; }
14716 - else g0=sumg0=sumg1=0;
14717 - break;
14718 - default: // smoothing
14719 - ek = (1-ema)*(1-ema) / (1+2*alpha*ema - em2a); a1 = ek; a2 = ek*ema*(alpha-1); a3 = ek*ema*(alpha+1); a4 = -ek*em2a; parity = 1;
14720 - if (cond) { sumg1 = ek*(alpha*ea+ea-1) / ((ea-1)*(ea-1)); g0 = ek; sumg0 = g0+sumg1; }
14721 - else g0=sumg0=sumg1=0;
14722 - break;
14723 - }
14724 - // filter init
14725 - Y = new double[cimg::max(width,height,depth)];
14726 - switch(cimg::uncase(axe)) {
14727 - case 'x': if (width>1) { offset = 1; nb = width; cimg_forYZV(*this,y,z,k) cimg_deriche_apply(0,y,z,k,nb,offset,T); } break;
14728 - case 'y': if (height>1) { offset = width; nb = height; cimg_forXZV(*this,x,z,k) cimg_deriche_apply(x,0,z,k,nb,offset,T); } break;
14729 - case 'z': if (depth>1) { offset = width*height; nb = depth; cimg_forXYV(*this,x,y,k) cimg_deriche_apply(x,y,0,k,nb,offset,T); } break;
14730 - default: throw CImgArgumentException("CImg<%s>::deriche() : unknow axe '%c', must be 'x','y' or 'z'",pixel_type(),axe);
14731 - }
14732 - delete[] Y;
14733 - }
14734 - return *this;
14735 - }
14736 -
14737 - //! Return the result of the Deriche filter
14738 - /**
14739 - The Canny-Deriche filter is a recursive algorithm allowing to compute blurred derivatives of
14740 - order 0,1 or 2 of an image.
14741 - \see blur
14742 - **/
14743 - CImg get_deriche(const float sigma=1,const int order=0,const char axe='x',const unsigned int cond=1) const {
14744 - return (+*this).deriche(sigma,order,axe,cond);
14745 - }
14746 -
14747 - //! Blur the image with a Deriche filter (anisotropically)
14748 - /**
14749 - This is the in-place version of get_blur().
14750 - \see get_blur().
14751 - **/
14752 - CImg& blur(const float sigmax,const float sigmay,const float sigmaz,const unsigned int cond=1) {
14753 - if (!is_empty()) {
14754 - if (width>1 && sigmax>0) deriche(sigmax,0,'x',cond);
14755 - if (height>1 && sigmay>0) deriche(sigmay,0,'y',cond);
14756 - if (depth>1 && sigmaz>0) deriche(sigmaz,0,'z',cond);
14757 - }
14758 - return *this;
14759 - }
14760 -
14761 - //! Blur the image with a Canny-Deriche filter.
14762 - /** This is the in-place version of get_blur(). **/
14763 - CImg& blur(const float sigma,const unsigned int cond=1) { return blur(sigma,sigma,sigma,cond); }
14764 -
14765 - //! Return a blurred version of the image, using a Canny-Deriche filter.
14766 - /**
14767 - Blur the image with an anisotropic exponential filter (Deriche filter of order 0).
14768 - **/
14769 - CImg get_blur(const float sigmax,const float sigmay,const float sigmaz,const unsigned int cond=1) const {
14770 - return (+*this).blur(sigmax,sigmay,sigmaz,cond);
14771 - }
14772 -
14773 - //! Return a blurred version of the image, using a Canny-Deriche filter.
14774 - CImg get_blur(const float sigma,const unsigned int cond=1) const {
14775 - return (+*this).blur(sigma,cond);
14776 - }
14777 -
14778 - //! Blur an image following a field of diffusion tensors.
14779 - /** This is the in-place version of get_blur_anisotropic(). **/
14780 - template<typename t>
14781 - CImg& blur_anisotropic(const CImg<t>& G, const float amplitude=60.0f, const float dl=0.8f,const float da=30.0f,
14782 - const float gauss_prec=2.0f, const unsigned int interpolation=0, const bool fast_approx=true) {
14783 -#define cimg_valign2d(i,j) \
14784 - { ftype &u = W(i,j,0,0), &v = W(i,j,0,1); \
14785 - if (u*curru + v*currv<0) { u=-u; v=-v; }}
14786 -#define cimg_valign3d(i,j,k) \
14787 - { ftype &u = W(i,j,k,0), &v = W(i,j,k,1), &w = W(i,j,k,2); \
14788 - if (u*curru + v*currv + w*currw<0) { u=-u; v=-v; w=-w; }}
14789 -
14790 - // Check arguments and init variables
14791 - typedef typename cimg::largest<T,float>::type ftype;
14792 - if (!is_empty() && amplitude>0) {
14793 - if (G.is_empty() || (G.dim!=3 && G.dim!=6) || G.width!=width || G.height!=height || G.depth!=depth)
14794 - throw CImgArgumentException("CImg<%s>::blur_anisotropic() : Specified tensor field (%u,%u,%u,%u) is not valid.",
14795 - pixel_type(),G.width,G.height,G.depth,G.dim);
14796 -
14797 - const float sqrt2amplitude = (float)std::sqrt(2*amplitude);
14798 - const bool threed = (G.dim>=6);
14799 - const int
14800 - dx1 = dimx()-1,
14801 - dy1 = dimy()-1,
14802 - dz1 = dimz()-1;
14803 - CImg<ftype>
14804 - dest(width,height,depth,dim,0),
14805 - W(width,height,depth,threed?4:3),
14806 - tmp(dim);
14807 - int N = 0;
14808 -
14809 - if (threed)
14810 - // 3D version of the algorithm
14811 - for (float phi=(180%(int)da)/2.0f; phi<=180; phi+=da) {
14812 - const float
14813 - phir = (float)(phi*cimg::PI/180),
14814 - datmp = (float)(da/std::cos(phir)),
14815 - da2 = datmp<1?360.0f:datmp;
14816 -
14817 - for (float theta=0; theta<360; (theta+=da2),N++) {
14818 - const float
14819 - thetar = (float)(theta*cimg::PI/180),
14820 - vx = (float)(std::cos(thetar)*std::cos(phir)),
14821 - vy = (float)(std::sin(thetar)*std::cos(phir)),
14822 - vz = (float)std::sin(phir);
14823 - const t
14824 - *pa = G.ptr(0,0,0,0),
14825 - *pb = G.ptr(0,0,0,1),
14826 - *pc = G.ptr(0,0,0,2),
14827 - *pd = G.ptr(0,0,0,3),
14828 - *pe = G.ptr(0,0,0,4),
14829 - *pf = G.ptr(0,0,0,5);
14830 - ftype
14831 - *pd0 = W.ptr(0,0,0,0),
14832 - *pd1 = W.ptr(0,0,0,1),
14833 - *pd2 = W.ptr(0,0,0,2),
14834 - *pd3 = W.ptr(0,0,0,3);
14835 - cimg_forXYZ(G,xg,yg,zg) {
14836 - const t
14837 - a = *(pa++), b = *(pb++), c = *(pc++),
14838 - d = *(pd++), e = *(pe++), f = *(pf++);
14839 - const float
14840 - u = (float)(a*vx + b*vy + c*vz),
14841 - v = (float)(b*vx + d*vy + e*vz),
14842 - w = (float)(c*vx + e*vy + f*vz),
14843 - n = (float)std::sqrt(1e-5+u*u+v*v+w*w),
14844 - dln = dl/n;
14845 - *(pd0++) = (ftype)(u*dln);
14846 - *(pd1++) = (ftype)(v*dln);
14847 - *(pd2++) = (ftype)(w*dln);
14848 - *(pd3++) = (ftype)n;
14849 - }
14850 -
14851 - cimg_forXYZ(*this,x,y,z) {
14852 - tmp.fill(0);
14853 - const float
14854 - cu = (float)W(x,y,z,0),
14855 - cv = (float)W(x,y,z,1),
14856 - cw = (float)W(x,y,z,2),
14857 - n = (float)W(x,y,z,3),
14858 - fsigma = (float)(n*sqrt2amplitude),
14859 - length = gauss_prec*fsigma,
14860 - fsigma2 = 2*fsigma*fsigma;
14861 - float
14862 - S = 0,
14863 - pu = cu,
14864 - pv = cv,
14865 - pw = cw,
14866 - X = (float)x,
14867 - Y = (float)y,
14868 - Z = (float)z;
14869 -
14870 - switch (interpolation) {
14871 - case 0:
14872 - // Nearest neighbor
14873 - for (float l=0; l<length && X>=0 && X<=dx1 && Y>=0 && Y<=dy1 && Z>=0 && Z<=dz1; l+=dl) {
14874 - const int
14875 - cx = (int)(X+0.5f),
14876 - cy = (int)(Y+0.5f),
14877 - cz = (int)(Z+0.5f);
14878 - float
14879 - u = (float)W(cx,cy,cz,0),
14880 - v = (float)W(cx,cy,cz,1),
14881 - w = (float)W(cx,cy,cz,2);
14882 - if ((pu*u + pv*v + pw*w)<0) { u=-u; v=-v; w=-w; }
14883 - if (fast_approx) { cimg_forV(*this,k) tmp[k]+=(ftype)(*this)(cx,cy,cz,k); S++; }
14884 - else {
14885 - const float coef = (float)std::exp(-l*l/fsigma2);
14886 - cimg_forV(*this,k) tmp[k]+=(ftype)(coef*(*this)(cx,cy,cz,k));
14887 - S+=coef;
14888 - }
14889 - X+=(pu=u); Y+=(pv=v); Z+=(pw=w);
14890 - } break;
14891 -
14892 - case 1:
14893 - // Linear interpolation
14894 - for (float l=0; l<length && X>=0 && X<=dx1 && Y>=0 && Y<=dy1 && Z>=0 && Z<=dz1; l+=dl) {
14895 - const int
14896 - cx = (int)X, px = (cx-1<0)?0:cx-1, nx = (cx+1>dx1)?dx1:cx+1,
14897 - cy = (int)Y, py = (cy-1<0)?0:cy-1, ny = (cy+1>dy1)?dy1:cy+1,
14898 - cz = (int)Z, pz = (cz-1<0)?0:cz-1, nz = (cz+1>dz1)?dz1:cz+1;
14899 - const float
14900 - curru = (float)W(cx,cy,cz,0),
14901 - currv = (float)W(cx,cy,cz,1),
14902 - currw = (float)W(cx,cy,cz,2);
14903 - cimg_valign3d(px,py,pz); cimg_valign3d(cx,py,pz); cimg_valign3d(nx,py,pz);
14904 - cimg_valign3d(px,cy,pz); cimg_valign3d(cx,cy,pz); cimg_valign3d(nx,cy,pz);
14905 - cimg_valign3d(px,ny,pz); cimg_valign3d(cx,ny,pz); cimg_valign3d(nx,ny,pz);
14906 - cimg_valign3d(px,py,cz); cimg_valign3d(cx,py,cz); cimg_valign3d(nx,py,cz);
14907 - cimg_valign3d(px,cy,cz); cimg_valign3d(nx,cy,cz);
14908 - cimg_valign3d(px,ny,cz); cimg_valign3d(cx,ny,cz); cimg_valign3d(nx,ny,cz);
14909 - cimg_valign3d(px,py,nz); cimg_valign3d(cx,py,nz); cimg_valign3d(nx,py,nz);
14910 - cimg_valign3d(px,cy,nz); cimg_valign3d(cx,cy,nz); cimg_valign3d(nx,cy,nz);
14911 - cimg_valign3d(px,ny,nz); cimg_valign3d(cx,ny,nz); cimg_valign3d(nx,ny,nz);
14912 - float
14913 - u = (float)(W.linear_pix3d(X,Y,Z,0)),
14914 - v = (float)(W.linear_pix3d(X,Y,Z,1)),
14915 - w = (float)(W.linear_pix3d(X,Y,Z,2));
14916 - if ((pu*u + pv*v + pw*w)<0) { u=-u; v=-v; w=-w; }
14917 - if (fast_approx) { cimg_forV(*this,k) tmp[k]+=(ftype)linear_pix3d(X,Y,Z,k); S++; }
14918 - else {
14919 - const float coef = (float)std::exp(-l*l/fsigma2);
14920 - cimg_forV(*this,k) tmp[k]+=(ftype)(coef*linear_pix3d(X,Y,Z,k));
14921 - S+=coef;
14922 - }
14923 - X+=(pu=u); Y+=(pv=v); Z+=(pw=w);
14924 - } break;
14925 -
14926 - default:
14927 - // 2nd order Runge Kutta
14928 - for (float l=0; l<length && X>=0 && X<=dx1 && Y>=0 && Y<=dy1 && Z>=0 && Z<=dz1; l+=dl) {
14929 - const int
14930 - cx = (int)X, px = (cx-1<0)?0:cx-1, nx = (cx+1>dx1)?dx1:cx+1,
14931 - cy = (int)Y, py = (cy-1<0)?0:cy-1, ny = (cy+1>dy1)?dy1:cy+1,
14932 - cz = (int)Z, pz = (cz-1<0)?0:cz-1, nz = (cz+1>dz1)?dz1:cz+1;
14933 - const float
14934 - curru = (float)W(cx,cy,cz,0),
14935 - currv = (float)W(cx,cy,cz,1),
14936 - currw = (float)W(cx,cy,cz,2);
14937 - cimg_valign3d(px,py,pz); cimg_valign3d(cx,py,pz); cimg_valign3d(nx,py,pz);
14938 - cimg_valign3d(px,cy,pz); cimg_valign3d(cx,cy,pz); cimg_valign3d(nx,cy,pz);
14939 - cimg_valign3d(px,ny,pz); cimg_valign3d(cx,ny,pz); cimg_valign3d(nx,ny,pz);
14940 - cimg_valign3d(px,py,cz); cimg_valign3d(cx,py,cz); cimg_valign3d(nx,py,cz);
14941 - cimg_valign3d(px,cy,cz); cimg_valign3d(nx,cy,cz);
14942 - cimg_valign3d(px,ny,cz); cimg_valign3d(cx,ny,cz); cimg_valign3d(nx,ny,cz);
14943 - cimg_valign3d(px,py,nz); cimg_valign3d(cx,py,nz); cimg_valign3d(nx,py,nz);
14944 - cimg_valign3d(px,cy,nz); cimg_valign3d(cx,cy,nz); cimg_valign3d(nx,cy,nz);
14945 - cimg_valign3d(px,ny,nz); cimg_valign3d(cx,ny,nz); cimg_valign3d(nx,ny,nz);
14946 - const float
14947 - u0 = (float)(0.5f*W.linear_pix3d(X,Y,Z,0)),
14948 - v0 = (float)(0.5f*W.linear_pix3d(X,Y,Z,1)),
14949 - w0 = (float)(0.5f*W.linear_pix3d(X,Y,Z,2));
14950 - float
14951 - u = (float)(W.linear_pix3d(X+u0,Y+v0,Z+w0,0)),
14952 - v = (float)(W.linear_pix3d(X+u0,Y+v0,Z+w0,1)),
14953 - w = (float)(W.linear_pix3d(X+u0,Y+v0,Z+w0,2));
14954 - if ((pu*u + pv*v + pw*w)<0) { u=-u; v=-v; w=-w; }
14955 - if (fast_approx) { cimg_forV(*this,k) tmp[k]+=(ftype)linear_pix3d(X,Y,Z,k); S++; }
14956 - else {
14957 - const float coef = (float)std::exp(-l*l/fsigma2);
14958 - cimg_forV(*this,k) tmp[k]+=(ftype)(coef*linear_pix3d(X,Y,Z,k));
14959 - S+=coef;
14960 - }
14961 - X+=(pu=u); Y+=(pv=v); Z+=(pw=w);
14962 - } break;
14963 - }
14964 - if (S>0) cimg_forV(dest,k) dest(x,y,z,k)+=tmp[k]/S;
14965 - else cimg_forV(dest,k) dest(x,y,z,k)+=(ftype)((*this)(x,y,z,k));
14966 -#ifdef cimg_plugin_greycstoration
14967 - if (!*(greycstoration_params->stop_request)) (*greycstoration_params->counter)++;
14968 - else return *this;
14969 -#endif
14970 - }
14971 - }
14972 - } else
14973 - // 2D version of the algorithm
14974 - for (float theta=(360%(int)da)/2.0f; theta<360; (theta+=da),N++) {
14975 - const float
14976 - thetar = (float)(theta*cimg::PI/180),
14977 - vx = (float)(std::cos(thetar)),
14978 - vy = (float)(std::sin(thetar));
14979 - const t
14980 - *pa = G.ptr(0,0,0,0),
14981 - *pb = G.ptr(0,0,0,1),
14982 - *pc = G.ptr(0,0,0,2);
14983 - ftype
14984 - *pd0 = W.ptr(0,0,0,0),
14985 - *pd1 = W.ptr(0,0,0,1),
14986 - *pd2 = W.ptr(0,0,0,2);
14987 - cimg_forXY(G,xg,yg) {
14988 - const t a = *(pa++), b = *(pb++), c = *(pc++);
14989 - const float
14990 - u = (float)(a*vx + b*vy),
14991 - v = (float)(b*vx + c*vy),
14992 - n = (float)std::sqrt(1e-5+u*u+v*v),
14993 - dln = dl/n;
14994 - *(pd0++) = (ftype)(u*dln);
14995 - *(pd1++) = (ftype)(v*dln);
14996 - *(pd2++) = (ftype)n;
14997 - }
14998 -
14999 - cimg_forXY(*this,x,y) {
15000 - tmp.fill(0);
15001 - const float
15002 - cu = (float)W(x,y,0,0),
15003 - cv = (float)W(x,y,0,1),
15004 - n = (float)W(x,y,0,2),
15005 - fsigma = (float)(n*sqrt2amplitude),
15006 - length = gauss_prec*fsigma,
15007 - fsigma2 = 2*fsigma*fsigma;
15008 - float
15009 - S = 0,
15010 - pu = cu,
15011 - pv = cv,
15012 - X = (float)x,
15013 - Y = (float)y;
15014 -
15015 - switch (interpolation) {
15016 -
15017 - case 0:
15018 - // Nearest-neighbor interpolation for 2D images
15019 - for (float l=0; l<length && X>=0 && X<=dx1 && Y>=0 && Y<=dy1; l+=dl) {
15020 - const int
15021 - cx = (int)(X+0.5f),
15022 - cy = (int)(Y+0.5f);
15023 - float
15024 - u = (float)W(cx,cy,0,0),
15025 - v = (float)W(cx,cy,0,1);
15026 - if ((pu*u + pv*v)<0) { u=-u; v=-v; }
15027 - if (fast_approx) { cimg_forV(*this,k) tmp[k]+=(ftype)(*this)(cx,cy,0,k); S++; }
15028 - else {
15029 - const float coef = (float)std::exp(-l*l/fsigma2);
15030 - cimg_forV(*this,k) tmp[k]+=(ftype)(coef*(*this)(cx,cy,0,k));
15031 - S+=coef;
15032 - }
15033 - X+=(pu=u); Y+=(pv=v);
15034 - } break;
15035 -
15036 - case 1:
15037 - // Linear interpolation for 2D images
15038 - for (float l=0; l<length && X>=0 && X<=dx1 && Y>=0 && Y<=dy1; l+=dl) {
15039 - const int
15040 - cx = (int)X, px = (cx-1<0)?0:cx-1, nx = (cx+1>dx1)?dx1:cx+1,
15041 - cy = (int)Y, py = (cy-1<0)?0:cy-1, ny = (cy+1>dy1)?dy1:cy+1;
15042 - const float
15043 - curru = (float)W(cx,cy,0,0),
15044 - currv = (float)W(cx,cy,0,1);
15045 - cimg_valign2d(px,py); cimg_valign2d(cx,py); cimg_valign2d(nx,py);
15046 - cimg_valign2d(px,cy); cimg_valign2d(nx,cy);
15047 - cimg_valign2d(px,ny); cimg_valign2d(cx,ny); cimg_valign2d(nx,ny);
15048 - float
15049 - u = (float)(W.linear_pix2d(X,Y,0,0)),
15050 - v = (float)(W.linear_pix2d(X,Y,0,1));
15051 - if ((pu*u + pv*v)<0) { u=-u; v=-v; }
15052 - if (fast_approx) { cimg_forV(*this,k) tmp[k]+=(ftype)linear_pix2d(X,Y,0,k); S++; }
15053 - else {
15054 - const float coef = (float)std::exp(-l*l/fsigma2);
15055 - cimg_forV(*this,k) tmp[k]+=(ftype)(coef*linear_pix2d(X,Y,0,k));
15056 - S+=coef;
15057 - }
15058 - X+=(pu=u); Y+=(pv=v);
15059 - } break;
15060 -
15061 - default:
15062 - // 2nd-order Runge-kutta interpolation for 2D images
15063 - for (float l=0; l<length && X>=0 && X<=dx1 && Y>=0 && Y<=dy1; l+=dl) {
15064 - const int
15065 - cx = (int)X, px = (cx-1<0)?0:cx-1, nx = (cx+1>dx1)?dx1:cx+1,
15066 - cy = (int)Y, py = (cy-1<0)?0:cy-1, ny = (cy+1>dy1)?dy1:cy+1;
15067 - const float
15068 - curru = (float)W(cx,cy,0,0),
15069 - currv = (float)W(cx,cy,0,1);
15070 - cimg_valign2d(px,py); cimg_valign2d(cx,py); cimg_valign2d(nx,py);
15071 - cimg_valign2d(px,cy); cimg_valign2d(nx,cy);
15072 - cimg_valign2d(px,ny); cimg_valign2d(cx,ny); cimg_valign2d(nx,ny);
15073 - const float
15074 - u0 = (float)(0.5f*W.linear_pix2d(X,Y,0,0)),
15075 - v0 = (float)(0.5f*W.linear_pix2d(X,Y,0,1));
15076 - float
15077 - u = (float)(W.linear_pix2d(X+u0,Y+v0,0,0)),
15078 - v = (float)(W.linear_pix2d(X+u0,Y+v0,0,1));
15079 - if ((pu*u + pv*v)<0) { u=-u; v=-v; }
15080 - if (fast_approx) { cimg_forV(*this,k) tmp[k]+=(ftype)linear_pix2d(X,Y,0,k); S++; }
15081 - else {
15082 - const float coef = (float)std::exp(-l*l/fsigma2);
15083 - cimg_forV(*this,k) tmp[k]+=(ftype)(coef*linear_pix2d(X,Y,0,k));
15084 - S+=coef;
15085 - }
15086 - X+=(pu=u); Y+=(pv=v);
15087 - } break;
15088 - }
15089 - if (S>0) cimg_forV(dest,k) dest(x,y,0,k)+=tmp[k]/S;
15090 - else cimg_forV(dest,k) dest(x,y,0,k)+=(ftype)((*this)(x,y,0,k));
15091 -#ifdef cimg_plugin_greycstoration
15092 - if (!*(greycstoration_params->stop_request)) (*greycstoration_params->counter)++;
15093 - else return *this;
15094 -#endif
15095 - }
15096 - }
15097 - const ftype *ptrs = dest.data+dest.size();
15098 - const T m = cimg::type<T>::min(), M = cimg::type<T>::max();
15099 - cimg_for(*this,ptrd,T) { const ftype val = *(--ptrs)/N; *ptrd = val<m?m:(val>M?M:(T)val); }
15100 - }
15101 - return *this;
15102 - }
15103 -
15104 - //! Get a blurred version of an image following a field of diffusion tensors.
15105 - /**
15106 - \param G = Field of square roots of diffusion tensors used to drive the smoothing.
15107 - \param amplitude = amplitude of the smoothing.
15108 - \param dl = spatial discretization.
15109 - \param da = angular discretization.
15110 - \param gauss_prec = precision of the gaussian function.
15111 - \param interpolation Used interpolation scheme (0 = nearest-neighbor, 1 = linear, 2 = Runge-Kutta)
15112 - \param fast_approx = Tell to use the fast approximation or not.
15113 - **/
15114 - template<typename t>
15115 - CImg get_blur_anisotropic(const CImg<t>& G, const float amplitude=60.0f, const float dl=0.8f,const float da=30.0f,
15116 - const float gauss_prec=2.0f, const unsigned int interpolation=0, const bool fast_approx=true) const {
15117 - return (+*this).blur_anisotropic(G,amplitude,dl,da,gauss_prec,interpolation,fast_approx);
15118 - }
15119 -
15120 - //! Blur an image following a field of diffusion tensors.
15121 - template<typename tm>
15122 - CImg& blur_anisotropic(const CImg<tm>& mask, const float amplitude, const float sharpness=0.7f, const float anisotropy=0.3f,
15123 - const float alpha=0.6f, const float sigma=1.1f, const float dl=0.8f,const float da=30.0f,
15124 - const float gauss_prec=2.0f, const unsigned int interpolation=0, const bool fast_approx=true,
15125 - const float geom_factor=1.0f) {
15126 - if (!is_empty() && amplitude>0) {
15127 - if (amplitude==0) return *this;
15128 - if (amplitude<0 || sharpness<0 || anisotropy<0 || anisotropy>1 || alpha<0 || sigma<0 || dl<0 || da<0 || gauss_prec<0)
15129 - throw CImgArgumentException("CImg<%s>::blur_anisotropic() : Given parameters are amplitude(%g), sharpness(%g), "
15130 - "anisotropy(%g), alpha(%g), sigma(%g), dl(%g), da(%g), gauss_prec(%g).\n"
15131 - "Admissible parameters are in the range : amplitude>0, sharpness>0, anisotropy in [0,1], "
15132 - "alpha>0, sigma>0, dl>0, da>0, gauss_prec>0.",
15133 - pixel_type(),amplitude,sharpness,anisotropy,alpha,sigma,dl,da,gauss_prec);
15134 - const bool threed = (depth>1), no_mask = mask.is_empty();
15135 - const float nsharpness = cimg::max(sharpness,1e-5f), power1 = 0.5f*nsharpness, power2 = power1/(1e-7f+1.0f-anisotropy);
15136 -
15137 - CImg<float> blurred = CImg<float>(*this,false).blur(alpha);
15138 - if (geom_factor>0) blurred*=geom_factor;
15139 - else blurred.normalize(0,-geom_factor);
15140 -
15141 - if (threed) { // Field for 3D volumes
15142 - CImg<float> val(3), vec(3,3), G(blurred.get_structure_tensorXYZ());
15143 - if (sigma>0) G.blur(sigma);
15144 - cimg_forXYZ(*this,x,y,z) {
15145 - if (no_mask || mask(x,y,z)) {
15146 - G.get_tensor_at(x,y,z).symmetric_eigen(val,vec);
15147 - const float l1 = val[2], l2 = val[1], l3 = val[0],
15148 - ux = vec(0,0), uy = vec(0,1), uz = vec(0,2),
15149 - vx = vec(1,0), vy = vec(1,1), vz = vec(1,2),
15150 - wx = vec(2,0), wy = vec(2,1), wz = vec(2,2),
15151 - n1 = (float)std::pow(1.0f+l1+l2+l3,-power1),
15152 - n2 = (float)std::pow(1.0f+l1+l2+l3,-power2);
15153 - G(x,y,z,0) = n1*(ux*ux + vx*vx) + n2*wx*wx;
15154 - G(x,y,z,1) = n1*(ux*uy + vx*vy) + n2*wx*wy;
15155 - G(x,y,z,2) = n1*(ux*uz + vx*vz) + n2*wx*wz;
15156 - G(x,y,z,3) = n1*(uy*uy + vy*vy) + n2*wy*wy;
15157 - G(x,y,z,4) = n1*(uy*uz + vy*vz) + n2*wy*wz;
15158 - G(x,y,z,5) = n1*(uz*uz + vz*vz) + n2*wz*wz;
15159 - } else G(x,y,z,0) = G(x,y,z,1) = G(x,y,z,2) = G(x,y,z,3) = G(x,y,z,4) = G(x,y,z,5) = 0;
15160 -#ifdef cimg_plugin_greycstoration
15161 - if (!*(greycstoration_params->stop_request)) (*greycstoration_params->counter)++;
15162 - else return *this;
15163 -#endif
15164 - }
15165 - blur_anisotropic(G,amplitude,dl,da,gauss_prec,interpolation,fast_approx);
15166 - } else { // Field for 2D images
15167 - CImg<float> val(2), vec(2,2), G(blurred.get_structure_tensorXY());
15168 - if (sigma>0) G.blur(sigma);
15169 - cimg_forXY(*this,x,y) {
15170 - if (no_mask || mask(x,y)) {
15171 - G.get_tensor_at(x,y).symmetric_eigen(val,vec);
15172 - const float l1 = val[1], l2 = val[0],
15173 - ux = vec(1,0), uy = vec(1,1),
15174 - vx = vec(0,0), vy = vec(0,1),
15175 - n1 = (float)std::pow(1.0f+l1+l2,-power1),
15176 - n2 = (float)std::pow(1.0f+l1+l2,-power2);
15177 - G(x,y,0,0) = n1*ux*ux + n2*vx*vx;
15178 - G(x,y,0,1) = n1*ux*uy + n2*vx*vy;
15179 - G(x,y,0,2) = n1*uy*uy + n2*vy*vy;
15180 - } else G(x,y,0,0) = G(x,y,0,1) = G(x,y,0,2) = 0;
15181 -#ifdef cimg_plugin_greycstoration
15182 - if (!*(greycstoration_params->stop_request)) (*greycstoration_params->counter)++;
15183 - else return *this;
15184 -#endif
15185 - }
15186 - blur_anisotropic(G,amplitude,dl,da,gauss_prec,interpolation,fast_approx);
15187 - }
15188 - }
15189 - return *this;
15190 - }
15191 -
15192 - //! Blur an image in an anisotropic way.
15193 - /**
15194 - \param amplitude = amplitude of the anisotropic blur.
15195 - \param sharpness = define the contour preservation.
15196 - \param anisotropy = define the smoothing anisotropy.
15197 - \param alpha = image pre-blurring (gaussian).
15198 - \param sigma = regularity of the tensor-valued geometry.
15199 - \param dl = spatial discretization.
15200 - \param da = angular discretization.
15201 - \param gauss_prec = precision of the gaussian function.
15202 - \param interpolation Used interpolation scheme (0 = nearest-neighbor, 1 = linear, 2 = Runge-Kutta)
15203 - \param fast_approx = Tell to use the fast approximation or not
15204 - **/
15205 - template<typename tm>
15206 - CImg get_blur_anisotropic(const CImg<tm>& mask, const float amplitude, const float sharpness=0.7f, const float anisotropy=0.3f,
15207 - const float alpha=0.6f, const float sigma=1.1f, const float dl=0.8f,
15208 - const float da=30.0f, const float gauss_prec=2.0f, const unsigned int interpolation=0,
15209 - const bool fast_approx=true, const float geom_factor=1.0f) const {
15210 - return (+*this).blur_anisotropic(mask,amplitude,sharpness,anisotropy,alpha,sigma,dl,da,gauss_prec,interpolation,fast_approx,geom_factor);
15211 - }
15212 -
15213 - //! Blur an image following in an anistropic way.
15214 - CImg& blur_anisotropic(const float amplitude, const float sharpness=0.7f, const float anisotropy=0.3f,
15215 - const float alpha=0.6f, const float sigma=1.1f, const float dl=0.8f,const float da=30.0f,
15216 - const float gauss_prec=2.0f, const unsigned int interpolation=0, const bool fast_approx=true,
15217 - const float geom_factor=1.0f) {
15218 - return blur_anisotropic(CImg<T>(),amplitude,sharpness,anisotropy,alpha,sigma,dl,da,gauss_prec,interpolation,fast_approx,geom_factor);
15219 - }
15220 -
15221 - //! Blur an image following in an anistropic way.
15222 - CImg get_blur_anisotropic(const float amplitude, const float sharpness=0.7f, const float anisotropy=0.3f,
15223 - const float alpha=0.6f, const float sigma=1.1f, const float dl=0.8f,
15224 - const float da=30.0f, const float gauss_prec=2.0f, const unsigned int interpolation=0,
15225 - const bool fast_approx=true, const float geom_factor=1.0f) const {
15226 - return (+*this).blur_anisotropic(amplitude,sharpness,anisotropy,alpha,sigma,dl,da,gauss_prec,interpolation,fast_approx,geom_factor);
15227 - }
15228 -
15229 - //! Return the Fast Fourier Transform of an image (along a specified axis)
15230 - CImgList<typename cimg::largest<T,float>::type> get_FFT(const char axe, const bool inverse=false) const {
15231 - typedef typename cimg::largest<T,float>::type restype;
15232 - return CImgList<restype>(*this).FFT(axe,inverse);
15233 - }
15234 -
15235 - //! Return the Fast Fourier Transform on an image
15236 - CImgList<typename cimg::largest<T,float>::type> get_FFT(const bool inverse=false) const {
15237 - typedef typename cimg::largest<T,float>::type restype;
15238 - return CImgList<restype>(*this).FFT(inverse);
15239 - }
15240 -
15241 - //! Apply a median filter.
15242 - CImg get_blur_median(const unsigned int n=3) {
15243 - CImg<T> res(width,height,depth,dim);
15244 - if (!n || n==1) return *this;
15245 - const int hl=n/2, hr=hl-1+n%2;
15246 - if (res.depth!=1) { // 3D median filter
15247 - CImg<T> vois;
15248 - cimg_forXYZV(*this,x,y,z,k) {
15249 - vois = get_crop(x-hl,y-hl,z-hl,k,x+hr,y+hr,z+hr,k);
15250 - res(x,y,z,k) = vois.median();
15251 - }
15252 - } else { // 2D median filter
15253 -#define _median_sort(a,b) if ((a)>(b)) cimg::swap(a,b)
15254 - switch (n) {
15255 - case 3: {
15256 - CImg_3x3(I,T);
15257 - CImg_3x3(J,T);
15258 - cimg_forV(*this,k) cimg_for3x3(*this,x,y,0,k,I) {
15259 - cimg_copy3x3(I,J);
15260 - _median_sort(Jcp, Jnp); _median_sort(Jcc, Jnc); _median_sort(Jcn, Jnn);
15261 - _median_sort(Jpp, Jcp); _median_sort(Jpc, Jcc); _median_sort(Jpn, Jcn);
15262 - _median_sort(Jcp, Jnp); _median_sort(Jcc, Jnc); _median_sort(Jcn, Jnn);
15263 - _median_sort(Jpp, Jpc); _median_sort(Jnc, Jnn); _median_sort(Jcc, Jcn);
15264 - _median_sort(Jpc, Jpn); _median_sort(Jcp, Jcc); _median_sort(Jnp, Jnc);
15265 - _median_sort(Jcc, Jcn); _median_sort(Jcc, Jnp); _median_sort(Jpn, Jcc);
15266 - _median_sort(Jcc, Jnp);
15267 - res(x,y,0,k) = Jcc;
15268 - }
15269 - } break;
15270 - case 5: {
15271 - CImg_5x5(I,T);
15272 - CImg_5x5(J,T);
15273 - cimg_forV(*this,k) cimg_for5x5(*this,x,y,0,k,I) {
15274 - cimg_copy5x5(I,J);
15275 - _median_sort(Jbb, Jpb); _median_sort(Jnb, Jab); _median_sort(Jcb, Jab); _median_sort(Jcb, Jnb);
15276 - _median_sort(Jpp, Jcp); _median_sort(Jbp, Jcp); _median_sort(Jbp, Jpp); _median_sort(Jap, Jbc);
15277 - _median_sort(Jnp, Jbc); _median_sort(Jnp, Jap); _median_sort(Jcc, Jnc); _median_sort(Jpc, Jnc);
15278 - _median_sort(Jpc, Jcc); _median_sort(Jbn, Jpn); _median_sort(Jac, Jpn); _median_sort(Jac, Jbn);
15279 - _median_sort(Jnn, Jan); _median_sort(Jcn, Jan); _median_sort(Jcn, Jnn); _median_sort(Jpa, Jca);
15280 - _median_sort(Jba, Jca); _median_sort(Jba, Jpa); _median_sort(Jna, Jaa); _median_sort(Jcb, Jbp);
15281 - _median_sort(Jnb, Jpp); _median_sort(Jbb, Jpp); _median_sort(Jbb, Jnb); _median_sort(Jab, Jcp);
15282 - _median_sort(Jpb, Jcp); _median_sort(Jpb, Jab); _median_sort(Jpc, Jac); _median_sort(Jnp, Jac);
15283 - _median_sort(Jnp, Jpc); _median_sort(Jcc, Jbn); _median_sort(Jap, Jbn); _median_sort(Jap, Jcc);
15284 - _median_sort(Jnc, Jpn); _median_sort(Jbc, Jpn); _median_sort(Jbc, Jnc); _median_sort(Jba, Jna);
15285 - _median_sort(Jcn, Jna); _median_sort(Jcn, Jba); _median_sort(Jpa, Jaa); _median_sort(Jnn, Jaa);
15286 - _median_sort(Jnn, Jpa); _median_sort(Jan, Jca); _median_sort(Jnp, Jcn); _median_sort(Jap, Jnn);
15287 - _median_sort(Jbb, Jnn); _median_sort(Jbb, Jap); _median_sort(Jbc, Jan); _median_sort(Jpb, Jan);
15288 - _median_sort(Jpb, Jbc); _median_sort(Jpc, Jba); _median_sort(Jcb, Jba); _median_sort(Jcb, Jpc);
15289 - _median_sort(Jcc, Jpa); _median_sort(Jnb, Jpa); _median_sort(Jnb, Jcc); _median_sort(Jnc, Jca);
15290 - _median_sort(Jab, Jca); _median_sort(Jab, Jnc); _median_sort(Jac, Jna); _median_sort(Jbp, Jna);
15291 - _median_sort(Jbp, Jac); _median_sort(Jbn, Jaa); _median_sort(Jpp, Jaa); _median_sort(Jpp, Jbn);
15292 - _median_sort(Jcp, Jpn); _median_sort(Jcp, Jan); _median_sort(Jnc, Jpa); _median_sort(Jbn, Jna);
15293 - _median_sort(Jcp, Jnc); _median_sort(Jcp, Jbn); _median_sort(Jpb, Jap); _median_sort(Jnb, Jpc);
15294 - _median_sort(Jbp, Jcn); _median_sort(Jpc, Jcn); _median_sort(Jap, Jcn); _median_sort(Jab, Jbc);
15295 - _median_sort(Jpp, Jcc); _median_sort(Jcp, Jac); _median_sort(Jab, Jpp); _median_sort(Jab, Jcp);
15296 - _median_sort(Jcc, Jac); _median_sort(Jbc, Jac); _median_sort(Jpp, Jcp); _median_sort(Jbc, Jcc);
15297 - _median_sort(Jpp, Jbc); _median_sort(Jpp, Jcn); _median_sort(Jcc, Jcn); _median_sort(Jcp, Jcn);
15298 - _median_sort(Jcp, Jbc); _median_sort(Jcc, Jnn); _median_sort(Jcp, Jcc); _median_sort(Jbc, Jnn);
15299 - _median_sort(Jcc, Jba); _median_sort(Jbc, Jba); _median_sort(Jbc, Jcc);
15300 - res(x,y,0,k) = Jcc;
15301 - }
15302 - } break;
15303 - default: {
15304 - CImg<T> vois;
15305 - cimg_forXYV(*this,x,y,k) {
15306 - vois = get_crop(x-hl,y-hl,0,k,x+hr,y+hr,0,k);
15307 - res(x,y,0,k) = vois.median();
15308 - }
15309 - } break;
15310 - }
15311 - }
15312 - return res;
15313 - }
15314 -
15315 - //! Apply a median filter
15316 - CImg& blur_median(const unsigned int n=3) {
15317 - return get_blur_median(n).swap(*this);
15318 - }
15319 -
15320 - //! Sharpen image using anisotropic shock filters
15321 - CImg& sharpen(const float amplitude=50.0f, const float edge=1.0f, const float alpha=0.0f, const float sigma=0.0f) {
15322 - if (is_empty()) return *this;
15323 - const bool threed = (depth>1);
15324 - const float nedge = 0.5f*edge;
15325 - typedef typename cimg::largest<T,float>::type ftype;
15326 - CImg<ftype> val, vec, veloc(width,height,depth,dim);
15327 -
15328 - if (threed) {
15329 - CImg<ftype> G = (alpha>0?get_blur(alpha).get_structure_tensorXYZ():get_structure_tensorXYZ());
15330 - if (sigma>0) G.blur(sigma);
15331 - CImg_3x3x3(I,float);
15332 - cimg_forXYZ(G,x,y,z) {
15333 - G.get_tensor_at(x,y,z).symmetric_eigen(val,vec);
15334 - G(x,y,z,0) = vec(0,0);
15335 - G(x,y,z,1) = vec(0,1);
15336 - G(x,y,z,2) = vec(0,2);
15337 - G(x,y,z,3) = 1.0f-(float)std::pow(1.0f+val[0]+val[1]+val[2],-nedge);
15338 - }
15339 - cimg_forV(*this,k) cimg_for3x3x3(*this,x,y,z,k,I) {
15340 - const float
15341 - u = G(x,y,z,0),
15342 - v = G(x,y,z,1),
15343 - w = G(x,y,z,2),
15344 - amp = G(x,y,z,3),
15345 - ixx = Incc+Ipcc-2*Iccc,
15346 - ixy = 0.25f*(Innc+Ippc-Inpc-Ipnc),
15347 - ixz = 0.25f*(Incn+Ipcp-Incp-Ipcn),
15348 - iyy = Icnc+Icpc-2*Iccc,
15349 - iyz = 0.25f*(Icnn+Icpp-Icnp-Icpn),
15350 - izz = Iccn+Iccp-2*Iccc,
15351 - ixf = Incc-Iccc,
15352 - ixb = Iccc-Ipcc,
15353 - iyf = Icnc-Iccc,
15354 - iyb = Iccc-Icpc,
15355 - izf = Iccn-Iccc,
15356 - izb = Iccc-Iccp,
15357 - itt = u*u*ixx + v*v*iyy + w*w*izz + 2*u*v*ixy + 2*u*w*ixz + 2*v*w*iyz,
15358 - it = u*cimg::minmod(ixf,ixb) + v*cimg::minmod(iyf,iyb) + w*cimg::minmod(izf,izb);
15359 - veloc(x,y,z,k) = -amp*cimg::sign(itt)*cimg::abs(it);
15360 - }
15361 - } else {
15362 - CImg<ftype> G = (alpha>0?get_blur(alpha).get_structure_tensorXY():get_structure_tensorXY());
15363 - if (sigma>0) G.blur(sigma);
15364 - CImg_3x3(I,float);
15365 - cimg_forXY(G,x,y) {
15366 - G.get_tensor_at(x,y).symmetric_eigen(val,vec);
15367 - G(x,y,0) = vec(0,0);
15368 - G(x,y,1) = vec(0,1);
15369 - G(x,y,2) = 1.0f-(float)std::pow(1.0f+val[0]+val[1],-nedge);
15370 - }
15371 - cimg_forV(*this,k) cimg_for3x3(*this,x,y,0,k,I) {
15372 - const float
15373 - u = G(x,y,0),
15374 - v = G(x,y,1),
15375 - amp = G(x,y,2),
15376 - ixx = Inc+Ipc-2*Icc,
15377 - ixy = 0.25f*(Inn+Ipp-Inp-Ipn),
15378 - iyy = Icn+Icp-2*Icc,
15379 - ixf = Inc-Icc,
15380 - ixb = Icc-Ipc,
15381 - iyf = Icn-Icc,
15382 - iyb = Icc-Icp,
15383 - itt = u*u*ixx + v*v*iyy + 2*u*v*ixy,
15384 - it = u*cimg::minmod(ixf,ixb) + v*cimg::minmod(iyf,iyb);
15385 - veloc(x,y,k) = -amp*cimg::sign(itt)*cimg::abs(it);
15386 - }
15387 - }
15388 - const CImgStats stats(veloc);
15389 - const float vmax = (float)cimg::max(cimg::abs(stats.min),cimg::abs(stats.max));
15390 - if (vmax!=0) { veloc*=amplitude/vmax; (*this)+=veloc; }
15391 - return *this;
15392 - }
15393 -
15394 - CImg get_sharpen(const float amplitude=50.0f, const float edge=1.0f, const float alpha=0.0f, const float sigma=0.0f) const {
15395 - return (+*this).sharpen(amplitude,edge,alpha,sigma);
15396 - }
15397 -
15398 - //@}
15399 - //-----------------------------
15400 - //
15401 - //! \name Matrix and Vectors
15402 - //@{
15403 - //-----------------------------
15404 -
15405 - //! Return a vector with specified coefficients
15406 - static CImg vector(const T& a1) {
15407 - return CImg<T>(1,1).fill(a1);
15408 - }
15409 -
15410 - //! Return a vector with specified coefficients
15411 - static CImg vector(const T& a1,const T& a2) {
15412 - return CImg<T>(1,2).fill(a1,a2);
15413 - }
15414 -
15415 - //! Return a vector with specified coefficients
15416 - static CImg vector(const T& a1,const T& a2,const T& a3) {
15417 - return CImg<T>(1,3).fill(a1,a2,a3);
15418 - }
15419 -
15420 - //! Return a vector with specified coefficients
15421 - static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4) {
15422 - return CImg<T>(1,4).fill(a1,a2,a3,a4);
15423 - }
15424 -
15425 - //! Return a vector with specified coefficients
15426 - static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4,const T& a5) {
15427 - return CImg<T>(1,5).fill(a1,a2,a3,a4,a5);
15428 - }
15429 -
15430 - //! Return a vector with specified coefficients
15431 - static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4,const T& a5,const T& a6) {
15432 - return CImg<T>(1,6).fill(a1,a2,a3,a4,a5,a6);
15433 - }
15434 -
15435 - //! Return a vector with specified coefficients
15436 - static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4,
15437 - const T& a5,const T& a6,const T& a7) {
15438 - return CImg<T>(1,7).fill(a1,a2,a3,a4,a5,a6,a7);
15439 - }
15440 -
15441 - //! Return a vector with specified coefficients
15442 - static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4,
15443 - const T& a5,const T& a6,const T& a7,const T& a8) {
15444 - return CImg<T>(1,8).fill(a1,a2,a3,a4,a5,a6,a7,a8);
15445 - }
15446 -
15447 - //! Return a vector with specified coefficients
15448 - static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4,
15449 - const T& a5,const T& a6,const T& a7,const T& a8,const T& a9) {
15450 - return CImg<T>(1,9).fill(a1,a2,a3,a4,a5,a6,a7,a8,a9);
15451 - }
15452 -
15453 - //! Return a vector with specified coefficients
15454 - static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4,
15455 - const T& a5,const T& a6,const T& a7,const T& a8,
15456 - const T& a9,const T& a10) {
15457 - return CImg<T>(1,10).fill(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10);
15458 - }
15459 -
15460 - //! Return a vector with specified coefficients
15461 - static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4,
15462 - const T& a5,const T& a6,const T& a7,const T& a8,
15463 - const T& a9,const T& a10, const T& a11) {
15464 - return CImg<T>(1,11).fill(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11);
15465 - }
15466 -
15467 - //! Return a vector with specified coefficients
15468 - static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4,
15469 - const T& a5,const T& a6,const T& a7,const T& a8,
15470 - const T& a9,const T& a10, const T& a11, const T& a12) {
15471 - return CImg<T>(1,12).fill(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12);
15472 - }
15473 -
15474 - //! Return a vector with specified coefficients
15475 - static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4,
15476 - const T& a5,const T& a6,const T& a7,const T& a8,
15477 - const T& a9,const T& a10, const T& a11, const T& a12,
15478 - const T& a13) {
15479 - return CImg<T>(1,13).fill(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13);
15480 - }
15481 -
15482 - //! Return a 1x1 square matrix with specified coefficients
15483 - static CImg matrix(const T& a1) {
15484 - return vector(a1);
15485 - }
15486 -
15487 - //! Return a 2x2 square matrix with specified coefficients
15488 - static CImg matrix(const T& a1,const T& a2,
15489 - const T& a3,const T& a4) {
15490 - return CImg<T>(2,2).fill(a1,a2,
15491 - a3,a4);
15492 - }
15493 -
15494 - //! Return a 3x3 square matrix with specified coefficients
15495 - static CImg matrix(const T& a1,const T& a2,const T& a3,
15496 - const T& a4,const T& a5,const T& a6,
15497 - const T& a7,const T& a8,const T& a9) {
15498 - return CImg<T>(3,3).fill(a1,a2,a3,
15499 - a4,a5,a6,
15500 - a7,a8,a9);
15501 - }
15502 -
15503 - //! Return a 4x4 square matrix with specified coefficients
15504 - static CImg matrix(const T& a1,const T& a2,const T& a3,const T& a4,
15505 - const T& a5,const T& a6,const T& a7,const T& a8,
15506 - const T& a9,const T& a10,const T& a11,const T& a12,
15507 - const T& a13,const T& a14,const T& a15,const T& a16) {
15508 - return CImg<T>(4,4).fill(a1,a2,a3,a4,
15509 - a5,a6,a7,a8,
15510 - a9,a10,a11,a12,
15511 - a13,a14,a15,a16);
15512 - }
15513 -
15514 - //! Return a 5x5 square matrix with specified coefficients
15515 - static CImg matrix(const T& a1,const T& a2,const T& a3,const T& a4,const T& a5,
15516 - const T& a6,const T& a7,const T& a8,const T& a9,const T& a10,
15517 - const T& a11,const T& a12,const T& a13,const T& a14,const T& a15,
15518 - const T& a16,const T& a17,const T& a18,const T& a19,const T& a20,
15519 - const T& a21,const T& a22,const T& a23,const T& a24,const T& a25) {
15520 - return CImg<T>(5,5).fill(a1,a2,a3,a4,a5,
15521 - a6,a7,a8,a9,a10,
15522 - a11,a12,a13,a14,a15,
15523 - a16,a17,a18,a19,a20,
15524 - a21,a22,a23,a24,a25);
15525 - }
15526 -
15527 - //! In-place version of get_matrix().
15528 - CImg& matrix() {
15529 - const unsigned int siz = size();
15530 - switch (siz) {
15531 - case 1: break;
15532 - case 4: width = height = 2; break;
15533 - case 9: width = height = 3; break;
15534 - case 16: width = height = 4; break;
15535 - case 25: width = height = 5; break;
15536 - case 36: width = height = 6; break;
15537 - case 49: width = height = 7; break;
15538 - case 64: width = height = 8; break;
15539 - case 81: width = height = 9; break;
15540 - case 100: width = height = 10; break;
15541 - default: {
15542 - unsigned int i=11, i2=i*i;
15543 - while (i2<siz) { i2+=2*i+1; i++; }
15544 - if (i2==siz) width = height = i;
15545 - else throw CImgInstanceException("CImg<%s>::matrix() : Image size = %u is not a square number",pixel_type(),siz);
15546 - } break;
15547 - }
15548 - return *this;
15549 - }
15550 -
15551 - //! Realign pixel values of the instance image as a square matrix
15552 - CImg get_matrix() const {
15553 - return (+*this).matrix();
15554 - }
15555 -
15556 - //! Return a 1x1 symmetric matrix with specified coefficients
15557 - static CImg tensor(const T& a1) {
15558 - return matrix(a1);
15559 - }
15560 -
15561 - //! Return a 2x2 symmetric matrix tensor with specified coefficients
15562 - static CImg tensor(const T& a1,const T& a2,const T& a3) {
15563 - return matrix(a1,a2,
15564 - a2,a3);
15565 - }
15566 -
15567 - //! Return a 3x3 symmetric matrix with specified coefficients
15568 - static CImg tensor(const T& a1,const T& a2,const T& a3,const T& a4,const T& a5,const T& a6) {
15569 - return matrix(a1,a2,a3,
15570 - a2,a4,a5,
15571 - a3,a5,a6);
15572 - }
15573 -
15574 - CImg get_tensor() const {
15575 - CImg<T> res;
15576 - const unsigned int siz = size();
15577 - switch (siz) {
15578 - case 1: break;
15579 - case 3:
15580 - res.assign(2,2);
15581 - res(0,0) = (*this)(0);
15582 - res(1,0) = res(0,1) = (*this)(1);
15583 - res(1,1) = (*this)(2);
15584 - break;
15585 - case 6:
15586 - res.assign(3,3);
15587 - res(0,0) = (*this)(0);
15588 - res(1,0) = res(0,1) = (*this)(1);
15589 - res(2,0) = res(0,2) = (*this)(2);
15590 - res(1,1) = (*this)(3);
15591 - res(2,1) = res(1,2) = (*this)(4);
15592 - res(2,2) = (*this)(5);
15593 - break;
15594 - default:
15595 - throw CImgInstanceException("CImg<%s>::get_tensor() : Wrong vector dimension = %u in instance image.",
15596 - pixel_type(), dim);
15597 - break;
15598 - }
15599 - return res;
15600 - }
15601 -
15602 - //! In-place version of get_tensor().
15603 - CImg& tensor() {
15604 - return get_tensor().swap(*this);
15605 - }
15606 -
15607 - //! Return a 1x1 diagonal matrix with specified coefficients
15608 - static CImg diagonal(const T& a1) {
15609 - return matrix(a1);
15610 - }
15611 -
15612 - //! Return a 2x2 diagonal matrix with specified coefficients
15613 - static CImg diagonal(const T& a1,const T& a2) {
15614 - return matrix(a1,0,
15615 - 0,a2);
15616 - }
15617 -
15618 - //! Return a 3x3 diagonal matrix with specified coefficients
15619 - static CImg diagonal(const T& a1,const T& a2,const T& a3) {
15620 - return matrix(a1,0,0,
15621 - 0,a2,0,
15622 - 0,0,a3);
15623 - }
15624 -
15625 - //! Return a 4x4 diagonal matrix with specified coefficients
15626 - static CImg diagonal(const T& a1,const T& a2,const T& a3,const T& a4) {
15627 - return matrix(a1,0,0,0,
15628 - 0,a2,0,0,
15629 - 0,0,a3,0,
15630 - 0,0,0,a4);
15631 - }
15632 -
15633 - //! Return a 5x5 diagonal matrix with specified coefficients
15634 - static CImg diagonal(const T& a1,const T& a2,const T& a3,const T& a4,const T& a5) {
15635 - return matrix(a1,0,0,0,0,
15636 - 0,a2,0,0,0,
15637 - 0,0,a3,0,0,
15638 - 0,0,0,a4,0,
15639 - 0,0,0,0,a5);
15640 - }
15641 -
15642 - //! Unroll all images values into specified axis.
15643 - CImg& unroll(const char axe='x') {
15644 - const unsigned int siz = size();
15645 - if (siz) switch (axe) {
15646 - case 'x': width = siz; height=depth=dim=1; break;
15647 - case 'y': height = siz; width=depth=dim=1; break;
15648 - case 'z': depth = siz; width=height=dim=1; break;
15649 - case 'v': dim = siz; width=height=depth=1; break;
15650 - default: throw CImgArgumentException("CImg<%s>::unroll() : Given axe is '%c' which is not 'x','y','z' or 'v'",
15651 - pixel_type(),axe);
15652 - }
15653 - return *this;
15654 - }
15655 -
15656 - CImg get_unroll(const char axe='x') const {
15657 - return (+*this).unroll(axe);
15658 - }
15659 -
15660 - CImg& vector() {
15661 - return unroll('y');
15662 - }
15663 -
15664 - CImg get_vector() const {
15665 - return get_unroll('y');
15666 - }
15667 -
15668 - //! Get a diagonal matrix, whose diagonal coefficients are the coefficients of the input image
15669 - CImg get_diagonal() const {
15670 - if (is_empty()) return CImg<T>();
15671 - CImg res(size(),size(),1,1,0);
15672 - cimg_foroff(*this,off) res(off,off)=(*this)(off);
15673 - return res;
15674 - }
15675 -
15676 - //! Replace a vector by a diagonal matrix containing the original vector coefficients.
15677 - CImg& diagonal() {
15678 - return get_diagonal().swap(*this);
15679 - }
15680 -
15681 - //! Return a NxN identity matrix
15682 - static CImg identity_matrix(const unsigned int N) {
15683 - CImg<T> res(N,N,1,1,0);
15684 - cimg_forX(res,x) res(x,x)=1;
15685 - return res;
15686 - }
15687 -
15688 - CImg& identity_matrix() {
15689 - return get_identity_matrix(cimg::max(width,height)).swap(*this);
15690 - }
15691 -
15692 - CImg get_identity_matrix() const {
15693 - return identity_matrix(cimg::max(width,height));
15694 - }
15695 -
15696 - //! Return a N-numbered sequence vector from \p a0 to \p a1
15697 - CImg& sequence(const T& a0, const T& a1) {
15698 - if (!is_empty()) {
15699 - const unsigned int siz = size()-1;
15700 - const float delta = (float)((float)a1-a0);
15701 - T* ptr = data;
15702 - cimg_foroff(*this,l) *(ptr++) = (T)(a0 + delta*l/siz);
15703 - }
15704 - return *this;
15705 - }
15706 -
15707 - CImg get_sequence(const T& a0, const T& a1) const {
15708 - return (+*this).sequence(a0,a1);
15709 - }
15710 -
15711 - static CImg sequence(const unsigned int N, const T& a0, const T& a1) {
15712 - if (N) return CImg<T>(1,N).sequence(a0,a1);
15713 - return CImg<T>();
15714 - }
15715 -
15716 - //! Return a 3x3 rotation matrix along the (x,y,z)-axis with an angle w.
15717 - static CImg rotation_matrix(const float x, const float y, const float z, const float w, const bool quaternion_data=false) {
15718 - float X,Y,Z,W;
15719 - if (!quaternion_data) {
15720 - const float norm = (float)std::sqrt(x*x + y*y + z*z),
15721 - nx = norm>0?x/norm:0,
15722 - ny = norm>0?y/norm:0,
15723 - nz = norm>0?z/norm:1,
15724 - nw = norm>0?w:0,
15725 - sina = (float)std::sin(nw/2),
15726 - cosa = (float)std::cos(nw/2);
15727 - X = nx*sina;
15728 - Y = ny*sina;
15729 - Z = nz*sina;
15730 - W = cosa;
15731 - } else {
15732 - const float norm = (float)std::sqrt(x*x + y*y + z*z + w*w);
15733 - if (norm>0) { X=x/norm; Y=y/norm; Z=z/norm; W=w/norm; }
15734 - else { X=Y=Z=0; W=1; }
15735 - }
15736 - const float xx=X*X, xy=X*Y, xz=X*Z, xw=X*W, yy=Y*Y, yz=Y*Z, yw=Y*W, zz=Z*Z, zw=Z*W;
15737 - return CImg<T>::matrix(1-2*(yy+zz), 2*(xy+zw), 2*(xz-yw),
15738 - 2*(xy-zw), 1-2*(xx+zz), 2*(yz+xw),
15739 - 2*(xz+yw), 2*(yz-xw), 1-2*(xx+yy));
15740 - }
15741 -
15742 - //! Return a new image corresponding to the vector located at (\p x,\p y,\p z) of the current vector-valued image.
15743 - CImg get_vector_at(const unsigned int x=0, const unsigned int y=0, const unsigned int z=0) const {
15744 - CImg dest(1,dim);
15745 - cimg_forV(*this,k) dest[k]=(*this)(x,y,z,k);
15746 - return dest;
15747 - }
15748 -
15749 - //! Return a new image corresponding to the \a square \a matrix located at (\p x,\p y,\p z) of the current vector-valued image.
15750 - CImg get_matrix_at(const unsigned int x=0, const unsigned int y=0, const unsigned int z=0) const {
15751 - const int n = (int)std::sqrt((double)dim);
15752 - CImg dest(n,n);
15753 - cimg_forV(*this,k) dest[k]=(*this)(x,y,z,k);
15754 - return dest;
15755 - }
15756 -
15757 - //! Return a new image corresponding to the \a diffusion \a tensor located at (\p x,\p y,\p z) of the current vector-valued image.
15758 - CImg get_tensor_at(const unsigned int x=0,const unsigned int y=0,const unsigned int z=0) const {
15759 - if (dim==6) return tensor((*this)(x,y,z,0),(*this)(x,y,z,1),(*this)(x,y,z,2),
15760 - (*this)(x,y,z,3),(*this)(x,y,z,4),(*this)(x,y,z,5));
15761 - if (dim==3) return tensor((*this)(x,y,z,0),(*this)(x,y,z,1),(*this)(x,y,z,2));
15762 - return tensor((*this)(x,y,z,0));
15763 - }
15764 -
15765 - //! Set the image \p vec as the \a vector \a valued pixel located at (\p x,\p y,\p z) of the current vector-valued image.
15766 - CImg& set_vector_at(const CImg& vec,const unsigned int x=0,const unsigned int y=0,const unsigned int z=0) {
15767 - return draw_point(x,y,z,vec.data,1);
15768 - }
15769 -
15770 - //! Set the image \p vec as the \a square \a matrix-valued pixel located at (\p x,\p y,\p z) of the current vector-valued image.
15771 - CImg& set_matrix_at(const CImg& mat,const unsigned int x=0,const unsigned int y=0,const unsigned int z=0) {
15772 - return set_vector_at(mat,x,y,z);
15773 - }
15774 -
15775 - //! Set the image \p vec as the \a tensor \a valued pixel located at (\p x,\p y,\p z) of the current vector-valued image.
15776 - CImg& set_tensor_at(const CImg& ten,const unsigned int x=0,const unsigned int y=0,const unsigned int z=0) {
15777 - if (ten.height==2) {
15778 - (*this)(x,y,z,0)=ten[0];
15779 - (*this)(x,y,z,1)=ten[1];
15780 - (*this)(x,y,z,2)=ten[3];
15781 - }
15782 - else {
15783 - (*this)(x,y,z,0)=ten[0];
15784 - (*this)(x,y,z,1)=ten[1];
15785 - (*this)(x,y,z,2)=ten[2];
15786 - (*this)(x,y,z,3)=ten[4];
15787 - (*this)(x,y,z,4)=ten[5];
15788 - (*this)(x,y,z,5)=ten[8];
15789 - }
15790 - return *this;
15791 - }
15792 -
15793 - //! Return the transpose version of the current matrix.
15794 - CImg get_transpose() const {
15795 - CImg<T> res(height,width,depth,dim);
15796 - cimg_forXYZV(*this,x,y,z,v) res(y,x,z,v) = (*this)(x,y,z,v);
15797 - return res;
15798 - }
15799 -
15800 - //! Replace the current matrix by its transpose.
15801 - CImg& transpose() {
15802 - if (width==1) { width=height; height=1; return *this; }
15803 - if (height==1) { height=width; width=1; return *this; }
15804 - if (width==height) {
15805 - cimg_forYZV(*this,y,z,v) for (int x=y; x<(int)width; x++) cimg::swap((*this)(x,y,z,v),(*this)(y,x,z,v));
15806 - return *this;
15807 - }
15808 - return (*this)=get_transpose();
15809 - }
15810 -
15811 - //! Inverse the current matrix.
15812 - CImg& inverse(const bool use_LU=true) {
15813 - if (!is_empty()) {
15814 - if (width!=height || depth!=1 || dim!=1)
15815 - throw CImgInstanceException("CImg<%s>::inverse() : Instance matrix (%u,%u,%u,%u,%p) is not square.",
15816 - pixel_type(),width,height,depth,dim,data);
15817 - const double dete = width>3?-1.0:det();
15818 - if (dete!=0.0 && width==2) {
15819 - const double
15820 - a = data[0], c = data[1],
15821 - b = data[2], d = data[3];
15822 - data[0] = (T)(d/dete); data[1] = (T)(-c/dete);
15823 - data[2] = (T)(-b/dete), data[3] = (T)(a/dete);
15824 - } else if (dete!=0.0 && width==3) {
15825 - const double
15826 - a = data[0], d = data[1], g = data[2],
15827 - b = data[3], e = data[4], h = data[5],
15828 - c = data[6], f = data[7], i = data[8];
15829 - data[0] = (T)((i*e-f*h)/dete), data[1] = (T)((g*f-i*d)/dete), data[2] = (T)((d*h-g*e)/dete);
15830 - data[3] = (T)((h*c-i*b)/dete), data[4] = (T)((i*a-c*g)/dete), data[5] = (T)((g*b-a*h)/dete);
15831 - data[6] = (T)((b*f-e*c)/dete), data[7] = (T)((d*c-a*f)/dete), data[8] = (T)((a*e-d*b)/dete);
15832 - } else {
15833 - if (use_LU) { // LU-based inverse computation
15834 - CImg<T> A(*this), indx, col(1,width);
15835 - bool d;
15836 - A._LU(indx,d);
15837 - cimg_forX(*this,j) {
15838 - col.fill(0); col(j)=1;
15839 - col._solve(A,indx);
15840 - cimg_forX(*this,i) (*this)(j,i) = col(i);
15841 - }
15842 - } else { // SVD-based inverse computation
15843 - CImg<T> U(width,width),S(1,width),V(width,width);
15844 - SVD(U,S,V,false);
15845 - U.transpose();
15846 - cimg_forY(S,k) if (S[k]!=0) S[k]=1/S[k];
15847 - S.diagonal();
15848 - *this = V*S*U;
15849 - }
15850 - }
15851 - }
15852 - return *this;
15853 - }
15854 -
15855 - //! Return the inverse of the current matrix.
15856 - CImg<typename cimg::largest<T,float>::type> get_inverse(const bool use_LU=true) const {
15857 - typedef typename cimg::largest<T,float>::type restype;
15858 - return CImg<restype>(*this,false).inverse(use_LU);
15859 - }
15860 -
15861 - //! Return the pseudo-inverse (Moore-Penrose) of the matrix
15862 - CImg<typename cimg::largest<T,float>::type> get_pseudoinverse() const {
15863 - typedef typename cimg::largest<T,float>::type restype;
15864 - CImg<restype> At = get_transpose(), At2(At);
15865 - return (((At*=*this).inverse())*=At2);
15866 - }
15867 -
15868 - //! Replace the matrix by its pseudo-inverse
15869 - CImg& pseudoinverse() {
15870 - typedef typename cimg::largest<T,float>::type restype;
15871 - CImg<restype> At = get_transpose(), At2(At);
15872 - ((At*=*this).inverse())*=At2;
15873 - return ((*this)=At);
15874 - }
15875 -
15876 - //! Return the trace of the current matrix.
15877 - double trace() const {
15878 - if (is_empty())
15879 - throw CImgInstanceException("CImg<%s>::trace() : Instance matrix (%u,%u,%u,%u,%p) is empty.",
15880 - pixel_type(),width,height,depth,dim,data);
15881 - double res=0;
15882 - cimg_forX(*this,k) res+=(*this)(k,k);
15883 - return res;
15884 - }
15885 -
15886 - //! Return the kth smallest element of the image
15887 - // (Adapted from the numerical recipies for CImg)
15888 - const T kth_smallest(const unsigned int k) const {
15889 - if (is_empty())
15890 - throw CImgInstanceException("CImg<%s>::kth_smallest() : Instance image (%u,%u,%u,%u,%p) is empty.",
15891 - pixel_type(),width,height,depth,dim,data);
15892 - CImg<T> arr(*this);
15893 - unsigned long l=0,ir=size()-1;
15894 - for (;;) {
15895 - if (ir<=l+1) {
15896 - if (ir==l+1 && arr[ir]<arr[l]) cimg::swap(arr[l],arr[ir]);
15897 - return arr[k];
15898 - } else {
15899 - const unsigned long mid = (l+ir)>>1;
15900 - cimg::swap(arr[mid],arr[l+1]);
15901 - if (arr[l]>arr[ir]) cimg::swap(arr[l],arr[ir]);
15902 - if (arr[l+1]>arr[ir]) cimg::swap(arr[l+1],arr[ir]);
15903 - if (arr[l]>arr[l+1]) cimg::swap(arr[l],arr[l+1]);
15904 - unsigned long i = l+1, j = ir;
15905 - const T pivot = arr[l+1];
15906 - for (;;) {
15907 - do i++; while (arr[i]<pivot);
15908 - do j--; while (arr[j]>pivot);
15909 - if (j<i) break;
15910 - cimg::swap(arr[i],arr[j]);
15911 - }
15912 - arr[l+1] = arr[j];
15913 - arr[j] = pivot;
15914 - if (j>=k) ir=j-1;
15915 - if (j<=k) l=i;
15916 - }
15917 - }
15918 - return 0;
15919 - }
15920 -
15921 - //! Return the median of the image
15922 - const T median() const {
15923 - const unsigned int s = size();
15924 - const T res = kth_smallest(s>>1);
15925 - return (s%2)?res:((res+kth_smallest((s>>1)-1))/2);
15926 - }
15927 -
15928 - //! Return the dot product of the current vector/matrix with the vector/matrix \p img.
15929 - double dot(const CImg& img) const {
15930 - if (is_empty())
15931 - throw CImgInstanceException("CImg<%s>::dot() : Instance object (%u,%u,%u,%u,%p) is empty.",
15932 - pixel_type(),width,height,depth,dim,data);
15933 - if (img.is_empty())
15934 - throw CImgArgumentException("CImg<%s>::trace() : Specified argument (%u,%u,%u,%u,%p) is empty.",
15935 - pixel_type(),img.width,img.height,img.depth,img.dim,img.data);
15936 - const unsigned long nb = cimg::min(size(),img.size());
15937 - double res=0;
15938 - for (unsigned long off=0; off<nb; off++) res+=data[off]*img[off];
15939 - return res;
15940 - }
15941 -
15942 - //! Return the cross product between two 3d vectors
15943 - CImg& cross(const CImg& img) {
15944 - if (width!=1 || height<3 || img.width!=1 || img.height<3)
15945 - throw CImgInstanceException("CImg<%s>::cross() : Arguments (%u,%u,%u,%u,%p) and (%u,%u,%u,%u,%p) must be both 3d vectors.",
15946 - pixel_type(),width,height,depth,dim,data,img.width,img.height,img.depth,img.dim,img.data);
15947 - const T x = (*this)[0], y = (*this)[1], z = (*this)[2];
15948 - (*this)[0] = y*img[2]-z*img[1];
15949 - (*this)[1] = z*img[0]-x*img[2];
15950 - (*this)[2] = x*img[1]-y*img[0];
15951 - return *this;
15952 - }
15953 -
15954 - //! Return the cross product between two 3d vectors
15955 - CImg get_cross(const CImg& img) const {
15956 - return (+*this).cross(img);
15957 - }
15958 -
15959 - //! Return the determinant of the current matrix.
15960 - double det() const {
15961 - if (is_empty() || width!=height || depth!=1 || dim!=1)
15962 - throw CImgInstanceException("CImg<%s>::det() : Instance matrix (%u,%u,%u,%u,%p) is not square or is empty.",
15963 - pixel_type(),width,height,depth,dim,data);
15964 - switch (width) {
15965 - case 1: return (*this)(0,0);
15966 - case 2: return (*this)(0,0)*(*this)(1,1)-(*this)(0,1)*(*this)(1,0);
15967 - case 3: {
15968 - const double
15969 - a = data[0], d = data[1], g = data[2],
15970 - b = data[3], e = data[4], h = data[5],
15971 - c = data[6], f = data[7], i = data[8];
15972 - return i*a*e-a*h*f-i*b*d+b*g*f+c*d*h-c*g*e;
15973 - }
15974 - default: {
15975 - typedef typename cimg::largest<T,float>::type ftype;
15976 - CImg<ftype> lu(*this);
15977 - CImg<unsigned int> indx;
15978 - bool d;
15979 - lu._LU(indx,d);
15980 - double res = d?1.0:-1.0;
15981 - cimg_forX(lu,i) res*=lu(i,i);
15982 - return res;
15983 - }
15984 - }
15985 - return 0;
15986 - }
15987 -
15988 - //! Return the norm of the current vector/matrix. \p ntype = norm type (0=L2, 1=L1, -1=Linf).
15989 - double norm(const int ntype=2) const {
15990 - if (is_empty())
15991 - throw CImgInstanceException("CImg<%s>::norm() : Instance object (%u,%u,%u,%u,%p) is empty.",
15992 - pixel_type(),width,height,depth,dim,data);
15993 - double res = 0;
15994 - switch (ntype) {
15995 - case -1: {
15996 - cimg_foroff(*this,off) {
15997 - const double tmp = cimg::abs((double)data[off]);
15998 - if (tmp>res) res = tmp;
15999 - }
16000 - return res;
16001 - } break;
16002 - case 1 : {
16003 - cimg_foroff(*this,off) res+=cimg::abs((double)data[off]);
16004 - return res;
16005 - } break;
16006 - default: { return std::sqrt(dot(*this)); }
16007 - }
16008 - return 0;
16009 - }
16010 -
16011 - //! Return the sum of all the pixel values in an image.
16012 - double sum() const {
16013 - if (is_empty())
16014 - throw CImgInstanceException("CImg<%s>::sum() : Instance object (%u,%u,%u,%u,%p) is empty.",
16015 - pixel_type(),width,height,depth,dim,data);
16016 - double res=0;
16017 - cimg_for(*this,ptr,T) res+=*ptr;
16018 - return res;
16019 - }
16020 -
16021 - //! Compute the SVD of a general matrix.
16022 - template<typename t> const CImg& SVD(CImg<t>& U, CImg<t>& S, CImg<t>& V,
16023 - const bool sorting=true, const unsigned int max_iter=40) const {
16024 - if (is_empty()) { U.assign(); S.assign(); V.assign(); }
16025 - else {
16026 - U = *this;
16027 - if (S.size()<width) S.assign(1,width);
16028 - if (V.width<width || V.height<height) V.assign(width,width);
16029 - CImg<t> rv1(width);
16030 - t anorm=0,c,f,g=0,h,s,scale=0;
16031 - int l=0, nm=0;
16032 -
16033 - cimg_forX(U,i) {
16034 - l = i+1; rv1[i] = scale*g; g = s = scale = 0;
16035 - if (i<dimy()) {
16036 - for (int k=i; k<dimy(); k++) scale+= cimg::abs(U(i,k));
16037 - if (scale) {
16038 - for (int k=i; k<dimy(); k++) { U(i,k)/=scale; s+= U(i,k)*U(i,k); }
16039 - f = U(i,i); g = (t)((f>=0?-1:1)*std::sqrt(s)); h=f*g-s; U(i,i)=f-g;
16040 - for (int j=l; j<dimx(); j++) {
16041 - s = 0; for (int k=i; k<dimy(); k++) s+= U(i,k)*U(j,k);
16042 - f = s/h;
16043 - { for (int k=i; k<dimy(); k++) U(j,k)+= f*U(i,k); }
16044 - }
16045 - { for (int k=i; k<dimy(); k++) U(i,k)*= scale; }
16046 - }
16047 - }
16048 - S[i]=scale*g;
16049 -
16050 - g = s = scale = 0;
16051 - if (i<dimy() && i!=dimx()-1) {
16052 - for (int k=l; k<dimx(); k++) scale += cimg::abs(U(k,i));
16053 - if (scale) {
16054 - for (int k=l; k<dimx(); k++) { U(k,i)/= scale; s+= U(k,i)*U(k,i); }
16055 - f = U(l,i); g = (t)((f>=0?-1:1)*std::sqrt(s)); h = f*g-s; U(l,i) = f-g;
16056 - { for (int k=l; k<dimx(); k++) rv1[k]=U(k,i)/h; }
16057 - for (int j=l; j<dimy(); j++) {
16058 - s=0; for (int k=l; k<dimx(); k++) s+= U(k,j)*U(k,i);
16059 - { for (int k=l; k<dimx(); k++) U(k,j)+= s*rv1[k]; }
16060 - }
16061 - { for (int k=l; k<dimx(); k++) U(k,i)*= scale; }
16062 - }
16063 - }
16064 - anorm=cimg::max((t)anorm,(cimg::abs(S[i])+cimg::abs(rv1[i])));
16065 - }
16066 -
16067 - { for (int i=dimx()-1; i>=0; i--) {
16068 - if (i<dimx()-1) {
16069 - if (g) {
16070 - { for (int j=l; j<dimx(); j++) V(i,j) =(U(j,i)/U(l,i))/g; }
16071 - for (int j=l; j<dimx(); j++) {
16072 - s=0; for (int k=l; k<dimx(); k++) s+= U(k,i)*V(j,k);
16073 - { for (int k=l; k<dimx(); k++) V(j,k)+= s*V(i,k); }
16074 - }
16075 - }
16076 - for (int j=l; j<dimx(); j++) V(j,i)=V(i,j)=0.0;
16077 - }
16078 - V(i,i) = 1.0; g = rv1[i]; l = i;
16079 - }
16080 - }
16081 -
16082 - { for (int i=cimg::min(dimx(),dimy())-1; i>=0; i--) {
16083 - l = i+1; g = S[i];
16084 - for (int j=l; j<dimx(); j++) U(j,i) = 0;
16085 - if (g) {
16086 - g = 1/g;
16087 - for (int j=l; j<dimx(); j++) {
16088 - s=0; for (int k=l; k<dimy(); k++) s+= U(i,k)*U(j,k);
16089 - f = (s/U(i,i))*g;
16090 - { for (int k=i; k<dimy(); k++) U(j,k)+= f*U(i,k); }
16091 - }
16092 - { for (int j=i; j<dimy(); j++) U(i,j)*= g; }
16093 - } else for (int j=i; j<dimy(); j++) U(i,j)=0;
16094 - U(i,i)++;
16095 - }
16096 - }
16097 -
16098 - for (int k=dimx()-1; k>=0; k--) {
16099 - for (unsigned int its=0; its<max_iter; its++) {
16100 - bool flag = true;
16101 - for (l=k; l>=1; l--) {
16102 - nm = l-1;
16103 - if ((cimg::abs(rv1[l])+anorm)==anorm) { flag = false; break; }
16104 - if ((cimg::abs(S[nm])+anorm)==anorm) break;
16105 - }
16106 - if (flag) {
16107 - c = 0; s = 1;
16108 - for (int i=l; i<=k; i++) {
16109 - f = s*rv1[i]; rv1[i] = c*rv1[i];
16110 - if ((cimg::abs(f)+anorm)==anorm) break;
16111 - g = S[i]; h = (t)cimg::pythagore(f,g); S[i] = h; h = 1/h; c = g*h; s = -f*h;
16112 - cimg_forY(U,j) { const t y = U(nm,j), z = U(i,j); U(nm,j) = y*c+z*s; U(i,j) = z*c-y*s; }
16113 - }
16114 - }
16115 - const t& z = S[k];
16116 - if (l==k) { if (z<0) { S[k] = -z; cimg_forX(U,j) V(k,j) = -V(k,j); } break; }
16117 - nm = k-1;
16118 - t x = S[l], y = S[nm];
16119 - g = rv1[nm]; h = rv1[k];
16120 - f = ((y-z)*(y+z)+(g-h)*(g+h))/(2*h*y);
16121 - g = (t)cimg::pythagore(f,1.0);
16122 - f = ((x-z)*(x+z)+h*((y/(f+ (f>=0?g:-g)))-h))/x;
16123 - c = s = 1;
16124 - for (int j=l; j<=nm; j++) {
16125 - const int i = j+1;
16126 - g = rv1[i]; h = s*g; g = c*g;
16127 - t y = S[i];
16128 - t z = (t)cimg::pythagore(f,h);
16129 - rv1[j] = z; c = f/z; s = h/z;
16130 - f = x*c+g*s; g = g*c-x*s; h = y*s; y*=c;
16131 - cimg_forX(U,jj) { const t x = V(j,jj), z = V(i,jj); V(j,jj) = x*c+z*s; V(i,jj) = z*c-x*s; }
16132 - z = (t)cimg::pythagore(f,h); S[j] = z;
16133 - if (z) { z = 1/z; c = f*z; s = h*z; }
16134 - f = c*g+s*y; x = c*y-s*g;
16135 - { cimg_forY(U,jj) { const t y = U(j,jj); z = U(i,jj); U(j,jj) = y*c+z*s; U(i,jj) = z*c-y*s; }}
16136 - }
16137 - rv1[l] = 0; rv1[k]=f; S[k]=x;
16138 - }
16139 - }
16140 -
16141 - if (sorting) {
16142 - CImg<int> permutations(width);
16143 - CImg<t> tmp(width);
16144 - S.sort(permutations,false);
16145 - cimg_forY(U,k) {
16146 - cimg_forX(permutations,x) tmp(x) = U(permutations(x),k);
16147 - std::memcpy(U.ptr(0,k),tmp.data,sizeof(t)*width);
16148 - }
16149 - { cimg_forY(V,k) {
16150 - cimg_forX(permutations,x) tmp(x) = V(permutations(x),k);
16151 - std::memcpy(V.ptr(0,k),tmp.data,sizeof(t)*width);
16152 - }}
16153 - }
16154 - }
16155 - return *this;
16156 - }
16157 -
16158 - //! Compute the SVD of a general matrix.
16159 - template<typename t> const CImg& SVD(CImgList<t>& USV) const {
16160 - if (USV.size<3) USV.assign(3);
16161 - return SVD(USV[0],USV[1],USV[2]);
16162 - }
16163 -
16164 - //! Compute the SVD of a general matrix.
16165 - CImgList<typename cimg::largest<T,float>::type> get_SVD(const bool sorting=true) const {
16166 - typedef typename cimg::largest<T,float>::type restype;
16167 - CImgList<restype> res(3);
16168 - SVD(res[0],res[1],res[2],sorting);
16169 - return res;
16170 - }
16171 -
16172 - // INNER ROUTINE : Compute the LU decomposition of a permuted matrix (c.f. numerical recipies)
16173 - template<typename t> CImg& _LU(CImg<t>& indx, bool& d) {
16174 - typedef typename cimg::largest<T,float>::type ftype;
16175 - const int N = dimx();
16176 - int imax=0;
16177 - CImg<ftype> vv(N);
16178 - indx.assign(N);
16179 - d=true;
16180 - cimg_forX(*this,i) {
16181 - ftype vmax=0.0;
16182 - cimg_forX(*this,j) {
16183 - const ftype tmp = cimg::abs((*this)(j,i));
16184 - if (tmp>vmax) vmax = tmp;
16185 - }
16186 - if (vmax==0) return fill(0);
16187 - vv[i] = 1/vmax;
16188 - }
16189 - cimg_forX(*this,j) {
16190 - for (int i=0; i<j; i++) {
16191 - ftype sum=(*this)(j,i);
16192 - for (int k=0; k<i; k++) sum-=(*this)(k,i)*(*this)(j,k);
16193 - (*this)(j,i) = (T)sum;
16194 - }
16195 - ftype vmax=0;
16196 - { for (int i=j; i<dimx(); i++) {
16197 - ftype sum=(*this)(j,i);
16198 - for (int k=0; k<j; k++) sum-=(*this)(k,i)*(*this)(j,k);
16199 - (*this)(j,i) = (T)sum;
16200 - const ftype tmp = vv[i]*cimg::abs(sum);
16201 - if (tmp>=vmax) { vmax=tmp; imax=i; }
16202 - }}
16203 - if (j!=imax) {
16204 - cimg_forX(*this,k) cimg::swap((*this)(k,imax),(*this)(k,j));
16205 - d =!d;
16206 - vv[imax] = vv[j];
16207 - }
16208 - indx[j] = (t)imax;
16209 - if ((*this)(j,j)==0) (*this)(j,j)=(T)1e-20;
16210 - if (j<N) {
16211 - const ftype tmp = 1/(ftype)(*this)(j,j);
16212 - for (int i=j+1; i<N; i++) (*this)(j,i)*=tmp;
16213 - }
16214 - }
16215 - return *this;
16216 - }
16217 -
16218 - // INNER ROUTINE : Solve a linear system, using the LU decomposition
16219 - template<typename t> CImg& _solve(const CImg<T>& A, const CImg<t>& indx) {
16220 - typedef typename cimg::largest<T,float>::type ftype;
16221 - const int N = size();
16222 - int ii=-1;
16223 - ftype sum;
16224 - for (int i=0; i<N; i++) {
16225 - const int ip = (int)indx[i];
16226 - ftype sum = (*this)(ip);
16227 - (*this)(ip) = (*this)(i);
16228 - if (ii>=0) for (int j=ii; j<=i-1; j++) sum-=A(j,i)*(*this)(j);
16229 - else if (sum!=0) ii=i;
16230 - (*this)(i)=sum;
16231 - }
16232 - { for (int i=N-1; i>=0; i--) {
16233 - sum = (*this)(i);
16234 - for (int j=i+1; j<N; j++) sum-=A(j,i)*(*this)(j);
16235 - (*this)(i)=sum/A(i,i);
16236 - }}
16237 - return *this;
16238 - }
16239 -
16240 - //! Solve a linear system AX=B where B=*this. (in-place version)
16241 - CImg& solve(const CImg& A) {
16242 - if (width!=1 || depth!=1 || dim!=1 || height!=A.height || A.depth!=1 || A.dim!=1)
16243 - throw CImgArgumentException("CImg<%s>::solve() : Instance matrix size is (%u,%u,%u,%u) while "
16244 - "size of given matrix A is (%u,%u,%u,%u).",
16245 - pixel_type(),width,height,depth,dim,A.width,A.height,A.depth,A.dim);
16246 - if (A.width==A.height) {
16247 - CImg<T> lu(A);
16248 - CImg<T> indx;
16249 - bool d;
16250 - lu._LU(indx,d);
16251 - _solve(lu,indx);
16252 - } else assign(A.get_pseudoinverse()*(*this));
16253 - return *this;
16254 - }
16255 -
16256 - //! Solve a linear system AX=B where B=*this.
16257 - CImg<typename cimg::largest<T,float>::type> get_solve(const CImg& A) const {
16258 - typedef typename cimg::largest<T,float>::type restype;
16259 - return CImg<restype>(*this,false).solve(A);
16260 - }
16261 -
16262 - //! Compute the eigenvalues and eigenvectors of a matrix.
16263 - template<typename t> const CImg<T>& eigen(CImg<t>& val, CImg<t> &vec) const {
16264 - if (is_empty()) { val.assign(); vec.assign(); }
16265 - else {
16266 - if (width!=height || depth>1 || dim>1)
16267 - throw CImgInstanceException("CImg<%s>::eigen() : Instance object (%u,%u,%u,%u,%p) is empty.",
16268 - pixel_type(),width,height,depth,dim,data);
16269 - if (val.size()<width) val.assign(1,width);
16270 - if (vec.size()<width*width) vec.assign(width,width);
16271 - switch(width) {
16272 - case 1: { val[0]=(t)(*this)[0]; vec[0]=(t)1; } break;
16273 - case 2: {
16274 - const double a = (*this)[0], b = (*this)[1], c = (*this)[2], d = (*this)[3], e = a+d;
16275 - double f = e*e-4*(a*d-b*c);
16276 - cimg::warn(f<0,"CImg<%s>::eigen() : Complex eigenvalues",pixel_type());
16277 - f = std::sqrt(f);
16278 - const double l1 = 0.5*(e-f), l2 = 0.5*(e+f);
16279 - const double theta1 = std::atan2(l2-a,b), theta2 = std::atan2(l1-a,b);
16280 - val[0]=(t)l2;
16281 - val[1]=(t)l1;
16282 - vec(0,0) = (t)std::cos(theta1);
16283 - vec(0,1) = (t)std::sin(theta1);
16284 - vec(1,0) = (t)std::cos(theta2);
16285 - vec(1,1) = (t)std::sin(theta2);
16286 - } break;
16287 - default:
16288 - throw CImgInstanceException("CImg<%s>::eigen() : Eigenvalues computation of general matrices is limited"
16289 - "to 2x2 matrices (given is %ux%u)", pixel_type(),width,height);
16290 - }
16291 - }
16292 - return *this;
16293 - }
16294 -
16295 - //! Return the eigenvalues and eigenvectors of a matrix.
16296 - CImgList<typename cimg::largest<T,float>::type> get_eigen() const {
16297 - typedef typename cimg::largest<T,float>::type restype;
16298 - CImgList<restype> res(2);
16299 - eigen(res[0],res[1]);
16300 - return res;
16301 - }
16302 -
16303 - //! Compute the eigenvalues and eigenvectors of a matrix.
16304 - template<typename t> const CImg<T>& eigen(CImgList<t>& eig) const {
16305 - if (eig.size<2) eig.assign(2);
16306 - eigen(eig[0],eig[1]);
16307 - return *this;
16308 - }
16309 -
16310 - //! Compute the eigenvalues and eigenvectors of a symmetric matrix.
16311 - template<typename t> const CImg<T>& symmetric_eigen(CImg<t>& val, CImg<t>& vec) const {
16312 - if (is_empty()) { val.assign(); vec.assign(); }
16313 - else {
16314 - if (width!=height || depth>1 || dim>1)
16315 - throw CImgInstanceException("CImg<%s>::eigen() : Instance object (%u,%u,%u,%u,%p) is empty.",
16316 - pixel_type(),width,height,depth,dim,data);
16317 -
16318 - if (val.size()<width) val.assign(1,width);
16319 - if (vec.data && vec.size()<width*width) vec.assign(width,width);
16320 - if (width<3) return eigen(val,vec);
16321 - CImg<t> V(width,width);
16322 - SVD(vec,val,V,false);
16323 - cimg_forX(vec,x) { // check for negative eigenvalues
16324 - t scal=0;
16325 - cimg_forY(vec,y) scal+=vec(x,y)*V(x,y);
16326 - if (scal<0) val[x]=-val[x];
16327 - }
16328 - CImg<int> permutations(width); // sort eigenvalues in decreasing order
16329 - CImg<t> tmp(width);
16330 - val.sort(permutations,false);
16331 - cimg_forY(vec,k) {
16332 - cimg_forX(permutations,x) tmp(x) = vec(permutations(x),k);
16333 - std::memcpy(vec.ptr(0,k),tmp.data,sizeof(t)*width);
16334 - }
16335 - }
16336 - return *this;
16337 - }
16338 -
16339 - //! Compute the eigenvalues and eigenvectors of a symmetric matrix.
16340 - CImgList<typename cimg::largest<T,float>::type> get_symmetric_eigen() const {
16341 - typedef typename cimg::largest<T,float>::type restype;
16342 - CImgList<restype> res(2);
16343 - symmetric_eigen(res[0],res[1]);
16344 - return res;
16345 - }
16346 -
16347 - //! Compute the eigenvalues and eigenvectors of a symmetric matrix.
16348 - template<typename t> const CImg<T>& symmetric_eigen(CImgList<t>& eig) const {
16349 - if (eig.size<2) eig.assign(2);
16350 - symmetric_eigen(eig[0],eig[1]);
16351 - return *this;
16352 - }
16353 -
16354 - template<typename t> CImg<T>& _quicksort(const int min,const int max,CImg<t>& permutations,const bool increasing) {
16355 - if (min<max) {
16356 - const int mid = (min+max)/2;
16357 - if (increasing) {
16358 - if ((*this)[min]>(*this)[mid]) {
16359 - cimg::swap((*this)[min],(*this)[mid]); cimg::swap(permutations[min],permutations[mid]); }
16360 - if ((*this)[mid]>(*this)[max]) {
16361 - cimg::swap((*this)[max],(*this)[mid]); cimg::swap(permutations[max],permutations[mid]); }
16362 - if ((*this)[min]>(*this)[mid]) {
16363 - cimg::swap((*this)[min],(*this)[mid]); cimg::swap(permutations[min],permutations[mid]); }
16364 - } else {
16365 - if ((*this)[min]<(*this)[mid]) {
16366 - cimg::swap((*this)[min],(*this)[mid]); cimg::swap(permutations[min],permutations[mid]); }
16367 - if ((*this)[mid]<(*this)[max]) {
16368 - cimg::swap((*this)[max],(*this)[mid]); cimg::swap(permutations[max],permutations[mid]); }
16369 - if ((*this)[min]<(*this)[mid]) {
16370 - cimg::swap((*this)[min],(*this)[mid]); cimg::swap(permutations[min],permutations[mid]); }
16371 - }
16372 - if (max-min>=3) {
16373 - const T pivot = (*this)[mid];
16374 - int i = min, j = max;
16375 - if (increasing) {
16376 - do {
16377 - while ((*this)[i]<pivot) i++;
16378 - while ((*this)[j]>pivot) j--;
16379 - if (i<=j) {
16380 - cimg::swap((*this)[i],(*this)[j]);
16381 - cimg::swap(permutations[i++],permutations[j--]);
16382 - }
16383 - } while (i<=j);
16384 - } else {
16385 - do {
16386 - while ((*this)[i]>pivot) i++;
16387 - while ((*this)[j]<pivot) j--;
16388 - if (i<=j) {
16389 - cimg::swap((*this)[i],(*this)[j]);
16390 - cimg::swap(permutations[i++],permutations[j--]);
16391 - }
16392 - } while (i<=j);
16393 - }
16394 - if (min<j) _quicksort(min,j,permutations,increasing);
16395 - if (i<max) _quicksort(i,max,permutations,increasing);
16396 - }
16397 - }
16398 - return *this;
16399 - }
16400 -
16401 - //! Sort values of a vector and get permutations.
16402 - template<typename t>
16403 - CImg<T>& sort(CImg<t>& permutations,const bool increasing=true) {
16404 - if (is_empty()) permutations.assign();
16405 - else {
16406 - if (permutations.size()!=size()) permutations.assign(size());
16407 - cimg_foroff(permutations,off) permutations[off] = (t)off;
16408 - _quicksort(0,size()-1,permutations,increasing);
16409 - }
16410 - return *this;
16411 - }
16412 -
16413 - //! Sort values of a vector.
16414 - CImg<T>& sort(const bool increasing=true) { CImg<T> foo; return sort(foo,increasing); }
16415 -
16416 - //! Get a sorted version a of vector, with permutations.
16417 - template<typename t> CImg<T> get_sort(CImg<t>& permutations,const bool increasing=true) {
16418 - return (+*this).sort(permutations,increasing);
16419 - }
16420 -
16421 - //! Get a sorted version of a vector.
16422 - CImg<T> get_sort(const bool increasing=true) {
16423 - return (+*this).sort(increasing);
16424 - }
16425 -
16426 - //! Get a permutation of the pixels
16427 - template<typename t> CImg<T> get_permute(const CImg<t>& permutation) const {
16428 - if (permutation.size()!=size())
16429 - throw CImgArgumentException("CImg<%s>::get_permute() : Instance image (%u,%u,%u,%u,%p) and permutation (%u,%u,%u,%u,%p)"
16430 - "have different sizes.",pixel_type(),
16431 - width,height,depth,dim,data,
16432 - permutation.width,permutation.height,permutation.depth,permutation.dim,permutation.data);
16433 - CImg<T> res(width,height,depth,dim);
16434 - const t *p = permutation.ptr(permutation.size());
16435 - cimg_for(res,ptr,T) *ptr = (*this)[*(--p)];
16436 - return res;
16437 - }
16438 -
16439 - //! In-place version of the previous function
16440 - template<typename t> CImg<T>& permute(const CImg<t>& permutation) {
16441 - return get_permute(permutation).swap(*this);
16442 - }
16443 -
16444 - //@}
16445 - //-------------------
16446 - //
16447 - //! \name Display
16448 - //@{
16449 - //-------------------
16450 -
16451 - //! Display an image into a CImgDisplay window.
16452 - const CImg& display(CImgDisplay& disp) const {
16453 - disp.display(*this);
16454 - return *this;
16455 - }
16456 -
16457 - //! Display an image in a window with a title \p title, and wait a 'is_closed' or 'keyboard' event.\n
16458 - //! Parameters \p min_size and \p max_size set the minimum and maximum dimensions of the display window.
16459 - //! If negative, they corresponds to a percentage of the original image size.
16460 - const CImg& display(const char* title, const int min_size=128, const int max_size=1024) const {
16461 - if (is_empty())
16462 - throw CImgInstanceException("CImg<%s>::display() : Instance image (%u,%u,%u,%u,%p) is empty.",
16463 - pixel_type(),width,height,depth,dim,data);
16464 - CImgDisplay *disp;
16465 - unsigned int w = width+(depth>1?depth:0), h = height+(depth>1?depth:0), XYZ[3];
16466 - print(title);
16467 - const unsigned int dmin = cimg::min(w,h), minsiz = min_size>=0?min_size:(-min_size)*dmin/100;
16468 - if (dmin<minsiz) { w=w*minsiz/dmin; w+=(w==0); h=h*minsiz/dmin; h+=(h==0); }
16469 - const unsigned int dmax = cimg::max(w,h), maxsiz = max_size>=0?max_size:(-max_size)*dmax/100;
16470 - if (dmax>maxsiz) { w=w*maxsiz/dmax; w+=(w==0); h=h*maxsiz/dmax; h+=(h==0); }
16471 - disp = new CImgDisplay(w,h,title,3,3);
16472 - XYZ[0] = width/2; XYZ[1] = height/2; XYZ[2] = depth/2;
16473 - while (!disp->is_closed && !disp->key) feature_selection(0,1,*disp,XYZ);
16474 - delete disp;
16475 - return *this;
16476 - }
16477 -
16478 - //! Display an image in a window, with a default title. See also \see display() for details on parameters.
16479 - const CImg& display(const int min_size=128, const int max_size=1024) const {
16480 - char title[256]={0};
16481 - std::sprintf(title,"CImg<%s>",pixel_type());
16482 - return display(title,min_size,max_size);
16483 - }
16484 -
16485 - //! High-level interface to select features from images
16486 - const CImg& feature_selection(int* const selection, const int feature_type, CImgDisplay &disp,
16487 - unsigned int *const XYZ=0,const unsigned char *const color=0) const {
16488 - if (is_empty())
16489 - throw CImgInstanceException("CImg<%s>::feature_selection() : Instance image (%u,%u,%u,%u,%p) is empty.",
16490 - pixel_type(),width,height,depth,dim,data);
16491 -
16492 - const unsigned int
16493 - old_events = disp.events,
16494 - old_normalization = disp.normalization,
16495 - hatch = 0x55555555;
16496 -
16497 - bool old_is_resized = disp.is_resized;
16498 - disp.events = 3;
16499 - disp.normalization = 0;
16500 - disp.show().key = 0;
16501 -
16502 - unsigned char fgcolor[3] = { 255,255,105 }, bgcolor[3] = { 0,0,0 };
16503 - if (color) std::memcpy(fgcolor,color,sizeof(unsigned char)*cimg::min(3,dimv()));
16504 -
16505 - int area = 0, clicked_area = 0, phase = 0,
16506 - X0 = (int)((XYZ?XYZ[0]:width/2)%width), Y0 = (int)((XYZ?XYZ[1]:height/2)%height), Z0 = (int)((XYZ?XYZ[2]:depth/2)%depth),
16507 - X1 =-1, Y1 = -1, Z1 = -1,
16508 - X = -1, Y = -1, Z = -1,
16509 - oX = X, oY = Y, oZ = Z;
16510 - unsigned int old_button = 0, key = 0;
16511 -
16512 - bool feature_selected = false, text_down = false;
16513 - CImg<unsigned char> visu, visu0;
16514 - char text[1024] = { 0 };
16515 -
16516 - while (!key && !disp.is_closed && !feature_selected) {
16517 -
16518 - // Handle mouse motion and selection
16519 - oX = X; oY = Y; oZ = Z;
16520 - int mx = disp.mouse_x, my = disp.mouse_y;
16521 - const int mX = mx*(width+(depth>1?depth:0))/disp.width, mY = my*(height+(depth>1?depth:0))/disp.height;
16522 -
16523 - area = 0;
16524 - if (mX<dimx() && mY<dimy()) { area = 1; X = mX; Y = mY; Z = phase?Z1:Z0; }
16525 - if (mX<dimx() && mY>=dimy()) { area = 2; X = mX; Z = mY-height; Y = phase?Y1:Y0; }
16526 - if (mX>=dimx() && mY<dimy()) { area = 3; Y = mY; Z = mX-width; X = phase?X1:X0; }
16527 -
16528 - key = disp.key;
16529 - if (key && key!=cimg::keyCTRLLEFT) {
16530 - if (disp.is_pressed(cimg::keyCTRLLEFT)) {
16531 - switch (key) {
16532 - case cimg::keyARROWLEFT:
16533 - case cimg::keyARROWDOWN: disp.wheel--; break;
16534 - case cimg::keyARROWRIGHT:
16535 - case cimg::keyARROWUP: disp.wheel++; break;
16536 - case cimg::keyD: if (disp.is_fullscreen) disp.toggle_fullscreen(); disp.resize(-200,-200); disp.is_resized = true; break;
16537 - case cimg::keyC: if (disp.is_fullscreen) disp.toggle_fullscreen(); disp.resize(-50,-50); disp.is_resized = true; break;
16538 - case cimg::keyF:
16539 - disp.resize(disp.screen_dimx(),disp.screen_dimy()).toggle_fullscreen();
16540 - disp.is_resized = true;
16541 - break;
16542 - case cimg::keyS: {
16543 - static unsigned int snap_number = 0;
16544 - char filename[32] = {0};
16545 - std::FILE *file;
16546 - do {
16547 - std::sprintf(filename,"CImg_%.4u.bmp",snap_number++);
16548 - if ((file=std::fopen(filename,"r"))!=0) std::fclose(file);
16549 - } while (file);
16550 - if (!visu0.is_empty()) visu0.save(filename);
16551 - } break;
16552 - default: break;
16553 - }
16554 - key = disp.key = 0;
16555 - }
16556 - } else key = 0;
16557 -
16558 - if (!area) mx = my = X = Y = Z = -1;
16559 - else {
16560 - if (disp.button&1 && phase<2) { X1 = X; Y1 = Y; Z1 = Z; }
16561 - if (!(disp.button&1) && phase>=2) {
16562 - switch (clicked_area) {
16563 - case 1: Z1 = Z; break;
16564 - case 2: Y1 = Y; break;
16565 - case 3: X1 = X; break;
16566 - }
16567 - }
16568 - if (disp.button&2) { if (phase) { X1 = X; Y1 = Y; Z1 = Z; } else { X0 = X; Y0 = Y; Z0 = Z; } }
16569 - if (disp.button&4) { oX = X = X0; oY = Y = Y0; oZ = Z = Z0; phase = 0; visu.assign(); }
16570 - if (disp.wheel) {
16571 - switch (area) {
16572 - case 1: if (phase) Z = (Z1+=disp.wheel); else Z = (Z0+=disp.wheel); break;
16573 - case 2: if (phase) Y = (Y1+=disp.wheel); else Y = (Y0+=disp.wheel); break;
16574 - case 3: if (phase) X = (X1+=disp.wheel); else X = (X0+=disp.wheel); break;
16575 - default: break;
16576 - }
16577 - disp.wheel = 0;
16578 - }
16579 - if ((disp.button&1)!=old_button) {
16580 - switch (phase++) {
16581 - case 0: X0 = X1 = X; Y0 = Y1 = Y; Z0 = Z1 = Z; clicked_area = area; break;
16582 - case 1: X1 = X; Y1 = Y; Z1 = Z; break;
16583 - default: break;
16584 - }
16585 - old_button = disp.button&1;
16586 - }
16587 - if (depth>1 && (X!=oX || Y!=oY || Z!=oZ)) visu0.assign();
16588 - }
16589 -
16590 - if (phase) {
16591 - if (!feature_type) feature_selected = phase?true:false;
16592 - else {
16593 - if (depth>1) feature_selected = (phase==3)?true:false;
16594 - else feature_selected = (phase==2)?true:false;
16595 - }
16596 - }
16597 -
16598 - if (X0<0) X0 = 0; if (X0>=(int)width) X0 = (int)width-1; if (Y0<0) Y0 = 0; if (Y0>=(int)height) Y0 = (int)height-1;
16599 - if (Z0<0) Z0 = 0; if (Z0>=(int)depth) Z0 = (int)depth-1;
16600 - if (X1<1) X1 = 0; if (X1>=(int)width) X1 = (int)width-1; if (Y1<0) Y1 = 0; if (Y1>=(int)height) Y1 = (int)height-1;
16601 - if (Z1<0) Z1 = 0; if (Z1>=(int)depth) Z1 = (int)depth-1;
16602 -
16603 - // Draw visualization image on the display
16604 - if (oX!=X || oY!=Y || oZ!=Z || visu0.is_empty()) {
16605 - if (visu0.is_empty()) {
16606 - CImg<T> tmp;
16607 - if (depth==1) tmp = get_resize(disp.width,disp.height,1,cimg::min(3,dimv()));
16608 - else tmp = (!phase?get_projections2d(X0,Y0,Z0):get_projections2d(X1,Y1,Z1)).get_resize(disp.width,disp.height,1,cimg::min(3,dimv()));
16609 - if (old_normalization) {
16610 - if (old_normalization<3 || cimg::type<T>::is_float()) {
16611 - if (sizeof(T)>1) visu0.assign(tmp.normalize(0,255));
16612 - else visu0.assign(tmp).normalize(0,255);
16613 - } else {
16614 - if (cimg::type<T>::id()!=cimg::type<unsigned char>::id()) {
16615 - const float m = cimg::type<T>::min(), M = cimg::type<T>::max();
16616 - visu0.assign((CImg<float>(tmp)-=m)*=255.0f/(M-m));
16617 - } else visu0.assign(tmp);
16618 - }
16619 - } else visu0.assign(tmp);
16620 - }
16621 - visu = visu0;
16622 -
16623 - const int d=(depth>1)?depth:0;
16624 - if (phase) switch (feature_type) {
16625 - case 1: {
16626 - const int
16627 - x0=(int)((X0+0.5f)*disp.width/(width+d)), y0=(int)((Y0+0.5f)*disp.height/(height+d)),
16628 - x1=(int)((X1+0.5f)*disp.width/(width+d)), y1=(int)((Y1+0.5f)*disp.height/(height+d));
16629 - visu.draw_arrow(x0,y0,x1,y1,fgcolor,30.0f,5.0f,hatch);
16630 - if (d) {
16631 - const int zx0=(int)((width+Z0+0.5f)*disp.width/(width+d)), zx1=(int)((width+Z1+0.5f)*disp.width/(width+d)),
16632 - zy0=(int)((height+Z0+0.5f)*disp.height/(height+d)), zy1=(int)((height+Z1+0.5f)*disp.height/(height+d));
16633 - visu.draw_arrow(zx0,y0,zx1,y1,fgcolor,30.0f,5.0f,hatch).draw_arrow(x0,zy0,x1,zy1,fgcolor,30.0f,5.0f,hatch);
16634 - }
16635 - } break;
16636 - case 2: {
16637 - const int
16638 - x0=(X0<X1?X0:X1)*disp.width/(width+d),
16639 - y0=(Y0<Y1?Y0:Y1)*disp.height/(height+d),
16640 - x1=((X0<X1?X1:X0)+1)*disp.width/(width+d)-1,
16641 - y1=((Y0<Y1?Y1:Y0)+1)*disp.height/(height+d)-1;
16642 - visu.draw_rectangle(x0,y0,x1,y1,fgcolor,0.2f).draw_line(x0,y0,x1,y0,fgcolor,hatch).
16643 - draw_line(x1,y0,x1,y1,fgcolor,hatch).draw_line(x1,y1,x0,y1,fgcolor,hatch).draw_line(x0,y1,x0,y0,fgcolor,hatch);
16644 - if (d) {
16645 - const int
16646 - zx0=(int)((width+(Z0<Z1?Z0:Z1))*disp.width/(width+d)),
16647 - zy0=(int)((height+(Z0<Z1?Z0:Z1))*disp.height/(height+d)),
16648 - zx1=(int)((width+(Z0<Z1?Z1:Z0)+1)*disp.width/(width+d))-1,
16649 - zy1=(int)((height+(Z0<Z1?Z1:Z0)+1)*disp.height/(height+d))-1;
16650 - visu.draw_rectangle(zx0,y0,zx1,y1,fgcolor,0.2f).draw_line(zx0,y0,zx1,y0,fgcolor,hatch).
16651 - draw_line(zx1,y0,zx1,y1,fgcolor,hatch).draw_line(zx1,y1,zx0,y1,fgcolor,hatch).draw_line(zx0,y1,zx0,y0,fgcolor,hatch);
16652 - visu.draw_rectangle(x0,zy0,x1,zy1,fgcolor,0.2f).draw_line(x0,zy0,x1,zy0,fgcolor,hatch).
16653 - draw_line(x1,zy0,x1,zy1,fgcolor,hatch).draw_line(x1,zy1,x0,zy1,fgcolor,hatch).draw_line(x0,zy1,x0,zy0,fgcolor,hatch);
16654 - }
16655 - } break;
16656 - case 3: {
16657 - const int
16658 - x0=X0*disp.width/(width+d),
16659 - y0=Y0*disp.height/(height+d),
16660 - x1=X1*disp.width/(width+d)-1,
16661 - y1=Y1*disp.height/(height+d)-1;
16662 - visu.draw_ellipse(x0,y0,(float)(x1-x0),(float)(y1-y0),1.0f,0.0f,fgcolor,0L,0.2f).
16663 - draw_ellipse(x0,y0,(float)(x1-x0),(float)(y1-y0),1.0f,0.0f,fgcolor,hatch);
16664 - if (d) {
16665 - const int
16666 - zx0=(int)((width+Z0)*disp.width/(width+d)),
16667 - zy0=(int)((height+Z0)*disp.height/(height+d)),
16668 - zx1=(int)((width+Z1+1)*disp.width/(width+d))-1,
16669 - zy1=(int)((height+Z1+1)*disp.height/(height+d))-1;
16670 - visu.draw_ellipse(zx0,y0,(float)(zx1-zx0),(float)(y1-y0),1.0f,0.0f,fgcolor,0L,0.2f).
16671 - draw_ellipse(zx0,y0,(float)(zx1-zx0),(float)(y1-y0),1.0f,0.0f,fgcolor,hatch).
16672 - draw_ellipse(x0,zy0,(float)(x1-x0),(float)(zy1-zy0),1.0f,0.0f,fgcolor,0L,0.2f).
16673 - draw_ellipse(x0,zy0,(float)(x1-x0),(float)(zy1-zy0),1.0f,0.0f,fgcolor,hatch);
16674 - }
16675 - } break;
16676 - }
16677 -
16678 - if (my<12) text_down = true;
16679 - if (my>=visu.dimy()-11) text_down = false;
16680 - if (!feature_type || !phase) {
16681 - if (X>=0 && Y>=0 && Z>=0 && X<(int)width && Y<(int)height && Z<(int)depth) {
16682 - if (depth>1) std::sprintf(text,"Coords (%d,%d,%d)={ ",X,Y,Z); else std::sprintf(text,"Coords (%d,%d)={ ",X,Y);
16683 - char *ctext = text + cimg::strlen(text), *const ltext = text+512;
16684 - for (unsigned int k=0; k<dim && ctext<ltext; k++) {
16685 - std::sprintf(ctext,"%g ",(double)(*this)(X,Y,Z,k));
16686 - ctext = text + cimg::strlen(text);
16687 - }
16688 - std::sprintf(text+cimg::strlen(text),"}");
16689 - }
16690 - } else switch (feature_type) {
16691 - case 1: {
16692 - const double dX=(double)(X0-X1), dY=(double)(Y0-Y1), dZ=(double)(Z0-Z1), norm = std::sqrt(dX*dX+dY*dY+dZ*dZ);
16693 - if (depth>1) std::sprintf(text,"Vect (%d,%d,%d)-(%d,%d,%d), norm=%g",X0,Y0,Z0,X1,Y1,Z1,norm);
16694 - else std::sprintf(text,"Vect (%d,%d)-(%d,%d), norm=%g",X0,Y0,X1,Y1,norm);
16695 - } break;
16696 - case 2:
16697 - if (depth>1) std::sprintf(text,"Box (%d,%d,%d)-(%d,%d,%d), Size=(%d,%d,%d)",
16698 - X0<X1?X0:X1,Y0<Y1?Y0:Y1,Z0<Z1?Z0:Z1,
16699 - X0<X1?X1:X0,Y0<Y1?Y1:Y0,Z0<Z1?Z1:Z0,
16700 - 1+cimg::abs(X0-X1),1+cimg::abs(Y0-Y1),1+cimg::abs(Z0-Z1));
16701 - else std::sprintf(text,"Box (%d,%d)-(%d,%d), Size=(%d,%d)",
16702 - X0<X1?X0:X1,Y0<Y1?Y0:Y1,X0<X1?X1:X0,Y0<Y1?Y1:Y0,1+cimg::abs(X0-X1),1+cimg::abs(Y0-Y1));
16703 - break;
16704 - default:
16705 - if (depth>1) std::sprintf(text,"Ellipse (%d,%d,%d)-(%d,%d,%d), Radii=(%d,%d,%d)",
16706 - X0,Y0,Z0,X1,Y1,Z1,1+cimg::abs(X0-X1),1+cimg::abs(Y0-Y1),1+cimg::abs(Z0-Z1));
16707 - else std::sprintf(text,"Ellipse (%d,%d)-(%d,%d), Radii=(%d,%d)",
16708 - X0,Y0,X1,Y1,1+cimg::abs(X0-X1),1+cimg::abs(Y0-Y1));
16709 -
16710 - break;
16711 - }
16712 - if (phase || (mx>=0 && my>=0)) visu.draw_text(text,0,text_down?visu.dimy()-11:0,fgcolor,bgcolor,11,0.7f);
16713 - disp.display(visu).wait(25);
16714 - } else disp.wait();
16715 -
16716 - if (disp.is_resized) { disp.resize(false); old_is_resized = true; disp.is_resized = false; visu0.assign(); }
16717 - }
16718 -
16719 - // Return result
16720 - if (XYZ) { XYZ[0] = (unsigned int)X0; XYZ[1] = (unsigned int)Y0; XYZ[2] = (unsigned int)Z0; }
16721 - if (feature_selected) {
16722 - if (feature_type==2) {
16723 - if (X0>X1) cimg::swap(X0,X1);
16724 - if (Y0>Y1) cimg::swap(Y0,Y1);
16725 - if (Z0>Z1) cimg::swap(Z0,Z1);
16726 - }
16727 - if (selection) {
16728 - if (X1<0 || Y1<0 || Z1<0) X0=Y0=Z0=X1=Y1=Z1=-1;
16729 - switch(feature_type) {
16730 - case 1:
16731 - case 2: selection[3] = X1; selection[4] = Y1; selection[5] = Z1;
16732 - default: selection[0] = X0; selection[1] = Y0; selection[2] = Z0;
16733 - }
16734 - }
16735 - } else if (selection) selection[0]=selection[1]=selection[2]=selection[3]=selection[4]=selection[5]=-1;
16736 - disp.button = 0;
16737 - disp.events = old_events;
16738 - disp.normalization = old_normalization;
16739 - disp.is_resized = old_is_resized;
16740 - disp.key = key;
16741 - return *this;
16742 - }
16743 -
16744 - //! High-level interface to select features in images
16745 - const CImg& feature_selection(int *const selection, const int feature_type,
16746 - unsigned int *const XYZ=0,const unsigned char *const color=0) const {
16747 - unsigned int w = width + (depth>1?depth:0), h = height + (depth>1?depth:0);
16748 - const unsigned int dmin = cimg::min(w,h), minsiz = 256;
16749 - if (dmin<minsiz) { w=w*minsiz/dmin; h=h*minsiz/dmin; }
16750 - const unsigned int dmax = cimg::max(w,h), maxsiz = 1024;
16751 - if (dmax>maxsiz) { w=w*maxsiz/dmax; h=h*maxsiz/dmax; }
16752 - CImgDisplay disp(w,h," ",1,3);
16753 - return feature_selection(selection,feature_type,disp,XYZ,color);
16754 - }
16755 -
16756 - //! High-level interface for displaying a 3d object
16757 - template<typename tp, typename tf, typename to>
16758 - const CImg& display_object3d(const CImg<tp>& points,const CImgList<tf>& primitives,
16759 - const CImgList<T>& colors, const CImgList<to>& opacities, CImgDisplay& disp,
16760 - const bool centering=true,
16761 - const int render_static=4, const int render_motion=1,
16762 - const bool double_sided=false,
16763 - const float focale=500.0f, const float ambiant_light=0.05f,
16764 - const bool display_axes=true, float *const pose_matrix=0) const {
16765 -
16766 - // Check input arguments
16767 - if (points.is_empty() || primitives.is_empty() || opacities.is_empty())
16768 - throw CImgArgumentException("CImg<%s>::display_object3d() : Given points (%u), primitives (%u) or opacities (%u) are empty.",
16769 - pixel_type(),points.size()/3,primitives.size,opacities.size);
16770 - if (is_empty())
16771 - return CImg<T>(disp.width,disp.height,1,colors[0].size(),0).
16772 - display_object3d(points,primitives,colors,opacities,disp,centering,
16773 - render_static,render_motion,double_sided,focale,ambiant_light);
16774 - if (points.height<3)
16775 - return display_object3d(points.get_resize(-100,3,1,1,0),primitives,colors,opacities,disp,
16776 - centering,render_static,render_motion,double_sided,focale,ambiant_light);
16777 -
16778 - // Init 3D objects and compute object statistics
16779 - CImg<float> pose, rot_mat,
16780 - centered_points = centering?CImg<float>(points.width,3):CImg<float>(),
16781 - rotated_points(points.width,3),
16782 - bbox_points, rotated_bbox_points,
16783 - axes_points, rotated_axes_points;
16784 - CImgList<to> bbox_opacities, axes_opacities;
16785 - CImgList<T> bbox_colors, axes_colors;
16786 - CImgList<tf> bbox_primitives, axes_primitives;
16787 - float dx=0, dy=0, dz=0, ratio=1;
16788 - const T valmax = cimg::type<T>::max();
16789 -
16790 - const CImgStats
16791 - sx(points.get_shared_line(0),false),
16792 - sy(points.get_shared_line(1),false),
16793 - sz(points.get_shared_line(2),false);
16794 - const float
16795 - xm = (float)sx.min, xM = (float)sx.max,
16796 - ym = (float)sy.min, yM = (float)sy.max,
16797 - zm = (float)sz.min, zM = (float)sz.max,
16798 - delta = cimg::max(xM-xm,yM-ym,zM-zm);
16799 -
16800 - if (display_axes) {
16801 - axes_points.assign(7,3);
16802 - rotated_axes_points.assign(7,3);
16803 - axes_opacities.assign(3,1,1,1,1,1.0f);
16804 - axes_colors.assign(3,dim,1,1,1,valmax);
16805 - axes_points(0,0) = 0; axes_points(0,1) = 0; axes_points(0,2) = 0;
16806 - axes_points(1,0) = 20; axes_points(1,1) = 0; axes_points(1,2) = 0;
16807 - axes_points(2,0) = 0; axes_points(2,1) = 20; axes_points(2,2) = 0;
16808 - axes_points(3,0) = 0; axes_points(3,1) = 0; axes_points(3,2) = 20;
16809 - axes_points(4,0) = 22; axes_points(4,1) = -6; axes_points(4,2) = 0;
16810 - axes_points(5,0) = -6; axes_points(5,1) = 22; axes_points(5,2) = 0;
16811 - axes_points(6,0) = -6; axes_points(6,1) = -6; axes_points(6,2) = 22;
16812 - axes_primitives.insert(CImg<tf>::vector(0,1));
16813 - axes_primitives.insert(CImg<tf>::vector(0,2));
16814 - axes_primitives.insert(CImg<tf>::vector(0,3));
16815 - }
16816 -
16817 - // Begin user interaction loop
16818 - CImg<T> visu0(*this), visu;
16819 - bool init = true, clicked = false, redraw = true;
16820 - unsigned int key = 0;
16821 - int x0 = 0, y0 = 0, x1 = 0, y1 = 0;
16822 - const unsigned int old_events = disp.events;
16823 - disp.show().button = disp.key = 0;
16824 - disp.events = 3;
16825 -
16826 - while (!disp.is_closed && !key) {
16827 -
16828 - // Init object position and scale if necessary
16829 - if (init) {
16830 - ratio = delta>0?(2.0f*cimg::min(disp.width,disp.height)/(3.0f*delta)):0;
16831 - dx = 0.5f*(xM+xm); dy = 0.5f*(yM+ym); dz = 0.5f*(zM+zm);
16832 - if (centering) {
16833 - cimg_forX(centered_points,l) {
16834 - centered_points(l,0) = (float)((points(l,0)-dx)*ratio);
16835 - centered_points(l,1) = (float)((points(l,1)-dy)*ratio);
16836 - centered_points(l,2) = (float)((points(l,2)-dz)*ratio);
16837 - }
16838 - }
16839 -
16840 - if (render_static<0 || render_motion<0) {
16841 - bbox_colors.assign(12,dim,1,1,1,valmax);
16842 - bbox_primitives.assign(12,1,2);
16843 - bbox_points.assign(8,3);
16844 - rotated_bbox_points.assign(8,3);
16845 - bbox_points(0,0) = xm; bbox_points(0,1) = ym; bbox_points(0,2) = zm;
16846 - bbox_points(1,0) = xM; bbox_points(1,1) = ym; bbox_points(1,2) = zm;
16847 - bbox_points(2,0) = xM; bbox_points(2,1) = yM; bbox_points(2,2) = zm;
16848 - bbox_points(3,0) = xm; bbox_points(3,1) = yM; bbox_points(3,2) = zm;
16849 - bbox_points(4,0) = xm; bbox_points(4,1) = ym; bbox_points(4,2) = zM;
16850 - bbox_points(5,0) = xM; bbox_points(5,1) = ym; bbox_points(5,2) = zM;
16851 - bbox_points(6,0) = xM; bbox_points(6,1) = yM; bbox_points(6,2) = zM;
16852 - bbox_points(7,0) = xm; bbox_points(7,1) = yM; bbox_points(7,2) = zM;
16853 - bbox_primitives[0].fill(0,1); bbox_primitives[1].fill(1,2); bbox_primitives[2].fill(2,3); bbox_primitives[3].fill(3,0);
16854 - bbox_primitives[4].fill(4,5); bbox_primitives[5].fill(5,6); bbox_primitives[6].fill(6,7); bbox_primitives[7].fill(7,4);
16855 - bbox_primitives[8].fill(0,4); bbox_primitives[9].fill(1,5); bbox_primitives[10].fill(2,6); bbox_primitives[11].fill(3,7);
16856 - bbox_opacities.assign(bbox_primitives.size,1,1,1,1,1.0f);
16857 - }
16858 -
16859 - if (pose_matrix) pose = CImg<float>(pose_matrix,4,4,1,1,false); else pose = CImg<float>::identity_matrix(4);
16860 - init = false;
16861 - redraw = true;
16862 - }
16863 -
16864 - // Rotate and Draw 3D object
16865 - if (redraw) {
16866 - const float
16867 - r00 = pose(0,0), r10 = pose(1,0), r20 = pose(2,0), r30 = pose(3,0),
16868 - r01 = pose(0,1), r11 = pose(1,1), r21 = pose(2,1), r31 = pose(3,1),
16869 - r02 = pose(0,2), r12 = pose(1,2), r22 = pose(2,2), r32 = pose(3,2);
16870 - if ((clicked && render_motion>=0) || (!clicked && render_static>=0)) {
16871 - if (centering) cimg_forX(centered_points,l) {
16872 - const float x = centered_points(l,0), y = centered_points(l,1), z = centered_points(l,2);
16873 - rotated_points(l,0) = r00*x + r10*y + r20*z + r30;
16874 - rotated_points(l,1) = r01*x + r11*y + r21*z + r31;
16875 - rotated_points(l,2) = r02*x + r12*y + r22*z + r32;
16876 - } else cimg_forX(points,l) {
16877 - const float x = (float)points(l,0), y = (float)points(l,1), z = (float)points(l,2);
16878 - rotated_points(l,0) = r00*x + r10*y + r20*z + r30;
16879 - rotated_points(l,1) = r01*x + r11*y + r21*z + r31;
16880 - rotated_points(l,2) = r02*x + r12*y + r22*z + r32;
16881 - }
16882 - } else {
16883 - if (!centering) cimg_forX(bbox_points,l) {
16884 - const float x = bbox_points(l,0), y = bbox_points(l,1), z = bbox_points(l,2);
16885 - rotated_bbox_points(l,0) = r00*x + r10*y + r20*z + r30;
16886 - rotated_bbox_points(l,1) = r01*x + r11*y + r21*z + r31;
16887 - rotated_bbox_points(l,2) = r02*x + r12*y + r22*z + r32;
16888 - } else cimg_forX(bbox_points,l) {
16889 - const float x = (bbox_points(l,0)-dx)*ratio, y = (bbox_points(l,1)-dy)*ratio, z = (bbox_points(l,2)-dz)*ratio;
16890 - rotated_bbox_points(l,0) = r00*x + r10*y + r20*z + r30;
16891 - rotated_bbox_points(l,1) = r01*x + r11*y + r21*z + r31;
16892 - rotated_bbox_points(l,2) = r02*x + r12*y + r22*z + r32;
16893 - }
16894 - }
16895 -
16896 - // Draw object
16897 - visu = visu0;
16898 - if ((clicked && render_motion<0) || (!clicked && render_static<0))
16899 - visu.draw_object3d(visu.width/2.0f, visu.height/2.0f, 0,
16900 - rotated_bbox_points,bbox_primitives,bbox_colors,bbox_opacities,1,
16901 - false,focale,visu.dimx()/2.0f,visu.dimy()/2.0f,-5000.0f,0.2f);
16902 - else visu.draw_object3d(visu.width/2.0f, visu.height/2.0f, 0,
16903 - rotated_points,primitives,colors,opacities,clicked?render_motion:render_static,
16904 - double_sided,focale,visu.dimx()/2.0f,visu.dimy()/2.0f,-5000.0f,ambiant_light);
16905 -
16906 - // Draw axes
16907 - if (display_axes) {
16908 - const float Xaxes = 25.0f, Yaxes = visu.height-35.0f;
16909 - cimg_forX(axes_points,l) {
16910 - const float x = axes_points(l,0), y = axes_points(l,1), z = axes_points(l,2);
16911 - rotated_axes_points(l,0) = r00*x + r10*y + r20*z;
16912 - rotated_axes_points(l,1) = r01*x + r11*y + r21*z;
16913 - rotated_axes_points(l,2) = r02*x + r12*y + r22*z;
16914 - }
16915 - axes_opacities(0,0) = (rotated_axes_points(1,2)>0)?0.5f:1.0f;
16916 - axes_opacities(1,0) = (rotated_axes_points(2,2)>0)?0.5f:1.0f;
16917 - axes_opacities(2,0) = (rotated_axes_points(3,2)>0)?0.5f:1.0f;
16918 - visu.draw_object3d(Xaxes, Yaxes, 0, rotated_axes_points,axes_primitives,axes_colors,axes_opacities,1,false,focale,0,0,0,0).
16919 - draw_text("X",(int)(Xaxes+rotated_axes_points(4,0)), (int)(Yaxes+rotated_axes_points(4,1)), axes_colors[0].ptr(), 0, 11, axes_opacities(0,0)).
16920 - draw_text("Y",(int)(Xaxes+rotated_axes_points(5,0)), (int)(Yaxes+rotated_axes_points(5,1)), axes_colors[1].ptr(), 0, 11, axes_opacities(1,0)).
16921 - draw_text("Z",(int)(Xaxes+rotated_axes_points(6,0)), (int)(Yaxes+rotated_axes_points(6,1)), axes_colors[2].ptr(), 0, 11, axes_opacities(2,0));
16922 - }
16923 -
16924 - visu.display(disp);
16925 - if (!clicked || render_motion==render_static) redraw = false;
16926 - }
16927 -
16928 - // Handle user interaction
16929 - if ((disp.button || disp.wheel) && disp.mouse_x>=0 && disp.mouse_y>=0) {
16930 - redraw = true;
16931 - if (!clicked) { x0 = x1 = disp.mouse_x; y0 = y1 = disp.mouse_y; if (!disp.wheel) clicked = true; }
16932 - else { x1 = disp.mouse_x; y1 = disp.mouse_y; }
16933 - if (disp.button&1) {
16934 - const float
16935 - R = 0.4f*cimg::min(disp.width,disp.height),
16936 - R2 = R*R,
16937 - u0 = (float)(x0-disp.dimx()/2),
16938 - v0 = (float)(y0-disp.dimy()/2),
16939 - u1 = (float)(x1-disp.dimx()/2),
16940 - v1 = (float)(y1-disp.dimy()/2),
16941 - n0 = (float)std::sqrt(u0*u0+v0*v0),
16942 - n1 = (float)std::sqrt(u1*u1+v1*v1),
16943 - nu0 = n0>R?(u0*R/n0):u0,
16944 - nv0 = n0>R?(v0*R/n0):v0,
16945 - nw0 = (float)std::sqrt(cimg::max(0.0f,R2-nu0*nu0-nv0*nv0)),
16946 - nu1 = n1>R?(u1*R/n1):u1,
16947 - nv1 = n1>R?(v1*R/n1):v1,
16948 - nw1 = (float)std::sqrt(cimg::max(0.0f,R2-nu1*nu1-nv1*nv1)),
16949 - u = nv0*nw1-nw0*nv1,
16950 - v = nw0*nu1-nu0*nw1,
16951 - w = nv0*nu1-nu0*nv1,
16952 - n = (float)std::sqrt(u*u+v*v+w*w),
16953 - alpha = (float)std::asin(n/R2);
16954 - rot_mat = CImg<float>::rotation_matrix(u,v,w,alpha);
16955 - rot_mat *= pose.get_crop(0,0,2,2);
16956 - pose.draw_image(rot_mat,0,0);
16957 - x0=x1; y0=y1;
16958 - }
16959 - if (disp.button&2) { pose(3,2)+=(y1-y0); x0=x1; y0=y1; }
16960 - if (disp.wheel) { pose(3,2)-=15*disp.wheel; disp.wheel=0; }
16961 - if (disp.button&4) { pose(3,0)+=(x1-x0); pose(3,1)+=(y1-y0); x0=x1; y0=y1; }
16962 - if ((disp.button&1) && (disp.button&2)) { init = true; disp.button = 0; x0 = x1; y0 = y1; pose = CImg<float>::identity_matrix(4); }
16963 - } else if (clicked) { x0=x1; y0=y1; clicked = false; redraw = true; }
16964 -
16965 - key = disp.key;
16966 - if (key && key!=cimg::keyCTRLLEFT) {
16967 - if (disp.is_pressed(cimg::keyCTRLLEFT)) {
16968 - switch (key) {
16969 - case cimg::keyD: if (disp.is_fullscreen) disp.toggle_fullscreen(); disp.resize(-200,-200); disp.is_resized = true; break;
16970 - case cimg::keyC: if (disp.is_fullscreen) disp.toggle_fullscreen(); disp.resize(-50,-50); disp.is_resized = true; break;
16971 - case cimg::keyF: disp.resize(disp.screen_dimx(),disp.screen_dimy()).toggle_fullscreen().is_resized = true; break;
16972 - case cimg::keyS: { // Save snapshot
16973 - static unsigned int snap_number = 0;
16974 - char filename[32] = {0};
16975 - std::FILE *file;
16976 - do {
16977 - std::sprintf(filename,"CImg_%.4u.bmp",snap_number++);
16978 - if ((file=std::fopen(filename,"r"))!=0) std::fclose(file);
16979 - } while (file);
16980 - visu.save(filename);
16981 - } break;
16982 - }
16983 - disp.key = key = 0;
16984 - }
16985 - } else key = 0;
16986 - if (disp.is_resized) { disp.resize(false); visu0 = get_resize(disp,1); redraw = true; }
16987 - }
16988 - if (pose_matrix) std::memcpy(pose_matrix,pose.data,16*sizeof(float));
16989 - disp.events = old_events;
16990 - disp.button = 0;
16991 - return *this;
16992 - }
16993 -
16994 - //! High-level interface for displaying a 3d object
16995 - template<typename tp, typename tf, typename to>
16996 - const CImg& display_object3d(const CImgList<tp>& points,const CImgList<tf>& primitives,
16997 - const CImgList<T>& colors, const CImgList<to>& opacities, CImgDisplay &disp,
16998 - const bool centering=true,
16999 - const int render_static=4, const int render_motion=1,
17000 - const bool double_sided=false,
17001 - const float focale=500.0f, const float ambiant_light=0.05f,
17002 - const bool display_axes=true, float *const pose_matrix=0) const {
17003 - CImg<tp> npoints(points.size,3,1,1,0);
17004 - tp *ptrX = npoints.ptr(), *ptrY = npoints.ptr(0,1), *ptrZ = npoints.ptr(0,2);
17005 - cimg_forX(npoints,l) {
17006 - const CImg<tp>& point = points[l];
17007 - const unsigned int siz = point.size();
17008 - if (!siz)
17009 - throw CImgArgumentException("CImg<%s>::display_object3d() : Given points (size=%u) contains a null element at "
17010 - "position %u.",pixel_type(),points.size,l);
17011 - *(ptrZ++) = (siz>2)?point(2):0;
17012 - *(ptrY++) = (siz>1)?point(1):0;
17013 - *(ptrX++) = point(0);
17014 - }
17015 - return display_object3d(npoints,primitives,colors,opacities,disp,centering,
17016 - render_static,render_motion,double_sided,focale,ambiant_light,display_axes,pose_matrix);
17017 - }
17018 -
17019 - //! High-level interface for displaying a 3d object
17020 - template<typename tp, typename tf, typename to>
17021 - const CImg& display_object3d(const CImg<tp>& points, const CImgList<tf>& primitives,
17022 - const CImgList<T>& colors, const CImg<to>& opacities, CImgDisplay& disp,
17023 - const bool centering=true,
17024 - const int render_static=4, const int render_motion=1,
17025 - const bool double_sided=false,
17026 - const float focale=500.0f, const float ambiant_light=0.05f,
17027 - const bool display_axes=true, float *const pose_matrix=0) const {
17028 - CImgList<to> nopacities(opacities.size(),1);
17029 - cimglist_for(nopacities,l) nopacities(l,0) = opacities(l);
17030 - return display_object3d(points,primitives,colors,nopacities,disp,centering,
17031 - render_static,render_motion,double_sided,focale,ambiant_light,display_axes,pose_matrix);
17032 -
17033 - }
17034 -
17035 - //! High-level interface for displaying a 3d object
17036 - template<typename tp, typename tf, typename to>
17037 - const CImg& display_object3d(const CImgList<tp>& points,const CImgList<tf>& primitives,
17038 - const CImgList<T>& colors, const CImg<to>& opacities, CImgDisplay& disp,
17039 - const bool centering=true,
17040 - const int render_static=4, const int render_motion=1,
17041 - const bool double_sided=false,
17042 - const float focale=500.0f, const float ambiant_light=0.05f,
17043 - const bool display_axes=true, float *const pose_matrix=0) const {
17044 - CImgList<to> nopacities(opacities.size(),1);
17045 - cimglist_for(nopacities,l) nopacities(l,0) = opacities(l);
17046 - if (points.is_empty()) throw CImgArgumentException("CImg<%s>::display_object3d() : Given points are empty.",
17047 - pixel_type());
17048 - CImg<tp> npoints(points.size,3,1,1,0);
17049 - tp *ptrX = npoints.ptr(), *ptrY = npoints.ptr(0,1), *ptrZ = npoints.ptr(0,2);
17050 - { cimg_forX(npoints,l) {
17051 - const CImg<tp>& point = points[l];
17052 - const unsigned int siz = point.size();
17053 - if (!siz)
17054 - throw CImgArgumentException("CImg<%s>::display_object3d() : Given points (size=%u) contains a null element at "
17055 - "position %u.",pixel_type(),points.size,l);
17056 - *(ptrZ++) = (siz>2)?point(2):0;
17057 - *(ptrY++) = (siz>1)?point(1):0;
17058 - *(ptrX++) = point(0);
17059 - }
17060 - }
17061 - return display_object3d(npoints,primitives,colors,nopacities,disp,centering,
17062 - render_static,render_motion,double_sided,focale,ambiant_light,display_axes,pose_matrix);
17063 - }
17064 -
17065 - //! High-level interface for displaying a 3d object
17066 - template<typename tp, typename tf, typename to>
17067 - const CImg& display_object3d(const tp& points, const CImgList<tf>& primitives,
17068 - const CImgList<T>& colors, const to& opacities,
17069 - const bool centering=true,
17070 - const int render_static=4, const int render_motion=1,
17071 - const bool double_sided=false,
17072 - const float focale=500.0f, const float ambiant_light=0.05f,
17073 - const bool display_axes=true, float *const pose_matrix=0) const {
17074 - CImgDisplay disp(width,height," ",0);
17075 - return display_object3d(points,primitives,colors,opacities,disp,centering,
17076 - render_static,render_motion,double_sided,focale,ambiant_light,display_axes,pose_matrix);
17077 - }
17078 -
17079 - //! High-level interface for displaying a 3d object
17080 - template<typename tp, typename tf>
17081 - const CImg& display_object3d(const tp& points, const CImgList<tf>& primitives,
17082 - const CImgList<T>& colors,
17083 - const bool centering=true,
17084 - const int render_static=4, const int render_motion=1,
17085 - const bool double_sided=false,
17086 - const float focale=500.0f, const float ambiant_light=0.05f,
17087 - const float opacity=1.0f, const bool display_axes=true, float *const pose_matrix=0) const {
17088 - CImgDisplay disp(width,height," ",0);
17089 - return display_object3d(points,primitives,colors,CImg<float>::vector(opacity),
17090 - disp,centering,render_static,render_motion,double_sided,
17091 - focale,ambiant_light,display_axes,pose_matrix);
17092 - }
17093 -
17094 - //! High-level interface for displaying a 3d object
17095 - template<typename tp, typename tf>
17096 - const CImg& display_object3d(const tp& points, const CImgList<tf>& primitives,
17097 - const CImgList<T>& colors, CImgDisplay &disp,
17098 - const bool centering=true,
17099 - const int render_static=4, const int render_motion=1,
17100 - const bool double_sided=false,
17101 - const float focale=500.0f, const float ambiant_light=0.05f,
17102 - const float opacity=1.0f, const bool display_axes=true, float *const pose_matrix=0) const {
17103 - return display_object3d(points,primitives,colors,CImg<float>::vector(opacity),
17104 - disp,centering,render_static,render_motion,double_sided,
17105 - focale,ambiant_light,display_axes,pose_matrix);
17106 - }
17107 -
17108 - //@}
17109 - //----------------------
17110 - //
17111 - //! \name Input-Output
17112 - //@{
17113 - //----------------------
17114 -
17115 - //! Load an image from a file.
17116 - /**
17117 - \param filename = name of the image file to load.
17118 - \return A CImg<T> instance containing the pixel data defined in the image file.
17119 - \note The extension of \c filename defines the file format. If no filename
17120 - extension is provided, CImg<T>::get_load() will try to load a CRAW file (CImg Raw file).
17121 - **/
17122 - static CImg get_load(const char *const filename) {
17123 - const char *ext = cimg::filename_split(filename);
17124 - if (!cimg::strncasecmp(ext,"asc",3)) return get_load_ascii(filename);
17125 - if (!cimg::strncasecmp(ext,"dlm",3) ||
17126 - !cimg::strncasecmp(ext,"txt",3)) return get_load_dlm(filename);
17127 - if (!cimg::strncasecmp(ext,"inr",3)) return get_load_inr(filename);
17128 - if (!cimg::strncasecmp(ext,"hdr",3)) return get_load_analyze(filename);
17129 - if (!cimg::strncasecmp(ext,"par",3) ||
17130 - !cimg::strncasecmp(ext,"rec",3)) return get_load_parrec(filename);
17131 - if (!cimg::strncasecmp(ext,"pan",3)) return get_load_pandore(filename);
17132 - if (!cimg::strncasecmp(ext,"bmp",3)) return get_load_bmp(filename);
17133 - if (!cimg::strncasecmp(ext,"png",3)) return get_load_png(filename);
17134 - if (!cimg::strncasecmp(ext,"tif",3)) return get_load_tiff(filename);
17135 - if (!cimg::strncasecmp(ext,"jpg",3) ||
17136 - !cimg::strncasecmp(ext,"jpeg",4)) return get_load_jpeg(filename);
17137 - if (!cimg::strncasecmp(ext,"ppm",3) ||
17138 - !cimg::strncasecmp(ext,"pgm",3) ||
17139 - !cimg::strncasecmp(ext,"pnm",3)) return get_load_pnm(filename);
17140 - if (!cimg::strncasecmp(ext,"cimg",4) ||
17141 - ext[0]=='\0') return get_load_cimg(filename);
17142 - if (!cimg::strncasecmp(ext,"dcm",3) ||
17143 - !cimg::strncasecmp(ext,"dicom",5)) return get_load_dicom(filename);
17144 - return get_load_other(filename);
17145 - }
17146 -
17147 - //! Load an image from a file
17148 - /** This is the in-place version of get_load(). **/
17149 - CImg& load(const char *const filename) {
17150 - return get_load(filename).swap(*this);
17151 - }
17152 -
17153 - //! Load an image from an ASCII file.
17154 - static CImg get_load_ascii(std::FILE *const file, const char *const filename=0) {
17155 - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
17156 - char line[256] = {0};
17157 - std::fscanf(nfile,"%255[^\n]",line);
17158 - unsigned int off, dx = 0, dy = 1, dz = 1, dv = 1;
17159 - int err = 1;
17160 - std::sscanf(line,"%u %u %u %u",&dx,&dy,&dz,&dv);
17161 - if (!dx || !dy || !dz || !dv) {
17162 - if (!file) cimg::fclose(nfile);
17163 - throw CImgIOException("CImg<%s>::get_load_ascii() : File '%s' is not a valid .ASC file.\n"
17164 - "Specified image dimensions are (%u,%u,%u,%u).",
17165 - pixel_type(),filename?filename:"(FILE*)",dx,dy,dz,dv);
17166 - }
17167 - CImg dest(dx,dy,dz,dv);
17168 - double val;
17169 - T *ptr = dest.data;
17170 - for (off=0; off<dest.size() && err==1; off++) {
17171 - err = std::fscanf(nfile,"%lf%*[^0-9.eE+-]",&val);
17172 - *(ptr++)=(T)val;
17173 - }
17174 - cimg::warn(off<dest.size(),"CImg<%s>::get_load_ascii() : File '%s', only %u/%u values read.",
17175 - pixel_type(),filename?filename:"(FILE*)",off,dest.size());
17176 - if (!file) cimg::fclose(nfile);
17177 - return dest;
17178 - }
17179 -
17180 - //! Load an image from an ASCII file.
17181 - static CImg get_load_ascii(const char *const filename) {
17182 - return get_load_ascii(0,filename);
17183 - }
17184 -
17185 - //! Load an image from an ASCII file (in-place version).
17186 - CImg& load_ascii(std::FILE *const file, const char *const filename=0) {
17187 - return get_load_ascii(file,filename).swap(*this);
17188 - }
17189 -
17190 - //! Load an image from an ASCII file (in-place version).
17191 - CImg& load_ascii(const char *const filename) {
17192 - return get_load_ascii(filename).swap(*this);
17193 - }
17194 -
17195 - //! Load an image from a DLM file
17196 - static CImg get_load_dlm(std::FILE *const file, const char *const filename=0) {
17197 - std::FILE *const nfile = file?file:cimg::fopen(filename,"r");
17198 - CImg dest(256,256);
17199 - char c, delimiter[256]={0}, tmp[256];
17200 - unsigned int cdx=0,dx=0,dy=0;
17201 - int oerr=0, err;
17202 - double val;
17203 - while ((err = std::fscanf(nfile,"%lf%255[^0-9.eE+-]",&val,delimiter))!=EOF) {
17204 - oerr = err;
17205 - if (err>0) dest(cdx++,dy) = (T)val;
17206 - if (cdx>=dest.width) dest.resize(dest.width+256,1,1,1,0);
17207 - c=0; if (!std::sscanf(delimiter,"%255[^\n]%c",tmp,&c) || c=='\n') {
17208 - dx = cimg::max(cdx,dx);
17209 - dy++;
17210 - if (dy>=dest.height) dest.resize(dest.width,dest.height+256,1,1,0);
17211 - cdx=0;
17212 - }
17213 - }
17214 - if (cdx && oerr==1) { dx=cdx; dy++; }
17215 - if (!dx || !dy) {
17216 - if (!file) cimg::fclose(nfile);
17217 - throw CImgIOException("CImg<%s>::get_load_dlm() : File '%s' is not a valid DLM file.\n"
17218 - "Specified image dimensions are (%u,%u).",
17219 - pixel_type(),filename?filename:"(FILE*)",dx,dy);
17220 - }
17221 - dest.resize(dx,dy,1,1,0);
17222 - if (!file) cimg::fclose(nfile);
17223 - return dest;
17224 - }
17225 -
17226 - //! Load an image from a DLM file
17227 - static CImg get_load_dlm(const char *const filename=0) {
17228 - return get_load_dlm(0,filename);
17229 - }
17230 -
17231 - //! Load an image from a DLM file (in-place version).
17232 - CImg& load_dlm(std::FILE *const file, const char *const filename=0) {
17233 - return get_load_dlm(file,filename).swap(*this);
17234 - }
17235 -
17236 - //! Load an image from a DLM file (in-place version).
17237 - CImg& load_dlm(const char *const filename) {
17238 - return get_load_dlm(filename).swap(*this);
17239 - }
17240 -
17241 - //! Load an image from a PNM file
17242 - static CImg get_load_pnm(std::FILE *const file, const char *const filename=0) {
17243 - std::FILE *const nfile=file?file:cimg::fopen(filename,"rb");
17244 - unsigned int ppm_type,width,height,colormax=255;
17245 - char item[1024]={0};
17246 - int err;
17247 - while ((err=std::fscanf(nfile,"%1023[^\n]",item))!=EOF && (item[0]=='#' || !err)) std::fgetc(nfile);
17248 - if(std::sscanf(item," P%u",&ppm_type)!=1) {
17249 - if (!file) cimg::fclose(nfile);
17250 - throw CImgIOException("CImg<%s>::get_load_pnm() : File '%s', PNM header 'P?' not found.",
17251 - pixel_type(),filename?filename:"(FILE*)");
17252 - }
17253 - while ((err=std::fscanf(nfile," %1023[^\n]",item))!=EOF && (item[0]=='#' || !err)) std::fgetc(nfile);
17254 - if ((err=std::sscanf(item," %u %u %u",&width,&height,&colormax))<2) {
17255 - if (!file) cimg::fclose(nfile);
17256 - throw CImgIOException("CImg<%s>::get_load_pnm() : File '%s', WIDTH and HEIGHT fields are not defined in PNM header.",
17257 - pixel_type(),filename?filename:"(FILE*)");
17258 - }
17259 - if (err==2) {
17260 - while ((err=std::fscanf(nfile," %1023[^\n]",item))!=EOF && (item[0]=='#' || !err)) std::fgetc(nfile);
17261 - cimg::warn(std::sscanf(item,"%u",&colormax)!=1,
17262 - "CImg<%s>::get_load_pnm() : File '%s', COLORMAX field is not defined in PNM header.",
17263 - pixel_type(),filename?filename:"(FILE*)");
17264 - }
17265 - std::fgetc(nfile);
17266 -
17267 - CImg dest;
17268 - int rval,gval,bval;
17269 -
17270 - switch (ppm_type) {
17271 - case 2: { // Grey Ascii
17272 - dest.assign(width,height,1,1);
17273 - T* rdata = dest.ptr();
17274 - cimg_foroff(dest,off) { std::fscanf(nfile,"%d",&rval); *(rdata++)=(T)rval; }
17275 - } break;
17276 - case 3: { // Color Ascii
17277 - dest.assign(width,height,1,3);
17278 - T *rdata = dest.ptr(0,0,0,0), *gdata = dest.ptr(0,0,0,1), *bdata = dest.ptr(0,0,0,2);
17279 - cimg_forXY(dest,x,y) {
17280 - std::fscanf(nfile,"%d %d %d",&rval,&gval,&bval);
17281 - *(rdata++)=(T)rval;
17282 - *(gdata++)=(T)gval;
17283 - *(bdata++)=(T)bval; }
17284 - } break;
17285 - case 5: { // Grey Binary
17286 - if (colormax<256) { // 8 bits
17287 - CImg<unsigned char> raw(width,height,1,1);
17288 - cimg::fread(raw.data,width*height,nfile);
17289 - dest=raw;
17290 - } else { // 16 bits
17291 - CImg<unsigned short> raw(width,height,1,1);
17292 - cimg::fread(raw.data,width*height,nfile);
17293 - if (!cimg::endian()) cimg::endian_swap(raw.data,width*height);
17294 - dest=raw;
17295 - }
17296 - } break;
17297 - case 6: { // Color Binary
17298 - if (colormax<256) { // 8 bits
17299 - CImg<unsigned char> raw(width,height,1,3);
17300 - cimg::fread(raw.data,width*height*3,nfile);
17301 - dest.assign(width,height,1,3);
17302 - T *rdata = dest.ptr(0,0,0,0), *gdata = dest.ptr(0,0,0,1), *bdata = dest.ptr(0,0,0,2);
17303 - const unsigned char *ptrs = raw.ptr();
17304 - for (unsigned int off = raw.width*raw.height; off; --off) {
17305 - *(rdata++) = (T)*(ptrs++);
17306 - *(gdata++) = (T)*(ptrs++);
17307 - *(bdata++) = (T)*(ptrs++);
17308 - }
17309 - } else { // 16 bits
17310 - CImg<unsigned short> raw(width,height,1,3);
17311 - cimg::fread(raw.data,width*height*3,nfile);
17312 - if (!cimg::endian()) cimg::endian_swap(raw.data,width*height*3);
17313 - dest.assign(width,height,1,3);
17314 - T *rdata = dest.ptr(0,0,0,0), *gdata = dest.ptr(0,0,0,1), *bdata = dest.ptr(0,0,0,2);
17315 - const unsigned short *ptrs = raw.ptr();
17316 - for (unsigned int off = raw.width*raw.height; off; --off) {
17317 - *(rdata++) = (T)*(ptrs++);
17318 - *(gdata++) = (T)*(ptrs++);
17319 - *(bdata++) = (T)*(ptrs++);
17320 - }
17321 - }
17322 - } break;
17323 - default:
17324 - if (!file) cimg::fclose(nfile);
17325 - throw CImgIOException("CImg<%s>::get_load_pnm() : File '%s', PPM type 'P%d' not supported.",
17326 - pixel_type(),filename?filename:"(FILE*)",ppm_type);
17327 - }
17328 - if (!file) cimg::fclose(nfile);
17329 - return dest;
17330 - }
17331 -
17332 - //! Load an image from a PNM file.
17333 - static CImg get_load_pnm(const char *const filename) {
17334 - return get_load_pnm(0,filename);
17335 - }
17336 -
17337 - //! Load an image from a PNM file (in-place version).
17338 - CImg& load_pnm(std::FILE *const file, const char *const filename=0) {
17339 - return get_load_pnm(file,filename).swap(*this);
17340 - }
17341 -
17342 - //! Load an image from a PNM file (in-place version).
17343 - CImg& load_pnm(const char *const filename) {
17344 - return get_load_pnm(filename).swap(*this);
17345 - }
17346 -
17347 - //! Load a YUV image sequence file.
17348 - static CImg get_load_yuv(std::FILE *const file, const char *const filename,
17349 - const unsigned int sizex, const unsigned int sizey=1,
17350 - const unsigned int first_frame=0, const int last_frame=-1,
17351 - const bool yuv2rgb = false) {
17352 - return CImgList<T>::get_load_yuv(file,filename,sizex,sizey,first_frame,last_frame,yuv2rgb).get_append('z','c');
17353 - }
17354 -
17355 - //! Load a YUV image sequence file.
17356 - static CImg get_load_yuv(const char *const filename,
17357 - const unsigned int sizex, const unsigned int sizey=1,
17358 - const unsigned int first_frame=0, const int last_frame=-1,
17359 - const bool yuv2rgb = false) {
17360 - return CImgList<T>::get_load_yuv(filename,sizex,sizey,first_frame,last_frame,yuv2rgb).get_append('z','c');
17361 - }
17362 -
17363 - //! Load a YUV image sequence file (in-place).
17364 - CImg& load_yuv(std::FILE *const file, const char *const filename,
17365 - const unsigned int sizex, const unsigned int sizey=1,
17366 - const unsigned int first_frame=0, const int last_frame=-1,
17367 - const bool yuv2rgb = false) {
17368 - return get_load_yuv(file,filename,sizex,sizey,first_frame,last_frame,yuv2rgb).swap(*this);
17369 - }
17370 -
17371 - //! Load a YUV image sequence file (in-place).
17372 - CImg& load_yuv(const char *const filename,
17373 - const unsigned int sizex, const unsigned int sizey=1,
17374 - const unsigned int first_frame=0, const int last_frame=-1,
17375 - const bool yuv2rgb = false) {
17376 - return get_load_yuv(filename,sizex,sizey,first_frame,last_frame,yuv2rgb).swap(*this);
17377 - }
17378 -
17379 - //! Load an image from a BMP file.
17380 - static CImg get_load_bmp(std::FILE *const file, const char *const filename=0) {
17381 - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
17382 - unsigned char header[64];
17383 - cimg::fread(header,54,nfile);
17384 - if (header[0]!='B' || header[1]!='M') {
17385 - if (!file) cimg::fclose(nfile);
17386 - throw CImgIOException("CImg<%s>::get_load_bmp() : File '%s' is not a valid BMP file.",
17387 - pixel_type(),filename?filename:"(FILE*)");
17388 - }
17389 -
17390 - // Read header and pixel buffer
17391 - int
17392 - file_size = header[0x02] + (header[0x03]<<8) + (header[0x04]<<16) + (header[0x05]<<24),
17393 - offset = header[0x0A] + (header[0x0B]<<8) + (header[0x0C]<<16) + (header[0x0D]<<24),
17394 - dx = header[0x12] + (header[0x13]<<8) + (header[0x14]<<16) + (header[0x15]<<24),
17395 - dy = header[0x16] + (header[0x17]<<8) + (header[0x18]<<16) + (header[0x19]<<24),
17396 - compression = header[0x1E] + (header[0x1F]<<8) + (header[0x20]<<16) + (header[0x21]<<24),
17397 - nb_colors = header[0x2E] + (header[0x2F]<<8) + (header[0x30]<<16) + (header[0x31]<<24),
17398 - bpp = header[0x1C] + (header[0x1D]<<8),
17399 - *palette = 0;
17400 - const int
17401 - dx_bytes = (bpp==1)?(dx/8+(dx%8?1:0)):((bpp==4)?(dx/2+(dx%2?1:0)):(dx*bpp/8)),
17402 - align = (4-dx_bytes%4)%4,
17403 - buf_size = cimg::min(cimg::abs(dy)*(dx_bytes+align),file_size-offset);
17404 -
17405 - if (bpp<16) { if (!nb_colors) nb_colors=1<<bpp; } else nb_colors=0;
17406 - if (nb_colors) { palette = new int[nb_colors]; cimg::fread(palette,nb_colors,nfile); }
17407 - const int xoffset = offset-54-4*nb_colors;
17408 - if (xoffset>0) std::fseek(nfile,xoffset,SEEK_CUR);
17409 - unsigned char *buffer = new unsigned char[buf_size], *ptrs = buffer;
17410 - cimg::fread(buffer,buf_size,nfile);
17411 - if (!file) cimg::fclose(nfile);
17412 -
17413 - // Decompress buffer (if necessary)
17414 - if (compression) {
17415 - delete[] buffer;
17416 - if (file) {
17417 - throw CImgIOException("CImg<%s>::get_load_bmp() : Not able to read a compressed BMP file using a *FILE input",pixel_type());
17418 - } else return get_load_other(filename);
17419 - }
17420 -
17421 - // Read pixel data
17422 - CImg res(dx,cimg::abs(dy),1,3);
17423 - switch (bpp) {
17424 - case 1: { // Monochrome
17425 - for (int y=res.height-1; y>=0; y--) {
17426 - unsigned char mask = 0x80, val = 0;
17427 - cimg_forX(res,x) {
17428 - if (mask==0x80) val = *(ptrs++);
17429 - const unsigned char *col = (unsigned char*)(palette+(val&mask?1:0));
17430 - res(x,y,2) = (T)*(col++);
17431 - res(x,y,1) = (T)*(col++);
17432 - res(x,y,0) = (T)*(col++);
17433 - mask = cimg::ror(mask);
17434 - } ptrs+=align; }
17435 - } break;
17436 - case 4: { // 16 colors
17437 - for (int y=res.height-1; y>=0; y--) {
17438 - unsigned char mask = 0xF0, val = 0;
17439 - cimg_forX(res,x) {
17440 - if (mask==0xF0) val = *(ptrs++);
17441 - const unsigned char color = (mask<16)?(val&mask):((val&mask)>>4);
17442 - unsigned char *col = (unsigned char*)(palette+color);
17443 - res(x,y,2) = (T)*(col++);
17444 - res(x,y,1) = (T)*(col++);
17445 - res(x,y,0) = (T)*(col++);
17446 - mask = cimg::ror(mask,4);
17447 - } ptrs+=align; }
17448 - } break;
17449 - case 8: { // 256 colors
17450 - for (int y=res.height-1; y>=0; y--) { cimg_forX(res,x) {
17451 - const unsigned char *col = (unsigned char*)(palette+*(ptrs++));
17452 - res(x,y,2) = (T)*(col++);
17453 - res(x,y,1) = (T)*(col++);
17454 - res(x,y,0) = (T)*(col++);
17455 - } ptrs+=align; }
17456 - } break;
17457 - case 16: { // 16 bits colors
17458 - for (int y=res.height-1; y>=0; y--) { cimg_forX(res,x) {
17459 - const unsigned char c1 = *(ptrs++), c2 = *(ptrs++);
17460 - const unsigned short col = c1+(c2<<8);
17461 - res(x,y,2) = (T)(col&0x1F);
17462 - res(x,y,1) = (T)((col>>5)&0x1F);
17463 - res(x,y,0) = (T)((col>>10)&0x1F);
17464 - } ptrs+=align; }
17465 - } break;
17466 - case 24: { // 24 bits colors
17467 - for (int y=res.height-1; y>=0; y--) { cimg_forX(res,x) {
17468 - res(x,y,2) = (T)*(ptrs++);
17469 - res(x,y,1) = (T)*(ptrs++);
17470 - res(x,y,0) = (T)*(ptrs++);
17471 - } ptrs+=align; }
17472 - } break;
17473 - case 32: { // 32 bits colors
17474 - for (int y=res.height-1; y>=0; y--) { cimg_forX(res,x) {
17475 - res(x,y,2) = (T)*(ptrs++);
17476 - res(x,y,1) = (T)*(ptrs++);
17477 - res(x,y,0) = (T)*(ptrs++);
17478 - ptrs++;
17479 - } ptrs+=align; }
17480 - } break;
17481 - }
17482 - if (palette) delete[] palette;
17483 - delete[] buffer;
17484 - if (dy<0) res.mirror('y');
17485 - return res;
17486 - }
17487 -
17488 - //! Load an image from a BMP file
17489 - static CImg get_load_bmp(const char *const filename) {
17490 - return get_load_bmp(0,filename);
17491 - }
17492 -
17493 - //! Load an image from a BMP file
17494 - CImg& load_bmp(std::FILE *const file, const char *const filename=0) {
17495 - return get_load_bmp(file,filename).swap(*this);
17496 - }
17497 -
17498 - //! Load an image from a BMP file
17499 - CImg& load_bmp(const char *const filename) {
17500 - return get_load_bmp(filename).swap(*this);
17501 - }
17502 -
17503 - //! Load an image from a PNG file.
17504 - // Note : Most of this function has been written by Eric Fausett
17505 - static CImg get_load_png(std::FILE *const file, const char *const filename=0) {
17506 -#ifndef cimg_use_png
17507 - if (file)
17508 - throw CImgIOException("CImg<%s>::get_load_png() : File '(FILE*)' cannot be read without using libpng.",pixel_type());
17509 - else return get_load_other(filename);
17510 -#else
17511 - // Open file and check for PNG validity
17512 - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
17513 - unsigned char pngCheck[8];
17514 - cimg::fread(pngCheck,8,nfile);
17515 - if (png_sig_cmp(pngCheck,0,8)) {
17516 - if (!file) cimg::fclose(nfile);
17517 - throw CImgIOException("CImg<%s>::get_load_png() : File '%s' is not a valid PNG file.",
17518 - pixel_type(),filename?filename:"(FILE*)");
17519 - }
17520 -
17521 - // Setup PNG structures for read
17522 - png_voidp user_error_ptr=0;
17523 - png_error_ptr user_error_fn=0, user_warning_fn=0;
17524 - png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, // Verifies libpng version correct
17525 - user_error_ptr, user_error_fn, user_warning_fn);
17526 - if(!png_ptr){
17527 - if (!file) cimg::fclose(nfile);
17528 - throw CImgIOException("CImg<%s>::get_load_png() : File '%s', trouble initializing 'png_ptr' data structure.",
17529 - pixel_type(),filename?filename:"(FILE*)");
17530 - }
17531 - png_infop info_ptr = png_create_info_struct(png_ptr);
17532 - if(!info_ptr){
17533 - if (!file) cimg::fclose(nfile);
17534 - png_destroy_read_struct(&png_ptr, (png_infopp)0, (png_infopp)0);
17535 - throw CImgIOException("CImg<%s>::get_load_png() : File '%s', trouble initializing 'info_ptr' data structure.",
17536 - pixel_type(),filename?filename:"(FILE*)");
17537 - }
17538 - png_infop end_info = png_create_info_struct(png_ptr);
17539 - if(!end_info){
17540 - if (!file) cimg::fclose(nfile);
17541 - png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)0);
17542 - throw CImgIOException("CImg<%s>::get_load_png() : File '%s', trouble initializing 'end_info' data structure.",
17543 - pixel_type(),filename?filename:"(FILE*)");
17544 - }
17545 -
17546 - // Error handling callback for png file reading
17547 - if (setjmp(png_jmpbuf(png_ptr))){
17548 - if (!file) cimg::fclose(nfile);
17549 - png_destroy_read_struct(&png_ptr, &end_info, (png_infopp)0);
17550 - throw CImgIOException("CImg<%s>::get_load_png() : File '%s', unknown fatal error.",
17551 - pixel_type(),filename?filename:"(FILE*)");
17552 - }
17553 - png_init_io(png_ptr, nfile);
17554 - png_set_sig_bytes(png_ptr, 8);
17555 -
17556 - // Get PNG Header Info up to data block
17557 - png_read_info(png_ptr, info_ptr);
17558 - png_uint_32 width, height;
17559 - int bit_depth, color_type, interlace_type;
17560 - png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_type,
17561 - int_p_NULL, int_p_NULL);
17562 - int new_bit_depth = bit_depth;
17563 - int new_color_type = color_type;
17564 -
17565 - // Transforms to unify image data
17566 - if (new_color_type == PNG_COLOR_TYPE_PALETTE){
17567 - png_set_palette_to_rgb(png_ptr);
17568 - new_color_type -= PNG_COLOR_MASK_PALETTE;
17569 - new_bit_depth = 8;
17570 - }
17571 - if (new_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8){
17572 - png_set_gray_1_2_4_to_8(png_ptr);
17573 - new_bit_depth = 8;
17574 - }
17575 - if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
17576 - png_set_tRNS_to_alpha(png_ptr);
17577 - if (new_color_type == PNG_COLOR_TYPE_GRAY || new_color_type == PNG_COLOR_TYPE_GRAY_ALPHA){
17578 - png_set_gray_to_rgb(png_ptr);
17579 - new_color_type |= PNG_COLOR_MASK_COLOR;
17580 - }
17581 - if (new_color_type == PNG_COLOR_TYPE_RGB) png_set_filler(png_ptr, 0xffffU, PNG_FILLER_AFTER);
17582 - png_read_update_info(png_ptr, info_ptr);
17583 - if (!(new_bit_depth==8 || new_bit_depth==16)) {
17584 - if (!file) cimg::fclose(nfile);
17585 - png_destroy_read_struct(&png_ptr, &end_info, (png_infopp)0);
17586 - throw CImgIOException("CImg<%s>::get_load_png() : File '%s', wrong bit coding (bit_depth=%u)",
17587 - pixel_type(),filename?filename:"(FILE*)",new_bit_depth);
17588 - }
17589 - const int byte_depth = new_bit_depth>>3;
17590 -
17591 - // Allocate Memory for Image Read
17592 - png_bytep *imgData = new png_bytep[height];
17593 - for (unsigned int row=0; row < height; row++) imgData[row] = new png_byte[byte_depth * 4 * width];
17594 - png_read_image(png_ptr, imgData);
17595 - png_read_end(png_ptr, end_info);
17596 -
17597 - // Read pixel data
17598 - if (!(new_color_type==PNG_COLOR_TYPE_RGB || new_color_type==PNG_COLOR_TYPE_RGB_ALPHA)) {
17599 - if (!file) cimg::fclose(nfile);
17600 - png_destroy_read_struct(&png_ptr, &end_info, (png_infopp)0);
17601 - throw CImgIOException("CImg<%s>::get_load_png() : File '%s', wrong color coding (new_color_type=%u)",
17602 - pixel_type(),filename?filename:"(FILE*)",new_color_type);
17603 - }
17604 - const bool no_alpha_channel = (new_color_type==PNG_COLOR_TYPE_RGB);
17605 - CImg res(width,height,1,no_alpha_channel?3:4);
17606 - const unsigned long off = width*height;
17607 - T *ptr1 = res.data, *ptr2 = ptr1+off, *ptr3 = ptr2+off, *ptr4 = ptr3+off;
17608 - switch(new_bit_depth){
17609 - case 8: {
17610 - cimg_forY(res,y){
17611 - const unsigned char *ptrs = (unsigned char*)imgData[y];
17612 - cimg_forX(res,x){
17613 - *(ptr1++) = (T)*(ptrs++);
17614 - *(ptr2++) = (T)*(ptrs++);
17615 - *(ptr3++) = (T)*(ptrs++);
17616 - if (no_alpha_channel) ptrs++; else *(ptr4++) = (T)*(ptrs++);
17617 - }
17618 - }
17619 - } break;
17620 - case 16: {
17621 - cimg_forY(res,y){
17622 - const unsigned short *ptrs = (unsigned short*)(imgData[y]);
17623 - cimg_forX(res,x){
17624 - *(ptr1++) = (T)*(ptrs++);
17625 - *(ptr2++) = (T)*(ptrs++);
17626 - *(ptr3++) = (T)*(ptrs++);
17627 - if (no_alpha_channel) ptrs++; else *(ptr4++) = (T)*(ptrs++);
17628 - }
17629 - }
17630 - } break;
17631 - }
17632 - png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
17633 -
17634 - // Deallocate Image Read Memory
17635 - for (unsigned int n=0; n<height; n++) delete[] imgData[n];
17636 - delete[] imgData;
17637 - if (!file) cimg::fclose(nfile);
17638 - return res;
17639 -#endif
17640 - }
17641 -
17642 - //! Load an image from a PNG file
17643 - static CImg get_load_png(const char *const filename) {
17644 - return get_load_png(0,filename);
17645 - }
17646 -
17647 - //! Load an image from a PNG file
17648 - CImg& load_png(std::FILE *const file, const char *const filename=0) {
17649 - return get_load_png(file,filename).swap(*this);
17650 - }
17651 -
17652 - //! Load an image from a PNG file
17653 - CImg& load_png(const char *const filename) {
17654 - return get_load_png(filename).swap(*this);
17655 - }
17656 -
17657 - //! Load an image in TIFF format
17658 - // Original contribution by Jerome Boulanger.
17659 - static CImg get_load_tiff(const char *const filename=0) {
17660 -#ifndef cimg_use_tiff
17661 - return get_load_other(filename);
17662 -#else
17663 - CImg dest;
17664 - TIFF *tif = TIFFOpen(filename,"r");
17665 -#if cimg_debug>=3
17666 - TIFFSetWarningHandler(0);
17667 - TIFFSetErrorHandler(0);
17668 -#endif
17669 - if (tif) {
17670 - unsigned int number_of_directories = 0;
17671 - do number_of_directories++; while (TIFFReadDirectory(tif));
17672 - uint16 samplesperpixel, bitspersample;
17673 - uint32 nx,ny;
17674 - TIFFGetField(tif,TIFFTAG_IMAGEWIDTH,&nx);
17675 - TIFFGetField(tif,TIFFTAG_IMAGELENGTH,&ny);
17676 - TIFFGetField(tif,TIFFTAG_SAMPLESPERPIXEL,&samplesperpixel);
17677 - if (samplesperpixel!=1 && samplesperpixel!=3 && samplesperpixel!=4) {
17678 - cimg::warn(true,"CImg<%s>::get_load_tiff() : File '%s', unknow value for tag : TIFFTAG_SAMPLESPERPIXEL, will force it to 1.",
17679 - pixel_type(),filename?filename:"(FILE*)");
17680 - samplesperpixel=1;
17681 - }
17682 - TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &bitspersample);
17683 - TIFFClose(tif);
17684 - tif = TIFFOpen(filename,"r");
17685 - dest.assign(nx,ny,number_of_directories,samplesperpixel);
17686 -
17687 - unsigned int dir=0;
17688 - do {
17689 - if (bitspersample!=8 || !(samplesperpixel == 1 || samplesperpixel == 3 || samplesperpixel == 4)){ //if !rgba 8bit
17690 - uint16 photo, config;
17691 - TIFFGetField(tif,TIFFTAG_PLANARCONFIG,&config);
17692 - TIFFGetField(tif,TIFFTAG_PHOTOMETRIC,&photo);
17693 - if (TIFFIsTiled(tif)) {
17694 - uint32 tw, th;
17695 - TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw);
17696 - TIFFGetField(tif, TIFFTAG_TILELENGTH, &th);
17697 - if (config==PLANARCONFIG_CONTIG) {
17698 - switch(bitspersample){
17699 - case 8:{
17700 - unsigned char *buf;
17701 - buf = (unsigned char *)_TIFFmalloc(TIFFTileSize(tif));
17702 - if (buf) {
17703 - for (unsigned int row = 0; row<ny; row+=th) {
17704 - for (unsigned int col = 0; col<nx; col+=tw) {
17705 - if (TIFFReadTile(tif,buf,col,row,0,0)<0) {
17706 - _TIFFfree(buf);
17707 - TIFFClose(tif);
17708 - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', an error occure while reading a tile.",
17709 - pixel_type(),filename?filename:"(FILE*)");
17710 - } else {
17711 - unsigned char * ptr = buf;
17712 - for (unsigned int rr=row;rr<cimg::min( row+th,(unsigned int)ny);rr++)
17713 - for (unsigned int cc=col;cc<cimg::min( col+tw,(unsigned int)nx);cc++)
17714 - for (unsigned int vv=0;vv<samplesperpixel;vv++)
17715 - dest(cc,rr,dir,vv)= (T)(float)*(ptr++);
17716 - }
17717 - }
17718 - }
17719 - _TIFFfree(buf);
17720 - }
17721 - break;
17722 - }
17723 - case 16:{
17724 - unsigned short *buf;
17725 - buf = (unsigned short *)_TIFFmalloc(TIFFTileSize(tif));
17726 - if (buf) {
17727 - for (unsigned int row = 0; row<ny; row+=th) {
17728 - for (unsigned int col = 0; col<nx; col+=tw) {
17729 - if (TIFFReadTile(tif,buf,col,row,0,0)<0) {
17730 - _TIFFfree(buf);
17731 - TIFFClose(tif);
17732 - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', an error occure while reading a tile.",
17733 - pixel_type(),filename?filename:"(FILE*)");
17734 - } else {
17735 - unsigned short * ptr = buf;
17736 - for (unsigned int rr=row;rr<cimg::min( row+th,(unsigned int)ny);rr++)
17737 - for (unsigned int cc=col;cc<cimg::min( col+tw,(unsigned int)nx);cc++)
17738 - for (unsigned int vv=0;vv<samplesperpixel;vv++)
17739 - dest(cc,rr,dir,vv)= (T)(float)*(ptr++);
17740 - }
17741 - }
17742 - }
17743 - _TIFFfree(buf);
17744 - }
17745 - break;
17746 - }
17747 - case 32:{
17748 - float *buf;
17749 - buf = (float *)_TIFFmalloc(TIFFTileSize(tif));
17750 - if (buf) {
17751 - for (unsigned int row = 0; row<ny; row+=th) {
17752 - for (unsigned int col = 0; col<nx; col+=tw) {
17753 - if (TIFFReadTile(tif,buf,col,row,0,0)<0) {
17754 - _TIFFfree(buf);
17755 - TIFFClose(tif);
17756 - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', an error occure while reading a tile.",
17757 - pixel_type(),filename?filename:"(FILE*)");
17758 - } else {
17759 - float * ptr = buf;
17760 - for (unsigned int rr=row;rr<cimg::min( row+th,(unsigned int)ny);rr++)
17761 - for (unsigned int cc=col;cc<cimg::min( col+tw,(unsigned int)nx);cc++)
17762 - for (unsigned int vv=0;vv<samplesperpixel;vv++)
17763 - dest(cc,rr,dir,vv)= (T)(float)*(ptr++);
17764 - }
17765 - }
17766 - }
17767 - _TIFFfree(buf);
17768 - }
17769 - break;
17770 - }
17771 - }
17772 - }
17773 - else {
17774 - switch(bitspersample){
17775 - case 8:{
17776 - unsigned char *buf = (unsigned char *)_TIFFmalloc(TIFFTileSize(tif));
17777 - if (buf) {
17778 - for (unsigned int vv=0;vv<samplesperpixel;vv++)
17779 - for (unsigned int row = 0; row<ny; row+=th) {
17780 - for (unsigned int col = 0; col<nx; col+=tw) {
17781 - if (TIFFReadTile(tif,buf,col,row,0,vv)<0) {
17782 - _TIFFfree(buf);
17783 - TIFFClose(tif);
17784 - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', an error occure while reading a tile.",
17785 - pixel_type(),filename?filename:"(FILE*)");
17786 - } else {
17787 - unsigned char * ptr = buf;
17788 - for (unsigned int rr=row;rr<cimg::min( row+th,(unsigned int)ny);rr++)
17789 - for (unsigned int cc=col;cc<cimg::min( col+tw,(unsigned int)nx);cc++)
17790 - dest(cc,rr,dir,vv)= (T)(float)*(ptr++);
17791 - }
17792 - }
17793 - }
17794 - _TIFFfree(buf);
17795 - }
17796 - break;
17797 - }
17798 - case 16:{
17799 - unsigned short *buf = (unsigned short *)_TIFFmalloc(TIFFTileSize(tif));
17800 - if (buf) {
17801 - for (unsigned int vv=0;vv<samplesperpixel;vv++)
17802 - for (unsigned int row = 0; row<ny; row+=th) {
17803 - for (unsigned int col = 0; col<nx; col+=tw) {
17804 - if (TIFFReadTile(tif,buf,col,row,0,vv)<0) {
17805 - _TIFFfree(buf);
17806 - TIFFClose(tif);
17807 - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', an error occure while reading a tile.",
17808 - pixel_type(),filename?filename:"(FILE*)");
17809 - } else {
17810 - unsigned short * ptr = buf;
17811 - for (unsigned int rr=row;rr<cimg::min( row+th,(unsigned int)ny);rr++)
17812 - for (unsigned int cc=col;cc<cimg::min( col+tw,(unsigned int)nx);cc++)
17813 - dest(cc,rr,dir,vv)= (T)(float)*(ptr++);
17814 - }
17815 - }
17816 - }
17817 - _TIFFfree(buf);
17818 - }
17819 - break;
17820 - }
17821 - case 32:{
17822 - float *buf = (float *)_TIFFmalloc(TIFFTileSize(tif));
17823 - if (buf) {
17824 - for (unsigned int vv=0;vv<samplesperpixel;vv++)
17825 - for (unsigned int row = 0; row<ny; row+=th) {
17826 - for (unsigned int col = 0; col<nx; col+=tw) {
17827 - if (TIFFReadTile(tif,buf,col,row,0,vv)<0) {
17828 - _TIFFfree(buf);
17829 - TIFFClose(tif);
17830 - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', an error occure while reading a tile.",
17831 - pixel_type(),filename?filename:"(FILE*)");
17832 - } else {
17833 - float * ptr = buf;
17834 - for (unsigned int rr=row;rr<cimg::min( row+th,(unsigned int)ny);rr++)
17835 - for (unsigned int cc=col;cc<cimg::min( col+tw,(unsigned int)nx);cc++)
17836 - dest(cc,rr,dir,vv)= (T)(float)*(ptr++);
17837 - }
17838 - }
17839 - }
17840 - _TIFFfree(buf);
17841 - }
17842 - break;
17843 - }
17844 - }
17845 - }
17846 - } else {
17847 - if (config==PLANARCONFIG_CONTIG) {
17848 - switch(bitspersample){
17849 - case 8 :{
17850 - unsigned char *buf = (unsigned char *)_TIFFmalloc(TIFFStripSize(tif));
17851 - if (buf) {
17852 - uint32 row, rowsperstrip = (uint32)-1;
17853 - TIFFGetField(tif,TIFFTAG_ROWSPERSTRIP,&rowsperstrip);
17854 - for (row = 0; row<ny; row+= rowsperstrip) {
17855 - uint32 nrow = (row+rowsperstrip>ny?ny-row:rowsperstrip);
17856 - tstrip_t strip = TIFFComputeStrip(tif, row, 0);
17857 - if ((TIFFReadEncodedStrip(tif,strip,buf,-1))<0) {
17858 - _TIFFfree(buf);
17859 - TIFFClose(tif);
17860 - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', an error occure while reading a strip.",
17861 - pixel_type(),filename?filename:"(FILE*)");
17862 - }
17863 - unsigned char * ptr = buf;
17864 - for (unsigned int rr=0; rr<nrow; rr++)
17865 - for (unsigned int cc=0;cc<nx;cc++)
17866 - for (unsigned int vv=0;vv<samplesperpixel;vv++)
17867 - dest(cc,row+rr,dir,vv)= (T)(float)*(ptr++);
17868 -
17869 - }
17870 - _TIFFfree(buf);
17871 - }
17872 - break;
17873 - }
17874 - case 16:{
17875 - unsigned short *buf = (unsigned short *)_TIFFmalloc(TIFFStripSize(tif));
17876 - if (buf) {
17877 - uint32 row, rowsperstrip = (uint32)-1;
17878 - TIFFGetField(tif,TIFFTAG_ROWSPERSTRIP,&rowsperstrip);
17879 - for (row = 0; row<ny; row+= rowsperstrip) {
17880 - uint32 nrow = (row+rowsperstrip>ny?ny-row:rowsperstrip);
17881 - tstrip_t strip = TIFFComputeStrip(tif, row, 0);
17882 - if ((TIFFReadEncodedStrip(tif,strip,buf,-1))<0) {
17883 - _TIFFfree(buf);
17884 - TIFFClose(tif);
17885 - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', error while reading a strip.",
17886 - pixel_type(),filename?filename:"(FILE*)");
17887 - }
17888 - unsigned short * ptr = buf;
17889 - for (unsigned int rr=0; rr<nrow; rr++)
17890 - for (unsigned int cc=0;cc<nx;cc++)
17891 - for (unsigned int vv=0;vv<samplesperpixel;vv++)
17892 - dest(cc,row+rr,dir,vv)= (T)(float)*(ptr++);
17893 - }
17894 - _TIFFfree(buf);
17895 - }
17896 - break;
17897 - }
17898 - case 32:{
17899 - float *buf = (float *)_TIFFmalloc(TIFFStripSize(tif));
17900 - if (buf) {
17901 - uint32 row, rowsperstrip = (uint32)-1;
17902 - TIFFGetField(tif,TIFFTAG_ROWSPERSTRIP,&rowsperstrip);
17903 - for (row = 0; row<ny; row+= rowsperstrip) {
17904 - uint32 nrow = (row+rowsperstrip>ny?ny-row:rowsperstrip);
17905 - tstrip_t strip = TIFFComputeStrip(tif, row, 0);
17906 - if ((TIFFReadEncodedStrip(tif,strip,buf,-1))<0) {
17907 - _TIFFfree(buf);
17908 - TIFFClose(tif);
17909 - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', error while reading a strip.",
17910 - pixel_type(),filename?filename:"(FILE*)");
17911 - }
17912 - float * ptr = buf;
17913 - for (unsigned int rr=0; rr<nrow; rr++)
17914 - for (unsigned int cc=0;cc<nx;cc++)
17915 - for (unsigned int vv=0;vv<samplesperpixel;vv++)
17916 - dest(cc,row+rr,dir,vv)= (T)(float)*(ptr++);
17917 - }
17918 - _TIFFfree(buf);
17919 - }
17920 - break;
17921 - }
17922 -
17923 - }
17924 - }
17925 - else {
17926 - switch(bitspersample){
17927 - case 8 :{
17928 - unsigned char *buf = (unsigned char *)_TIFFmalloc(TIFFStripSize(tif));
17929 - if (buf) {
17930 - uint32 row, rowsperstrip = (uint32)-1;
17931 - TIFFGetField(tif,TIFFTAG_ROWSPERSTRIP,&rowsperstrip);
17932 - for (unsigned int vv=0;vv<samplesperpixel;vv++){
17933 - for (row = 0; row<ny; row+= rowsperstrip) {
17934 - uint32 nrow = (row+rowsperstrip>ny?ny-row:rowsperstrip);
17935 - tstrip_t strip = TIFFComputeStrip(tif, row, vv);
17936 - if ((TIFFReadEncodedStrip(tif,strip,buf,-1))<0) {
17937 - _TIFFfree(buf);
17938 - TIFFClose(tif);
17939 - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', an error occure while reading a strip.",
17940 - pixel_type(),filename?filename:"(FILE*)");
17941 - }
17942 - unsigned char * ptr = buf;
17943 - for (unsigned int rr=0;rr<nrow; rr++)
17944 - for (unsigned int cc=0;cc<nx;cc++)
17945 - dest(cc,row+rr,dir,vv)= (T)(float)*(ptr++);
17946 - }}
17947 - _TIFFfree(buf);
17948 - }
17949 - break;
17950 - }
17951 - case 16:{
17952 - unsigned short *buf = (unsigned short *)_TIFFmalloc(TIFFStripSize(tif));
17953 - if (buf) {
17954 - uint32 row, rowsperstrip = (uint32)-1;
17955 - TIFFGetField(tif,TIFFTAG_ROWSPERSTRIP,&rowsperstrip);
17956 - for (unsigned int vv=0;vv<samplesperpixel;vv++)
17957 - for (row = 0; row<ny; row+= rowsperstrip) {
17958 - uint32 nrow = (row+rowsperstrip>ny?ny-row:rowsperstrip);
17959 - tstrip_t strip = TIFFComputeStrip(tif, row, vv);
17960 - if ((TIFFReadEncodedStrip(tif,strip,buf,-1))<0) {
17961 - _TIFFfree(buf);
17962 - TIFFClose(tif);
17963 - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', error while reading a strip.",
17964 - pixel_type(),filename?filename:"(FILE*)");
17965 - }
17966 - unsigned short * ptr = buf;
17967 - for (unsigned int rr=0;rr<nrow;rr++)
17968 - for (unsigned int cc=0;cc<nx;cc++)
17969 - dest(cc,row+rr,dir,vv)= (T)(float)*(ptr++);
17970 - }
17971 - _TIFFfree(buf);
17972 - }
17973 - break;
17974 - }
17975 - case 32:{
17976 - float *buf = (float *)_TIFFmalloc(TIFFStripSize(tif));
17977 - if (buf) {
17978 - uint32 row, rowsperstrip = (uint32)-1;
17979 - TIFFGetField(tif,TIFFTAG_ROWSPERSTRIP,&rowsperstrip);
17980 - for (unsigned int vv=0;vv<samplesperpixel;vv++)
17981 - for (row = 0; row<ny; row+= rowsperstrip) {
17982 - uint32 nrow = (row+rowsperstrip>ny?ny-row:rowsperstrip);
17983 - tstrip_t strip = TIFFComputeStrip(tif, row, vv);
17984 - if ((TIFFReadEncodedStrip(tif,strip,buf,-1))<0) {
17985 - _TIFFfree(buf);
17986 - TIFFClose(tif);
17987 - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', error while reading a strip.",
17988 - pixel_type(),filename?filename:"(FILE*)");
17989 - }
17990 - float * ptr = buf;
17991 - for (unsigned int rr=0;rr<nrow;rr++)
17992 - for (unsigned int cc=0;cc<nx;cc++)
17993 - dest(cc,row+rr,dir,vv)= (T)(float)*(ptr++);
17994 - }
17995 - _TIFFfree(buf);
17996 - }
17997 - break;
17998 - }
17999 - }
18000 - }
18001 - }
18002 - }
18003 - else {
18004 - uint32* raster = (uint32*)_TIFFmalloc(nx * ny * sizeof (uint32));
18005 - if (!raster) {
18006 - _TIFFfree(raster);
18007 - TIFFClose(tif);
18008 - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', not enough memory for buffer allocation.",
18009 - pixel_type(),filename?filename:"(FILE*)");
18010 - }
18011 - TIFFReadRGBAImage(tif,nx,ny,raster,0);
18012 - switch (samplesperpixel){
18013 - case 1:{
18014 - cimg_forXY(dest,x,y) dest(x,y,dir)=(T)(float)((raster[nx*(ny-1-y)+x]+ 128) / 257);
18015 - break;
18016 - }
18017 - case 3:{
18018 - cimg_forXY(dest,x,y) {
18019 - dest(x,y,dir,0)=(T)(float)TIFFGetR(raster[nx*(ny-1-y)+x]);
18020 - dest(x,y,dir,1)=(T)(float)TIFFGetG(raster[nx*(ny-1-y)+x]);
18021 - dest(x,y,dir,2)=(T)(float)TIFFGetB(raster[nx*(ny-1-y)+x]);
18022 - }
18023 - break;
18024 - }
18025 - case 4:{
18026 - cimg_forXY(dest,x,y) {
18027 - dest(x,y,dir,0)=(T)(float)TIFFGetR(raster[nx*(ny-1-y)+x]);
18028 - dest(x,y,dir,1)=(T)(float)TIFFGetG(raster[nx*(ny-1-y)+x]);
18029 - dest(x,y,dir,2)=(T)(float)TIFFGetB(raster[nx*(ny-1-y)+x]);
18030 - dest(x,y,dir,3)=(T)(float)TIFFGetA(raster[nx*(ny-1-y)+x]);
18031 - }
18032 - break;
18033 - }
18034 - }
18035 - _TIFFfree(raster);
18036 - }
18037 - dir++;
18038 - } while (TIFFReadDirectory(tif));
18039 - TIFFClose(tif);
18040 - } else
18041 - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', error while loading the image.",
18042 - pixel_type(),filename?filename:"(FILE*)");
18043 - return dest;
18044 -#endif
18045 - }
18046 -
18047 - //! Load an image from a TIFF file
18048 - CImg& load_tiff(const char *const filename) {
18049 - return get_load_tiff(filename).swap(*this);
18050 - }
18051 -
18052 - //! Load a file in JPEG format.
18053 - static CImg get_load_jpeg(std::FILE *const file, const char *const filename=0) {
18054 -#ifndef cimg_use_jpeg
18055 - if (file)
18056 - throw CImgIOException("CImg<%s>::get_load_jpeg() : File '(FILE*)' cannot be read without using libjpeg.",
18057 - pixel_type());
18058 - else return get_load_other(filename);
18059 -#else
18060 - struct jpeg_decompress_struct cinfo;
18061 - struct jpeg_error_mgr jerr;
18062 - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
18063 -
18064 - cinfo.err = jpeg_std_error(&jerr);
18065 - jpeg_create_decompress(&cinfo);
18066 - jpeg_stdio_src(&cinfo,nfile);
18067 - jpeg_read_header(&cinfo,TRUE);
18068 - jpeg_start_decompress(&cinfo);
18069 -
18070 - if (cinfo.output_components!=1 && cinfo.output_components!=3 && cinfo.output_components!=4) {
18071 - cimg::warn(true,"CImg<%s>::get_load_jpeg() : Don't know how to read image '%s' with libpeg, trying ImageMagick's convert",
18072 - pixel_type(),filename?filename:"(unknown)");
18073 - if (!file) return get_load_other(filename);
18074 - else {
18075 - if (!file) cimg::fclose(nfile);
18076 - throw CImgIOException("CImg<%s>::get_load_jpeg() : Cannot read JPEG image '%s' using a *FILE input.",
18077 - pixel_type(),filename?filename:"(FILE*)");
18078 - }
18079 - }
18080 -
18081 - const unsigned int row_stride = cinfo.output_width * cinfo.output_components;
18082 - unsigned char *buf = new unsigned char[cinfo.output_width*cinfo.output_height*cinfo.output_components], *buf2 = buf;
18083 - JSAMPROW row_pointer[1];
18084 - while (cinfo.output_scanline < cinfo.output_height) {
18085 - row_pointer[0] = &buf[cinfo.output_scanline*row_stride];
18086 - jpeg_read_scanlines(&cinfo,row_pointer,1);
18087 - }
18088 - jpeg_finish_decompress(&cinfo);
18089 - jpeg_destroy_decompress(&cinfo);
18090 - if (!file) cimg::fclose(nfile);
18091 -
18092 - CImg<T> dest(cinfo.output_width,cinfo.output_height,1,cinfo.output_components);
18093 - switch (dest.dim) {
18094 - case 1: {
18095 - T *ptr_g = dest.ptr();
18096 - cimg_forXY(dest,x,y) *(ptr_g++) = (T)*(buf2++);
18097 - } break;
18098 - case 3: {
18099 - T *ptr_r = dest.ptr(0,0,0,0), *ptr_g = dest.ptr(0,0,0,1), *ptr_b = dest.ptr(0,0,0,2);
18100 - cimg_forXY(dest,x,y) {
18101 - *(ptr_r++) = (T)*(buf2++);
18102 - *(ptr_g++) = (T)*(buf2++);
18103 - *(ptr_b++) = (T)*(buf2++);
18104 - }
18105 - } break;
18106 - case 4: {
18107 - T *ptr_r = dest.ptr(0,0,0,0), *ptr_g = dest.ptr(0,0,0,1),
18108 - *ptr_b = dest.ptr(0,0,0,2), *ptr_a = dest.ptr(0,0,0,3);
18109 - cimg_forXY(dest,x,y) {
18110 - *(ptr_r++) = (T)*(buf2++);
18111 - *(ptr_g++) = (T)*(buf2++);
18112 - *(ptr_b++) = (T)*(buf2++);
18113 - *(ptr_a++) = (T)*(buf2++);
18114 - }
18115 - } break;
18116 - }
18117 - delete[] buf;
18118 - return dest;
18119 -#endif
18120 - }
18121 -
18122 - //! Load an image from a JPEG file
18123 - static CImg get_load_jpeg(const char *const filename) {
18124 - return get_load_jpeg(0,filename);
18125 - }
18126 -
18127 - //! Load an image from a JPEG file
18128 - CImg& load_jpeg(std::FILE *const file, const char *const filename=0) {
18129 - return get_load_jpeg(file,filename).swap(*this);
18130 - }
18131 -
18132 - //! Load an image from a JPEG file
18133 - CImg& load_jpeg(const char *const filename) {
18134 - return get_load_jpeg(filename).swap(*this);
18135 - }
18136 -
18137 - //! Load an image using builtin ImageMagick++ Library
18138 - /**
18139 - Added April/may 2006 by Christoph Hormann <chris_hormann@gmx.de>
18140 - This is experimental code, not much tested, use with care.
18141 - **/
18142 - static CImg get_load_magick(const char *const filename) {
18143 - CImg dest;
18144 -#ifdef cimg_use_magick
18145 - Magick::Image image(filename);
18146 - const unsigned int width = image.size().width(), height = image.size().height();
18147 - switch (image.type()) {
18148 - case Magick::PaletteMatteType:
18149 - case Magick::TrueColorMatteType:
18150 - case Magick::ColorSeparationType: {
18151 - dest.assign(width,height,1,4);
18152 - T *rdata = dest.ptr(0,0,0,0), *gdata = dest.ptr(0,0,0,1), *bdata = dest.ptr(0,0,0,2), *adata = dest.ptr(0,0,0,3);
18153 - Magick::PixelPacket *pixels = image.getPixels(0,0,width,height);
18154 - for (unsigned int off = width*height; off; --off) {
18155 - *(rdata++) = (T)(pixels->red);
18156 - *(gdata++) = (T)(pixels->green);
18157 - *(bdata++) = (T)(pixels->blue);
18158 - *(adata++) = (T)(pixels->opacity);
18159 - pixels++;
18160 - }
18161 - } break;
18162 - case Magick::PaletteType:
18163 - case Magick::TrueColorType: {
18164 - dest.assign(width,height,1,3);
18165 - T *rdata = dest.ptr(0,0,0,0), *gdata = dest.ptr(0,0,0,1), *bdata = dest.ptr(0,0,0,2);
18166 - Magick::PixelPacket *pixels = image.getPixels(0,0,width,height);
18167 - for (unsigned int off = width*height; off; --off) {
18168 - *(rdata++) = (T)(pixels->red);
18169 - *(gdata++) = (T)(pixels->green);
18170 - *(bdata++) = (T)(pixels->blue);
18171 - pixels++;
18172 - }
18173 - } break;
18174 - case Magick::GrayscaleMatteType: {
18175 - dest.assign(width,height,1,2);
18176 - T *data = dest.ptr(0,0,0,0), *adata = dest.ptr(0,0,0,1);
18177 - Magick::PixelPacket *pixels = image.getPixels(0,0,width,height);
18178 - for (unsigned int off = width*height; off; --off) {
18179 - *(data++) = (T)(pixels->red);
18180 - *(adata++) = (T)(pixels->opacity);
18181 - pixels++;
18182 - }
18183 - } break;
18184 - default: {
18185 - dest.assign(width,height,1,1);
18186 - T *data = dest.ptr(0,0,0,0);
18187 - Magick::PixelPacket *pixels = image.getPixels(0,0,width,height);
18188 - for (unsigned int off = width*height; off; --off) {
18189 - *(data++) = (T)(pixels->red);
18190 - pixels++;
18191 - }
18192 - } break;
18193 - }
18194 - return dest;
18195 -#else
18196 - throw CImgIOException("CImg<%s>::get_load_magick() : File '%s', Magick++ has not been linked during compilation.",
18197 - pixel_type(),filename?filename:"(null)");
18198 - return dest;
18199 -#endif
18200 - }
18201 -
18202 - //! Load an image using builtin ImageMagick++ Library (in-place version).
18203 - CImg& load_magick(const char *const filename) {
18204 - return get_load_magick(filename).swap(*this);
18205 - }
18206 -
18207 - //! Load an image from a RAW file.
18208 - static CImg get_load_raw(std::FILE *const file, const char *const filename,
18209 - const unsigned int sizex, const unsigned int sizey=1,
18210 - const unsigned int sizez=1, const unsigned int sizev=1,
18211 - const bool multiplexed=false, const bool endian_swap=false) {
18212 - CImg<T> res(sizex,sizey,sizez,sizev,0);
18213 - if (res.is_empty()) return res;
18214 -
18215 - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
18216 - if (!multiplexed) {
18217 - cimg::fread(res.ptr(),res.size(),nfile);
18218 - if (endian_swap) cimg::endian_swap(res.ptr(),res.size());
18219 - }
18220 - else {
18221 - CImg<T> buf(1,1,1,sizev);
18222 - cimg_forXYZ(res,x,y,z) {
18223 - cimg::fread(buf.ptr(),sizev,nfile);
18224 - if (endian_swap) cimg::endian_swap(buf.ptr(),sizev);
18225 - res.set_vector_at(buf,x,y,z); }
18226 - }
18227 - if (!file) cimg::fclose(nfile);
18228 - return res;
18229 - }
18230 -
18231 - //! Load an image from a RAW file.
18232 - static CImg get_load_raw(const char *const filename,
18233 - const unsigned int sizex, const unsigned int sizey=1,
18234 - const unsigned int sizez=1, const unsigned int sizev=1,
18235 - const bool multiplexed = false, const bool endian_swap = false) {
18236 - return get_load_raw(0,filename,sizex,sizey,sizez,sizev,multiplexed,endian_swap);
18237 - }
18238 -
18239 - //! In-place version of get_load_raw()
18240 - CImg& load_raw(std::FILE *const file, const char *const filename,
18241 - const unsigned int sizex, const unsigned int sizey=1,
18242 - const unsigned int sizez=1, const unsigned int sizev=1,
18243 - const bool multiplexed = false, const bool endian_swap = false) {
18244 - return get_load_raw(file,filename,sizex,sizey,sizez,sizev,multiplexed,endian_swap).swap(*this);
18245 - }
18246 -
18247 - //! In-place version of get_load_raw()
18248 - CImg& load_raw(const char *const filename,
18249 - const unsigned int sizex, const unsigned int sizey=1,
18250 - const unsigned int sizez=1, const unsigned int sizev=1,
18251 - const bool multiplexed = false, const bool endian_swap = false) {
18252 - return get_load_raw(filename,sizex,sizey,sizez,sizev,multiplexed,endian_swap).swap(*this);
18253 - }
18254 -
18255 - //! Load an image from a RGBA file.
18256 - static CImg get_load_rgba(std::FILE *const file, const char *const filename, const unsigned int dimw, const unsigned int dimh) {
18257 - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
18258 - unsigned char *buffer = new unsigned char[dimw*dimh*4];
18259 - cimg::fread(buffer,dimw*dimh*4,nfile);
18260 - if (!file) cimg::fclose(nfile);
18261 - CImg res(dimw,dimh,1,4);
18262 - T *pR = res.ptr(0,0,0,0), *pG = res.ptr(0,0,0,1), *pB = res.ptr(0,0,0,2), *pA = res.ptr(0,0,0,3);
18263 - const unsigned char *ptrs = buffer;
18264 - for (unsigned int off=res.width*res.height; off>0; --off) {
18265 - *(pR++) = (T)*(ptrs++);
18266 - *(pG++) = (T)*(ptrs++);
18267 - *(pB++) = (T)*(ptrs++);
18268 - *(pA++) = (T)*(ptrs++);
18269 - }
18270 - delete[] buffer;
18271 - return res;
18272 - }
18273 -
18274 - //! Load an image from a RGBA file.
18275 - static CImg get_load_rgba(const char *const filename, const unsigned int dimw, const unsigned int dimh) {
18276 - return get_load_rgba(0,filename,dimw,dimh);
18277 - }
18278 -
18279 - //! In-place version of get_load_rgba()
18280 - CImg& load_rgba(std::FILE *const file, const char *const filename, const unsigned int dimw, const unsigned int dimh) {
18281 - return get_load_rgba(file, filename,dimw,dimh).swap(*this);
18282 - }
18283 -
18284 - //! In-place version of get_load_rgba()
18285 - CImg& load_rgba(const char *const filename, const unsigned int dimw, const unsigned int dimh) {
18286 - return get_load_rgba(filename,dimw,dimh).swap(*this);
18287 - }
18288 -
18289 - //! Load an image from a RGB file.
18290 - static CImg get_load_rgb(std::FILE *const file, const char *const filename, const unsigned int dimw, const unsigned int dimh) {
18291 - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
18292 - unsigned char *buffer = new unsigned char[dimw*dimh*3];
18293 - cimg::fread(buffer,dimw*dimh*3,nfile);
18294 - if (!file) cimg::fclose(nfile);
18295 - CImg res(dimw,dimh,1,3);
18296 - T *pR = res.ptr(0,0,0,0), *pG = res.ptr(0,0,0,1), *pB=res.ptr(0,0,0,2);
18297 - const unsigned char *ptrs = buffer;
18298 - for (unsigned int off=res.width*res.height; off>0; --off) {
18299 - *(pR++) = (T)*(ptrs++);
18300 - *(pG++) = (T)*(ptrs++);
18301 - *(pB++) = (T)*(ptrs++);
18302 - }
18303 - delete[] buffer;
18304 - return res;
18305 - }
18306 -
18307 - //! Load an image from a RGB file.
18308 - static CImg get_load_rgb(const char *const filename, const unsigned int dimw, const unsigned int dimh) {
18309 - return get_load_rgb(0,filename,dimw,dimh);
18310 - }
18311 -
18312 - //! In-place version of get_load_rgb()
18313 - CImg& load_rgb(std::FILE *const file, const char *const filename, const unsigned int dimw, const unsigned int dimh) {
18314 - return get_load_rgb(file, filename,dimw,dimh).swap(*this);
18315 - }
18316 -
18317 - //! In-place version of get_load_rgb()
18318 - CImg& load_rgb(const char *const filename, const unsigned int dimw, const unsigned int dimh) {
18319 - return get_load_rgb(filename,dimw,dimh).swap(*this);
18320 - }
18321 -
18322 -#define cimg_load_inr_case(Tf,sign,pixsize,Ts) \
18323 - if (!loaded && fopt[6]==pixsize && fopt[4]==Tf && fopt[5]==sign) { \
18324 - Ts *xval, *val = new Ts[fopt[0]*fopt[3]]; \
18325 - cimg_forYZ(dest,y,z) { \
18326 - cimg::fread(val,fopt[0]*fopt[3],nfile); \
18327 - if (fopt[7]!=endian) cimg::endian_swap(val,fopt[0]*fopt[3]); \
18328 - xval = val; cimg_forX(dest,x) cimg_forV(dest,k) \
18329 - dest(x,y,z,k) = (T)*(xval++); \
18330 - } \
18331 - delete[] val; \
18332 - loaded = true; \
18333 - }
18334 -
18335 - static void _load_inr(std::FILE *file, int out[8], float *const voxsize=0) {
18336 - char item[1024],tmp1[64],tmp2[64];
18337 - out[0]=out[1]=out[2]=out[3]=out[5]=1; out[4]=out[6]=out[7]=-1;
18338 - std::fscanf(file,"%63s",item);
18339 - if(cimg::strncasecmp(item,"#INRIMAGE-4#{",13)!=0)
18340 - throw CImgIOException("CImg<%s>::get_load_inr() : File does not appear to be a valid INR file.\n"
18341 - "(INRIMAGE-4 identifier not found)",pixel_type());
18342 - while (std::fscanf(file," %63[^\n]%*c",item)!=EOF && cimg::strncmp(item,"##}",3)) {
18343 - std::sscanf(item," XDIM%*[^0-9]%d",out);
18344 - std::sscanf(item," YDIM%*[^0-9]%d",out+1);
18345 - std::sscanf(item," ZDIM%*[^0-9]%d",out+2);
18346 - std::sscanf(item," VDIM%*[^0-9]%d",out+3);
18347 - std::sscanf(item," PIXSIZE%*[^0-9]%d",out+6);
18348 - if (voxsize) {
18349 - std::sscanf(item," VX%*[^0-9.eE+-]%f",voxsize);
18350 - std::sscanf(item," VY%*[^0-9.eE+-]%f",voxsize+1);
18351 - std::sscanf(item," VZ%*[^0-9.eE+-]%f",voxsize+2);
18352 - }
18353 - if (std::sscanf(item," CPU%*[ =]%s",tmp1)) out[7]=cimg::strncasecmp(tmp1,"sun",3)?0:1;
18354 - switch(std::sscanf(item," TYPE%*[ =]%s %s",tmp1,tmp2)) {
18355 - case 0: break;
18356 - case 2: out[5] = cimg::strncasecmp(tmp1,"unsigned",8)?1:0; std::strcpy(tmp1,tmp2);
18357 - case 1:
18358 - if (!cimg::strncasecmp(tmp1,"int",3) || !cimg::strncasecmp(tmp1,"fixed",5)) out[4]=0;
18359 - if (!cimg::strncasecmp(tmp1,"float",5) || !cimg::strncasecmp(tmp1,"double",6)) out[4]=1;
18360 - if (!cimg::strncasecmp(tmp1,"packed",6)) out[4]=2;
18361 - if (out[4]>=0) break;
18362 - default: throw CImgIOException("cimg::inr_header_read() : Invalid TYPE '%s'",tmp2);
18363 - }
18364 - }
18365 - if(out[0]<0 || out[1]<0 || out[2]<0 || out[3]<0)
18366 - throw CImgIOException("CImg<%s>::get_load_inr() : Bad dimensions in .inr file = ( %d , %d , %d , %d )",
18367 - pixel_type(),out[0],out[1],out[2],out[3]);
18368 - if(out[4]<0 || out[5]<0) throw CImgIOException("CImg<%s>::get_load_inr() : TYPE is not fully defined",pixel_type());
18369 - if(out[6]<0) throw CImgIOException("CImg<%s>::get_load_inr() : PIXSIZE is not fully defined",pixel_type());
18370 - if(out[7]<0) throw CImgIOException("CImg<%s>::get_load_inr() : Big/Little Endian coding type is not defined",pixel_type());
18371 - }
18372 -
18373 - //! Load an image from an INRIMAGE-4 file.
18374 - static CImg get_load_inr(std::FILE *const file, const char *const filename=0, float *voxsize=0) {
18375 - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
18376 - int fopt[8], endian=cimg::endian()?1:0;
18377 - bool loaded = false;
18378 - if (voxsize) voxsize[0]=voxsize[1]=voxsize[2]=1;
18379 - _load_inr(nfile,fopt,voxsize);
18380 - CImg<T> dest(fopt[0],fopt[1],fopt[2],fopt[3]);
18381 - cimg_load_inr_case(0,0,8, unsigned char);
18382 - cimg_load_inr_case(0,1,8, char);
18383 - cimg_load_inr_case(0,0,16,unsigned short);
18384 - cimg_load_inr_case(0,1,16,short);
18385 - cimg_load_inr_case(0,0,32,unsigned int);
18386 - cimg_load_inr_case(0,1,32,int);
18387 - cimg_load_inr_case(1,0,32,float);
18388 - cimg_load_inr_case(1,1,32,float);
18389 - cimg_load_inr_case(1,0,64,double);
18390 - cimg_load_inr_case(1,1,64,double);
18391 - if (!loaded) {
18392 - if (!file) cimg::fclose(nfile);
18393 - throw CImgIOException("CImg<%s>::get_load_inr() : File '%s', cannot read images of the type specified in the file",
18394 - pixel_type(),filename?filename:"(FILE*)");
18395 - }
18396 - if (!file) cimg::fclose(nfile);
18397 - return dest;
18398 - }
18399 -
18400 - //! Load an image from an INRIMAGE-4 file.
18401 - static CImg get_load_inr(const char *const filename, float *const voxsize=0) {
18402 - return get_load_inr(0,filename,voxsize);
18403 - }
18404 -
18405 - //! In-place version of get_load_inr()
18406 - CImg& load_inr(std::FILE *const file, const char *const filename=0, float *const voxsize=0) {
18407 - return get_load_inr(file,filename,voxsize).swap(*this);
18408 - }
18409 -
18410 - //! In-place version of get_load_inr()
18411 - CImg& load_inr(const char *const filename, float *const voxsize=0) {
18412 - return get_load_inr(filename,voxsize).swap(*this);
18413 - }
18414 -
18415 -#define cimg_load_pandore_case(nid,nbdim,nwidth,nheight,ndepth,ndim,stype) \
18416 - case nid: { \
18417 - cimg::fread(dims,nbdim,nfile); \
18418 - if (endian) cimg::endian_swap(dims,nbdim); \
18419 - dest.assign(nwidth,nheight,ndepth,ndim); \
18420 - stype *buffer = new stype[dest.size()]; \
18421 - cimg::fread(buffer,dest.size(),nfile); \
18422 - if (endian) cimg::endian_swap(buffer,dest.size()); \
18423 - T *ptrd = dest.ptr(); \
18424 - cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++); \
18425 - buffer-=dest.size(); \
18426 - delete[] buffer; \
18427 - } \
18428 - break;
18429 -
18430 - //! Load an image from a PANDORE-5 file.
18431 - static CImg get_load_pandore(std::FILE *const file, const char *const filename=0) {
18432 - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
18433 - typedef unsigned char uchar;
18434 - /* Don't use these two and they cause warnings.
18435 - *
18436 - typedef unsigned short ushort;
18437 - typedef unsigned int uint;
18438 - */
18439 - typedef unsigned long ulong;
18440 - CImg dest;
18441 - char tmp[32];
18442 - cimg::fread(tmp,12,nfile);
18443 - if (cimg::strncasecmp("PANDORE",tmp,7)) {
18444 - if (!file) cimg::fclose(nfile);
18445 - throw CImgIOException("CImg<%s>::get_load_pandore() : File '%s' is not a valid PANDORE file.\n"
18446 - "(PANDORE identifier not found).",pixel_type(),filename?filename:"(FILE*)");
18447 - }
18448 - unsigned int imageid,dims[8];
18449 - int ptbuf[4];
18450 - cimg::fread(&imageid,1,nfile);
18451 - const bool endian = (imageid>255);
18452 - if (endian) cimg::endian_swap(imageid);
18453 -
18454 - cimg::fread(tmp,20,nfile);
18455 - switch (imageid) {
18456 - cimg_load_pandore_case(2,2,dims[1],1,1,1,uchar);
18457 - cimg_load_pandore_case(3,2,dims[1],1,1,1,long);
18458 - cimg_load_pandore_case(4,2,dims[1],1,1,1,float);
18459 - cimg_load_pandore_case(5,3,dims[2],dims[1],1,1,uchar);
18460 - cimg_load_pandore_case(6,3,dims[2],dims[1],1,1,long);
18461 - cimg_load_pandore_case(7,3,dims[2],dims[1],1,1,float);
18462 - cimg_load_pandore_case(8,4,dims[3],dims[2],dims[1],1,uchar);
18463 - cimg_load_pandore_case(9,4,dims[3],dims[2],dims[1],1,long);
18464 - cimg_load_pandore_case(10,4,dims[3],dims[2],dims[1],1,float);
18465 -
18466 - case 11: { // Region 1D
18467 - cimg::fread(dims,3,nfile);
18468 - if (endian) cimg::endian_swap(dims,3);
18469 - dest.assign(dims[1],1,1,1);
18470 - if (dims[2]<256) {
18471 - unsigned char *buffer = new unsigned char[dest.size()];
18472 - cimg::fread(buffer,dest.size(),nfile);
18473 - T *ptrd = dest.ptr();
18474 - cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++);
18475 - buffer-=dest.size();
18476 - delete[] buffer;
18477 - } else {
18478 - if (dims[2]<65536) {
18479 - unsigned short *buffer = new unsigned short[dest.size()];
18480 - cimg::fread(buffer,dest.size(),nfile);
18481 - if (endian) cimg::endian_swap(buffer,dest.size());
18482 - T *ptrd = dest.ptr();
18483 - cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++);
18484 - buffer-=dest.size();
18485 - delete[] buffer;
18486 - } else {
18487 - unsigned int *buffer = new unsigned int[dest.size()];
18488 - cimg::fread(buffer,dest.size(),nfile);
18489 - if (endian) cimg::endian_swap(buffer,dest.size());
18490 - T *ptrd = dest.ptr();
18491 - cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++);
18492 - buffer-=dest.size();
18493 - delete[] buffer;
18494 - }
18495 - }
18496 - }
18497 - break;
18498 - case 12: { // Region 2D
18499 - cimg::fread(dims,4,nfile);
18500 - if (endian) cimg::endian_swap(dims,4);
18501 - dest.assign(dims[2],dims[1],1,1);
18502 - if (dims[3]<256) {
18503 - unsigned char *buffer = new unsigned char[dest.size()];
18504 - cimg::fread(buffer,dest.size(),nfile);
18505 - T *ptrd = dest.ptr();
18506 - cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++);
18507 - buffer-=dest.size();
18508 - delete[] buffer;
18509 - } else {
18510 - if (dims[3]<65536) {
18511 - unsigned short *buffer = new unsigned short[dest.size()];
18512 - cimg::fread(buffer,dest.size(),nfile);
18513 - if (endian) cimg::endian_swap(buffer,dest.size());
18514 - T *ptrd = dest.ptr();
18515 - cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++);
18516 - buffer-=dest.size();
18517 - delete[] buffer;
18518 - } else {
18519 - unsigned long *buffer = new unsigned long[dest.size()];
18520 - cimg::fread(buffer,dest.size(),nfile);
18521 - if (endian) cimg::endian_swap(buffer,dest.size());
18522 - T *ptrd = dest.ptr();
18523 - cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++);
18524 - buffer-=dest.size();
18525 - delete[] buffer;
18526 - }
18527 - }
18528 - }
18529 - break;
18530 - case 13: { // Region 3D
18531 - cimg::fread(dims,5,nfile);
18532 - if (endian) cimg::endian_swap(dims,5);
18533 - dest.assign(dims[3],dims[2],dims[1],1);
18534 - if (dims[4]<256) {
18535 - unsigned char *buffer = new unsigned char[dest.size()];
18536 - cimg::fread(buffer,dest.size(),nfile);
18537 - T *ptrd = dest.ptr();
18538 - cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++);
18539 - buffer-=dest.size();
18540 - delete[] buffer;
18541 - } else {
18542 - if (dims[4]<65536) {
18543 - unsigned short *buffer = new unsigned short[dest.size()];
18544 - cimg::fread(buffer,dest.size(),nfile);
18545 - if (endian) cimg::endian_swap(buffer,dest.size());
18546 - T *ptrd = dest.ptr();
18547 - cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++);
18548 - buffer-=dest.size();
18549 - delete[] buffer;
18550 - } else {
18551 - unsigned int *buffer = new unsigned int[dest.size()];
18552 - cimg::fread(buffer,dest.size(),nfile);
18553 - if (endian) cimg::endian_swap(buffer,dest.size());
18554 - T *ptrd = dest.ptr();
18555 - cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++);
18556 - buffer-=dest.size();
18557 - delete[] buffer;
18558 - }
18559 - }
18560 - }
18561 - break;
18562 - cimg_load_pandore_case(16,4,dims[2],dims[1],1,3,uchar);
18563 - cimg_load_pandore_case(17,4,dims[2],dims[1],1,3,long);
18564 - cimg_load_pandore_case(18,4,dims[2],dims[1],1,3,float);
18565 - cimg_load_pandore_case(19,5,dims[3],dims[2],dims[1],3,uchar);
18566 - cimg_load_pandore_case(20,5,dims[3],dims[2],dims[1],3,long);
18567 - cimg_load_pandore_case(21,5,dims[3],dims[2],dims[1],3,float);
18568 - cimg_load_pandore_case(22,2,dims[1],1,1,dims[0],uchar);
18569 - cimg_load_pandore_case(23,2,dims[1],1,1,dims[0],long);
18570 - cimg_load_pandore_case(24,2,dims[1],1,1,dims[0],ulong);
18571 - cimg_load_pandore_case(25,2,dims[1],1,1,dims[0],float);
18572 - cimg_load_pandore_case(26,3,dims[2],dims[1],1,dims[0],uchar);
18573 - cimg_load_pandore_case(27,3,dims[2],dims[1],1,dims[0],long);
18574 - cimg_load_pandore_case(28,3,dims[2],dims[1],1,dims[0],ulong);
18575 - cimg_load_pandore_case(29,3,dims[2],dims[1],1,dims[0],float);
18576 - cimg_load_pandore_case(30,4,dims[3],dims[2],dims[1],dims[0],uchar);
18577 - cimg_load_pandore_case(31,4,dims[3],dims[2],dims[1],dims[0],long);
18578 - cimg_load_pandore_case(32,4,dims[3],dims[2],dims[1],dims[0],ulong);
18579 - cimg_load_pandore_case(33,4,dims[3],dims[2],dims[1],dims[0],float);
18580 - case 34: // Points 1D
18581 - cimg::fread(ptbuf,1,nfile);
18582 - if (endian) cimg::endian_swap(ptbuf,1);
18583 - dest.assign(1); dest[0]=(T)ptbuf[0];
18584 - break;
18585 - case 35: // Points 2D
18586 - cimg::fread(ptbuf,2,nfile);
18587 - if (endian) cimg::endian_swap(ptbuf,2);
18588 - dest.assign(2); dest[0]=(T)ptbuf[1]; dest[1]=(T)ptbuf[0];
18589 - break;
18590 - case 36: // Points 3D
18591 - cimg::fread(ptbuf,3,nfile);
18592 - if (endian) cimg::endian_swap(ptbuf,3);
18593 - dest.assign(3); dest[0]=(T)ptbuf[2]; dest[1]=(T)ptbuf[1]; dest[2]=(T)ptbuf[0];
18594 - break;
18595 - default:
18596 - if (!file) cimg::fclose(nfile);
18597 - throw CImgIOException("CImg<%s>::get_load_pandore() : File '%s', cannot read images with ID_type=%u",
18598 - pixel_type(),filename?filename:"(FILE*)",imageid);
18599 - }
18600 - if (!file) cimg::fclose(nfile);
18601 - return dest;
18602 - }
18603 -
18604 - //! Load an image from a PANDORE-5 file.
18605 - static CImg get_load_pandore(const char *const filename) {
18606 - return get_load_pandore(0,filename);
18607 - }
18608 -
18609 - //! In-place version of get_load_pandore()
18610 - CImg& load_pandore(std::FILE *const file, const char *const filename) {
18611 - return get_load_pandore(file,filename).swap(*this);
18612 - }
18613 -
18614 - //! In-place version of get_load_pandore()
18615 - CImg& load_pandore(const char *const filename) {
18616 - return get_load_pandore(filename).swap(*this);
18617 - }
18618 -
18619 - //! Load an image from an ANALYZE7.5 file
18620 - static CImg get_load_analyze(const char *const filename, float *const voxsize=0) {
18621 -
18622 - // Open header and data files
18623 - std::FILE *file_header=0, *file=0;
18624 - char body[1024];
18625 - const char *ext = cimg::filename_split(filename,body);
18626 - if (!cimg::strncasecmp(ext,"hdr",3) ||
18627 - !cimg::strncasecmp(ext,"img",3)) {
18628 - std::sprintf(body+cimg::strlen(body),".hdr");
18629 - file_header = cimg::fopen(body,"rb");
18630 - if (!file_header) return CImg<T>();
18631 - std::sprintf(body+cimg::strlen(body)-3,"img");
18632 - file = cimg::fopen(body,"rb");
18633 - if (!file) { cimg::fclose(file_header); return CImg<T>(); }
18634 - } else throw CImgIOException("CImg<%s>::get_load_analyze() : Filename '%s', not recognized as an Analyze 7.5 file.",
18635 - pixel_type(),filename);
18636 -
18637 - // Read header
18638 - bool endian = false;
18639 - unsigned int header_size;
18640 - cimg::fread(&header_size,1,file_header);
18641 - if (header_size>=4096) { endian = true; cimg::endian_swap(header_size); }
18642 - unsigned char *header = new unsigned char[header_size];
18643 - cimg::fread(header+4,header_size-4,file_header);
18644 - cimg::fclose(file_header);
18645 - if (endian) {
18646 - cimg::endian_swap((short*)(header+40),5);
18647 - cimg::endian_swap((short*)(header+70),1);
18648 - cimg::endian_swap((short*)(header+72),1);
18649 - cimg::endian_swap((float*)(header+76),4);
18650 - cimg::endian_swap((float*)(header+112),1);
18651 - }
18652 - unsigned short *dim = (unsigned short*)(header+40), dimx=1, dimy=1, dimz=1, dimv=1;
18653 - cimg::warn(!dim[0],"CImg<%s>::get_load_analyze() : Specified image has zero dimensions.",pixel_type());
18654 - cimg::warn(dim[0]>4,"CImg<%s>::get_load_analyze() : Number of image dimension is %d, reading only the 4 first dimensions",
18655 - pixel_type(),dim[0]);
18656 - if (dim[0]>=1) dimx = dim[1];
18657 - if (dim[0]>=2) dimy = dim[2];
18658 - if (dim[0]>=3) dimz = dim[3];
18659 - if (dim[0]>=4) dimv = dim[4];
18660 -
18661 - float scalefactor = *(float*)(header+112); if (scalefactor==0) scalefactor=1;
18662 - const unsigned short datatype = *(short*)(header+70);
18663 - if (voxsize) { const float *vsize = (float*)(header+76); voxsize[0] = vsize[1]; voxsize[1] = vsize[2]; voxsize[2] = vsize[3]; }
18664 - delete[] header;
18665 -
18666 - // Read pixel data
18667 - CImg dest(dimx,dimy,dimz,dimv);
18668 - switch (datatype) {
18669 - case 2: {
18670 - unsigned char *buffer = new unsigned char[dimx*dimy*dimz*dimv];
18671 - cimg::fread(buffer,dimx*dimy*dimz*dimv,file);
18672 - cimg_foroff(dest,off) dest.data[off] = (T)(buffer[off]*scalefactor);
18673 - delete[] buffer;
18674 - } break;
18675 - case 4: {
18676 - short *buffer = new short[dimx*dimy*dimz*dimv];
18677 - cimg::fread(buffer,dimx*dimy*dimz*dimv,file);
18678 - if (endian) cimg::endian_swap(buffer,dimx*dimy*dimz*dimv);
18679 - cimg_foroff(dest,off) dest.data[off] = (T)(buffer[off]*scalefactor);
18680 - delete[] buffer;
18681 - } break;
18682 - case 8: {
18683 - int *buffer = new int[dimx*dimy*dimz*dimv];
18684 - cimg::fread(buffer,dimx*dimy*dimz*dimv,file);
18685 - if (endian) cimg::endian_swap(buffer,dimx*dimy*dimz*dimv);
18686 - cimg_foroff(dest,off) dest.data[off] = (T)(buffer[off]*scalefactor);
18687 - delete[] buffer;
18688 - } break;
18689 - case 16: {
18690 - float *buffer = new float[dimx*dimy*dimz*dimv];
18691 - cimg::fread(buffer,dimx*dimy*dimz*dimv,file);
18692 - if (endian) cimg::endian_swap(buffer,dimx*dimy*dimz*dimv);
18693 - cimg_foroff(dest,off) dest.data[off] = (T)(buffer[off]*scalefactor);
18694 - delete[] buffer;
18695 - } break;
18696 - case 64: {
18697 - double *buffer = new double[dimx*dimy*dimz*dimv];
18698 - cimg::fread(buffer,dimx*dimy*dimz*dimv,file);
18699 - if (endian) cimg::endian_swap(buffer,dimx*dimy*dimz*dimv);
18700 - cimg_foroff(dest,off) dest.data[off] = (T)(buffer[off]*scalefactor);
18701 - delete[] buffer;
18702 - } break;
18703 - default:
18704 - cimg::fclose(file);
18705 - throw CImgIOException("CImg<%s>::get_load_analyze() : File '%s, cannot read images width 'datatype = %d'",
18706 - pixel_type(),filename,datatype);
18707 - }
18708 - cimg::fclose(file);
18709 - return dest;
18710 - }
18711 -
18712 - //! In-place version of get_load_analyze()
18713 - CImg& load_analyze(const char *const filename, float *const voxsize = 0) {
18714 - return get_load_analyze(filename,voxsize).swap(*this);
18715 - }
18716 -
18717 - //! Load PAR-REC (Philips) image file
18718 - static CImg get_load_parrec(const char *const filename, const char axe='v', const char align='p') {
18719 - return CImgList<T>::get_load_parrec(filename).get_append(axe,align);
18720 - }
18721 -
18722 - //! In-place version of get_load_parrec()
18723 - CImg& load_parrec(const char *const filename, const char axis='v', const char align='p') {
18724 - return get_load_parrec(filename,axis,align).swap(*this);
18725 - }
18726 -
18727 - //! Load an image from a CImg RAW file
18728 - static CImg get_load_cimg(std::FILE *const file, const char *const filename=0, const char axis='v', const char align='p') {
18729 - return CImgList<T>::get_load_cimg(file,filename).get_append(axis,align);
18730 - }
18731 -
18732 - //! Load an image from a CImg RAW file
18733 - static CImg get_load_cimg(const char *const filename, const char axis='v', const char align='p') {
18734 - return get_load_cimg(0,filename,axis,align);
18735 - }
18736 -
18737 - //! In-place version of get_load_cimg()
18738 - CImg& load_cimg(std::FILE *const file, const char *const filename=0, const char axis='v', const char align='p') {
18739 - return get_load_cimg(file,filename,axis,align).swap(*this);
18740 - }
18741 -
18742 - //! In-place version of get_load_cimg()
18743 - CImg& load_cimg(const char *const filename, const char axis='v', const char align='p') {
18744 - return get_load_cimg(filename,axis,align).swap(*this);
18745 - }
18746 -
18747 - //! Function that loads the image for other file formats that are not natively handled by CImg.
18748 - //! This is the case for all compressed image formats (GIF,PNG,JPG,TIF,...).
18749 - static CImg get_load_imagemagick(const char *const filename) {
18750 - static bool first_time = true;
18751 - char command[1024], filetmp[512];
18752 - if (first_time) { std::srand((unsigned int)::time(0)); first_time = false; }
18753 - std::FILE *file = 0;
18754 - do {
18755 - std::sprintf(filetmp,"%s%sCImg%.4d.ppm",cimg::temporary_path(),cimg_OS==2?"\\":"/",std::rand()%10000);
18756 - if ((file=std::fopen(filetmp,"rb"))!=0) std::fclose(file);
18757 - } while (file);
18758 - std::sprintf(command,"%s \"%s\" %s",cimg::imagemagick_path(),filename,filetmp);
18759 - cimg::system(command,cimg::imagemagick_path());
18760 - if (!(file = std::fopen(filetmp,"rb"))) {
18761 - cimg::fclose(cimg::fopen(filename,"r"));
18762 - throw CImgIOException("CImg<%s>::get_load_imagemagick() : Failed to open image '%s'.\n\n"
18763 - "Path of 'ImageMagick's convert' : \"%s\"\n"
18764 - "Path of temporary filename : \"%s\"",
18765 - pixel_type(),filename,cimg::imagemagick_path(),filetmp);
18766 - } else cimg::fclose(file);
18767 - const CImg dest = CImg<T>::get_load_pnm(filetmp);
18768 - std::remove(filetmp);
18769 - return dest;
18770 - }
18771 -
18772 - //! In-place version of get_load_imagemagick()
18773 - CImg& load_imagemagick(const char *const filename) {
18774 - return get_load_imagemagick(filename).swap(*this);
18775 - }
18776 -
18777 - //! Function that loads the image for other file formats that are not natively handled by CImg.
18778 - //! This is the case for all compressed image formats (GIF,PNG,JPG,TIF,...).
18779 - static CImg get_load_graphicsmagick(const char *const filename) {
18780 - static bool first_time = true;
18781 - char command[1024], filetmp[512];
18782 - if (first_time) { std::srand((unsigned int)::time(0)); first_time = false; }
18783 - std::FILE *file = 0;
18784 - do {
18785 - std::sprintf(filetmp,"%s%sCImg%.4d.ppm",cimg::temporary_path(),cimg_OS==2?"\\":"/",std::rand()%10000);
18786 - if ((file=std::fopen(filetmp,"rb"))!=0) std::fclose(file);
18787 - } while (file);
18788 - std::sprintf(command,"%s convert \"%s\" %s",cimg::graphicsmagick_path(),filename,filetmp);
18789 - cimg::system(command,cimg::graphicsmagick_path());
18790 - if (!(file = std::fopen(filetmp,"rb"))) {
18791 - cimg::fclose(cimg::fopen(filename,"r"));
18792 - throw CImgIOException("CImg<%s>::get_load_graphicsmagick() : Failed to open image '%s'.\n\n"
18793 - "Path of 'GraphicsMagick's gm' : \"%s\"\n"
18794 - "Path of temporary filename : \"%s\"",
18795 - pixel_type(),filename,cimg::graphicsmagick_path(),filetmp);
18796 - } else cimg::fclose(file);
18797 - const CImg dest = CImg<T>::get_load_pnm(filetmp);
18798 - std::remove(filetmp);
18799 - return dest;
18800 - }
18801 -
18802 - //! In-place version of get_load_graphicsmagick()
18803 - CImg& load_graphicsmagick(const char *const filename) {
18804 - return get_load_graphicsmagick(filename).swap(*this);
18805 - }
18806 -
18807 - //! Function that loads the image for other file formats that are not natively handled by CImg.
18808 - //! This is the case for all compressed image formats (GIF,PNG,JPG,TIF,...).
18809 - static CImg get_load_other(const char *const filename) {
18810 - CImg<T> res;
18811 - const unsigned int odebug = cimg::exception_mode();
18812 - cimg::exception_mode() = 0;
18813 - try { res.load_magick(filename); }
18814 - catch (CImgException&) {
18815 - try { res.load_imagemagick(filename); }
18816 - catch (CImgException&) {
18817 - try { res.load_graphicsmagick(filename); }
18818 - catch (CImgException&) {
18819 - res.assign();
18820 - }
18821 - }
18822 - }
18823 - cimg::exception_mode()=odebug;
18824 - if (res.is_empty())
18825 - throw CImgIOException("CImg<%s>::get_load_other() : Failed to open image '%s'.\n"
18826 - "Check you have either the ImageMagick or GraphicsMagick package installed.",
18827 - pixel_type(),filename);
18828 - return res;
18829 - }
18830 -
18831 - //! In-place version of get_load_graphicsmagick()
18832 - CImg& load_other(const char *const filename) {
18833 - return get_load_other(filename).swap(*this);
18834 - }
18835 -
18836 - //! Load an image from a Dicom file (need '(X)Medcon' : http://xmedcon.sourceforge.net )
18837 - static CImg get_load_dicom(const char *const filename) {
18838 - static bool first_time = true;
18839 - char command[1024], filetmp[512], body[512];
18840 - if (first_time) { std::srand((unsigned int)::time(0)); first_time = false; }
18841 - cimg::fclose(cimg::fopen(filename,"r"));
18842 - std::FILE *file;
18843 - do {
18844 - std::sprintf(filetmp,"CImg%.4d.hdr",std::rand()%10000);
18845 - if ((file=std::fopen(filetmp,"rb"))!=0) std::fclose(file);
18846 - } while (file);
18847 - std::sprintf(command,"%s -w -c anlz -o %s -f %s",cimg::medcon_path(),filetmp,filename);
18848 - cimg::system(command);
18849 - cimg::filename_split(filetmp,body);
18850 - std::sprintf(command,"m000-%s.hdr",body);
18851 - file = std::fopen(command,"rb");
18852 - if (!file) {
18853 - throw CImgIOException("CImg<%s>::get_load_dicom() : Failed to open image '%s'.\n\n"
18854 - "Path of 'medcon' : \"%s\"\n"
18855 - "Path of temporary filename : \"%s\"",
18856 - pixel_type(),filename,cimg::medcon_path,filetmp);
18857 - } else cimg::fclose(file);
18858 - const CImg dest = CImg<T>::get_load_analyze(command);
18859 - std::remove(command);
18860 - std::sprintf(command,"m000-%s.img",body);
18861 - std::remove(command);
18862 - return dest;
18863 - }
18864 -
18865 - //! In-place version of get_load_dicom()
18866 - CImg& load_dicom(const char *const filename) {
18867 - return get_load_dicom(filename).swap(*this);
18868 - }
18869 -
18870 - //! Load OFF files (GeomView 3D object files)
18871 - template<typename tf,typename tc>
18872 - static CImg<T> get_load_off(const char *const filename, CImgList<tf>& primitives, CImgList<tc>& colors,
18873 - const bool invert_faces=false) {
18874 - std::FILE *file=cimg::fopen(filename,"r");
18875 - unsigned int nb_points=0, nb_triangles=0;
18876 - int err;
18877 - if ((err = std::fscanf(file,"OFF%u%u%*[^\n]",&nb_points,&nb_triangles))!=2) {
18878 - cimg::fclose(file);
18879 - throw CImgIOException("CImg<%s>::get_load_off() : File '%s' is not a valid OFF file.",pixel_type(),filename);
18880 - }
18881 -
18882 - // Read points data
18883 - CImg<T> points(nb_points,3);
18884 - float X=0,Y=0,Z=0;
18885 - cimg_forX(points,l) {
18886 - if ((err = std::fscanf(file,"%f%f%f%*[^\n]",&X,&Y,&Z))!=3) {
18887 - cimg::fclose(file);
18888 - throw CImgIOException("CImg<%s>::get_load_off() : File '%s', cannot read point %u.\n",pixel_type(),filename,l);
18889 - }
18890 - points(l,0) = (T)X; points(l,1) = (T)Y; points(l,2) = (T)Z;
18891 - }
18892 -
18893 - // Read primitive data
18894 - primitives.assign();
18895 - colors.assign();
18896 - bool stopflag = false;
18897 - while (!stopflag) {
18898 - unsigned int prim=0, i0=0, i1=0, i2=0, i3=0;
18899 - char s_colors[256] = {'\0'};
18900 - if ((err = std::fscanf(file,"%u",&prim))!=1) stopflag=true;
18901 - else switch (prim) {
18902 - case 3: {
18903 - if ((err = std::fscanf(file,"%u%u%u%255[^\n]",&i0,&i1,&i2,s_colors))<3) stopflag = true;
18904 - else {
18905 - float c0=0.5, c1=0.5, c2=0.5;
18906 - std::sscanf(s_colors,"%f%f%f",&c0,&c1,&c2);
18907 - if (invert_faces) primitives.insert(CImg<tf>::vector(i0,i1,i2));
18908 - else primitives.insert(CImg<tf>::vector(i0,i2,i1));
18909 - colors.insert(CImg<tc>::vector((tc)(c0*255),(tc)(c1*255),(tc)(c2*255)));
18910 - }
18911 - } break;
18912 - case 4: {
18913 - if ((err = std::fscanf(file,"%u%u%u%u%255[^\n]",&i0,&i1,&i2,&i3,s_colors))<4) stopflag = true;
18914 - else {
18915 - float c0=0.5, c1=0.5, c2=0.5;
18916 - std::sscanf(s_colors,"%f%f%f",&c0,&c1,&c2);
18917 - if (invert_faces) primitives.insert(CImg<tf>::vector(i0,i1,i2,i3));
18918 - else primitives.insert(CImg<tf>::vector(i0,i3,i2,i1));
18919 - colors.insert(CImg<tc>::vector((tc)(c0*255),(tc)(c1*255),(tc)(c2*255),(tc)(c2*255)));
18920 - }
18921 - } break;
18922 - default: stopflag = true;
18923 - }
18924 - }
18925 - cimg::fclose(file);
18926 - cimg::warn(primitives.size!=nb_triangles,
18927 - "CImg<%s>::get_load_off() : File '%s' contained %u triangles instead of %u as claimed in the header.",
18928 - pixel_type(),filename,primitives.size,nb_triangles);
18929 - return points;
18930 - }
18931 -
18932 - //! In-place version of get_load_off()
18933 - template<typename tf,typename tc>
18934 - CImg& load_off(const char *const filename, CImgList<tf>& primitives, CImgList<tc>& colors, const bool invert_faces=false) {
18935 - return get_load_off(filename,primitives,colors,invert_faces).swap(*this);
18936 - }
18937 -
18938 - //! Save the image as a file.
18939 - /**
18940 - The used file format is defined by the file extension in the filename \p filename.\n
18941 - Parameter \p number can be used to add a 6-digit number to the filename before saving.\n
18942 - If \p normalize is true, a normalized version of the image (between [0,255]) is saved.
18943 - **/
18944 - const CImg& save(const char *const filename, const int number=-1) const {
18945 - if (is_empty()) throw CImgInstanceException("CImg<%s>::save() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
18946 - pixel_type(),width,height,depth,dim,data,filename);
18947 - if (!filename) throw CImgArgumentException("CImg<%s>::save() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).",
18948 - pixel_type(),width,height,depth,dim,data);
18949 - const char *ext = cimg::filename_split(filename);
18950 - char nfilename[1024];
18951 - const char *const fn = (number>=0)?cimg::filename_number(filename,number,6,nfilename):filename;
18952 - if (!cimg::strncasecmp(ext,"asc",3)) return save_ascii(fn);
18953 - if (!cimg::strncasecmp(ext,"dlm",3) ||
18954 - !cimg::strncasecmp(ext,"txt",3)) return save_dlm(fn);
18955 - if (!cimg::strncasecmp(ext,"inr",3)) return save_inr(fn);
18956 - if (!cimg::strncasecmp(ext,"hdr",3)) return save_analyze(fn);
18957 - if (!cimg::strncasecmp(ext,"dcm",3)) return save_dicom(fn);
18958 - if (!cimg::strncasecmp(ext,"pan",3)) return save_pandore(fn);
18959 - if (!cimg::strncasecmp(ext,"bmp",3)) return save_bmp(fn);
18960 - if (!cimg::strncasecmp(ext,"png",3)) return save_png(fn);
18961 - if (!cimg::strncasecmp(ext,"tif",3)) return save_tiff(fn);
18962 - if (!cimg::strncasecmp(ext,"jpg",3) ||
18963 - !cimg::strncasecmp(ext,"jpeg",4)) return save_jpeg(fn);
18964 - if (!cimg::strncasecmp(ext,"rgba",4)) return save_rgba(fn);
18965 - if (!cimg::strncasecmp(ext,"rgb",3)) return save_rgb(fn);
18966 - if (!cimg::strncasecmp(ext,"raw",3)) return save_raw(fn);
18967 - if (!cimg::strncasecmp(ext,"cimg",4) || ext[0]=='\0') return save_cimg(fn);
18968 - if (!cimg::strncasecmp(ext,"pgm",3) ||
18969 - !cimg::strncasecmp(ext,"ppm",3) ||
18970 - !cimg::strncasecmp(ext,"pnm",3)) return save_pnm(fn);
18971 - if (!cimg::strncasecmp(ext,"yuv",3)) return save_yuv(fn,true);
18972 - return save_other(fn);
18973 - }
18974 -
18975 - //! Save the image as an ASCII file (ASCII Raw + simple header).
18976 - const CImg& save_ascii(std::FILE *const file, const char *const filename=0) const {
18977 - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_ascii() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
18978 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
18979 - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_ascii() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
18980 - pixel_type(),width,height,depth,dim,data);
18981 - std::FILE *const nfile = file?file:cimg::fopen(filename,"w");
18982 - std::fprintf(nfile,"%u %u %u %u\n",width,height,depth,dim);
18983 - const T* ptrs = data;
18984 - cimg_forYZV(*this,y,z,v) {
18985 - cimg_forX(*this,x) std::fprintf(nfile,"%g ",(double)*(ptrs++));
18986 - std::fputc('\n',nfile);
18987 - }
18988 - if (!file) cimg::fclose(nfile);
18989 - return *this;
18990 - }
18991 -
18992 - //! Save the image as an ASCII file (ASCII Raw + simple header).
18993 - const CImg& save_ascii(const char *const filename) const {
18994 - return save_ascii(0,filename);
18995 - }
18996 -
18997 - //! Save the image as a DLM file.
18998 - const CImg& save_dlm(std::FILE *const file, const char *const filename=0) const {
18999 - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_dlm() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
19000 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19001 - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_dlm() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
19002 - pixel_type(),width,height,depth,dim,data);
19003 - cimg::warn(depth>1,
19004 - "CImg<%s>::save_dlm() : Instance image (%u,%u,%u,%u,%p) is volumetric. Pixel values along Z will be unrolled (file '%s').",
19005 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19006 - cimg::warn(dim>1,
19007 - "CImg<%s>::save_dlm() : Instance image (%u,%u,%u,%u,%p) is multispectral. Pixel values along V will be unrolled (file '%s').",
19008 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19009 -
19010 - std::FILE *const nfile = file?file:cimg::fopen(filename,"w");
19011 - const T* ptrs = data;
19012 - cimg_forYZV(*this,y,z,v) {
19013 - cimg_forX(*this,x) std::fprintf(nfile,"%g%s",(double)*(ptrs++),(x==(int)width-1)?"":",");
19014 - std::fputc('\n',nfile);
19015 - }
19016 - if (!file) cimg::fclose(nfile);
19017 - return *this;
19018 - }
19019 -
19020 - //! Save the image as a DLM file.
19021 - const CImg& save_dlm(const char *const filename) const {
19022 - return save_dlm(0,filename);
19023 - }
19024 -
19025 - //! Save the image as a PNM file.
19026 - const CImg& save_pnm(std::FILE *const file, const char *const filename=0) const {
19027 - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_pnm() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
19028 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19029 - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_pnm() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
19030 - pixel_type(),width,height,depth,dim,data);
19031 - const CImgStats st(*this,false);
19032 - cimg::warn(depth>1,
19033 - "CImg<%s>::save_pnm() : Instance image (%u,%u,%u,%u,%p) is volumetric. Only the first slice will be saved (file '%s').",
19034 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19035 - cimg::warn(dim>3,
19036 - "CImg<%s>::save_pnm() : Instance image (%u,%u,%u,%u,%p) is multispectral. Only the three first channels will be saved (file '%s').",
19037 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19038 - const double stmin = st.min, stmax = st.max;
19039 - cimg::warn(stmin<0 || stmax>65535,"CImg<%s>::save_pnm() : Instance image (%u,%u,%u,%u,%p) has pixel values in [%g,%g]. Probable type overflow (file '%s').",pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19040 - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
19041 - const T
19042 - *ptrR = ptr(0,0,0,0),
19043 - *ptrG = (dim>=2)?ptr(0,0,0,1):ptrR,
19044 - *ptrB = (dim>=3)?ptr(0,0,0,2):ptrR;
19045 - const unsigned int buf_size = width*height*(dim==1?1:3);
19046 -
19047 - std::fprintf(nfile,"P%c\n# CREATOR: CImg : Original size=%ux%ux%ux%u\n%u %u\n%u\n",
19048 - (dim==1?'5':'6'),width,height,depth,dim,width,height,(st.max)<256?255:65535);
19049 -
19050 - switch(dim) {
19051 - case 1: {
19052 - if ((st.max)<256) { // Binary PGM 8 bits
19053 - unsigned char *ptrd = new unsigned char[buf_size], *xptrd = ptrd;
19054 - cimg_forXY(*this,x,y) *(xptrd++) = (unsigned char)*(ptrR++);
19055 - cimg::fwrite(ptrd,buf_size,nfile);
19056 - delete[] ptrd;
19057 - } else { // Binary PGM 16 bits
19058 - unsigned short *ptrd = new unsigned short[buf_size], *xptrd = ptrd;
19059 - cimg_forXY(*this,x,y) *(xptrd++) = (unsigned short)*(ptrR++);
19060 - if (!cimg::endian()) cimg::endian_swap(ptrd,buf_size);
19061 - cimg::fwrite(ptrd,buf_size,nfile);
19062 - delete[] ptrd;
19063 - }
19064 - } break;
19065 - default: {
19066 - if ((st.max)<256) { // Binary PPM 8 bits
19067 - unsigned char *ptrd = new unsigned char[buf_size], *xptrd = ptrd;
19068 - cimg_forXY(*this,x,y) {
19069 - *(xptrd++) = (unsigned char)*(ptrR++);
19070 - *(xptrd++) = (unsigned char)*(ptrG++);
19071 - *(xptrd++) = (unsigned char)*(ptrB++);
19072 - }
19073 - cimg::fwrite(ptrd,buf_size,nfile);
19074 - delete[] ptrd;
19075 - } else { // Binary PPM 16 bits
19076 - unsigned short *ptrd = new unsigned short[buf_size], *xptrd = ptrd;
19077 - cimg_forXY(*this,x,y) {
19078 - *(xptrd++) = (unsigned short)*(ptrR++);
19079 - *(xptrd++) = (unsigned short)*(ptrG++);
19080 - *(xptrd++) = (unsigned short)*(ptrB++);
19081 - }
19082 - if (!cimg::endian()) cimg::endian_swap(ptrd,buf_size);
19083 - cimg::fwrite(ptrd,buf_size,nfile);
19084 - delete[] ptrd;
19085 - }
19086 - } break;
19087 - }
19088 - if (!file) cimg::fclose(nfile);
19089 - return *this;
19090 - }
19091 -
19092 - //! Save the image as a PNM file.
19093 - const CImg& save_pnm(const char *const filename) const {
19094 - return save_pnm(0,filename);
19095 - }
19096 -
19097 - //! Save an image as a Dicom file (need '(X)Medcon' : http://xmedcon.sourceforge.net )
19098 - const CImg& save_dicom(const char *const filename) const {
19099 - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_dicom() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
19100 - pixel_type(),width,height,depth,dim,data,filename);
19101 - if (!filename) throw CImgArgumentException("CImg<%s>::save_dicom() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).",
19102 - pixel_type(),width,height,depth,dim,data);
19103 - static bool first_time = true;
19104 - char command[1024], filetmp[512], body[512];
19105 - if (first_time) { std::srand((unsigned int)::time(0)); first_time = false; }
19106 - std::FILE *file;
19107 - do {
19108 - std::sprintf(filetmp,"CImg%.4d.hdr",std::rand()%10000);
19109 - if ((file=std::fopen(filetmp,"rb"))!=0) std::fclose(file);
19110 - } while (file);
19111 - save_analyze(filetmp);
19112 - std::sprintf(command,"%s -w -c dicom -o %s -f %s",cimg::medcon_path(),filename,filetmp);
19113 - cimg::system(command);
19114 - std::remove(filetmp);
19115 - cimg::filename_split(filetmp,body);
19116 - std::sprintf(filetmp,"%s.img",body);
19117 - std::remove(filetmp);
19118 - std::sprintf(command,"m000-%s",filename);
19119 - file = std::fopen(command,"rb");
19120 - if (!file) {
19121 - cimg::fclose(cimg::fopen(filename,"r"));
19122 - throw CImgIOException("CImg<%s>::save_dicom() : Failed to save image '%s'.\n\n"
19123 - "Path of 'medcon' : \"%s\"\n"
19124 - "Path of temporary filename : \"%s\"",
19125 - pixel_type(),filename,cimg::medcon_path(),filetmp);
19126 - } else cimg::fclose(file);
19127 - std::rename(command,filename);
19128 - return *this;
19129 - }
19130 -
19131 - //! Save the image as an ANALYZE7.5 file.
19132 - const CImg& save_analyze(const char *const filename, const float *const voxsize=0) const {
19133 - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_analyze() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
19134 - pixel_type(),width,height,depth,dim,data,filename);
19135 - if (!filename) throw CImgArgumentException("CImg<%s>::save_analyze() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).",
19136 - pixel_type(),width,height,depth,dim,data);
19137 - std::FILE *file;
19138 - char header[348],hname[1024],iname[1024];
19139 - const char *ext = cimg::filename_split(filename);
19140 - short datatype=-1;
19141 - std::memset(header,0,348);
19142 - if (!ext[0]) { std::sprintf(hname,"%s.hdr",filename); std::sprintf(iname,"%s.img",filename); }
19143 - if (!cimg::strncasecmp(ext,"hdr",3)) {
19144 - std::strcpy(hname,filename); std::strcpy(iname,filename); std::sprintf(iname+cimg::strlen(iname)-3,"img");
19145 - }
19146 - if (!cimg::strncasecmp(ext,"img",3)) {
19147 - std::strcpy(hname,filename); std::strcpy(iname,filename); std::sprintf(hname+cimg::strlen(iname)-3,"hdr");
19148 - }
19149 - ((int*)(header))[0] = 348;
19150 - std::sprintf(header+4,"CImg");
19151 - std::sprintf(header+14," ");
19152 - ((short*)(header+36))[0] = 4096;
19153 - ((char*)(header+38))[0] = 114;
19154 - ((short*)(header+40))[0] = 4;
19155 - ((short*)(header+40))[1] = width;
19156 - ((short*)(header+40))[2] = height;
19157 - ((short*)(header+40))[3] = depth;
19158 - ((short*)(header+40))[4] = dim;
19159 - if (!cimg::strcasecmp(pixel_type(),"bool")) datatype = 2;
19160 - if (!cimg::strcasecmp(pixel_type(),"unsigned char")) datatype = 2;
19161 - if (!cimg::strcasecmp(pixel_type(),"char")) datatype = 2;
19162 - if (!cimg::strcasecmp(pixel_type(),"unsigned short")) datatype = 4;
19163 - if (!cimg::strcasecmp(pixel_type(),"short")) datatype = 4;
19164 - if (!cimg::strcasecmp(pixel_type(),"unsigned int")) datatype = 8;
19165 - if (!cimg::strcasecmp(pixel_type(),"int")) datatype = 8;
19166 - if (!cimg::strcasecmp(pixel_type(),"unsigned long")) datatype = 8;
19167 - if (!cimg::strcasecmp(pixel_type(),"long")) datatype = 8;
19168 - if (!cimg::strcasecmp(pixel_type(),"float")) datatype = 16;
19169 - if (!cimg::strcasecmp(pixel_type(),"double")) datatype = 64;
19170 - if (datatype<0)
19171 - throw CImgIOException("CImg<%s>::save_analyze() : Cannot save image '%s' since pixel type (%s)"
19172 - "is not handled in Analyze7.5 specifications.\n",
19173 - pixel_type(),filename,pixel_type());
19174 - ((short*)(header+70))[0] = datatype;
19175 - ((short*)(header+72))[0] = sizeof(T);
19176 - ((float*)(header+112))[0] = 1;
19177 - ((float*)(header+76))[0] = 0;
19178 - if (voxsize) {
19179 - ((float*)(header+76))[1] = voxsize[0];
19180 - ((float*)(header+76))[2] = voxsize[1];
19181 - ((float*)(header+76))[3] = voxsize[2];
19182 - } else ((float*)(header+76))[1] = ((float*)(header+76))[2] = ((float*)(header+76))[3] = 1;
19183 - file = cimg::fopen(hname,"wb");
19184 - cimg::fwrite(header,348,file);
19185 - cimg::fclose(file);
19186 - file = cimg::fopen(iname,"wb");
19187 - cimg::fwrite(data,size(),file);
19188 - cimg::fclose(file);
19189 - return *this;
19190 - }
19191 -
19192 - //! Save the image as a CImg file (Binary RAW + simple header)
19193 - const CImg& save_cimg(std::FILE *const file, const char *const filename=0) const {
19194 - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_cimg() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
19195 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19196 - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_cimg() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
19197 - pixel_type(),width,height,depth,dim,data);
19198 - CImgList<T> tmp(1);
19199 - tmp[0].width = width;
19200 - tmp[0].height = height;
19201 - tmp[0].depth = depth;
19202 - tmp[0].dim = dim;
19203 - tmp[0].data = data;
19204 - tmp.save_cimg(file,filename);
19205 - tmp[0].width = tmp[0].height = tmp[0].depth = tmp[0].dim = 0;
19206 - tmp[0].data = 0;
19207 - return *this;
19208 - }
19209 -
19210 - //! Save the image as a CImg file (Binary RAW + simple header)
19211 - const CImg& save_cimg(const char *const filename) const {
19212 - return save_cimg(0,filename);
19213 - }
19214 -
19215 - //! Save the image as a RAW file
19216 - const CImg& save_raw(std::FILE *const file, const char *const filename=0, const bool multiplexed=false) const {
19217 - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_raw() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
19218 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19219 - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_raw() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
19220 - pixel_type(),width,height,depth,dim,data);
19221 - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
19222 - if (!multiplexed) cimg::fwrite(data,size(),nfile);
19223 - else {
19224 - CImg<T> buf(dim);
19225 - cimg_forXYZ(*this,x,y,z) {
19226 - cimg_forV(*this,k) buf[k] = (*this)(x,y,z,k);
19227 - cimg::fwrite(buf.data,dim,nfile);
19228 - }
19229 - }
19230 - if (!file) cimg::fclose(nfile);
19231 - return *this;
19232 - }
19233 -
19234 - //! Save the image as a RAW file
19235 - const CImg& save_raw(const char *const filename=0, const bool multiplexed=false) const {
19236 - return save_raw(0,filename,multiplexed);
19237 - }
19238 -
19239 - //! Save the image using ImageMagick's convert.
19240 - /** Function that saves the image for other file formats that are not natively handled by CImg,
19241 - using the tool 'convert' from the ImageMagick package.\n
19242 - This is the case for all compressed image formats (GIF,PNG,JPG,TIF,...). You need to install
19243 - the ImageMagick package in order to get
19244 - this function working properly (see http://www.imagemagick.org ).
19245 - **/
19246 - const CImg& save_imagemagick(const char *const filename, const unsigned int quality=100) const {
19247 - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_imagemagick() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s')",
19248 - pixel_type(),width,height,depth,dim,data,filename);
19249 - if (!filename) throw CImgArgumentException("CImg<%s>::save_imagemagick() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).",
19250 - pixel_type(),width,height,depth,dim,data);
19251 - static bool first_time = true;
19252 - char command[512],filetmp[512];
19253 - if (first_time) { std::srand((unsigned int)::time(0)); first_time = false; }
19254 - std::FILE *file;
19255 - do {
19256 - if (dim==1) std::sprintf(filetmp,"%s%sCImg%.4d.pgm",cimg::temporary_path(),cimg_OS==2?"\\":"/",std::rand()%10000);
19257 - else std::sprintf(filetmp,"%s%sCImg%.4d.ppm",cimg::temporary_path(),cimg_OS==2?"\\":"/",std::rand()%10000);
19258 - if ((file=std::fopen(filetmp,"rb"))!=0) std::fclose(file);
19259 - } while (file);
19260 - save_pnm(filetmp);
19261 - std::sprintf(command,"%s -quality %u%% %s \"%s\"",cimg::imagemagick_path(),quality,filetmp,filename);
19262 - cimg::system(command);
19263 - file = std::fopen(filename,"rb");
19264 - if (!file) throw CImgIOException("CImg<%s>::save_imagemagick() : Failed to save image '%s'.\n\n"
19265 - "Path of 'convert' : \"%s\"\n"
19266 - "Path of temporary filename : \"%s\"\n",
19267 - pixel_type(),filename,cimg::imagemagick_path(),filetmp);
19268 - if (file) cimg::fclose(file);
19269 - std::remove(filetmp);
19270 - return *this;
19271 - }
19272 -
19273 - //! Save the image using GraphicsMagick's gm.
19274 - /** Function that saves the image for other file formats that are not natively handled by CImg,
19275 - using the tool 'gm' from the GraphicsMagick package.\n
19276 - This is the case for all compressed image formats (GIF,PNG,JPG,TIF,...). You need to install
19277 - the GraphicsMagick package in order to get
19278 - this function working properly (see http://www.graphicsmagick.org ).
19279 - **/
19280 - const CImg& save_graphicsmagick(const char *const filename, const unsigned int quality=100) const {
19281 - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_graphicsmagick() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s')",
19282 - pixel_type(),width,height,depth,dim,data,filename);
19283 - if (!filename) throw CImgArgumentException("CImg<%s>::save_graphicsmagick() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).",
19284 - pixel_type(),width,height,depth,dim,data);
19285 - static bool first_time = true;
19286 - char command[512],filetmp[512];
19287 - if (first_time) { std::srand((unsigned int)::time(0)); first_time = false; }
19288 - std::FILE *file;
19289 - do {
19290 - if (dim==1) std::sprintf(filetmp,"%s%sCImg%.4d.pgm",cimg::temporary_path(),cimg_OS==2?"\\":"/",std::rand()%10000);
19291 - else std::sprintf(filetmp,"%s%sCImg%.4d.ppm",cimg::temporary_path(),cimg_OS==2?"\\":"/",std::rand()%10000);
19292 - if ((file=std::fopen(filetmp,"rb"))!=0) std::fclose(file);
19293 - } while (file);
19294 - save_pnm(filetmp);
19295 - std::sprintf(command,"%s -quality %u%% %s \"%s\"",cimg::graphicsmagick_path(),quality,filetmp,filename);
19296 - cimg::system(command);
19297 - file = std::fopen(filename,"rb");
19298 - if (!file) throw CImgIOException("CImg<%s>::save_graphicsmagick() : Failed to save image '%s'.\n\n"
19299 - "Path of 'gm' : \"%s\"\n"
19300 - "Path of temporary filename : \"%s\"\n",
19301 - pixel_type(),filename,cimg::graphicsmagick_path(),filetmp);
19302 - if (file) cimg::fclose(file);
19303 - std::remove(filetmp);
19304 - return *this;
19305 - }
19306 -
19307 - const CImg& save_other(const char *const filename, const unsigned int quality=100) const {
19308 - const unsigned int odebug = cimg::exception_mode();
19309 - bool is_saved = true;
19310 - cimg::exception_mode() = 0;
19311 - try { save_magick(filename); }
19312 - catch (CImgException&) {
19313 - try { save_imagemagick(filename,quality); }
19314 - catch (CImgException&) {
19315 - try { save_graphicsmagick(filename,quality); }
19316 - catch (CImgException&) {
19317 - is_saved = false;
19318 - }
19319 - }
19320 - }
19321 - cimg::exception_mode() = odebug;
19322 - if (!is_saved) throw CImgIOException("CImg<%s>::save_other() : File '%s' cannot be saved.\n"
19323 - "Check you have either the ImageMagick or GraphicsMagick package installed.",
19324 - pixel_type(),filename);
19325 - return *this;
19326 - }
19327 -
19328 - //! Save the image as an INRIMAGE-4 file.
19329 - const CImg& save_inr(std::FILE *const file, const char *const filename=0, const float *const voxsize=0) const {
19330 - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_inr() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
19331 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19332 - if (!filename) throw CImgArgumentException("CImg<%s>::save_inr() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
19333 - pixel_type(),width,height,depth,dim,data);
19334 - int inrpixsize=-1;
19335 - const char *inrtype = "unsigned fixed\nPIXSIZE=8 bits\nSCALE=2**0";
19336 - if (!cimg::strcasecmp(pixel_type(),"unsigned char")) { inrtype = "unsigned fixed\nPIXSIZE=8 bits\nSCALE=2**0"; inrpixsize = 1; }
19337 - if (!cimg::strcasecmp(pixel_type(),"char")) { inrtype = "fixed\nPIXSIZE=8 bits\nSCALE=2**0"; inrpixsize = 1; }
19338 - if (!cimg::strcasecmp(pixel_type(),"unsigned short")) { inrtype = "unsigned fixed\nPIXSIZE=16 bits\nSCALE=2**0";inrpixsize = 2; }
19339 - if (!cimg::strcasecmp(pixel_type(),"short")) { inrtype = "fixed\nPIXSIZE=16 bits\nSCALE=2**0"; inrpixsize = 2; }
19340 - if (!cimg::strcasecmp(pixel_type(),"unsigned int")) { inrtype = "unsigned fixed\nPIXSIZE=32 bits\nSCALE=2**0";inrpixsize = 4; }
19341 - if (!cimg::strcasecmp(pixel_type(),"int")) { inrtype = "fixed\nPIXSIZE=32 bits\nSCALE=2**0"; inrpixsize = 4; }
19342 - if (!cimg::strcasecmp(pixel_type(),"float")) { inrtype = "float\nPIXSIZE=32 bits"; inrpixsize = 4; }
19343 - if (!cimg::strcasecmp(pixel_type(),"double")) { inrtype = "float\nPIXSIZE=64 bits"; inrpixsize = 8; }
19344 - if (inrpixsize<=0) throw CImgIOException("CImg<%s>::save_inr() : Don't know how to save images of '%s'",pixel_type(),pixel_type());
19345 - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
19346 - char header[257];
19347 - int err = std::sprintf(header,"#INRIMAGE-4#{\nXDIM=%u\nYDIM=%u\nZDIM=%u\nVDIM=%u\n",width,height,depth,dim);
19348 - if (voxsize) err += std::sprintf(header+err,"VX=%g\nVY=%g\nVZ=%g\n",voxsize[0],voxsize[1],voxsize[2]);
19349 - err += std::sprintf(header+err,"TYPE=%s\nCPU=%s\n",inrtype,cimg::endian()?"sun":"decm");
19350 - std::memset(header+err,'\n',252-err);
19351 - std::memcpy(header+252,"##}\n",4);
19352 - cimg::fwrite(header,256,nfile);
19353 - cimg_forXYZ(*this,x,y,z) cimg_forV(*this,k) cimg::fwrite(&((*this)(x,y,z,k)),1,nfile);
19354 - if (!file) cimg::fclose(nfile);
19355 - return *this;
19356 - }
19357 -
19358 - //! Save the image as an INRIMAGE-4 file.
19359 - const CImg& save_inr(const char *const filename, const float *const voxsize=0) const {
19360 - return save_inr(0,filename,voxsize);
19361 - }
19362 -
19363 -#define cimg_save_pandore_case(sy,sz,sv,stype,id) \
19364 - if (!saved && (sy?(sy==height):true) && (sz?(sz==depth):true) && (sv?(sv==dim):true) && !strcmp(stype,pixel_type())) { \
19365 - unsigned int *iheader = (unsigned int*)(header+12); \
19366 - nbdims = _save_pandore_header_length((*iheader=id),dims,colorspace); \
19367 - cimg::fwrite(header,36,nfile); \
19368 - cimg::fwrite(dims,nbdims,nfile); \
19369 - if (id==2 || id==5 || id==8 || id==16 || id==19 || id==22 || id==26 || id==30) { \
19370 - unsigned char *buffer = new unsigned char[size()]; \
19371 - const T *ptrs = ptr(); \
19372 - cimg_foroff(*this,off) *(buffer++)=(unsigned char)(*(ptrs++)); \
19373 - buffer-=size(); \
19374 - cimg::fwrite(buffer,size(),nfile); \
19375 - delete[] buffer; \
19376 - } \
19377 - if (id==3 || id==6 || id==9 || id==17 || id==20 || id==23 || id==27 || id==31) { \
19378 - unsigned long *buffer = new unsigned long[size()]; \
19379 - const T *ptrs = ptr(); \
19380 - cimg_foroff(*this,off) *(buffer++)=(long)(*(ptrs++)); \
19381 - buffer-=size(); \
19382 - cimg::fwrite(buffer,size(),nfile); \
19383 - delete[] buffer; \
19384 - } \
19385 - if (id==4 || id==7 || id==10 || id==18 || id==21 || id==25 || id==29 || id==33) { \
19386 - float *buffer = new float[size()]; \
19387 - const T *ptrs = ptr(); \
19388 - cimg_foroff(*this,off) *(buffer++)=(float)(*(ptrs++)); \
19389 - buffer-=size(); \
19390 - cimg::fwrite(buffer,size(),nfile); \
19391 - delete[] buffer; \
19392 - } \
19393 - saved = true; \
19394 - }
19395 -
19396 - unsigned int _save_pandore_header_length(unsigned int id,unsigned int *dims,const unsigned int colorspace=0) const {
19397 - unsigned int nbdims=0;
19398 - if (id==2 || id==3 || id==4) { dims[0]=1; dims[1]=width; nbdims=2; }
19399 - if (id==5 || id==6 || id==7) { dims[0]=1; dims[1]=height; dims[2]=width; nbdims=3; }
19400 - if (id==8 || id==9 || id==10) { dims[0]=dim; dims[1]=depth; dims[2]=height; dims[3]=width; nbdims=4; }
19401 - if (id==16 || id==17 || id==18) { dims[0]=3; dims[1]=height; dims[2]=width; dims[3]=colorspace; nbdims=4; }
19402 - if (id==19 || id==20 || id==21) { dims[0]=3; dims[1]=depth; dims[2]=height; dims[3]=width; dims[4]=colorspace; nbdims=5; }
19403 - if (id==22 || id==23 || id==25) { dims[0]=dim; dims[1]=width; nbdims=2; }
19404 - if (id==26 || id==27 || id==29) { dims[0]=dim; dims[1]=height; dims[2]=width; nbdims=3; }
19405 - if (id==30 || id==31 || id==33) { dims[0]=dim; dims[1]=depth; dims[2]=height; dims[3]=width; nbdims=4; }
19406 - return nbdims;
19407 - }
19408 -
19409 - //! Save the image as a PANDORE-5 file.
19410 - const CImg& save_pandore(std::FILE *const file, const char *const filename=0, const unsigned int colorspace=0) const {
19411 - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_pandore() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
19412 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19413 - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_pandore() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
19414 - pixel_type(),width,height,depth,dim,data);
19415 - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
19416 - unsigned char header[36] = { 'P','A','N','D','O','R','E','0','4',0,0,0,
19417 - 0,0,0,0,
19418 - 'C','I','m','g',0,0,0,0,0,
19419 - 'N','o',' ','d','a','t','e',0,0,0,
19420 - 0 };
19421 - unsigned int nbdims,dims[5];
19422 - bool saved=false;
19423 - cimg_save_pandore_case(1,1,1,"unsigned char",2);
19424 - cimg_save_pandore_case(1,1,1,"char",3);
19425 - cimg_save_pandore_case(1,1,1,"short",3);
19426 - cimg_save_pandore_case(1,1,1,"unsigned short",3);
19427 - cimg_save_pandore_case(1,1,1,"unsigned int",3);
19428 - cimg_save_pandore_case(1,1,1,"int",3);
19429 - cimg_save_pandore_case(1,1,1,"unsigned long",4);
19430 - cimg_save_pandore_case(1,1,1,"long",3);
19431 - cimg_save_pandore_case(1,1,1,"float",4);
19432 - cimg_save_pandore_case(1,1,1,"double",4);
19433 -
19434 - cimg_save_pandore_case(0,1,1,"unsigned char",5);
19435 - cimg_save_pandore_case(0,1,1,"char",6);
19436 - cimg_save_pandore_case(0,1,1,"short",6);
19437 - cimg_save_pandore_case(0,1,1,"unsigned short",6);
19438 - cimg_save_pandore_case(0,1,1,"unsigned int",6);
19439 - cimg_save_pandore_case(0,1,1,"int",6);
19440 - cimg_save_pandore_case(0,1,1,"unsigned long",7);
19441 - cimg_save_pandore_case(0,1,1,"long",6);
19442 - cimg_save_pandore_case(0,1,1,"float",7);
19443 - cimg_save_pandore_case(0,1,1,"double",7);
19444 -
19445 - cimg_save_pandore_case(0,0,1,"unsigned char",8);
19446 - cimg_save_pandore_case(0,0,1,"char",9);
19447 - cimg_save_pandore_case(0,0,1,"short",9);
19448 - cimg_save_pandore_case(0,0,1,"unsigned short",9);
19449 - cimg_save_pandore_case(0,0,1,"unsigned int",9);
19450 - cimg_save_pandore_case(0,0,1,"int",9);
19451 - cimg_save_pandore_case(0,0,1,"unsigned long",10);
19452 - cimg_save_pandore_case(0,0,1,"long",9);
19453 - cimg_save_pandore_case(0,0,1,"float",10);
19454 - cimg_save_pandore_case(0,0,1,"double",10);
19455 -
19456 - cimg_save_pandore_case(0,1,3,"unsigned char",16);
19457 - cimg_save_pandore_case(0,1,3,"char",17);
19458 - cimg_save_pandore_case(0,1,3,"short",17);
19459 - cimg_save_pandore_case(0,1,3,"unsigned short",17);
19460 - cimg_save_pandore_case(0,1,3,"unsigned int",17);
19461 - cimg_save_pandore_case(0,1,3,"int",17);
19462 - cimg_save_pandore_case(0,1,3,"unsigned long",18);
19463 - cimg_save_pandore_case(0,1,3,"long",17);
19464 - cimg_save_pandore_case(0,1,3,"float",18);
19465 - cimg_save_pandore_case(0,1,3,"double",18);
19466 -
19467 - cimg_save_pandore_case(0,0,3,"unsigned char",19);
19468 - cimg_save_pandore_case(0,0,3,"char",20);
19469 - cimg_save_pandore_case(0,0,3,"short",20);
19470 - cimg_save_pandore_case(0,0,3,"unsigned short",20);
19471 - cimg_save_pandore_case(0,0,3,"unsigned int",20);
19472 - cimg_save_pandore_case(0,0,3,"int",20);
19473 - cimg_save_pandore_case(0,0,3,"unsigned long",21);
19474 - cimg_save_pandore_case(0,0,3,"long",20);
19475 - cimg_save_pandore_case(0,0,3,"float",21);
19476 - cimg_save_pandore_case(0,0,3,"double",21);
19477 -
19478 - cimg_save_pandore_case(1,1,0,"unsigned char",22);
19479 - cimg_save_pandore_case(1,1,0,"char",23);
19480 - cimg_save_pandore_case(1,1,0,"short",23);
19481 - cimg_save_pandore_case(1,1,0,"unsigned short",23);
19482 - cimg_save_pandore_case(1,1,0,"unsigned int",23);
19483 - cimg_save_pandore_case(1,1,0,"int",23);
19484 - cimg_save_pandore_case(1,1,0,"unsigned long",25);
19485 - cimg_save_pandore_case(1,1,0,"long",23);
19486 - cimg_save_pandore_case(1,1,0,"float",25);
19487 - cimg_save_pandore_case(1,1,0,"double",25);
19488 -
19489 - cimg_save_pandore_case(0,1,0,"unsigned char",26);
19490 - cimg_save_pandore_case(0,1,0,"char",27);
19491 - cimg_save_pandore_case(0,1,0,"short",27);
19492 - cimg_save_pandore_case(0,1,0,"unsigned short",27);
19493 - cimg_save_pandore_case(0,1,0,"unsigned int",27);
19494 - cimg_save_pandore_case(0,1,0,"int",27);
19495 - cimg_save_pandore_case(0,1,0,"unsigned long",29);
19496 - cimg_save_pandore_case(0,1,0,"long",27);
19497 - cimg_save_pandore_case(0,1,0,"float",29);
19498 - cimg_save_pandore_case(0,1,0,"double",29);
19499 -
19500 - cimg_save_pandore_case(0,0,0,"unsigned char",30);
19501 - cimg_save_pandore_case(0,0,0,"char",31);
19502 - cimg_save_pandore_case(0,0,0,"short",31);
19503 - cimg_save_pandore_case(0,0,0,"unsigned short",31);
19504 - cimg_save_pandore_case(0,0,0,"unsigned int",31);
19505 - cimg_save_pandore_case(0,0,0,"int",31);
19506 - cimg_save_pandore_case(0,0,0,"unsigned long",33);
19507 - cimg_save_pandore_case(0,0,0,"long",31);
19508 - cimg_save_pandore_case(0,0,0,"float",33);
19509 - cimg_save_pandore_case(0,0,0,"double",33);
19510 -
19511 - if (!file) cimg::fclose(nfile);
19512 - return *this;
19513 - }
19514 -
19515 - //! Save the image as a PANDORE-5 file.
19516 - const CImg& save_pandore(const char *const filename=0, const unsigned int colorspace=0) const {
19517 - return save_pandore(0,filename,colorspace);
19518 - }
19519 -
19520 - //! Save the image as a YUV video sequence file
19521 - const CImg& save_yuv(std::FILE *const file, const char *const filename=0, const bool rgb2yuv=true) const {
19522 - CImgList<T>(*this).save_yuv(file,filename,rgb2yuv);
19523 - return *this;
19524 - }
19525 -
19526 - //! Save the image as a YUV video sequence file
19527 - const CImg& save_yuv(const char *const filename, const bool rgb2yuv=true) const {
19528 - return save_yuv(0,filename,rgb2yuv);
19529 - }
19530 -
19531 - //! Save the image as a BMP file
19532 - const CImg& save_bmp(std::FILE *const file, const char *const filename=0) const {
19533 - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_bmp() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
19534 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19535 - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_bmp() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
19536 - pixel_type(),width,height,depth,dim,data);
19537 - cimg::warn(depth>1,
19538 - "CImg<%s>::save_bmp() : Instance image (%u,%u,%u,%u,%p) is volumetric. Only the first slice will be saved (file '%s').",
19539 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19540 - cimg::warn(dim>3,
19541 - "CImg<%s>::save_bmp() : Instance image (%u,%u,%u,%u,%p) is multispectral. Only the three first channels will be saved (file '%s').",
19542 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19543 -
19544 - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
19545 - unsigned char header[54]={0}, align_buf[4]={0};
19546 - const unsigned int
19547 - align = (4-(3*width)%4)%4,
19548 - buf_size = (3*width+align)*dimy(),
19549 - file_size = 54+buf_size;
19550 - header[0] = 'B'; header[1] = 'M';
19551 - header[0x02]=file_size&0xFF; header[0x03]=(file_size>>8)&0xFF;
19552 - header[0x04]=(file_size>>16)&0xFF; header[0x05]=(file_size>>24)&0xFF;
19553 - header[0x0A]=0x36;
19554 - header[0x0E]=0x28;
19555 - header[0x12]=width&0xFF; header[0x13]=(width>>8)&0xFF;
19556 - header[0x14]=(width>>16)&0xFF; header[0x15]=(width>>24)&0xFF;
19557 - header[0x16]=height&0xFF; header[0x17]=(height>>8)&0xFF;
19558 - header[0x18]=(height>>16)&0xFF; header[0x19]=(height>>24)&0xFF;
19559 - header[0x1A]=1; header[0x1B]=0;
19560 - header[0x1C]=24; header[0x1D]=0;
19561 - header[0x22]=buf_size&0xFF; header[0x23]=(buf_size>>8)&0xFF;
19562 - header[0x24]=(buf_size>>16)&0xFF; header[0x25]=(buf_size>>24)&0xFF;
19563 - header[0x27]=0x1; header[0x2B]=0x1;
19564 - cimg::fwrite(header,54,nfile);
19565 -
19566 - const T
19567 - *pR = ptr(0,height-1,0,0),
19568 - *pG = (dim>=2)?ptr(0,height-1,0,1):pR,
19569 - *pB = (dim>=3)?ptr(0,height-1,0,2):pR;
19570 -
19571 - cimg_forY(*this,y) {
19572 - cimg_forX(*this,x) {
19573 - std::fputc((unsigned char)(*(pB++)),nfile);
19574 - std::fputc((unsigned char)(*(pG++)),nfile);
19575 - std::fputc((unsigned char)(*(pR++)),nfile);
19576 - }
19577 - cimg::fwrite(align_buf,align,nfile);
19578 - pR-=2*width; pG-=2*width; pB-=2*width;
19579 - }
19580 - if (!file) cimg::fclose(nfile);
19581 - return *this;
19582 - }
19583 -
19584 - //! Save the image as a BMP file
19585 - const CImg& save_bmp(const char *const filename) const {
19586 - return save_bmp(0,filename);
19587 - }
19588 -
19589 - //! Save an image to a PNG file.
19590 - // Most of this function has been written by Eric Fausett
19591 - /**
19592 - \param filename = name of the png image file to save
19593 - \return *this
19594 - \note The png format specifies a variety of possible data formats. Grey scale, Grey
19595 - scale with Alpha, RGB color, RGB color with Alpha, and Palletized color are supported.
19596 - Per channel bit depths of 1, 2, 4, 8, and 16 are natively supported. The
19597 - type of file saved depends on the number of channels in the CImg file. If there is 4 or more
19598 - channels, the image will be saved as an RGB color with Alpha image using the bottom 4 channels.
19599 - If there are 3 channels, the saved image will be an RGB color image. If 2 channels then the
19600 - image saved will be Grey scale with Alpha, and if 1 channel will be saved as a Grey scale
19601 - image.
19602 - **/
19603 - const CImg& save_png(std::FILE *const file, const char *const filename=0) const {
19604 - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_png() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
19605 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19606 - if (!filename) throw CImgArgumentException("CImg<%s>::save_png() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).",
19607 - pixel_type(),width,height,depth,dim,data);
19608 - cimg::warn(depth>1,
19609 - "CImg<%s>::save_png() : Instance image (%u,%u,%u,%u,%p) is volumetric. Only the first slice will be saved (file '%s').",
19610 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19611 -#ifndef cimg_use_png
19612 - if (!file) return save_other(filename);
19613 - else throw CImgIOException("CImg<%s>::save_png() : Cannot save a PNG image in a *FILE output. Use libpng instead.",
19614 - pixel_type());
19615 -#else
19616 - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
19617 -
19618 - // Setup PNG structures for write
19619 - png_voidp user_error_ptr=0;
19620 - png_error_ptr user_error_fn=0, user_warning_fn=0;
19621 - png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,
19622 - user_error_ptr, user_error_fn, user_warning_fn);
19623 - if(!png_ptr){
19624 - if (!file) cimg::fclose(nfile);
19625 - throw CImgIOException("CImg<%s>::save_png() : File '%s', error when initializing 'png_ptr' data structure.",
19626 - pixel_type(),filename?filename:"(unknown)");
19627 - }
19628 - png_infop info_ptr = png_create_info_struct(png_ptr);
19629 - if(!info_ptr){
19630 - png_destroy_write_struct(&png_ptr,(png_infopp)0);
19631 - if (!file) cimg::fclose(nfile);
19632 - throw CImgIOException("CImg<%s>::save_png() : File '%s', error when initializing 'info_ptr' data structure.",
19633 - pixel_type(),filename?filename:"(unknown)");
19634 - }
19635 - if (setjmp(png_jmpbuf(png_ptr))){
19636 - png_destroy_write_struct(&png_ptr, &info_ptr);
19637 - if (!file) cimg::fclose(nfile);
19638 - throw CImgIOException("CImg<%s>::save_png() : File '%s', unknown fatal error.",
19639 - pixel_type(),filename?filename:"(unknown)");
19640 - }
19641 -
19642 - png_init_io(png_ptr, nfile);
19643 - png_uint_32 width = dimx();
19644 - png_uint_32 height = dimy();
19645 - const CImgStats stats(*this,false);
19646 - const float vmin = (float)stats.min, vmax = (float)stats.max;
19647 - const int bit_depth = (vmin<0 || vmax>=256)?16:8;
19648 - int color_type;
19649 - switch (dimv()) {
19650 - case 1: color_type = PNG_COLOR_TYPE_GRAY; break;
19651 - case 2: color_type = PNG_COLOR_TYPE_GRAY_ALPHA; break;
19652 - case 3: color_type = PNG_COLOR_TYPE_RGB; break;
19653 - default: color_type = PNG_COLOR_TYPE_RGB_ALPHA;
19654 - }
19655 - const int interlace_type = PNG_INTERLACE_NONE;
19656 - const int compression_type = PNG_COMPRESSION_TYPE_DEFAULT;
19657 - const int filter_method = PNG_FILTER_TYPE_DEFAULT;
19658 - png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, color_type, interlace_type,
19659 - compression_type, filter_method);
19660 - png_write_info(png_ptr, info_ptr);
19661 - const int byte_depth = bit_depth>>3;
19662 - const int numChan = dimv()>4?4:dimv();
19663 - const int pixel_bit_depth_flag = numChan * (bit_depth-1);
19664 -
19665 - // Allocate Memory for Image Save and Fill pixel data
19666 - png_bytep *imgData = new png_byte*[height];
19667 - for(unsigned int row=0; row<height; row++) imgData[row] = new png_byte[byte_depth * numChan * width];
19668 - const T *pC0 = ptr(0,0,0,0);
19669 - switch(pixel_bit_depth_flag) {
19670 - case 7 : { // Gray 8-bit
19671 - cimg_forY(*this,y) {
19672 - unsigned char *ptrs = imgData[y];
19673 - cimg_forX(*this,x) *(ptrs++) = (unsigned char)*(pC0++);
19674 - }
19675 - } break;
19676 - case 14: { // Gray w/ Alpha 8-bit
19677 - const T *pC1 = ptr(0,0,0,1);
19678 - cimg_forY(*this,y) {
19679 - unsigned char *ptrs = imgData[y];
19680 - cimg_forX(*this,x) {
19681 - *(ptrs++) = (unsigned char)*(pC0++);
19682 - *(ptrs++) = (unsigned char)*(pC1++);
19683 - }
19684 - }
19685 - } break;
19686 - case 21: { // RGB 8-bit
19687 - const T *pC1 = ptr(0,0,0,1);
19688 - const T *pC2 = ptr(0,0,0,2);
19689 - cimg_forY(*this,y) {
19690 - unsigned char *ptrs = imgData[y];
19691 - cimg_forX(*this,x) {
19692 - *(ptrs++) = (unsigned char)*(pC0++);
19693 - *(ptrs++) = (unsigned char)*(pC1++);
19694 - *(ptrs++) = (unsigned char)*(pC2++);
19695 - }
19696 - }
19697 - } break;
19698 - case 28: { // RGB x/ Alpha 8-bit
19699 - const T *pC1 = ptr(0,0,0,1);
19700 - const T *pC2 = ptr(0,0,0,2);
19701 - const T *pC3 = ptr(0,0,0,3);
19702 - cimg_forY(*this,y){
19703 - unsigned char *ptrs = imgData[y];
19704 - cimg_forX(*this,x){
19705 - *(ptrs++) = (unsigned char)*(pC0++);
19706 - *(ptrs++) = (unsigned char)*(pC1++);
19707 - *(ptrs++) = (unsigned char)*(pC2++);
19708 - *(ptrs++) = (unsigned char)*(pC3++);
19709 - }
19710 - }
19711 - } break;
19712 - case 15: { // Gray 16-bit
19713 - cimg_forY(*this,y){
19714 - unsigned short *ptrs = reinterpret_cast<unsigned short*>(imgData[y]);
19715 - cimg_forX(*this,x) *(ptrs++) = (unsigned short)*(pC0++);
19716 - }
19717 - } break;
19718 - case 30: { // Gray w/ Alpha 16-bit
19719 - const T *pC1 = ptr(0,0,0,1);
19720 - cimg_forY(*this,y){
19721 - unsigned short *ptrs = reinterpret_cast<unsigned short*>(imgData[y]);
19722 - cimg_forX(*this,x) {
19723 - *(ptrs++) = (unsigned short)*(pC0++);
19724 - *(ptrs++) = (unsigned short)*(pC1++);
19725 - }
19726 - }
19727 - } break;
19728 - case 45: { // RGB 16-bit
19729 - const T *pC1 = ptr(0,0,0,1);
19730 - const T *pC2 = ptr(0,0,0,2);
19731 - cimg_forY(*this,y) {
19732 - unsigned short *ptrs = reinterpret_cast<unsigned short*>(imgData[y]);
19733 - cimg_forX(*this,x) {
19734 - *(ptrs++) = (unsigned short)*(pC0++);
19735 - *(ptrs++) = (unsigned short)*(pC1++);
19736 - *(ptrs++) = (unsigned short)*(pC2++);
19737 - }
19738 - }
19739 - } break;
19740 - case 60: { // RGB w/ Alpha 16-bit
19741 - const T *pC1 = ptr(0,0,0,1);
19742 - const T *pC2 = ptr(0,0,0,2);
19743 - const T *pC3 = ptr(0,0,0,3);
19744 - cimg_forY(*this,y) {
19745 - unsigned short *ptrs = reinterpret_cast<unsigned short*>(imgData[y]);
19746 - cimg_forX(*this,x) {
19747 - *(ptrs++) = (unsigned short)*(pC0++);
19748 - *(ptrs++) = (unsigned short)*(pC1++);
19749 - *(ptrs++) = (unsigned short)*(pC2++);
19750 - *(ptrs++) = (unsigned short)*(pC3++);
19751 - }
19752 - }
19753 - } break;
19754 - default:
19755 - if (!file) cimg::fclose(nfile);
19756 - throw CImgIOException("CImg<%s>::save_png() : File '%s', unknown fatal error.",
19757 - pixel_type(),filename?filename:"(unknown)");
19758 - break;
19759 - }
19760 - png_write_image(png_ptr, imgData);
19761 - png_write_end(png_ptr, info_ptr);
19762 - png_destroy_write_struct(&png_ptr, &info_ptr);
19763 -
19764 - // Deallocate Image Write Memory
19765 - for (unsigned int n=0; n<height; n++) delete[] imgData[n];
19766 - delete[] imgData;
19767 - if (!file) cimg::fclose(nfile);
19768 - return *this;
19769 -#endif
19770 - }
19771 -
19772 - //! Save a file in PNG format
19773 - const CImg& save_png(const char *const filename) const {
19774 - return save_png(0,filename);
19775 - }
19776 -
19777 - //! Save a file in TIFF format.
19778 - const CImg& save_tiff(const char *const filename) const {
19779 - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_tiff() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
19780 - pixel_type(),width,height,depth,dim,data,filename);
19781 - if (!filename) throw CImgArgumentException("CImg<%s>::save_tiff() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).",
19782 - pixel_type(),width,height,depth,dim,data);
19783 -#ifdef cimg_use_tiff
19784 - uint32 rowsperstrip = (uint32) -1;
19785 - uint16 spp = dimv(), bpp = sizeof(T)*8;
19786 - uint16 photometric;
19787 - if (spp==3 || spp==4)
19788 - photometric = PHOTOMETRIC_RGB;
19789 - else
19790 - photometric = PHOTOMETRIC_MINISBLACK;
19791 - uint16 compression = COMPRESSION_NONE;
19792 - TIFF *out;
19793 - out = TIFFOpen(filename,"w");
19794 - if (out) {
19795 - for (unsigned int dir=0; dir<depth; dir++) {
19796 - TIFFSetField(out, TIFFTAG_IMAGEWIDTH, (uint32)dimx());
19797 - TIFFSetField(out, TIFFTAG_IMAGELENGTH, (uint32)dimy());
19798 - TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
19799 - TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, spp);
19800 - TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, bpp);
19801 - TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
19802 - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photometric);
19803 - TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
19804 - rowsperstrip = TIFFDefaultStripSize(out, rowsperstrip);
19805 - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, rowsperstrip);
19806 - TIFFSetField(out, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB);
19807 - TIFFSetField(out, TIFFTAG_SOFTWARE, "CImg");
19808 - T *buf = (T *)_TIFFmalloc(TIFFStripSize(out));
19809 - if (buf){
19810 - for (unsigned int row = 0; row < height; row+=rowsperstrip) {
19811 - uint32 nrow = (row+rowsperstrip>height?height-row:rowsperstrip);
19812 - tstrip_t strip = TIFFComputeStrip(out, row, 0);
19813 - tsize_t i = 0;
19814 - for (unsigned int rr=0; rr<nrow; rr++)
19815 - for (unsigned int cc=0;cc<width;cc++)
19816 - for (unsigned int vv=0;vv<spp;vv++)
19817 - buf[i++] = (*this)(cc,row+rr,dir,vv);
19818 - if(TIFFWriteEncodedStrip(out, strip, buf, i*sizeof(T))<0){
19819 - throw CImgException("CImg<%s>::get_save_tiff() : File '%s', an error occure while writing a strip.",
19820 - pixel_type(),filename?filename:"(FILE*)");
19821 - }
19822 - }
19823 - _TIFFfree(buf);
19824 - }
19825 - TIFFWriteDirectory(out);
19826 - }
19827 - TIFFClose(out);
19828 - }
19829 - else throw CImgException("CImg<%s>::save_tiff() : File '%s', error while writing tiff file.",
19830 - pixel_type(),filename);
19831 -#else
19832 - return save_other(filename);
19833 -#endif
19834 - return *this;
19835 - }
19836 -
19837 - //! Save a file in JPEG format.
19838 - const CImg<T>& save_jpeg(std::FILE *const file, const char *const filename=0, const unsigned int quality=100) const {
19839 - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_jpeg() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
19840 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19841 - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_jpeg() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).",
19842 - pixel_type(),width,height,depth,dim,data);
19843 - cimg::warn(depth>1,
19844 - "CImg<%s>::save_jpeg() : Instance image (%u,%u,%u,%u,%p) is volumetric. Only the first slice will be saved (file '%s').",
19845 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19846 -#ifndef cimg_use_jpeg
19847 - if (!file) return save_other(filename,quality);
19848 - else throw CImgIOException("CImg<%s>::save_jpeg() : Cannot save a JPEG image in a *FILE output. Use libjpeg instead.",
19849 - pixel_type());
19850 -#else
19851 -
19852 - // Fill pixel buffer
19853 - unsigned char *buf;
19854 - unsigned int dimbuf=0;
19855 - J_COLOR_SPACE colortype=JCS_RGB;
19856 - switch (dim) {
19857 - case 1: { // Greyscale images
19858 - unsigned char *buf2 = buf = new unsigned char[width*height*(dimbuf=1)];
19859 - colortype = JCS_GRAYSCALE;
19860 - const T *ptr_g = ptr();
19861 - cimg_forXY(*this,x,y) *(buf2++) = (unsigned char)*(ptr_g++);
19862 - } break;
19863 - case 2:
19864 - case 3: { // RGB images
19865 - unsigned char *buf2 = buf = new unsigned char[width*height*(dimbuf=3)];
19866 - const T *ptr_r = ptr(0,0,0,0), *ptr_g = ptr(0,0,0,1), *ptr_b = ptr(0,0,0,dim>2?2:0);
19867 - colortype = JCS_RGB;
19868 - cimg_forXY(*this,x,y) {
19869 - *(buf2++) = (unsigned char)*(ptr_r++);
19870 - *(buf2++) = (unsigned char)*(ptr_g++);
19871 - *(buf2++) = (unsigned char)*(ptr_b++);
19872 - }
19873 - } break;
19874 - default: { // YCMYK images
19875 - unsigned char *buf2 = buf = new unsigned char[width*height*(dimbuf=4)];
19876 - const T *ptr_r = ptr(0,0,0,0), *ptr_g = ptr(0,0,0,1), *ptr_b = ptr(0,0,0,2), *ptr_a = ptr(0,0,0,3);
19877 - colortype = JCS_CMYK;
19878 - cimg_forXY(*this,x,y) {
19879 - *(buf2++) = (unsigned char)*(ptr_r++);
19880 - *(buf2++) = (unsigned char)*(ptr_g++);
19881 - *(buf2++) = (unsigned char)*(ptr_b++);
19882 - *(buf2++) = (unsigned char)*(ptr_a++);
19883 - }
19884 - } break;
19885 - }
19886 -
19887 - // Call libjpeg functions
19888 - struct jpeg_compress_struct cinfo;
19889 - struct jpeg_error_mgr jerr;
19890 - cinfo.err = jpeg_std_error(&jerr);
19891 - jpeg_create_compress(&cinfo);
19892 - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
19893 - jpeg_stdio_dest(&cinfo,nfile);
19894 - cinfo.image_width = width;
19895 - cinfo.image_height = height;
19896 - cinfo.input_components = dimbuf;
19897 - cinfo.in_color_space = colortype;
19898 - jpeg_set_defaults(&cinfo);
19899 - jpeg_set_quality(&cinfo,quality<100?quality:100,TRUE);
19900 - jpeg_start_compress(&cinfo,TRUE);
19901 -
19902 - const unsigned int row_stride = width*dimbuf;
19903 - JSAMPROW row_pointer[1];
19904 - while (cinfo.next_scanline < cinfo.image_height) {
19905 - row_pointer[0] = &buf[cinfo.next_scanline*row_stride];
19906 - jpeg_write_scanlines(&cinfo,row_pointer,1);
19907 - }
19908 - jpeg_finish_compress(&cinfo);
19909 -
19910 - delete[] buf;
19911 - if (!file) cimg::fclose(nfile);
19912 - jpeg_destroy_compress(&cinfo);
19913 - return *this;
19914 -#endif
19915 - }
19916 -
19917 - //! Save a file in JPEG format.
19918 - const CImg<T>& save_jpeg(const char *const filename, const unsigned int quality=100) const {
19919 - return save_jpeg(0,filename,quality);
19920 - }
19921 -
19922 - //! Save the image using built-in ImageMagick++ library
19923 - const CImg& save_magick(const char *const filename) const {
19924 - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_magick() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
19925 - pixel_type(),width,height,depth,dim,data);
19926 - if (!filename) throw CImgArgumentException("CImg<%s>::save_magick() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
19927 - pixel_type(),width,height,depth,dim,data);
19928 -#ifdef cimg_use_magick
19929 - Magick::Image image(Magick::Geometry(width,height),"black");
19930 - image.type(Magick::TrueColorType);
19931 - const T *rdata = ptr(0,0,0,0), *gdata = dim>1?ptr(0,0,0,1):rdata, *bdata = dim>2?ptr(0,0,0,2):gdata;
19932 - cimg_forXY(*this,x,y) image.pixelColor(x,y,Magick::ColorRGB(*(rdata++)/255.0,*(gdata++)/255.0,*(bdata++)/255.0));
19933 - image.syncPixels();
19934 - image.write(filename);
19935 -#else
19936 - throw CImgIOException("CImg<%s>::save_magick() : File '%s', Magick++ library has not been linked.",
19937 - pixel_type(),filename);
19938 -#endif
19939 - return *this;
19940 - }
19941 -
19942 - //! Save the image as a RGBA file
19943 - const CImg& save_rgba(std::FILE *const file, const char *const filename=0) const {
19944 - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_rgba() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
19945 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19946 - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_rgba() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
19947 - pixel_type(),width,height,depth,dim,data);
19948 - cimg::warn(dim!=4,
19949 - "CImg<%s>::save_rgba() : Instance image (%u,%u,%u,%u,%p) has not exactly 4 channels (file '%s').",
19950 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19951 - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
19952 - const unsigned int wh = width*height;
19953 - unsigned char *buffer = new unsigned char[4*wh], *nbuffer=buffer;
19954 - const T
19955 - *ptr1 = ptr(0,0,0,0),
19956 - *ptr2 = dim>1?ptr(0,0,0,1):ptr1,
19957 - *ptr3 = dim>2?ptr(0,0,0,2):ptr1,
19958 - *ptr4 = dim>3?ptr(0,0,0,3):0;
19959 - for (unsigned int k=0; k<wh; k++) {
19960 - *(nbuffer++) = (unsigned char)(*(ptr1++));
19961 - *(nbuffer++) = (unsigned char)(*(ptr2++));
19962 - *(nbuffer++) = (unsigned char)(*(ptr3++));
19963 - *(nbuffer++) = (unsigned char)(ptr4?(*(ptr4++)):255);
19964 - }
19965 - cimg::fwrite(buffer,4*wh,nfile);
19966 - if (!file) cimg::fclose(nfile);
19967 - delete[] buffer;
19968 - return *this;
19969 - }
19970 -
19971 - //! Save the image as a RGBA file
19972 - const CImg& save_rgba(const char *const filename) const {
19973 - return save_rgba(0,filename);
19974 - }
19975 -
19976 - //! Save the image as a RGB file
19977 - const CImg& save_rgb(std::FILE *const file, const char *const filename=0) const {
19978 - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_rgb() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
19979 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19980 - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_rgb() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
19981 - pixel_type(),width,height,depth,dim,data);
19982 - cimg::warn(dim!=3,
19983 - "CImg<%s>::save_rgb() : Instance image (%u,%u,%u,%u,%p) has not exactly 3 channels (file '%s').",
19984 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
19985 - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
19986 - const unsigned int wh = width*height;
19987 - unsigned char *buffer = new unsigned char[3*wh], *nbuffer=buffer;
19988 - const T
19989 - *ptr1 = ptr(0,0,0,0),
19990 - *ptr2 = dim>1?ptr(0,0,0,1):ptr1,
19991 - *ptr3 = dim>2?ptr(0,0,0,2):ptr1;
19992 - for (unsigned int k=0; k<wh; k++) {
19993 - *(nbuffer++) = (unsigned char)(*(ptr1++));
19994 - *(nbuffer++) = (unsigned char)(*(ptr2++));
19995 - *(nbuffer++) = (unsigned char)(*(ptr3++));
19996 - }
19997 - cimg::fwrite(buffer,3*wh,nfile);
19998 - if (!file) cimg::fclose(nfile);
19999 - delete[] buffer;
20000 - return *this;
20001 - }
20002 -
20003 - //! Save the image as a RGB file
20004 - const CImg& save_rgb(const char *const filename) const {
20005 - return save_rgb(0,filename);
20006 - }
20007 -
20008 - //! Get a 40x38 color logo of a 'danger' item
20009 - static CImg get_logo40x38() {
20010 - static bool first_time = true;
20011 - static CImg<T> res(40,38,1,3);
20012 - if (first_time) {
20013 - const unsigned char *ptrs = cimg::logo40x38;
20014 - T *ptr1 = res.ptr(0,0,0,0), *ptr2 = res.ptr(0,0,0,1), *ptr3 = res.ptr(0,0,0,2);
20015 - for (unsigned int off = 0; off<res.width*res.height;) {
20016 - const unsigned char n = *(ptrs++), r = *(ptrs++), g = *(ptrs++), b = *(ptrs++);
20017 - for (unsigned int l=0; l<n; off++,l++) { *(ptr1++) = (T)r; *(ptr2++) = (T)g; *(ptr3++) = (T)b; }
20018 - }
20019 - first_time = false;
20020 - }
20021 - return res;
20022 - }
20023 -
20024 - //! Save OFF files (GeomView 3D object files)
20025 - template<typename tf, typename tc>
20026 - const CImg& save_off(std::FILE *const file, const char *const filename,
20027 - const CImgList<tf>& primitives, const CImgList<tc>& colors, const bool invert_faces=false) const {
20028 - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_off() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
20029 - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
20030 - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_off() : Specified filename is (null).",pixel_type());
20031 - std::FILE *const nfile = file?file:cimg::fopen(filename,"w");
20032 - std::fprintf(nfile,"OFF\n%u %u %u\n",width,primitives.size,3*primitives.size);
20033 - cimg_forX(*this,i) std::fprintf(nfile,"%f %f %f\n",(float)((*this)(i,0)),(float)((*this)(i,1)),(float)((*this)(i,2)));
20034 - cimglist_for(primitives,l) {
20035 - const unsigned int prim = primitives[l].size();
20036 - switch (prim) {
20037 - case 3: {
20038 - if (invert_faces)
20039 - std::fprintf(nfile,"3 %u %u %u %f %f %f\n",
20040 - (unsigned int)primitives(l,0),(unsigned int)primitives(l,1),(unsigned int)primitives(l,2),
20041 - (float)(colors(l,0)/255.0f),(float)(colors(l,1)/255.0f),(float)(colors(l,2)/255.0f));
20042 - else
20043 - std::fprintf(nfile,"3 %u %u %u %f %f %f\n",
20044 - (unsigned int)primitives(l,0),(unsigned int)primitives(l,2),(unsigned int)primitives(l,1),
20045 - (float)(colors(l,0)/255.0f),(float)(colors(l,1)/255.0f),(float)(colors(l,2)/255.0f));
20046 - } break;
20047 - case 4: {
20048 - if (invert_faces)
20049 - std::fprintf(nfile,"4 %u %u %u %u %f %f %f\n",
20050 - (unsigned int)primitives(l,0),(unsigned int)primitives(l,1),(unsigned int)primitives(l,2),(unsigned int)primitives(l,3),
20051 - (float)(colors(l,0)/255.0f),(float)(colors(l,1)/255.0f),(float)(colors(l,2)/255.0f));
20052 - else
20053 - std::fprintf(nfile,"4 %u %u %u %u %f %f %f\n",
20054 - (unsigned int)primitives(l,0),(unsigned int)primitives(l,3),(unsigned int)primitives(l,2),(unsigned int)primitives(l,1),
20055 - (float)(colors(l,0)/255.0f),(float)(colors(l,1)/255.0f),(float)(colors(l,2)/255.0f));
20056 - } break;
20057 - }
20058 - }
20059 - if (!file) cimg::fclose(nfile);
20060 - return *this;
20061 - }
20062 -
20063 - //! Save OFF files (GeomView 3D object files)
20064 - template<typename tf, typename tc>
20065 - const CImg& save_off(const char *const filename,
20066 - const CImgList<tf>& primitives, const CImgList<tc>& colors, const bool invert_faces=false) const {
20067 - return save_off(filename,primitives,colors,invert_faces);
20068 - }
20069 -
20070 - };
20071 -
20072 -
20073 - /*
20074 - #-----------------------------------------
20075 - #
20076 - #
20077 - #
20078 - # Definition of the CImgList<> structure
20079 - #
20080 - #
20081 - #
20082 - #------------------------------------------
20083 - */
20084 -
20085 - //! Class representing list of images CImg<T>.
20086 - template<typename T> struct CImgList {
20087 -
20088 - //! Size of the list (number of elements inside)
20089 - unsigned int size;
20090 -
20091 - //! Allocation size of the list
20092 - unsigned int allocsize;
20093 -
20094 - //! Pointer to the first list element
20095 - CImg<T> *data;
20096 -
20097 - //! Define a CImgList<T>::iterator
20098 - typedef CImg<T>* iterator;
20099 -
20100 - //! Define a CImgList<T>::const_iterator
20101 - typedef const CImg<T>* const_iterator;
20102 -
20103 - //! Get value type
20104 - typedef T value_type;
20105 -
20106 - //@}
20107 - //---------------------------
20108 - //
20109 - //! \name Plugins
20110 - //@{
20111 - //---------------------------
20112 -#ifdef cimglist_plugin
20113 -#include cimglist_plugin
20114 -#endif
20115 - //@}
20116 -
20117 - //------------------------------------------
20118 - //
20119 - //! \name Constructors - Destructor - Copy
20120 - //@{
20121 - //------------------------------------------
20122 -
20123 - //! Default constructor
20124 - CImgList():
20125 - size(0),allocsize(0),data(0) {}
20126 -
20127 - //! Destructor
20128 - ~CImgList() {
20129 - if (data) delete[] data;
20130 - }
20131 -
20132 - //! In-place version of the default constructor and default destructor
20133 - CImgList& assign() {
20134 - if (data) delete[] data;
20135 - size = allocsize = 0;
20136 - data = 0;
20137 - return *this;
20138 - }
20139 -
20140 - //! Equivalent to assign() (STL-compliant name)
20141 - CImgList& clear() {
20142 - return assign();
20143 - }
20144 -
20145 - //! Copy constructor
20146 - template<typename t> CImgList(const CImgList<t>& list):
20147 - size(0),allocsize(0),data(0) {
20148 - assign(list);
20149 - }
20150 -
20151 - CImgList(const CImgList& list):
20152 - size(0),allocsize(0),data(0) {
20153 - assign(list);
20154 - }
20155 -
20156 - //! Copy constructor that create a shared object
20157 - template<typename t> CImgList(const CImgList<t>& list, const bool shared):
20158 - size(0),allocsize(0),data(0) {
20159 - assign(list,shared);
20160 - }
20161 -
20162 - CImgList(const CImgList& list, const bool shared):
20163 - size(0),allocsize(0),data(0) {
20164 - assign(list,shared);
20165 - }
20166 -
20167 - //! In-place version of the copy constructor
20168 - template<typename t> CImgList& assign(const CImgList<t>& list, const bool shared=false) {
20169 - assign(list.size);
20170 - cimglist_for(*this,l) (*this)[l].assign(list[l],shared);
20171 - return *this;
20172 - }
20173 -
20174 - //! Construct an image list containing n empty images
20175 - explicit CImgList(const unsigned int n):
20176 - size(n) {
20177 - data = new CImg<T>[allocsize=cimg::nearest_pow2(n)];
20178 - }
20179 -
20180 - //! In-place version of the previous constructor
20181 - CImgList& assign(const unsigned int n) {
20182 - if (n) {
20183 - if (allocsize<n || allocsize>(n<<2)) {
20184 - if (data) delete[] data;
20185 - data = new CImg<T>[allocsize=cimg::nearest_pow2(n)];
20186 - }
20187 - size = n;
20188 - } else return assign();
20189 - return *this;
20190 - }
20191 -
20192 - //! Construct an image list containing n images with specified size
20193 - CImgList(const unsigned int n, const unsigned int width, const unsigned int height=1,
20194 - const unsigned int depth=1, const unsigned int dim=1):
20195 - size(0),allocsize(0),data(0) {
20196 - assign(n,width,height,depth,dim);
20197 - }
20198 -
20199 - //! In-place version of the previous constructor
20200 - CImgList& assign(const unsigned int n, const unsigned int width, const unsigned int height=1,
20201 - const unsigned int depth=1, const unsigned int dim=1) {
20202 - const unsigned int siz = width*height*depth*dim;
20203 - if (n && siz) { assign(n); cimglist_for(*this,l) data[l].assign(width,height,depth,dim); }
20204 - else return assign();
20205 - return *this;
20206 - }
20207 -
20208 - //! Construct an image list containing n images with specified size, filled with val
20209 - CImgList(const unsigned int n, const unsigned int width, const unsigned int height,
20210 - const unsigned int depth, const unsigned int dim, const T& val):
20211 - size(0),allocsize(0),data(0) {
20212 - assign(n,width,height,depth,dim,val);
20213 - }
20214 -
20215 - //! In-place version of the previous constructor
20216 - CImgList& assign(const unsigned int n,const unsigned int width,const unsigned int height,
20217 - const unsigned int depth, const unsigned int dim,const T& val) {
20218 - assign(n,width,height,depth,dim);
20219 - cimglist_for(*this,l) data[l].fill(val);
20220 - return *this;
20221 - }
20222 -
20223 - //! Construct a list containing n copies of the image img
20224 - template<typename t> CImgList(const unsigned int n, const CImg<t>& img, const bool shared=false):
20225 - size(0),allocsize(0),data(0) {
20226 - assign(n,img,shared);
20227 - }
20228 -
20229 - //! In-place version of the previous constructor
20230 - template<typename t> CImgList& assign(const unsigned int n, const CImg<t>& img, const bool shared=false) {
20231 - assign(n);
20232 - cimglist_for(*this,l) data[l].assign(img,shared);
20233 - return *this;
20234 - }
20235 -
20236 - //! Construct an image list from one image
20237 - template<typename t> explicit CImgList(const CImg<t>& img, const bool shared=false):
20238 - size(0),allocsize(0),data(0) {
20239 - assign(img,shared);
20240 - }
20241 -
20242 - //! In-place version of the previous constructor
20243 - template<typename t> CImgList& assign(const CImg<t>& img, const bool shared=false) {
20244 - return assign(1,img,shared);
20245 - }
20246 -
20247 - //! Construct an image list from two images
20248 - template<typename t1, typename t2> CImgList(const CImg<t1>& img1, const CImg<t2>& img2, const bool shared=false):
20249 - size(0),allocsize(0),data(0) {
20250 - assign(img1,img2,shared);
20251 - }
20252 -
20253 - //! In-place version of the previous constructor
20254 - template<typename t1, typename t2> CImgList& assign(const CImg<t1>& img1, const CImg<t2>& img2, const bool shared=false) {
20255 - assign(2);
20256 - data[0].assign(img1,shared); data[1].assign(img2,shared);
20257 - return *this;
20258 - }
20259 -
20260 - //! Construct an image list from three images
20261 - template<typename t1, typename t2, typename t3> CImgList(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const bool shared=false):
20262 - size(0),allocsize(0),data(0) {
20263 - assign(img1,img2,img3,shared);
20264 - }
20265 -
20266 - //! In-place version of the previous constructor
20267 - template<typename t1, typename t2, typename t3> CImgList& assign(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const bool shared=false) {
20268 - assign(3);
20269 - data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared);
20270 - return *this;
20271 - }
20272 -
20273 - //! Construct an image list from four images
20274 - template<typename t1, typename t2, typename t3, typename t4>
20275 - CImgList(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const bool shared=false):
20276 - size(0),allocsize(0),data(0) {
20277 - assign(img1,img2,img3,img4,shared);
20278 - }
20279 -
20280 - //! In-place version of the previous constructor
20281 - template<typename t1, typename t2, typename t3, typename t4>
20282 - CImgList& assign(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const bool shared=false) {
20283 - assign(4);
20284 - data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); data[3].assign(img4,shared);
20285 - return *this;
20286 - }
20287 -
20288 - //! Construct an image list from five images
20289 - template<typename t1, typename t2, typename t3, typename t4, typename t5>
20290 - CImgList(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5, const bool shared=false):
20291 - size(0),allocsize(0),data(0) {
20292 - assign(img1,img2,img3,img4,img5,shared);
20293 - }
20294 -
20295 - //! In-place version of the previous constructor
20296 - template<typename t1, typename t2, typename t3, typename t4, typename t5>
20297 - CImgList& assign(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
20298 - const bool shared=false) {
20299 - assign(5);
20300 - data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); data[3].assign(img4,shared);
20301 - data[4].assign(img5,shared);
20302 - return *this;
20303 - }
20304 -
20305 - //! Construct an image list from six images
20306 - template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6>
20307 - CImgList(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
20308 - const CImg<t6>& img6, const bool shared=false):
20309 - size(0),allocsize(0),data(0) {
20310 - assign(img1,img2,img3,img4,img5,img6,shared);
20311 - }
20312 -
20313 - //! In-place version of the previous constructor
20314 - template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6>
20315 - CImgList& assign(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
20316 - const CImg<t6>& img6, const bool shared=false) {
20317 - assign(6);
20318 - data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); data[3].assign(img4,shared);
20319 - data[4].assign(img5,shared); data[5].assign(img6,shared);
20320 - return *this;
20321 - }
20322 -
20323 - //! Construct an image list from seven images
20324 - template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7>
20325 - CImgList(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
20326 - const CImg<t6>& img6, const CImg<t7>& img7, const bool shared=false):
20327 - size(0),allocsize(0),data(0) {
20328 - assign(img1,img2,img3,img4,img5,img6,img7,shared);
20329 - }
20330 -
20331 - //! In-place version of the previous constructor
20332 - template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7>
20333 - CImgList& assign(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
20334 - const CImg<t6>& img6, const CImg<t7>& img7, const bool shared=false) {
20335 - assign(7);
20336 - data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); data[3].assign(img4,shared);
20337 - data[4].assign(img5,shared); data[5].assign(img6,shared); data[6].assign(img7,shared);
20338 - return *this;
20339 - }
20340 -
20341 - //! Construct an image list from eight images
20342 - template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7, typename t8>
20343 - CImgList(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
20344 - const CImg<t6>& img6, const CImg<t7>& img7, const CImg<t8>& img8, const bool shared=false):
20345 - size(0),allocsize(0),data(0) {
20346 - assign(img1,img2,img3,img4,img5,img6,img7,img8,shared);
20347 - }
20348 -
20349 - //! In-place version of the previous constructor
20350 - template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7, typename t8>
20351 - CImgList& assign(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
20352 - const CImg<t6>& img6, const CImg<t7>& img7, const CImg<t8>& img8, const bool shared=false) {
20353 - assign(8);
20354 - data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); data[3].assign(img4,shared);
20355 - data[4].assign(img5,shared); data[5].assign(img6,shared); data[6].assign(img7,shared); data[7].assign(img8,shared);
20356 - return *this;
20357 - }
20358 -
20359 - //! Construct an image list from nine images
20360 - template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7, typename t8, typename t9>
20361 - CImgList(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
20362 - const CImg<t6>& img6, const CImg<t7>& img7, const CImg<t8>& img8, const CImg<t9>& img9, const bool shared=false):
20363 - size(0),allocsize(0),data(0) {
20364 - assign(img1,img2,img3,img4,img5,img6,img7,img8,img9,shared);
20365 - }
20366 -
20367 - //! In-place version of the previous constructor
20368 - template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7, typename t8, typename t9>
20369 - CImgList& assign(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
20370 - const CImg<t6>& img6, const CImg<t7>& img7, const CImg<t8>& img8, const CImg<t9>& img9, const bool shared=false) {
20371 - assign(9);
20372 - data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); data[3].assign(img4,shared);
20373 - data[4].assign(img5,shared); data[5].assign(img6,shared); data[6].assign(img7,shared); data[7].assign(img8,shared);
20374 - data[8].assign(img9,shared);
20375 - return *this;
20376 - }
20377 -
20378 - //! Construct an image list from ten images
20379 - template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7, typename t8, typename t9, typename t10>
20380 - CImgList(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
20381 - const CImg<t6>& img6, const CImg<t7>& img7, const CImg<t8>& img8, const CImg<t9>& img9, const CImg<t10>& img10,
20382 - const bool shared=false):
20383 - size(0),allocsize(0),data(0) {
20384 - assign(img1,img2,img3,img4,img5,img6,img7,img8,img9,img10,shared);
20385 - }
20386 -
20387 - //! In-place version of the previous constructor
20388 - template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7, typename t8, typename t9, typename t10>
20389 - CImgList& assign(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
20390 - const CImg<t6>& img6, const CImg<t7>& img7, const CImg<t8>& img8, const CImg<t9>& img9, const CImg<t10>& img10,
20391 - const bool shared=false) {
20392 - assign(10);
20393 - data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); data[3].assign(img4,shared);
20394 - data[4].assign(img5,shared); data[5].assign(img6,shared); data[6].assign(img7,shared); data[7].assign(img8,shared);
20395 - data[8].assign(img9,shared); data[9].assign(img10,shared);
20396 - return *this;
20397 - }
20398 -
20399 - //! Construct an image list from a filename
20400 - CImgList(const char *const filename):
20401 - size(0),allocsize(0),data(0) {
20402 - assign(filename);
20403 - }
20404 -
20405 - //! In-place version of the previous constructor
20406 - CImgList& assign(const char *const filename) {
20407 - return load(filename);
20408 - }
20409 -
20410 - //! Return a string describing the type of the image pixels in the list (template parameter \p T).
20411 - static const char* pixel_type() {
20412 - return cimg::type<T>::id();
20413 - }
20414 -
20415 - //! Return \p true if list is empty
20416 - bool is_empty() const {
20417 - return (!data || !size);
20418 - }
20419 -
20420 - //! Return \c true if the list contains an image with indice k
20421 - bool contains(const int k) const {
20422 - return data && k<size;
20423 - }
20424 -
20425 - //! Return \c true if the k-th image of the list contains the pixel (x,y,z,v)
20426 - bool contains(const int k, const int x, const int y=0, const int z=0, const int v=0) const {
20427 - return contains(k) && data[k].contains(x,y,z,v);
20428 - }
20429 -
20430 -
20431 -
20432 - //@}
20433 - //------------------------------
20434 - //
20435 - //! \name Arithmetics Operators
20436 - //@{
20437 - //------------------------------
20438 -
20439 - //! Assignement operator
20440 - template<typename t> CImgList& operator=(const CImgList<t>& list) {
20441 - return assign(list);
20442 - }
20443 -
20444 - CImgList& operator=(const CImgList& list) {
20445 - return assign(list);
20446 - }
20447 -
20448 - //! Assignement operator.
20449 - template<typename t> CImgList& operator=(const CImg<t>& img) {
20450 - cimglist_for(*this,l) data[l]=img;
20451 - return *this;
20452 - }
20453 -
20454 - //! Assignement operator.
20455 - CImgList& operator=(const T& val) {
20456 - cimglist_for(*this,l) data[l].fill(val);
20457 - return *this;
20458 - }
20459 -
20460 - //! Operator+
20461 - CImgList operator+() const {
20462 - return CImgList<T>(*this);
20463 - }
20464 -
20465 - //! Operator+=
20466 -#ifdef cimg_use_visualcpp6
20467 - CImgList& operator+=(const T& val) {
20468 -#else
20469 - template<typename t> CImgList& operator+=(const t& val) {
20470 -#endif
20471 - cimglist_for(*this,l) (*this)[l]+=val;
20472 - return *this;
20473 - }
20474 -
20475 - //! Operator+=
20476 - template<typename t> CImgList& operator+=(const CImgList<t>& list) {
20477 - const unsigned int sizemax = min(size,list.size);
20478 - for (unsigned int l=0; l<sizemax; l++) (*this)[l]+=list[l];
20479 - return *this;
20480 - }
20481 -
20482 - //! Operator++
20483 - CImgList& operator++() {
20484 - cimglist_for(*this,l) (*this)[l]++;
20485 - return *this;
20486 - }
20487 -
20488 - //! Operator-
20489 - CImgList operator-() const {
20490 - CImgList<T> res(size);
20491 - cimglist_for(res,l) res[l].assign(-data[l]);
20492 - return res;
20493 - }
20494 -
20495 - //! Operator-=.
20496 -#ifdef cimg_use_visualcpp6
20497 - CImgList& operator-=(const T& val) {
20498 -#else
20499 - template<typename t> CImgList& operator-=(const t& val) {
20500 -#endif
20501 - cimglist_for(*this,l) (*this)[l]-=val;
20502 - return *this;
20503 - }
20504 -
20505 - //! Operator-=.
20506 - template<typename t> CImgList& operator-=(const CImgList<t>& list) {
20507 - const unsigned int sizemax = min(size,list.size);
20508 - for (unsigned int l=0; l<sizemax; l++) (*this)[l]-=list[l];
20509 - return *this;
20510 - }
20511 -
20512 - //! Operator--
20513 - CImgList& operator--() {
20514 - cimglist_for(*this,l) (*this)[l]--;
20515 - return *this;
20516 - }
20517 -
20518 - //! Operator*=.
20519 -#ifdef cimg_use_visualcpp6
20520 - CImgList& operator*=(const double val) {
20521 -#else
20522 - template<typename t> CImgList& operator*=(const t& val) {
20523 -#endif
20524 - cimglist_for(*this,l) (*this)[l]*=val;
20525 - return *this;
20526 - }
20527 -
20528 - //! Operator*=.
20529 - template<typename t> CImgList& operator*=(const CImgList<t>& list) {
20530 - const unsigned int N = cimg::min(size,list.size);
20531 - for (unsigned int l=0; l<N; l++) (*this)[l]*=list[l];
20532 - return this;
20533 - }
20534 -
20535 - //! Operator/=.
20536 -#ifdef cimg_use_visualcpp6
20537 - CImgList& operator/=(const double val) {
20538 -#else
20539 - template<typename t> CImgList& operator/=(const t& val) {
20540 -#endif
20541 - cimglist_for(*this,l) (*this)[l]/=val;
20542 - return *this;
20543 - }
20544 -
20545 - //! Operator/=.
20546 - template<typename t> CImgList& operator/=(const CImgList<t>& list) {
20547 - const unsigned int N = cimg::min(size,list.size);
20548 - for (unsigned int l=0; l<N; l++) (*this)[l]/=list[l];
20549 - return this;
20550 - }
20551 -
20552 - //@}
20553 - //-------------------------
20554 - //
20555 - //! \name List Manipulation
20556 - //@{
20557 - //-------------------------
20558 -
20559 - //! Return a reference to the i-th element of the image list.
20560 - CImg<T>& operator[](const unsigned int pos) {
20561 -#if cimg_debug>=3
20562 - if (pos>=size) {
20563 - cimg::warn(true,"CImgList<%s>::operator[] : bad list position %u, in a list of %u images",pixel_type(),pos,size);
20564 - return *data;
20565 - }
20566 -#endif
20567 - return data[pos];
20568 - }
20569 -
20570 - const CImg<T>& operator[](const unsigned int pos) const {
20571 -#if cimg_debug>=3
20572 - if (pos>=size) {
20573 - cimg::warn(true,"CImgList<%s>::operator[] : bad list position %u, in a list of %u images",pixel_type(),pos,size);
20574 - return *data;
20575 - }
20576 -#endif
20577 - return data[pos];
20578 - }
20579 -
20580 - //! Equivalent to CImgList<T>::operator[]
20581 - CImg<T>& operator()(const unsigned int pos) { return (*this)[pos]; }
20582 - const CImg<T>& operator()(const unsigned int pos) const { return (*this)[pos]; }
20583 -
20584 - //! Return a reference to (x,y,z,v) pixel of the pos-th image of the list
20585 - T& operator()(const unsigned int pos, const unsigned int x, const unsigned int y=0,
20586 - const unsigned int z=0, const unsigned int v=0) {
20587 - return (*this)[pos](x,y,z,v);
20588 - }
20589 - const T& operator()(const unsigned int pos, const unsigned int x, const unsigned int y=0,
20590 - const unsigned int z=0, const unsigned int v=0) const {
20591 - return (*this)[pos](x,y,z,v);
20592 - }
20593 -
20594 - //! Equivalent to CImgList<T>::operator[], with boundary checking
20595 - CImg<T>& at(const unsigned int pos) {
20596 - if (pos>=size)
20597 - throw CImgArgumentException("CImgList<%s>::at() : bad list position %u, in a list of %u images",
20598 - pixel_type(),pos,size);
20599 - return data[pos];
20600 - }
20601 -
20602 - const CImg<T>& at(const unsigned int pos) const {
20603 - if (pos>=size)
20604 - throw CImgArgumentException("CImgList<%s>::at() : bad list position %u, in a list of %u images",
20605 - pixel_type(),pos,size);
20606 - return data[pos];
20607 - }
20608 -
20609 - //! Returns a reference to last element
20610 - CImg<T>& back() {
20611 - return (*this)(size-1);
20612 - }
20613 -
20614 - const CImg<T>& back() const {
20615 - return (*this)(size-1);
20616 - }
20617 -
20618 - //! Returns a reference to the first element
20619 - CImg<T>& front() {
20620 - return *data;
20621 - }
20622 -
20623 - const CImg<T>& front() const {
20624 - return *data;
20625 - }
20626 -
20627 - //! Returns an iterator to the beginning of the vector.
20628 - iterator begin() {
20629 - return data;
20630 - }
20631 -
20632 - const_iterator begin() const {
20633 - return data;
20634 - }
20635 -
20636 - //! Returns an iterator just past the last element.
20637 - iterator end() {
20638 - return data + size;
20639 - }
20640 -
20641 - const_iterator end() const {
20642 - return data + size;
20643 - }
20644 -
20645 - //! Insert a copy of the image \p img into the current image list, at position \p pos.
20646 - template<typename t> CImgList& insert(const CImg<t>& img, const unsigned int pos, const bool shared) {
20647 - if (pos>size)
20648 - throw CImgArgumentException("CImgList<%s>::insert() : Cannot insert at position %u into a list with %u elements",
20649 - pixel_type(),pos,size);
20650 - if (shared)
20651 - throw CImgArgumentException("CImgList<%s>::insert(): Cannot insert a shared image CImg<%s> into a CImgList<%s>",
20652 - pixel_type(),img.pixel_type(),pixel_type());
20653 - CImg<T> *new_data = (++size>allocsize)?new CImg<T>[allocsize?(allocsize<<=1):(allocsize=1)]:0;
20654 - if (!size || !data) { data = new_data; *data = img; } else {
20655 - if (new_data) {
20656 - if (pos) std::memcpy(new_data,data,sizeof(CImg<T>)*pos);
20657 - if (pos!=size-1) std::memcpy(new_data+pos+1,data+pos,sizeof(CImg<T>)*(size-1-pos));
20658 - std::memset(data,0,sizeof(CImg<T>)*(size-1));
20659 - delete[] data;
20660 - data = new_data;
20661 - }
20662 - else if (pos!=size-1) memmove(data+pos+1,data+pos,sizeof(CImg<T>)*(size-1-pos));
20663 - data[pos].width = data[pos].height = data[pos].depth = data[pos].dim = 0; data[pos].data = 0;
20664 - data[pos] = img;
20665 - }
20666 - return *this;
20667 - }
20668 -
20669 - CImgList& insert(const CImg<T>& img, const unsigned int pos, const bool shared) {
20670 - if (pos>size)
20671 - throw CImgArgumentException("CImgList<%s>::insert() : Can't insert at position %u into a list with %u elements",
20672 - pixel_type(),pos,size);
20673 - CImg<T> *new_data = (++size>allocsize)?new CImg<T>[allocsize?(allocsize<<=1):(allocsize=1)]:0;
20674 - if (!size || !data) {
20675 - data = new_data;
20676 - if (shared && !img.is_empty()) {
20677 - data->width = img.width; data->height = img.height; data->depth = img.depth; data->dim = img.dim;
20678 - data->is_shared = true; data->data = img.data;
20679 - } else *data = img;
20680 - }
20681 - else {
20682 - if (new_data) {
20683 - if (pos) std::memcpy(new_data,data,sizeof(CImg<T>)*pos);
20684 - if (pos!=size-1) std::memcpy(new_data+pos+1,data+pos,sizeof(CImg<T>)*(size-1-pos));
20685 - std::memset(data,0,sizeof(CImg<T>)*(size-1));
20686 - delete[] data;
20687 - data = new_data;
20688 - }
20689 - else if (pos!=size-1) memmove(data+pos+1,data+pos,sizeof(CImg<T>)*(size-1-pos));
20690 - if (shared && !img.is_empty()) {
20691 - data[pos].width = img.width; data[pos].height = img.height; data[pos].depth = img.depth; data[pos].dim = img.dim;
20692 - data[pos].is_shared = true; data[pos].data = img.data;
20693 - } else {
20694 - data[pos].width = data[pos].height = data[pos].depth = data[pos].dim = 0; data[pos].data = 0;
20695 - data[pos] = img;
20696 - }
20697 - }
20698 - return *this;
20699 - }
20700 -
20701 - template<typename t> CImgList& insert(const CImg<t>& img, const unsigned int pos) {
20702 - return insert(img,pos,false);
20703 - }
20704 -
20705 - template<typename t> CImgList<typename cimg::largest<T,t>::type> get_insert(const CImg<t>& img, const unsigned int pos, const bool shared=false) const {
20706 - typedef typename cimg::largest<T,t>::type restype;
20707 - return CImgList<restype>(*this).insert(img,pos,shared);
20708 - }
20709 -
20710 - //! Insert a copy of the image \p img at the current image list.
20711 - template<typename t> CImgList& insert(const CImg<t>& img) {
20712 - return insert(img,size);
20713 - }
20714 -
20715 - template<typename t> CImgList<typename cimg::largest<T,t>::type> get_insert(const CImg<t>& img) const {
20716 - typedef typename cimg::largest<T,t>::type restype;
20717 - return CImgList<restype>(*this).insert(img);
20718 - }
20719 -
20720 - //! Insert a copy of the image \p img at the current image list.
20721 - CImgList& operator<<(const CImg<T>& img) {
20722 - return insert(img);
20723 - }
20724 -
20725 - //! Insert n copies of the image \p img into the current image list, at position \p pos.
20726 - template<typename t> CImgList& insert(const unsigned int n, const CImg<t>& img, const unsigned int pos) {
20727 - for (unsigned int i=0; i<n; i++) insert(img,pos);
20728 - return *this;
20729 - }
20730 -
20731 - template<typename t> CImgList<typename cimg::largest<T,t>::type> get_insert(const unsigned int n, const CImg<t>& img, const unsigned int pos) const {
20732 - typedef typename cimg::largest<T,t>::type restype;
20733 - return CImgList<restype>(*this).insert(n,img,pos);
20734 - }
20735 -
20736 -
20737 - //! Insert n copies of the image \p img at the end of the list.
20738 - template<typename t> CImgList& insert(const unsigned int n, const CImg<t>& img) {
20739 - for (unsigned int i=0; i<n; i++) insert(img);
20740 - return *this;
20741 - }
20742 -
20743 - template<typename t> CImgList<typename cimg::largest<T,t>::type> get_insert(const unsigned int n, const CImg<t>& img) const {
20744 - typedef typename cimg::largest<T,t>::type restype;
20745 - return CImgList<restype>(*this).insert(n,img);
20746 - }
20747 -
20748 - //! Insert a copy of the image list \p list into the current image list, starting from position \p pos.
20749 - template<typename t> CImgList& insert(const CImgList<t>& list, const unsigned int pos) {
20750 - cimglist_for(list,l) insert(list[l],pos+l);
20751 - return *this;
20752 - }
20753 -
20754 - CImgList& insert(const CImgList<T>& list, const unsigned int pos) {
20755 - if (this!=&list) cimglist_for(list,l) insert(list[l],pos+l);
20756 - else insert(CImgList<T>(list),pos);
20757 - return *this;
20758 - }
20759 -
20760 - template<typename t> CImgList<typename cimg::largest<T,t>::type> get_insert(const CImgList<t>& list, const unsigned int pos) const {
20761 - typedef typename cimg::largest<T,t>::type restype;
20762 - return CImgList<restype>(*this).insert(list,pos);
20763 - }
20764 -
20765 - //! Append a copy of the image list \p list at the current image list.
20766 - template<typename t> CImgList& insert(const CImgList<t>& list) {
20767 - return insert(list,size);
20768 - }
20769 -
20770 - template<typename t> CImgList<typename cimg::largest<T,t>::type> get_insert(const CImgList<t>& list) const {
20771 - typedef typename cimg::largest<T,t>::type restype;
20772 - return CImgList<restype>(*this).insert(list);
20773 - }
20774 -
20775 - //! Insert a copy of the image list \p list at the current image list.
20776 - CImgList& operator<<(const CImgList& list) {
20777 - return insert(list);
20778 - }
20779 -
20780 - //! Insert n copies of the list \p list at position \p pos of the current list.
20781 - template<typename t> CImgList& insert(const unsigned int n, const CImgList<t>& list, const unsigned int pos) {
20782 - for (unsigned int i=0; i<n; i++) insert(list,pos);
20783 - return *this;
20784 - }
20785 -
20786 - template<typename t> CImgList<typename cimg::largest<T,t>::type> get_insert(const unsigned int n, const CImgList<t>& list, const unsigned int pos) const {
20787 - typedef typename cimg::largest<T,t>::type restype;
20788 - return CImgList<restype>(*this).insert(n,list,pos);
20789 - }
20790 -
20791 - //! Insert n copies of the list at the end of the current list
20792 - template<typename t> CImgList& insert(const unsigned int n, const CImgList<t>& list) {
20793 - for (unsigned int i=0; i<n; i++) insert(list);
20794 - return *this;
20795 - }
20796 -
20797 - template<typename t> CImgList<typename cimg::largest<T,t>::type> get_insert(const unsigned int n, const CImgList<t>& list) const {
20798 - typedef typename cimg::largest<T,t>::type restype;
20799 - return CImgList<restype>(*this).insert(n,list);
20800 - }
20801 -
20802 - //! Insert image \p img at the end of the list.
20803 - template<typename t> CImgList& push_back(const CImg<t>& img) {
20804 - return insert(img);
20805 - }
20806 -
20807 - //! Insert image \p img at the front of the list.
20808 - template<typename t> CImgList& push_front(const CImg<t>& img) {
20809 - return insert(img,0);
20810 - }
20811 -
20812 - //! Insert list \p list at the end of the current list.
20813 - template<typename t> CImgList& push_back(const CImgList<t>& list) {
20814 - return insert(list);
20815 - }
20816 -
20817 - //! Insert list \p list at the front of the current list.
20818 - template<typename t> CImgList& push_front(const CImgList<t>& list) {
20819 - return insert(list,0);
20820 - }
20821 -
20822 - //! Insert a shared copy of the image \p img into the current image list, at position \p pos.
20823 - template<typename t> CImgList& insert_shared(const CImg<t>& img, const unsigned int pos) {
20824 - return insert(img,pos,true);
20825 - }
20826 -
20827 - template<typename t> CImgList get_insert_shared(const CImg<t>& img, const unsigned int pos) const {
20828 - return CImgList<T>(*this).insert_shared(img,pos);
20829 - }
20830 -
20831 - //! Insert a shared copy of the image \p img at the current image list.
20832 - template<typename t> CImgList& insert_shared(const CImg<t>& img) {
20833 - return insert_shared(img,size);
20834 - }
20835 -
20836 - template<typename t> CImgList get_insert_shared(const CImg<t>& img) const {
20837 - return CImgList<T>(*this).insert_shared(img);
20838 - }
20839 -
20840 - //! Insert n shared copies of the image \p img into the current image list, at position \p pos.
20841 - template<typename t> CImgList& insert_shared(const unsigned int n, const CImg<t>& img, const unsigned int pos) {
20842 - for (unsigned int i=0; i<n; i++) insert_shared(img,pos);
20843 - return *this;
20844 - }
20845 -
20846 - template<typename t> CImgList get_insert_shared(const unsigned int n, const CImg<t>& img, const unsigned int pos) const {
20847 - return CImgList<T>(*this).insert_shared(n,img,pos);
20848 - }
20849 -
20850 - //! Insert n shared copies of the image \p img at the end of the list.
20851 - template<typename t> CImgList& insert_shared(const unsigned int n, const CImg<t>& img) {
20852 - for (unsigned int i=0; i<n; i++) insert_shared(img);
20853 - return *this;
20854 - }
20855 -
20856 - template<typename t> CImgList get_insert_shared(const unsigned int n, const CImg<t>& img) const {
20857 - return CImgList<T>(*this).insert_shared(n,img);
20858 - }
20859 -
20860 - //! Insert a shared copy of all image of the list \p list into the current image list, starting from position \p pos.
20861 - template<typename t> CImgList& insert_shared(const CImgList<t>& list, const unsigned int pos) {
20862 - if (this!=&list) cimglist_for(list,l) insert_shared(list[l],pos+l);
20863 - else insert_shared(CImgList<T>(list),pos);
20864 - return *this;
20865 - }
20866 -
20867 - template<typename t> CImgList get_insert_shared(const CImgList<t>& list, const unsigned int pos) const {
20868 - return CImgList<T>(*this).insert_shared(list,pos);
20869 - }
20870 -
20871 - //! Append a shared copy of the image list \p list at the current image list.
20872 - template<typename t> CImgList& insert_shared(const CImgList<t>& list) {
20873 - return insert_shared(list,size);
20874 - }
20875 -
20876 - template<typename t> CImgList get_insert_shared(const CImgList<t>& list) const {
20877 - return CImgList<T>(*this).insert_shared(list);
20878 - }
20879 -
20880 - //! Insert n shared copies of the list \p list at position \p pos of the current list.
20881 - template<typename t> CImgList& insert_shared(const unsigned int n, const CImgList<t>& list, const unsigned int pos) {
20882 - for (unsigned int i=0; i<n; i++) insert_shared(list,pos);
20883 - return *this;
20884 - }
20885 -
20886 - template<typename t> CImgList get_insert_shared(const unsigned int n, const CImgList<t>& list, const unsigned int pos) const {
20887 - return CImgList<T>(*this).insert_shared(n,list,pos);
20888 - }
20889 -
20890 - //! Insert n shared copies of the list \p list at the end of the list
20891 - template<typename t> CImgList& insert_shared(const unsigned int n, const CImgList<t>& list) {
20892 - return insert_shared(n,list,size);
20893 - }
20894 -
20895 - template<typename t> CImgList get_insert_shared(const unsigned int n, const CImgList<t>& list) const {
20896 - return CImgList<T>(*this).insert_shared(n,list);
20897 - }
20898 -
20899 - //! Remove the image at position \p pos from the image list.
20900 - CImgList& remove(const unsigned int pos) {
20901 - if (pos>=size)
20902 - cimg::warn(true,"CImgList<%s>::remove() : Cannot remove an image from a list (%p,%u), at position %u.",
20903 - pixel_type(),data,size,pos);
20904 - else {
20905 - data[pos].assign();
20906 - if (!(--size)) return assign();
20907 - if (size<8 || size>(allocsize>>2)) { // Removing item without reallocation.
20908 - if (pos!=size) {
20909 - std::memmove(data+pos,data+pos+1,sizeof(CImg<T>)*(size-pos));
20910 - CImg<T> &tmp = data[size];
20911 - tmp.width = tmp.height = tmp.depth = tmp.dim = 0; tmp.data = 0;
20912 - }
20913 - } else { // Removing item with reallocation.
20914 - allocsize>>=2;
20915 - CImg<T> *new_data = new CImg<T>[allocsize];
20916 - if (pos) std::memcpy(new_data,data,sizeof(CImg<T>)*pos);
20917 - if (pos!=size) std::memcpy(new_data+pos,data+pos+1,sizeof(CImg<T>)*(size-pos));
20918 - std::memset(data,0,sizeof(CImg<T>)*(size+1));
20919 - delete[] data;
20920 - data = new_data;
20921 - }
20922 - }
20923 - return *this;
20924 - }
20925 -
20926 - CImgList get_remove(const unsigned int pos) const {
20927 - return CImgList<T>(*this).remove(pos);
20928 - }
20929 -
20930 - //! Remove last element of the list;
20931 - CImgList& pop_back() {
20932 - return remove(size-1);
20933 - }
20934 -
20935 - //! Remove last element of the list;
20936 - CImgList& operator>>(CImg<T>& img) {
20937 - if (size) { img.swap((*this)[size-1]); return remove(size-1); }
20938 - cimg::warn(true,"CImgl<%s>::operator>>() : List is empty",pixel_type());
20939 - img.assign();
20940 - return *this;
20941 - }
20942 -
20943 - //! Remove first element of the list;
20944 - CImgList& pop_front() {
20945 - return remove(0);
20946 - }
20947 -
20948 - //! Remove the element pointed by iterator \p iter;
20949 - CImgList& erase(const iterator iter) {
20950 - return remove(iter-data);
20951 - }
20952 -
20953 - //! Remove the last image from the image list.
20954 - CImgList& remove() {
20955 - if (size) return remove(size-1);
20956 - else cimg::warn(true,"CImgList<%s>::remove() : List is empty",pixel_type());
20957 - return *this;
20958 - }
20959 -
20960 - CImgList get_remove() const {
20961 - return CImgList<T>(*this).remove();
20962 - }
20963 -
20964 - //! Reverse list order
20965 - CImgList& reverse() {
20966 - for (unsigned int l=0; l<size/2; l++) (*this)[l].swap((*this)[size-1-l]);
20967 - return *this;
20968 - }
20969 -
20970 - //! Get reversed list
20971 - CImgList get_reverse() const {
20972 - return CImgList<T>(*this).reverse();
20973 - }
20974 -
20975 - //! Get a sub-list
20976 - const CImgList get_crop(const unsigned int i0, const unsigned int i1, const bool shared=false) const {
20977 - if (i0>i1 || i1>=size)
20978 - throw CImgArgumentException("CImgList<%s>::get_crop() : Cannot get a sub-list (%u->%u) from a list of %u images",
20979 - pixel_type(),i0,i1,size);
20980 - CImgList<T> res(i1-i0+1);
20981 - cimglist_for(res,l) res[l].assign((*this)[i0+l],shared);
20982 - return res;
20983 - }
20984 -
20985 - //! Replace a list by its sublist
20986 - CImgList& crop(const unsigned int i0, const unsigned int i1, const bool shared=false) {
20987 - return get_crop(i0,i1,shared).swap(*this);
20988 - }
20989 -
20990 - //@}
20991 - //----------------------------
20992 - //
20993 - //! \name Fourier Transforms
20994 - //@{
20995 - //----------------------------
20996 -
20997 - //! Compute the Fast Fourier Transform (along the specified axis).
20998 - CImgList& FFT(const char axe, const bool inverse=false) {
20999 - if (is_empty()) throw CImgInstanceException("CImgList<%s>::FFT() : Instance list (%u,%p) is empty",pixel_type(),size,data);
21000 - if (data[0].is_empty()) throw CImgInstanceException("CImgList<%s>::FFT() : Real part (%u,%u,%u,%u,%p) is empty",
21001 - pixel_type,data[0].width,data[0].height,data[0].depth,data[0].dim,data[0].data);
21002 - cimg::warn(size>2,"CImgList<%s>::FFT() : Instance list (%u,%p) have more than 2 images",pixel_type(),size,data);
21003 - if (size==1) insert(CImg<T>(data[0].width,data[0].height,data[0].depth,data[0].dim,0));
21004 - CImg<T> &Ir = data[0], &Ii = data[1];
21005 - if (Ir.width!=Ii.width || Ir.height!=Ii.height || Ir.depth!=Ii.depth || Ir.dim!=Ii.dim)
21006 - throw CImgInstanceException("CImgList<%s>::FFT() : Real part (%u,%u,%u,%u,%p) and imaginary part (%u,%u,%u,%u,%p)"
21007 - "have different dimensions",pixel_type(),
21008 - Ir.width,Ir.height,Ir.depth,Ir.dim,Ir.data,Ii.width,Ii.height,Ii.depth,Ii.dim,Ii.data);
21009 -
21010 -#ifdef cimg_use_fftw3
21011 - fftw_complex *data_in;
21012 - fftw_plan data_plan;
21013 -
21014 - switch (cimg::uncase(axe)) {
21015 - case 'x': {
21016 - data_in = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * Ir.width);
21017 - data_plan = fftw_plan_dft_1d(Ir.width, data_in, data_in, inverse?FFTW_BACKWARD:FFTW_FORWARD, FFTW_ESTIMATE);
21018 - cimg_forYZV(Ir,y,z,k) {
21019 - T *ptrr = Ir.ptr(0,y,z,k), *ptri = Ii.ptr(0,y,z,k);
21020 - double *ptrd = (double*)data_in;
21021 - cimg_forX(Ir,x) { *(ptrd++) = (double)*(ptrr++); *(ptrd++) = (double)*(ptri++); }
21022 - fftw_execute(data_plan);
21023 - cimg_forX(Ir,x) { *(--ptri) = (T)*(--ptrd); *(--ptrr) = (T)*(--ptrd); }
21024 - }
21025 - } break;
21026 -
21027 - case 'y': {
21028 - data_in = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * Ir.height);
21029 - data_plan = fftw_plan_dft_1d(Ir.height, data_in, data_in, inverse?FFTW_BACKWARD:FFTW_FORWARD, FFTW_ESTIMATE);
21030 - const unsigned int off = Ir.width;
21031 - cimg_forXZV(Ir,x,z,k) {
21032 - T *ptrr = Ir.ptr(x,0,z,k), *ptri = Ii.ptr(x,0,z,k);
21033 - double *ptrd = (double*)data_in;
21034 - cimg_forY(Ir,y) { *(ptrd++) = (double)*ptrr; *(ptrd++) = (double)*ptri; ptrr+=off; ptri+=off; }
21035 - fftw_execute(data_plan);
21036 - cimg_forY(Ir,y) { ptrr-=off; ptri-=off; *ptri = (T)*(--ptrd); *ptrr = (T)*(--ptrd); }
21037 - }
21038 - } break;
21039 -
21040 - case 'z': {
21041 - data_in = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * Ir.depth);
21042 - data_plan = fftw_plan_dft_1d(Ir.depth, data_in, data_in, inverse?FFTW_BACKWARD:FFTW_FORWARD, FFTW_ESTIMATE);
21043 - const unsigned int off = Ir.width*Ir.height;
21044 - cimg_forXYV(Ir,x,y,k) {
21045 - T *ptrr = Ir.ptr(x,y,0,k), *ptri = Ii.ptr(x,y,0,k);
21046 - double *ptrd = (double*)data_in;
21047 - cimg_forZ(Ir,z) { *(ptrd++) = (double)*ptrr; *(ptrd++) = (double)*ptri; ptrr+=off; ptri+=off; }
21048 - fftw_execute(data_plan);
21049 - cimg_forZ(Ir,z) { ptrr-=off; ptri-=off; *ptri = (T)*(--ptrd); *ptrr = (T)*(--ptrd); }
21050 - }
21051 - } break;
21052 -
21053 - case 'v': {
21054 - data_in = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * Ir.dim);
21055 - data_plan = fftw_plan_dft_1d(Ir.dim, data_in, data_in, inverse?FFTW_BACKWARD:FFTW_FORWARD, FFTW_ESTIMATE);
21056 - const unsigned int off = Ir.width*Ir.height*Ir.depth;
21057 - cimg_forXYZ(Ir,x,y,z) {
21058 - T *ptrr = Ir.ptr(x,y,z,0), *ptri = Ii.ptr(x,y,z,0);
21059 - double *ptrd = (double*)data_in;
21060 - cimg_forV(Ir,k) { *(ptrd++) = (double)*ptrr; *(ptrd++) = (double)*ptri; ptrr+=off; ptri+=off; }
21061 - fftw_execute(data_plan);
21062 - cimg_forV(Ir,k) { ptrr-=off; ptri-=off; *ptri = (T)*(--ptrd); *ptrr = (T)*(--ptrd); }
21063 - }
21064 - } break;
21065 - }
21066 -
21067 - fftw_destroy_plan(data_plan);
21068 - fftw_free(data_in);
21069 -#else
21070 - switch (cimg::uncase(axe)) {
21071 - case 'x': { // Fourier along X
21072 - const unsigned int N = Ir.width, N2 = (N>>1);
21073 - if (((N-1)&N) && N!=1) throw CImgInstanceException("CImgList<%s>::FFT() : Dimension of instance image along 'x' is %d != 2^N",
21074 - pixel_type(),N);
21075 - for (unsigned int i=0,j=0; i<N2; i++) {
21076 - if (j>i) cimg_forYZV(Ir,y,z,v) { cimg::swap(Ir(i,y,z,v),Ir(j,y,z,v)); cimg::swap(Ii(i,y,z,v),Ii(j,y,z,v));
21077 - if (j<N2) {
21078 - const unsigned int ri = N-1-i, rj = N-1-j;
21079 - cimg::swap(Ir(ri,y,z,v),Ir(rj,y,z,v)); cimg::swap(Ii(ri,y,z,v),Ii(rj,y,z,v));
21080 - }}
21081 - for (unsigned int m=N, n=N2; (j+=n)>=m; j-=m, m=n, n>>=1);
21082 - }
21083 - for (unsigned int delta=2; delta<=N; delta<<=1) {
21084 - const unsigned int delta2 = (delta>>1);
21085 - for (unsigned int i=0; i<N; i+=delta) {
21086 - float wr = 1, wi = 0;
21087 - const float angle = (float)((inverse?+1:-1)*2*cimg::PI/delta),
21088 - ca = (float)std::cos(angle),
21089 - sa = (float)std::sin(angle);
21090 - for (unsigned int k=0; k<delta2; k++) {
21091 - const unsigned int j = i + k, nj = j + delta2;
21092 - cimg_forYZV(Ir,y,z,k) {
21093 - T &ir = Ir(j,y,z,k), &ii = Ii(j,y,z,k), &nir = Ir(nj,y,z,k), &nii = Ii(nj,y,z,k);
21094 - const T tmpr = wr*nir - wi*nii, tmpi = wr*nii + wi*nir;
21095 - nir = ir - tmpr; nii = ii - tmpi;
21096 - ir += tmpr; ii += tmpi;
21097 - }
21098 - const float nwr = wr*ca-wi*sa;
21099 - wi = wi*ca + wr*sa;
21100 - wr = nwr;
21101 - }
21102 - }
21103 - }
21104 - if (inverse) (*this)/=N;
21105 - } break;
21106 -
21107 - case 'y': { // Fourier along Y
21108 - const unsigned int N = Ir.height, N2 = (N>>1);
21109 - if (((N-1)&N) && N!=1) throw CImgInstanceException("CImgList<%s>::FFT() : Dimension of instance image(s) along 'y' is %d != 2^N",
21110 - pixel_type(),N);
21111 - for (unsigned int i=0,j=0; i<N2; i++) {
21112 - if (j>i) cimg_forXZV(Ir,x,z,v) { cimg::swap(Ir(x,i,z,v),Ir(x,j,z,v)); cimg::swap(Ii(x,i,z,v),Ii(x,j,z,v));
21113 - if (j<N2) {
21114 - const unsigned int ri = N-1-i, rj = N-1-j;
21115 - cimg::swap(Ir(x,ri,z,v),Ir(x,rj,z,v)); cimg::swap(Ii(x,ri,z,v),Ii(x,rj,z,v));
21116 - }}
21117 - for (unsigned int m=N, n=N2; (j+=n)>=m; j-=m, m=n, n>>=1);
21118 - }
21119 - for (unsigned int delta=2; delta<=N; delta<<=1) {
21120 - const unsigned int delta2 = (delta>>1);
21121 - for (unsigned int i=0; i<N; i+=delta) {
21122 - float wr = 1, wi = 0;
21123 - const float angle = (float)((inverse?+1:-1)*2*cimg::PI/delta),
21124 - ca = (float)std::cos(angle), sa = (float)std::sin(angle);
21125 - for (unsigned int k=0; k<delta2; k++) {
21126 - const unsigned int j = i + k, nj = j + delta2;
21127 - cimg_forXZV(Ir,x,z,k) {
21128 - T &ir = Ir(x,j,z,k), &ii = Ii(x,j,z,k), &nir = Ir(x,nj,z,k), &nii = Ii(x,nj,z,k);
21129 - const T tmpr = wr*nir - wi*nii, tmpi = wr*nii + wi*nir;
21130 - nir = ir - tmpr; nii = ii - tmpi;
21131 - ir += tmpr; ii += tmpi;
21132 - }
21133 - const float nwr = wr*ca-wi*sa;
21134 - wi = wi*ca + wr*sa;
21135 - wr = nwr;
21136 - }
21137 - }
21138 - }
21139 - if (inverse) (*this)/=N;
21140 - } break;
21141 -
21142 - case 'z': { // Fourier along Z
21143 - const unsigned int N = Ir.depth, N2 = (N>>1);
21144 - if (((N-1)&N) && N!=1) throw CImgInstanceException("CImgList<%s>::FFT() : Dimension of instance image(s) along 'z' is %d != 2^N",
21145 - pixel_type(),N);
21146 - for (unsigned int i=0,j=0; i<N2; i++) {
21147 - if (j>i) cimg_forXYV(Ir,x,y,v) { cimg::swap(Ir(x,y,i,v),Ir(x,y,j,v)); cimg::swap(Ii(x,y,i,v),Ii(x,y,j,v));
21148 - if (j<N2) {
21149 - const unsigned int ri = N-1-i, rj = N-1-j;
21150 - cimg::swap(Ir(x,y,ri,v),Ir(x,y,rj,v)); cimg::swap(Ii(x,y,ri,v),Ii(x,y,rj,v));
21151 - }}
21152 - for (unsigned int m=N, n=N2; (j+=n)>=m; j-=m, m=n, n>>=1);
21153 - }
21154 - for (unsigned int delta=2; delta<=N; delta<<=1) {
21155 - const unsigned int delta2 = (delta>>1);
21156 - for (unsigned int i=0; i<N; i+=delta) {
21157 - float wr = 1, wi = 0;
21158 - const float angle = (float)((inverse?+1:-1)*2*cimg::PI/delta),
21159 - ca = (float)std::cos(angle), sa = (float)std::sin(angle);
21160 - for (unsigned int k=0; k<delta2; k++) {
21161 - const unsigned int j = i + k, nj = j + delta2;
21162 - cimg_forXYV(Ir,x,y,k) {
21163 - T &ir = Ir(x,y,j,k), &ii = Ii(x,y,j,k), &nir = Ir(x,y,nj,k), &nii = Ii(x,y,nj,k);
21164 - const T tmpr = wr*nir - wi*nii, tmpi = wr*nii + wi*nir;
21165 - nir = ir - tmpr; nii = ii - tmpi;
21166 - ir += tmpr; ii += tmpi;
21167 - }
21168 - const float nwr = wr*ca-wi*sa;
21169 - wi = wi*ca + wr*sa;
21170 - wr = nwr;
21171 - }
21172 - }
21173 - }
21174 - if (inverse) (*this)/=N;
21175 - } break;
21176 -
21177 - default: throw CImgArgumentException("CImgList<%s>::FFT() : unknown axe '%c', must be 'x','y' or 'z'");
21178 - }
21179 -#endif
21180 - return *this;
21181 - }
21182 -
21183 - //! Return the Fast Fourier Transform of a complex image (along a specified axis).
21184 - CImgList<typename cimg::largest<T,float>::type> get_FFT(const char axe,const bool inverse=false) const {
21185 - typedef typename cimg::largest<T,float>::type restype;
21186 - return CImgList<restype>(*this).FFT(axe,inverse);
21187 - }
21188 -
21189 - //! Compute the Fast Fourier Transform of a complex image.
21190 - CImgList& FFT(const bool inverse=false) {
21191 - if (is_empty()) throw CImgInstanceException("CImgList<%s>::FFT() : Instance list (%u,%p) is empty",pixel_type(),size,data);
21192 - cimg::warn(size>2,"CImgList<%s>::FFT() : Instance list (%u,%p) have more than 2 images",pixel_type(),size,data);
21193 - if (size==1) insert(CImg<T>(data[0].width,data[0].height,data[0].depth,data[0].dim,0));
21194 - CImg<T> &Ir = data[0];
21195 -
21196 -#ifdef cimg_use_fftw3
21197 - CImg<T> &Ii = data[1];
21198 - fftw_complex *data_in = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * Ir.width*Ir.height*Ir.depth);
21199 - fftw_plan data_plan;
21200 - const unsigned int w = Ir.width, wh = w*Ir.height, whd = wh*Ir.depth;
21201 - data_plan = fftw_plan_dft_3d(Ir.width, Ir.height, Ir.depth, data_in, data_in, inverse?FFTW_BACKWARD:FFTW_FORWARD, FFTW_ESTIMATE);
21202 - cimg_forV(Ir,k) {
21203 - T *ptrr = Ir.ptr(0,0,0,k), *ptri = Ii.ptr(0,0,0,k);
21204 - double *ptrd = (double*)data_in;
21205 - cimg_forX(Ir,x) { cimg_forY(Ir,y) { cimg_forZ(Ir,z)
21206 - { *(ptrd++) = (double)*ptrr; *(ptrd++) = (double)*ptri; ptrr+=wh; ptri+=wh; }
21207 - ptrr-=whd-w; ptri-=whd-w; }
21208 - ptrr-=wh-1; ptri-=wh-1; }
21209 - fftw_execute(data_plan);
21210 - ptrd = (double*)data_in;
21211 - ptrr = Ir.ptr(0,0,0,k), ptri = Ii.ptr(0,0,0,k);
21212 - cimg_forX(Ir,x) { cimg_forY(Ir,y) { cimg_forZ(Ir,z)
21213 - { *ptrr = (T)*(ptrd++); *ptri = (T)*(ptrd++); ptrr+=wh; ptri+=wh; }
21214 - ptrr-=whd-w; ptri-=whd-w; }
21215 - ptrr-=wh-1; ptri-=wh-1; }
21216 - }
21217 - fftw_destroy_plan(data_plan);
21218 - fftw_free(data_in);
21219 -#else
21220 - if (Ir.depth>1) FFT('z',inverse);
21221 - if (Ir.height>1) FFT('y',inverse);
21222 - if (Ir.width>1) FFT('x',inverse);
21223 -#endif
21224 - return *this;
21225 - }
21226 -
21227 - //! Return the Fast Fourier Transform of a complex image
21228 - CImgList<typename cimg::largest<T,float>::type> get_FFT(const bool inverse=false) const {
21229 - typedef typename cimg::largest<T,float>::type restype;
21230 - return CImgList<restype>(*this).FFT(inverse);
21231 - }
21232 -
21233 - //@}
21234 - //----------------------------------
21235 - //
21236 - //! \name Input-Output and Display
21237 - //@{
21238 - //----------------------------------
21239 -
21240 - //! Print informations about the list on the standard output.
21241 - const CImgList& print(const char* title=0, const unsigned int print_flag=1) const {
21242 - char tmp[1024];
21243 - std::fprintf(stderr,"%-8s(this=%p) : { size=%u, data=%p }\n",title?title:"CImgList",
21244 - (void*)this,size,(void*)data);
21245 - if (print_flag>0) cimglist_for(*this,l) {
21246 - std::sprintf(tmp,"%s[%d]",title?title:"CImgList",l);
21247 - data[l].print(tmp,print_flag);
21248 - }
21249 - return *this;
21250 - }
21251 -
21252 - //! Display informations about the list on the standart output.
21253 - const CImgList& print(const unsigned int print_flag) const {
21254 - return print(0,print_flag);
21255 - }
21256 -
21257 - //! Load an image list from a file.
21258 - static CImgList get_load(const char *const filename) {
21259 - const char *ext = cimg::filename_split(filename);
21260 - if (!cimg::strncasecmp(ext,"cimg",4) || !ext[0]) return get_load_cimg(filename);
21261 - if (!cimg::strncasecmp(ext,"rec",3) ||
21262 - !cimg::strncasecmp(ext,"par",3)) return get_load_parrec(filename);
21263 - CImgList res(1);
21264 - res[0].load(filename);
21265 - return res;
21266 - }
21267 -
21268 - //! In-place version of load().
21269 - CImgList& load(const char *const filename) {
21270 - return get_load(filename).swap(*this);
21271 - }
21272 -
21273 -#define cimg_load_cimg_case(Ts,Tss) \
21274 - if (!loaded && !cimg::strcasecmp(Ts,tmp2)) for (unsigned int l=0; l<n; l++) { \
21275 - const bool endian = cimg::endian(); \
21276 - j=0; while((i=std::fgetc(nfile))!='\n') tmp[j++]=(char)i; tmp[j]='\0'; \
21277 - std::sscanf(tmp,"%u %u %u %u",&w,&h,&z,&k);\
21278 - if (w*h*z*k>0) { \
21279 - Tss *buf = new Tss[w*h*z*k]; cimg::fread(buf,w*h*z*k,nfile); \
21280 - if (endian) cimg::endian_swap(buf,w*h*z*k); \
21281 - CImg<T> idest(w,h,z,k); \
21282 - cimg_foroff(idest,off) idest[off] = (T)(buf[off]); idest.swap(res[l]); \
21283 - delete[] buf; \
21284 - } \
21285 - loaded = true; \
21286 - }
21287 -
21288 - //! Load an image list from a file (.raw format).
21289 - static CImgList get_load_cimg(std::FILE *const file, const char *const filename=0) {
21290 - typedef unsigned char uchar;
21291 - typedef unsigned short ushort;
21292 - typedef unsigned int uint;
21293 - typedef unsigned long ulong;
21294 - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
21295 - char tmp[256],tmp2[256];
21296 - int i;
21297 - bool loaded = false;
21298 - unsigned int n,j,w,h,z,k,err;
21299 - j=0; while((i=std::fgetc(nfile))!='\n' && i!=EOF && j<256) tmp[j++]=i; tmp[j]='\0';
21300 - err=std::sscanf(tmp,"%u%*c%255[A-Za-z ]",&n,tmp2);
21301 - if (err!=2) {
21302 - if (!file) cimg::fclose(nfile);
21303 - throw CImgIOException("CImgList<%s>::get_load_cimg() : File '%s', Unknow CImg RAW header.",
21304 - pixel_type(),filename?filename:"(FILE*)");
21305 - }
21306 - CImgList<T> res(n);
21307 - cimg_load_cimg_case("bool",bool);
21308 - cimg_load_cimg_case("unsigned char",uchar);
21309 - cimg_load_cimg_case("uchar",uchar);
21310 - cimg_load_cimg_case("char",char);
21311 - cimg_load_cimg_case("unsigned short",ushort);
21312 - cimg_load_cimg_case("ushort",ushort);
21313 - cimg_load_cimg_case("short",short);
21314 - cimg_load_cimg_case("unsigned int",uint);
21315 - cimg_load_cimg_case("uint",uint);
21316 - cimg_load_cimg_case("int",int);
21317 - cimg_load_cimg_case("unsigned long",ulong);
21318 - cimg_load_cimg_case("ulong",ulong);
21319 - cimg_load_cimg_case("long",long);
21320 - cimg_load_cimg_case("float",float);
21321 - cimg_load_cimg_case("double",double);
21322 - if (!loaded) {
21323 - if (!file) cimg::fclose(nfile);
21324 - throw CImgIOException("CImgList<%s>::get_load_cimg() : File '%s', cannot read images of pixels coded as '%s'.",
21325 - pixel_type(),filename?filename:"(FILE*)",tmp2);
21326 - }
21327 - if (!file) cimg::fclose(nfile);
21328 - return res;
21329 - }
21330 -
21331 - //! Load an image list from a file (.raw format).
21332 - static CImgList get_load_cimg(const char *const filename) {
21333 - return get_load_cimg(0,filename);
21334 - }
21335 -
21336 - //! In-place version of get_load_cimg().
21337 - CImgList& load_cimg(std::FILE *const file, const char *const filename=0) {
21338 - return get_load_cimg(file,filename).swap(*this);
21339 - }
21340 -
21341 - //! In-place version of get_load_cimg().
21342 - CImgList& load_cimg(const char *const filename) {
21343 - return get_load_cimg(filename).swap(*this);
21344 - }
21345 -
21346 - //! Load PAR-REC (Philips) image file
21347 - static CImgList get_load_parrec(const char *const filename) {
21348 - char body[1024], filenamepar[1024], filenamerec[1024];
21349 - const char *ext = cimg::filename_split(filename,body);
21350 - if (!cimg::strncmp(ext,"par",3)) { std::strcpy(filenamepar,filename); std::sprintf(filenamerec,"%s.rec",body); }
21351 - if (!cimg::strncmp(ext,"PAR",3)) { std::strcpy(filenamepar,filename); std::sprintf(filenamerec,"%s.REC",body); }
21352 - if (!cimg::strncmp(ext,"rec",3)) { std::strcpy(filenamerec,filename); std::sprintf(filenamepar,"%s.par",body); }
21353 - if (!cimg::strncmp(ext,"REC",3)) { std::strcpy(filenamerec,filename); std::sprintf(filenamepar,"%s.PAR",body); }
21354 - std::FILE *file = cimg::fopen(filenamepar,"r");
21355 -
21356 - // Parse header file
21357 - CImgList<float> st_slices;
21358 - CImgList<unsigned int> st_global;
21359 - int err;
21360 - char line[256]={0};
21361 - do { err=std::fscanf(file,"%255[^\n]%*c",line); } while (err!=EOF && (line[0]=='#' || line[0]=='.'));
21362 - do {
21363 - unsigned int sn,sizex,sizey,pixsize;
21364 - float rs,ri,ss;
21365 - err=std::fscanf(file,"%u%*u%*u%*u%*u%*u%*u%u%*u%u%u%g%g%g%*[^\n]",&sn,&pixsize,&sizex,&sizey,&ri,&rs,&ss);
21366 - if (err==7) {
21367 - st_slices.insert(CImg<float>::vector((float)sn,(float)pixsize,(float)sizex,(float)sizey,ri,rs,ss,0));
21368 - unsigned int i; for (i=0; i<st_global.size && sn<=st_global[i][2]; i++);
21369 - if (i==st_global.size) st_global.insert(CImg<unsigned int>::vector(sizex,sizey,sn));
21370 - else {
21371 - CImg<unsigned int> &vec = st_global[i];
21372 - if (sizex>vec[0]) vec[0] = sizex;
21373 - if (sizey>vec[1]) vec[1] = sizey;
21374 - vec[2] = sn;
21375 - }
21376 - st_slices[st_slices.size-1][7] = (float)i;
21377 - }
21378 - } while (err==7);
21379 -
21380 - // Read data
21381 - std::FILE *file2 = cimg::fopen(filenamerec,"rb");
21382 - CImgList<T> dest;
21383 - { cimglist_for(st_global,l) {
21384 - const CImg<unsigned int>& vec = st_global[l];
21385 - dest.insert(CImg<T>(vec[0],vec[1],vec[2]));
21386 - }}
21387 -
21388 - cimglist_for(st_slices,l) {
21389 - const CImg<float>& vec = st_slices[l];
21390 - const unsigned int
21391 - sn = (unsigned int)vec[0]-1,
21392 - pixsize = (unsigned int)vec[1],
21393 - sizex = (unsigned int)vec[2],
21394 - sizey = (unsigned int)vec[3],
21395 - imn = (unsigned int)vec[7];
21396 - const float ri = vec[4], rs = vec[5], ss = vec[6];
21397 - switch (pixsize) {
21398 - case 8: {
21399 - CImg<unsigned char> buf(sizex,sizey);
21400 - cimg::fread(buf.data,sizex*sizey,file2);
21401 - if (cimg::endian()) cimg::endian_swap(buf.data,sizex*sizey);
21402 - CImg<T>& img = dest[imn];
21403 - cimg_forXY(img,x,y) img(x,y,sn) = (T)(( buf(x,y)*rs + ri )/(rs*ss));
21404 - } break;
21405 - case 16: {
21406 - CImg<unsigned short> buf(sizex,sizey);
21407 - cimg::fread(buf.data,sizex*sizey,file2);
21408 - if (cimg::endian()) cimg::endian_swap(buf.data,sizex*sizey);
21409 - CImg<T>& img = dest[imn];
21410 - cimg_forXY(img,x,y) img(x,y,sn) = (T)(( buf(x,y)*rs + ri )/(rs*ss));
21411 - } break;
21412 - case 32: {
21413 - CImg<unsigned int> buf(sizex,sizey);
21414 - cimg::fread(buf.data,sizex*sizey,file2);
21415 - if (cimg::endian()) cimg::endian_swap(buf.data,sizex*sizey);
21416 - CImg<T>& img = dest[imn];
21417 - cimg_forXY(img,x,y) img(x,y,sn) = (T)(( buf(x,y)*rs + ri )/(rs*ss));
21418 - } break;
21419 - default:
21420 - cimg::fclose(file);
21421 - cimg::fclose(file2);
21422 - throw CImgIOException("CImg<%s>::get_load_parrec() : File '%s', cannot handle image with pixsize = %d bits.",
21423 - pixel_type(),filename,pixsize);
21424 - break;
21425 - }
21426 - }
21427 - cimg::fclose(file);
21428 - cimg::fclose(file2);
21429 - if (!dest.size)
21430 - throw CImgIOException("CImg<%s>::get_load_parrec() : File '%s' does not appear to be a valid PAR-REC file.",
21431 - pixel_type(),filename);
21432 - return dest;
21433 - }
21434 -
21435 - //! In-place version of get_load_parrec().
21436 - CImgList& load_parrec(const char *const filename) {
21437 - return get_load_parrec(filename).swap(*this);
21438 - }
21439 -
21440 - //! Load YUV image sequence.
21441 - static CImgList get_load_yuv(std::FILE *const file, const char *const filename,
21442 - const unsigned int sizex, const unsigned int sizey=1,
21443 - const unsigned int first_frame=0, const int last_frame=-1,
21444 - const bool yuv2rgb=false) {
21445 - if (sizex%2 || sizey%2)
21446 - throw CImgArgumentException("CImgList<%s>::get_load_yuv() : File '%s', image dimensions along X and Y must be even numbers (given are %ux%u)\n",
21447 - pixel_type(),filename?filename:"(unknown)",sizex,sizey);
21448 - if (!sizex || !sizey)
21449 - throw CImgArgumentException("CImgList<%s>::get_load_yuv() : File '%s', given image sequence size (%u,%u) is invalid",
21450 - pixel_type(),filename?filename:"(unknown)",sizex,sizey);
21451 - if (last_frame>0 && first_frame>(unsigned int)last_frame)
21452 - throw CImgArgumentException("CImgList<%s>::get_load_yuv() : File '%s', given first frame %u is posterior to last frame %d.",
21453 - pixel_type(),filename?filename:"(unknown)",first_frame,last_frame);
21454 - if (!sizex || !sizey)
21455 - throw CImgArgumentException("CImgList<%s>::get_load_yuv() : File '%s', given frame size (%u,%u) is invalid.",
21456 - pixel_type(),filename?filename:"(unknown)",sizex,sizey);
21457 - CImgList<T> res;
21458 - CImg<unsigned char> tmp(sizex,sizey,1,3), UV(sizex/2,sizey/2,1,2);
21459 - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
21460 - bool stopflag = false;
21461 - int err;
21462 - if (first_frame) {
21463 - err = std::fseek(nfile,first_frame*(sizex*sizey + sizex*sizey/2),SEEK_CUR);
21464 - if (err) {
21465 - if (!file) cimg::fclose(nfile);
21466 - throw CImgIOException("CImgList<%s>::get_load_yuv() : File '%s' doesn't contain frame number %u "
21467 - "(out of range error).",pixel_type(),filename?filename:"(FILE*)",first_frame);
21468 - }
21469 - }
21470 - unsigned int frame;
21471 - for (frame = first_frame; !stopflag && (last_frame<0 || frame<=(unsigned int)last_frame); frame++) {
21472 - tmp.fill(0);
21473 - // TRY to read the luminance, don't replace by cimg::fread !
21474 - err = (int)std::fread((void*)(tmp.ptr()),1,(size_t)(tmp.width*tmp.height),nfile);
21475 - if (err!=(int)(tmp.width*tmp.height)) {
21476 - stopflag = true;
21477 - cimg::warn(err>0,"CImgList<%s>::get_load_yuv() : File '%s' contains incomplete data,"
21478 - " or given image dimensions (%u,%u) are incorrect.",
21479 - pixel_type(),filename?filename:"(unknown)",sizex,sizey);
21480 - } else {
21481 - UV.fill(0);
21482 - // TRY to read the luminance, don't replace by cimg::fread !
21483 - err = (int)std::fread((void*)(UV.ptr()),1,(size_t)(UV.size()),nfile);
21484 - if (err!=(int)(UV.size())) {
21485 - stopflag = true;
21486 - cimg::warn(err>0,"CImgList<%s>::get_load_yuv() : File '%s' contains incomplete data,"
21487 - " or given image dimensions (%u,%u) are incorrect.",
21488 - pixel_type(),filename?filename:"(unknown)",sizex,sizey);
21489 - } else {
21490 - cimg_forXY(UV,x,y) {
21491 - const int x2=2*x, y2=2*y;
21492 - tmp(x2,y2,1) = tmp(x2+1,y2,1) = tmp(x2,y2+1,1) = tmp(x2+1,y2+1,1) = UV(x,y,0);
21493 - tmp(x2,y2,2) = tmp(x2+1,y2,2) = tmp(x2,y2+1,2) = tmp(x2+1,y2+1,2) = UV(x,y,1);
21494 - }
21495 - if (yuv2rgb) tmp.YCbCrtoRGB();
21496 - res.insert(tmp);
21497 - }
21498 - }
21499 - }
21500 - cimg::warn(stopflag && last_frame>=0 && frame!=(unsigned int)last_frame,
21501 - "CImgList<%s>::get_load_yuv() : File '%s', frame %d not reached since only %u frames were found in the file.",
21502 - pixel_type(),filename?filename:"(unknown)",last_frame,frame-1,filename);
21503 - if (!file) cimg::fclose(nfile);
21504 - return res;
21505 - }
21506 -
21507 - //! Load YUV image sequence.
21508 - static CImgList get_load_yuv(const char *const filename,
21509 - const unsigned int sizex, const unsigned int sizey=1,
21510 - const unsigned int first_frame=0, const int last_frame=-1,
21511 - const bool yuv2rgb=false) {
21512 - return get_load_yuv(0,filename,sizex,sizey,first_frame,last_frame,yuv2rgb);
21513 - }
21514 -
21515 - //! In-place version of get_load_yuv().
21516 - CImgList& load_yuv(std::FILE *const file, const char *const filename,
21517 - const unsigned int sizex, const unsigned int sizey=1,
21518 - const unsigned int first_frame=0, const int last_frame=-1,
21519 - const bool yuv2rgb=false) {
21520 - return get_load_yuv(file,filename,sizex,sizey,first_frame,last_frame,yuv2rgb).swap(*this);
21521 - }
21522 -
21523 - //! In-place version of get_load_yuv().
21524 - CImgList& load_yuv(const char *const filename,
21525 - const unsigned int sizex, const unsigned int sizey,
21526 - const unsigned int first_frame=0, const int last_frame=-1,
21527 - const bool yuv2rgb=false) {
21528 - return get_load_yuv(filename,sizex,sizey,first_frame,last_frame,yuv2rgb).swap(*this);
21529 - }
21530 -
21531 - //! Load from OFF file format
21532 - template<typename tf,typename tc>
21533 - static CImgList<T> get_load_off(std::FILE *const file, const char *const filename,
21534 - CImgList<tf>& primitives, CImgList<tc>& colors,
21535 - const bool invert_faces=false) {
21536 - return CImg<T>::get_load_off(file,filename,primitives,colors,invert_faces).get_split('x');
21537 - }
21538 -
21539 - //! Load from OFF file format
21540 - template<typename tf,typename tc>
21541 - static CImgList<T> get_load_off(const char *const filename,
21542 - CImgList<tf>& primitives, CImgList<tc>& colors,
21543 - const bool invert_faces=false) {
21544 - return get_load_off(0,filename,primitives,colors,invert_faces);
21545 - }
21546 -
21547 - //! In-place version of get_load_off()
21548 - template<typename tf,typename tc>
21549 - CImgList& load_off(std::FILE *const file, const char *const filename, CImgList<tf>& primitives, CImgList<tc>& colors,
21550 - const bool invert_faces=false) {
21551 - return get_load_off(file,filename,primitives,colors,invert_faces).swap(*this);
21552 - }
21553 -
21554 - //! In-place version of get_load_off()
21555 - template<typename tf,typename tc>
21556 - CImgList& load_off(const char *const filename, CImgList<tf>& primitives, CImgList<tc>& colors,
21557 - const bool invert_faces=false) {
21558 - return get_load_off(filename,primitives,colors,invert_faces).swap(*this);
21559 - }
21560 -
21561 - //! Save an image list into a file.
21562 - /**
21563 - Depending on the extension of the given filename, a file format is chosen for the output file.
21564 - **/
21565 - const CImgList& save(const char *const filename) const {
21566 - if (is_empty()) throw CImgInstanceException("CImgList<%s>::save() : Instance list (%u,%p) is empty (file '%s').",
21567 - pixel_type(),size,data,filename);
21568 - if (!filename) throw CImgArgumentException("CImg<%s>::save() : Instance list (%u,%p), specified filename is (null).",
21569 - pixel_type(),size,data);
21570 - const char *ext = cimg::filename_split(filename);
21571 - if (!cimg::strncasecmp(ext,"cimg",4) || !ext[0]) return save_cimg(filename);
21572 - if (!cimg::strncasecmp(ext,"yuv",3)) return save_yuv(filename,true);
21573 - if (size==1) data[0].save(filename,-1);
21574 - else cimglist_for(*this,l) data[l].save(filename,l);
21575 - return *this;
21576 - }
21577 -
21578 - //! Save an image sequence into a YUV file
21579 - const CImgList& save_yuv(std::FILE *const file, const char *const filename=0, const bool rgb2yuv=true) const {
21580 - if (is_empty()) throw CImgInstanceException("CImgList<%s>::save_yuv() : Instance list (%u,%p) is empty (file '%s').",
21581 - pixel_type(),size,data,filename?filename:"(unknown)");
21582 - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_yuv() : Instance list (%u,%p), specified file is (null).",
21583 - pixel_type(),size,data);
21584 - if ((*this)[0].dimx()%2 || (*this)[0].dimy()%2)
21585 - throw CImgInstanceException("CImgList<%s>::save_yuv() : Image dimensions must be even numbers (current are %ux%u, file '%s').",
21586 - pixel_type(),(*this)[0].dimx(),(*this)[0].dimy(),filename?filename:"(unknown)");
21587 -
21588 - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
21589 - cimglist_for(*this,l) {
21590 - CImg<unsigned char> YCbCr((*this)[l]);
21591 - if (rgb2yuv) YCbCr.RGBtoYCbCr();
21592 - cimg::fwrite(YCbCr.ptr(),YCbCr.width*YCbCr.height,nfile);
21593 - cimg::fwrite(YCbCr.get_resize(YCbCr.width/2, YCbCr.height/2,1,3,3).ptr(0,0,0,1),
21594 - YCbCr.width*YCbCr.height/2,nfile);
21595 - }
21596 - if (!file) cimg::fclose(nfile);
21597 - return *this;
21598 - }
21599 -
21600 - //! Save an image sequence into a YUV file
21601 - const CImgList& save_yuv(const char *const filename=0, const bool rgb2yuv=true) const {
21602 - return save_yuv(0,filename,rgb2yuv);
21603 - }
21604 -
21605 - //! Save an image list into a CImg file (RAW binary file + simple header)
21606 - /**
21607 - A CImg RAW file is a simple uncompressed binary file that may be used to save list of CImg<T> images.
21608 - \param filename : name of the output file.
21609 - \return A reference to the current CImgList instance is returned.
21610 - **/
21611 - const CImgList& save_cimg(std::FILE *const file, const char *const filename=0) const {
21612 - if (is_empty()) throw CImgInstanceException("CImgList<%s>::save_cimg() : Instance list (%u,%p) is empty (file '%s').",
21613 - pixel_type(),size,data,filename?filename:"(unknown)");
21614 - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_cimg() : Instance list (%u,%p), specified file is (null).",
21615 - pixel_type(),size,data);
21616 - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
21617 - std::fprintf(nfile,"%u %s\n",size,pixel_type());
21618 - cimglist_for(*this,l) {
21619 - const CImg<T>& img = data[l];
21620 - std::fprintf(nfile,"%u %u %u %u\n",img.width,img.height,img.depth,img.dim);
21621 - if (img.data) {
21622 - if (cimg::endian()) {
21623 - CImg<T> tmp(img);
21624 - cimg::endian_swap(tmp.data,tmp.size());
21625 - cimg::fwrite(tmp.data,img.width*img.height*img.depth*img.dim,nfile);
21626 - } else cimg::fwrite(img.data,img.width*img.height*img.depth*img.dim,nfile);
21627 - }
21628 - }
21629 - if (!file) cimg::fclose(nfile);
21630 - return *this;
21631 - }
21632 -
21633 - //! Save an image list into a CImg file (RAW binary file + simple header)
21634 - const CImgList& save_cimg(const char *const filename) const {
21635 - return save_cimg(0,filename);
21636 - }
21637 -
21638 - //! Save an image list into a OFF file.
21639 - template<typename tf, typename tc>
21640 - const CImgList& save_off(std::FILE *const file, const char *const filename,
21641 - const CImgList<tf>& primitives, const CImgList<tc>& colors, const bool invert_faces=false) const {
21642 - get_append('x').save_off(file,filename,primitives,colors,invert_faces);
21643 - return *this;
21644 - }
21645 -
21646 - //! Save an image list into a OFF file.
21647 - template<typename tf, typename tc>
21648 - const CImgList& save_off(const char *const filename,
21649 - const CImgList<tf>& primitives, const CImgList<tc>& colors, const bool invert_faces=false) const {
21650 - return save_off(filename,primitives,colors,invert_faces);
21651 - }
21652 -
21653 - //! Return a single image which is the concatenation of all images of the current CImgList instance.
21654 - /**
21655 - \param axe : specify the axe for image concatenation. Can be 'x','y','z' or 'v'.
21656 - \param align : specify the alignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom).
21657 - \return A CImg<T> image corresponding to the concatenation is returned.
21658 - **/
21659 - CImg<T> get_append(const char axe='x',const char align='c') const {
21660 - if (is_empty()) return CImg<T>();
21661 - unsigned int dx=0,dy=0,dz=0,dv=0,pos=0;
21662 - CImg<T> res;
21663 - switch(cimg::uncase(axe)) {
21664 - case 'x': {
21665 - cimglist_for(*this,l) {
21666 - const CImg<T>& img = (*this)[l];
21667 - dx += img.width;
21668 - dy = cimg::max(dy,img.height);
21669 - dz = cimg::max(dz,img.depth);
21670 - dv = cimg::max(dv,img.dim);
21671 - }
21672 - res.assign(dx,dy,dz,dv,0);
21673 - switch (cimg::uncase(align)) {
21674 - case 'p' : { cimglist_for(*this,ll) { res.draw_image((*this)[ll],pos,0,0,0); pos+=(*this)[ll].width; }} break;
21675 - case 'n' : { cimglist_for(*this,ll) {
21676 - res.draw_image((*this)[ll],pos,dy-(*this)[ll].height,dz-(*this)[ll].depth,dv-(*this)[ll].dim); pos+=(*this)[ll].width;
21677 - }} break;
21678 - default : { cimglist_for(*this,ll) {
21679 - res.draw_image((*this)[ll],pos,(dy-(*this)[ll].height)/2,(dz-(*this)[ll].depth)/2,(dv-(*this)[ll].dim)/2);
21680 - pos+=(*this)[ll].width;
21681 - }} break;
21682 - }
21683 - } break;
21684 - case 'y': {
21685 - cimglist_for(*this,l) {
21686 - const CImg<T>& img = (*this)[l];
21687 - dx = cimg::max(dx,img.width);
21688 - dy += img.height;
21689 - dz = cimg::max(dz,img.depth);
21690 - dv = cimg::max(dv,img.dim);
21691 - }
21692 - res.assign(dx,dy,dz,dv,0);
21693 - switch (cimg::uncase(align)) {
21694 - case 'p': { cimglist_for(*this,ll) { res.draw_image((*this)[ll],0,pos,0,0); pos+=(*this)[ll].height; }} break;
21695 - case 'n': { cimglist_for(*this,ll) {
21696 - res.draw_image((*this)[ll],dx-(*this)[ll].width,pos,dz-(*this)[ll].depth,dv-(*this)[ll].dim); pos+=(*this)[ll].height;
21697 - }} break;
21698 - default : { cimglist_for(*this,ll) {
21699 - res.draw_image((*this)[ll],(dx-(*this)[ll].width)/2,pos,(dz-(*this)[ll].depth)/2,(dv-(*this)[ll].dim)/2);
21700 - pos+=(*this)[ll].height;
21701 - }} break;
21702 - }
21703 - } break;
21704 - case 'z': {
21705 - cimglist_for(*this,l) {
21706 - const CImg<T>& img = (*this)[l];
21707 - dx = cimg::max(dx,img.width);
21708 - dy = cimg::max(dy,img.height);
21709 - dz += img.depth;
21710 - dv = cimg::max(dv,img.dim);
21711 - }
21712 - res.assign(dx,dy,dz,dv,0);
21713 - switch (cimg::uncase(align)) {
21714 - case 'p': { cimglist_for(*this,ll) { res.draw_image((*this)[ll],0,0,pos,0); pos+=(*this)[ll].depth; }} break;
21715 - case 'n': { cimglist_for(*this,ll) {
21716 - res.draw_image((*this)[ll],dx-(*this)[ll].width,dy-(*this)[ll].height,pos,dv-(*this)[ll].dim); pos+=(*this)[ll].depth;
21717 - }} break;
21718 - case 'c': { cimglist_for(*this,ll) {
21719 - res.draw_image((*this)[ll],(dx-(*this)[ll].width)/2,(dy-(*this)[ll].height)/2,pos,(dv-(*this)[ll].dim)/2);
21720 - pos+=(*this)[ll].depth;
21721 - }} break;
21722 - }
21723 - } break;
21724 - case 'v': {
21725 - cimglist_for(*this,l) {
21726 - const CImg<T>& img = (*this)[l];
21727 - dx = cimg::max(dx,img.width);
21728 - dy = cimg::max(dy,img.height);
21729 - dz = cimg::max(dz,img.depth);
21730 - dv += img.dim;
21731 - }
21732 - res.assign(dx,dy,dz,dv,0);
21733 - switch (cimg::uncase(align)) {
21734 - case 'p': { cimglist_for(*this,ll) { res.draw_image((*this)[ll],0,0,0,pos); pos+=(*this)[ll].dim; }} break;
21735 - case 'n': { cimglist_for(*this,ll) {
21736 - res.draw_image((*this)[ll],dx-(*this)[ll].width,dy-(*this)[ll].height,dz-(*this)[ll].depth,pos); pos+=(*this)[ll].dim;
21737 - }} break;
21738 - case 'c': { cimglist_for(*this,ll) {
21739 - res.draw_image((*this)[ll],(dx-(*this)[ll].width)/2,(dy-(*this)[ll].height)/2,(dz-(*this)[ll].depth)/2,pos);
21740 - pos+=(*this)[ll].dim;
21741 - }} break;
21742 - }
21743 - } break;
21744 - default: throw CImgArgumentException("CImg<%s>::get_append() : unknow axe '%c', must be 'x','y','z' or 'v'",pixel_type(),axe);
21745 - }
21746 - return res;
21747 - }
21748 -
21749 - // Create an auto-cropped font (along the X axis) from a input font \p font.
21750 - CImgList<T> get_crop_font() const {
21751 - CImgList<T> res;
21752 - cimglist_for(*this,l) {
21753 - const CImg<T>& letter = (*this)[l];
21754 - int xmin = letter.width, xmax = 0;
21755 - cimg_forXY(letter,x,y) if (letter(x,y)) { if (x<xmin) xmin=x; if (x>xmax) xmax=x; }
21756 - if (xmin>xmax) res.insert(CImg<T>(letter.width,letter.height,1,letter.dim,0));
21757 - else res.insert(letter.get_crop(xmin,0,xmax,letter.height-1));
21758 - }
21759 - res[' '].resize(res['f'].width);
21760 - res[' '+256].resize(res['f'].width);
21761 - return res;
21762 - }
21763 -
21764 - CImgList<T>& crop_font() {
21765 - return get_crop_font().swap(*this);
21766 - }
21767 -
21768 - static CImgList<T> get_font(const unsigned int *const font,const unsigned int w,const unsigned int h,
21769 - const unsigned int paddingx, const unsigned int paddingy, const bool variable_size=true) {
21770 - CImgList<T> res = CImgList<T>(256,w,h,1,3).insert(CImgList<T>(256,w,h,1,1));
21771 - const unsigned int *ptr = font;
21772 - unsigned int m = 0, val = 0;
21773 - for (unsigned int y=0; y<h; y++)
21774 - for (unsigned int x=0; x<256*w; x++) {
21775 - m>>=1; if (!m) { m=0x80000000; val = *(ptr++); }
21776 - CImg<T>& img = res[x/w], &mask = res[x/w+256];
21777 - unsigned int xm = x%w;
21778 - img(xm,y,0) = img(xm,y,1) = img(xm,y,2) = mask(xm,y,0) = (T)((val&m)?1:0);
21779 - }
21780 - if (variable_size) res.crop_font();
21781 - if (paddingx || paddingy) cimglist_for(res,l) res[l].resize(res[l].dimx()+paddingx, res[l].dimy()+paddingy,1,-100,0);
21782 - return res;
21783 - }
21784 -
21785 - //! Return a CImg pre-defined font with desired size
21786 - /**
21787 - \param font_height = height of the desired font (can be 11,13,24,38 or 57)
21788 - \param fixed_size = tell if the font has a fixed or variable width.
21789 - **/
21790 - static CImgList<T> get_font(const unsigned int font_width, const bool variable_size=true) {
21791 - if (font_width<=11) {
21792 - static CImgList<T> font7x11, nfont7x11;
21793 - if (!variable_size && font7x11.is_empty()) font7x11 = get_font(cimg::font7x11,7,11,1,0,false);
21794 - if (variable_size && nfont7x11.is_empty()) nfont7x11 = get_font(cimg::font7x11,7,11,1,0,true);
21795 - return variable_size?nfont7x11:font7x11;
21796 - }
21797 - if (font_width<=13) {
21798 - static CImgList<T> font10x13, nfont10x13;
21799 - if (!variable_size && font10x13.is_empty()) font10x13 = get_font(cimg::font10x13,10,13,1,0,false);
21800 - if (variable_size && nfont10x13.is_empty()) nfont10x13 = get_font(cimg::font10x13,10,13,1,0,true);
21801 - return variable_size?nfont10x13:font10x13;
21802 - }
21803 - if (font_width<=17) {
21804 - static CImgList<T> font8x17, nfont8x17;
21805 - if (!variable_size && font8x17.is_empty()) font8x17 = get_font(cimg::font8x17,8,17,1,0,false);
21806 - if (variable_size && nfont8x17.is_empty()) nfont8x17 = get_font(cimg::font8x17,8,17,1,0,true);
21807 - return variable_size?nfont8x17:font8x17;
21808 - }
21809 - if (font_width<=19) {
21810 - static CImgList<T> font10x19, nfont10x19;
21811 - if (!variable_size && font10x19.is_empty()) font10x19 = get_font(cimg::font10x19,10,19,2,0,false);
21812 - if (variable_size && nfont10x19.is_empty()) nfont10x19 = get_font(cimg::font10x19,10,19,2,0,true);
21813 - return variable_size?nfont10x19:font10x19;
21814 - }
21815 - if (font_width<=24) {
21816 - static CImgList<T> font12x24, nfont12x24;
21817 - if (!variable_size && font12x24.is_empty()) font12x24 = get_font(cimg::font12x24,12,24,2,0,false);
21818 - if (variable_size && nfont12x24.is_empty()) nfont12x24 = get_font(cimg::font12x24,12,24,2,0,true);
21819 - return variable_size?nfont12x24:font12x24;
21820 - }
21821 - if (font_width<=32) {
21822 - static CImgList<T> font16x32, nfont16x32;
21823 - if (!variable_size && font16x32.is_empty()) font16x32 = get_font(cimg::font16x32,16,32,2,0,false);
21824 - if (variable_size && nfont16x32.is_empty()) nfont16x32 = get_font(cimg::font16x32,16,32,2,0,true);
21825 - return variable_size?nfont16x32:font16x32;
21826 - }
21827 - if (font_width<=38) {
21828 - static CImgList<T> font19x38, nfont19x38;
21829 - if (!variable_size && font19x38.is_empty()) font19x38 = get_font(cimg::font19x38,19,38,3,0,false);
21830 - if (variable_size && nfont19x38.is_empty()) nfont19x38 = get_font(cimg::font19x38,19,38,3,0,true);
21831 - return variable_size?nfont19x38:font19x38;
21832 - }
21833 - static CImgList<T> font29x57, nfont29x57;
21834 - if (!variable_size && font29x57.is_empty()) font29x57 = get_font(cimg::font29x57,29,57,5,0,false);
21835 - if (variable_size && nfont29x57.is_empty()) nfont29x57 = get_font(cimg::font29x57,29,57,5,0,true);
21836 - return variable_size?nfont29x57:font29x57;
21837 - }
21838 -
21839 - //! Display the current CImgList instance in an existing CImgDisplay window (by reference).
21840 - /**
21841 - This function displays the list images of the current CImgList instance into an existing CImgDisplay window.
21842 - Images of the list are concatenated in a single temporarly image for visualization purposes.
21843 - The function returns immediately.
21844 - \param disp : reference to an existing CImgDisplay instance, where the current image list will be displayed.
21845 - \param axe : specify the axe for image concatenation. Can be 'x','y','z' or 'v'.
21846 - \param align : specify the alignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom).
21847 - \return A reference to the current CImgList instance is returned.
21848 - **/
21849 - const CImgList& display(CImgDisplay& disp, const char axe='x', const char align='c') const {
21850 - get_append(axe,align).display(disp);
21851 - return *this;
21852 - }
21853 -
21854 - //! Display the current CImgList instance in a new display window.
21855 - /**
21856 - This function opens a new window with a specific title and displays the list images of the current CImgList instance into it.
21857 - Images of the list are concatenated in a single temporarly image for visualization purposes.
21858 - The function returns when a key is pressed or the display window is closed by the user.
21859 - \param title : specify the title of the opening display window.
21860 - \param axe : specify the axe for image concatenation. Can be 'x','y','z' or 'v'.
21861 - \param align : specify the alignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom).
21862 - \param min_size : specify the minimum size of the opening display window. Images having dimensions below this
21863 - size will be upscaled.
21864 - \param max_size : specify the maximum size of the opening display window. Images having dimensions above this
21865 - size will be downscaled.
21866 - \return A reference to the current CImgList instance is returned.
21867 - **/
21868 - const CImgList& display(const char* title,const char axe='x',const char align='c',
21869 - const int min_size=128,const int max_size=1024) const {
21870 - get_append(axe,align).display(title,min_size,max_size);
21871 - return *this;
21872 - }
21873 -
21874 - //! Display the current CImgList instance in a new display window.
21875 - /**
21876 - This function opens a new window and displays the list images of the current CImgList instance into it.
21877 - Images of the list are concatenated in a single temporarly image for visualization purposes.
21878 - The function returns when a key is pressed or the display window is closed by the user.
21879 - \param axe : specify the axe for image concatenation. Can be 'x','y','z' or 'v'.
21880 - \param align : specify the alignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom).
21881 - \param min_size : specify the minimum size of the opening display window. Images having dimensions below this
21882 - size will be upscaled.
21883 - \param max_size : specify the maximum size of the opening display window. Images having dimensions above this
21884 - size will be downscaled.
21885 - \return A reference to the current CImgList instance is returned.
21886 - **/
21887 - const CImgList& display(const char axe='x',const char align='c',
21888 - const int min_size=128,const int max_size=1024) const {
21889 - return display(" ",axe,align,min_size,max_size);
21890 - }
21891 -
21892 - //! Rescale and center 3D object
21893 - CImgList& resize_object3d(const float siz=100, const bool centering=true) {
21894 - float xm = (float)((*this)(0,0)), ym = (float)((*this)(0,1)), zm = (float)((*this)(0,2)), xM = xm, yM = ym, zM = zm;
21895 - for (unsigned int p=1; p<size; p++) {
21896 - const float x = (float)((*this)(p,0)), y = (float)((*this)(p,1)), z = (float)((*this)(p,2));
21897 - if (x<xm) xm = x;
21898 - if (y<ym) ym = y;
21899 - if (z<zm) zm = z;
21900 - if (x>xM) xM = x;
21901 - if (y>yM) yM = y;
21902 - if (z>zM) zM = z;
21903 - }
21904 - const float
21905 - cx = 0.5f*(xm+xM),
21906 - cy = 0.5f*(ym+yM),
21907 - cz = 0.5f*(zm+zM),
21908 - delta = cimg::max(xM-xm,yM-ym,zM-zm),
21909 - ratio = (siz>=0)?siz/delta:-siz/100;
21910 - if (centering) cimglist_for(*this,l) {
21911 - T &x = (*this)(l,0), &y = (*this)(l,1), &z = (*this)(l,2);
21912 - x = (T)((x-cx)*ratio);
21913 - y = (T)((y-cy)*ratio);
21914 - z = (T)((z-cz)*ratio);
21915 - } else cimglist_for(*this,l) {
21916 - T &x = (*this)(l,0), &y = (*this)(l,1), &z = (*this)(l,2);
21917 - x = (T)(cx+(x-cx)*ratio);
21918 - y = (T)(cy+(y-cy)*ratio);
21919 - z = (T)(cz+(z-cz)*ratio);
21920 - }
21921 - return *this;
21922 - }
21923 -
21924 - //! Get a rescaled and centered version of the 3D object
21925 - CImgList get_resize_object3d(const float siz=100, const bool centering=true) const {
21926 - return CImgList<T>(*this).resize_object3d(siz,centering);
21927 - }
21928 -
21929 - // Swap fields of two CImgList instances.
21930 - CImgList& swap(CImgList& list) {
21931 - cimg::swap(size,list.size);
21932 - cimg::swap(allocsize,list.allocsize);
21933 - cimg::swap(data,list.data);
21934 - return list;
21935 - }
21936 -
21937 - };
21938 -
21939 - /*
21940 - #-----------------------------------------
21941 - #
21942 - #
21943 - #
21944 - # Complete previously defined functions
21945 - #
21946 - #
21947 - #
21948 - #------------------------------------------
21949 - */
21950 -
21951 -#ifdef cimg_use_visualcpp6
21952 - template<typename t> inline CImg<t> operator+(const CImg<t>& img, const t& val) {
21953 - return CImg<t>(img,false)+=val;
21954 - }
21955 -#else
21956 - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator+(const CImg<t1>& img, const t2& val) {
21957 - typedef typename cimg::largest<t1,t2>::type restype;
21958 - return CImg<restype>(img,false)+=val;
21959 - }
21960 -#endif
21961 -
21962 -#ifdef cimg_use_visualcpp6
21963 - template<typename t> inline CImg<t> operator+(const t& val, const CImg<t>& img) {
21964 - return img+val;
21965 - }
21966 -#else
21967 - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator+(const t1& val, const CImg<t2>& img) {
21968 - return img+val;
21969 - }
21970 -#endif
21971 -
21972 -#ifdef cimg_use_visualcpp6
21973 - template<typename t> inline CImgList<t> operator+(const CImgList<t>& list, const t& val) {
21974 - return CImgList<t>(list)+=val;
21975 - }
21976 -#else
21977 - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator+(const CImgList<t1>& list, const t2& val) {
21978 - typedef typename cimg::largest<t1,t2>::type restype;
21979 - return CImgList<restype>(list)+=val;
21980 - }
21981 -#endif
21982 -
21983 -#ifdef cimg_use_visualcpp6
21984 - template<typename t> inline CImgList<t> operator+(const t& val, const CImgList<t>& list) {
21985 - return list+val;
21986 - }
21987 -#else
21988 - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator+(const t1& val, const CImgList<t2>& list) {
21989 - return list+val;
21990 - }
21991 -#endif
21992 -
21993 - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator+(const CImg<t1>& img1, const CImg<t2>& img2) {
21994 - typedef typename cimg::largest<t1,t2>::type restype;
21995 - return CImg<restype>(img1,false)+=img2;
21996 - }
21997 -
21998 - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator+(const CImg<t1>& img, const CImgList<t2>& list) {
21999 - typedef typename cimg::largest<t1,t2>::type restype;
22000 - return CImgList<restype>(list)+=img;
22001 - }
22002 -
22003 - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator+(const CImgList<t1>& list, const CImg<t2>& img) {
22004 - return img+list;
22005 - }
22006 -
22007 - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator+(const CImgList<t1>& list1, const CImgList<t2>& list2) {
22008 - typedef typename cimg::largest<t1,t2>::type restype;
22009 - return CImgList<restype>(list1)+=list2;
22010 - }
22011 -
22012 -#ifdef cimg_use_visualcpp6
22013 - template<typename t> inline CImg<t> operator-(const CImg<t>& img, const t& val) {
22014 - return CImg<t>(img,false)-=val;
22015 - }
22016 -#else
22017 - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator-(const CImg<t1>& img, const t2& val) {
22018 - typedef typename cimg::largest<t1,t2>::type restype;
22019 - return CImg<restype>(img,false)-=val;
22020 - }
22021 -#endif
22022 -
22023 -#ifdef cimg_use_visualcpp6
22024 - template<typename t> inline CImg<t> operator-(const t& val, const CImg<t>& img) {
22025 - return CImg<t>(img.width,img.height,img.depth,img.dim,val)-=img;
22026 - }
22027 -#else
22028 - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator-(const t1& val, const CImg<t2>& img) {
22029 - typedef typename cimg::largest<t1,t2>::type restype;
22030 - return CImg<restype>(img.width,img.height,img.depth,img.dim,(restype)val)-=img;
22031 - }
22032 -#endif
22033 -
22034 -#ifdef cimg_use_visualcpp6
22035 - template<typename t> inline CImgList<t> operator-(const CImgList<t>& list, const t& val) {
22036 - return CImgList<t>(list)-=val;
22037 - }
22038 -#else
22039 - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator-(const CImgList<t1>& list, const t2& val) {
22040 - typedef typename cimg::largest<t1,t2>::type restype;
22041 - return CImgList<restype>(list)-=val;
22042 - }
22043 -#endif
22044 -
22045 -#ifdef cimg_use_visualcpp6
22046 - template<typename t> inline CImgList<double> operator-(const t& val, const CImgList<t>& list) {
22047 - CImgList<t> res(list.size);
22048 - cimglist_for(res,l) res[l] = val-list[l];
22049 - return res;
22050 - }
22051 -#else
22052 - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator-(const t1& val, const CImgList<t2>& list) {
22053 - typedef typename cimg::largest<t1,t2>::type restype;
22054 - CImgList<restype> res(list.size);
22055 - cimglist_for(res,l) res[l] = val-list[l];
22056 - return res;
22057 - }
22058 -#endif
22059 -
22060 - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator-(const CImg<t1>& img1, const CImg<t2>& img2) {
22061 - typedef typename cimg::largest<t1,t2>::type restype;
22062 - return CImg<restype>(img1,false)-=img2;
22063 - }
22064 -
22065 - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator-(const CImg<t1>& img, const CImgList<t2>& list) {
22066 - typedef typename cimg::largest<t1,t2>::type restype;
22067 - CImgList<restype> res(list.size);
22068 - cimglist_for(res,l) res[l] = img-list[l];
22069 - return res;
22070 - }
22071 -
22072 - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator-(const CImgList<t1>& list, const CImg<t2>& img) {
22073 - typedef typename cimg::largest<t1,t2>::type restype;
22074 - return CImgList<restype>(list)-=img;
22075 - }
22076 -
22077 - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator-(const CImgList<t1>& list1, const CImgList<t2>& list2) {
22078 - typedef typename cimg::largest<t1,t2>::type restype;
22079 - return CImgList<restype>(list1)-=list2;
22080 - }
22081 -
22082 -#ifdef cimg_use_visualcpp6
22083 - template<typename t> inline CImg<t> operator*(const CImg<t>& img, const double val) {
22084 - return CImg<t>(img,false)*=val;
22085 - }
22086 -#else
22087 - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator*(const CImg<t1>& img, const t2& val) {
22088 - typedef typename cimg::largest<t1,t2>::type restype;
22089 - return CImg<restype>(img,false)*=val;
22090 - }
22091 -#endif
22092 -
22093 -#ifdef cimg_use_visualcpp6
22094 - template<typename t> inline CImg<t> operator*(const double val, const CImg<t>& img) {
22095 - return img*val;
22096 - }
22097 -#else
22098 - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator*(const t1& val, const CImg<t2>& img) {
22099 - return img*val;
22100 - }
22101 -#endif
22102 -
22103 -#ifdef cimg_use_visualcpp6
22104 - template<typename t> inline CImgList<t> operator*(const CImgList<t>& list, const double val) {
22105 - return CImgList<t>(list)*=val;
22106 - }
22107 -#else
22108 - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator*(const CImgList<t1>& list, const t2& val) {
22109 - typedef typename cimg::largest<t1,t2>::type restype;
22110 - return CImgList<restype>(list)*=val;
22111 - }
22112 -#endif
22113 -
22114 -#ifdef cimg_use_visualcpp6
22115 - template<typename t> inline CImgList<t> operator*(const double val, const CImgList<t>& list) {
22116 - return list*val;
22117 - }
22118 -#else
22119 - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator*(const t1& val, const CImgList<t2>& list) {
22120 - return list*val;
22121 - }
22122 -#endif
22123 -
22124 - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator*(const CImg<t1>& img1, const CImg<t2>& img2) {
22125 - typedef typename cimg::largest<t1,t2>::type restype;
22126 - if (img1.width!=img2.height)
22127 - throw CImgArgumentException("operator*() : can't multiply a matrix (%ux%u) by a matrix (%ux%u)",
22128 - img1.width,img1.height,img2.width,img2.height);
22129 - CImg<restype> res(img2.width,img1.height);
22130 - restype val;
22131 - cimg_forXY(res,i,j) { val=0; cimg_forX(img1,k) val+=img1(k,j)*img2(i,k); res(i,j) = val; }
22132 - return res;
22133 - }
22134 -
22135 - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator*(const CImg<t1>& img, const CImgList<t2>& list) {
22136 - typedef typename cimg::largest<t1,t2>::type restype;
22137 - CImgList<restype> res(list.size);
22138 - cimglist_for(res,l) res[l] = img*list[l];
22139 - return res;
22140 - }
22141 -
22142 - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator*(const CImgList<t1>& list, const CImg<t2>& img) {
22143 - typedef typename cimg::largest<t1,t2>::type restype;
22144 - CImgList<restype> res(list.size);
22145 - cimglist_for(res,l) res[l] = list[l]*img;
22146 - return res;
22147 - }
22148 -
22149 - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator*(const CImgList<t1>& list1, const CImgList<t2>& list2) {
22150 - typedef typename cimg::largest<t1,t2>::type restype;
22151 - CImgList<restype> res(cimg::min(list1.size,list2.size));
22152 - cimglist_for(res,l) res[l] = list1[l]*list2[l];
22153 - return res;
22154 - }
22155 -
22156 -#ifdef cimg_use_visualcpp6
22157 - template<typename t> inline CImg<t> operator/(const CImg<t>& img, const double val) {
22158 - return CImg<t>(img,false)/=val;
22159 - }
22160 -#else
22161 - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator/(const CImg<t1>& img, const t2& val) {
22162 - typedef typename cimg::largest<t1,t2>::type restype;
22163 - return CImg<restype>(img,false)/=val;
22164 - }
22165 -#endif
22166 -
22167 -#ifdef cimg_use_visualcpp6
22168 - template<typename t> inline CImg<t> operator/(const double val, CImg<t>& img) {
22169 - return val*img.get_inverse();
22170 - }
22171 -#else
22172 - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator/(const t1& val, CImg<t2>& img) {
22173 - return val*img.get_inverse();
22174 - }
22175 -#endif
22176 -
22177 -#ifdef cimg_use_visualcpp6
22178 - template<typename t> inline CImgList<t> operator/(const CImgList<t>& list, const double val) {
22179 - return CImgList<t>(list)/=val;
22180 - }
22181 -#else
22182 - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator/(const CImgList<t1>& list, const t2& val) {
22183 - typedef typename cimg::largest<t1,t2>::type restype;
22184 - return CImgList<restype>(list)/=val;
22185 - }
22186 -#endif
22187 -
22188 -#ifdef cimg_use_visualcpp6
22189 - template<typename t> inline CImgList<t> operator/(const double val, const CImgList<t>& list) {
22190 - CImgList<t> res(list.size);
22191 - cimglist_for(res,l) res[l] = val/list[l];
22192 - return res;
22193 - }
22194 -#else
22195 - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator/(const t1& val, const CImgList<t2>& list) {
22196 - typedef typename cimg::largest<t1,t2>::type restype;
22197 - CImgList<restype> res(list.size);
22198 - cimglist_for(res,l) res[l] = val/list[l];
22199 - return res;
22200 - }
22201 -#endif
22202 -
22203 - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator/(const CImg<t1>& img1, const CImg<t2>& img2) {
22204 - typedef typename cimg::largest<t1,t2>::type restype;
22205 - return CImg<restype>(img1,false)*=img2.get_inverse();
22206 - }
22207 -
22208 - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator/(const CImg<t1>& img, const CImgList<t2>& list) {
22209 - typedef typename cimg::largest<t1,t2>::type restype;
22210 - CImgList<restype> res(list.size);
22211 - cimglist_for(res,l) res[l] = img/list[l];
22212 - return res;
22213 - }
22214 -
22215 - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator/(const CImgList<t1>& list, const CImg<t2>& img) {
22216 - typedef typename cimg::largest<t1,t2>::type restype;
22217 - return CImgList<restype>(list)/=img;
22218 - }
22219 -
22220 - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator/(const CImgList<t1>& list1, const CImgList<t2>& list2) {
22221 - typedef typename cimg::largest<t1,t2>::type restype;
22222 - return CImgList<restype>(list1)/=list2;
22223 - }
22224 -
22225 -namespace cimg {
22226 -
22227 - //! Display a dialog box, where a user can click standard buttons.
22228 - /**
22229 - Up to 6 buttons can be defined in the dialog window.
22230 - This function returns when a user clicked one of the button or closed the dialog window.
22231 - \param title = Title of the dialog window.
22232 - \param msg = Main message displayed inside the dialog window.
22233 - \param button1_txt = Label of the 1st button.
22234 - \param button2_txt = Label of the 2nd button.
22235 - \param button3_txt = Label of the 3rd button.
22236 - \param button4_txt = Label of the 4th button.
22237 - \param button5_txt = Label of the 5th button.
22238 - \param button6_txt = Label of the 6th button.
22239 - \param logo = Logo image displayed at the left of the main message. This parameter is optional.
22240 - \param centering = Tell to center the dialog window on the screen.
22241 - \return The button number (from 0 to 5), or -1 if the dialog window has been closed by the user.
22242 - \note If a button text is set to 0, then the corresponding button (and the followings) won't appear in
22243 - the dialog box. At least one button is necessary.
22244 - **/
22245 -
22246 - template<typename t>
22247 - inline int dialog(const char *title,const char *msg,
22248 - const char *button1_txt,const char *button2_txt,
22249 - const char *button3_txt,const char *button4_txt,
22250 - const char *button5_txt,const char *button6_txt,
22251 - const CImg<t>& logo, const bool centering = false) {
22252 -#if cimg_display_type!=0
22253 - const unsigned char
22254 - black[3]={0,0,0}, white[3]={255,255,255}, gray[3]={200,200,200}, gray2[3]={150,150,150};
22255 -
22256 - // Create buttons and canvas graphics
22257 - CImgList<unsigned char> buttons, cbuttons, sbuttons;
22258 - if (button1_txt) { buttons.insert(CImg<unsigned char>().draw_text(button1_txt,0,0,black,gray,13));
22259 - if (button2_txt) { buttons.insert(CImg<unsigned char>().draw_text(button2_txt,0,0,black,gray,13));
22260 - if (button3_txt) { buttons.insert(CImg<unsigned char>().draw_text(button3_txt,0,0,black,gray,13));
22261 - if (button4_txt) { buttons.insert(CImg<unsigned char>().draw_text(button4_txt,0,0,black,gray,13));
22262 - if (button5_txt) { buttons.insert(CImg<unsigned char>().draw_text(button5_txt,0,0,black,gray,13));
22263 - if (button6_txt) { buttons.insert(CImg<unsigned char>().draw_text(button6_txt,0,0,black,gray,13));
22264 - }}}}}}
22265 - if (!buttons.size) throw CImgArgumentException("cimg::dialog() : No buttons have been defined. At least one is necessary");
22266 -
22267 - unsigned int bw=0, bh=0;
22268 - cimglist_for(buttons,l) { bw = cimg::max(bw,buttons[l].width); bh = cimg::max(bh,buttons[l].height); }
22269 - bw+=8; bh+=8;
22270 - if (bw<64) bw=64;
22271 - if (bw>128) bw=128;
22272 - if (bh<24) bh=24;
22273 - if (bh>48) bh=48;
22274 -
22275 - CImg<unsigned char> button = CImg<unsigned char>(bw,bh,1,3).
22276 - draw_rectangle(0,0,bw-1,bh-1,gray).
22277 - draw_line(0,0,bw-1,0,white).draw_line(0,bh-1,0,0,white).
22278 - draw_line(bw-1,0,bw-1,bh-1,black).draw_line(bw-1,bh-1,0,bh-1,black).
22279 - draw_line(1,bh-2,bw-2,bh-2,gray2).draw_line(bw-2,bh-2,bw-2,1,gray2);
22280 - CImg<unsigned char> sbutton = CImg<unsigned char>(bw,bh,1,3).
22281 - draw_rectangle(0,0,bw-1,bh-1,gray).
22282 - draw_line(0,0,bw-1,0,black).draw_line(bw-1,0,bw-1,bh-1,black).
22283 - draw_line(bw-1,bh-1,0,bh-1,black).draw_line(0,bh-1,0,0,black).
22284 - draw_line(1,1,bw-2,1,white).draw_line(1,bh-2,1,1,white).
22285 - draw_line(bw-2,1,bw-2,bh-2,black).draw_line(bw-2,bh-2,1,bh-2,black).
22286 - draw_line(2,bh-3,bw-3,bh-3,gray2).draw_line(bw-3,bh-3,bw-3,2,gray2).
22287 - draw_line(4,4,bw-5,4,black,0xAAAAAAAA).draw_line(bw-5,4,bw-5,bh-5,black,0xAAAAAAAA).
22288 - draw_line(bw-5,bh-5,4,bh-5,black,0xAAAAAAAA).draw_line(4,bh-5,4,4,black,0xAAAAAAAA);
22289 - CImg<unsigned char> cbutton = CImg<unsigned char>(bw,bh,1,3).
22290 - draw_rectangle(0,0,bw-1,bh-1,black).draw_rectangle(1,1,bw-2,bh-2,gray2).draw_rectangle(2,2,bw-3,bh-3,gray).
22291 - draw_line(4,4,bw-5,4,black,0xAAAAAAAA).draw_line(bw-5,4,bw-5,bh-5,black,0xAAAAAAAA).
22292 - draw_line(bw-5,bh-5,4,bh-5,black,0xAAAAAAAA).draw_line(4,bh-5,4,4,black,0xAAAAAAAA);
22293 -
22294 - cimglist_for(buttons,ll) {
22295 - cbuttons.insert(CImg<unsigned char>(cbutton).draw_image(buttons[ll],1+(bw-buttons[ll].dimx())/2,1+(bh-buttons[ll].dimy())/2));
22296 - sbuttons.insert(CImg<unsigned char>(sbutton).draw_image(buttons[ll],(bw-buttons[ll].dimx())/2,(bh-buttons[ll].dimy())/2));
22297 - buttons[ll] = CImg<unsigned char>(button).draw_image(buttons[ll],(bw-buttons[ll].dimx())/2,(bh-buttons[ll].dimy())/2);
22298 - }
22299 -
22300 - CImg<unsigned char> canvas;
22301 - if (msg) canvas = CImg<unsigned char>().draw_text(msg,0,0,black,gray,13);
22302 - const unsigned int
22303 - bwall = (buttons.size-1)*(12+bw) + bw,
22304 - w = cimg::max(196U,36+logo.width+canvas.width, 24+bwall),
22305 - h = cimg::max(96U,36+canvas.height+bh,36+logo.height+bh),
22306 - lx = 12 + (canvas.data?0:((w-24-logo.width)/2)),
22307 - ly = (h-12-bh-logo.height)/2,
22308 - tx = lx+logo.width+12,
22309 - ty = (h-12-bh-canvas.height)/2,
22310 - bx = (w-bwall)/2,
22311 - by = h-12-bh;
22312 -
22313 - if (canvas.data)
22314 - canvas = CImg<unsigned char>(w,h,1,3).
22315 - draw_rectangle(0,0,w-1,h-1,gray).
22316 - draw_line(0,0,w-1,0,white).draw_line(0,h-1,0,0,white).
22317 - draw_line(w-1,0,w-1,h-1,black).draw_line(w-1,h-1,0,h-1,black).
22318 - draw_image(canvas,tx,ty);
22319 - else
22320 - canvas = CImg<unsigned char>(w,h,1,3).
22321 - draw_rectangle(0,0,w-1,h-1,gray).
22322 - draw_line(0,0,w-1,0,white).draw_line(0,h-1,0,0,white).
22323 - draw_line(w-1,0,w-1,h-1,black).draw_line(w-1,h-1,0,h-1,black);
22324 - if (logo.data) canvas.draw_image(logo,lx,ly);
22325 -
22326 - unsigned int xbuttons[6];
22327 - cimglist_for(buttons,lll) { xbuttons[lll] = bx+(bw+12)*lll; canvas.draw_image(buttons[lll],xbuttons[lll],by); }
22328 -
22329 - // Open window and enter events loop
22330 - CImgDisplay disp(canvas,title?title:" ",0,3,false,centering?true:false);
22331 - if (centering) disp.move((CImgDisplay::screen_dimx()-disp.dimx())/2,
22332 - (CImgDisplay::screen_dimy()-disp.dimy())/2);
22333 - bool stopflag = false, refresh = false;
22334 - int oselected = -1, oclicked = -1, selected = -1, clicked = -1;
22335 - while (!disp.is_closed && !stopflag) {
22336 - if (refresh) {
22337 - if (clicked>=0) CImg<unsigned char>(canvas).draw_image(cbuttons[clicked],xbuttons[clicked],by).display(disp);
22338 - else {
22339 - if (selected>=0) CImg<unsigned char>(canvas).draw_image(sbuttons[selected],xbuttons[selected],by).display(disp);
22340 - else canvas.display(disp);
22341 - }
22342 - refresh = false;
22343 - }
22344 - disp.wait(15);
22345 - if (disp.is_resized) disp.resize(disp);
22346 -
22347 - if (disp.button&1) {
22348 - oclicked = clicked;
22349 - clicked = -1;
22350 - cimglist_for(buttons,l)
22351 - if (disp.mouse_y>=(int)by && disp.mouse_y<(int)(by+bh) &&
22352 - disp.mouse_x>=(int)xbuttons[l] && disp.mouse_x<(int)(xbuttons[l]+bw)) {
22353 - clicked = selected = l;
22354 - refresh = true;
22355 - }
22356 - if (clicked!=oclicked) refresh = true;
22357 - } else if (clicked>=0) stopflag = true;
22358 -
22359 - if (disp.key) {
22360 - oselected = selected;
22361 - switch (disp.key) {
22362 - case cimg::keyESC: selected=-1; stopflag=true; break;
22363 - case cimg::keyENTER: if (selected<0) selected=0; stopflag = true; break;
22364 - case cimg::keyTAB:
22365 - case cimg::keyARROWRIGHT:
22366 - case cimg::keyARROWDOWN: selected = (selected+1)%buttons.size; break;
22367 - case cimg::keyARROWLEFT:
22368 - case cimg::keyARROWUP: selected = (selected+buttons.size-1)%buttons.size; break;
22369 - }
22370 - disp.key = 0;
22371 - if (selected!=oselected) refresh = true;
22372 - }
22373 - }
22374 - if (disp.is_closed) selected = -1;
22375 - return selected;
22376 -#else
22377 - std::fprintf(stderr,"<%s>\n\n%s\n\n",title,msg);
22378 - return -1+0*(int)(button1_txt-button2_txt+button3_txt-button4_txt+button5_txt-button6_txt+logo.width+(int)centering);
22379 -#endif
22380 - }
22381 -
22382 - inline int dialog(const char *title,const char *msg,
22383 - const char *button1_txt,const char *button2_txt,const char *button3_txt,
22384 - const char *button4_txt,const char *button5_txt,const char *button6_txt,
22385 - const bool centering) {
22386 - return dialog(title,msg,button1_txt,button2_txt,button3_txt,button4_txt,button5_txt,button6_txt,
22387 - CImg<unsigned char>::get_logo40x38(),centering);
22388 - }
22389 -
22390 -
22391 - // Inner routine used by the Marching cube algorithm
22392 - template<typename t> inline int _marching_cubes_indice(const unsigned int edge, const CImg<t>& indices1, const CImg<t>& indices2,
22393 - const unsigned int x, const unsigned int y, const unsigned int nx, const unsigned int ny) {
22394 - switch (edge) {
22395 - case 0: return indices1(x,y,0);
22396 - case 1: return indices1(nx,y,1);
22397 - case 2: return indices1(x,ny,0);
22398 - case 3: return indices1(x,y,1);
22399 - case 4: return indices2(x,y,0);
22400 - case 5: return indices2(nx,y,1);
22401 - case 6: return indices2(x,ny,0);
22402 - case 7: return indices2(x,y,1);
22403 - case 8: return indices1(x,y,2);
22404 - case 9: return indices1(nx,y,2);
22405 - case 10: return indices1(nx,ny,2);
22406 - case 11: return indices1(x,ny,2);
22407 - }
22408 - return 0;
22409 - }
22410 -
22411 - //! Polygonize an implicit function
22412 - // This function uses the Marching Cubes Tables published on the web page :
22413 - // http://astronomy.swin.edu.au/~pbourke/modelling/polygonise/
22414 - template<typename tfunc, typename tp, typename tf>
22415 - inline void marching_cubes(const tfunc& func, const float isovalue,
22416 - const float x0,const float y0,const float z0,
22417 - const float x1,const float y1,const float z1,
22418 - const float resx,const float resy,const float resz,
22419 - CImgList<tp>& points, CImgList<tf>& primitives,
22420 - const bool invert_faces) {
22421 -
22422 - static unsigned int edges[256]={
22423 - 0x000, 0x109, 0x203, 0x30a, 0x406, 0x50f, 0x605, 0x70c, 0x80c, 0x905, 0xa0f, 0xb06, 0xc0a, 0xd03, 0xe09, 0xf00,
22424 - 0x190, 0x99 , 0x393, 0x29a, 0x596, 0x49f, 0x795, 0x69c, 0x99c, 0x895, 0xb9f, 0xa96, 0xd9a, 0xc93, 0xf99, 0xe90,
22425 - 0x230, 0x339, 0x33 , 0x13a, 0x636, 0x73f, 0x435, 0x53c, 0xa3c, 0xb35, 0x83f, 0x936, 0xe3a, 0xf33, 0xc39, 0xd30,
22426 - 0x3a0, 0x2a9, 0x1a3, 0xaa , 0x7a6, 0x6af, 0x5a5, 0x4ac, 0xbac, 0xaa5, 0x9af, 0x8a6, 0xfaa, 0xea3, 0xda9, 0xca0,
22427 - 0x460, 0x569, 0x663, 0x76a, 0x66 , 0x16f, 0x265, 0x36c, 0xc6c, 0xd65, 0xe6f, 0xf66, 0x86a, 0x963, 0xa69, 0xb60,
22428 - 0x5f0, 0x4f9, 0x7f3, 0x6fa, 0x1f6, 0xff , 0x3f5, 0x2fc, 0xdfc, 0xcf5, 0xfff, 0xef6, 0x9fa, 0x8f3, 0xbf9, 0xaf0,
22429 - 0x650, 0x759, 0x453, 0x55a, 0x256, 0x35f, 0x55 , 0x15c, 0xe5c, 0xf55, 0xc5f, 0xd56, 0xa5a, 0xb53, 0x859, 0x950,
22430 - 0x7c0, 0x6c9, 0x5c3, 0x4ca, 0x3c6, 0x2cf, 0x1c5, 0xcc , 0xfcc, 0xec5, 0xdcf, 0xcc6, 0xbca, 0xac3, 0x9c9, 0x8c0,
22431 - 0x8c0, 0x9c9, 0xac3, 0xbca, 0xcc6, 0xdcf, 0xec5, 0xfcc, 0xcc , 0x1c5, 0x2cf, 0x3c6, 0x4ca, 0x5c3, 0x6c9, 0x7c0,
22432 - 0x950, 0x859, 0xb53, 0xa5a, 0xd56, 0xc5f, 0xf55, 0xe5c, 0x15c, 0x55 , 0x35f, 0x256, 0x55a, 0x453, 0x759, 0x650,
22433 - 0xaf0, 0xbf9, 0x8f3, 0x9fa, 0xef6, 0xfff, 0xcf5, 0xdfc, 0x2fc, 0x3f5, 0xff , 0x1f6, 0x6fa, 0x7f3, 0x4f9, 0x5f0,
22434 - 0xb60, 0xa69, 0x963, 0x86a, 0xf66, 0xe6f, 0xd65, 0xc6c, 0x36c, 0x265, 0x16f, 0x66 , 0x76a, 0x663, 0x569, 0x460,
22435 - 0xca0, 0xda9, 0xea3, 0xfaa, 0x8a6, 0x9af, 0xaa5, 0xbac, 0x4ac, 0x5a5, 0x6af, 0x7a6, 0xaa , 0x1a3, 0x2a9, 0x3a0,
22436 - 0xd30, 0xc39, 0xf33, 0xe3a, 0x936, 0x83f, 0xb35, 0xa3c, 0x53c, 0x435, 0x73f, 0x636, 0x13a, 0x33 , 0x339, 0x230,
22437 - 0xe90, 0xf99, 0xc93, 0xd9a, 0xa96, 0xb9f, 0x895, 0x99c, 0x69c, 0x795, 0x49f, 0x596, 0x29a, 0x393, 0x99 , 0x190,
22438 - 0xf00, 0xe09, 0xd03, 0xc0a, 0xb06, 0xa0f, 0x905, 0x80c, 0x70c, 0x605, 0x50f, 0x406, 0x30a, 0x203, 0x109, 0x000 };
22439 -
22440 - static int triangles[256][16] =
22441 - {{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22442 - {0, 1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 8, 3, 9, 8, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22443 - {1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22444 - {9, 2, 10, 0, 2, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 8, 3, 2, 10, 8, 10, 9, 8, -1, -1, -1, -1, -1, -1, -1},
22445 - {3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 11, 2, 8, 11, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22446 - {1, 9, 0, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 11, 2, 1, 9, 11, 9, 8, 11, -1, -1, -1, -1, -1, -1, -1},
22447 - {3, 10, 1, 11, 10, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 10, 1, 0, 8, 10, 8, 11, 10, -1, -1, -1, -1, -1, -1, -1},
22448 - {3, 9, 0, 3, 11, 9, 11, 10, 9, -1, -1, -1, -1, -1, -1, -1}, {9, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22449 - {4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 3, 0, 7, 3, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22450 - {0, 1, 9, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 1, 9, 4, 7, 1, 7, 3, 1, -1, -1, -1, -1, -1, -1, -1},
22451 - {1, 2, 10, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 4, 7, 3, 0, 4, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1},
22452 - {9, 2, 10, 9, 0, 2, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1}, {2, 10, 9, 2, 9, 7, 2, 7, 3, 7, 9, 4, -1, -1, -1, -1},
22453 - {8, 4, 7, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 4, 7, 11, 2, 4, 2, 0, 4, -1, -1, -1, -1, -1, -1, -1},
22454 - {9, 0, 1, 8, 4, 7, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1}, {4, 7, 11, 9, 4, 11, 9, 11, 2, 9, 2, 1, -1, -1, -1, -1},
22455 - {3, 10, 1, 3, 11, 10, 7, 8, 4, -1, -1, -1, -1, -1, -1, -1}, {1, 11, 10, 1, 4, 11, 1, 0, 4, 7, 11, 4, -1, -1, -1, -1},
22456 - {4, 7, 8, 9, 0, 11, 9, 11, 10, 11, 0, 3, -1, -1, -1, -1}, {4, 7, 11, 4, 11, 9, 9, 11, 10, -1, -1, -1, -1, -1, -1, -1},
22457 - {9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 4, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22458 - {0, 5, 4, 1, 5, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 5, 4, 8, 3, 5, 3, 1, 5, -1, -1, -1, -1, -1, -1, -1},
22459 - {1, 2, 10, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 8, 1, 2, 10, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1},
22460 - {5, 2, 10, 5, 4, 2, 4, 0, 2, -1, -1, -1, -1, -1, -1, -1}, {2, 10, 5, 3, 2, 5, 3, 5, 4, 3, 4, 8, -1, -1, -1, -1},
22461 - {9, 5, 4, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 11, 2, 0, 8, 11, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1},
22462 - {0, 5, 4, 0, 1, 5, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1}, {2, 1, 5, 2, 5, 8, 2, 8, 11, 4, 8, 5, -1, -1, -1, -1},
22463 - {10, 3, 11, 10, 1, 3, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1}, {4, 9, 5, 0, 8, 1, 8, 10, 1, 8, 11, 10, -1, -1, -1, -1},
22464 - {5, 4, 0, 5, 0, 11, 5, 11, 10, 11, 0, 3, -1, -1, -1, -1}, {5, 4, 8, 5, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1},
22465 - {9, 7, 8, 5, 7, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 3, 0, 9, 5, 3, 5, 7, 3, -1, -1, -1, -1, -1, -1, -1},
22466 - {0, 7, 8, 0, 1, 7, 1, 5, 7, -1, -1, -1, -1, -1, -1, -1}, {1, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22467 - {9, 7, 8, 9, 5, 7, 10, 1, 2, -1, -1, -1, -1, -1, -1, -1}, {10, 1, 2, 9, 5, 0, 5, 3, 0, 5, 7, 3, -1, -1, -1, -1},
22468 - {8, 0, 2, 8, 2, 5, 8, 5, 7, 10, 5, 2, -1, -1, -1, -1}, {2, 10, 5, 2, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1},
22469 - {7, 9, 5, 7, 8, 9, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 7, 9, 7, 2, 9, 2, 0, 2, 7, 11, -1, -1, -1, -1},
22470 - {2, 3, 11, 0, 1, 8, 1, 7, 8, 1, 5, 7, -1, -1, -1, -1}, {11, 2, 1, 11, 1, 7, 7, 1, 5, -1, -1, -1, -1, -1, -1, -1},
22471 - {9, 5, 8, 8, 5, 7, 10, 1, 3, 10, 3, 11, -1, -1, -1, -1}, {5, 7, 0, 5, 0, 9, 7, 11, 0, 1, 0, 10, 11, 10, 0, -1},
22472 - {11, 10, 0, 11, 0, 3, 10, 5, 0, 8, 0, 7, 5, 7, 0, -1}, {11, 10, 5, 7, 11, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22473 - {10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22474 - {9, 0, 1, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 8, 3, 1, 9, 8, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1},
22475 - {1, 6, 5, 2, 6, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 6, 5, 1, 2, 6, 3, 0, 8, -1, -1, -1, -1, -1, -1, -1},
22476 - {9, 6, 5, 9, 0, 6, 0, 2, 6, -1, -1, -1, -1, -1, -1, -1}, {5, 9, 8, 5, 8, 2, 5, 2, 6, 3, 2, 8, -1, -1, -1, -1},
22477 - {2, 3, 11, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 0, 8, 11, 2, 0, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1},
22478 - {0, 1, 9, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1}, {5, 10, 6, 1, 9, 2, 9, 11, 2, 9, 8, 11, -1, -1, -1, -1},
22479 - {6, 3, 11, 6, 5, 3, 5, 1, 3, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 11, 0, 11, 5, 0, 5, 1, 5, 11, 6, -1, -1, -1, -1},
22480 - {3, 11, 6, 0, 3, 6, 0, 6, 5, 0, 5, 9, -1, -1, -1, -1}, {6, 5, 9, 6, 9, 11, 11, 9, 8, -1, -1, -1, -1, -1, -1, -1},
22481 - {5, 10, 6, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 3, 0, 4, 7, 3, 6, 5, 10, -1, -1, -1, -1, -1, -1, -1},
22482 - {1, 9, 0, 5, 10, 6, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1}, {10, 6, 5, 1, 9, 7, 1, 7, 3, 7, 9, 4, -1, -1, -1, -1},
22483 - {6, 1, 2, 6, 5, 1, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 5, 5, 2, 6, 3, 0, 4, 3, 4, 7, -1, -1, -1, -1},
22484 - {8, 4, 7, 9, 0, 5, 0, 6, 5, 0, 2, 6, -1, -1, -1, -1}, {7, 3, 9, 7, 9, 4, 3, 2, 9, 5, 9, 6, 2, 6, 9, -1},
22485 - {3, 11, 2, 7, 8, 4, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1}, {5, 10, 6, 4, 7, 2, 4, 2, 0, 2, 7, 11, -1, -1, -1, -1},
22486 - {0, 1, 9, 4, 7, 8, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1}, {9, 2, 1, 9, 11, 2, 9, 4, 11, 7, 11, 4, 5, 10, 6, -1},
22487 - {8, 4, 7, 3, 11, 5, 3, 5, 1, 5, 11, 6, -1, -1, -1, -1}, {5, 1, 11, 5, 11, 6, 1, 0, 11, 7, 11, 4, 0, 4, 11, -1},
22488 - {0, 5, 9, 0, 6, 5, 0, 3, 6, 11, 6, 3, 8, 4, 7, -1}, {6, 5, 9, 6, 9, 11, 4, 7, 9, 7, 11, 9, -1, -1, -1, -1},
22489 - {10, 4, 9, 6, 4, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 10, 6, 4, 9, 10, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1},
22490 - {10, 0, 1, 10, 6, 0, 6, 4, 0, -1, -1, -1, -1, -1, -1, -1}, {8, 3, 1, 8, 1, 6, 8, 6, 4, 6, 1, 10, -1, -1, -1, -1},
22491 - {1, 4, 9, 1, 2, 4, 2, 6, 4, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 8, 1, 2, 9, 2, 4, 9, 2, 6, 4, -1, -1, -1, -1},
22492 - {0, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 3, 2, 8, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1},
22493 - {10, 4, 9, 10, 6, 4, 11, 2, 3, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 2, 2, 8, 11, 4, 9, 10, 4, 10, 6, -1, -1, -1, -1},
22494 - {3, 11, 2, 0, 1, 6, 0, 6, 4, 6, 1, 10, -1, -1, -1, -1}, {6, 4, 1, 6, 1, 10, 4, 8, 1, 2, 1, 11, 8, 11, 1, -1},
22495 - {9, 6, 4, 9, 3, 6, 9, 1, 3, 11, 6, 3, -1, -1, -1, -1}, {8, 11, 1, 8, 1, 0, 11, 6, 1, 9, 1, 4, 6, 4, 1, -1},
22496 - {3, 11, 6, 3, 6, 0, 0, 6, 4, -1, -1, -1, -1, -1, -1, -1}, {6, 4, 8, 11, 6, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22497 - {7, 10, 6, 7, 8, 10, 8, 9, 10, -1, -1, -1, -1, -1, -1, -1}, {0, 7, 3, 0, 10, 7, 0, 9, 10, 6, 7, 10, -1, -1, -1, -1},
22498 - {10, 6, 7, 1, 10, 7, 1, 7, 8, 1, 8, 0, -1, -1, -1, -1}, {10, 6, 7, 10, 7, 1, 1, 7, 3, -1, -1, -1, -1, -1, -1, -1},
22499 - {1, 2, 6, 1, 6, 8, 1, 8, 9, 8, 6, 7, -1, -1, -1, -1}, {2, 6, 9, 2, 9, 1, 6, 7, 9, 0, 9, 3, 7, 3, 9, -1},
22500 - {7, 8, 0, 7, 0, 6, 6, 0, 2, -1, -1, -1, -1, -1, -1, -1}, {7, 3, 2, 6, 7, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22501 - {2, 3, 11, 10, 6, 8, 10, 8, 9, 8, 6, 7, -1, -1, -1, -1}, {2, 0, 7, 2, 7, 11, 0, 9, 7, 6, 7, 10, 9, 10, 7, -1},
22502 - {1, 8, 0, 1, 7, 8, 1, 10, 7, 6, 7, 10, 2, 3, 11, -1}, {11, 2, 1, 11, 1, 7, 10, 6, 1, 6, 7, 1, -1, -1, -1, -1},
22503 - {8, 9, 6, 8, 6, 7, 9, 1, 6, 11, 6, 3, 1, 3, 6, -1}, {0, 9, 1, 11, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22504 - {7, 8, 0, 7, 0, 6, 3, 11, 0, 11, 6, 0, -1, -1, -1, -1}, {7, 11, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22505 - {7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 8, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22506 - {0, 1, 9, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 1, 9, 8, 3, 1, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1},
22507 - {10, 1, 2, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 3, 0, 8, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1},
22508 - {2, 9, 0, 2, 10, 9, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1}, {6, 11, 7, 2, 10, 3, 10, 8, 3, 10, 9, 8, -1, -1, -1, -1},
22509 - {7, 2, 3, 6, 2, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {7, 0, 8, 7, 6, 0, 6, 2, 0, -1, -1, -1, -1, -1, -1, -1},
22510 - {2, 7, 6, 2, 3, 7, 0, 1, 9, -1, -1, -1, -1, -1, -1, -1}, {1, 6, 2, 1, 8, 6, 1, 9, 8, 8, 7, 6, -1, -1, -1, -1},
22511 - {10, 7, 6, 10, 1, 7, 1, 3, 7, -1, -1, -1, -1, -1, -1, -1}, {10, 7, 6, 1, 7, 10, 1, 8, 7, 1, 0, 8, -1, -1, -1, -1},
22512 - {0, 3, 7, 0, 7, 10, 0, 10, 9, 6, 10, 7, -1, -1, -1, -1}, {7, 6, 10, 7, 10, 8, 8, 10, 9, -1, -1, -1, -1, -1, -1, -1},
22513 - {6, 8, 4, 11, 8, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 6, 11, 3, 0, 6, 0, 4, 6, -1, -1, -1, -1, -1, -1, -1},
22514 - {8, 6, 11, 8, 4, 6, 9, 0, 1, -1, -1, -1, -1, -1, -1, -1}, {9, 4, 6, 9, 6, 3, 9, 3, 1, 11, 3, 6, -1, -1, -1, -1},
22515 - {6, 8, 4, 6, 11, 8, 2, 10, 1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 3, 0, 11, 0, 6, 11, 0, 4, 6, -1, -1, -1, -1},
22516 - {4, 11, 8, 4, 6, 11, 0, 2, 9, 2, 10, 9, -1, -1, -1, -1}, {10, 9, 3, 10, 3, 2, 9, 4, 3, 11, 3, 6, 4, 6, 3, -1},
22517 - {8, 2, 3, 8, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1}, {0, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22518 - {1, 9, 0, 2, 3, 4, 2, 4, 6, 4, 3, 8, -1, -1, -1, -1}, {1, 9, 4, 1, 4, 2, 2, 4, 6, -1, -1, -1, -1, -1, -1, -1},
22519 - {8, 1, 3, 8, 6, 1, 8, 4, 6, 6, 10, 1, -1, -1, -1, -1}, {10, 1, 0, 10, 0, 6, 6, 0, 4, -1, -1, -1, -1, -1, -1, -1},
22520 - {4, 6, 3, 4, 3, 8, 6, 10, 3, 0, 3, 9, 10, 9, 3, -1}, {10, 9, 4, 6, 10, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22521 - {4, 9, 5, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 4, 9, 5, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1},
22522 - {5, 0, 1, 5, 4, 0, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1}, {11, 7, 6, 8, 3, 4, 3, 5, 4, 3, 1, 5, -1, -1, -1, -1},
22523 - {9, 5, 4, 10, 1, 2, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1}, {6, 11, 7, 1, 2, 10, 0, 8, 3, 4, 9, 5, -1, -1, -1, -1},
22524 - {7, 6, 11, 5, 4, 10, 4, 2, 10, 4, 0, 2, -1, -1, -1, -1}, {3, 4, 8, 3, 5, 4, 3, 2, 5, 10, 5, 2, 11, 7, 6, -1},
22525 - {7, 2, 3, 7, 6, 2, 5, 4, 9, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 4, 0, 8, 6, 0, 6, 2, 6, 8, 7, -1, -1, -1, -1},
22526 - {3, 6, 2, 3, 7, 6, 1, 5, 0, 5, 4, 0, -1, -1, -1, -1}, {6, 2, 8, 6, 8, 7, 2, 1, 8, 4, 8, 5, 1, 5, 8, -1},
22527 - {9, 5, 4, 10, 1, 6, 1, 7, 6, 1, 3, 7, -1, -1, -1, -1}, {1, 6, 10, 1, 7, 6, 1, 0, 7, 8, 7, 0, 9, 5, 4, -1},
22528 - {4, 0, 10, 4, 10, 5, 0, 3, 10, 6, 10, 7, 3, 7, 10, -1}, {7, 6, 10, 7, 10, 8, 5, 4, 10, 4, 8, 10, -1, -1, -1, -1},
22529 - {6, 9, 5, 6, 11, 9, 11, 8, 9, -1, -1, -1, -1, -1, -1, -1}, {3, 6, 11, 0, 6, 3, 0, 5, 6, 0, 9, 5, -1, -1, -1, -1},
22530 - {0, 11, 8, 0, 5, 11, 0, 1, 5, 5, 6, 11, -1, -1, -1, -1}, {6, 11, 3, 6, 3, 5, 5, 3, 1, -1, -1, -1, -1, -1, -1, -1},
22531 - {1, 2, 10, 9, 5, 11, 9, 11, 8, 11, 5, 6, -1, -1, -1, -1}, {0, 11, 3, 0, 6, 11, 0, 9, 6, 5, 6, 9, 1, 2, 10, -1},
22532 - {11, 8, 5, 11, 5, 6, 8, 0, 5, 10, 5, 2, 0, 2, 5, -1}, {6, 11, 3, 6, 3, 5, 2, 10, 3, 10, 5, 3, -1, -1, -1, -1},
22533 - {5, 8, 9, 5, 2, 8, 5, 6, 2, 3, 8, 2, -1, -1, -1, -1}, {9, 5, 6, 9, 6, 0, 0, 6, 2, -1, -1, -1, -1, -1, -1, -1},
22534 - {1, 5, 8, 1, 8, 0, 5, 6, 8, 3, 8, 2, 6, 2, 8, -1}, {1, 5, 6, 2, 1, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22535 - {1, 3, 6, 1, 6, 10, 3, 8, 6, 5, 6, 9, 8, 9, 6, -1}, {10, 1, 0, 10, 0, 6, 9, 5, 0, 5, 6, 0, -1, -1, -1, -1},
22536 - {0, 3, 8, 5, 6, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {10, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22537 - {11, 5, 10, 7, 5, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 5, 10, 11, 7, 5, 8, 3, 0, -1, -1, -1, -1, -1, -1, -1},
22538 - {5, 11, 7, 5, 10, 11, 1, 9, 0, -1, -1, -1, -1, -1, -1, -1}, {10, 7, 5, 10, 11, 7, 9, 8, 1, 8, 3, 1, -1, -1, -1, -1},
22539 - {11, 1, 2, 11, 7, 1, 7, 5, 1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 1, 2, 7, 1, 7, 5, 7, 2, 11, -1, -1, -1, -1},
22540 - {9, 7, 5, 9, 2, 7, 9, 0, 2, 2, 11, 7, -1, -1, -1, -1}, {7, 5, 2, 7, 2, 11, 5, 9, 2, 3, 2, 8, 9, 8, 2, -1},
22541 - {2, 5, 10, 2, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1}, {8, 2, 0, 8, 5, 2, 8, 7, 5, 10, 2, 5, -1, -1, -1, -1},
22542 - {9, 0, 1, 5, 10, 3, 5, 3, 7, 3, 10, 2, -1, -1, -1, -1}, {9, 8, 2, 9, 2, 1, 8, 7, 2, 10, 2, 5, 7, 5, 2, -1},
22543 - {1, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 7, 0, 7, 1, 1, 7, 5, -1, -1, -1, -1, -1, -1, -1},
22544 - {9, 0, 3, 9, 3, 5, 5, 3, 7, -1, -1, -1, -1, -1, -1, -1}, {9, 8, 7, 5, 9, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22545 - {5, 8, 4, 5, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1}, {5, 0, 4, 5, 11, 0, 5, 10, 11, 11, 3, 0, -1, -1, -1, -1},
22546 - {0, 1, 9, 8, 4, 10, 8, 10, 11, 10, 4, 5, -1, -1, -1, -1}, {10, 11, 4, 10, 4, 5, 11, 3, 4, 9, 4, 1, 3, 1, 4, -1},
22547 - {2, 5, 1, 2, 8, 5, 2, 11, 8, 4, 5, 8, -1, -1, -1, -1}, {0, 4, 11, 0, 11, 3, 4, 5, 11, 2, 11, 1, 5, 1, 11, -1},
22548 - {0, 2, 5, 0, 5, 9, 2, 11, 5, 4, 5, 8, 11, 8, 5, -1}, {9, 4, 5, 2, 11, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22549 - {2, 5, 10, 3, 5, 2, 3, 4, 5, 3, 8, 4, -1, -1, -1, -1}, {5, 10, 2, 5, 2, 4, 4, 2, 0, -1, -1, -1, -1, -1, -1, -1},
22550 - {3, 10, 2, 3, 5, 10, 3, 8, 5, 4, 5, 8, 0, 1, 9, -1}, {5, 10, 2, 5, 2, 4, 1, 9, 2, 9, 4, 2, -1, -1, -1, -1},
22551 - {8, 4, 5, 8, 5, 3, 3, 5, 1, -1, -1, -1, -1, -1, -1, -1}, {0, 4, 5, 1, 0, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22552 - {8, 4, 5, 8, 5, 3, 9, 0, 5, 0, 3, 5, -1, -1, -1, -1}, {9, 4, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22553 - {4, 11, 7, 4, 9, 11, 9, 10, 11, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 4, 9, 7, 9, 11, 7, 9, 10, 11, -1, -1, -1, -1},
22554 - {1, 10, 11, 1, 11, 4, 1, 4, 0, 7, 4, 11, -1, -1, -1, -1}, {3, 1, 4, 3, 4, 8, 1, 10, 4, 7, 4, 11, 10, 11, 4, -1},
22555 - {4, 11, 7, 9, 11, 4, 9, 2, 11, 9, 1, 2, -1, -1, -1, -1}, {9, 7, 4, 9, 11, 7, 9, 1, 11, 2, 11, 1, 0, 8, 3, -1},
22556 - {11, 7, 4, 11, 4, 2, 2, 4, 0, -1, -1, -1, -1, -1, -1, -1}, {11, 7, 4, 11, 4, 2, 8, 3, 4, 3, 2, 4, -1, -1, -1, -1},
22557 - {2, 9, 10, 2, 7, 9, 2, 3, 7, 7, 4, 9, -1, -1, -1, -1}, {9, 10, 7, 9, 7, 4, 10, 2, 7, 8, 7, 0, 2, 0, 7, -1},
22558 - {3, 7, 10, 3, 10, 2, 7, 4, 10, 1, 10, 0, 4, 0, 10, -1}, {1, 10, 2, 8, 7, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22559 - {4, 9, 1, 4, 1, 7, 7, 1, 3, -1, -1, -1, -1, -1, -1, -1}, {4, 9, 1, 4, 1, 7, 0, 8, 1, 8, 7, 1, -1, -1, -1, -1},
22560 - {4, 0, 3, 7, 4, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 8, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22561 - {9, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 9, 3, 9, 11, 11, 9, 10, -1, -1, -1, -1, -1, -1, -1},
22562 - {0, 1, 10, 0, 10, 8, 8, 10, 11, -1, -1, -1, -1, -1, -1, -1}, {3, 1, 10, 11, 3, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22563 - {1, 2, 11, 1, 11, 9, 9, 11, 8, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 9, 3, 9, 11, 1, 2, 9, 2, 11, 9, -1, -1, -1, -1},
22564 - {0, 2, 11, 8, 0, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 2, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22565 - {2, 3, 8, 2, 8, 10, 10, 8, 9, -1, -1, -1, -1, -1, -1, -1}, {9, 10, 2, 0, 9, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22566 - {2, 3, 8, 2, 8, 10, 0, 1, 8, 1, 10, 8, -1, -1, -1, -1}, {1, 10, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22567 - {1, 3, 8, 9, 1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 9, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
22568 - {0, 3, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}};
22569 -
22570 - const unsigned int
22571 - nx = (unsigned int)((x1-x0+1)/resx), nxm1 = nx-1,
22572 - ny = (unsigned int)((y1-y0+1)/resy), nym1 = ny-1,
22573 - nz = (unsigned int)((z1-z0+1)/resz), nzm1 = nz-1;
22574 -
22575 - if (!nxm1 || !nym1 || !nzm1) return;
22576 -
22577 - CImg<int> indices1(nx,ny,1,3,-1), indices2(indices1);
22578 - CImg<float> values1(nx,ny), values2(nx,ny);
22579 - float X=0, Y=0, Z=0, nX=0, nY=0, nZ=0;
22580 -
22581 - // Fill the first plane with function values
22582 - Y=y0;
22583 - cimg_forY(values1,y) {
22584 - X = x0;
22585 - cimg_forX(values1,x) { values1(x,y) = (float)func(X,Y,z0); X+=resx; }
22586 - Y+=resy;
22587 - }
22588 -
22589 - // Run Marching Cubes algorithm
22590 - Z = z0; nZ = Z + resz;
22591 - for (unsigned int zi=0; zi<nzm1; ++zi, Z=nZ, nZ+=resz) {
22592 - Y = y0; nY = Y + resy;
22593 - indices2.fill(-1);
22594 - for (unsigned int yi=0, nyi=1; yi<nym1; ++yi, ++nyi, Y=nY, nY+=resy) {
22595 - X = x0; nX = X + resx;
22596 - for (unsigned int xi=0, nxi=1; xi<nxm1; ++xi, ++nxi, X=nX, nX+=resx) {
22597 -
22598 - // Determine cube configuration
22599 - const float
22600 - val0 = values1(xi,yi), val1 = values1(nxi,yi), val2 = values1(nxi,nyi), val3 = values1(xi,nyi),
22601 - val4 = values2(xi,yi) = (float)func(X,Y,nZ),
22602 - val5 = values2(nxi,yi) = (float)func(nX,Y,nZ),
22603 - val6 = values2(nxi,nyi) = (float)func(nX,nY,nZ),
22604 - val7 = values2(xi,nyi) = (float)func(X,nY,nZ);
22605 -
22606 - const unsigned int configuration =
22607 - (val0<isovalue?1:0) | (val1<isovalue?2:0) | (val2<isovalue?4:0) | (val3<isovalue?8:0) |
22608 - (val4<isovalue?16:0) | (val5<isovalue?32:0) | (val6<isovalue?64:0) | (val7<isovalue?128:0),
22609 - edge = edges[configuration];
22610 -
22611 - // Compute intersection points
22612 - if (edge) {
22613 - if ((edge&1) && indices1(xi,yi,0)<0) {
22614 - const float Xi = X + (isovalue-val0)*resx/(val1-val0);
22615 - indices1(xi,yi,0) = points.size;
22616 - points.insert(CImg<tp>::vector(Xi,Y,Z));
22617 - }
22618 - if ((edge&2) && indices1(nxi,yi,1)<0) {
22619 - const float Yi = Y + (isovalue-val1)*resy/(val2-val1);
22620 - indices1(nxi,yi,1) = points.size;
22621 - points.insert(CImg<tp>::vector(nX,Yi,Z));
22622 - }
22623 - if ((edge&4) && indices1(xi,nyi,0)<0) {
22624 - const float Xi = X + (isovalue-val3)*resx/(val2-val3);
22625 - indices1(xi,nyi,0) = points.size;
22626 - points.insert(CImg<tp>::vector(Xi,nY,Z));
22627 - }
22628 - if ((edge&8) && indices1(xi,yi,1)<0) {
22629 - const float Yi = Y + (isovalue-val0)*resy/(val3-val0);
22630 - indices1(xi,yi,1) = points.size;
22631 - points.insert(CImg<tp>::vector(X,Yi,Z));
22632 - }
22633 - if ((edge&16) && indices2(xi,yi,0)<0) {
22634 - const float Xi = X + (isovalue-val4)*resx/(val5-val4);
22635 - indices2(xi,yi,0) = points.size;
22636 - points.insert(CImg<tp>::vector(Xi,Y,nZ));
22637 - }
22638 - if ((edge&32) && indices2(nxi,yi,1)<0) {
22639 - const float Yi = Y + (isovalue-val5)*resy/(val6-val5);
22640 - indices2(nxi,yi,1) = points.size;
22641 - points.insert(CImg<tp>::vector(nX,Yi,nZ));
22642 - }
22643 - if ((edge&64) && indices2(xi,nyi,0)<0) {
22644 - const float Xi = X + (isovalue-val7)*resx/(val6-val7);
22645 - indices2(xi,nyi,0) = points.size;
22646 - points.insert(CImg<tp>::vector(Xi,nY,nZ));
22647 - }
22648 - if ((edge&128) && indices2(xi,yi,1)<0) {
22649 - const float Yi = Y + (isovalue-val4)*resy/(val7-val4);
22650 - indices2(xi,yi,1) = points.size;
22651 - points.insert(CImg<tp>::vector(X,Yi,nZ));
22652 - }
22653 - if ((edge&256) && indices1(xi,yi,2)<0) {
22654 - const float Zi = Z+ (isovalue-val0)*resz/(val4-val0);
22655 - indices1(xi,yi,2) = points.size;
22656 - points.insert(CImg<tp>::vector(X,Y,Zi));
22657 - }
22658 - if ((edge&512) && indices1(nxi,yi,2)<0) {
22659 - const float Zi = Z + (isovalue-val1)*resz/(val5-val1);
22660 - indices1(nxi,yi,2) = points.size;
22661 - points.insert(CImg<tp>::vector(nX,Y,Zi));
22662 - }
22663 - if ((edge&1024) && indices1(nxi,nyi,2)<0) {
22664 - const float Zi = Z + (isovalue-val2)*resz/(val6-val2);
22665 - indices1(nxi,nyi,2) = points.size;
22666 - points.insert(CImg<tp>::vector(nX,nY,Zi));
22667 - }
22668 - if ((edge&2048) && indices1(xi,nyi,2)<0) {
22669 - const float Zi = Z + (isovalue-val3)*resz/(val7-val3);
22670 - indices1(xi,nyi,2) = points.size;
22671 - points.insert(CImg<tp>::vector(X,nY,Zi));
22672 - }
22673 -
22674 - // Create triangles
22675 - for (int *triangle=triangles[configuration]; *triangle!=-1; ) {
22676 - const unsigned int p0 = *(triangle++), p1 = *(triangle++), p2 = *(triangle++);
22677 - const tf
22678 - i0 = (tf)(_marching_cubes_indice(p0,indices1,indices2,xi,yi,nxi,nyi)),
22679 - i1 = (tf)(_marching_cubes_indice(p1,indices1,indices2,xi,yi,nxi,nyi)),
22680 - i2 = (tf)(_marching_cubes_indice(p2,indices1,indices2,xi,yi,nxi,nyi));
22681 - if (invert_faces) primitives.insert(CImg<tf>::vector(i0,i1,i2));
22682 - else primitives.insert(CImg<tf>::vector(i0,i2,i1));
22683 - }
22684 - }
22685 - }
22686 - }
22687 - cimg::swap(values1,values2);
22688 - cimg::swap(indices1,indices2);
22689 - }
22690 - }
22691 -
22692 - // Inner routine used by the Marching square algorithm
22693 - template<typename t> inline int _marching_squares_indice(const unsigned int edge, const CImg<t>& indices1, const CImg<t>& indices2,
22694 - const unsigned int x, const unsigned int nx) {
22695 - switch (edge) {
22696 - case 0: return (int)indices1(x,0);
22697 - case 1: return (int)indices1(nx,1);
22698 - case 2: return (int)indices2(x,0);
22699 - case 3: return (int)indices1(x,1);
22700 - }
22701 - return 0;
22702 - }
22703 -
22704 - //! Polygonize an implicit 2D function by the marching squares algorithm
22705 - template<typename tfunc, typename tp, typename tf>
22706 - inline void marching_squares(const tfunc& func, const float isovalue,
22707 - const float x0,const float y0,
22708 - const float x1,const float y1,
22709 - const float resx,const float resy,
22710 - CImgList<tp>& points, CImgList<tf>& primitives) {
22711 -
22712 - static unsigned int edges[16]={ 0x0, 0x9, 0x3, 0xa, 0x6, 0xf, 0x5, 0xc, 0xc, 0x5, 0xf, 0x6, 0xa, 0x3, 0x9, 0x0 };
22713 - static int segments[16][4] = { { -1,-1,-1,-1 }, { 0,3,-1,-1 }, { 0,1,-1,-1 }, { 1,3,-1,-1 },
22714 - { 1,2,-1,-1 }, { 0,1,2,3 }, { 0,2,-1,-1 }, { 2,3,-1,-1 },
22715 - { 2,3,-1,-1 }, { 0,2,-1,-1}, { 0,3,1,2 }, { 1,2,-1,-1 },
22716 - { 1,3,-1,-1 }, { 0,1,-1,-1}, { 0,3,-1,-1}, { -1,-1,-1,-1 } };
22717 - const unsigned int
22718 - nx = (unsigned int)((x1-x0+1)/resx), nxm1 = nx-1,
22719 - ny = (unsigned int)((y1-y0+1)/resy), nym1 = ny-1;
22720 -
22721 - if (!nxm1 || !nym1) return;
22722 -
22723 - CImg<int> indices1(nx,1,1,2,-1), indices2(nx,1,1,2);
22724 - CImg<float> values1(nx), values2(nx);
22725 - float X = 0, Y = 0, nX = 0, nY = 0;
22726 -
22727 - // Fill first line with values
22728 - cimg_forX(values1,x) { values1(x) = (float)func(X,Y); X+=resx; }
22729 -
22730 - // Run the marching squares algorithm
22731 - Y = y0; nY = Y + resy;
22732 - for (unsigned int yi=0, nyi=1; yi<nym1; ++yi, ++nyi, Y=nY, nY+=resy) {
22733 - X = x0; nX = X + resx;
22734 - indices2.fill(-1);
22735 - for (unsigned int xi=0, nxi=1; xi<nxm1; ++xi, ++nxi, X=nX, nX+=resx) {
22736 -
22737 - // Determine cube configuration
22738 - const float
22739 - val0 = values1(xi), val1 = values1(nxi),
22740 - val2 = values2(nxi) = (float)func(nX,nY),
22741 - val3 = values2(xi) = (float)func(X,nY);
22742 -
22743 - const unsigned int configuration = (val0<isovalue?1:0) | (val1<isovalue?2:0) | (val2<isovalue?4:0) | (val3<isovalue?8:0),
22744 - edge = edges[configuration];
22745 -
22746 - // Compute intersection points
22747 - if (edge) {
22748 - if ((edge&1) && indices1(xi,0)<0) {
22749 - const float Xi = X + (isovalue-val0)*resx/(val1-val0);
22750 - indices1(xi,0) = points.size;
22751 - points.insert(CImg<tp>::vector(Xi,Y));
22752 - }
22753 - if ((edge&2) && indices1(nxi,1)<0) {
22754 - const float Yi = Y + (isovalue-val1)*resy/(val2-val1);
22755 - indices1(nxi,1) = points.size;
22756 - points.insert(CImg<tp>::vector(nX,Yi));
22757 - }
22758 - if ((edge&4) && indices2(xi,0)<0) {
22759 - const float Xi = X + (isovalue-val3)*resx/(val2-val3);
22760 - indices2(xi,0) = points.size;
22761 - points.insert(CImg<tp>::vector(Xi,nY));
22762 - }
22763 - if ((edge&8) && indices1(xi,1)<0) {
22764 - const float Yi = Y + (isovalue-val0)*resy/(val3-val0);
22765 - indices1(xi,1) = points.size;
22766 - points.insert(CImg<tp>::vector(X,Yi));
22767 - }
22768 -
22769 - // Create segments
22770 - for (int *segment=segments[configuration]; *segment!=-1; ) {
22771 - const unsigned int p0 = *(segment++), p1 = *(segment++);
22772 - const tf
22773 - i0 = (tf)(_marching_squares_indice(p0,indices1,indices2,xi,nxi)),
22774 - i1 = (tf)(_marching_squares_indice(p1,indices1,indices2,xi,nxi));
22775 - primitives.insert(CImg<tf>::vector(i0,i1));
22776 - }
22777 - }
22778 - }
22779 - values1.swap(values2);
22780 - indices1.swap(indices2);
22781 - }
22782 - }
22783 -
22784 - // End of cimg:: namespace
22785 -}
22786 -
22787 -
22788 - // End of cimg_library:: namespace
22789 -}
22790 -
22791 -#ifdef std
22792 -#undef std
22793 -#endif
22794 -
22795 -#endif
22796 -
22797 -// Local Variables:
22798 -// mode: c++
22799 -// End:
22800 diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/cimg/dummy2.cc vips-7.38.5/libvips/cimg/dummy2.cc
22801 --- vips-7.38.5-vanilla/libvips/cimg/dummy2.cc 2014-07-17 23:48:36.231794473 -0400
22802 +++ vips-7.38.5/libvips/cimg/dummy2.cc 1969-12-31 19:00:00.000000000 -0500
22803 @@ -1,4 +0,0 @@
22804 -/* mac os x libtool needs to link libraries containing c++ (eg. cimg) with
22805 - * g++ ... force this with a dummy c++ file at the top level
22806 - */
22807 -const int im__dummy_value = 42;
22808 diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/cimg/Makefile.am vips-7.38.5/libvips/cimg/Makefile.am
22809 --- vips-7.38.5-vanilla/libvips/cimg/Makefile.am 2014-07-17 23:48:36.230794473 -0400
22810 +++ vips-7.38.5/libvips/cimg/Makefile.am 1969-12-31 19:00:00.000000000 -0500
22811 @@ -1,27 +0,0 @@
22812 -noinst_LTLIBRARIES = libcimg.la
22813 -
22814 -libcimg_la_SOURCES = \
22815 - CImg.h \
22816 - cimg_dispatch.c \
22817 - cimg.cpp
22818 -
22819 -# various cimg settings as well
22820 -# we need to change these a bit for win32
22821 -if OS_WIN32
22822 -AM_CPPFLAGS = \
22823 - -Dcimg_strict \
22824 - -Dcimg_OS=0 \
22825 - -Dcimg_display_type=0 \
22826 - -DLOCALEDIR=\""$(LOCALEDIR)"\"
22827 -else
22828 -AM_CPPFLAGS = \
22829 - -Dcimg_strict \
22830 - -Dcimg_OS=1 \
22831 - -Dcimg_display_type=0 \
22832 - -DLOCALEDIR=\""$(LOCALEDIR)"\"
22833 -endif
22834 -
22835 -# used by the final libvips link rather than us
22836 -EXTRA_DIST = dummy2.cc
22837 -
22838 -AM_CPPFLAGS += -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@
22839 diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/cimg/Makefile.in vips-7.38.5/libvips/cimg/Makefile.in
22840 --- vips-7.38.5-vanilla/libvips/cimg/Makefile.in 2014-07-17 23:48:36.230794473 -0400
22841 +++ vips-7.38.5/libvips/cimg/Makefile.in 1969-12-31 19:00:00.000000000 -0500
22842 @@ -1,747 +0,0 @@
22843 -# Makefile.in generated by automake 1.13.3 from Makefile.am.
22844 -# @configure_input@
22845 -
22846 -# Copyright (C) 1994-2013 Free Software Foundation, Inc.
22847 -
22848 -# This Makefile.in is free software; the Free Software Foundation
22849 -# gives unlimited permission to copy and/or distribute it,
22850 -# with or without modifications, as long as this notice is preserved.
22851 -
22852 -# This program is distributed in the hope that it will be useful,
22853 -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
22854 -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
22855 -# PARTICULAR PURPOSE.
22856 -
22857 -@SET_MAKE@
22858 -
22859 -VPATH = @srcdir@
22860 -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
22861 -am__make_running_with_option = \
22862 - case $${target_option-} in \
22863 - ?) ;; \
22864 - *) echo "am__make_running_with_option: internal error: invalid" \
22865 - "target option '$${target_option-}' specified" >&2; \
22866 - exit 1;; \
22867 - esac; \
22868 - has_opt=no; \
22869 - sane_makeflags=$$MAKEFLAGS; \
22870 - if $(am__is_gnu_make); then \
22871 - sane_makeflags=$$MFLAGS; \
22872 - else \
22873 - case $$MAKEFLAGS in \
22874 - *\\[\ \ ]*) \
22875 - bs=\\; \
22876 - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
22877 - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
22878 - esac; \
22879 - fi; \
22880 - skip_next=no; \
22881 - strip_trailopt () \
22882 - { \
22883 - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
22884 - }; \
22885 - for flg in $$sane_makeflags; do \
22886 - test $$skip_next = yes && { skip_next=no; continue; }; \
22887 - case $$flg in \
22888 - *=*|--*) continue;; \
22889 - -*I) strip_trailopt 'I'; skip_next=yes;; \
22890 - -*I?*) strip_trailopt 'I';; \
22891 - -*O) strip_trailopt 'O'; skip_next=yes;; \
22892 - -*O?*) strip_trailopt 'O';; \
22893 - -*l) strip_trailopt 'l'; skip_next=yes;; \
22894 - -*l?*) strip_trailopt 'l';; \
22895 - -[dEDm]) skip_next=yes;; \
22896 - -[JT]) skip_next=yes;; \
22897 - esac; \
22898 - case $$flg in \
22899 - *$$target_option*) has_opt=yes; break;; \
22900 - esac; \
22901 - done; \
22902 - test $$has_opt = yes
22903 -am__make_dryrun = (target_option=n; $(am__make_running_with_option))
22904 -am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
22905 -pkgdatadir = $(datadir)/@PACKAGE@
22906 -pkgincludedir = $(includedir)/@PACKAGE@
22907 -pkglibdir = $(libdir)/@PACKAGE@
22908 -pkglibexecdir = $(libexecdir)/@PACKAGE@
22909 -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
22910 -install_sh_DATA = $(install_sh) -c -m 644
22911 -install_sh_PROGRAM = $(install_sh) -c
22912 -install_sh_SCRIPT = $(install_sh) -c
22913 -INSTALL_HEADER = $(INSTALL_DATA)
22914 -transform = $(program_transform_name)
22915 -NORMAL_INSTALL = :
22916 -PRE_INSTALL = :
22917 -POST_INSTALL = :
22918 -NORMAL_UNINSTALL = :
22919 -PRE_UNINSTALL = :
22920 -POST_UNINSTALL = :
22921 -build_triplet = @build@
22922 -host_triplet = @host@
22923 -subdir = libvips/cimg
22924 -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
22925 - $(top_srcdir)/depcomp
22926 -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
22927 -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
22928 - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \
22929 - $(top_srcdir)/configure.ac
22930 -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
22931 - $(ACLOCAL_M4)
22932 -mkinstalldirs = $(install_sh) -d
22933 -CONFIG_HEADER = $(top_builddir)/config.h
22934 -CONFIG_CLEAN_FILES =
22935 -CONFIG_CLEAN_VPATH_FILES =
22936 -LTLIBRARIES = $(noinst_LTLIBRARIES)
22937 -libcimg_la_LIBADD =
22938 -am_libcimg_la_OBJECTS = cimg_dispatch.lo cimg.lo
22939 -libcimg_la_OBJECTS = $(am_libcimg_la_OBJECTS)
22940 -AM_V_lt = $(am__v_lt_@AM_V@)
22941 -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
22942 -am__v_lt_0 = --silent
22943 -am__v_lt_1 =
22944 -AM_V_P = $(am__v_P_@AM_V@)
22945 -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
22946 -am__v_P_0 = false
22947 -am__v_P_1 = :
22948 -AM_V_GEN = $(am__v_GEN_@AM_V@)
22949 -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
22950 -am__v_GEN_0 = @echo " GEN " $@;
22951 -am__v_GEN_1 =
22952 -AM_V_at = $(am__v_at_@AM_V@)
22953 -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
22954 -am__v_at_0 = @
22955 -am__v_at_1 =
22956 -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
22957 -depcomp = $(SHELL) $(top_srcdir)/depcomp
22958 -am__depfiles_maybe = depfiles
22959 -am__mv = mv -f
22960 -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
22961 - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
22962 -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
22963 - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
22964 - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
22965 - $(AM_CFLAGS) $(CFLAGS)
22966 -AM_V_CC = $(am__v_CC_@AM_V@)
22967 -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
22968 -am__v_CC_0 = @echo " CC " $@;
22969 -am__v_CC_1 =
22970 -CCLD = $(CC)
22971 -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
22972 - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
22973 - $(AM_LDFLAGS) $(LDFLAGS) -o $@
22974 -AM_V_CCLD = $(am__v_CCLD_@AM_V@)
22975 -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
22976 -am__v_CCLD_0 = @echo " CCLD " $@;
22977 -am__v_CCLD_1 =
22978 -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
22979 - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
22980 -LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
22981 - $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
22982 - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
22983 - $(AM_CXXFLAGS) $(CXXFLAGS)
22984 -AM_V_CXX = $(am__v_CXX_@AM_V@)
22985 -am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
22986 -am__v_CXX_0 = @echo " CXX " $@;
22987 -am__v_CXX_1 =
22988 -CXXLD = $(CXX)
22989 -CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
22990 - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
22991 - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
22992 -AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
22993 -am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
22994 -am__v_CXXLD_0 = @echo " CXXLD " $@;
22995 -am__v_CXXLD_1 =
22996 -SOURCES = $(libcimg_la_SOURCES)
22997 -DIST_SOURCES = $(libcimg_la_SOURCES)
22998 -am__can_run_installinfo = \
22999 - case $$AM_UPDATE_INFO_DIR in \
23000 - n|no|NO) false;; \
23001 - *) (install-info --version) >/dev/null 2>&1;; \
23002 - esac
23003 -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
23004 -# Read a list of newline-separated strings from the standard input,
23005 -# and print each of them once, without duplicates. Input order is
23006 -# *not* preserved.
23007 -am__uniquify_input = $(AWK) '\
23008 - BEGIN { nonempty = 0; } \
23009 - { items[$$0] = 1; nonempty = 1; } \
23010 - END { if (nonempty) { for (i in items) print i; }; } \
23011 -'
23012 -# Make sure the list of sources is unique. This is necessary because,
23013 -# e.g., the same source file might be shared among _SOURCES variables
23014 -# for different programs/libraries.
23015 -am__define_uniq_tagged_files = \
23016 - list='$(am__tagged_files)'; \
23017 - unique=`for i in $$list; do \
23018 - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
23019 - done | $(am__uniquify_input)`
23020 -ETAGS = etags
23021 -CTAGS = ctags
23022 -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
23023 -ACLOCAL = @ACLOCAL@
23024 -AMTAR = @AMTAR@
23025 -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
23026 -AR = @AR@
23027 -AS = @AS@
23028 -AUTOCONF = @AUTOCONF@
23029 -AUTOHEADER = @AUTOHEADER@
23030 -AUTOMAKE = @AUTOMAKE@
23031 -AWK = @AWK@
23032 -CATALOGS = @CATALOGS@
23033 -CATOBJEXT = @CATOBJEXT@
23034 -CC = @CC@
23035 -CCDEPMODE = @CCDEPMODE@
23036 -CFITSIO_CFLAGS = @CFITSIO_CFLAGS@
23037 -CFITSIO_LIBS = @CFITSIO_LIBS@
23038 -CFLAGS = @CFLAGS@
23039 -CPP = @CPP@
23040 -CPPFLAGS = @CPPFLAGS@
23041 -CXX = @CXX@
23042 -CXXCPP = @CXXCPP@
23043 -CXXDEPMODE = @CXXDEPMODE@
23044 -CXXFLAGS = @CXXFLAGS@
23045 -CYGPATH_W = @CYGPATH_W@
23046 -DATADIRNAME = @DATADIRNAME@
23047 -DEFS = @DEFS@
23048 -DEPDIR = @DEPDIR@
23049 -DLLTOOL = @DLLTOOL@
23050 -DLLWRAP = @DLLWRAP@
23051 -DSYMUTIL = @DSYMUTIL@
23052 -DUMPBIN = @DUMPBIN@
23053 -ECHO_C = @ECHO_C@
23054 -ECHO_N = @ECHO_N@
23055 -ECHO_T = @ECHO_T@
23056 -EGREP = @EGREP@
23057 -EXEEXT = @EXEEXT@
23058 -EXIF_CFLAGS = @EXIF_CFLAGS@
23059 -EXIF_LIBS = @EXIF_LIBS@
23060 -FFTW_CFLAGS = @FFTW_CFLAGS@
23061 -FFTW_LIBS = @FFTW_LIBS@
23062 -FGREP = @FGREP@
23063 -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
23064 -GMOFILES = @GMOFILES@
23065 -GMSGFMT = @GMSGFMT@
23066 -GREP = @GREP@
23067 -GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
23068 -GTHREAD_LIBS = @GTHREAD_LIBS@
23069 -GTKDOC_CHECK = @GTKDOC_CHECK@
23070 -GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
23071 -GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
23072 -GTKDOC_MKPDF = @GTKDOC_MKPDF@
23073 -GTKDOC_REBASE = @GTKDOC_REBASE@
23074 -HTML_DIR = @HTML_DIR@
23075 -IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@
23076 -IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@
23077 -INSTALL = @INSTALL@
23078 -INSTALL_DATA = @INSTALL_DATA@
23079 -INSTALL_PROGRAM = @INSTALL_PROGRAM@
23080 -INSTALL_SCRIPT = @INSTALL_SCRIPT@
23081 -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
23082 -INSTOBJEXT = @INSTOBJEXT@
23083 -INTLLIBS = @INTLLIBS@
23084 -INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
23085 -INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
23086 -INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
23087 -INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
23088 -INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
23089 -INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
23090 -INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
23091 -INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
23092 -JPEG_INCLUDES = @JPEG_INCLUDES@
23093 -JPEG_LIBS = @JPEG_LIBS@
23094 -LCMS_CFLAGS = @LCMS_CFLAGS@
23095 -LCMS_LIBS = @LCMS_LIBS@
23096 -LD = @LD@
23097 -LDFLAGS = @LDFLAGS@
23098 -LIBOBJS = @LIBOBJS@
23099 -LIBRARY_AGE = @LIBRARY_AGE@
23100 -LIBRARY_CURRENT = @LIBRARY_CURRENT@
23101 -LIBRARY_REVISION = @LIBRARY_REVISION@
23102 -LIBS = @LIBS@
23103 -LIBTOOL = @LIBTOOL@
23104 -LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@
23105 -LIBWEBP_LIBS = @LIBWEBP_LIBS@
23106 -LIPO = @LIPO@
23107 -LN_S = @LN_S@
23108 -LTLIBOBJS = @LTLIBOBJS@
23109 -MAGICK_CFLAGS = @MAGICK_CFLAGS@
23110 -MAGICK_LIBS = @MAGICK_LIBS@
23111 -MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@
23112 -MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@
23113 -MAKEINFO = @MAKEINFO@
23114 -MANIFEST_TOOL = @MANIFEST_TOOL@
23115 -MATIO_CFLAGS = @MATIO_CFLAGS@
23116 -MATIO_LIBS = @MATIO_LIBS@
23117 -MKDIR_P = @MKDIR_P@
23118 -MKINSTALLDIRS = @MKINSTALLDIRS@
23119 -MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@
23120 -MONOTONIC_LIBS = @MONOTONIC_LIBS@
23121 -MSGFMT = @MSGFMT@
23122 -MSGFMT_OPTS = @MSGFMT_OPTS@
23123 -NM = @NM@
23124 -NMEDIT = @NMEDIT@
23125 -OBJDUMP = @OBJDUMP@
23126 -OBJEXT = @OBJEXT@
23127 -OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
23128 -OPENEXR_LIBS = @OPENEXR_LIBS@
23129 -OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@
23130 -OPENSLIDE_LIBS = @OPENSLIDE_LIBS@
23131 -ORC_CFLAGS = @ORC_CFLAGS@
23132 -ORC_LIBS = @ORC_LIBS@
23133 -OTOOL = @OTOOL@
23134 -OTOOL64 = @OTOOL64@
23135 -PACKAGE = @PACKAGE@
23136 -PACKAGES_USED = @PACKAGES_USED@
23137 -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
23138 -PACKAGE_NAME = @PACKAGE_NAME@
23139 -PACKAGE_STRING = @PACKAGE_STRING@
23140 -PACKAGE_TARNAME = @PACKAGE_TARNAME@
23141 -PACKAGE_URL = @PACKAGE_URL@
23142 -PACKAGE_VERSION = @PACKAGE_VERSION@
23143 -PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
23144 -PANGOFT2_LIBS = @PANGOFT2_LIBS@
23145 -PATH_SEPARATOR = @PATH_SEPARATOR@
23146 -PKG_CONFIG = @PKG_CONFIG@
23147 -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
23148 -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
23149 -PNG_CFLAGS = @PNG_CFLAGS@
23150 -PNG_INCLUDES = @PNG_INCLUDES@
23151 -PNG_LIBS = @PNG_LIBS@
23152 -POFILES = @POFILES@
23153 -POSUB = @POSUB@
23154 -PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
23155 -PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
23156 -PYTHON = @PYTHON@
23157 -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
23158 -PYTHON_INCLUDES = @PYTHON_INCLUDES@
23159 -PYTHON_PLATFORM = @PYTHON_PLATFORM@
23160 -PYTHON_PREFIX = @PYTHON_PREFIX@
23161 -PYTHON_VERSION = @PYTHON_VERSION@
23162 -RANLIB = @RANLIB@
23163 -REQUIRED_CFLAGS = @REQUIRED_CFLAGS@
23164 -REQUIRED_LIBS = @REQUIRED_LIBS@
23165 -SED = @SED@
23166 -SET_MAKE = @SET_MAKE@
23167 -SHELL = @SHELL@
23168 -STRIP = @STRIP@
23169 -THREADS_CFLAGS = @THREADS_CFLAGS@
23170 -THREADS_LIBS = @THREADS_LIBS@
23171 -TIFF_CFLAGS = @TIFF_CFLAGS@
23172 -TIFF_INCLUDES = @TIFF_INCLUDES@
23173 -TIFF_LIBS = @TIFF_LIBS@
23174 -TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@
23175 -TYPE_INIT_LIBS = @TYPE_INIT_LIBS@
23176 -USE_NLS = @USE_NLS@
23177 -VERSION = @VERSION@
23178 -VIPS_CFLAGS = @VIPS_CFLAGS@
23179 -VIPS_CXX_LIBS = @VIPS_CXX_LIBS@
23180 -VIPS_EXEEXT = @VIPS_EXEEXT@
23181 -VIPS_INCLUDES = @VIPS_INCLUDES@
23182 -VIPS_LIBDIR = @VIPS_LIBDIR@
23183 -VIPS_LIBS = @VIPS_LIBS@
23184 -VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@
23185 -VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@
23186 -VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@
23187 -VIPS_VERSION = @VIPS_VERSION@
23188 -VIPS_VERSION_STRING = @VIPS_VERSION_STRING@
23189 -XGETTEXT = @XGETTEXT@
23190 -XMKMF = @XMKMF@
23191 -X_CFLAGS = @X_CFLAGS@
23192 -X_EXTRA_LIBS = @X_EXTRA_LIBS@
23193 -X_LIBS = @X_LIBS@
23194 -X_PRE_LIBS = @X_PRE_LIBS@
23195 -ZIP_INCLUDES = @ZIP_INCLUDES@
23196 -ZIP_LIBS = @ZIP_LIBS@
23197 -abs_builddir = @abs_builddir@
23198 -abs_srcdir = @abs_srcdir@
23199 -abs_top_builddir = @abs_top_builddir@
23200 -abs_top_srcdir = @abs_top_srcdir@
23201 -ac_ct_AR = @ac_ct_AR@
23202 -ac_ct_CC = @ac_ct_CC@
23203 -ac_ct_CXX = @ac_ct_CXX@
23204 -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
23205 -am__include = @am__include@
23206 -am__leading_dot = @am__leading_dot@
23207 -am__quote = @am__quote@
23208 -am__tar = @am__tar@
23209 -am__untar = @am__untar@
23210 -bindir = @bindir@
23211 -build = @build@
23212 -build_alias = @build_alias@
23213 -build_cpu = @build_cpu@
23214 -build_os = @build_os@
23215 -build_vendor = @build_vendor@
23216 -builddir = @builddir@
23217 -datadir = @datadir@
23218 -datarootdir = @datarootdir@
23219 -docdir = @docdir@
23220 -dvidir = @dvidir@
23221 -exec_prefix = @exec_prefix@
23222 -host = @host@
23223 -host_alias = @host_alias@
23224 -host_cpu = @host_cpu@
23225 -host_os = @host_os@
23226 -host_vendor = @host_vendor@
23227 -htmldir = @htmldir@
23228 -includedir = @includedir@
23229 -infodir = @infodir@
23230 -install_sh = @install_sh@
23231 -libdir = @libdir@
23232 -libexecdir = @libexecdir@
23233 -localedir = @localedir@
23234 -localstatedir = @localstatedir@
23235 -mandir = @mandir@
23236 -mkdir_p = @mkdir_p@
23237 -oldincludedir = @oldincludedir@
23238 -pdfdir = @pdfdir@
23239 -pkgpyexecdir = @pkgpyexecdir@
23240 -pkgpythondir = @pkgpythondir@
23241 -prefix = @prefix@
23242 -program_transform_name = @program_transform_name@
23243 -psdir = @psdir@
23244 -pyexecdir = @pyexecdir@
23245 -pythondir = @pythondir@
23246 -sbindir = @sbindir@
23247 -sharedstatedir = @sharedstatedir@
23248 -srcdir = @srcdir@
23249 -sysconfdir = @sysconfdir@
23250 -target_alias = @target_alias@
23251 -top_build_prefix = @top_build_prefix@
23252 -top_builddir = @top_builddir@
23253 -top_srcdir = @top_srcdir@
23254 -vips_introspection_sources = @vips_introspection_sources@
23255 -noinst_LTLIBRARIES = libcimg.la
23256 -libcimg_la_SOURCES = \
23257 - CImg.h \
23258 - cimg_dispatch.c \
23259 - cimg.cpp
23260 -
23261 -@OS_WIN32_FALSE@AM_CPPFLAGS = -Dcimg_strict -Dcimg_OS=1 \
23262 -@OS_WIN32_FALSE@ -Dcimg_display_type=0 \
23263 -@OS_WIN32_FALSE@ -DLOCALEDIR=\""$(LOCALEDIR)"\" \
23264 -@OS_WIN32_FALSE@ -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ \
23265 -@OS_WIN32_FALSE@ @VIPS_INCLUDES@ $(am__empty)
23266 -
23267 -# various cimg settings as well
23268 -# we need to change these a bit for win32
23269 -@OS_WIN32_TRUE@AM_CPPFLAGS = -Dcimg_strict -Dcimg_OS=0 \
23270 -@OS_WIN32_TRUE@ -Dcimg_display_type=0 \
23271 -@OS_WIN32_TRUE@ -DLOCALEDIR=\""$(LOCALEDIR)"\" \
23272 -@OS_WIN32_TRUE@ -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ \
23273 -@OS_WIN32_TRUE@ @VIPS_INCLUDES@ $(am__empty)
23274 -
23275 -# used by the final libvips link rather than us
23276 -EXTRA_DIST = dummy2.cc
23277 -all: all-am
23278 -
23279 -.SUFFIXES:
23280 -.SUFFIXES: .c .cpp .lo .o .obj
23281 -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
23282 - @for dep in $?; do \
23283 - case '$(am__configure_deps)' in \
23284 - *$$dep*) \
23285 - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
23286 - && { if test -f $@; then exit 0; else break; fi; }; \
23287 - exit 1;; \
23288 - esac; \
23289 - done; \
23290 - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvips/cimg/Makefile'; \
23291 - $(am__cd) $(top_srcdir) && \
23292 - $(AUTOMAKE) --foreign libvips/cimg/Makefile
23293 -.PRECIOUS: Makefile
23294 -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
23295 - @case '$?' in \
23296 - *config.status*) \
23297 - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
23298 - *) \
23299 - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
23300 - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
23301 - esac;
23302 -
23303 -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
23304 - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
23305 -
23306 -$(top_srcdir)/configure: $(am__configure_deps)
23307 - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
23308 -$(ACLOCAL_M4): $(am__aclocal_m4_deps)
23309 - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
23310 -$(am__aclocal_m4_deps):
23311 -
23312 -clean-noinstLTLIBRARIES:
23313 - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
23314 - @list='$(noinst_LTLIBRARIES)'; \
23315 - locs=`for p in $$list; do echo $$p; done | \
23316 - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
23317 - sort -u`; \
23318 - test -z "$$locs" || { \
23319 - echo rm -f $${locs}; \
23320 - rm -f $${locs}; \
23321 - }
23322 -
23323 -libcimg.la: $(libcimg_la_OBJECTS) $(libcimg_la_DEPENDENCIES) $(EXTRA_libcimg_la_DEPENDENCIES)
23324 - $(AM_V_CXXLD)$(CXXLINK) $(libcimg_la_OBJECTS) $(libcimg_la_LIBADD) $(LIBS)
23325 -
23326 -mostlyclean-compile:
23327 - -rm -f *.$(OBJEXT)
23328 -
23329 -distclean-compile:
23330 - -rm -f *.tab.c
23331 -
23332 -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cimg.Plo@am__quote@
23333 -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cimg_dispatch.Plo@am__quote@
23334 -
23335 -.c.o:
23336 -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
23337 -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
23338 -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
23339 -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
23340 -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
23341 -
23342 -.c.obj:
23343 -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
23344 -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
23345 -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
23346 -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
23347 -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
23348 -
23349 -.c.lo:
23350 -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
23351 -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
23352 -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
23353 -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
23354 -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
23355 -
23356 -.cpp.o:
23357 -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
23358 -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
23359 -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
23360 -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
23361 -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
23362 -
23363 -.cpp.obj:
23364 -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
23365 -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
23366 -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
23367 -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
23368 -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
23369 -
23370 -.cpp.lo:
23371 -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
23372 -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
23373 -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
23374 -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
23375 -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
23376 -
23377 -mostlyclean-libtool:
23378 - -rm -f *.lo
23379 -
23380 -clean-libtool:
23381 - -rm -rf .libs _libs
23382 -
23383 -ID: $(am__tagged_files)
23384 - $(am__define_uniq_tagged_files); mkid -fID $$unique
23385 -tags: tags-am
23386 -TAGS: tags
23387 -
23388 -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
23389 - set x; \
23390 - here=`pwd`; \
23391 - $(am__define_uniq_tagged_files); \
23392 - shift; \
23393 - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
23394 - test -n "$$unique" || unique=$$empty_fix; \
23395 - if test $$# -gt 0; then \
23396 - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
23397 - "$$@" $$unique; \
23398 - else \
23399 - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
23400 - $$unique; \
23401 - fi; \
23402 - fi
23403 -ctags: ctags-am
23404 -
23405 -CTAGS: ctags
23406 -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
23407 - $(am__define_uniq_tagged_files); \
23408 - test -z "$(CTAGS_ARGS)$$unique" \
23409 - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
23410 - $$unique
23411 -
23412 -GTAGS:
23413 - here=`$(am__cd) $(top_builddir) && pwd` \
23414 - && $(am__cd) $(top_srcdir) \
23415 - && gtags -i $(GTAGS_ARGS) "$$here"
23416 -cscopelist: cscopelist-am
23417 -
23418 -cscopelist-am: $(am__tagged_files)
23419 - list='$(am__tagged_files)'; \
23420 - case "$(srcdir)" in \
23421 - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
23422 - *) sdir=$(subdir)/$(srcdir) ;; \
23423 - esac; \
23424 - for i in $$list; do \
23425 - if test -f "$$i"; then \
23426 - echo "$(subdir)/$$i"; \
23427 - else \
23428 - echo "$$sdir/$$i"; \
23429 - fi; \
23430 - done >> $(top_builddir)/cscope.files
23431 -
23432 -distclean-tags:
23433 - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
23434 -
23435 -distdir: $(DISTFILES)
23436 - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
23437 - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
23438 - list='$(DISTFILES)'; \
23439 - dist_files=`for file in $$list; do echo $$file; done | \
23440 - sed -e "s|^$$srcdirstrip/||;t" \
23441 - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
23442 - case $$dist_files in \
23443 - */*) $(MKDIR_P) `echo "$$dist_files" | \
23444 - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
23445 - sort -u` ;; \
23446 - esac; \
23447 - for file in $$dist_files; do \
23448 - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
23449 - if test -d $$d/$$file; then \
23450 - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
23451 - if test -d "$(distdir)/$$file"; then \
23452 - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
23453 - fi; \
23454 - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
23455 - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
23456 - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
23457 - fi; \
23458 - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
23459 - else \
23460 - test -f "$(distdir)/$$file" \
23461 - || cp -p $$d/$$file "$(distdir)/$$file" \
23462 - || exit 1; \
23463 - fi; \
23464 - done
23465 -check-am: all-am
23466 -check: check-am
23467 -all-am: Makefile $(LTLIBRARIES)
23468 -installdirs:
23469 -install: install-am
23470 -install-exec: install-exec-am
23471 -install-data: install-data-am
23472 -uninstall: uninstall-am
23473 -
23474 -install-am: all-am
23475 - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
23476 -
23477 -installcheck: installcheck-am
23478 -install-strip:
23479 - if test -z '$(STRIP)'; then \
23480 - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
23481 - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
23482 - install; \
23483 - else \
23484 - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
23485 - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
23486 - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
23487 - fi
23488 -mostlyclean-generic:
23489 -
23490 -clean-generic:
23491 -
23492 -distclean-generic:
23493 - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
23494 - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
23495 -
23496 -maintainer-clean-generic:
23497 - @echo "This command is intended for maintainers to use"
23498 - @echo "it deletes files that may require special tools to rebuild."
23499 -clean: clean-am
23500 -
23501 -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
23502 - mostlyclean-am
23503 -
23504 -distclean: distclean-am
23505 - -rm -rf ./$(DEPDIR)
23506 - -rm -f Makefile
23507 -distclean-am: clean-am distclean-compile distclean-generic \
23508 - distclean-tags
23509 -
23510 -dvi: dvi-am
23511 -
23512 -dvi-am:
23513 -
23514 -html: html-am
23515 -
23516 -html-am:
23517 -
23518 -info: info-am
23519 -
23520 -info-am:
23521 -
23522 -install-data-am:
23523 -
23524 -install-dvi: install-dvi-am
23525 -
23526 -install-dvi-am:
23527 -
23528 -install-exec-am:
23529 -
23530 -install-html: install-html-am
23531 -
23532 -install-html-am:
23533 -
23534 -install-info: install-info-am
23535 -
23536 -install-info-am:
23537 -
23538 -install-man:
23539 -
23540 -install-pdf: install-pdf-am
23541 -
23542 -install-pdf-am:
23543 -
23544 -install-ps: install-ps-am
23545 -
23546 -install-ps-am:
23547 -
23548 -installcheck-am:
23549 -
23550 -maintainer-clean: maintainer-clean-am
23551 - -rm -rf ./$(DEPDIR)
23552 - -rm -f Makefile
23553 -maintainer-clean-am: distclean-am maintainer-clean-generic
23554 -
23555 -mostlyclean: mostlyclean-am
23556 -
23557 -mostlyclean-am: mostlyclean-compile mostlyclean-generic \
23558 - mostlyclean-libtool
23559 -
23560 -pdf: pdf-am
23561 -
23562 -pdf-am:
23563 -
23564 -ps: ps-am
23565 -
23566 -ps-am:
23567 -
23568 -uninstall-am:
23569 -
23570 -.MAKE: install-am install-strip
23571 -
23572 -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
23573 - clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \
23574 - ctags-am distclean distclean-compile distclean-generic \
23575 - distclean-libtool distclean-tags distdir dvi dvi-am html \
23576 - html-am info info-am install install-am install-data \
23577 - install-data-am install-dvi install-dvi-am install-exec \
23578 - install-exec-am install-html install-html-am install-info \
23579 - install-info-am install-man install-pdf install-pdf-am \
23580 - install-ps install-ps-am install-strip installcheck \
23581 - installcheck-am installdirs maintainer-clean \
23582 - maintainer-clean-generic mostlyclean mostlyclean-compile \
23583 - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
23584 - tags tags-am uninstall uninstall-am
23585 -
23586 -
23587 -# Tell versions [3.59,3.63) of GNU make to not export all variables.
23588 -# Otherwise a system limit (for SysV at least) may be exceeded.
23589 -.NOEXPORT:
23590 diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/Makefile.am vips-7.38.5/libvips/Makefile.am
23591 --- vips-7.38.5-vanilla/libvips/Makefile.am 2014-07-17 23:48:36.231794473 -0400
23592 +++ vips-7.38.5/libvips/Makefile.am 2014-07-17 23:49:32.819792979 -0400
23593 @@ -1,13 +1,5 @@
23594 -# only build in the cimg dir if C++ is enabled
23595 -if ENABLE_CXX
23596 -C_COMPILE_DIR = cimg
23597 -C_DIST_DIR =
23598 -C_LIB = cimg/libcimg.la
23599 -else
23600 C_COMPILE_DIR =
23601 -C_DIST_DIR = cimg
23602 C_LIB =
23603 -endif
23604
23605 SUBDIRS = \
23606 include \
23607 @@ -34,14 +26,6 @@
23608 # empty means default to C linking
23609 libvips_la_SOURCES =
23610
23611 -# if we have C++ components enabled, make sure we link the top-level with c++
23612 -#
23613 -# sadly the if/endif isn't enough to stop automake detecting a c++ link even
23614 -# when c++ is disabled ... comment out this line if you have linking problems
23615 -if ENABLE_CXX
23616 -nodist_EXTRA_libvips_la_SOURCES = cimg/dummy2.cc
23617 -endif
23618 -
23619 # DLLs need dependant libs there too ... put @VIPS_LIBS@ at the end
23620 libvips_la_LIBADD = \
23621 resample/libresample.la \
23622 diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/Makefile.in vips-7.38.5/libvips/Makefile.in
23623 --- vips-7.38.5-vanilla/libvips/Makefile.in 2014-07-17 23:48:36.231794473 -0400
23624 +++ vips-7.38.5/libvips/Makefile.in 2014-07-17 23:49:32.819792979 -0400
23625 @@ -142,7 +142,7 @@
23626 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
23627 am__v_lt_0 = --silent
23628 am__v_lt_1 =
23629 -libvips_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
23630 +libvips_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
23631 $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
23632 $(CXXFLAGS) $(libvips_la_LDFLAGS) $(LDFLAGS) -o $@
23633 AM_V_P = $(am__v_P_@AM_V@)
23634 @@ -163,7 +163,7 @@
23635 am__mv = mv -f
23636 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
23637 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
23638 -LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
23639 +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
23640 $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
23641 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
23642 $(AM_CXXFLAGS) $(CXXFLAGS)
23643 @@ -172,7 +172,7 @@
23644 am__v_CXX_0 = @echo " CXX " $@;
23645 am__v_CXX_1 =
23646 CXXLD = $(CXX)
23647 -CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
23648 +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
23649 $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
23650 $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
23651 AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
23652 @@ -667,11 +667,11 @@
23653 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
23654
23655 dummy2.lo: cimg/dummy2.cc
23656 -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dummy2.lo -MD -MP -MF $(DEPDIR)/dummy2.Tpo -c -o dummy2.lo `test -f 'cimg/dummy2.cc' || echo '$(srcdir)/'`cimg/dummy2.cc
23657 +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dummy2.lo -MD -MP -MF $(DEPDIR)/dummy2.Tpo -c -o dummy2.lo `test -f 'cimg/dummy2.cc' || echo '$(srcdir)/'`cimg/dummy2.cc
23658 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dummy2.Tpo $(DEPDIR)/dummy2.Plo
23659 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cimg/dummy2.cc' object='dummy2.lo' libtool=yes @AMDEPBACKSLASH@
23660 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
23661 -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dummy2.lo `test -f 'cimg/dummy2.cc' || echo '$(srcdir)/'`cimg/dummy2.cc
23662 +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dummy2.lo `test -f 'cimg/dummy2.cc' || echo '$(srcdir)/'`cimg/dummy2.cc
23663
23664 mostlyclean-libtool:
23665 -rm -f *.lo
23666 diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/resample/bicubic.cpp vips-7.38.5/libvips/resample/bicubic.cpp
23667 --- vips-7.38.5-vanilla/libvips/resample/bicubic.cpp 2014-07-17 23:48:36.232794473 -0400
23668 +++ vips-7.38.5/libvips/resample/bicubic.cpp 1969-12-31 19:00:00.000000000 -0500
23669 @@ -1,459 +0,0 @@
23670 -/* bicubic (catmull-rom) interpolator
23671 - *
23672 - * 12/8/10
23673 - * - revise window_size / window_offset stuff again
23674 - */
23675 -
23676 -/*
23677 -
23678 - This file is part of VIPS.
23679 -
23680 - VIPS is free software; you can redistribute it and/or modify
23681 - it under the terms of the GNU Lesser General Public License as published by
23682 - the Free Software Foundation; either version 2 of the License, or
23683 - (at your option) any later version.
23684 -
23685 - This program is distributed in the hope that it will be useful,
23686 - but WITHOUT ANY WARRANTY; without even the implied warranty of
23687 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23688 - GNU Lesser General Public License for more details.
23689 -
23690 - You should have received a copy of the GNU Lesser General Public License
23691 - along with this program; if not, write to the Free Software
23692 - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23693 - 02110-1301 USA
23694 -
23695 - */
23696 -
23697 -/*
23698 -
23699 - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
23700 -
23701 - */
23702 -
23703 -/* Bicubic (Catmull-Rom) interpolator derived from Nicolas Robidoux's
23704 - * original YAFR resampler with permission and thanks.
23705 - */
23706 -
23707 -/*
23708 -#define DEBUG
23709 - */
23710 -
23711 -#ifdef HAVE_CONFIG_H
23712 -#include <config.h>
23713 -#endif /*HAVE_CONFIG_H*/
23714 -#include <vips/intl.h>
23715 -
23716 -#include <stdio.h>
23717 -#include <stdlib.h>
23718 -
23719 -#include <vips/vips.h>
23720 -#include <vips/internal.h>
23721 -
23722 -#include "templates.h"
23723 -
23724 -#ifdef WITH_DMALLOC
23725 -#include <dmalloc.h>
23726 -#endif /*WITH_DMALLOC*/
23727 -
23728 -#define VIPS_TYPE_INTERPOLATE_BICUBIC \
23729 - (vips_interpolate_bicubic_get_type())
23730 -#define VIPS_INTERPOLATE_BICUBIC( obj ) \
23731 - (G_TYPE_CHECK_INSTANCE_CAST( (obj), \
23732 - VIPS_TYPE_INTERPOLATE_BICUBIC, VipsInterpolateBicubic ))
23733 -#define VIPS_INTERPOLATE_BICUBIC_CLASS( klass ) \
23734 - (G_TYPE_CHECK_CLASS_CAST( (klass), \
23735 - VIPS_TYPE_INTERPOLATE_BICUBIC, VipsInterpolateBicubicClass))
23736 -#define VIPS_IS_INTERPOLATE_BICUBIC( obj ) \
23737 - (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_INTERPOLATE_BICUBIC ))
23738 -#define VIPS_IS_INTERPOLATE_BICUBIC_CLASS( klass ) \
23739 - (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_INTERPOLATE_BICUBIC ))
23740 -#define VIPS_INTERPOLATE_BICUBIC_GET_CLASS( obj ) \
23741 - (G_TYPE_INSTANCE_GET_CLASS( (obj), \
23742 - VIPS_TYPE_INTERPOLATE_BICUBIC, VipsInterpolateBicubicClass ))
23743 -
23744 -typedef VipsInterpolate VipsInterpolateBicubic;
23745 -
23746 -typedef VipsInterpolateClass VipsInterpolateBicubicClass;
23747 -
23748 -/* Precalculated interpolation matrices. int (used for pel
23749 - * sizes up to short), and double (for all others). We go to
23750 - * scale + 1 so we can round-to-nearest safely.
23751 - */
23752 -
23753 -/* We could keep a large set of 2d 4x4 matricies, but this actually
23754 - * works out slower since for many resizes the thing will no longer
23755 - * fit in L1.
23756 - */
23757 -static int vips_bicubic_matrixi[VIPS_TRANSFORM_SCALE + 1][4];
23758 -static double vips_bicubic_matrixf[VIPS_TRANSFORM_SCALE + 1][4];
23759 -
23760 -/* We need C linkage for this.
23761 - */
23762 -extern "C" {
23763 -G_DEFINE_TYPE( VipsInterpolateBicubic, vips_interpolate_bicubic,
23764 - VIPS_TYPE_INTERPOLATE );
23765 -}
23766 -
23767 -/* Pointers to write to / read from, number of bands,
23768 - * how many bytes to add to move down a line.
23769 - */
23770 -
23771 -/* T is the type of pixels we are reading and writing.
23772 - */
23773 -
23774 -/* Fixed-point version, for 8 and 16-bit types.
23775 - */
23776 -template <typename T, int min_value, int max_value>
23777 -static void inline
23778 -bicubic_int_tab( void *pout, const VipsPel *pin,
23779 - const int bands, const int lskip,
23780 - const int *cx, const int *cy )
23781 -{
23782 - T* restrict out = (T *) pout;
23783 - const T* restrict in = (T *) pin;
23784 -
23785 - const int b1 = bands;
23786 - const int b2 = b1 + b1;
23787 - const int b3 = b1 + b2;
23788 -
23789 - const int l1 = lskip / sizeof( T );
23790 - const int l2 = l1 + l1;
23791 - const int l3 = l1 + l2;
23792 -
23793 - const int l1_plus_b1 = l1 + b1;
23794 - const int l1_plus_b2 = l1 + b2;
23795 - const int l1_plus_b3 = l1 + b3;
23796 - const int l2_plus_b1 = l2 + b1;
23797 - const int l2_plus_b2 = l2 + b2;
23798 - const int l2_plus_b3 = l2 + b3;
23799 - const int l3_plus_b1 = l3 + b1;
23800 - const int l3_plus_b2 = l3 + b2;
23801 - const int l3_plus_b3 = l3 + b3;
23802 -
23803 - for( int z = 0; z < bands; z++ ) {
23804 - const T uno_one = in[0];
23805 - const T uno_two = in[b1];
23806 - const T uno_thr = in[b2];
23807 - const T uno_fou = in[b3];
23808 -
23809 - const T dos_one = in[l1];
23810 - const T dos_two = in[l1_plus_b1];
23811 - const T dos_thr = in[l1_plus_b2];
23812 - const T dos_fou = in[l1_plus_b3];
23813 -
23814 - const T tre_one = in[l2];
23815 - const T tre_two = in[l2_plus_b1];
23816 - const T tre_thr = in[l2_plus_b2];
23817 - const T tre_fou = in[l2_plus_b3];
23818 -
23819 - const T qua_one = in[l3];
23820 - const T qua_two = in[l3_plus_b1];
23821 - const T qua_thr = in[l3_plus_b2];
23822 - const T qua_fou = in[l3_plus_b3];
23823 -
23824 - int bicubic = bicubic_int<T>(
23825 - uno_one, uno_two, uno_thr, uno_fou,
23826 - dos_one, dos_two, dos_thr, dos_fou,
23827 - tre_one, tre_two, tre_thr, tre_fou,
23828 - qua_one, qua_two, qua_thr, qua_fou,
23829 - cx, cy );
23830 -
23831 - if( bicubic < min_value )
23832 - bicubic = min_value;
23833 - else if( bicubic > max_value )
23834 - bicubic = max_value;
23835 -
23836 - out[z] = bicubic;
23837 -
23838 - in += 1;
23839 - }
23840 -}
23841 -
23842 -/* Floating-point version, for int/float types.
23843 - */
23844 -template <typename T>
23845 -static void inline
23846 -bicubic_float_tab( void *pout, const VipsPel *pin,
23847 - const int bands, const int lskip,
23848 - const double *cx, const double *cy )
23849 -{
23850 - T* restrict out = (T *) pout;
23851 - const T* restrict in = (T *) pin;
23852 -
23853 - const int b1 = bands;
23854 - const int b2 = b1 + b1;
23855 - const int b3 = b1 + b2;
23856 -
23857 - const int l1 = lskip / sizeof( T );
23858 - const int l2 = l1 + l1;
23859 - const int l3 = l1 + l2;
23860 -
23861 - const int l1_plus_b1 = l1 + b1;
23862 - const int l1_plus_b2 = l1 + b2;
23863 - const int l1_plus_b3 = l1 + b3;
23864 - const int l2_plus_b1 = l2 + b1;
23865 - const int l2_plus_b2 = l2 + b2;
23866 - const int l2_plus_b3 = l2 + b3;
23867 - const int l3_plus_b1 = l3 + b1;
23868 - const int l3_plus_b2 = l3 + b2;
23869 - const int l3_plus_b3 = l3 + b3;
23870 -
23871 - for( int z = 0; z < bands; z++ ) {
23872 - const T uno_one = in[0];
23873 - const T uno_two = in[b1];
23874 - const T uno_thr = in[b2];
23875 - const T uno_fou = in[b3];
23876 -
23877 - const T dos_one = in[l1];
23878 - const T dos_two = in[l1_plus_b1];
23879 - const T dos_thr = in[l1_plus_b2];
23880 - const T dos_fou = in[l1_plus_b3];
23881 -
23882 - const T tre_one = in[l2];
23883 - const T tre_two = in[l2_plus_b1];
23884 - const T tre_thr = in[l2_plus_b2];
23885 - const T tre_fou = in[l2_plus_b3];
23886 -
23887 - const T qua_one = in[l3];
23888 - const T qua_two = in[l3_plus_b1];
23889 - const T qua_thr = in[l3_plus_b2];
23890 - const T qua_fou = in[l3_plus_b3];
23891 -
23892 - const T bicubic = bicubic_float<T>(
23893 - uno_one, uno_two, uno_thr, uno_fou,
23894 - dos_one, dos_two, dos_thr, dos_fou,
23895 - tre_one, tre_two, tre_thr, tre_fou,
23896 - qua_one, qua_two, qua_thr, qua_fou,
23897 - cx, cy );
23898 -
23899 - out[z] = bicubic;
23900 -
23901 - in += 1;
23902 - }
23903 -}
23904 -
23905 -/* Ultra-high-quality version for double images.
23906 - */
23907 -template <typename T>
23908 -static void inline
23909 -bicubic_notab( void *pout, const VipsPel *pin,
23910 - const int bands, const int lskip,
23911 - double x, double y )
23912 -{
23913 - T* restrict out = (T *) pout;
23914 - const T* restrict in = (T *) pin;
23915 -
23916 - const int b1 = bands;
23917 - const int b2 = b1 + b1;
23918 - const int b3 = b1 + b2;
23919 -
23920 - const int l1 = lskip / sizeof( T );
23921 - const int l2 = l1 + l1;
23922 - const int l3 = l1 + l2;
23923 -
23924 - const int l1_plus_b1 = l1 + b1;
23925 - const int l1_plus_b2 = l1 + b2;
23926 - const int l1_plus_b3 = l1 + b3;
23927 - const int l2_plus_b1 = l2 + b1;
23928 - const int l2_plus_b2 = l2 + b2;
23929 - const int l2_plus_b3 = l2 + b3;
23930 - const int l3_plus_b1 = l3 + b1;
23931 - const int l3_plus_b2 = l3 + b2;
23932 - const int l3_plus_b3 = l3 + b3;
23933 -
23934 - double cx[4];
23935 - double cy[4];
23936 -
23937 - calculate_coefficients_catmull( x, cx );
23938 - calculate_coefficients_catmull( y, cy );
23939 -
23940 - for( int z = 0; z < bands; z++ ) {
23941 - const T uno_one = in[0];
23942 - const T uno_two = in[b1];
23943 - const T uno_thr = in[b2];
23944 - const T uno_fou = in[b3];
23945 -
23946 - const T dos_one = in[l1];
23947 - const T dos_two = in[l1_plus_b1];
23948 - const T dos_thr = in[l1_plus_b2];
23949 - const T dos_fou = in[l1_plus_b3];
23950 -
23951 - const T tre_one = in[l2];
23952 - const T tre_two = in[l2_plus_b1];
23953 - const T tre_thr = in[l2_plus_b2];
23954 - const T tre_fou = in[l2_plus_b3];
23955 -
23956 - const T qua_one = in[l3];
23957 - const T qua_two = in[l3_plus_b1];
23958 - const T qua_thr = in[l3_plus_b2];
23959 - const T qua_fou = in[l3_plus_b3];
23960 -
23961 - const T bicubic = bicubic_float<T>(
23962 - uno_one, uno_two, uno_thr, uno_fou,
23963 - dos_one, dos_two, dos_thr, dos_fou,
23964 - tre_one, tre_two, tre_thr, tre_fou,
23965 - qua_one, qua_two, qua_thr, qua_fou,
23966 - cx, cy );
23967 -
23968 - out[z] = bicubic;
23969 -
23970 - in += 1;
23971 - }
23972 -}
23973 -
23974 -static void
23975 -vips_interpolate_bicubic_interpolate( VipsInterpolate *interpolate,
23976 - void *out, VipsRegion *in, double x, double y )
23977 -{
23978 - /* Find the mask index. We round-to-nearest, so we need to generate
23979 - * indexes in 0 to VIPS_TRANSFORM_SCALE, 2^n + 1 values. We multiply
23980 - * by 2 more than we need to, add one, mask, then shift down again to
23981 - * get the extra range.
23982 - */
23983 - const int sx = x * VIPS_TRANSFORM_SCALE * 2;
23984 - const int sy = y * VIPS_TRANSFORM_SCALE * 2;
23985 -
23986 - const int six = sx & (VIPS_TRANSFORM_SCALE * 2 - 1);
23987 - const int siy = sy & (VIPS_TRANSFORM_SCALE * 2 - 1);
23988 -
23989 - const int tx = (six + 1) >> 1;
23990 - const int ty = (siy + 1) >> 1;
23991 -
23992 - /* We know x/y are always positive, so we can just (int) them.
23993 - */
23994 - const int ix = (int) x;
23995 - const int iy = (int) y;
23996 -
23997 - /* Back and up one to get the top-left of the 4x4.
23998 - */
23999 - const VipsPel *p = VIPS_REGION_ADDR( in, ix - 1, iy - 1 );
24000 -
24001 - /* Look up the tables we need.
24002 - */
24003 - const int *cxi = vips_bicubic_matrixi[tx];
24004 - const int *cyi = vips_bicubic_matrixi[ty];
24005 - const double *cxf = vips_bicubic_matrixf[tx];
24006 - const double *cyf = vips_bicubic_matrixf[ty];
24007 -
24008 - /* Pel size and line size.
24009 - */
24010 - const int bands = in->im->Bands;
24011 - const int lskip = VIPS_REGION_LSKIP( in );
24012 -
24013 -#ifdef DEBUG
24014 - printf( "vips_interpolate_bicubic_interpolate: %g %g\n", x, y );
24015 - printf( "\tleft=%d, top=%d, width=%d, height=%d\n",
24016 - ix - 1, iy - 1, 4, 4 );
24017 - printf( "\tmaskx=%d, masky=%d\n", tx, ty );
24018 -#endif /*DEBUG*/
24019 -
24020 - switch( in->im->BandFmt ) {
24021 - case VIPS_FORMAT_UCHAR:
24022 - bicubic_int_tab<unsigned char, 0, UCHAR_MAX>(
24023 - out, p, bands, lskip,
24024 - cxi, cyi );
24025 - /*
24026 -
24027 - Handy for benchmarking
24028 -
24029 - bicubic_float_tab<unsigned char>(
24030 - out, p, bands, lskip,
24031 - cxf, cyf );
24032 - bicubic_notab<unsigned char>(
24033 - out, p, bands, lskip,
24034 - x - ix, y - iy );
24035 -
24036 - */
24037 - break;
24038 -
24039 - case VIPS_FORMAT_CHAR:
24040 - bicubic_int_tab<signed char, SCHAR_MIN, SCHAR_MAX>(
24041 - out, p, bands, lskip,
24042 - cxi, cyi );
24043 - break;
24044 -
24045 - case VIPS_FORMAT_USHORT:
24046 - bicubic_int_tab<unsigned short, 0, USHRT_MAX>(
24047 - out, p, bands, lskip,
24048 - cxi, cyi );
24049 - break;
24050 -
24051 - case VIPS_FORMAT_SHORT:
24052 - bicubic_int_tab<signed short, SHRT_MIN, SHRT_MAX>(
24053 - out, p, bands, lskip,
24054 - cxi, cyi );
24055 - break;
24056 -
24057 - case VIPS_FORMAT_UINT:
24058 - bicubic_float_tab<unsigned int>( out, p, bands, lskip,
24059 - cxf, cyf );
24060 - break;
24061 -
24062 - case VIPS_FORMAT_INT:
24063 - bicubic_float_tab<signed int>( out, p, bands, lskip,
24064 - cxf, cyf );
24065 - break;
24066 -
24067 - case VIPS_FORMAT_FLOAT:
24068 - bicubic_float_tab<float>( out, p, bands, lskip,
24069 - cxf, cyf );
24070 - break;
24071 -
24072 - case VIPS_FORMAT_DOUBLE:
24073 - bicubic_notab<double>( out, p, bands, lskip,
24074 - x - ix, y - iy );
24075 - break;
24076 -
24077 - case VIPS_FORMAT_COMPLEX:
24078 - bicubic_float_tab<float>( out, p, bands * 2, lskip,
24079 - cxf, cyf );
24080 - break;
24081 -
24082 - case VIPS_FORMAT_DPCOMPLEX:
24083 - bicubic_notab<double>( out, p, bands * 2, lskip,
24084 - x - ix, y - iy );
24085 - break;
24086 -
24087 - default:
24088 - break;
24089 - }
24090 -}
24091 -
24092 -static void
24093 -vips_interpolate_bicubic_class_init( VipsInterpolateBicubicClass *iclass )
24094 -{
24095 - VipsObjectClass *object_class = VIPS_OBJECT_CLASS( iclass );
24096 - VipsInterpolateClass *interpolate_class =
24097 - VIPS_INTERPOLATE_CLASS( iclass );
24098 -
24099 - object_class->nickname = "bicubic";
24100 - object_class->description = _( "Bicubic interpolation (Catmull-Rom)" );
24101 -
24102 - interpolate_class->interpolate = vips_interpolate_bicubic_interpolate;
24103 - interpolate_class->window_size = 4;
24104 -
24105 - /* Build the tables of pre-computed coefficients.
24106 - */
24107 - for( int x = 0; x < VIPS_TRANSFORM_SCALE + 1; x++ ) {
24108 - calculate_coefficients_catmull(
24109 - (float) x / VIPS_TRANSFORM_SCALE,
24110 - vips_bicubic_matrixf[x] );
24111 -
24112 - for( int i = 0; i < 4; i++ )
24113 - vips_bicubic_matrixi[x][i] =
24114 - vips_bicubic_matrixf[x][i] *
24115 - VIPS_INTERPOLATE_SCALE;
24116 - }
24117 -}
24118 -
24119 -static void
24120 -vips_interpolate_bicubic_init( VipsInterpolateBicubic *bicubic )
24121 -{
24122 -#ifdef DEBUG
24123 - printf( "vips_interpolate_bicubic_init: " );
24124 - vips_object_print( VIPS_OBJECT( bicubic ) );
24125 -#endif /*DEBUG*/
24126 -
24127 -}
24128 -
24129 diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/resample/lbb.cpp vips-7.38.5/libvips/resample/lbb.cpp
24130 --- vips-7.38.5-vanilla/libvips/resample/lbb.cpp 2014-07-17 23:48:36.232794473 -0400
24131 +++ vips-7.38.5/libvips/resample/lbb.cpp 1969-12-31 19:00:00.000000000 -0500
24132 @@ -1,868 +0,0 @@
24133 -/* lbb (locally bounded bicubic) resampler
24134 - *
24135 - * N. Robidoux, C. Racette and J. Cupitt, 23-28/03/2010
24136 - *
24137 - * N. Robidoux, 16-19/05/2010
24138 - *
24139 - * N. Robidoux, 22/11/2011
24140 - */
24141 -
24142 -/*
24143 -
24144 - This file is part of VIPS.
24145 -
24146 - VIPS is free software; you can redistribute it and/or modify it
24147 - under the terms of the GNU Lesser General Public License as
24148 - published by the Free Software Foundation; either version 2 of the
24149 - License, or (at your option) any later version.
24150 -
24151 - This program is distributed in the hope that it will be useful,
24152 - but WITHOUT ANY WARRANTY; without even the implied warranty of
24153 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24154 - Lesser General Public License for more details.
24155 -
24156 - You should have received a copy of the GNU Lesser General Public
24157 - License along with this program; if not, write to the Free Software
24158 - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24159 - 02110-1301 USA
24160 -
24161 - */
24162 -
24163 -/*
24164 -
24165 - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
24166 -
24167 - */
24168 -
24169 -/*
24170 - * 2010 (c) Nicolas Robidoux, Chantal Racette, John Cupitt.
24171 - *
24172 - * N. Robidoux thanks Adam Turcotte, Geert Jordaens, Ralf Meyer,
24173 - * Øyvind Kolås, Minglun Gong, Eric Daoust and Sven Neumann for useful
24174 - * comments and code.
24175 - *
24176 - * C. Racette's image resampling research and programming funded in
24177 - * part by an NSERC (National Science and Engineering Research Council
24178 - * of Canada) Alexander Graham Bell Canada Graduate Scholarship, by an
24179 - * NSERC Discovery Grant awarded to Julien Dompierre (grant number
24180 - * 20-61098) and by N. Robidoux's Laurentian University professional
24181 - * allowance.
24182 - */
24183 -
24184 -/*
24185 - * LBB has two versions:
24186 - *
24187 - * A "soft" version, which shows a little less staircasing and a
24188 - * little more haloing, and which is a little more expensive to
24189 - * compute. We recommend this as the default.
24190 - *
24191 - * A "sharp" version, which shows a little more staircasing and a
24192 - * little less haloing, which is a little cheaper (it uses 6 less
24193 - * comparisons and 12 less "? :").
24194 - *
24195 - * The only difference between the two is that the "soft" versions
24196 - * uses local minima and maxima computed over 3x3 square blocks, and
24197 - * the "sharp" version uses local minima and maxima computed over 3x3
24198 - * crosses.
24199 - *
24200 - * If you want to use the "sharp" version, comment out the following
24201 - * three pre-processor code lines:
24202 - */
24203 -/*
24204 -#ifndef __LBB_CHEAP_H__
24205 -#define __LBB_CHEAP_H__
24206 -#endif
24207 -*/
24208 -
24209 -/*
24210 - * LBB (Locally Bounded Bicubic) is a high quality nonlinear variant
24211 - * of Catmull-Rom. Images resampled with LBB have much smaller halos
24212 - * than images resampled with windowed sincs or other interpolatory
24213 - * cubic spline filters. Specifically, LBB halos are narrower and the
24214 - * over/undershoot amplitude is smaller. This is accomplished without
24215 - * significantly affecting the smoothness of the result (compared to
24216 - * Catmull-Rom).
24217 - *
24218 - * Another important property is that the resampled values are
24219 - * contained within the range of nearby input values. Consequently, no
24220 - * final clamping is needed to stay "in range" (e.g., 0-255 for
24221 - * standard 8-bit images).
24222 - *
24223 - * LBB was developed by N. Robidoux and C. Racette at the Department
24224 - * of Mathematics and Computer Science of Laurentian University in the
24225 - * course of C. Racette's Masters thesis in Computational
24226 - * Sciences. Preliminary work directly leading to the LBB method and
24227 - * code was performed by C. Racette and N. Robidoux in the course of
24228 - * her honours thesis, and by N. Robidoux, A. Turcotte and E. Daoust
24229 - * during Google Summer of Code 2009 (through two awards made to GIMP
24230 - * to improve GEGL).
24231 - *
24232 - * LBB is a novel method with the following properties:
24233 - *
24234 - * --LBB is a Hermite bicubic method: The bicubic surface is defined,
24235 - * one convex hull of four nearby input points at a time, using four
24236 - * point values, four x-derivatives, four y-derivatives, and four
24237 - * cross-derivatives.
24238 - *
24239 - * --The stencil for values in a square patch is the usual 4x4.
24240 - *
24241 - * --LBB is interpolatory.
24242 - *
24243 - * --It is C^1 with continuous cross derivatives.
24244 - *
24245 - * --When the limiters are inactive, LBB gives the same result as
24246 - * Catmull-Rom.
24247 - *
24248 - * --When used on binary images, LBB gives results similar to bicubic
24249 - * Hermite with all first derivatives---but not necessarily the
24250 - * cross derivatives (this last assertion needs to be double
24251 - * checked)--at input pixel locations set to zero.
24252 - *
24253 - * --The LBB reconstruction is locally bounded: Over each square
24254 - * patch, the surface is contained between the minimum and the
24255 - * maximum of the 16 nearest input pixel values.
24256 - *
24257 - * --Consequently, the LBB reconstruction is globally bounded between
24258 - * the very smallest input pixel value and the very largest input
24259 - * pixel value. It is not necessary to clamp results.
24260 - *
24261 - * The LBB method is based on the method of Ken Brodlie, Petros
24262 - * Mashwama and Sohail Butt for constraining Hermite interpolants
24263 - * between globally defined planes:
24264 - *
24265 - * Visualization of surface data to preserve positivity and other
24266 - * simple constraints. Computer & Graphics, Vol. 19, Number 4, pages
24267 - * 585-594, 1995. DOI: 10.1016/0097-8493(95)00036-C.
24268 - *
24269 - * Instead of forcing the reconstructed surface to lie between two
24270 - * GLOBALLY defined planes, LBB constrains one patch at a time to lie
24271 - * between LOCALLY defined planes. This is accomplished by
24272 - * constraining the derivatives (x, y and cross) at each input pixel
24273 - * location so that if the constraint was applied everywhere the
24274 - * surface would fit between the min and max of the values at the 9
24275 - * closest pixel locations. Because this is done with each of the four
24276 - * pixel locations which define the bicubic patch, this forces the
24277 - * reconstructed surface to lie between the min and max of the values
24278 - * at the 16 closest values pixel locations. (Each corner defines its
24279 - * own 3x3 subgroup of the 4x4 stencil. Consequently, the surface is
24280 - * necessarily above the minimum of the four minima, which happens to
24281 - * be the minimum over the 4x4. Similarly with the maxima.)
24282 - *
24283 - * The above paragraph described the "soft" version of LBB. The
24284 - * "sharp" version is similar.
24285 - */
24286 -
24287 -#ifdef HAVE_CONFIG_H
24288 -#include <config.h>
24289 -#endif /*HAVE_CONFIG_H*/
24290 -#include <vips/intl.h>
24291 -
24292 -#include <stdio.h>
24293 -#include <stdlib.h>
24294 -
24295 -#include <vips/vips.h>
24296 -#include <vips/internal.h>
24297 -
24298 -#include "templates.h"
24299 -
24300 -#define VIPS_TYPE_INTERPOLATE_LBB \
24301 - (vips_interpolate_lbb_get_type())
24302 -#define VIPS_INTERPOLATE_LBB( obj ) \
24303 - (G_TYPE_CHECK_INSTANCE_CAST( (obj), \
24304 - VIPS_TYPE_INTERPOLATE_LBB, VipsInterpolateLbb ))
24305 -#define VIPS_INTERPOLATE_LBB_CLASS( klass ) \
24306 - (G_TYPE_CHECK_CLASS_CAST( (klass), \
24307 - VIPS_TYPE_INTERPOLATE_LBB, VipsInterpolateLbbClass))
24308 -#define VIPS_IS_INTERPOLATE_LBB( obj ) \
24309 - (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_INTERPOLATE_LBB ))
24310 -#define VIPS_IS_INTERPOLATE_LBB_CLASS( klass ) \
24311 - (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_INTERPOLATE_LBB ))
24312 -#define VIPS_INTERPOLATE_LBB_GET_CLASS( obj ) \
24313 - (G_TYPE_INSTANCE_GET_CLASS( (obj), \
24314 - VIPS_TYPE_INTERPOLATE_LBB, VipsInterpolateLbbClass ))
24315 -
24316 -typedef struct _VipsInterpolateLbb {
24317 - VipsInterpolate parent_object;
24318 -
24319 -} VipsInterpolateLbb;
24320 -
24321 -typedef struct _VipsInterpolateLbbClass {
24322 - VipsInterpolateClass parent_class;
24323 -
24324 -} VipsInterpolateLbbClass;
24325 -
24326 -/*
24327 - * Absolute value and sign macros:
24328 - */
24329 -#define LBB_ABS(x) ( ((x)>=0.) ? (x) : -(x) )
24330 -#define LBB_SIGN(x) ( ((x)>=0.) ? 1.0 : -1.0 )
24331 -/*
24332 - * MIN and MAX macros set up so that I can put the likely winner in
24333 - * the first argument (forward branch likely blah blah blah):
24334 - */
24335 -#define LBB_MIN(x,y) ( ((x)<=(y)) ? (x) : (y) )
24336 -#define LBB_MAX(x,y) ( ((x)>=(y)) ? (x) : (y) )
24337 -
24338 -static inline double
24339 -lbbicubic( const double c00,
24340 - const double c10,
24341 - const double c01,
24342 - const double c11,
24343 - const double c00dx,
24344 - const double c10dx,
24345 - const double c01dx,
24346 - const double c11dx,
24347 - const double c00dy,
24348 - const double c10dy,
24349 - const double c01dy,
24350 - const double c11dy,
24351 - const double c00dxdy,
24352 - const double c10dxdy,
24353 - const double c01dxdy,
24354 - const double c11dxdy,
24355 - const double uno_one,
24356 - const double uno_two,
24357 - const double uno_thr,
24358 - const double uno_fou,
24359 - const double dos_one,
24360 - const double dos_two,
24361 - const double dos_thr,
24362 - const double dos_fou,
24363 - const double tre_one,
24364 - const double tre_two,
24365 - const double tre_thr,
24366 - const double tre_fou,
24367 - const double qua_one,
24368 - const double qua_two,
24369 - const double qua_thr,
24370 - const double qua_fou )
24371 -{
24372 - /*
24373 - * STENCIL (FOOTPRINT) OF INPUT VALUES:
24374 - *
24375 - * The stencil of LBB is the same as for any standard Hermite
24376 - * bicubic (e.g., Catmull-Rom):
24377 - *
24378 - * (ix-1,iy-1) (ix,iy-1) (ix+1,iy-1) (ix+2,iy-1)
24379 - * = uno_one = uno_two = uno_thr = uno_fou
24380 - *
24381 - * (ix-1,iy) (ix,iy) (ix+1,iy) (ix+2,iy)
24382 - * = dos_one = dos_two = dos_thr = dos_fou
24383 - * X
24384 - * (ix-1,iy+1) (ix,iy+1) (ix+1,iy+1) (ix+2,iy+1)
24385 - * = tre_one = tre_two = tre_thr = tre_fou
24386 - *
24387 - * (ix-1,iy+2) (ix,iy+2) (ix+1,iy+2) (ix+2,iy+2)
24388 - * = qua_one = qua_two = qua_thr = qua_fou
24389 - *
24390 - * where ix is the (pseudo-)floor of the requested left-to-right
24391 - * location ("X"), and iy is the floor of the requested up-to-down
24392 - * location.
24393 - */
24394 -
24395 -#if defined (__LBB_CHEAP_H__)
24396 - /*
24397 - * Computation of the four min and four max over 3x3 input data
24398 - * sub-crosses of the 4x4 input stencil, performed with only 22
24399 - * comparisons and 28 "? :". If you can figure out how to do this
24400 - * more efficiently, let us know.
24401 - *
24402 - * This is the cheaper (but arguably less desirable in terms of
24403 - * quality) version of the computation.
24404 - */
24405 - const double m1 = (dos_two <= dos_thr) ? dos_two : dos_thr ;
24406 - const double M1 = (dos_two <= dos_thr) ? dos_thr : dos_two ;
24407 - const double m2 = (tre_two <= tre_thr) ? tre_two : tre_thr ;
24408 - const double M2 = (tre_two <= tre_thr) ? tre_thr : tre_two ;
24409 - const double m3 = (uno_two <= dos_one) ? uno_two : dos_one ;
24410 - const double M3 = (uno_two <= dos_one) ? dos_one : uno_two ;
24411 - const double m4 = (uno_thr <= dos_fou) ? uno_thr : dos_fou ;
24412 - const double M4 = (uno_thr <= dos_fou) ? dos_fou : uno_thr ;
24413 - const double m5 = (tre_one <= qua_two) ? tre_one : qua_two ;
24414 - const double M5 = (tre_one <= qua_two) ? qua_two : tre_one ;
24415 - const double m6 = (tre_fou <= qua_thr) ? tre_fou : qua_thr ;
24416 - const double M6 = (tre_fou <= qua_thr) ? qua_thr : tre_fou ;
24417 - const double m7 = LBB_MIN( m1, tre_two );
24418 - const double M7 = LBB_MAX( M1, tre_two );
24419 - const double m8 = LBB_MIN( m1, tre_thr );
24420 - const double M8 = LBB_MAX( M1, tre_thr );
24421 - const double m9 = LBB_MIN( m2, dos_two );
24422 - const double M9 = LBB_MAX( M2, dos_two );
24423 - const double m10 = LBB_MIN( m2, dos_thr );
24424 - const double M10 = LBB_MAX( M2, dos_thr );
24425 - const double min00 = LBB_MIN( m7, m3 );
24426 - const double max00 = LBB_MAX( M7, M3 );
24427 - const double min10 = LBB_MIN( m8, m4 );
24428 - const double max10 = LBB_MAX( M8, M4 );
24429 - const double min01 = LBB_MIN( m9, m5 );
24430 - const double max01 = LBB_MAX( M9, M5 );
24431 - const double min11 = LBB_MIN( m10, m6 );
24432 - const double max11 = LBB_MAX( M10, M6 );
24433 -#else
24434 - /*
24435 - * Computation of the four min and four max over 3x3 input data
24436 - * sub-blocks of the 4x4 input stencil, performed with only 28
24437 - * comparisons and 34 "? :". If you can figure how to do this more
24438 - * efficiently, let us know.
24439 - */
24440 - const double m1 = (dos_two <= dos_thr) ? dos_two : dos_thr ;
24441 - const double M1 = (dos_two <= dos_thr) ? dos_thr : dos_two ;
24442 - const double m2 = (tre_two <= tre_thr) ? tre_two : tre_thr ;
24443 - const double M2 = (tre_two <= tre_thr) ? tre_thr : tre_two ;
24444 - const double m6 = (dos_one <= tre_one) ? dos_one : tre_one ;
24445 - const double M6 = (dos_one <= tre_one) ? tre_one : dos_one ;
24446 - const double m7 = (dos_fou <= tre_fou) ? dos_fou : tre_fou ;
24447 - const double M7 = (dos_fou <= tre_fou) ? tre_fou : dos_fou ;
24448 - const double m3 = (uno_two <= uno_thr) ? uno_two : uno_thr ;
24449 - const double M3 = (uno_two <= uno_thr) ? uno_thr : uno_two ;
24450 - const double m4 = (qua_two <= qua_thr) ? qua_two : qua_thr ;
24451 - const double M4 = (qua_two <= qua_thr) ? qua_thr : qua_two ;
24452 - const double m5 = LBB_MIN( m1, m2 );
24453 - const double M5 = LBB_MAX( M1, M2 );
24454 - const double m10 = LBB_MIN( m6, uno_one );
24455 - const double M10 = LBB_MAX( M6, uno_one );
24456 - const double m11 = LBB_MIN( m6, qua_one );
24457 - const double M11 = LBB_MAX( M6, qua_one );
24458 - const double m12 = LBB_MIN( m7, uno_fou );
24459 - const double M12 = LBB_MAX( M7, uno_fou );
24460 - const double m13 = LBB_MIN( m7, qua_fou );
24461 - const double M13 = LBB_MAX( M7, qua_fou );
24462 - const double m8 = LBB_MIN( m5, m3 );
24463 - const double M8 = LBB_MAX( M5, M3 );
24464 - const double m9 = LBB_MIN( m5, m4 );
24465 - const double M9 = LBB_MAX( M5, M4 );
24466 - const double min00 = LBB_MIN( m8, m10 );
24467 - const double max00 = LBB_MAX( M8, M10 );
24468 - const double min10 = LBB_MIN( m8, m12 );
24469 - const double max10 = LBB_MAX( M8, M12 );
24470 - const double min01 = LBB_MIN( m9, m11 );
24471 - const double max01 = LBB_MAX( M9, M11 );
24472 - const double min11 = LBB_MIN( m9, m13 );
24473 - const double max11 = LBB_MAX( M9, M13 );
24474 -#endif
24475 -
24476 - /*
24477 - * The remainder of the "per channel" computation involves the
24478 - * computation of:
24479 - *
24480 - * --8 conditional moves,
24481 - *
24482 - * --8 signs (in which the sign of zero is unimportant),
24483 - *
24484 - * --12 minima of two values,
24485 - *
24486 - * --8 maxima of two values,
24487 - *
24488 - * --8 absolute values,
24489 - *
24490 - * for a grand total of 29 minima, 25 maxima, 8 conditional moves, 8
24491 - * signs, and 8 absolute values. If everything is done with
24492 - * conditional moves, "only" 28+8+8+12+8+8=72 flags are involved
24493 - * (because initial min and max can be computed with one flag).
24494 - *
24495 - * The "per channel" part of the computation also involves 107
24496 - * arithmetic operations (54 *, 21 +, 42 -).
24497 - */
24498 -
24499 - /*
24500 - * Distances to the local min and max:
24501 - */
24502 - const double u00 = dos_two - min00;
24503 - const double v00 = max00 - dos_two;
24504 - const double u10 = dos_thr - min10;
24505 - const double v10 = max10 - dos_thr;
24506 - const double u01 = tre_two - min01;
24507 - const double v01 = max01 - tre_two;
24508 - const double u11 = tre_thr - min11;
24509 - const double v11 = max11 - tre_thr;
24510 -
24511 - /*
24512 - * Initial values of the derivatives computed with centered
24513 - * differences. Factors of 1/2 are left out because they are folded
24514 - * in later:
24515 - */
24516 - const double dble_dzdx00i = dos_thr - dos_one;
24517 - const double dble_dzdy11i = qua_thr - dos_thr;
24518 - const double dble_dzdx10i = dos_fou - dos_two;
24519 - const double dble_dzdy01i = qua_two - dos_two;
24520 - const double dble_dzdx01i = tre_thr - tre_one;
24521 - const double dble_dzdy10i = tre_thr - uno_thr;
24522 - const double dble_dzdx11i = tre_fou - tre_two;
24523 - const double dble_dzdy00i = tre_two - uno_two;
24524 -
24525 - /*
24526 - * Signs of the derivatives. The upcoming clamping does not change
24527 - * them (except if the clamping sends a negative derivative to 0, in
24528 - * which case the sign does not matter anyway).
24529 - */
24530 - const double sign_dzdx00 = LBB_SIGN( dble_dzdx00i );
24531 - const double sign_dzdx10 = LBB_SIGN( dble_dzdx10i );
24532 - const double sign_dzdx01 = LBB_SIGN( dble_dzdx01i );
24533 - const double sign_dzdx11 = LBB_SIGN( dble_dzdx11i );
24534 -
24535 - const double sign_dzdy00 = LBB_SIGN( dble_dzdy00i );
24536 - const double sign_dzdy10 = LBB_SIGN( dble_dzdy10i );
24537 - const double sign_dzdy01 = LBB_SIGN( dble_dzdy01i );
24538 - const double sign_dzdy11 = LBB_SIGN( dble_dzdy11i );
24539 -
24540 - /*
24541 - * Initial values of the cross-derivatives. Factors of 1/4 are left
24542 - * out because folded in later:
24543 - */
24544 - const double quad_d2zdxdy00i = uno_one - uno_thr + dble_dzdx01i;
24545 - const double quad_d2zdxdy10i = uno_two - uno_fou + dble_dzdx11i;
24546 - const double quad_d2zdxdy01i = qua_thr - qua_one - dble_dzdx00i;
24547 - const double quad_d2zdxdy11i = qua_fou - qua_two - dble_dzdx10i;
24548 -
24549 - /*
24550 - * Slope limiters. The key multiplier is 3 but we fold a factor of
24551 - * 2, hence 6:
24552 - */
24553 - const double dble_slopelimit_00 = 6.0 * LBB_MIN( u00, v00 );
24554 - const double dble_slopelimit_10 = 6.0 * LBB_MIN( u10, v10 );
24555 - const double dble_slopelimit_01 = 6.0 * LBB_MIN( u01, v01 );
24556 - const double dble_slopelimit_11 = 6.0 * LBB_MIN( u11, v11 );
24557 -
24558 - /*
24559 - * Clamped first derivatives:
24560 - */
24561 - const double dble_dzdx00 =
24562 - ( sign_dzdx00 * dble_dzdx00i <= dble_slopelimit_00 )
24563 - ? dble_dzdx00i : sign_dzdx00 * dble_slopelimit_00;
24564 - const double dble_dzdy00 =
24565 - ( sign_dzdy00 * dble_dzdy00i <= dble_slopelimit_00 )
24566 - ? dble_dzdy00i : sign_dzdy00 * dble_slopelimit_00;
24567 - const double dble_dzdx10 =
24568 - ( sign_dzdx10 * dble_dzdx10i <= dble_slopelimit_10 )
24569 - ? dble_dzdx10i : sign_dzdx10 * dble_slopelimit_10;
24570 - const double dble_dzdy10 =
24571 - ( sign_dzdy10 * dble_dzdy10i <= dble_slopelimit_10 )
24572 - ? dble_dzdy10i : sign_dzdy10 * dble_slopelimit_10;
24573 - const double dble_dzdx01 =
24574 - ( sign_dzdx01 * dble_dzdx01i <= dble_slopelimit_01 )
24575 - ? dble_dzdx01i : sign_dzdx01 * dble_slopelimit_01;
24576 - const double dble_dzdy01 =
24577 - ( sign_dzdy01 * dble_dzdy01i <= dble_slopelimit_01 )
24578 - ? dble_dzdy01i : sign_dzdy01 * dble_slopelimit_01;
24579 - const double dble_dzdx11 =
24580 - ( sign_dzdx11 * dble_dzdx11i <= dble_slopelimit_11 )
24581 - ? dble_dzdx11i : sign_dzdx11 * dble_slopelimit_11;
24582 - const double dble_dzdy11 =
24583 - ( sign_dzdy11 * dble_dzdy11i <= dble_slopelimit_11 )
24584 - ? dble_dzdy11i : sign_dzdy11 * dble_slopelimit_11;
24585 -
24586 - /*
24587 - * Sums and differences of first derivatives:
24588 - */
24589 - const double twelve_sum00 = 6.0 * ( dble_dzdx00 + dble_dzdy00 );
24590 - const double twelve_dif00 = 6.0 * ( dble_dzdx00 - dble_dzdy00 );
24591 - const double twelve_sum10 = 6.0 * ( dble_dzdx10 + dble_dzdy10 );
24592 - const double twelve_dif10 = 6.0 * ( dble_dzdx10 - dble_dzdy10 );
24593 - const double twelve_sum01 = 6.0 * ( dble_dzdx01 + dble_dzdy01 );
24594 - const double twelve_dif01 = 6.0 * ( dble_dzdx01 - dble_dzdy01 );
24595 - const double twelve_sum11 = 6.0 * ( dble_dzdx11 + dble_dzdy11 );
24596 - const double twelve_dif11 = 6.0 * ( dble_dzdx11 - dble_dzdy11 );
24597 -
24598 - /*
24599 - * Absolute values of the sums:
24600 - */
24601 - const double twelve_abs_sum00 = LBB_ABS( twelve_sum00 );
24602 - const double twelve_abs_sum10 = LBB_ABS( twelve_sum10 );
24603 - const double twelve_abs_sum01 = LBB_ABS( twelve_sum01 );
24604 - const double twelve_abs_sum11 = LBB_ABS( twelve_sum11 );
24605 -
24606 - /*
24607 - * Scaled distances to the min:
24608 - */
24609 - const double u00_times_36 = 36.0 * u00;
24610 - const double u10_times_36 = 36.0 * u10;
24611 - const double u01_times_36 = 36.0 * u01;
24612 - const double u11_times_36 = 36.0 * u11;
24613 -
24614 - /*
24615 - * First cross-derivative limiter:
24616 - */
24617 - const double first_limit00 = twelve_abs_sum00 - u00_times_36;
24618 - const double first_limit10 = twelve_abs_sum10 - u10_times_36;
24619 - const double first_limit01 = twelve_abs_sum01 - u01_times_36;
24620 - const double first_limit11 = twelve_abs_sum11 - u11_times_36;
24621 -
24622 - const double quad_d2zdxdy00ii = LBB_MAX( quad_d2zdxdy00i, first_limit00 );
24623 - const double quad_d2zdxdy10ii = LBB_MAX( quad_d2zdxdy10i, first_limit10 );
24624 - const double quad_d2zdxdy01ii = LBB_MAX( quad_d2zdxdy01i, first_limit01 );
24625 - const double quad_d2zdxdy11ii = LBB_MAX( quad_d2zdxdy11i, first_limit11 );
24626 -
24627 - /*
24628 - * Scaled distances to the max:
24629 - */
24630 - const double v00_times_36 = 36.0 * v00;
24631 - const double v10_times_36 = 36.0 * v10;
24632 - const double v01_times_36 = 36.0 * v01;
24633 - const double v11_times_36 = 36.0 * v11;
24634 -
24635 - /*
24636 - * Second cross-derivative limiter:
24637 - */
24638 - const double second_limit00 = v00_times_36 - twelve_abs_sum00;
24639 - const double second_limit10 = v10_times_36 - twelve_abs_sum10;
24640 - const double second_limit01 = v01_times_36 - twelve_abs_sum01;
24641 - const double second_limit11 = v11_times_36 - twelve_abs_sum11;
24642 -
24643 - const double quad_d2zdxdy00iii = LBB_MIN( quad_d2zdxdy00ii, second_limit00 );
24644 - const double quad_d2zdxdy10iii = LBB_MIN( quad_d2zdxdy10ii, second_limit10 );
24645 - const double quad_d2zdxdy01iii = LBB_MIN( quad_d2zdxdy01ii, second_limit01 );
24646 - const double quad_d2zdxdy11iii = LBB_MIN( quad_d2zdxdy11ii, second_limit11 );
24647 -
24648 - /*
24649 - * Absolute values of the differences:
24650 - */
24651 - const double twelve_abs_dif00 = LBB_ABS( twelve_dif00 );
24652 - const double twelve_abs_dif10 = LBB_ABS( twelve_dif10 );
24653 - const double twelve_abs_dif01 = LBB_ABS( twelve_dif01 );
24654 - const double twelve_abs_dif11 = LBB_ABS( twelve_dif11 );
24655 -
24656 - /*
24657 - * Third cross-derivative limiter:
24658 - */
24659 - const double third_limit00 = twelve_abs_dif00 - v00_times_36;
24660 - const double third_limit10 = twelve_abs_dif10 - v10_times_36;
24661 - const double third_limit01 = twelve_abs_dif01 - v01_times_36;
24662 - const double third_limit11 = twelve_abs_dif11 - v11_times_36;
24663 -
24664 - const double quad_d2zdxdy00iiii = LBB_MAX( quad_d2zdxdy00iii, third_limit00);
24665 - const double quad_d2zdxdy10iiii = LBB_MAX( quad_d2zdxdy10iii, third_limit10);
24666 - const double quad_d2zdxdy01iiii = LBB_MAX( quad_d2zdxdy01iii, third_limit01);
24667 - const double quad_d2zdxdy11iiii = LBB_MAX( quad_d2zdxdy11iii, third_limit11);
24668 -
24669 - /*
24670 - * Fourth cross-derivative limiter:
24671 - */
24672 - const double fourth_limit00 = u00_times_36 - twelve_abs_dif00;
24673 - const double fourth_limit10 = u10_times_36 - twelve_abs_dif10;
24674 - const double fourth_limit01 = u01_times_36 - twelve_abs_dif01;
24675 - const double fourth_limit11 = u11_times_36 - twelve_abs_dif11;
24676 -
24677 - const double quad_d2zdxdy00 = LBB_MIN( quad_d2zdxdy00iiii, fourth_limit00);
24678 - const double quad_d2zdxdy10 = LBB_MIN( quad_d2zdxdy10iiii, fourth_limit10);
24679 - const double quad_d2zdxdy01 = LBB_MIN( quad_d2zdxdy01iiii, fourth_limit01);
24680 - const double quad_d2zdxdy11 = LBB_MIN( quad_d2zdxdy11iiii, fourth_limit11);
24681 -
24682 - /*
24683 - * Part of the result which does not need derivatives:
24684 - */
24685 - const double newval1 = c00 * dos_two + c10 * dos_thr +
24686 - c01 * tre_two + c11 * tre_thr;
24687 -
24688 - /*
24689 - * Twice the part of the result which only needs first derivatives.
24690 - */
24691 - const double newval2 = c00dx * dble_dzdx00 + c10dx * dble_dzdx10 +
24692 - c01dx * dble_dzdx01 + c11dx * dble_dzdx11 +
24693 - c00dy * dble_dzdy00 + c10dy * dble_dzdy10 +
24694 - c01dy * dble_dzdy01 + c11dy * dble_dzdy11;
24695 -
24696 - /*
24697 - * Four times the part of the result which only uses cross
24698 - * derivatives:
24699 - */
24700 - const double newval3 = c00dxdy * quad_d2zdxdy00 + c10dxdy * quad_d2zdxdy10 +
24701 - c01dxdy * quad_d2zdxdy01 + c11dxdy * quad_d2zdxdy11;
24702 -
24703 - const double newval = newval1 + .5 * newval2 + .25 * newval3;
24704 -
24705 - return newval;
24706 -}
24707 -
24708 -/*
24709 - * Call lbb with a type conversion operator as a parameter.
24710 - *
24711 - * It would be nice to do this with templates but we can't figure out
24712 - * how to do it cleanly. Suggestions welcome!
24713 - */
24714 -#define LBB_CONVERSION( conversion ) \
24715 - template <typename T> static void inline \
24716 - lbb_ ## conversion( void* restrict pout, \
24717 - const VipsPel* restrict pin, \
24718 - const int bands, \
24719 - const int lskip, \
24720 - const double relative_x, \
24721 - const double relative_y ) \
24722 - { \
24723 - T* restrict out = (T *) pout; \
24724 - \
24725 - const T* restrict in = (T *) pin; \
24726 - \
24727 - const int one_shift = -bands; \
24728 - const int thr_shift = bands; \
24729 - const int fou_shift = 2*bands; \
24730 - \
24731 - const int uno_two_shift = -lskip; \
24732 - \
24733 - const int tre_two_shift = lskip; \
24734 - const int qua_two_shift = 2*lskip; \
24735 - \
24736 - const int uno_one_shift = uno_two_shift + one_shift; \
24737 - const int dos_one_shift = one_shift; \
24738 - const int tre_one_shift = tre_two_shift + one_shift; \
24739 - const int qua_one_shift = qua_two_shift + one_shift; \
24740 - \
24741 - const int uno_thr_shift = uno_two_shift + thr_shift; \
24742 - const int dos_thr_shift = thr_shift; \
24743 - const int tre_thr_shift = tre_two_shift + thr_shift; \
24744 - const int qua_thr_shift = qua_two_shift + thr_shift; \
24745 - \
24746 - const int uno_fou_shift = uno_two_shift + fou_shift; \
24747 - const int dos_fou_shift = fou_shift; \
24748 - const int tre_fou_shift = tre_two_shift + fou_shift; \
24749 - const int qua_fou_shift = qua_two_shift + fou_shift; \
24750 - \
24751 - const double xp1over2 = relative_x; \
24752 - const double xm1over2 = xp1over2 - 1.0; \
24753 - const double onepx = 0.5 + xp1over2; \
24754 - const double onemx = 1.5 - xp1over2; \
24755 - const double xp1over2sq = xp1over2 * xp1over2; \
24756 - \
24757 - const double yp1over2 = relative_y; \
24758 - const double ym1over2 = yp1over2 - 1.0; \
24759 - const double onepy = 0.5 + yp1over2; \
24760 - const double onemy = 1.5 - yp1over2; \
24761 - const double yp1over2sq = yp1over2 * yp1over2; \
24762 - \
24763 - const double xm1over2sq = xm1over2 * xm1over2; \
24764 - const double ym1over2sq = ym1over2 * ym1over2; \
24765 - \
24766 - const double twice1px = onepx + onepx; \
24767 - const double twice1py = onepy + onepy; \
24768 - const double twice1mx = onemx + onemx; \
24769 - const double twice1my = onemy + onemy; \
24770 - \
24771 - const double xm1over2sq_times_ym1over2sq = xm1over2sq * ym1over2sq; \
24772 - const double xp1over2sq_times_ym1over2sq = xp1over2sq * ym1over2sq; \
24773 - const double xp1over2sq_times_yp1over2sq = xp1over2sq * yp1over2sq; \
24774 - const double xm1over2sq_times_yp1over2sq = xm1over2sq * yp1over2sq; \
24775 - \
24776 - const double four_times_1px_times_1py = twice1px * twice1py; \
24777 - const double four_times_1mx_times_1py = twice1mx * twice1py; \
24778 - const double twice_xp1over2_times_1py = xp1over2 * twice1py; \
24779 - const double twice_xm1over2_times_1py = xm1over2 * twice1py; \
24780 - \
24781 - const double twice_xm1over2_times_1my = xm1over2 * twice1my; \
24782 - const double twice_xp1over2_times_1my = xp1over2 * twice1my; \
24783 - const double four_times_1mx_times_1my = twice1mx * twice1my; \
24784 - const double four_times_1px_times_1my = twice1px * twice1my; \
24785 - \
24786 - const double twice_1px_times_ym1over2 = twice1px * ym1over2; \
24787 - const double twice_1mx_times_ym1over2 = twice1mx * ym1over2; \
24788 - const double xp1over2_times_ym1over2 = xp1over2 * ym1over2; \
24789 - const double xm1over2_times_ym1over2 = xm1over2 * ym1over2; \
24790 - \
24791 - const double xm1over2_times_yp1over2 = xm1over2 * yp1over2; \
24792 - const double xp1over2_times_yp1over2 = xp1over2 * yp1over2; \
24793 - const double twice_1mx_times_yp1over2 = twice1mx * yp1over2; \
24794 - const double twice_1px_times_yp1over2 = twice1px * yp1over2; \
24795 - \
24796 - const double c00 = \
24797 - four_times_1px_times_1py * xm1over2sq_times_ym1over2sq; \
24798 - const double c00dx = \
24799 - twice_xp1over2_times_1py * xm1over2sq_times_ym1over2sq; \
24800 - const double c00dy = \
24801 - twice_1px_times_yp1over2 * xm1over2sq_times_ym1over2sq; \
24802 - const double c00dxdy = \
24803 - xp1over2_times_yp1over2 * xm1over2sq_times_ym1over2sq; \
24804 - \
24805 - const double c10 = \
24806 - four_times_1mx_times_1py * xp1over2sq_times_ym1over2sq; \
24807 - const double c10dx = \
24808 - twice_xm1over2_times_1py * xp1over2sq_times_ym1over2sq; \
24809 - const double c10dy = \
24810 - twice_1mx_times_yp1over2 * xp1over2sq_times_ym1over2sq; \
24811 - const double c10dxdy = \
24812 - xm1over2_times_yp1over2 * xp1over2sq_times_ym1over2sq; \
24813 - \
24814 - const double c01 = \
24815 - four_times_1px_times_1my * xm1over2sq_times_yp1over2sq; \
24816 - const double c01dx = \
24817 - twice_xp1over2_times_1my * xm1over2sq_times_yp1over2sq; \
24818 - const double c01dy = \
24819 - twice_1px_times_ym1over2 * xm1over2sq_times_yp1over2sq; \
24820 - const double c01dxdy = \
24821 - xp1over2_times_ym1over2 * xm1over2sq_times_yp1over2sq; \
24822 - \
24823 - const double c11 = \
24824 - four_times_1mx_times_1my * xp1over2sq_times_yp1over2sq; \
24825 - const double c11dx = \
24826 - twice_xm1over2_times_1my * xp1over2sq_times_yp1over2sq; \
24827 - const double c11dy = \
24828 - twice_1mx_times_ym1over2 * xp1over2sq_times_yp1over2sq; \
24829 - const double c11dxdy = \
24830 - xm1over2_times_ym1over2 * xp1over2sq_times_yp1over2sq; \
24831 - \
24832 - int band = bands; \
24833 - \
24834 - do \
24835 - { \
24836 - const double double_result = \
24837 - lbbicubic( c00, \
24838 - c10, \
24839 - c01, \
24840 - c11, \
24841 - c00dx, \
24842 - c10dx, \
24843 - c01dx, \
24844 - c11dx, \
24845 - c00dy, \
24846 - c10dy, \
24847 - c01dy, \
24848 - c11dy, \
24849 - c00dxdy, \
24850 - c10dxdy, \
24851 - c01dxdy, \
24852 - c11dxdy, \
24853 - in[ uno_one_shift ], \
24854 - in[ uno_two_shift ], \
24855 - in[ uno_thr_shift ], \
24856 - in[ uno_fou_shift ], \
24857 - in[ dos_one_shift ], \
24858 - in[ 0 ], \
24859 - in[ dos_thr_shift ], \
24860 - in[ dos_fou_shift ], \
24861 - in[ tre_one_shift ], \
24862 - in[ tre_two_shift ], \
24863 - in[ tre_thr_shift ], \
24864 - in[ tre_fou_shift ], \
24865 - in[ qua_one_shift ], \
24866 - in[ qua_two_shift ], \
24867 - in[ qua_thr_shift ], \
24868 - in[ qua_fou_shift ] ); \
24869 - \
24870 - const T result = to_ ## conversion<T>( double_result ); \
24871 - in++; \
24872 - *out++ = result; \
24873 - } while (--band); \
24874 - }
24875 -
24876 -LBB_CONVERSION( fptypes )
24877 -LBB_CONVERSION( withsign )
24878 -LBB_CONVERSION( nosign )
24879 -
24880 -#define CALL( T, conversion ) \
24881 - lbb_ ## conversion<T>( out, \
24882 - p, \
24883 - bands, \
24884 - lskip, \
24885 - relative_x, \
24886 - relative_y );
24887 -
24888 -/*
24889 - * We need C linkage:
24890 - */
24891 -extern "C" {
24892 -G_DEFINE_TYPE( VipsInterpolateLbb, vips_interpolate_lbb,
24893 - VIPS_TYPE_INTERPOLATE );
24894 -}
24895 -
24896 -static void
24897 -vips_interpolate_lbb_interpolate( VipsInterpolate* restrict interpolate,
24898 - void* restrict out,
24899 - VipsRegion* restrict in,
24900 - double absolute_x,
24901 - double absolute_y )
24902 -{
24903 - /* absolute_x and absolute_y are always >= 1.0 (see double-check assert
24904 - * below), so we don't need floor().
24905 - *
24906 - * It's 1 not 0 since have a window_offset of 1.
24907 - */
24908 - const int ix = (int) absolute_x;
24909 - const int iy = (int) absolute_y;
24910 -
24911 - /*
24912 - * Move the pointer to (the first band of) the top/left pixel of the
24913 - * 2x2 group of pixel centers which contains the sampling location
24914 - * in its convex hull:
24915 - */
24916 - const VipsPel* restrict p = VIPS_REGION_ADDR( in, ix, iy );
24917 -
24918 - const double relative_x = absolute_x - ix;
24919 - const double relative_y = absolute_y - iy;
24920 -
24921 - /*
24922 - * VIPS versions of Nicolas's pixel addressing values.
24923 - */
24924 - const int lskip = VIPS_REGION_LSKIP( in ) /
24925 - VIPS_IMAGE_SIZEOF_ELEMENT( in->im );
24926 - /*
24927 - * Double the bands for complex images to account for the real and
24928 - * imaginary parts being computed independently:
24929 - */
24930 - const int actual_bands = in->im->Bands;
24931 - const int bands =
24932 - vips_bandfmt_iscomplex( in->im->BandFmt ) ? 2 * actual_bands : actual_bands;
24933 -
24934 - /* Confirm that absolute_x and absolute_y are >= 1, see above.
24935 - */
24936 - g_assert( absolute_x >= 1.0 );
24937 - g_assert( absolute_y >= 1.0 );
24938 -
24939 - switch( in->im->BandFmt ) {
24940 - case VIPS_FORMAT_UCHAR:
24941 - CALL( unsigned char, nosign );
24942 - break;
24943 -
24944 - case VIPS_FORMAT_CHAR:
24945 - CALL( signed char, withsign );
24946 - break;
24947 -
24948 - case VIPS_FORMAT_USHORT:
24949 - CALL( unsigned short, nosign );
24950 - break;
24951 -
24952 - case VIPS_FORMAT_SHORT:
24953 - CALL( signed short, withsign );
24954 - break;
24955 -
24956 - case VIPS_FORMAT_UINT:
24957 - CALL( unsigned int, nosign );
24958 - break;
24959 -
24960 - case VIPS_FORMAT_INT:
24961 - CALL( signed int, withsign );
24962 - break;
24963 -
24964 - /*
24965 - * Complex images are handled by doubling of bands.
24966 - */
24967 - case VIPS_FORMAT_FLOAT:
24968 - case VIPS_FORMAT_COMPLEX:
24969 - CALL( float, fptypes );
24970 - break;
24971 -
24972 - case VIPS_FORMAT_DOUBLE:
24973 - case VIPS_FORMAT_DPCOMPLEX:
24974 - CALL( double, fptypes );
24975 - break;
24976 -
24977 - default:
24978 - g_assert( 0 );
24979 - break;
24980 - }
24981 -}
24982 -
24983 -static void
24984 -vips_interpolate_lbb_class_init( VipsInterpolateLbbClass *klass )
24985 -{
24986 - VipsObjectClass *object_class = VIPS_OBJECT_CLASS( klass );
24987 - VipsInterpolateClass *interpolate_class =
24988 - VIPS_INTERPOLATE_CLASS( klass );
24989 -
24990 - object_class->nickname = "lbb";
24991 - object_class->description = _( "Reduced halo bicubic" );
24992 -
24993 - interpolate_class->interpolate = vips_interpolate_lbb_interpolate;
24994 - interpolate_class->window_size = 4;
24995 -}
24996 -
24997 -static void
24998 -vips_interpolate_lbb_init( VipsInterpolateLbb *lbb )
24999 -{
25000 -}
25001 diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/resample/Makefile.am vips-7.38.5/libvips/resample/Makefile.am
25002 --- vips-7.38.5-vanilla/libvips/resample/Makefile.am 2014-07-17 23:48:36.232794473 -0400
25003 +++ vips-7.38.5/libvips/resample/Makefile.am 2014-07-17 23:49:32.820792979 -0400
25004 @@ -13,10 +13,6 @@
25005 shrink.c \
25006 interpolate.c \
25007 transform.c \
25008 - bicubic.cpp \
25009 - lbb.cpp \
25010 - nohalo.cpp \
25011 - vsqbs.cpp \
25012 templates.h
25013
25014 else
25015 @@ -32,10 +28,6 @@
25016 transform.c
25017
25018 EXTRA_DIST = \
25019 - bicubic.cpp \
25020 - lbb.cpp \
25021 - nohalo.cpp \
25022 - vsqbs.cpp \
25023 templates.h
25024
25025 endif
25026 diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/resample/Makefile.in vips-7.38.5/libvips/resample/Makefile.in
25027 --- vips-7.38.5-vanilla/libvips/resample/Makefile.in 2014-07-17 23:48:36.232794473 -0400
25028 +++ vips-7.38.5/libvips/resample/Makefile.in 2014-07-17 23:49:32.820792979 -0400
25029 @@ -505,7 +505,7 @@
25030 }
25031
25032 libresample.la: $(libresample_la_OBJECTS) $(libresample_la_DEPENDENCIES) $(EXTRA_libresample_la_DEPENDENCIES)
25033 - $(AM_V_CXXLD)$(CXXLINK) $(libresample_la_OBJECTS) $(libresample_la_LIBADD) $(LIBS)
25034 + $(AM_V_CXXLD)$(LINK) $(libresample_la_OBJECTS) $(libresample_la_LIBADD) $(LIBS)
25035
25036 mostlyclean-compile:
25037 -rm -f *.$(OBJEXT)
25038 diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/resample/nohalo.cpp vips-7.38.5/libvips/resample/nohalo.cpp
25039 --- vips-7.38.5-vanilla/libvips/resample/nohalo.cpp 2014-07-17 23:48:36.232794473 -0400
25040 +++ vips-7.38.5/libvips/resample/nohalo.cpp 1969-12-31 19:00:00.000000000 -0500
25041 @@ -1,1590 +0,0 @@
25042 -/* nohalo subdivision followed by lbb (locally bounded bicubic)
25043 - * interpolation resampler
25044 - *
25045 - * Nohalo level 1 with bilinear finishing scheme hacked for VIPS by
25046 - * J. Cupitt based on code by N. Robidoux, 20/1/09
25047 - *
25048 - * N. Robidoux and J. Cupitt, 4-17/3/09
25049 - *
25050 - * N. Robidoux, 1/4-29/5/2009
25051 - *
25052 - * Nohalo level 2 with bilinear finishing scheme by N. Robidoux based
25053 - * on code by N. Robidoux, A. Turcotte and J. Cupitt, 27/1/2010
25054 - *
25055 - * Nohalo level 1 with LBB finishing scheme by N. Robidoux and
25056 - * C. Racette, 11-18/5/2010
25057 - */
25058 -
25059 -/*
25060 -
25061 - This file is part of VIPS.
25062 -
25063 - VIPS is free software; you can redistribute it and/or modify it
25064 - under the terms of the GNU Lesser General Public License as
25065 - published by the Free Software Foundation; either version 2 of the
25066 - License, or (at your option) any later version.
25067 -
25068 - This program is distributed in the hope that it will be useful,
25069 - but WITHOUT ANY WARRANTY; without even the implied warranty of
25070 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25071 - Lesser General Public License for more details.
25072 -
25073 - You should have received a copy of the GNU Lesser General Public
25074 - License along with this program; if not, write to the Free Software
25075 - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25076 - 02110-1301 USA
25077 -
25078 - */
25079 -
25080 -/*
25081 -
25082 - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
25083 -
25084 - */
25085 -
25086 -/*
25087 - * 2009-2010 (c) Nicolas Robidoux, Chantal Racette, John Cupitt and
25088 - * Adam Turcotte
25089 - *
25090 - * N. Robidoux thanks Geert Jordaens, Ralf Meyer, Øyvind Kolås,
25091 - * Minglun Gong, Eric Daoust and Sven Neumann for useful comments and
25092 - * code.
25093 - *
25094 - * N. Robidoux's early research on Nohalo funded in part by an NSERC
25095 - * (National Science and Engineering Research Council of Canada)
25096 - * Discovery Grant awarded to him (298424--2004).
25097 - *
25098 - * C. Racette's image resampling research and programming funded in
25099 - * part by an NSERC (National Science and Engineering Research Council
25100 - * of Canada) Alexander Graham Bell Canada Graduate Scholarship, by an
25101 - * NSERC Discovery Grant awarded to Julien Dompierre (grant number
25102 - * 20-61098) and by N. Robidoux's Laurentian University professional
25103 - * allowance.
25104 - *
25105 - * A. Turcotte's image resampling research on reduced halo funded in
25106 - * part by an NSERC Alexander Graham Bell Canada Graduate Scholarhip
25107 - * awarded to him and by a Google Summer of Code 2010 award awarded to
25108 - * GIMP (Gnu Image Manipulation Program).
25109 - *
25110 - * Nohalo with LBB finishing scheme was developed by N. Robidoux and
25111 - * C. Racette at the Department of Mathematics and Computer Science of
25112 - * Laurentian University in the course of C. Racette's Masters thesis
25113 - * in Computational Sciences. Preliminary work on Nohalo and monotone
25114 - * interpolation was performed by C. Racette and N. Robidoux in the
25115 - * course of her honours thesis, by N. Robidoux, A. Turcotte and
25116 - * E. Daoust during Google Summer of Code 2009 (through two awards
25117 - * made to GIMP to improve GEGL), and, earlier, by N. Robidoux,
25118 - * A. Turcotte, J. Cupitt, M. Gong and K. Martinez.
25119 - */
25120 -
25121 -/*
25122 - * Nohalo with LBB as finishing scheme has two versions, which are
25123 - * only different in the way LBB is implemented:
25124 - *
25125 - * A "soft" version, which shows a little less staircasing and a
25126 - * little more haloing, and which is a little more expensive to
25127 - * compute. We recommend this as the default.
25128 - *
25129 - * A "sharp" version, which shows a little more staircasing and a
25130 - * little less haloing, and which is a little cheaper (it uses 6
25131 - * less comparisons and 12 less "? :").
25132 - *
25133 - * The only difference between the two is that the "soft" versions
25134 - * uses local minima and maxima computed over 3x3 square blocks, and
25135 - * the "sharp" version uses local minima and maxima computed over 3x3
25136 - * crosses.
25137 - *
25138 - * The "sharp" version is (a little) faster. We don't know yet for
25139 - * sure, but it appears that the "soft" version gives marginally
25140 - * better results.
25141 - *
25142 - * If you want to use the "sharp" (cheaper) version, uncomment the
25143 - * following three pre-processor code lines:
25144 - */
25145 -
25146 -/*
25147 -#ifndef __NOHALO_CHEAP_H__
25148 -#define __NOHALO_CHEAP_H__
25149 -#endif
25150 - */
25151 -
25152 -/*
25153 - * ================
25154 - * NOHALO RESAMPLER
25155 - * ================
25156 - *
25157 - * "Nohalo" is a resampler with a mission: smoothly straightening
25158 - * oblique lines without undesirable side-effects. In particular,
25159 - * without much blurring and with no added haloing.
25160 - *
25161 - * In this code, one Nohalo subdivision is performed. The
25162 - * interpolation is finished with LBB (Locally Bounded Bicubic).
25163 - *
25164 - * Key properties:
25165 - *
25166 - * =======================
25167 - * Nohalo is interpolatory
25168 - * =======================
25169 - *
25170 - * That is, Nohalo preserves point values: If asked for the value at
25171 - * the center of an input pixel, the sampler returns the corresponding
25172 - * value, unchanged. In addition, because Nohalo is continuous, if
25173 - * asked for a value at a location "very close" to the center of an
25174 - * input pixel, then the sampler returns a value "very close" to
25175 - * it. (Nohalo is not smoothing like, say, B-Spline
25176 - * pseudo-interpolation.)
25177 - *
25178 - * ====================================================================
25179 - * Nohalo subdivision is co-monotone (this is why it's called "no-halo")
25180 - * ====================================================================
25181 - *
25182 - * One consequence of monotonicity is that additional subdivided
25183 - * values are in the range of the four closest input values, which is
25184 - * a form of local boundedness. (Note: plain vanilla bilinear and
25185 - * nearest neighbour are also co-monotone.) LBB is also locally
25186 - * bounded. Consequently, Nohalo subdivision followed by LBB is
25187 - * locally bounded. When used as a finishing scheme for Nohalo, the
25188 - * standard LBB bounds imply that the final interpolated value is in
25189 - * the range of the nine closest input values. This property is why
25190 - * there is very little added haloing, even when a finishing scheme
25191 - * which is not strictly monotone. Another consequence of local
25192 - * boundedness is that clamping is unnecessary (provided abyss values
25193 - * are within the range of acceptable values, which is "always" the
25194 - * case).
25195 - *
25196 - * Note: If the abyss policy is an extrapolating one---for example,
25197 - * linear or bilinear extrapolation---clamping is still unnecessary
25198 - * UNLESS one attempts to resample outside of the convex hull of the
25199 - * input pixel positions. Consequence: the "corner" image size
25200 - * convention does not require clamping when using linear
25201 - * extrapolation abyss policy when performing image resizing, but the
25202 - * "center" one does, when upscaling, at locations very close to the
25203 - * boundary. If computing values at locations outside of the convex
25204 - * hull of the pixel locations of the input image, nearest neighbour
25205 - * abyss policy is most likely better anyway, because linear
25206 - * extrapolation produces "streaks" if positions far outside the
25207 - * original image boundary are resampled.
25208 - *
25209 - * ========================
25210 - * Nohalo is a local method
25211 - * ========================
25212 - *
25213 - * The interpolated pixel value when using Nohalo subdivision followed
25214 - * by LBB only depends on the 21 (5x5 minus the four corners) closest
25215 - * input values.
25216 - *
25217 - * ===============================
25218 - * Nohalo is second order accurate
25219 - * ===============================
25220 - *
25221 - * (Except possibly near the boundary: it is easy to make this
25222 - * property carry over everywhere but this requires a tuned abyss
25223 - * policy---linear extrapolation, say---or building the boundary
25224 - * conditions inside the sampler.) Nohalo+LBB is exact on linear
25225 - * intensity profiles, meaning that if the input pixel values (in the
25226 - * stencil) are obtained from a function of the form f(x,y) = a + b*x
25227 - * + c*y (a, b, c constants), then the computed pixel value is exactly
25228 - * the value of f(x,y) at the asked-for sampling location. The
25229 - * boundary condition which is emulated by VIPS through the "extend"
25230 - * extension of the input image---this corresponds to the nearest
25231 - * neighbour abyss policy---does NOT make this resampler exact on
25232 - * linears near the boundary. It does, however, guarantee that no
25233 - * clamping is required even when resampled values are computed at
25234 - * positions outside of the extent of the input image (when
25235 - * extrapolation is required).
25236 - *
25237 - * ===================
25238 - * Nohalo is nonlinear
25239 - * ===================
25240 - *
25241 - * Both Nohalo and LBB are nonlinear, consequently their composition
25242 - * is nonlinear. In particular, resampling a sum of images may not be
25243 - * the same as summing the resamples. (This occurs even without taking
25244 - * into account over and underflow issues: images can only take values
25245 - * within a banded range, and consequently no sampler is truly
25246 - * linear.)
25247 - *
25248 - * ====================
25249 - * Weaknesses of Nohalo
25250 - * ====================
25251 - *
25252 - * In some cases, the initial subdivision computation is wasted:
25253 - *
25254 - * If a region is bi-chromatic, the nonlinear component of Nohalo
25255 - * subdivision is zero in the interior of the region, and consequently
25256 - * Nohalo subdivision boils down to bilinear. For such images, LBB is
25257 - * probably a better choice.
25258 - *
25259 - * =========================
25260 - * Bibliographical reference
25261 - * =========================
25262 - *
25263 - * For more information about Nohalo (a prototype version with
25264 - * bilinear finish instead of LBB), see
25265 - *
25266 - * CPU, SMP and GPU implementations of Nohalo level 1, a fast
25267 - * co-convex antialiasing image resampler by Nicolas Robidoux, Minglun
25268 - * Gong, John Cupitt, Adam Turcotte, and Kirk Martinez, in C3S2E '09:
25269 - * Proceedings of the 2nd Canadian Conference on Computer Science and
25270 - * Software Engineering, p. 185--195, ACM, New York, NY, USA, 2009.
25271 - * http://doi.acm.org/10.1145/1557626.1557657.
25272 - */
25273 -
25274 -/* Uncomment to enable bounds checking for VIPS_REGION_ADDR().
25275 - */
25276 -#define DEBUG
25277 -
25278 -#ifdef HAVE_CONFIG_H
25279 -#include <config.h>
25280 -#endif /*HAVE_CONFIG_H*/
25281 -#include <vips/intl.h>
25282 -
25283 -#include <stdio.h>
25284 -#include <stdlib.h>
25285 -
25286 -#include <vips/vips.h>
25287 -#include <vips/internal.h>
25288 -
25289 -#include "templates.h"
25290 -
25291 -#define VIPS_TYPE_INTERPOLATE_NOHALO \
25292 - (vips_interpolate_nohalo_get_type())
25293 -#define VIPS_INTERPOLATE_NOHALO( obj ) \
25294 - (G_TYPE_CHECK_INSTANCE_CAST( (obj), \
25295 - VIPS_TYPE_INTERPOLATE_NOHALO, VipsInterpolateNohalo ))
25296 -#define VIPS_INTERPOLATE_NOHALO_CLASS( klass ) \
25297 - (G_TYPE_CHECK_CLASS_CAST( (klass), \
25298 - VIPS_TYPE_INTERPOLATE_NOHALO, VipsInterpolateNohaloClass))
25299 -#define VIPS_IS_INTERPOLATE_NOHALO( obj ) \
25300 - (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_INTERPOLATE_NOHALO ))
25301 -#define VIPS_IS_INTERPOLATE_NOHALO_CLASS( klass ) \
25302 - (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_INTERPOLATE_NOHALO ))
25303 -#define VIPS_INTERPOLATE_NOHALO_GET_CLASS( obj ) \
25304 - (G_TYPE_INSTANCE_GET_CLASS( (obj), \
25305 - VIPS_TYPE_INTERPOLATE_NOHALO, VipsInterpolateNohaloClass ))
25306 -
25307 -typedef struct _VipsInterpolateNohalo {
25308 - VipsInterpolate parent_object;
25309 -
25310 -} VipsInterpolateNohalo;
25311 -
25312 -typedef struct _VipsInterpolateNohaloClass {
25313 - VipsInterpolateClass parent_class;
25314 -
25315 -} VipsInterpolateNohaloClass;
25316 -
25317 -/*
25318 - * NOHALO_MINMOD is an implementation of the minmod function which
25319 - * only needs two "conditional moves."
25320 - * NOHALO_MINMOD(a,b,a_times_a,a_times_b) "returns"
25321 - * minmod(a,b). The macro parameter ("input") a_times_a is assumed to
25322 - * contain the square of a; a_times_b, the product of a and b.
25323 - *
25324 - * For uncompressed natural images in high bit depth (images for which
25325 - * the slopes a and b are unlikely to be equal to zero or be equal to
25326 - * each other), or chips with good branch prediction, the following
25327 - * version of the minmod function may work well:
25328 - *
25329 - * ( (a_times_b)>=0. ? ( (a_times_b)<(a_times_a) ? (b) : (a) ) : 0. )
25330 - *
25331 - * In this version, the forward branch of the second conditional move
25332 - * is taken when |b|>|a| and when a*b<0. However, the "else" branch is
25333 - * taken when a=0 (or when a=b), which is why the above version is not
25334 - * as effective for images with regions with constant pixel values (or
25335 - * regions with pixel values which vary linearly or bilinearly) since
25336 - * we apply minmod to pairs of differences.
25337 - *
25338 - * The following version is more suitable for images with flat
25339 - * (constant) colour areas, since a, which is a pixel difference, will
25340 - * often be 0, in which case both forward branches are likely. This
25341 - * may be preferable if "branch flag look ahead" does not work so
25342 - * well.
25343 - *
25344 - * ( (a_times_b)>=0. ? ( (a_times_a)<=(a_times_b) ? (a) : (b) ) : 0. )
25345 - *
25346 - * This last version appears to be slightly better than the former in
25347 - * speed tests performed on a recent multicore Intel chip, especially
25348 - * when enlarging a sharp image by a large factor, hence the choice.
25349 - */
25350 -#define NOHALO_MINMOD(a,b,a_times_a,a_times_b) \
25351 - ( ( (a_times_b)>=0. ) ? ( (a_times_a)<=(a_times_b) ? (a) : (b) ) : 0. )
25352 -
25353 -/*
25354 - * Absolute value and sign macros:
25355 - */
25356 -#define NOHALO_ABS(x) ( ((x)>=0.) ? (x) : -(x) )
25357 -#define NOHALO_SIGN(x) ( ((x)>=0.) ? 1. : -1. )
25358 -
25359 -/*
25360 - * MIN and MAX macros set up so that I can put the likely winner in
25361 - * the first argument (forward branch likely blah blah blah):
25362 - */
25363 -#define NOHALO_MIN(x,y) ( ((x)<=(y)) ? (x) : (y) )
25364 -#define NOHALO_MAX(x,y) ( ((x)>=(y)) ? (x) : (y) )
25365 -
25366 -
25367 -static void inline
25368 -nohalo_subdivision (const double uno_two,
25369 - const double uno_thr,
25370 - const double uno_fou,
25371 - const double dos_one,
25372 - const double dos_two,
25373 - const double dos_thr,
25374 - const double dos_fou,
25375 - const double dos_fiv,
25376 - const double tre_one,
25377 - const double tre_two,
25378 - const double tre_thr,
25379 - const double tre_fou,
25380 - const double tre_fiv,
25381 - const double qua_one,
25382 - const double qua_two,
25383 - const double qua_thr,
25384 - const double qua_fou,
25385 - const double qua_fiv,
25386 - const double cin_two,
25387 - const double cin_thr,
25388 - const double cin_fou,
25389 - double* restrict uno_one_1,
25390 - double* restrict uno_two_1,
25391 - double* restrict uno_thr_1,
25392 - double* restrict uno_fou_1,
25393 - double* restrict dos_one_1,
25394 - double* restrict dos_two_1,
25395 - double* restrict dos_thr_1,
25396 - double* restrict dos_fou_1,
25397 - double* restrict tre_one_1,
25398 - double* restrict tre_two_1,
25399 - double* restrict tre_thr_1,
25400 - double* restrict tre_fou_1,
25401 - double* restrict qua_one_1,
25402 - double* restrict qua_two_1,
25403 - double* restrict qua_thr_1,
25404 - double* restrict qua_fou_1)
25405 -{
25406 - /*
25407 - * nohalo_subdivision calculates the missing twelve double density
25408 - * pixel values, and also returns the "already known" four, so that
25409 - * the sixteen values which make up the stencil of LBB are
25410 - * available.
25411 - */
25412 - /*
25413 - * THE STENCIL OF INPUT VALUES:
25414 - *
25415 - * Pointer arithmetic is used to implicitly reflect the input
25416 - * stencil about tre_thr---assumed closer to the sampling location
25417 - * than other pixels (ties are OK)---in such a way that after
25418 - * reflection the sampling point is to the bottom right of tre_thr.
25419 - *
25420 - * The following code and picture assumes that the stencil reflexion
25421 - * has already been performed.
25422 - *
25423 - * (ix-1,iy-2) (ix,iy-2) (ix+1,iy-2)
25424 - * =uno_two = uno_thr = uno_fou
25425 - *
25426 - *
25427 - *
25428 - * (ix-2,iy-1) (ix-1,iy-1) (ix,iy-1) (ix+1,iy-1) (ix+2,iy-1)
25429 - * = dos_one = dos_two = dos_thr = dos_fou = dos_fiv
25430 - *
25431 - *
25432 - *
25433 - * (ix-2,iy) (ix-1,iy) (ix,iy) (ix+1,iy) (ix+2,iy)
25434 - * = tre_one = tre_two = tre_thr = tre_fou = tre_fiv
25435 - * X
25436 - *
25437 - *
25438 - * (ix-2,iy+1) (ix-1,iy+1) (ix,iy+1) (ix+1,iy+1) (ix+2,iy+1)
25439 - * = qua_one = qua_two = qua_thr = qua_fou = qua_fiv
25440 - *
25441 - *
25442 - *
25443 - * (ix-1,iy+2) (ix,iy+2) (ix+1,iy+2)
25444 - * = cin_two = cin_thr = cin_fou
25445 - *
25446 - *
25447 - * The above input pixel values are the ones needed in order to make
25448 - * available the following values, needed by LBB:
25449 - *
25450 - * uno_one_1 = uno_two_1 = uno_thr_1 = uno_fou_1 =
25451 - * (ix-1/2,iy-1/2) (ix,iy-1/2) (ix+1/2,iy-1/2) (ix+1,iy-1/2)
25452 - *
25453 - *
25454 - *
25455 - *
25456 - * dos_one_1 = dos_two_1 = dos_thr_1 = dos_fou_1 =
25457 - * (ix-1/2,iy) (ix,iy) (ix+1/2,iy) (ix+1,iy)
25458 - *
25459 - * X
25460 - *
25461 - *
25462 - * tre_one_1 = tre_two_1 = tre_thr_1 = tre_fou_1 =
25463 - * (ix-1/2,iy+1/2) (ix,iy+1/2) (ix+1/2,iy+1/2) (ix+1,iy+1/2)
25464 - *
25465 - *
25466 - *
25467 - *
25468 - * qua_one_1 = qua_two_1 = qua_thr_1 = qua_fou_1 =
25469 - * (ix-1/2,iy+1) (ix,iy+1) (ix+1/2,iy+1) (ix+1,iy+1)
25470 - *
25471 - */
25472 -
25473 - /*
25474 - * Computation of the nonlinear slopes: If two consecutive pixel
25475 - * value differences have the same sign, the smallest one (in
25476 - * absolute value) is taken to be the corresponding slope; if the
25477 - * two consecutive pixel value differences don't have the same sign,
25478 - * the corresponding slope is set to 0.
25479 - *
25480 - * In other words: Apply minmod to consecutive differences.
25481 - */
25482 - /*
25483 - * Two vertical simple differences:
25484 - */
25485 - const double d_unodos_two = dos_two - uno_two;
25486 - const double d_dostre_two = tre_two - dos_two;
25487 - const double d_trequa_two = qua_two - tre_two;
25488 - const double d_quacin_two = cin_two - qua_two;
25489 - /*
25490 - * Thr(ee) vertical differences:
25491 - */
25492 - const double d_unodos_thr = dos_thr - uno_thr;
25493 - const double d_dostre_thr = tre_thr - dos_thr;
25494 - const double d_trequa_thr = qua_thr - tre_thr;
25495 - const double d_quacin_thr = cin_thr - qua_thr;
25496 - /*
25497 - * Fou(r) vertical differences:
25498 - */
25499 - const double d_unodos_fou = dos_fou - uno_fou;
25500 - const double d_dostre_fou = tre_fou - dos_fou;
25501 - const double d_trequa_fou = qua_fou - tre_fou;
25502 - const double d_quacin_fou = cin_fou - qua_fou;
25503 - /*
25504 - * Dos horizontal differences:
25505 - */
25506 - const double d_dos_onetwo = dos_two - dos_one;
25507 - const double d_dos_twothr = dos_thr - dos_two;
25508 - const double d_dos_thrfou = dos_fou - dos_thr;
25509 - const double d_dos_foufiv = dos_fiv - dos_fou;
25510 - /*
25511 - * Tre(s) horizontal differences:
25512 - */
25513 - const double d_tre_onetwo = tre_two - tre_one;
25514 - const double d_tre_twothr = tre_thr - tre_two;
25515 - const double d_tre_thrfou = tre_fou - tre_thr;
25516 - const double d_tre_foufiv = tre_fiv - tre_fou;
25517 - /*
25518 - * Qua(ttro) horizontal differences:
25519 - */
25520 - const double d_qua_onetwo = qua_two - qua_one;
25521 - const double d_qua_twothr = qua_thr - qua_two;
25522 - const double d_qua_thrfou = qua_fou - qua_thr;
25523 - const double d_qua_foufiv = qua_fiv - qua_fou;
25524 -
25525 - /*
25526 - * Recyclable vertical products and squares:
25527 - */
25528 - const double d_unodos_times_dostre_two = d_unodos_two * d_dostre_two;
25529 - const double d_dostre_two_sq = d_dostre_two * d_dostre_two;
25530 - const double d_dostre_times_trequa_two = d_dostre_two * d_trequa_two;
25531 - const double d_trequa_times_quacin_two = d_quacin_two * d_trequa_two;
25532 - const double d_quacin_two_sq = d_quacin_two * d_quacin_two;
25533 -
25534 - const double d_unodos_times_dostre_thr = d_unodos_thr * d_dostre_thr;
25535 - const double d_dostre_thr_sq = d_dostre_thr * d_dostre_thr;
25536 - const double d_dostre_times_trequa_thr = d_trequa_thr * d_dostre_thr;
25537 - const double d_trequa_times_quacin_thr = d_trequa_thr * d_quacin_thr;
25538 - const double d_quacin_thr_sq = d_quacin_thr * d_quacin_thr;
25539 -
25540 - const double d_unodos_times_dostre_fou = d_unodos_fou * d_dostre_fou;
25541 - const double d_dostre_fou_sq = d_dostre_fou * d_dostre_fou;
25542 - const double d_dostre_times_trequa_fou = d_trequa_fou * d_dostre_fou;
25543 - const double d_trequa_times_quacin_fou = d_trequa_fou * d_quacin_fou;
25544 - const double d_quacin_fou_sq = d_quacin_fou * d_quacin_fou;
25545 - /*
25546 - * Recyclable horizontal products and squares:
25547 - */
25548 - const double d_dos_onetwo_times_twothr = d_dos_onetwo * d_dos_twothr;
25549 - const double d_dos_twothr_sq = d_dos_twothr * d_dos_twothr;
25550 - const double d_dos_twothr_times_thrfou = d_dos_twothr * d_dos_thrfou;
25551 - const double d_dos_thrfou_times_foufiv = d_dos_thrfou * d_dos_foufiv;
25552 - const double d_dos_foufiv_sq = d_dos_foufiv * d_dos_foufiv;
25553 -
25554 - const double d_tre_onetwo_times_twothr = d_tre_onetwo * d_tre_twothr;
25555 - const double d_tre_twothr_sq = d_tre_twothr * d_tre_twothr;
25556 - const double d_tre_twothr_times_thrfou = d_tre_thrfou * d_tre_twothr;
25557 - const double d_tre_thrfou_times_foufiv = d_tre_thrfou * d_tre_foufiv;
25558 - const double d_tre_foufiv_sq = d_tre_foufiv * d_tre_foufiv;
25559 -
25560 - const double d_qua_onetwo_times_twothr = d_qua_onetwo * d_qua_twothr;
25561 - const double d_qua_twothr_sq = d_qua_twothr * d_qua_twothr;
25562 - const double d_qua_twothr_times_thrfou = d_qua_thrfou * d_qua_twothr;
25563 - const double d_qua_thrfou_times_foufiv = d_qua_thrfou * d_qua_foufiv;
25564 - const double d_qua_foufiv_sq = d_qua_foufiv * d_qua_foufiv;
25565 -
25566 - /*
25567 - * Minmod slopes and first level pixel values:
25568 - */
25569 - const double dos_thr_y = NOHALO_MINMOD( d_dostre_thr, d_unodos_thr,
25570 - d_dostre_thr_sq,
25571 - d_unodos_times_dostre_thr );
25572 - const double tre_thr_y = NOHALO_MINMOD( d_dostre_thr, d_trequa_thr,
25573 - d_dostre_thr_sq,
25574 - d_dostre_times_trequa_thr );
25575 -
25576 - const double newval_uno_two =
25577 - .5 * ( dos_thr + tre_thr )
25578 - +
25579 - .25 * ( dos_thr_y - tre_thr_y );
25580 -
25581 - const double qua_thr_y = NOHALO_MINMOD( d_quacin_thr, d_trequa_thr,
25582 - d_quacin_thr_sq,
25583 - d_trequa_times_quacin_thr );
25584 -
25585 - const double newval_tre_two =
25586 - .5 * ( tre_thr + qua_thr )
25587 - +
25588 - .25 * ( tre_thr_y - qua_thr_y );
25589 -
25590 - const double tre_fou_y = NOHALO_MINMOD( d_dostre_fou, d_trequa_fou,
25591 - d_dostre_fou_sq,
25592 - d_dostre_times_trequa_fou );
25593 - const double qua_fou_y = NOHALO_MINMOD( d_quacin_fou, d_trequa_fou,
25594 - d_quacin_fou_sq,
25595 - d_trequa_times_quacin_fou );
25596 -
25597 - const double newval_tre_fou =
25598 - .5 * ( tre_fou + qua_fou )
25599 - +
25600 - .25 * ( tre_fou_y - qua_fou_y );
25601 -
25602 - const double dos_fou_y = NOHALO_MINMOD( d_dostre_fou, d_unodos_fou,
25603 - d_dostre_fou_sq,
25604 - d_unodos_times_dostre_fou );
25605 -
25606 - const double newval_uno_fou =
25607 - .5 * ( dos_fou + tre_fou )
25608 - +
25609 - .25 * (dos_fou_y - tre_fou_y );
25610 -
25611 - const double tre_two_x = NOHALO_MINMOD( d_tre_twothr, d_tre_onetwo,
25612 - d_tre_twothr_sq,
25613 - d_tre_onetwo_times_twothr );
25614 - const double tre_thr_x = NOHALO_MINMOD( d_tre_twothr, d_tre_thrfou,
25615 - d_tre_twothr_sq,
25616 - d_tre_twothr_times_thrfou );
25617 -
25618 - const double newval_dos_one =
25619 - .5 * ( tre_two + tre_thr )
25620 - +
25621 - .25 * ( tre_two_x - tre_thr_x );
25622 -
25623 - const double tre_fou_x = NOHALO_MINMOD( d_tre_foufiv, d_tre_thrfou,
25624 - d_tre_foufiv_sq,
25625 - d_tre_thrfou_times_foufiv );
25626 -
25627 - const double tre_thr_x_minus_tre_fou_x =
25628 - tre_thr_x - tre_fou_x;
25629 -
25630 - const double newval_dos_thr =
25631 - .5 * ( tre_thr + tre_fou )
25632 - +
25633 - .25 * tre_thr_x_minus_tre_fou_x;
25634 -
25635 - const double qua_thr_x = NOHALO_MINMOD( d_qua_twothr, d_qua_thrfou,
25636 - d_qua_twothr_sq,
25637 - d_qua_twothr_times_thrfou );
25638 - const double qua_fou_x = NOHALO_MINMOD( d_qua_foufiv, d_qua_thrfou,
25639 - d_qua_foufiv_sq,
25640 - d_qua_thrfou_times_foufiv );
25641 -
25642 - const double qua_thr_x_minus_qua_fou_x =
25643 - qua_thr_x - qua_fou_x;
25644 -
25645 - const double newval_qua_thr =
25646 - .5 * ( qua_thr + qua_fou )
25647 - +
25648 - .25 * qua_thr_x_minus_qua_fou_x;
25649 -
25650 - const double qua_two_x = NOHALO_MINMOD( d_qua_twothr, d_qua_onetwo,
25651 - d_qua_twothr_sq,
25652 - d_qua_onetwo_times_twothr );
25653 -
25654 - const double newval_qua_one =
25655 - .5 * ( qua_two + qua_thr )
25656 - +
25657 - .25 * ( qua_two_x - qua_thr_x );
25658 -
25659 - const double newval_tre_thr =
25660 - .125 * ( tre_thr_x_minus_tre_fou_x + qua_thr_x_minus_qua_fou_x )
25661 - +
25662 - .5 * ( newval_tre_two + newval_tre_fou );
25663 -
25664 - const double dos_thr_x = NOHALO_MINMOD( d_dos_twothr, d_dos_thrfou,
25665 - d_dos_twothr_sq,
25666 - d_dos_twothr_times_thrfou );
25667 - const double dos_fou_x = NOHALO_MINMOD( d_dos_foufiv, d_dos_thrfou,
25668 - d_dos_foufiv_sq,
25669 - d_dos_thrfou_times_foufiv );
25670 -
25671 - const double newval_uno_thr =
25672 - .25 * ( dos_fou - tre_thr )
25673 - +
25674 - .125 * ( dos_fou_y - tre_fou_y + dos_thr_x - dos_fou_x )
25675 - +
25676 - .5 * ( newval_uno_two + newval_dos_thr );
25677 -
25678 - const double tre_two_y = NOHALO_MINMOD( d_dostre_two, d_trequa_two,
25679 - d_dostre_two_sq,
25680 - d_dostre_times_trequa_two );
25681 - const double qua_two_y = NOHALO_MINMOD( d_quacin_two, d_trequa_two,
25682 - d_quacin_two_sq,
25683 - d_trequa_times_quacin_two );
25684 -
25685 - const double newval_tre_one =
25686 - .25 * ( qua_two - tre_thr )
25687 - +
25688 - .125 * ( qua_two_x - qua_thr_x + tre_two_y - qua_two_y )
25689 - +
25690 - .5 * ( newval_dos_one + newval_tre_two );
25691 -
25692 - const double dos_two_x = NOHALO_MINMOD( d_dos_twothr, d_dos_onetwo,
25693 - d_dos_twothr_sq,
25694 - d_dos_onetwo_times_twothr );
25695 -
25696 - const double dos_two_y = NOHALO_MINMOD( d_dostre_two, d_unodos_two,
25697 - d_dostre_two_sq,
25698 - d_unodos_times_dostre_two );
25699 -
25700 - const double newval_uno_one =
25701 - .25 * ( dos_two + dos_thr + tre_two + tre_thr )
25702 - +
25703 - .125 * ( dos_two_x - dos_thr_x + tre_two_x - tre_thr_x
25704 - +
25705 - dos_two_y + dos_thr_y - tre_two_y - tre_thr_y );
25706 -
25707 - /*
25708 - * Return the sixteen LBB stencil values:
25709 - */
25710 - *uno_one_1 = newval_uno_one;
25711 - *uno_two_1 = newval_uno_two;
25712 - *uno_thr_1 = newval_uno_thr;
25713 - *uno_fou_1 = newval_uno_fou;
25714 - *dos_one_1 = newval_dos_one;
25715 - *dos_two_1 = tre_thr;
25716 - *dos_thr_1 = newval_dos_thr;
25717 - *dos_fou_1 = tre_fou;
25718 - *tre_one_1 = newval_tre_one;
25719 - *tre_two_1 = newval_tre_two;
25720 - *tre_thr_1 = newval_tre_thr;
25721 - *tre_fou_1 = newval_tre_fou;
25722 - *qua_one_1 = newval_qua_one;
25723 - *qua_two_1 = qua_thr;
25724 - *qua_thr_1 = newval_qua_thr;
25725 - *qua_fou_1 = qua_fou;
25726 -}
25727 -
25728 -/*
25729 - * LBB (Locally Bounded Bicubic) is a high quality nonlinear variant
25730 - * of Catmull-Rom. Images resampled with LBB have much smaller halos
25731 - * than images resampled with windowed sincs or other interpolatory
25732 - * cubic spline filters. Specifically, LBB halos are narrower and the
25733 - * over/undershoot amplitude is smaller. This is accomplished without
25734 - * a significant reduction in the smoothness of the result (compared
25735 - * to Catmull-Rom).
25736 - *
25737 - * Another important property is that the resampled values are
25738 - * contained within the range of nearby input values. Consequently, no
25739 - * final clamping is needed to stay "in range" (e.g., 0-255 for
25740 - * standard 8-bit images).
25741 - *
25742 - * LBB was developed by N. Robidoux and C. Racette of the Department
25743 - * of Mathematics and Computer Science of Laurentian University in the
25744 - * course of C.'s Masters Thesis in Computational Sciences.
25745 - */
25746 -
25747 -/*
25748 - * LBB is a novel method with the following properties:
25749 - *
25750 - * --LBB is a Hermite bicubic method: The bicubic surface is defined,
25751 - * one convex hull of four nearby input points at a time, using four
25752 - * point values, four x-derivatives, four y-derivatives, and four
25753 - * cross-derivatives.
25754 - *
25755 - * --The stencil for values in a square patch is the usual 4x4.
25756 - *
25757 - * --LBB is interpolatory.
25758 - *
25759 - * --It is C^1 with continuous cross derivatives.
25760 - *
25761 - * --When the limiters are inactive, LBB gives the same results as
25762 - * Catmull-Rom.
25763 - *
25764 - * --When used on binary images, LBB gives results similar to bicubic
25765 - * Hermite with all first derivatives---but not necessarily the
25766 - * cross derivatives--at the input pixel locations set to zero.
25767 - *
25768 - * --The LBB reconstruction is locally bounded: Over each square
25769 - * patch, the surface is contained between the minimum and the
25770 - * maximum values among the 16 nearest input pixel values (those in
25771 - * the stencil).
25772 - *
25773 - * --Consequently, the LBB reconstruction is globally bounded between
25774 - * the very smallest input pixel value and the very largest input
25775 - * pixel value. (It is not necessary to clamp results.)
25776 - *
25777 - * The LBB method is based on the method of Ken Brodlie, Petros
25778 - * Mashwama and Sohail Butt for constraining Hermite interpolants
25779 - * between globally defined planes:
25780 - *
25781 - * Visualization of surface data to preserve positivity and other
25782 - * simple constraints. Computer & Graphics, Vol. 19, Number 4, pages
25783 - * 585-594, 1995. DOI: 10.1016/0097-8493(95)00036-C.
25784 - *
25785 - * Instead of forcing the reconstructed surface to lie between two
25786 - * GLOBALLY defined planes, LBB constrains one patch at a time to lie
25787 - * between LOCALLY defined planes. This is accomplished by
25788 - * constraining the derivatives (x, y and cross) at each input pixel
25789 - * location so that if the constraint was applied everywhere the
25790 - * surface would fit between the min and max of the values at the 9
25791 - * closest pixel locations. Because this is done with each of the four
25792 - * pixel locations which define the bicubic patch, this forces the
25793 - * reconstructed surface to lie between the min and max of the values
25794 - * at the 16 closest values pixel locations. (Each corner defines its
25795 - * own 3x3 subgroup of the 4x4 stencil. Consequently, the surface is
25796 - * necessarily above the minimum of the four minima, which happens to
25797 - * be the minimum over the 4x4. Similarly with the maxima.)
25798 - *
25799 - * The above paragraph described the "soft" version of LBB. The
25800 - * "sharp" version is similar.
25801 - */
25802 -
25803 -static inline double
25804 -lbbicubic( const double c00,
25805 - const double c10,
25806 - const double c01,
25807 - const double c11,
25808 - const double c00dx,
25809 - const double c10dx,
25810 - const double c01dx,
25811 - const double c11dx,
25812 - const double c00dy,
25813 - const double c10dy,
25814 - const double c01dy,
25815 - const double c11dy,
25816 - const double c00dxdy,
25817 - const double c10dxdy,
25818 - const double c01dxdy,
25819 - const double c11dxdy,
25820 - const double uno_one,
25821 - const double uno_two,
25822 - const double uno_thr,
25823 - const double uno_fou,
25824 - const double dos_one,
25825 - const double dos_two,
25826 - const double dos_thr,
25827 - const double dos_fou,
25828 - const double tre_one,
25829 - const double tre_two,
25830 - const double tre_thr,
25831 - const double tre_fou,
25832 - const double qua_one,
25833 - const double qua_two,
25834 - const double qua_thr,
25835 - const double qua_fou )
25836 -{
25837 - /*
25838 - * STENCIL (FOOTPRINT) OF INPUT VALUES:
25839 - *
25840 - * The stencil of LBB is the same as for any standard Hermite
25841 - * bicubic (e.g., Catmull-Rom):
25842 - *
25843 - * (ix-1,iy-1) (ix,iy-1) (ix+1,iy-1) (ix+2,iy-1)
25844 - * = uno_one = uno_two = uno_thr = uno_fou
25845 - *
25846 - * (ix-1,iy) (ix,iy) (ix+1,iy) (ix+2,iy)
25847 - * = dos_one = dos_two = dos_thr = dos_fou
25848 - * X
25849 - * (ix-1,iy+1) (ix,iy+1) (ix+1,iy+1) (ix+2,iy+1)
25850 - * = tre_one = tre_two = tre_thr = tre_fou
25851 - *
25852 - * (ix-1,iy+2) (ix,iy+2) (ix+1,iy+2) (ix+2,iy+2)
25853 - * = qua_one = qua_two = qua_thr = qua_fou
25854 - *
25855 - * where ix is the (pseudo-)floor of the requested left-to-right
25856 - * location ("X"), and iy is the floor of the requested up-to-down
25857 - * location.
25858 - */
25859 -
25860 -#if defined (__NOHALO_CHEAP_H__)
25861 - /*
25862 - * Computation of the four min and four max over 3x3 input data
25863 - * sub-crosses of the 4x4 input stencil.
25864 - *
25865 - * We exploit the fact that the data comes from the (co-monotone)
25866 - * method Nohalo so that it is known ahead of time that
25867 - *
25868 - * dos_thr is between dos_two and dos_fou
25869 - *
25870 - * tre_two is between dos_two and qua_two
25871 - *
25872 - * tre_fou is between dos_fou and qua_fou
25873 - *
25874 - * qua_thr is between qua_two and qua_fou
25875 - *
25876 - * tre_thr is in the convex hull of dos_two, dos_fou, qua_two and qua_fou
25877 - *
25878 - * to minimize the number of flags and conditional moves.
25879 - *
25880 - * (The "between" are not strict: "a between b and c" means
25881 - *
25882 - * "min(b,c) <= a <= max(b,c)".)
25883 - *
25884 - * We have, however, succeeded in eliminating one flag computation
25885 - * (one comparison) and one use of an intermediate result. See the
25886 - * two commented out lines below.
25887 - *
25888 - * Overall, only 20 comparisons and 28 "? :" are needed (to compute
25889 - * 4 mins and 4 maxes). If you can figure how to do this more
25890 - * efficiently, let us know.
25891 - */
25892 - const double m1 = (uno_two <= tre_two) ? uno_two : tre_two ;
25893 - const double M1 = (uno_two <= tre_two) ? tre_two : uno_two ;
25894 - const double m2 = (dos_thr <= qua_thr) ? dos_thr : qua_thr ;
25895 - const double M2 = (dos_thr <= qua_thr) ? qua_thr : dos_thr ;
25896 - const double m3 = (dos_two <= dos_fou) ? dos_two : dos_fou ;
25897 - const double M3 = (dos_two <= dos_fou) ? dos_fou : dos_two ;
25898 - const double m4 = (uno_thr <= tre_thr) ? uno_thr : tre_thr ;
25899 - const double M4 = (uno_thr <= tre_thr) ? tre_thr : uno_thr ;
25900 - const double m5 = (dos_two <= qua_two) ? dos_two : qua_two ;
25901 - const double M5 = (dos_two <= qua_two) ? qua_two : dos_two ;
25902 - const double m6 = (tre_one <= tre_thr) ? tre_one : tre_thr ;
25903 - const double M6 = (tre_one <= tre_thr) ? tre_thr : tre_one ;
25904 - const double m7 = (dos_one <= dos_thr) ? dos_one : dos_thr ;
25905 - const double M7 = (dos_one <= dos_thr) ? dos_thr : dos_one ;
25906 - const double m8 = (tre_two <= tre_fou) ? tre_two : tre_fou ;
25907 - const double M8 = (tre_two <= tre_fou) ? tre_fou : tre_two ;
25908 - const double m9 = NOHALO_MIN( m1, dos_two );
25909 - const double M9 = NOHALO_MAX( M1, dos_two );
25910 - const double m10 = NOHALO_MIN( m2, tre_thr );
25911 - const double M10 = NOHALO_MAX( M2, tre_thr );
25912 - const double min10 = NOHALO_MIN( m3, m4 );
25913 - const double max10 = NOHALO_MAX( M3, M4 );
25914 - const double min01 = NOHALO_MIN( m5, m6 );
25915 - const double max01 = NOHALO_MAX( M5, M6 );
25916 - const double min00 = NOHALO_MIN( m9, m7 );
25917 - const double max00 = NOHALO_MAX( M9, M7 );
25918 - const double min11 = NOHALO_MIN( m10, m8 );
25919 - const double max11 = NOHALO_MAX( M10, M8 );
25920 -#else
25921 - /*
25922 - * Computation of the four min and four max over 3x3 input data
25923 - * sub-blocks of the 4x4 input stencil.
25924 - *
25925 - * Surprisingly, we have not succeeded in reducing the number of "?
25926 - * :" needed by using the fact that the data comes from the
25927 - * (co-monotone) method Nohalo so that it is known ahead of time
25928 - * that
25929 - *
25930 - * dos_thr is between dos_two and dos_fou
25931 - *
25932 - * tre_two is between dos_two and qua_two
25933 - *
25934 - * tre_fou is between dos_fou and qua_fou
25935 - *
25936 - * qua_thr is between qua_two and qua_fou
25937 - *
25938 - * tre_thr is in the convex hull of dos_two, dos_fou, qua_two and qua_fou
25939 - *
25940 - * to minimize the number of flags and conditional moves.
25941 - *
25942 - * (The "between" are not strict: "a between b and c" means
25943 - *
25944 - * "min(b,c) <= a <= max(b,c)".)
25945 - *
25946 - * We have, however, succeeded in eliminating one flag computation
25947 - * (one comparison) and one use of an intermediate result. See the
25948 - * two commented out lines below.
25949 - *
25950 - * Overall, only 27 comparisons are needed (to compute 4 mins and 4
25951 - * maxes!). Without the simplification, 28 comparisons would be
25952 - * used. Either way, the number of "? :" used is 34. If you can
25953 - * figure how to do this more efficiently, let us know.
25954 - */
25955 - const double m1 = (dos_two <= dos_thr) ? dos_two : dos_thr ;
25956 - const double M1 = (dos_two <= dos_thr) ? dos_thr : dos_two ;
25957 - const double m2 = (tre_two <= tre_thr) ? tre_two : tre_thr ;
25958 - const double M2 = (tre_two <= tre_thr) ? tre_thr : tre_two ;
25959 - const double m4 = (qua_two <= qua_thr) ? qua_two : qua_thr ;
25960 - const double M4 = (qua_two <= qua_thr) ? qua_thr : qua_two ;
25961 - const double m3 = (uno_two <= uno_thr) ? uno_two : uno_thr ;
25962 - const double M3 = (uno_two <= uno_thr) ? uno_thr : uno_two ;
25963 - const double m5 = NOHALO_MIN( m1, m2 );
25964 - const double M5 = NOHALO_MAX( M1, M2 );
25965 - const double m6 = (dos_one <= tre_one) ? dos_one : tre_one ;
25966 - const double M6 = (dos_one <= tre_one) ? tre_one : dos_one ;
25967 - const double m7 = (dos_fou <= tre_fou) ? dos_fou : tre_fou ;
25968 - const double M7 = (dos_fou <= tre_fou) ? tre_fou : dos_fou ;
25969 - const double m13 = (dos_fou <= qua_fou) ? dos_fou : qua_fou ;
25970 - const double M13 = (dos_fou <= qua_fou) ? qua_fou : dos_fou ;
25971 - /*
25972 - * Because the data comes from Nohalo subdivision, the following two
25973 - * lines can be replaced by the above, simpler, two lines without
25974 - * changing the results.
25975 - *
25976 - * const double m13 = NOHALO_MIN( m7, qua_fou );
25977 - * const double M13 = NOHALO_MAX( M7, qua_fou );
25978 - *
25979 - * This also allows reodering the comparisons to put space between
25980 - * the computation of a result and its use.
25981 - */
25982 - const double m9 = NOHALO_MIN( m5, m4 );
25983 - const double M9 = NOHALO_MAX( M5, M4 );
25984 - const double m11 = NOHALO_MIN( m6, qua_one );
25985 - const double M11 = NOHALO_MAX( M6, qua_one );
25986 - const double m10 = NOHALO_MIN( m6, uno_one );
25987 - const double M10 = NOHALO_MAX( M6, uno_one );
25988 - const double m8 = NOHALO_MIN( m5, m3 );
25989 - const double M8 = NOHALO_MAX( M5, M3 );
25990 - const double m12 = NOHALO_MIN( m7, uno_fou );
25991 - const double M12 = NOHALO_MAX( M7, uno_fou );
25992 - const double min11 = NOHALO_MIN( m9, m13 );
25993 - const double max11 = NOHALO_MAX( M9, M13 );
25994 - const double min01 = NOHALO_MIN( m9, m11 );
25995 - const double max01 = NOHALO_MAX( M9, M11 );
25996 - const double min00 = NOHALO_MIN( m8, m10 );
25997 - const double max00 = NOHALO_MAX( M8, M10 );
25998 - const double min10 = NOHALO_MIN( m8, m12 );
25999 - const double max10 = NOHALO_MAX( M8, M12 );
26000 -#endif
26001 -
26002 - /*
26003 - * The remainder of the "per channel" computation involves the
26004 - * computation of:
26005 - *
26006 - * --8 conditional moves,
26007 - *
26008 - * --8 signs (in which the sign of zero is unimportant),
26009 - *
26010 - * --12 minima of two values,
26011 - *
26012 - * --8 maxima of two values,
26013 - *
26014 - * --8 absolute values,
26015 - *
26016 - * for a grand total of 29 minima, 25 maxima, 8 conditional moves, 8
26017 - * signs, and 8 absolute values. If everything is done with
26018 - * conditional moves, "only" 28+8+8+12+8+8=72 flags are involved
26019 - * (because initial min and max can be computed with one flag).
26020 - *
26021 - * The "per channel" part of the computation also involves 107
26022 - * arithmetic operations (54 *, 21 +, 42 -).
26023 - */
26024 -
26025 - /*
26026 - * Distances to the local min and max:
26027 - */
26028 - const double u11 = tre_thr - min11;
26029 - const double v11 = max11 - tre_thr;
26030 - const double u01 = tre_two - min01;
26031 - const double v01 = max01 - tre_two;
26032 - const double u00 = dos_two - min00;
26033 - const double v00 = max00 - dos_two;
26034 - const double u10 = dos_thr - min10;
26035 - const double v10 = max10 - dos_thr;
26036 -
26037 - /*
26038 - * Initial values of the derivatives computed with centered
26039 - * differences. Factors of 1/2 are left out because they are folded
26040 - * in later:
26041 - */
26042 - const double dble_dzdx00i = dos_thr - dos_one;
26043 - const double dble_dzdy11i = qua_thr - dos_thr;
26044 - const double dble_dzdx10i = dos_fou - dos_two;
26045 - const double dble_dzdy01i = qua_two - dos_two;
26046 - const double dble_dzdx01i = tre_thr - tre_one;
26047 - const double dble_dzdy10i = tre_thr - uno_thr;
26048 - const double dble_dzdx11i = tre_fou - tre_two;
26049 - const double dble_dzdy00i = tre_two - uno_two;
26050 -
26051 - /*
26052 - * Signs of the derivatives. The upcoming clamping does not change
26053 - * them (except if the clamping sends a negative derivative to 0, in
26054 - * which case the sign does not matter anyway).
26055 - */
26056 - const double sign_dzdx00 = NOHALO_SIGN( dble_dzdx00i );
26057 - const double sign_dzdx10 = NOHALO_SIGN( dble_dzdx10i );
26058 - const double sign_dzdx01 = NOHALO_SIGN( dble_dzdx01i );
26059 - const double sign_dzdx11 = NOHALO_SIGN( dble_dzdx11i );
26060 -
26061 - const double sign_dzdy00 = NOHALO_SIGN( dble_dzdy00i );
26062 - const double sign_dzdy10 = NOHALO_SIGN( dble_dzdy10i );
26063 - const double sign_dzdy01 = NOHALO_SIGN( dble_dzdy01i );
26064 - const double sign_dzdy11 = NOHALO_SIGN( dble_dzdy11i );
26065 -
26066 - /*
26067 - * Initial values of the cross-derivatives. Factors of 1/4 are left
26068 - * out because folded in later:
26069 - */
26070 - const double quad_d2zdxdy00i = uno_one - uno_thr + dble_dzdx01i;
26071 - const double quad_d2zdxdy10i = uno_two - uno_fou + dble_dzdx11i;
26072 - const double quad_d2zdxdy01i = qua_thr - qua_one - dble_dzdx00i;
26073 - const double quad_d2zdxdy11i = qua_fou - qua_two - dble_dzdx10i;
26074 -
26075 - /*
26076 - * Slope limiters. The key multiplier is 3 but we fold a factor of
26077 - * 2, hence 6:
26078 - */
26079 - const double dble_slopelimit_00 = 6.0 * NOHALO_MIN( u00, v00 );
26080 - const double dble_slopelimit_10 = 6.0 * NOHALO_MIN( u10, v10 );
26081 - const double dble_slopelimit_01 = 6.0 * NOHALO_MIN( u01, v01 );
26082 - const double dble_slopelimit_11 = 6.0 * NOHALO_MIN( u11, v11 );
26083 -
26084 - /*
26085 - * Clamped first derivatives:
26086 - */
26087 - const double dble_dzdx00 =
26088 - ( sign_dzdx00 * dble_dzdx00i <= dble_slopelimit_00 )
26089 - ? dble_dzdx00i : sign_dzdx00 * dble_slopelimit_00;
26090 - const double dble_dzdy00 =
26091 - ( sign_dzdy00 * dble_dzdy00i <= dble_slopelimit_00 )
26092 - ? dble_dzdy00i : sign_dzdy00 * dble_slopelimit_00;
26093 - const double dble_dzdx10 =
26094 - ( sign_dzdx10 * dble_dzdx10i <= dble_slopelimit_10 )
26095 - ? dble_dzdx10i : sign_dzdx10 * dble_slopelimit_10;
26096 - const double dble_dzdy10 =
26097 - ( sign_dzdy10 * dble_dzdy10i <= dble_slopelimit_10 )
26098 - ? dble_dzdy10i : sign_dzdy10 * dble_slopelimit_10;
26099 - const double dble_dzdx01 =
26100 - ( sign_dzdx01 * dble_dzdx01i <= dble_slopelimit_01 )
26101 - ? dble_dzdx01i : sign_dzdx01 * dble_slopelimit_01;
26102 - const double dble_dzdy01 =
26103 - ( sign_dzdy01 * dble_dzdy01i <= dble_slopelimit_01 )
26104 - ? dble_dzdy01i : sign_dzdy01 * dble_slopelimit_01;
26105 - const double dble_dzdx11 =
26106 - ( sign_dzdx11 * dble_dzdx11i <= dble_slopelimit_11 )
26107 - ? dble_dzdx11i : sign_dzdx11 * dble_slopelimit_11;
26108 - const double dble_dzdy11 =
26109 - ( sign_dzdy11 * dble_dzdy11i <= dble_slopelimit_11 )
26110 - ? dble_dzdy11i : sign_dzdy11 * dble_slopelimit_11;
26111 -
26112 - /*
26113 - * Sums and differences of first derivatives:
26114 - */
26115 - const double twelve_sum00 = 6.0 * ( dble_dzdx00 + dble_dzdy00 );
26116 - const double twelve_dif00 = 6.0 * ( dble_dzdx00 - dble_dzdy00 );
26117 - const double twelve_sum10 = 6.0 * ( dble_dzdx10 + dble_dzdy10 );
26118 - const double twelve_dif10 = 6.0 * ( dble_dzdx10 - dble_dzdy10 );
26119 - const double twelve_sum01 = 6.0 * ( dble_dzdx01 + dble_dzdy01 );
26120 - const double twelve_dif01 = 6.0 * ( dble_dzdx01 - dble_dzdy01 );
26121 - const double twelve_sum11 = 6.0 * ( dble_dzdx11 + dble_dzdy11 );
26122 - const double twelve_dif11 = 6.0 * ( dble_dzdx11 - dble_dzdy11 );
26123 -
26124 - /*
26125 - * Absolute values of the sums:
26126 - */
26127 - const double twelve_abs_sum00 = NOHALO_ABS( twelve_sum00 );
26128 - const double twelve_abs_sum10 = NOHALO_ABS( twelve_sum10 );
26129 - const double twelve_abs_sum01 = NOHALO_ABS( twelve_sum01 );
26130 - const double twelve_abs_sum11 = NOHALO_ABS( twelve_sum11 );
26131 -
26132 - /*
26133 - * Scaled distances to the min:
26134 - */
26135 - const double u00_times_36 = 36.0 * u00;
26136 - const double u10_times_36 = 36.0 * u10;
26137 - const double u01_times_36 = 36.0 * u01;
26138 - const double u11_times_36 = 36.0 * u11;
26139 -
26140 - /*
26141 - * First cross-derivative limiter:
26142 - */
26143 - const double first_limit00 = twelve_abs_sum00 - u00_times_36;
26144 - const double first_limit10 = twelve_abs_sum10 - u10_times_36;
26145 - const double first_limit01 = twelve_abs_sum01 - u01_times_36;
26146 - const double first_limit11 = twelve_abs_sum11 - u11_times_36;
26147 -
26148 - const double quad_d2zdxdy00ii = NOHALO_MAX( quad_d2zdxdy00i, first_limit00 );
26149 - const double quad_d2zdxdy10ii = NOHALO_MAX( quad_d2zdxdy10i, first_limit10 );
26150 - const double quad_d2zdxdy01ii = NOHALO_MAX( quad_d2zdxdy01i, first_limit01 );
26151 - const double quad_d2zdxdy11ii = NOHALO_MAX( quad_d2zdxdy11i, first_limit11 );
26152 -
26153 - /*
26154 - * Scaled distances to the max:
26155 - */
26156 - const double v00_times_36 = 36.0 * v00;
26157 - const double v10_times_36 = 36.0 * v10;
26158 - const double v01_times_36 = 36.0 * v01;
26159 - const double v11_times_36 = 36.0 * v11;
26160 -
26161 - /*
26162 - * Second cross-derivative limiter:
26163 - */
26164 - const double second_limit00 = v00_times_36 - twelve_abs_sum00;
26165 - const double second_limit10 = v10_times_36 - twelve_abs_sum10;
26166 - const double second_limit01 = v01_times_36 - twelve_abs_sum01;
26167 - const double second_limit11 = v11_times_36 - twelve_abs_sum11;
26168 -
26169 - const double quad_d2zdxdy00iii =
26170 - NOHALO_MIN( quad_d2zdxdy00ii, second_limit00 );
26171 - const double quad_d2zdxdy10iii =
26172 - NOHALO_MIN( quad_d2zdxdy10ii, second_limit10 );
26173 - const double quad_d2zdxdy01iii =
26174 - NOHALO_MIN( quad_d2zdxdy01ii, second_limit01 );
26175 - const double quad_d2zdxdy11iii =
26176 - NOHALO_MIN( quad_d2zdxdy11ii, second_limit11 );
26177 -
26178 - /*
26179 - * Absolute values of the differences:
26180 - */
26181 - const double twelve_abs_dif00 = NOHALO_ABS( twelve_dif00 );
26182 - const double twelve_abs_dif10 = NOHALO_ABS( twelve_dif10 );
26183 - const double twelve_abs_dif01 = NOHALO_ABS( twelve_dif01 );
26184 - const double twelve_abs_dif11 = NOHALO_ABS( twelve_dif11 );
26185 -
26186 - /*
26187 - * Third cross-derivative limiter:
26188 - */
26189 - const double third_limit00 = twelve_abs_dif00 - v00_times_36;
26190 - const double third_limit10 = twelve_abs_dif10 - v10_times_36;
26191 - const double third_limit01 = twelve_abs_dif01 - v01_times_36;
26192 - const double third_limit11 = twelve_abs_dif11 - v11_times_36;
26193 -
26194 - const double quad_d2zdxdy00iiii =
26195 - NOHALO_MAX( quad_d2zdxdy00iii, third_limit00);
26196 - const double quad_d2zdxdy10iiii =
26197 - NOHALO_MAX( quad_d2zdxdy10iii, third_limit10);
26198 - const double quad_d2zdxdy01iiii =
26199 - NOHALO_MAX( quad_d2zdxdy01iii, third_limit01);
26200 - const double quad_d2zdxdy11iiii =
26201 - NOHALO_MAX( quad_d2zdxdy11iii, third_limit11);
26202 -
26203 - /*
26204 - * Fourth cross-derivative limiter:
26205 - */
26206 - const double fourth_limit00 = u00_times_36 - twelve_abs_dif00;
26207 - const double fourth_limit10 = u10_times_36 - twelve_abs_dif10;
26208 - const double fourth_limit01 = u01_times_36 - twelve_abs_dif01;
26209 - const double fourth_limit11 = u11_times_36 - twelve_abs_dif11;
26210 -
26211 - const double quad_d2zdxdy00 = NOHALO_MIN( quad_d2zdxdy00iiii, fourth_limit00);
26212 - const double quad_d2zdxdy10 = NOHALO_MIN( quad_d2zdxdy10iiii, fourth_limit10);
26213 - const double quad_d2zdxdy01 = NOHALO_MIN( quad_d2zdxdy01iiii, fourth_limit01);
26214 - const double quad_d2zdxdy11 = NOHALO_MIN( quad_d2zdxdy11iiii, fourth_limit11);
26215 -
26216 - /*
26217 - * Part of the result which does not need derivatives:
26218 - */
26219 - const double newval1 = c00 * dos_two
26220 - +
26221 - c10 * dos_thr
26222 - +
26223 - c01 * tre_two
26224 - +
26225 - c11 * tre_thr;
26226 -
26227 - /*
26228 - * Twice the part of the result which only needs first derivatives.
26229 - */
26230 - const double newval2 = c00dx * dble_dzdx00
26231 - +
26232 - c10dx * dble_dzdx10
26233 - +
26234 - c01dx * dble_dzdx01
26235 - +
26236 - c11dx * dble_dzdx11
26237 - +
26238 - c00dy * dble_dzdy00
26239 - +
26240 - c10dy * dble_dzdy10
26241 - +
26242 - c01dy * dble_dzdy01
26243 - +
26244 - c11dy * dble_dzdy11;
26245 -
26246 - /*
26247 - * Four times the part of the result which only uses cross
26248 - * derivatives:
26249 - */
26250 - const double newval3 = c00dxdy * quad_d2zdxdy00
26251 - +
26252 - c10dxdy * quad_d2zdxdy10
26253 - +
26254 - c01dxdy * quad_d2zdxdy01
26255 - +
26256 - c11dxdy * quad_d2zdxdy11;
26257 -
26258 - const double newval = newval1 + .5 * newval2 + .25 * newval3;
26259 -
26260 - return newval;
26261 -}
26262 -
26263 -/*
26264 - * Call Nohalo+LBB with a careful type conversion as a parameter.
26265 - *
26266 - * It would be nice to do this with templates somehow---for one thing
26267 - * this would allow code comments!---but we can't figure a clean way
26268 - * to do it.
26269 - */
26270 -#define NOHALO_CONVERSION( conversion ) \
26271 - template <typename T> static void inline \
26272 - nohalo_ ## conversion( void* restrict pout, \
26273 - const void* restrict pin, \
26274 - const int bands, \
26275 - const int lskip, \
26276 - const double x_0, \
26277 - const double y_0 ) \
26278 - { \
26279 - T* restrict out = (T *) pout; \
26280 - \
26281 - const T* restrict in = (T *) pin; \
26282 - \
26283 - \
26284 - const int sign_of_x_0 = 2 * ( x_0 >= 0. ) - 1; \
26285 - const int sign_of_y_0 = 2 * ( y_0 >= 0. ) - 1; \
26286 - \
26287 - \
26288 - const int shift_forw_1_pix = sign_of_x_0 * bands; \
26289 - const int shift_forw_1_row = sign_of_y_0 * lskip; \
26290 - \
26291 - const int shift_back_1_pix = -shift_forw_1_pix; \
26292 - const int shift_back_1_row = -shift_forw_1_row; \
26293 - \
26294 - const int shift_back_2_pix = 2 * shift_back_1_pix; \
26295 - const int shift_back_2_row = 2 * shift_back_1_row; \
26296 - const int shift_forw_2_pix = 2 * shift_forw_1_pix; \
26297 - const int shift_forw_2_row = 2 * shift_forw_1_row; \
26298 - \
26299 - \
26300 - const int uno_two_shift = shift_back_1_pix + shift_back_2_row; \
26301 - const int uno_thr_shift = shift_back_2_row; \
26302 - const int uno_fou_shift = shift_forw_1_pix + shift_back_2_row; \
26303 - \
26304 - const int dos_one_shift = shift_back_2_pix + shift_back_1_row; \
26305 - const int dos_two_shift = shift_back_1_pix + shift_back_1_row; \
26306 - const int dos_thr_shift = shift_back_1_row; \
26307 - const int dos_fou_shift = shift_forw_1_pix + shift_back_1_row; \
26308 - const int dos_fiv_shift = shift_forw_2_pix + shift_back_1_row; \
26309 - \
26310 - const int tre_one_shift = shift_back_2_pix; \
26311 - const int tre_two_shift = shift_back_1_pix; \
26312 - const int tre_thr_shift = 0; \
26313 - const int tre_fou_shift = shift_forw_1_pix; \
26314 - const int tre_fiv_shift = shift_forw_2_pix; \
26315 - \
26316 - const int qua_one_shift = shift_back_2_pix + shift_forw_1_row; \
26317 - const int qua_two_shift = shift_back_1_pix + shift_forw_1_row; \
26318 - const int qua_thr_shift = shift_forw_1_row; \
26319 - const int qua_fou_shift = shift_forw_1_pix + shift_forw_1_row; \
26320 - const int qua_fiv_shift = shift_forw_2_pix + shift_forw_1_row; \
26321 - \
26322 - const int cin_two_shift = shift_back_1_pix + shift_forw_2_row; \
26323 - const int cin_thr_shift = shift_forw_2_row; \
26324 - const int cin_fou_shift = shift_forw_1_pix + shift_forw_2_row; \
26325 - \
26326 - \
26327 - const double xp1over2 = ( 2 * sign_of_x_0 ) * x_0; \
26328 - const double xm1over2 = xp1over2 - 1.0; \
26329 - const double onepx = 0.5 + xp1over2; \
26330 - const double onemx = 1.5 - xp1over2; \
26331 - const double xp1over2sq = xp1over2 * xp1over2; \
26332 - \
26333 - const double yp1over2 = ( 2 * sign_of_y_0 ) * y_0; \
26334 - const double ym1over2 = yp1over2 - 1.0; \
26335 - const double onepy = 0.5 + yp1over2; \
26336 - const double onemy = 1.5 - yp1over2; \
26337 - const double yp1over2sq = yp1over2 * yp1over2; \
26338 - \
26339 - const double xm1over2sq = xm1over2 * xm1over2; \
26340 - const double ym1over2sq = ym1over2 * ym1over2; \
26341 - \
26342 - const double twice1px = onepx + onepx; \
26343 - const double twice1py = onepy + onepy; \
26344 - const double twice1mx = onemx + onemx; \
26345 - const double twice1my = onemy + onemy; \
26346 - \
26347 - const double xm1over2sq_times_ym1over2sq = xm1over2sq * ym1over2sq; \
26348 - const double xp1over2sq_times_ym1over2sq = xp1over2sq * ym1over2sq; \
26349 - const double xp1over2sq_times_yp1over2sq = xp1over2sq * yp1over2sq; \
26350 - const double xm1over2sq_times_yp1over2sq = xm1over2sq * yp1over2sq; \
26351 - \
26352 - const double four_times_1px_times_1py = twice1px * twice1py; \
26353 - const double four_times_1mx_times_1py = twice1mx * twice1py; \
26354 - const double twice_xp1over2_times_1py = xp1over2 * twice1py; \
26355 - const double twice_xm1over2_times_1py = xm1over2 * twice1py; \
26356 - \
26357 - const double twice_xm1over2_times_1my = xm1over2 * twice1my; \
26358 - const double twice_xp1over2_times_1my = xp1over2 * twice1my; \
26359 - const double four_times_1mx_times_1my = twice1mx * twice1my; \
26360 - const double four_times_1px_times_1my = twice1px * twice1my; \
26361 - \
26362 - const double twice_1px_times_ym1over2 = twice1px * ym1over2; \
26363 - const double twice_1mx_times_ym1over2 = twice1mx * ym1over2; \
26364 - const double xp1over2_times_ym1over2 = xp1over2 * ym1over2; \
26365 - const double xm1over2_times_ym1over2 = xm1over2 * ym1over2; \
26366 - \
26367 - const double xm1over2_times_yp1over2 = xm1over2 * yp1over2; \
26368 - const double xp1over2_times_yp1over2 = xp1over2 * yp1over2; \
26369 - const double twice_1mx_times_yp1over2 = twice1mx * yp1over2; \
26370 - const double twice_1px_times_yp1over2 = twice1px * yp1over2; \
26371 - \
26372 - \
26373 - const double c00 = \
26374 - four_times_1px_times_1py * xm1over2sq_times_ym1over2sq; \
26375 - const double c00dx = \
26376 - twice_xp1over2_times_1py * xm1over2sq_times_ym1over2sq; \
26377 - const double c00dy = \
26378 - twice_1px_times_yp1over2 * xm1over2sq_times_ym1over2sq; \
26379 - const double c00dxdy = \
26380 - xp1over2_times_yp1over2 * xm1over2sq_times_ym1over2sq; \
26381 - \
26382 - const double c10 = \
26383 - four_times_1mx_times_1py * xp1over2sq_times_ym1over2sq; \
26384 - const double c10dx = \
26385 - twice_xm1over2_times_1py * xp1over2sq_times_ym1over2sq; \
26386 - const double c10dy = \
26387 - twice_1mx_times_yp1over2 * xp1over2sq_times_ym1over2sq; \
26388 - const double c10dxdy = \
26389 - xm1over2_times_yp1over2 * xp1over2sq_times_ym1over2sq; \
26390 - \
26391 - const double c01 = \
26392 - four_times_1px_times_1my * xm1over2sq_times_yp1over2sq; \
26393 - const double c01dx = \
26394 - twice_xp1over2_times_1my * xm1over2sq_times_yp1over2sq; \
26395 - const double c01dy = \
26396 - twice_1px_times_ym1over2 * xm1over2sq_times_yp1over2sq; \
26397 - const double c01dxdy = \
26398 - xp1over2_times_ym1over2 * xm1over2sq_times_yp1over2sq; \
26399 - \
26400 - const double c11 = \
26401 - four_times_1mx_times_1my * xp1over2sq_times_yp1over2sq; \
26402 - const double c11dx = \
26403 - twice_xm1over2_times_1my * xp1over2sq_times_yp1over2sq; \
26404 - const double c11dy = \
26405 - twice_1mx_times_ym1over2 * xp1over2sq_times_yp1over2sq; \
26406 - const double c11dxdy = \
26407 - xm1over2_times_ym1over2 * xp1over2sq_times_yp1over2sq; \
26408 - \
26409 - \
26410 - int band = bands; \
26411 - \
26412 - \
26413 - do \
26414 - { \
26415 - double uno_one, uno_two, uno_thr, uno_fou; \
26416 - double dos_one, dos_two, dos_thr, dos_fou; \
26417 - double tre_one, tre_two, tre_thr, tre_fou; \
26418 - double qua_one, qua_two, qua_thr, qua_fou; \
26419 - \
26420 - nohalo_subdivision( in[ uno_two_shift ], \
26421 - in[ uno_thr_shift ], \
26422 - in[ uno_fou_shift ], \
26423 - in[ dos_one_shift ], \
26424 - in[ dos_two_shift ], \
26425 - in[ dos_thr_shift ], \
26426 - in[ dos_fou_shift ], \
26427 - in[ dos_fiv_shift ], \
26428 - in[ tre_one_shift ], \
26429 - in[ tre_two_shift ], \
26430 - in[ tre_thr_shift ], \
26431 - in[ tre_fou_shift ], \
26432 - in[ tre_fiv_shift ], \
26433 - in[ qua_one_shift ], \
26434 - in[ qua_two_shift ], \
26435 - in[ qua_thr_shift ], \
26436 - in[ qua_fou_shift ], \
26437 - in[ qua_fiv_shift ], \
26438 - in[ cin_two_shift ], \
26439 - in[ cin_thr_shift ], \
26440 - in[ cin_fou_shift ], \
26441 - &uno_one, \
26442 - &uno_two, \
26443 - &uno_thr, \
26444 - &uno_fou, \
26445 - &dos_one, \
26446 - &dos_two, \
26447 - &dos_thr, \
26448 - &dos_fou, \
26449 - &tre_one, \
26450 - &tre_two, \
26451 - &tre_thr, \
26452 - &tre_fou, \
26453 - &qua_one, \
26454 - &qua_two, \
26455 - &qua_thr, \
26456 - &qua_fou ); \
26457 - \
26458 - const double double_result = \
26459 - lbbicubic( c00, \
26460 - c10, \
26461 - c01, \
26462 - c11, \
26463 - c00dx, \
26464 - c10dx, \
26465 - c01dx, \
26466 - c11dx, \
26467 - c00dy, \
26468 - c10dy, \
26469 - c01dy, \
26470 - c11dy, \
26471 - c00dxdy, \
26472 - c10dxdy, \
26473 - c01dxdy, \
26474 - c11dxdy, \
26475 - uno_one, \
26476 - uno_two, \
26477 - uno_thr, \
26478 - uno_fou, \
26479 - dos_one, \
26480 - dos_two, \
26481 - dos_thr, \
26482 - dos_fou, \
26483 - tre_one, \
26484 - tre_two, \
26485 - tre_thr, \
26486 - tre_fou, \
26487 - qua_one, \
26488 - qua_two, \
26489 - qua_thr, \
26490 - qua_fou ); \
26491 - \
26492 - { \
26493 - const T result = to_ ## conversion<T>( double_result ); \
26494 - in++; \
26495 - *out++ = result; \
26496 - } \
26497 - \
26498 - } while (--band); \
26499 - }
26500 -
26501 -
26502 -NOHALO_CONVERSION( fptypes )
26503 -NOHALO_CONVERSION( withsign )
26504 -NOHALO_CONVERSION( nosign )
26505 -
26506 -
26507 -#define CALL( T, conversion ) \
26508 - nohalo_ ## conversion<T>( out, \
26509 - p, \
26510 - bands, \
26511 - lskip, \
26512 - relative_x, \
26513 - relative_y );
26514 -
26515 -
26516 -/*
26517 - * We need C linkage:
26518 - */
26519 -extern "C" {
26520 -G_DEFINE_TYPE( VipsInterpolateNohalo, vips_interpolate_nohalo,
26521 - VIPS_TYPE_INTERPOLATE );
26522 -}
26523 -
26524 -
26525 -static void
26526 -vips_interpolate_nohalo_interpolate( VipsInterpolate* restrict interpolate,
26527 - void* restrict out,
26528 - VipsRegion* restrict in,
26529 - double absolute_x,
26530 - double absolute_y )
26531 -{
26532 - /* absolute_x and absolute_y are always >= 2.0 (see double-check assert
26533 - * below), so we don't need floor().
26534 - *
26535 - * It's 2 not 0 since we ask for a window_offset of 2 at the bottom.
26536 - */
26537 - const int ix = (int) (absolute_x + 0.5);
26538 - const int iy = (int) (absolute_y + 0.5);
26539 -
26540 - /*
26541 - * Move the pointer to (the first band of) the top/left pixel of the
26542 - * 2x2 group of pixel centers which contains the sampling location
26543 - * in its convex hull:
26544 - */
26545 - const VipsPel* restrict p = VIPS_REGION_ADDR( in, ix, iy );
26546 -
26547 - const double relative_x = absolute_x - ix;
26548 - const double relative_y = absolute_y - iy;
26549 -
26550 - /*
26551 - * VIPS versions of Nicolas's pixel addressing values.
26552 - */
26553 - const int lskip = VIPS_REGION_LSKIP( in ) /
26554 - VIPS_IMAGE_SIZEOF_ELEMENT( in->im );
26555 -
26556 - /*
26557 - * Double the bands for complex images to account for the real and
26558 - * imaginary parts being computed independently:
26559 - */
26560 - const int actual_bands = in->im->Bands;
26561 - const int bands =
26562 - vips_bandfmt_iscomplex( in->im->BandFmt ) ? 2 * actual_bands : actual_bands;
26563 -
26564 - /* Confirm that absolute_x and absolute_y are >= 2, see above.
26565 - */
26566 - g_assert( absolute_x >= 2.0 );
26567 - g_assert( absolute_y >= 2.0 );
26568 -
26569 - switch( in->im->BandFmt ) {
26570 - case VIPS_FORMAT_UCHAR:
26571 - CALL( unsigned char, nosign );
26572 - break;
26573 -
26574 - case VIPS_FORMAT_CHAR:
26575 - CALL( signed char, withsign );
26576 - break;
26577 -
26578 - case VIPS_FORMAT_USHORT:
26579 - CALL( unsigned short, nosign );
26580 - break;
26581 -
26582 - case VIPS_FORMAT_SHORT:
26583 - CALL( signed short, withsign );
26584 - break;
26585 -
26586 - case VIPS_FORMAT_UINT:
26587 - CALL( unsigned int, nosign );
26588 - break;
26589 -
26590 - case VIPS_FORMAT_INT:
26591 - CALL( signed int, withsign );
26592 - break;
26593 -
26594 - /*
26595 - * Complex images are handled by doubling of bands.
26596 - */
26597 - case VIPS_FORMAT_FLOAT:
26598 - case VIPS_FORMAT_COMPLEX:
26599 - CALL( float, fptypes );
26600 - break;
26601 -
26602 - case VIPS_FORMAT_DOUBLE:
26603 - case VIPS_FORMAT_DPCOMPLEX:
26604 - CALL( double, fptypes );
26605 - break;
26606 -
26607 - default:
26608 - g_assert( 0 );
26609 - break;
26610 - }
26611 -}
26612 -
26613 -static void
26614 -vips_interpolate_nohalo_class_init( VipsInterpolateNohaloClass *klass )
26615 -{
26616 - VipsObjectClass *object_class = VIPS_OBJECT_CLASS( klass );
26617 - VipsInterpolateClass *interpolate_class = VIPS_INTERPOLATE_CLASS( klass );
26618 -
26619 - object_class->nickname = "nohalo";
26620 - object_class->description =
26621 - _( "Edge sharpening resampler with halo reduction" );
26622 -
26623 - interpolate_class->interpolate = vips_interpolate_nohalo_interpolate;
26624 - interpolate_class->window_size = 5;
26625 - interpolate_class->window_offset = 2;
26626 -}
26627 -
26628 -static void
26629 -vips_interpolate_nohalo_init( VipsInterpolateNohalo *nohalo )
26630 -{
26631 -}
26632 diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/resample/vsqbs.cpp vips-7.38.5/libvips/resample/vsqbs.cpp
26633 --- vips-7.38.5-vanilla/libvips/resample/vsqbs.cpp 2014-07-17 23:48:36.232794473 -0400
26634 +++ vips-7.38.5/libvips/resample/vsqbs.cpp 1969-12-31 19:00:00.000000000 -0500
26635 @@ -1,409 +0,0 @@
26636 -/* vertex-split subdivision followed by quadratic b-spline smoothing
26637 - *
26638 - * C. Racette 23-28/05/2010 based on code by N. Robidoux and J. Cupitt
26639 - *
26640 - * N. Robidoux 29-30/05/2010
26641 - */
26642 -
26643 -/*
26644 -
26645 - This file is part of VIPS.
26646 -
26647 - VIPS is free software; you can redistribute it and/or modify it
26648 - under the terms of the GNU Lesser General Public License as
26649 - published by the Free Software Foundation; either version 2 of the
26650 - License, or (at your option) any later version.
26651 -
26652 - This program is distributed in the hope that it will be useful,
26653 - but WITHOUT ANY WARRANTY; without even the implied warranty of
26654 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26655 - Lesser General Public License for more details.
26656 -
26657 - You should have received a copy of the GNU Lesser General Public
26658 - License along with this program; if not, write to the Free Software
26659 - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26660 - 02110-1301 USA
26661 -
26662 - */
26663 -
26664 -/*
26665 -
26666 - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
26667 -
26668 - */
26669 -
26670 -/*
26671 - * 2010 (c) Chantal Racette, Nicolas Robidoux, John Cupitt.
26672 - *
26673 - * Nicolas Robidoux thanks Adam Turcotte, Geert Jordaens, Ralf Meyer,
26674 - * Øyvind Kolås, Minglun Gong and Eric Daoust for useful comments and
26675 - * code.
26676 - *
26677 - * Chantal Racette's image resampling research and programming funded
26678 - * in part by a NSERC Discovery Grant awarded to Julien Dompierre
26679 - * (20-61098).
26680 - */
26681 -
26682 -/*
26683 - * Vertex-Split Quadratic B-Splines (VSQBS) is a brand new method
26684 - * which consists of vertex-split subdivision, a subdivision method
26685 - * with the (as yet unknown?) property that data which is (locally)
26686 - * constant on diagonals is subdivided into data which is (locally)
26687 - * constant on diagonals, followed by quadratic B-Spline smoothing.
26688 - * Because both methods are linear, their combination can be
26689 - * implemented as if there is no subdivision.
26690 - *
26691 - * At high enlargement ratios, VSQBS is very effective at "masking"
26692 - * that the original has pixels uniformly distributed on a grid. In
26693 - * particular, VSQBS produces resamples with only very mild
26694 - * staircasing. Like cubic B-Spline smoothing, however, VSQBS is not
26695 - * an interpolatory method. For example, using VSQBS to perform the
26696 - * identity geometric transformation (enlargement by a scaling factor
26697 - * equal to 1) on an image does not return the original: VSQBS
26698 - * effectively smooths out the image with the convolution mask
26699 - *
26700 - * 1/8
26701 - * 1/8 1/2 1/8
26702 - * 1/8
26703 - *
26704 - * which is a fairly moderate blur (although the checkerboard mode is
26705 - * in its nullspace).
26706 - *
26707 - * By blending VSQBS with an interpolatory method (bilinear, say) in a
26708 - * transformation adaptive environment (current GEGL, for example), it
26709 - * is quite easy to restore that resampling for identity geometric
26710 - * transformation is equivalent to the identity, and rotations are not
26711 - * affected by the above, implicit, blur. Contact N. Robidoux for
26712 - * details.
26713 - *
26714 - * An article on VSQBS is forthcoming.
26715 - */
26716 -
26717 -#ifdef HAVE_CONFIG_H
26718 -#include <config.h>
26719 -#endif /*HAVE_CONFIG_H*/
26720 -#include <vips/intl.h>
26721 -
26722 -#include <stdio.h>
26723 -#include <stdlib.h>
26724 -
26725 -#include <vips/vips.h>
26726 -#include <vips/internal.h>
26727 -
26728 -#include "templates.h"
26729 -
26730 -#define VIPS_TYPE_INTERPOLATE_VSQBS \
26731 - (vips_interpolate_vsqbs_get_type())
26732 -#define VIPS_INTERPOLATE_VSQBS( obj ) \
26733 - (G_TYPE_CHECK_INSTANCE_CAST( (obj), \
26734 - VIPS_TYPE_INTERPOLATE_VSQBS, VipsInterpolateVsqbs ))
26735 -#define VIPS_INTERPOLATE_VSQBS_CLASS( klass ) \
26736 - (G_TYPE_CHECK_CLASS_CAST( (klass), \
26737 - VIPS_TYPE_INTERPOLATE_VSQBS, VipsInterpolateVsqbsClass))
26738 -#define VIPS_IS_INTERPOLATE_VSQBS( obj ) \
26739 - (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_INTERPOLATE_VSQBS ))
26740 -#define VIPS_IS_INTERPOLATE_VSQBS_CLASS( klass ) \
26741 - (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_INTERPOLATE_VSQBS ))
26742 -#define VIPS_INTERPOLATE_VSQBS_GET_CLASS( obj ) \
26743 - (G_TYPE_INSTANCE_GET_CLASS( (obj), \
26744 - VIPS_TYPE_INTERPOLATE_VSQBS, VipsInterpolateVsqbsClass ))
26745 -
26746 -typedef struct _VipsInterpolateVsqbs {
26747 - VipsInterpolate parent_object;
26748 -
26749 -} VipsInterpolateVsqbs;
26750 -
26751 -typedef struct _VipsInterpolateVsqbsClass {
26752 - VipsInterpolateClass parent_class;
26753 -
26754 -} VipsInterpolateVsqbsClass;
26755 -
26756 -/*
26757 - * THE STENCIL OF INPUT VALUES:
26758 - *
26759 - * Pointer arithmetic is used to implicitly reflect the input stencil
26760 - * about dos_two---assumed closer to the sampling location than other
26761 - * pixels (ties are OK)---in such a way that after reflection the
26762 - * sampling point is to the bottom right of dos_two.
26763 - *
26764 - * The following code and picture assumes that the stencil reflexion
26765 - * has already been performed. (X is the sampling location.)
26766 - *
26767 - *
26768 - * (ix,iy-1) (ix+1,iy-1)
26769 - * = uno_two = uno_thr
26770 - *
26771 - *
26772 - *
26773 - * (ix-1,iy) (ix,iy) (ix+1,iy)
26774 - * = dos_one = dos_two = dos_thr
26775 - * X
26776 - *
26777 - *
26778 - * (ix-1,iy+1) (ix,iy+1) (ix+1,iy+1)
26779 - * = tre_one = tre_two = tre_thr
26780 - *
26781 - *
26782 - * The above input pixel values are the ones needed in order to
26783 - * IMPLICITLY make available the following values, needed by quadratic
26784 - * B-Splines, which is performed on (shifted) double density data:
26785 - *
26786 - *
26787 - * uno_one_1 = uno_two_1 = uno_thr_1 =
26788 - * (ix-1/4,iy-1/4) (ix+1/4,iy-1/4) (ix+3/4,iy-1/4)
26789 - *
26790 - *
26791 - *
26792 - * X or X
26793 - * dos_one_1 = dos_two_1 = dos_thr_1 =
26794 - * (ix-1/4,iy+1/4) (ix+1/4,iy+1/4) (ix+3/4,iy+1/4)
26795 - * or X or X
26796 - *
26797 - *
26798 - *
26799 - * tre_one_1 = tre_two_1 = tre_thr_1 =
26800 - * (ix-1/4,iy+3/4) (ix+1/4,iy+3/4) (ix+3/4,iy+3/4)
26801 - *
26802 - *
26803 - * In the coefficient computations, we fix things so that coordinates
26804 - * are relative to dos_two_1, and so that distances are rescaled so
26805 - * that double density pixel locations are at a distance of 1.
26806 - */
26807 -
26808 -/*
26809 - * Call vertex-split + quadratic B-splines with a careful type
26810 - * conversion as a parameter. (It would be nice to do this with
26811 - * templates somehow---for one thing this would allow code
26812 - * comments---but we can't figure a clean way to do it.)
26813 - */
26814 -#define VSQBS_CONVERSION( conversion ) \
26815 - template <typename T> static void inline \
26816 - vsqbs_ ## conversion( void* restrict pout, \
26817 - const VipsPel* restrict pin, \
26818 - const int bands, \
26819 - const int lskip, \
26820 - const double x_0, \
26821 - const double y_0 ) \
26822 - { \
26823 - T* restrict out = (T *) pout; \
26824 - \
26825 - const T* restrict in = (T *) pin; \
26826 - \
26827 - const int sign_of_x_0 = 2 * ( x_0 >= 0. ) - 1; \
26828 - const int sign_of_y_0 = 2 * ( y_0 >= 0. ) - 1; \
26829 - \
26830 - const int shift_forw_1_pix = sign_of_x_0 * bands; \
26831 - const int shift_forw_1_row = sign_of_y_0 * lskip; \
26832 - \
26833 - const int shift_back_1_pix = -shift_forw_1_pix; \
26834 - const int shift_back_1_row = -shift_forw_1_row; \
26835 - \
26836 - const int uno_two_shift = shift_back_1_row; \
26837 - const int uno_thr_shift = shift_forw_1_pix + shift_back_1_row; \
26838 - \
26839 - const int dos_one_shift = shift_back_1_pix; \
26840 - const int dos_two_shift = 0; \
26841 - const int dos_thr_shift = shift_forw_1_pix; \
26842 - \
26843 - const int tre_one_shift = shift_back_1_pix + shift_forw_1_row; \
26844 - const int tre_two_shift = shift_forw_1_row; \
26845 - const int tre_thr_shift = shift_forw_1_pix + shift_forw_1_row; \
26846 - \
26847 - \
26848 - const double twice_abs_x_0 = ( 2 * sign_of_x_0 ) * x_0; \
26849 - const double twice_abs_y_0 = ( 2 * sign_of_y_0 ) * y_0; \
26850 - const double x = twice_abs_x_0 + -0.5; \
26851 - const double y = twice_abs_y_0 + -0.5; \
26852 - const double cent = 0.75 - x * x; \
26853 - const double mid = 0.75 - y * y; \
26854 - const double left = -0.5 * ( x + cent ) + 0.5; \
26855 - const double top = -0.5 * ( y + mid ) + 0.5; \
26856 - const double left_p_cent = left + cent; \
26857 - const double top_p_mid = top + mid; \
26858 - const double cent_p_rite = 1.0 - left; \
26859 - const double mid_p_bot = 1.0 - top; \
26860 - const double rite = 1.0 - left_p_cent; \
26861 - const double bot = 1.0 - top_p_mid; \
26862 - \
26863 - const double four_c_uno_two = left_p_cent * top; \
26864 - const double four_c_dos_one = left * top_p_mid; \
26865 - const double four_c_dos_two = left_p_cent + top_p_mid; \
26866 - const double four_c_dos_thr = cent_p_rite * top_p_mid + rite; \
26867 - const double four_c_tre_two = mid_p_bot * left_p_cent + bot; \
26868 - const double four_c_tre_thr = mid_p_bot * rite + cent_p_rite * bot; \
26869 - const double four_c_uno_thr = top - four_c_uno_two; \
26870 - const double four_c_tre_one = left - four_c_dos_one; \
26871 - \
26872 - \
26873 - int band = bands; \
26874 - \
26875 - do \
26876 - { \
26877 - const double double_result = \
26878 - ( \
26879 - ( \
26880 - ( \
26881 - four_c_uno_two * in[uno_two_shift] \
26882 - + \
26883 - four_c_dos_one * in[dos_one_shift] \
26884 - ) \
26885 - + \
26886 - ( \
26887 - four_c_dos_two * in[dos_two_shift] \
26888 - + \
26889 - four_c_dos_thr * in[dos_thr_shift] \
26890 - ) \
26891 - ) \
26892 - + \
26893 - ( \
26894 - ( \
26895 - four_c_tre_two * in[tre_two_shift] \
26896 - + \
26897 - four_c_tre_thr * in[tre_thr_shift] \
26898 - ) \
26899 - + \
26900 - ( \
26901 - four_c_uno_thr * in[uno_thr_shift] \
26902 - + \
26903 - four_c_tre_one * in[tre_one_shift] \
26904 - ) \
26905 - ) \
26906 - ) * 0.25; \
26907 - \
26908 - const T result = to_ ## conversion<T>( double_result ); \
26909 - in++; \
26910 - *out++ = result; \
26911 - \
26912 - } while (--band); \
26913 - }
26914 -
26915 -
26916 -VSQBS_CONVERSION( fptypes )
26917 -VSQBS_CONVERSION( withsign )
26918 -VSQBS_CONVERSION( nosign )
26919 -
26920 -
26921 -#define CALL( T, conversion ) \
26922 - vsqbs_ ## conversion<T>( out, \
26923 - p, \
26924 - bands, \
26925 - lskip, \
26926 - relative_x, \
26927 - relative_y );
26928 -
26929 -
26930 -/*
26931 - * We need C linkage:
26932 - */
26933 -extern "C" {
26934 - G_DEFINE_TYPE( VipsInterpolateVsqbs, vips_interpolate_vsqbs,
26935 - VIPS_TYPE_INTERPOLATE );
26936 -}
26937 -
26938 -
26939 -static void
26940 -vips_interpolate_vsqbs_interpolate( VipsInterpolate* restrict interpolate,
26941 - void* restrict out,
26942 - REGION* restrict in,
26943 - double absolute_x,
26944 - double absolute_y )
26945 -{
26946 - /* absolute_x and absolute_y are always >= 1.0 (see double-check assert
26947 - * below), so we don't need floor().
26948 - *
26949 - * It's 1 not 0 since we ask for a window_offset of 1 at the bottom.
26950 - */
26951 - const int ix = (int) (absolute_x + 0.5);
26952 - const int iy = (int) (absolute_y + 0.5);
26953 -
26954 - /*
26955 - * Move the pointer to (the first band of) the top/left pixel of the
26956 - * 2x2 group of pixel centers which contains the sampling location
26957 - * in its convex hull:
26958 - */
26959 - const VipsPel* restrict p = VIPS_REGION_ADDR( in, ix, iy );
26960 -
26961 - const double relative_x = absolute_x - ix;
26962 - const double relative_y = absolute_y - iy;
26963 -
26964 - /*
26965 - * VIPS versions of Nicolas's pixel addressing values.
26966 - */
26967 - const int lskip = VIPS_REGION_LSKIP( in ) /
26968 - VIPS_IMAGE_SIZEOF_ELEMENT( in->im );
26969 -
26970 - /*
26971 - * Double the bands for complex images to account for the real and
26972 - * imaginary parts being computed independently:
26973 - */
26974 - const int actual_bands = in->im->Bands;
26975 - const int bands =
26976 - vips_bandfmt_iscomplex( in->im->BandFmt ) ? 2 * actual_bands : actual_bands;
26977 -
26978 - /* Confirm that absolute_x and absolute_y are >= 1, see above.
26979 - */
26980 - g_assert( absolute_x >= 1.0 );
26981 - g_assert( absolute_y >= 1.0 );
26982 -
26983 - switch( in->im->BandFmt ) {
26984 - case VIPS_FORMAT_UCHAR:
26985 - CALL( unsigned char, nosign );
26986 - break;
26987 -
26988 - case VIPS_FORMAT_CHAR:
26989 - CALL( signed char, withsign );
26990 - break;
26991 -
26992 - case VIPS_FORMAT_USHORT:
26993 - CALL( unsigned short, nosign );
26994 - break;
26995 -
26996 - case VIPS_FORMAT_SHORT:
26997 - CALL( signed short, withsign );
26998 - break;
26999 -
27000 - case VIPS_FORMAT_UINT:
27001 - CALL( unsigned int, nosign );
27002 - break;
27003 -
27004 - case VIPS_FORMAT_INT:
27005 - CALL( signed int, withsign );
27006 - break;
27007 -
27008 - /*
27009 - * Complex images are handled by doubling bands:
27010 - */
27011 - case VIPS_FORMAT_FLOAT:
27012 - case VIPS_FORMAT_COMPLEX:
27013 - CALL( float, fptypes );
27014 - break;
27015 -
27016 - case VIPS_FORMAT_DOUBLE:
27017 - case VIPS_FORMAT_DPCOMPLEX:
27018 - CALL( double, fptypes );
27019 - break;
27020 -
27021 - default:
27022 - g_assert( 0 );
27023 - break;
27024 - }
27025 -}
27026 -
27027 -static void
27028 -vips_interpolate_vsqbs_class_init( VipsInterpolateVsqbsClass *klass )
27029 -{
27030 - VipsObjectClass *object_class = VIPS_OBJECT_CLASS( klass );
27031 - VipsInterpolateClass *interpolate_class = VIPS_INTERPOLATE_CLASS( klass );
27032 -
27033 - object_class->nickname = "vsqbs";
27034 - object_class->description = _( "B-Splines with antialiasing smoothing" );
27035 -
27036 - interpolate_class->interpolate = vips_interpolate_vsqbs_interpolate;
27037 - interpolate_class->window_size = 3;
27038 - interpolate_class->window_offset = 1;
27039 -}
27040 -
27041 -static void
27042 -vips_interpolate_vsqbs_init( VipsInterpolateVsqbs *vsqbs )
27043 -{
27044 -}
27045 diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/Makefile.am vips-7.38.5/libvipsCC/include/Makefile.am
27046 --- vips-7.38.5-vanilla/libvipsCC/include/Makefile.am 2014-07-17 23:48:36.237794473 -0400
27047 +++ vips-7.38.5/libvipsCC/include/Makefile.am 1969-12-31 19:00:00.000000000 -0500
27048 @@ -1,2 +0,0 @@
27049 -
27050 -SUBDIRS = vips
27051 diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/Makefile.in vips-7.38.5/libvipsCC/include/Makefile.in
27052 --- vips-7.38.5-vanilla/libvipsCC/include/Makefile.in 2014-07-17 23:48:36.237794473 -0400
27053 +++ vips-7.38.5/libvipsCC/include/Makefile.in 1969-12-31 19:00:00.000000000 -0500
27054 @@ -1,719 +0,0 @@
27055 -# Makefile.in generated by automake 1.13.3 from Makefile.am.
27056 -# @configure_input@
27057 -
27058 -# Copyright (C) 1994-2013 Free Software Foundation, Inc.
27059 -
27060 -# This Makefile.in is free software; the Free Software Foundation
27061 -# gives unlimited permission to copy and/or distribute it,
27062 -# with or without modifications, as long as this notice is preserved.
27063 -
27064 -# This program is distributed in the hope that it will be useful,
27065 -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
27066 -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
27067 -# PARTICULAR PURPOSE.
27068 -
27069 -@SET_MAKE@
27070 -VPATH = @srcdir@
27071 -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
27072 -am__make_running_with_option = \
27073 - case $${target_option-} in \
27074 - ?) ;; \
27075 - *) echo "am__make_running_with_option: internal error: invalid" \
27076 - "target option '$${target_option-}' specified" >&2; \
27077 - exit 1;; \
27078 - esac; \
27079 - has_opt=no; \
27080 - sane_makeflags=$$MAKEFLAGS; \
27081 - if $(am__is_gnu_make); then \
27082 - sane_makeflags=$$MFLAGS; \
27083 - else \
27084 - case $$MAKEFLAGS in \
27085 - *\\[\ \ ]*) \
27086 - bs=\\; \
27087 - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
27088 - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
27089 - esac; \
27090 - fi; \
27091 - skip_next=no; \
27092 - strip_trailopt () \
27093 - { \
27094 - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
27095 - }; \
27096 - for flg in $$sane_makeflags; do \
27097 - test $$skip_next = yes && { skip_next=no; continue; }; \
27098 - case $$flg in \
27099 - *=*|--*) continue;; \
27100 - -*I) strip_trailopt 'I'; skip_next=yes;; \
27101 - -*I?*) strip_trailopt 'I';; \
27102 - -*O) strip_trailopt 'O'; skip_next=yes;; \
27103 - -*O?*) strip_trailopt 'O';; \
27104 - -*l) strip_trailopt 'l'; skip_next=yes;; \
27105 - -*l?*) strip_trailopt 'l';; \
27106 - -[dEDm]) skip_next=yes;; \
27107 - -[JT]) skip_next=yes;; \
27108 - esac; \
27109 - case $$flg in \
27110 - *$$target_option*) has_opt=yes; break;; \
27111 - esac; \
27112 - done; \
27113 - test $$has_opt = yes
27114 -am__make_dryrun = (target_option=n; $(am__make_running_with_option))
27115 -am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
27116 -pkgdatadir = $(datadir)/@PACKAGE@
27117 -pkgincludedir = $(includedir)/@PACKAGE@
27118 -pkglibdir = $(libdir)/@PACKAGE@
27119 -pkglibexecdir = $(libexecdir)/@PACKAGE@
27120 -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
27121 -install_sh_DATA = $(install_sh) -c -m 644
27122 -install_sh_PROGRAM = $(install_sh) -c
27123 -install_sh_SCRIPT = $(install_sh) -c
27124 -INSTALL_HEADER = $(INSTALL_DATA)
27125 -transform = $(program_transform_name)
27126 -NORMAL_INSTALL = :
27127 -PRE_INSTALL = :
27128 -POST_INSTALL = :
27129 -NORMAL_UNINSTALL = :
27130 -PRE_UNINSTALL = :
27131 -POST_UNINSTALL = :
27132 -build_triplet = @build@
27133 -host_triplet = @host@
27134 -subdir = libvipsCC/include
27135 -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
27136 -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
27137 -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
27138 - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \
27139 - $(top_srcdir)/configure.ac
27140 -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
27141 - $(ACLOCAL_M4)
27142 -mkinstalldirs = $(install_sh) -d
27143 -CONFIG_HEADER = $(top_builddir)/config.h
27144 -CONFIG_CLEAN_FILES =
27145 -CONFIG_CLEAN_VPATH_FILES =
27146 -AM_V_P = $(am__v_P_@AM_V@)
27147 -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
27148 -am__v_P_0 = false
27149 -am__v_P_1 = :
27150 -AM_V_GEN = $(am__v_GEN_@AM_V@)
27151 -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
27152 -am__v_GEN_0 = @echo " GEN " $@;
27153 -am__v_GEN_1 =
27154 -AM_V_at = $(am__v_at_@AM_V@)
27155 -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
27156 -am__v_at_0 = @
27157 -am__v_at_1 =
27158 -SOURCES =
27159 -DIST_SOURCES =
27160 -RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
27161 - ctags-recursive dvi-recursive html-recursive info-recursive \
27162 - install-data-recursive install-dvi-recursive \
27163 - install-exec-recursive install-html-recursive \
27164 - install-info-recursive install-pdf-recursive \
27165 - install-ps-recursive install-recursive installcheck-recursive \
27166 - installdirs-recursive pdf-recursive ps-recursive \
27167 - tags-recursive uninstall-recursive
27168 -am__can_run_installinfo = \
27169 - case $$AM_UPDATE_INFO_DIR in \
27170 - n|no|NO) false;; \
27171 - *) (install-info --version) >/dev/null 2>&1;; \
27172 - esac
27173 -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
27174 - distclean-recursive maintainer-clean-recursive
27175 -am__recursive_targets = \
27176 - $(RECURSIVE_TARGETS) \
27177 - $(RECURSIVE_CLEAN_TARGETS) \
27178 - $(am__extra_recursive_targets)
27179 -AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
27180 - distdir
27181 -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
27182 -# Read a list of newline-separated strings from the standard input,
27183 -# and print each of them once, without duplicates. Input order is
27184 -# *not* preserved.
27185 -am__uniquify_input = $(AWK) '\
27186 - BEGIN { nonempty = 0; } \
27187 - { items[$$0] = 1; nonempty = 1; } \
27188 - END { if (nonempty) { for (i in items) print i; }; } \
27189 -'
27190 -# Make sure the list of sources is unique. This is necessary because,
27191 -# e.g., the same source file might be shared among _SOURCES variables
27192 -# for different programs/libraries.
27193 -am__define_uniq_tagged_files = \
27194 - list='$(am__tagged_files)'; \
27195 - unique=`for i in $$list; do \
27196 - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
27197 - done | $(am__uniquify_input)`
27198 -ETAGS = etags
27199 -CTAGS = ctags
27200 -DIST_SUBDIRS = $(SUBDIRS)
27201 -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
27202 -am__relativize = \
27203 - dir0=`pwd`; \
27204 - sed_first='s,^\([^/]*\)/.*$$,\1,'; \
27205 - sed_rest='s,^[^/]*/*,,'; \
27206 - sed_last='s,^.*/\([^/]*\)$$,\1,'; \
27207 - sed_butlast='s,/*[^/]*$$,,'; \
27208 - while test -n "$$dir1"; do \
27209 - first=`echo "$$dir1" | sed -e "$$sed_first"`; \
27210 - if test "$$first" != "."; then \
27211 - if test "$$first" = ".."; then \
27212 - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
27213 - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
27214 - else \
27215 - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
27216 - if test "$$first2" = "$$first"; then \
27217 - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
27218 - else \
27219 - dir2="../$$dir2"; \
27220 - fi; \
27221 - dir0="$$dir0"/"$$first"; \
27222 - fi; \
27223 - fi; \
27224 - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
27225 - done; \
27226 - reldir="$$dir2"
27227 -ACLOCAL = @ACLOCAL@
27228 -AMTAR = @AMTAR@
27229 -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
27230 -AR = @AR@
27231 -AS = @AS@
27232 -AUTOCONF = @AUTOCONF@
27233 -AUTOHEADER = @AUTOHEADER@
27234 -AUTOMAKE = @AUTOMAKE@
27235 -AWK = @AWK@
27236 -CATALOGS = @CATALOGS@
27237 -CATOBJEXT = @CATOBJEXT@
27238 -CC = @CC@
27239 -CCDEPMODE = @CCDEPMODE@
27240 -CFITSIO_CFLAGS = @CFITSIO_CFLAGS@
27241 -CFITSIO_LIBS = @CFITSIO_LIBS@
27242 -CFLAGS = @CFLAGS@
27243 -CPP = @CPP@
27244 -CPPFLAGS = @CPPFLAGS@
27245 -CXX = @CXX@
27246 -CXXCPP = @CXXCPP@
27247 -CXXDEPMODE = @CXXDEPMODE@
27248 -CXXFLAGS = @CXXFLAGS@
27249 -CYGPATH_W = @CYGPATH_W@
27250 -DATADIRNAME = @DATADIRNAME@
27251 -DEFS = @DEFS@
27252 -DEPDIR = @DEPDIR@
27253 -DLLTOOL = @DLLTOOL@
27254 -DLLWRAP = @DLLWRAP@
27255 -DSYMUTIL = @DSYMUTIL@
27256 -DUMPBIN = @DUMPBIN@
27257 -ECHO_C = @ECHO_C@
27258 -ECHO_N = @ECHO_N@
27259 -ECHO_T = @ECHO_T@
27260 -EGREP = @EGREP@
27261 -EXEEXT = @EXEEXT@
27262 -EXIF_CFLAGS = @EXIF_CFLAGS@
27263 -EXIF_LIBS = @EXIF_LIBS@
27264 -FFTW_CFLAGS = @FFTW_CFLAGS@
27265 -FFTW_LIBS = @FFTW_LIBS@
27266 -FGREP = @FGREP@
27267 -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
27268 -GMOFILES = @GMOFILES@
27269 -GMSGFMT = @GMSGFMT@
27270 -GREP = @GREP@
27271 -GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
27272 -GTHREAD_LIBS = @GTHREAD_LIBS@
27273 -GTKDOC_CHECK = @GTKDOC_CHECK@
27274 -GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
27275 -GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
27276 -GTKDOC_MKPDF = @GTKDOC_MKPDF@
27277 -GTKDOC_REBASE = @GTKDOC_REBASE@
27278 -HTML_DIR = @HTML_DIR@
27279 -IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@
27280 -IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@
27281 -INSTALL = @INSTALL@
27282 -INSTALL_DATA = @INSTALL_DATA@
27283 -INSTALL_PROGRAM = @INSTALL_PROGRAM@
27284 -INSTALL_SCRIPT = @INSTALL_SCRIPT@
27285 -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
27286 -INSTOBJEXT = @INSTOBJEXT@
27287 -INTLLIBS = @INTLLIBS@
27288 -INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
27289 -INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
27290 -INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
27291 -INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
27292 -INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
27293 -INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
27294 -INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
27295 -INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
27296 -JPEG_INCLUDES = @JPEG_INCLUDES@
27297 -JPEG_LIBS = @JPEG_LIBS@
27298 -LCMS_CFLAGS = @LCMS_CFLAGS@
27299 -LCMS_LIBS = @LCMS_LIBS@
27300 -LD = @LD@
27301 -LDFLAGS = @LDFLAGS@
27302 -LIBOBJS = @LIBOBJS@
27303 -LIBRARY_AGE = @LIBRARY_AGE@
27304 -LIBRARY_CURRENT = @LIBRARY_CURRENT@
27305 -LIBRARY_REVISION = @LIBRARY_REVISION@
27306 -LIBS = @LIBS@
27307 -LIBTOOL = @LIBTOOL@
27308 -LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@
27309 -LIBWEBP_LIBS = @LIBWEBP_LIBS@
27310 -LIPO = @LIPO@
27311 -LN_S = @LN_S@
27312 -LTLIBOBJS = @LTLIBOBJS@
27313 -MAGICK_CFLAGS = @MAGICK_CFLAGS@
27314 -MAGICK_LIBS = @MAGICK_LIBS@
27315 -MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@
27316 -MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@
27317 -MAKEINFO = @MAKEINFO@
27318 -MANIFEST_TOOL = @MANIFEST_TOOL@
27319 -MATIO_CFLAGS = @MATIO_CFLAGS@
27320 -MATIO_LIBS = @MATIO_LIBS@
27321 -MKDIR_P = @MKDIR_P@
27322 -MKINSTALLDIRS = @MKINSTALLDIRS@
27323 -MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@
27324 -MONOTONIC_LIBS = @MONOTONIC_LIBS@
27325 -MSGFMT = @MSGFMT@
27326 -MSGFMT_OPTS = @MSGFMT_OPTS@
27327 -NM = @NM@
27328 -NMEDIT = @NMEDIT@
27329 -OBJDUMP = @OBJDUMP@
27330 -OBJEXT = @OBJEXT@
27331 -OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
27332 -OPENEXR_LIBS = @OPENEXR_LIBS@
27333 -OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@
27334 -OPENSLIDE_LIBS = @OPENSLIDE_LIBS@
27335 -ORC_CFLAGS = @ORC_CFLAGS@
27336 -ORC_LIBS = @ORC_LIBS@
27337 -OTOOL = @OTOOL@
27338 -OTOOL64 = @OTOOL64@
27339 -PACKAGE = @PACKAGE@
27340 -PACKAGES_USED = @PACKAGES_USED@
27341 -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
27342 -PACKAGE_NAME = @PACKAGE_NAME@
27343 -PACKAGE_STRING = @PACKAGE_STRING@
27344 -PACKAGE_TARNAME = @PACKAGE_TARNAME@
27345 -PACKAGE_URL = @PACKAGE_URL@
27346 -PACKAGE_VERSION = @PACKAGE_VERSION@
27347 -PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
27348 -PANGOFT2_LIBS = @PANGOFT2_LIBS@
27349 -PATH_SEPARATOR = @PATH_SEPARATOR@
27350 -PKG_CONFIG = @PKG_CONFIG@
27351 -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
27352 -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
27353 -PNG_CFLAGS = @PNG_CFLAGS@
27354 -PNG_INCLUDES = @PNG_INCLUDES@
27355 -PNG_LIBS = @PNG_LIBS@
27356 -POFILES = @POFILES@
27357 -POSUB = @POSUB@
27358 -PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
27359 -PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
27360 -PYTHON = @PYTHON@
27361 -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
27362 -PYTHON_INCLUDES = @PYTHON_INCLUDES@
27363 -PYTHON_PLATFORM = @PYTHON_PLATFORM@
27364 -PYTHON_PREFIX = @PYTHON_PREFIX@
27365 -PYTHON_VERSION = @PYTHON_VERSION@
27366 -RANLIB = @RANLIB@
27367 -REQUIRED_CFLAGS = @REQUIRED_CFLAGS@
27368 -REQUIRED_LIBS = @REQUIRED_LIBS@
27369 -SED = @SED@
27370 -SET_MAKE = @SET_MAKE@
27371 -SHELL = @SHELL@
27372 -STRIP = @STRIP@
27373 -THREADS_CFLAGS = @THREADS_CFLAGS@
27374 -THREADS_LIBS = @THREADS_LIBS@
27375 -TIFF_CFLAGS = @TIFF_CFLAGS@
27376 -TIFF_INCLUDES = @TIFF_INCLUDES@
27377 -TIFF_LIBS = @TIFF_LIBS@
27378 -TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@
27379 -TYPE_INIT_LIBS = @TYPE_INIT_LIBS@
27380 -USE_NLS = @USE_NLS@
27381 -VERSION = @VERSION@
27382 -VIPS_CFLAGS = @VIPS_CFLAGS@
27383 -VIPS_CXX_LIBS = @VIPS_CXX_LIBS@
27384 -VIPS_EXEEXT = @VIPS_EXEEXT@
27385 -VIPS_INCLUDES = @VIPS_INCLUDES@
27386 -VIPS_LIBDIR = @VIPS_LIBDIR@
27387 -VIPS_LIBS = @VIPS_LIBS@
27388 -VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@
27389 -VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@
27390 -VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@
27391 -VIPS_VERSION = @VIPS_VERSION@
27392 -VIPS_VERSION_STRING = @VIPS_VERSION_STRING@
27393 -XGETTEXT = @XGETTEXT@
27394 -XMKMF = @XMKMF@
27395 -X_CFLAGS = @X_CFLAGS@
27396 -X_EXTRA_LIBS = @X_EXTRA_LIBS@
27397 -X_LIBS = @X_LIBS@
27398 -X_PRE_LIBS = @X_PRE_LIBS@
27399 -ZIP_INCLUDES = @ZIP_INCLUDES@
27400 -ZIP_LIBS = @ZIP_LIBS@
27401 -abs_builddir = @abs_builddir@
27402 -abs_srcdir = @abs_srcdir@
27403 -abs_top_builddir = @abs_top_builddir@
27404 -abs_top_srcdir = @abs_top_srcdir@
27405 -ac_ct_AR = @ac_ct_AR@
27406 -ac_ct_CC = @ac_ct_CC@
27407 -ac_ct_CXX = @ac_ct_CXX@
27408 -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
27409 -am__include = @am__include@
27410 -am__leading_dot = @am__leading_dot@
27411 -am__quote = @am__quote@
27412 -am__tar = @am__tar@
27413 -am__untar = @am__untar@
27414 -bindir = @bindir@
27415 -build = @build@
27416 -build_alias = @build_alias@
27417 -build_cpu = @build_cpu@
27418 -build_os = @build_os@
27419 -build_vendor = @build_vendor@
27420 -builddir = @builddir@
27421 -datadir = @datadir@
27422 -datarootdir = @datarootdir@
27423 -docdir = @docdir@
27424 -dvidir = @dvidir@
27425 -exec_prefix = @exec_prefix@
27426 -host = @host@
27427 -host_alias = @host_alias@
27428 -host_cpu = @host_cpu@
27429 -host_os = @host_os@
27430 -host_vendor = @host_vendor@
27431 -htmldir = @htmldir@
27432 -includedir = @includedir@
27433 -infodir = @infodir@
27434 -install_sh = @install_sh@
27435 -libdir = @libdir@
27436 -libexecdir = @libexecdir@
27437 -localedir = @localedir@
27438 -localstatedir = @localstatedir@
27439 -mandir = @mandir@
27440 -mkdir_p = @mkdir_p@
27441 -oldincludedir = @oldincludedir@
27442 -pdfdir = @pdfdir@
27443 -pkgpyexecdir = @pkgpyexecdir@
27444 -pkgpythondir = @pkgpythondir@
27445 -prefix = @prefix@
27446 -program_transform_name = @program_transform_name@
27447 -psdir = @psdir@
27448 -pyexecdir = @pyexecdir@
27449 -pythondir = @pythondir@
27450 -sbindir = @sbindir@
27451 -sharedstatedir = @sharedstatedir@
27452 -srcdir = @srcdir@
27453 -sysconfdir = @sysconfdir@
27454 -target_alias = @target_alias@
27455 -top_build_prefix = @top_build_prefix@
27456 -top_builddir = @top_builddir@
27457 -top_srcdir = @top_srcdir@
27458 -vips_introspection_sources = @vips_introspection_sources@
27459 -SUBDIRS = vips
27460 -all: all-recursive
27461 -
27462 -.SUFFIXES:
27463 -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
27464 - @for dep in $?; do \
27465 - case '$(am__configure_deps)' in \
27466 - *$$dep*) \
27467 - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
27468 - && { if test -f $@; then exit 0; else break; fi; }; \
27469 - exit 1;; \
27470 - esac; \
27471 - done; \
27472 - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvipsCC/include/Makefile'; \
27473 - $(am__cd) $(top_srcdir) && \
27474 - $(AUTOMAKE) --foreign libvipsCC/include/Makefile
27475 -.PRECIOUS: Makefile
27476 -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
27477 - @case '$?' in \
27478 - *config.status*) \
27479 - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
27480 - *) \
27481 - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
27482 - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
27483 - esac;
27484 -
27485 -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
27486 - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
27487 -
27488 -$(top_srcdir)/configure: $(am__configure_deps)
27489 - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
27490 -$(ACLOCAL_M4): $(am__aclocal_m4_deps)
27491 - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
27492 -$(am__aclocal_m4_deps):
27493 -
27494 -mostlyclean-libtool:
27495 - -rm -f *.lo
27496 -
27497 -clean-libtool:
27498 - -rm -rf .libs _libs
27499 -
27500 -# This directory's subdirectories are mostly independent; you can cd
27501 -# into them and run 'make' without going through this Makefile.
27502 -# To change the values of 'make' variables: instead of editing Makefiles,
27503 -# (1) if the variable is set in 'config.status', edit 'config.status'
27504 -# (which will cause the Makefiles to be regenerated when you run 'make');
27505 -# (2) otherwise, pass the desired values on the 'make' command line.
27506 -$(am__recursive_targets):
27507 - @fail=; \
27508 - if $(am__make_keepgoing); then \
27509 - failcom='fail=yes'; \
27510 - else \
27511 - failcom='exit 1'; \
27512 - fi; \
27513 - dot_seen=no; \
27514 - target=`echo $@ | sed s/-recursive//`; \
27515 - case "$@" in \
27516 - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
27517 - *) list='$(SUBDIRS)' ;; \
27518 - esac; \
27519 - for subdir in $$list; do \
27520 - echo "Making $$target in $$subdir"; \
27521 - if test "$$subdir" = "."; then \
27522 - dot_seen=yes; \
27523 - local_target="$$target-am"; \
27524 - else \
27525 - local_target="$$target"; \
27526 - fi; \
27527 - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
27528 - || eval $$failcom; \
27529 - done; \
27530 - if test "$$dot_seen" = "no"; then \
27531 - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
27532 - fi; test -z "$$fail"
27533 -
27534 -ID: $(am__tagged_files)
27535 - $(am__define_uniq_tagged_files); mkid -fID $$unique
27536 -tags: tags-recursive
27537 -TAGS: tags
27538 -
27539 -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
27540 - set x; \
27541 - here=`pwd`; \
27542 - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
27543 - include_option=--etags-include; \
27544 - empty_fix=.; \
27545 - else \
27546 - include_option=--include; \
27547 - empty_fix=; \
27548 - fi; \
27549 - list='$(SUBDIRS)'; for subdir in $$list; do \
27550 - if test "$$subdir" = .; then :; else \
27551 - test ! -f $$subdir/TAGS || \
27552 - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
27553 - fi; \
27554 - done; \
27555 - $(am__define_uniq_tagged_files); \
27556 - shift; \
27557 - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
27558 - test -n "$$unique" || unique=$$empty_fix; \
27559 - if test $$# -gt 0; then \
27560 - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
27561 - "$$@" $$unique; \
27562 - else \
27563 - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
27564 - $$unique; \
27565 - fi; \
27566 - fi
27567 -ctags: ctags-recursive
27568 -
27569 -CTAGS: ctags
27570 -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
27571 - $(am__define_uniq_tagged_files); \
27572 - test -z "$(CTAGS_ARGS)$$unique" \
27573 - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
27574 - $$unique
27575 -
27576 -GTAGS:
27577 - here=`$(am__cd) $(top_builddir) && pwd` \
27578 - && $(am__cd) $(top_srcdir) \
27579 - && gtags -i $(GTAGS_ARGS) "$$here"
27580 -cscopelist: cscopelist-recursive
27581 -
27582 -cscopelist-am: $(am__tagged_files)
27583 - list='$(am__tagged_files)'; \
27584 - case "$(srcdir)" in \
27585 - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
27586 - *) sdir=$(subdir)/$(srcdir) ;; \
27587 - esac; \
27588 - for i in $$list; do \
27589 - if test -f "$$i"; then \
27590 - echo "$(subdir)/$$i"; \
27591 - else \
27592 - echo "$$sdir/$$i"; \
27593 - fi; \
27594 - done >> $(top_builddir)/cscope.files
27595 -
27596 -distclean-tags:
27597 - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
27598 -
27599 -distdir: $(DISTFILES)
27600 - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
27601 - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
27602 - list='$(DISTFILES)'; \
27603 - dist_files=`for file in $$list; do echo $$file; done | \
27604 - sed -e "s|^$$srcdirstrip/||;t" \
27605 - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
27606 - case $$dist_files in \
27607 - */*) $(MKDIR_P) `echo "$$dist_files" | \
27608 - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
27609 - sort -u` ;; \
27610 - esac; \
27611 - for file in $$dist_files; do \
27612 - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
27613 - if test -d $$d/$$file; then \
27614 - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
27615 - if test -d "$(distdir)/$$file"; then \
27616 - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
27617 - fi; \
27618 - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
27619 - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
27620 - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
27621 - fi; \
27622 - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
27623 - else \
27624 - test -f "$(distdir)/$$file" \
27625 - || cp -p $$d/$$file "$(distdir)/$$file" \
27626 - || exit 1; \
27627 - fi; \
27628 - done
27629 - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
27630 - if test "$$subdir" = .; then :; else \
27631 - $(am__make_dryrun) \
27632 - || test -d "$(distdir)/$$subdir" \
27633 - || $(MKDIR_P) "$(distdir)/$$subdir" \
27634 - || exit 1; \
27635 - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
27636 - $(am__relativize); \
27637 - new_distdir=$$reldir; \
27638 - dir1=$$subdir; dir2="$(top_distdir)"; \
27639 - $(am__relativize); \
27640 - new_top_distdir=$$reldir; \
27641 - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
27642 - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
27643 - ($(am__cd) $$subdir && \
27644 - $(MAKE) $(AM_MAKEFLAGS) \
27645 - top_distdir="$$new_top_distdir" \
27646 - distdir="$$new_distdir" \
27647 - am__remove_distdir=: \
27648 - am__skip_length_check=: \
27649 - am__skip_mode_fix=: \
27650 - distdir) \
27651 - || exit 1; \
27652 - fi; \
27653 - done
27654 -check-am: all-am
27655 -check: check-recursive
27656 -all-am: Makefile
27657 -installdirs: installdirs-recursive
27658 -installdirs-am:
27659 -install: install-recursive
27660 -install-exec: install-exec-recursive
27661 -install-data: install-data-recursive
27662 -uninstall: uninstall-recursive
27663 -
27664 -install-am: all-am
27665 - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
27666 -
27667 -installcheck: installcheck-recursive
27668 -install-strip:
27669 - if test -z '$(STRIP)'; then \
27670 - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
27671 - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
27672 - install; \
27673 - else \
27674 - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
27675 - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
27676 - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
27677 - fi
27678 -mostlyclean-generic:
27679 -
27680 -clean-generic:
27681 -
27682 -distclean-generic:
27683 - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
27684 - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
27685 -
27686 -maintainer-clean-generic:
27687 - @echo "This command is intended for maintainers to use"
27688 - @echo "it deletes files that may require special tools to rebuild."
27689 -clean: clean-recursive
27690 -
27691 -clean-am: clean-generic clean-libtool mostlyclean-am
27692 -
27693 -distclean: distclean-recursive
27694 - -rm -f Makefile
27695 -distclean-am: clean-am distclean-generic distclean-tags
27696 -
27697 -dvi: dvi-recursive
27698 -
27699 -dvi-am:
27700 -
27701 -html: html-recursive
27702 -
27703 -html-am:
27704 -
27705 -info: info-recursive
27706 -
27707 -info-am:
27708 -
27709 -install-data-am:
27710 -
27711 -install-dvi: install-dvi-recursive
27712 -
27713 -install-dvi-am:
27714 -
27715 -install-exec-am:
27716 -
27717 -install-html: install-html-recursive
27718 -
27719 -install-html-am:
27720 -
27721 -install-info: install-info-recursive
27722 -
27723 -install-info-am:
27724 -
27725 -install-man:
27726 -
27727 -install-pdf: install-pdf-recursive
27728 -
27729 -install-pdf-am:
27730 -
27731 -install-ps: install-ps-recursive
27732 -
27733 -install-ps-am:
27734 -
27735 -installcheck-am:
27736 -
27737 -maintainer-clean: maintainer-clean-recursive
27738 - -rm -f Makefile
27739 -maintainer-clean-am: distclean-am maintainer-clean-generic
27740 -
27741 -mostlyclean: mostlyclean-recursive
27742 -
27743 -mostlyclean-am: mostlyclean-generic mostlyclean-libtool
27744 -
27745 -pdf: pdf-recursive
27746 -
27747 -pdf-am:
27748 -
27749 -ps: ps-recursive
27750 -
27751 -ps-am:
27752 -
27753 -uninstall-am:
27754 -
27755 -.MAKE: $(am__recursive_targets) install-am install-strip
27756 -
27757 -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
27758 - check-am clean clean-generic clean-libtool cscopelist-am ctags \
27759 - ctags-am distclean distclean-generic distclean-libtool \
27760 - distclean-tags distdir dvi dvi-am html html-am info info-am \
27761 - install install-am install-data install-data-am install-dvi \
27762 - install-dvi-am install-exec install-exec-am install-html \
27763 - install-html-am install-info install-info-am install-man \
27764 - install-pdf install-pdf-am install-ps install-ps-am \
27765 - install-strip installcheck installcheck-am installdirs \
27766 - installdirs-am maintainer-clean maintainer-clean-generic \
27767 - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
27768 - ps ps-am tags tags-am uninstall uninstall-am
27769 -
27770 -
27771 -# Tell versions [3.59,3.63) of GNU make to not export all variables.
27772 -# Otherwise a system limit (for SysV at least) may be exceeded.
27773 -.NOEXPORT:
27774 diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/vips/Makefile.am vips-7.38.5/libvipsCC/include/vips/Makefile.am
27775 --- vips-7.38.5-vanilla/libvipsCC/include/vips/Makefile.am 2014-07-17 23:48:36.237794473 -0400
27776 +++ vips-7.38.5/libvipsCC/include/vips/Makefile.am 1969-12-31 19:00:00.000000000 -0500
27777 @@ -1,21 +0,0 @@
27778 -pkginclude_HEADERS = \
27779 - VDisplay.h \
27780 - VError.h \
27781 - VImage.h \
27782 - VMask.h \
27783 - vipscpp.h \
27784 - vips \
27785 - vipsc++.h
27786 -
27787 -# swap the 'awk' line for this:
27788 -# awk '{if($$1!="deprecated") print $$1}'` ; \
27789 -# to not generate the wrappers for deprecated functions
27790 -vipsc++.h:
27791 - packages=`vips list packages | \
27792 - awk '{print $$1}'` ; \
27793 - echo > vipsc++.h ; \
27794 - for name in $$packages; do \
27795 - echo "// headers for package $$name" >> vipsc++.h ; \
27796 - vips cpph $$name >> vipsc++.h ; \
27797 - echo >> vipsc++.h ; \
27798 - done
27799 diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/vips/Makefile.in vips-7.38.5/libvipsCC/include/vips/Makefile.in
27800 --- vips-7.38.5-vanilla/libvipsCC/include/vips/Makefile.in 2014-07-17 23:48:36.237794473 -0400
27801 +++ vips-7.38.5/libvipsCC/include/vips/Makefile.in 1969-12-31 19:00:00.000000000 -0500
27802 @@ -1,681 +0,0 @@
27803 -# Makefile.in generated by automake 1.13.3 from Makefile.am.
27804 -# @configure_input@
27805 -
27806 -# Copyright (C) 1994-2013 Free Software Foundation, Inc.
27807 -
27808 -# This Makefile.in is free software; the Free Software Foundation
27809 -# gives unlimited permission to copy and/or distribute it,
27810 -# with or without modifications, as long as this notice is preserved.
27811 -
27812 -# This program is distributed in the hope that it will be useful,
27813 -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
27814 -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
27815 -# PARTICULAR PURPOSE.
27816 -
27817 -@SET_MAKE@
27818 -
27819 -VPATH = @srcdir@
27820 -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
27821 -am__make_running_with_option = \
27822 - case $${target_option-} in \
27823 - ?) ;; \
27824 - *) echo "am__make_running_with_option: internal error: invalid" \
27825 - "target option '$${target_option-}' specified" >&2; \
27826 - exit 1;; \
27827 - esac; \
27828 - has_opt=no; \
27829 - sane_makeflags=$$MAKEFLAGS; \
27830 - if $(am__is_gnu_make); then \
27831 - sane_makeflags=$$MFLAGS; \
27832 - else \
27833 - case $$MAKEFLAGS in \
27834 - *\\[\ \ ]*) \
27835 - bs=\\; \
27836 - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
27837 - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
27838 - esac; \
27839 - fi; \
27840 - skip_next=no; \
27841 - strip_trailopt () \
27842 - { \
27843 - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
27844 - }; \
27845 - for flg in $$sane_makeflags; do \
27846 - test $$skip_next = yes && { skip_next=no; continue; }; \
27847 - case $$flg in \
27848 - *=*|--*) continue;; \
27849 - -*I) strip_trailopt 'I'; skip_next=yes;; \
27850 - -*I?*) strip_trailopt 'I';; \
27851 - -*O) strip_trailopt 'O'; skip_next=yes;; \
27852 - -*O?*) strip_trailopt 'O';; \
27853 - -*l) strip_trailopt 'l'; skip_next=yes;; \
27854 - -*l?*) strip_trailopt 'l';; \
27855 - -[dEDm]) skip_next=yes;; \
27856 - -[JT]) skip_next=yes;; \
27857 - esac; \
27858 - case $$flg in \
27859 - *$$target_option*) has_opt=yes; break;; \
27860 - esac; \
27861 - done; \
27862 - test $$has_opt = yes
27863 -am__make_dryrun = (target_option=n; $(am__make_running_with_option))
27864 -am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
27865 -pkgdatadir = $(datadir)/@PACKAGE@
27866 -pkgincludedir = $(includedir)/@PACKAGE@
27867 -pkglibdir = $(libdir)/@PACKAGE@
27868 -pkglibexecdir = $(libexecdir)/@PACKAGE@
27869 -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
27870 -install_sh_DATA = $(install_sh) -c -m 644
27871 -install_sh_PROGRAM = $(install_sh) -c
27872 -install_sh_SCRIPT = $(install_sh) -c
27873 -INSTALL_HEADER = $(INSTALL_DATA)
27874 -transform = $(program_transform_name)
27875 -NORMAL_INSTALL = :
27876 -PRE_INSTALL = :
27877 -POST_INSTALL = :
27878 -NORMAL_UNINSTALL = :
27879 -PRE_UNINSTALL = :
27880 -POST_UNINSTALL = :
27881 -build_triplet = @build@
27882 -host_triplet = @host@
27883 -subdir = libvipsCC/include/vips
27884 -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
27885 - $(pkginclude_HEADERS)
27886 -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
27887 -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
27888 - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \
27889 - $(top_srcdir)/configure.ac
27890 -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
27891 - $(ACLOCAL_M4)
27892 -mkinstalldirs = $(install_sh) -d
27893 -CONFIG_HEADER = $(top_builddir)/config.h
27894 -CONFIG_CLEAN_FILES =
27895 -CONFIG_CLEAN_VPATH_FILES =
27896 -AM_V_P = $(am__v_P_@AM_V@)
27897 -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
27898 -am__v_P_0 = false
27899 -am__v_P_1 = :
27900 -AM_V_GEN = $(am__v_GEN_@AM_V@)
27901 -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
27902 -am__v_GEN_0 = @echo " GEN " $@;
27903 -am__v_GEN_1 =
27904 -AM_V_at = $(am__v_at_@AM_V@)
27905 -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
27906 -am__v_at_0 = @
27907 -am__v_at_1 =
27908 -SOURCES =
27909 -DIST_SOURCES =
27910 -am__can_run_installinfo = \
27911 - case $$AM_UPDATE_INFO_DIR in \
27912 - n|no|NO) false;; \
27913 - *) (install-info --version) >/dev/null 2>&1;; \
27914 - esac
27915 -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
27916 -am__vpath_adj = case $$p in \
27917 - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
27918 - *) f=$$p;; \
27919 - esac;
27920 -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
27921 -am__install_max = 40
27922 -am__nobase_strip_setup = \
27923 - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
27924 -am__nobase_strip = \
27925 - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
27926 -am__nobase_list = $(am__nobase_strip_setup); \
27927 - for p in $$list; do echo "$$p $$p"; done | \
27928 - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
27929 - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
27930 - if (++n[$$2] == $(am__install_max)) \
27931 - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
27932 - END { for (dir in files) print dir, files[dir] }'
27933 -am__base_list = \
27934 - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
27935 - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
27936 -am__uninstall_files_from_dir = { \
27937 - test -z "$$files" \
27938 - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
27939 - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
27940 - $(am__cd) "$$dir" && rm -f $$files; }; \
27941 - }
27942 -am__installdirs = "$(DESTDIR)$(pkgincludedir)"
27943 -HEADERS = $(pkginclude_HEADERS)
27944 -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
27945 -# Read a list of newline-separated strings from the standard input,
27946 -# and print each of them once, without duplicates. Input order is
27947 -# *not* preserved.
27948 -am__uniquify_input = $(AWK) '\
27949 - BEGIN { nonempty = 0; } \
27950 - { items[$$0] = 1; nonempty = 1; } \
27951 - END { if (nonempty) { for (i in items) print i; }; } \
27952 -'
27953 -# Make sure the list of sources is unique. This is necessary because,
27954 -# e.g., the same source file might be shared among _SOURCES variables
27955 -# for different programs/libraries.
27956 -am__define_uniq_tagged_files = \
27957 - list='$(am__tagged_files)'; \
27958 - unique=`for i in $$list; do \
27959 - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
27960 - done | $(am__uniquify_input)`
27961 -ETAGS = etags
27962 -CTAGS = ctags
27963 -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
27964 -ACLOCAL = @ACLOCAL@
27965 -AMTAR = @AMTAR@
27966 -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
27967 -AR = @AR@
27968 -AS = @AS@
27969 -AUTOCONF = @AUTOCONF@
27970 -AUTOHEADER = @AUTOHEADER@
27971 -AUTOMAKE = @AUTOMAKE@
27972 -AWK = @AWK@
27973 -CATALOGS = @CATALOGS@
27974 -CATOBJEXT = @CATOBJEXT@
27975 -CC = @CC@
27976 -CCDEPMODE = @CCDEPMODE@
27977 -CFITSIO_CFLAGS = @CFITSIO_CFLAGS@
27978 -CFITSIO_LIBS = @CFITSIO_LIBS@
27979 -CFLAGS = @CFLAGS@
27980 -CPP = @CPP@
27981 -CPPFLAGS = @CPPFLAGS@
27982 -CXX = @CXX@
27983 -CXXCPP = @CXXCPP@
27984 -CXXDEPMODE = @CXXDEPMODE@
27985 -CXXFLAGS = @CXXFLAGS@
27986 -CYGPATH_W = @CYGPATH_W@
27987 -DATADIRNAME = @DATADIRNAME@
27988 -DEFS = @DEFS@
27989 -DEPDIR = @DEPDIR@
27990 -DLLTOOL = @DLLTOOL@
27991 -DLLWRAP = @DLLWRAP@
27992 -DSYMUTIL = @DSYMUTIL@
27993 -DUMPBIN = @DUMPBIN@
27994 -ECHO_C = @ECHO_C@
27995 -ECHO_N = @ECHO_N@
27996 -ECHO_T = @ECHO_T@
27997 -EGREP = @EGREP@
27998 -EXEEXT = @EXEEXT@
27999 -EXIF_CFLAGS = @EXIF_CFLAGS@
28000 -EXIF_LIBS = @EXIF_LIBS@
28001 -FFTW_CFLAGS = @FFTW_CFLAGS@
28002 -FFTW_LIBS = @FFTW_LIBS@
28003 -FGREP = @FGREP@
28004 -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
28005 -GMOFILES = @GMOFILES@
28006 -GMSGFMT = @GMSGFMT@
28007 -GREP = @GREP@
28008 -GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
28009 -GTHREAD_LIBS = @GTHREAD_LIBS@
28010 -GTKDOC_CHECK = @GTKDOC_CHECK@
28011 -GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
28012 -GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
28013 -GTKDOC_MKPDF = @GTKDOC_MKPDF@
28014 -GTKDOC_REBASE = @GTKDOC_REBASE@
28015 -HTML_DIR = @HTML_DIR@
28016 -IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@
28017 -IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@
28018 -INSTALL = @INSTALL@
28019 -INSTALL_DATA = @INSTALL_DATA@
28020 -INSTALL_PROGRAM = @INSTALL_PROGRAM@
28021 -INSTALL_SCRIPT = @INSTALL_SCRIPT@
28022 -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
28023 -INSTOBJEXT = @INSTOBJEXT@
28024 -INTLLIBS = @INTLLIBS@
28025 -INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
28026 -INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
28027 -INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
28028 -INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
28029 -INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
28030 -INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
28031 -INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
28032 -INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
28033 -JPEG_INCLUDES = @JPEG_INCLUDES@
28034 -JPEG_LIBS = @JPEG_LIBS@
28035 -LCMS_CFLAGS = @LCMS_CFLAGS@
28036 -LCMS_LIBS = @LCMS_LIBS@
28037 -LD = @LD@
28038 -LDFLAGS = @LDFLAGS@
28039 -LIBOBJS = @LIBOBJS@
28040 -LIBRARY_AGE = @LIBRARY_AGE@
28041 -LIBRARY_CURRENT = @LIBRARY_CURRENT@
28042 -LIBRARY_REVISION = @LIBRARY_REVISION@
28043 -LIBS = @LIBS@
28044 -LIBTOOL = @LIBTOOL@
28045 -LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@
28046 -LIBWEBP_LIBS = @LIBWEBP_LIBS@
28047 -LIPO = @LIPO@
28048 -LN_S = @LN_S@
28049 -LTLIBOBJS = @LTLIBOBJS@
28050 -MAGICK_CFLAGS = @MAGICK_CFLAGS@
28051 -MAGICK_LIBS = @MAGICK_LIBS@
28052 -MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@
28053 -MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@
28054 -MAKEINFO = @MAKEINFO@
28055 -MANIFEST_TOOL = @MANIFEST_TOOL@
28056 -MATIO_CFLAGS = @MATIO_CFLAGS@
28057 -MATIO_LIBS = @MATIO_LIBS@
28058 -MKDIR_P = @MKDIR_P@
28059 -MKINSTALLDIRS = @MKINSTALLDIRS@
28060 -MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@
28061 -MONOTONIC_LIBS = @MONOTONIC_LIBS@
28062 -MSGFMT = @MSGFMT@
28063 -MSGFMT_OPTS = @MSGFMT_OPTS@
28064 -NM = @NM@
28065 -NMEDIT = @NMEDIT@
28066 -OBJDUMP = @OBJDUMP@
28067 -OBJEXT = @OBJEXT@
28068 -OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
28069 -OPENEXR_LIBS = @OPENEXR_LIBS@
28070 -OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@
28071 -OPENSLIDE_LIBS = @OPENSLIDE_LIBS@
28072 -ORC_CFLAGS = @ORC_CFLAGS@
28073 -ORC_LIBS = @ORC_LIBS@
28074 -OTOOL = @OTOOL@
28075 -OTOOL64 = @OTOOL64@
28076 -PACKAGE = @PACKAGE@
28077 -PACKAGES_USED = @PACKAGES_USED@
28078 -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
28079 -PACKAGE_NAME = @PACKAGE_NAME@
28080 -PACKAGE_STRING = @PACKAGE_STRING@
28081 -PACKAGE_TARNAME = @PACKAGE_TARNAME@
28082 -PACKAGE_URL = @PACKAGE_URL@
28083 -PACKAGE_VERSION = @PACKAGE_VERSION@
28084 -PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
28085 -PANGOFT2_LIBS = @PANGOFT2_LIBS@
28086 -PATH_SEPARATOR = @PATH_SEPARATOR@
28087 -PKG_CONFIG = @PKG_CONFIG@
28088 -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
28089 -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
28090 -PNG_CFLAGS = @PNG_CFLAGS@
28091 -PNG_INCLUDES = @PNG_INCLUDES@
28092 -PNG_LIBS = @PNG_LIBS@
28093 -POFILES = @POFILES@
28094 -POSUB = @POSUB@
28095 -PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
28096 -PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
28097 -PYTHON = @PYTHON@
28098 -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
28099 -PYTHON_INCLUDES = @PYTHON_INCLUDES@
28100 -PYTHON_PLATFORM = @PYTHON_PLATFORM@
28101 -PYTHON_PREFIX = @PYTHON_PREFIX@
28102 -PYTHON_VERSION = @PYTHON_VERSION@
28103 -RANLIB = @RANLIB@
28104 -REQUIRED_CFLAGS = @REQUIRED_CFLAGS@
28105 -REQUIRED_LIBS = @REQUIRED_LIBS@
28106 -SED = @SED@
28107 -SET_MAKE = @SET_MAKE@
28108 -SHELL = @SHELL@
28109 -STRIP = @STRIP@
28110 -THREADS_CFLAGS = @THREADS_CFLAGS@
28111 -THREADS_LIBS = @THREADS_LIBS@
28112 -TIFF_CFLAGS = @TIFF_CFLAGS@
28113 -TIFF_INCLUDES = @TIFF_INCLUDES@
28114 -TIFF_LIBS = @TIFF_LIBS@
28115 -TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@
28116 -TYPE_INIT_LIBS = @TYPE_INIT_LIBS@
28117 -USE_NLS = @USE_NLS@
28118 -VERSION = @VERSION@
28119 -VIPS_CFLAGS = @VIPS_CFLAGS@
28120 -VIPS_CXX_LIBS = @VIPS_CXX_LIBS@
28121 -VIPS_EXEEXT = @VIPS_EXEEXT@
28122 -VIPS_INCLUDES = @VIPS_INCLUDES@
28123 -VIPS_LIBDIR = @VIPS_LIBDIR@
28124 -VIPS_LIBS = @VIPS_LIBS@
28125 -VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@
28126 -VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@
28127 -VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@
28128 -VIPS_VERSION = @VIPS_VERSION@
28129 -VIPS_VERSION_STRING = @VIPS_VERSION_STRING@
28130 -XGETTEXT = @XGETTEXT@
28131 -XMKMF = @XMKMF@
28132 -X_CFLAGS = @X_CFLAGS@
28133 -X_EXTRA_LIBS = @X_EXTRA_LIBS@
28134 -X_LIBS = @X_LIBS@
28135 -X_PRE_LIBS = @X_PRE_LIBS@
28136 -ZIP_INCLUDES = @ZIP_INCLUDES@
28137 -ZIP_LIBS = @ZIP_LIBS@
28138 -abs_builddir = @abs_builddir@
28139 -abs_srcdir = @abs_srcdir@
28140 -abs_top_builddir = @abs_top_builddir@
28141 -abs_top_srcdir = @abs_top_srcdir@
28142 -ac_ct_AR = @ac_ct_AR@
28143 -ac_ct_CC = @ac_ct_CC@
28144 -ac_ct_CXX = @ac_ct_CXX@
28145 -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
28146 -am__include = @am__include@
28147 -am__leading_dot = @am__leading_dot@
28148 -am__quote = @am__quote@
28149 -am__tar = @am__tar@
28150 -am__untar = @am__untar@
28151 -bindir = @bindir@
28152 -build = @build@
28153 -build_alias = @build_alias@
28154 -build_cpu = @build_cpu@
28155 -build_os = @build_os@
28156 -build_vendor = @build_vendor@
28157 -builddir = @builddir@
28158 -datadir = @datadir@
28159 -datarootdir = @datarootdir@
28160 -docdir = @docdir@
28161 -dvidir = @dvidir@
28162 -exec_prefix = @exec_prefix@
28163 -host = @host@
28164 -host_alias = @host_alias@
28165 -host_cpu = @host_cpu@
28166 -host_os = @host_os@
28167 -host_vendor = @host_vendor@
28168 -htmldir = @htmldir@
28169 -includedir = @includedir@
28170 -infodir = @infodir@
28171 -install_sh = @install_sh@
28172 -libdir = @libdir@
28173 -libexecdir = @libexecdir@
28174 -localedir = @localedir@
28175 -localstatedir = @localstatedir@
28176 -mandir = @mandir@
28177 -mkdir_p = @mkdir_p@
28178 -oldincludedir = @oldincludedir@
28179 -pdfdir = @pdfdir@
28180 -pkgpyexecdir = @pkgpyexecdir@
28181 -pkgpythondir = @pkgpythondir@
28182 -prefix = @prefix@
28183 -program_transform_name = @program_transform_name@
28184 -psdir = @psdir@
28185 -pyexecdir = @pyexecdir@
28186 -pythondir = @pythondir@
28187 -sbindir = @sbindir@
28188 -sharedstatedir = @sharedstatedir@
28189 -srcdir = @srcdir@
28190 -sysconfdir = @sysconfdir@
28191 -target_alias = @target_alias@
28192 -top_build_prefix = @top_build_prefix@
28193 -top_builddir = @top_builddir@
28194 -top_srcdir = @top_srcdir@
28195 -vips_introspection_sources = @vips_introspection_sources@
28196 -pkginclude_HEADERS = \
28197 - VDisplay.h \
28198 - VError.h \
28199 - VImage.h \
28200 - VMask.h \
28201 - vipscpp.h \
28202 - vips \
28203 - vipsc++.h
28204 -
28205 -all: all-am
28206 -
28207 -.SUFFIXES:
28208 -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
28209 - @for dep in $?; do \
28210 - case '$(am__configure_deps)' in \
28211 - *$$dep*) \
28212 - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
28213 - && { if test -f $@; then exit 0; else break; fi; }; \
28214 - exit 1;; \
28215 - esac; \
28216 - done; \
28217 - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvipsCC/include/vips/Makefile'; \
28218 - $(am__cd) $(top_srcdir) && \
28219 - $(AUTOMAKE) --foreign libvipsCC/include/vips/Makefile
28220 -.PRECIOUS: Makefile
28221 -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
28222 - @case '$?' in \
28223 - *config.status*) \
28224 - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
28225 - *) \
28226 - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
28227 - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
28228 - esac;
28229 -
28230 -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
28231 - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
28232 -
28233 -$(top_srcdir)/configure: $(am__configure_deps)
28234 - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
28235 -$(ACLOCAL_M4): $(am__aclocal_m4_deps)
28236 - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
28237 -$(am__aclocal_m4_deps):
28238 -
28239 -mostlyclean-libtool:
28240 - -rm -f *.lo
28241 -
28242 -clean-libtool:
28243 - -rm -rf .libs _libs
28244 -install-pkgincludeHEADERS: $(pkginclude_HEADERS)
28245 - @$(NORMAL_INSTALL)
28246 - @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
28247 - if test -n "$$list"; then \
28248 - echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \
28249 - $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \
28250 - fi; \
28251 - for p in $$list; do \
28252 - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
28253 - echo "$$d$$p"; \
28254 - done | $(am__base_list) | \
28255 - while read files; do \
28256 - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \
28257 - $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \
28258 - done
28259 -
28260 -uninstall-pkgincludeHEADERS:
28261 - @$(NORMAL_UNINSTALL)
28262 - @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
28263 - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
28264 - dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir)
28265 -
28266 -ID: $(am__tagged_files)
28267 - $(am__define_uniq_tagged_files); mkid -fID $$unique
28268 -tags: tags-am
28269 -TAGS: tags
28270 -
28271 -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
28272 - set x; \
28273 - here=`pwd`; \
28274 - $(am__define_uniq_tagged_files); \
28275 - shift; \
28276 - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
28277 - test -n "$$unique" || unique=$$empty_fix; \
28278 - if test $$# -gt 0; then \
28279 - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
28280 - "$$@" $$unique; \
28281 - else \
28282 - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
28283 - $$unique; \
28284 - fi; \
28285 - fi
28286 -ctags: ctags-am
28287 -
28288 -CTAGS: ctags
28289 -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
28290 - $(am__define_uniq_tagged_files); \
28291 - test -z "$(CTAGS_ARGS)$$unique" \
28292 - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
28293 - $$unique
28294 -
28295 -GTAGS:
28296 - here=`$(am__cd) $(top_builddir) && pwd` \
28297 - && $(am__cd) $(top_srcdir) \
28298 - && gtags -i $(GTAGS_ARGS) "$$here"
28299 -cscopelist: cscopelist-am
28300 -
28301 -cscopelist-am: $(am__tagged_files)
28302 - list='$(am__tagged_files)'; \
28303 - case "$(srcdir)" in \
28304 - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
28305 - *) sdir=$(subdir)/$(srcdir) ;; \
28306 - esac; \
28307 - for i in $$list; do \
28308 - if test -f "$$i"; then \
28309 - echo "$(subdir)/$$i"; \
28310 - else \
28311 - echo "$$sdir/$$i"; \
28312 - fi; \
28313 - done >> $(top_builddir)/cscope.files
28314 -
28315 -distclean-tags:
28316 - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
28317 -
28318 -distdir: $(DISTFILES)
28319 - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
28320 - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
28321 - list='$(DISTFILES)'; \
28322 - dist_files=`for file in $$list; do echo $$file; done | \
28323 - sed -e "s|^$$srcdirstrip/||;t" \
28324 - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
28325 - case $$dist_files in \
28326 - */*) $(MKDIR_P) `echo "$$dist_files" | \
28327 - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
28328 - sort -u` ;; \
28329 - esac; \
28330 - for file in $$dist_files; do \
28331 - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
28332 - if test -d $$d/$$file; then \
28333 - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
28334 - if test -d "$(distdir)/$$file"; then \
28335 - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
28336 - fi; \
28337 - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
28338 - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
28339 - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
28340 - fi; \
28341 - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
28342 - else \
28343 - test -f "$(distdir)/$$file" \
28344 - || cp -p $$d/$$file "$(distdir)/$$file" \
28345 - || exit 1; \
28346 - fi; \
28347 - done
28348 -check-am: all-am
28349 -check: check-am
28350 -all-am: Makefile $(HEADERS)
28351 -installdirs:
28352 - for dir in "$(DESTDIR)$(pkgincludedir)"; do \
28353 - test -z "$$dir" || $(MKDIR_P) "$$dir"; \
28354 - done
28355 -install: install-am
28356 -install-exec: install-exec-am
28357 -install-data: install-data-am
28358 -uninstall: uninstall-am
28359 -
28360 -install-am: all-am
28361 - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
28362 -
28363 -installcheck: installcheck-am
28364 -install-strip:
28365 - if test -z '$(STRIP)'; then \
28366 - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
28367 - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
28368 - install; \
28369 - else \
28370 - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
28371 - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
28372 - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
28373 - fi
28374 -mostlyclean-generic:
28375 -
28376 -clean-generic:
28377 -
28378 -distclean-generic:
28379 - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
28380 - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
28381 -
28382 -maintainer-clean-generic:
28383 - @echo "This command is intended for maintainers to use"
28384 - @echo "it deletes files that may require special tools to rebuild."
28385 -clean: clean-am
28386 -
28387 -clean-am: clean-generic clean-libtool mostlyclean-am
28388 -
28389 -distclean: distclean-am
28390 - -rm -f Makefile
28391 -distclean-am: clean-am distclean-generic distclean-tags
28392 -
28393 -dvi: dvi-am
28394 -
28395 -dvi-am:
28396 -
28397 -html: html-am
28398 -
28399 -html-am:
28400 -
28401 -info: info-am
28402 -
28403 -info-am:
28404 -
28405 -install-data-am: install-pkgincludeHEADERS
28406 -
28407 -install-dvi: install-dvi-am
28408 -
28409 -install-dvi-am:
28410 -
28411 -install-exec-am:
28412 -
28413 -install-html: install-html-am
28414 -
28415 -install-html-am:
28416 -
28417 -install-info: install-info-am
28418 -
28419 -install-info-am:
28420 -
28421 -install-man:
28422 -
28423 -install-pdf: install-pdf-am
28424 -
28425 -install-pdf-am:
28426 -
28427 -install-ps: install-ps-am
28428 -
28429 -install-ps-am:
28430 -
28431 -installcheck-am:
28432 -
28433 -maintainer-clean: maintainer-clean-am
28434 - -rm -f Makefile
28435 -maintainer-clean-am: distclean-am maintainer-clean-generic
28436 -
28437 -mostlyclean: mostlyclean-am
28438 -
28439 -mostlyclean-am: mostlyclean-generic mostlyclean-libtool
28440 -
28441 -pdf: pdf-am
28442 -
28443 -pdf-am:
28444 -
28445 -ps: ps-am
28446 -
28447 -ps-am:
28448 -
28449 -uninstall-am: uninstall-pkgincludeHEADERS
28450 -
28451 -.MAKE: install-am install-strip
28452 -
28453 -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
28454 - clean-libtool cscopelist-am ctags ctags-am distclean \
28455 - distclean-generic distclean-libtool distclean-tags distdir dvi \
28456 - dvi-am html html-am info info-am install install-am \
28457 - install-data install-data-am install-dvi install-dvi-am \
28458 - install-exec install-exec-am install-html install-html-am \
28459 - install-info install-info-am install-man install-pdf \
28460 - install-pdf-am install-pkgincludeHEADERS install-ps \
28461 - install-ps-am install-strip installcheck installcheck-am \
28462 - installdirs maintainer-clean maintainer-clean-generic \
28463 - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
28464 - ps ps-am tags tags-am uninstall uninstall-am \
28465 - uninstall-pkgincludeHEADERS
28466 -
28467 -
28468 -# swap the 'awk' line for this:
28469 -# awk '{if($$1!="deprecated") print $$1}'` ; \
28470 -# to not generate the wrappers for deprecated functions
28471 -vipsc++.h:
28472 - packages=`vips list packages | \
28473 - awk '{print $$1}'` ; \
28474 - echo > vipsc++.h ; \
28475 - for name in $$packages; do \
28476 - echo "// headers for package $$name" >> vipsc++.h ; \
28477 - vips cpph $$name >> vipsc++.h ; \
28478 - echo >> vipsc++.h ; \
28479 - done
28480 -
28481 -# Tell versions [3.59,3.63) of GNU make to not export all variables.
28482 -# Otherwise a system limit (for SysV at least) may be exceeded.
28483 -.NOEXPORT:
28484 diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/vips/VDisplay.h vips-7.38.5/libvipsCC/include/vips/VDisplay.h
28485 --- vips-7.38.5-vanilla/libvipsCC/include/vips/VDisplay.h 2014-07-17 23:48:36.237794473 -0400
28486 +++ vips-7.38.5/libvipsCC/include/vips/VDisplay.h 1969-12-31 19:00:00.000000000 -0500
28487 @@ -1,114 +0,0 @@
28488 -/* VIPS display class.
28489 - *
28490 - * Hide details of im_col_display API.
28491 - */
28492 -
28493 -/*
28494 -
28495 - This file is part of VIPS.
28496 -
28497 - VIPS is free software; you can redistribute it and/or modify
28498 - it under the terms of the GNU Lesser General Public License as published by
28499 - the Free Software Foundation; either version 2 of the License, or
28500 - (at your option) any later version.
28501 -
28502 - This program is distributed in the hope that it will be useful,
28503 - but WITHOUT ANY WARRANTY; without even the implied warranty of
28504 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28505 - GNU Lesser General Public License for more details.
28506 -
28507 - You should have received a copy of the GNU Lesser General Public License
28508 - along with this program; if not, write to the Free Software
28509 - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
28510 - 02110-1301 USA
28511 -
28512 - */
28513 -
28514 -/*
28515 -
28516 - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
28517 -
28518 - */
28519 -
28520 -#ifndef IM_VDISPLAY_H
28521 -#define IM_VDISPLAY_H
28522 -
28523 -/* SWIG includes this file directly rather than going through vipscpp.h ... so
28524 - * we have to define these macros here as well.
28525 - */
28526 -#ifdef SWIG
28527 -#define VIPS_NAMESPACE_START namespace vips {
28528 -#define VIPS_NAMESPACE_END }
28529 -#endif /*SWIG*/
28530 -
28531 -/* Wrap pointers to these, but we don't want to import all the old C API. Just
28532 - * declare them.
28533 - */
28534 -extern "C" {
28535 - struct im_col_display;
28536 - struct im_col_tab_disp;
28537 -}
28538 -
28539 -VIPS_NAMESPACE_START
28540 -
28541 -// Wrapper over im_col_display with ref counting
28542 -class VDisplay {
28543 - struct refblock {
28544 - im_col_display *disp; // im_col_display struct
28545 - im_col_tab_disp *luts; // luts built from this display
28546 - int priv; // disp is ours, or system
28547 - int nrefs; // Refs to us
28548 -
28549 - // Invalidate lut
28550 - void cleanlut();
28551 -
28552 - // Break attached stuff
28553 - void cleanref();
28554 -
28555 - // Get ready to write
28556 - void wready() throw( VError );
28557 -
28558 - // Check that luts are up-to-date
28559 - void cluts() throw( VError );
28560 -
28561 - refblock() : disp(0), luts(0), priv(0), nrefs(1) {}
28562 - ~refblock() { cleanref(); }
28563 - };
28564 -
28565 - refblock *ref;
28566 -
28567 -public:
28568 - enum VDisplayType {
28569 - BARCO, // Does many corrections for us
28570 - DUMB // Needs many corrections
28571 - };
28572 -
28573 - // Get named display
28574 - VDisplay( const char *name ) throw( VError );
28575 -
28576 - // Get default display
28577 - VDisplay();
28578 -
28579 - // Copy constructor
28580 - VDisplay( const VDisplay &a ) { ref = a.ref; ref->nrefs++; }
28581 -
28582 - // Assignment
28583 - VDisplay &operator=( const VDisplay &a );
28584 -
28585 - // Destructor
28586 - virtual ~VDisplay();
28587 -
28588 - // The matrix type we use
28589 - typedef float matrix[3][3];
28590 -
28591 - // Extract display pointer
28592 - void *disp() const { return( ref->disp ); }
28593 -
28594 - // Extract luts pointer, rebuilding luts if necessary
28595 - im_col_tab_disp *luts() const throw( VError )
28596 - { ref->cluts(); return( ref->luts ); }
28597 -};
28598 -
28599 -VIPS_NAMESPACE_END
28600 -
28601 -#endif /*IM_VDISPLAY_H*/
28602 diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/vips/VError.h vips-7.38.5/libvipsCC/include/vips/VError.h
28603 --- vips-7.38.5-vanilla/libvipsCC/include/vips/VError.h 2014-07-17 23:48:36.237794473 -0400
28604 +++ vips-7.38.5/libvipsCC/include/vips/VError.h 1969-12-31 19:00:00.000000000 -0500
28605 @@ -1,83 +0,0 @@
28606 -// Header for error type
28607 -
28608 -/*
28609 -
28610 - This file is part of VIPS.
28611 -
28612 - VIPS is free software; you can redistribute it and/or modify
28613 - it under the terms of the GNU Lesser General Public License as published by
28614 - the Free Software Foundation; either version 2 of the License, or
28615 - (at your option) any later version.
28616 -
28617 - This program is distributed in the hope that it will be useful,
28618 - but WITHOUT ANY WARRANTY; without even the implied warranty of
28619 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28620 - GNU Lesser General Public License for more details.
28621 -
28622 - You should have received a copy of the GNU Lesser General Public License
28623 - along with this program; if not, write to the Free Software
28624 - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
28625 - 02110-1301 USA
28626 -
28627 - */
28628 -
28629 -/*
28630 -
28631 - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
28632 -
28633 - */
28634 -
28635 -#ifndef IM_VERROR_H
28636 -#define IM_VERROR_H
28637 -
28638 -/* SWIG includes this file directly rather than going through vipscpp.h ... so
28639 - * we have to define these macros here as well.
28640 - */
28641 -#ifdef SWIG
28642 -#define VIPS_NAMESPACE_START namespace vips {
28643 -#define VIPS_NAMESPACE_END }
28644 -#endif /*SWIG*/
28645 -
28646 -/* Don't include these when parsing for SWIG.
28647 - */
28648 -#ifndef SWIG
28649 -# include <string>
28650 -# include <iosfwd>
28651 -# include <exception>
28652 -#endif /*!SWIG*/
28653 -
28654 -VIPS_NAMESPACE_START
28655 -
28656 -// Error type
28657 -class VError : public std::exception {
28658 - std::string _what;
28659 -
28660 -public:
28661 - VError( std::string what ) : _what( what ) {}
28662 - VError() {}
28663 - virtual ~VError() throw() {}
28664 -
28665 - // Print message and exit
28666 - void perror( const char * );
28667 - void perror();
28668 -
28669 - // Append some more text to the message
28670 - VError &app( std::string txt );
28671 - VError &app( const int i );
28672 -
28673 - // Extract string
28674 - virtual const char *what() const throw() { return _what.c_str(); }
28675 - void ostream_print( std::ostream & ) const;
28676 -};
28677 -
28678 -inline std::ostream &operator<<( std::ostream &file, const VError &err )
28679 -{
28680 - err.ostream_print( file );
28681 - return( file );
28682 -}
28683 -
28684 -void verror( std::string str = "" ) throw( VError );
28685 -
28686 -VIPS_NAMESPACE_END
28687 -
28688 -#endif /*IM_VERROR_H*/
28689 diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/vips/VImage.h vips-7.38.5/libvipsCC/include/vips/VImage.h
28690 --- vips-7.38.5-vanilla/libvipsCC/include/vips/VImage.h 2014-07-17 23:48:36.237794473 -0400
28691 +++ vips-7.38.5/libvipsCC/include/vips/VImage.h 1969-12-31 19:00:00.000000000 -0500
28692 @@ -1,457 +0,0 @@
28693 -// VIPS image wrapper
28694 -
28695 -/*
28696 -
28697 - This file is part of VIPS.
28698 -
28699 - VIPS is free software; you can redistribute it and/or modify
28700 - it under the terms of the GNU Lesser General Public License as published by
28701 - the Free Software Foundation; either version 2 of the License, or
28702 - (at your option) any later version.
28703 -
28704 - This program is distributed in the hope that it will be useful,
28705 - but WITHOUT ANY WARRANTY; without even the implied warranty of
28706 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28707 - GNU Lesser General Public License for more details.
28708 -
28709 - You should have received a copy of the GNU Lesser General Public License
28710 - along with this program; if not, write to the Free Software
28711 - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
28712 - 02110-1301 USA
28713 -
28714 - */
28715 -
28716 -/*
28717 -
28718 - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
28719 -
28720 - */
28721 -
28722 -#ifndef IM_VIMAGE_H
28723 -#define IM_VIMAGE_H
28724 -
28725 -/* SWIG includes this file directly rather than going through vipscpp.h ... so
28726 - * we have to define these macros here as well.
28727 - */
28728 -#ifdef SWIG
28729 -# define VIPS_NAMESPACE_START namespace vips {
28730 -# define VIPS_NAMESPACE_END }
28731 -#endif /*SWIG*/
28732 -
28733 -/* Don't include these when parsing for SWIG.
28734 - */
28735 -#ifndef SWIG
28736 -# include <list>
28737 -# include <complex>
28738 -# include <vector>
28739 -#endif /*!SWIG*/
28740 -
28741 -/* Wrap pointers to these, but we don't want to import all the old C API. Just
28742 - * declare them.
28743 - */
28744 -extern "C" {
28745 - struct _VipsImage;
28746 -
28747 - /* Needed by Vargv, see below.
28748 - */
28749 - struct im__function;
28750 - typedef void *im__object;
28751 -}
28752 -
28753 -VIPS_NAMESPACE_START
28754 -
28755 -/* vips_init() and vips_shutdown as namespaced C++ functions.
28756 - */
28757 -bool init( const char *argv0 = "nothing" );
28758 -void shutdown( void );
28759 -
28760 -/* A VIPS callback, our name for im_callback_fn.
28761 - */
28762 -typedef int (*VCallback)( void *, void * );
28763 -
28764 -/* VIPS image class.
28765 - *
28766 - * Slightly tricky: we have two sorts of sharing. Several VImage can share one
28767 - * refblock (while results are being returned from functions, for example),
28768 - * and several other refblocks can have IMAGEs which depend upon this IMAGE
28769 - * for their result.
28770 - */
28771 -class VImage {
28772 - /* We'd like this to be protected so that user subclasses can define
28773 - * their own member wrappers. But sadly C++ doesn't work like that:
28774 - * subclasses of VImage can only refer to protected members via
28775 - * this->, which isn't what we need. Just make it public and hope no
28776 - * one touches it.
28777 - */
28778 -public:
28779 -/* Doesn't need to be wrapped.
28780 - */
28781 -#ifndef SWIG
28782 - // Count ref etc. in one of these. One for each open VIPS image.
28783 - struct refblock {
28784 - _VipsImage *im; // IMAGE pointer
28785 - int close_on_delete; // Set if we must im_close()
28786 - int nrefs; // Number of refs to us
28787 - std::list<refblock*> orefs; // Refs im makes
28788 -
28789 - // Construct/destruct
28790 - refblock();
28791 - virtual ~refblock() throw( VError );
28792 -
28793 - // Add a ref - this (output image) depends upon IMAGE in
28794 - void addref( refblock *in ) throw( VError );
28795 -
28796 - // Remove a ref
28797 - void removeref() throw( VError );
28798 -
28799 - // Debugging
28800 - void debug_print();
28801 -
28802 - // Linked list needs "==" -- use address equivalence
28803 - friend int operator==( const refblock &left,
28804 - const refblock &right ) { return( &left == &right ); }
28805 - };
28806 -
28807 - refblock *_ref;
28808 -#endif /*!SWIG*/
28809 -
28810 -public:
28811 -#ifdef DEBUG
28812 - /* All the refblocks in the world.
28813 - */
28814 - static std::list<refblock*> all_refblock;
28815 -#endif /*DEBUG*/
28816 -
28817 - /* Print all refblocks ... debugging. Compile with DEBUG to enable
28818 - * this.
28819 - */
28820 - static void print_all();
28821 -
28822 - /* Typedefs and enums we need.
28823 - */
28824 -
28825 - // Type type
28826 - enum TType {
28827 - MULTIBAND = 0,
28828 - B_W = 1,
28829 - LUMINACE = 2,
28830 - XRAY = 3,
28831 - IR = 4,
28832 - YUV = 5,
28833 - RED_ONLY = 6,
28834 - GREEN_ONLY = 7,
28835 - BLUE_ONLY = 8,
28836 - POWER_SPECTRUM = 9,
28837 - HISTOGRAM = 10,
28838 - LUT = 11,
28839 - XYZ = 12,
28840 - LAB = 13,
28841 - CMC = 14,
28842 - CMYK = 15,
28843 - LABQ = 16,
28844 - RGB = 17,
28845 - UCS = 18,
28846 - LCH = 19,
28847 - LABS = 21,
28848 - sRGB = 22,
28849 - YXY = 23,
28850 - FOURIER = 24,
28851 - RGB16 = 25,
28852 - GREY16 = 26
28853 - };
28854 -
28855 - // Format type
28856 - enum TBandFmt {
28857 - FMTNOTSET = -1,
28858 - FMTUCHAR = 0,
28859 - FMTCHAR = 1,
28860 - FMTUSHORT = 2,
28861 - FMTSHORT = 3,
28862 - FMTUINT = 4,
28863 - FMTINT = 5,
28864 - FMTFLOAT = 6,
28865 - FMTCOMPLEX = 7,
28866 - FMTDOUBLE = 8,
28867 - FMTDPCOMPLEX = 9
28868 - };
28869 -
28870 - // Coding type
28871 - enum TCoding {
28872 - NOCODING = 0,
28873 - COLQUANT = 1,
28874 - LABPACK = 2,
28875 - LABPACK_COMPRESSED = 3,
28876 - RGB_COMPRESSED = 4,
28877 - LUM_COMPRESSED = 5,
28878 - RAD = 6
28879 - };
28880 -
28881 - // Compression type
28882 - enum TCompression {
28883 - NO_COMPRESSION = 0,
28884 - TCSF_COMPRESSION = 1,
28885 - JPEG_COMPRESSION = 2
28886 - };
28887 -
28888 - /* Start of wrappers for iofuncs.
28889 - */
28890 -
28891 - // Plain constructors
28892 - VImage( const char *name, const char *mode = "rd" ) throw( VError );
28893 - VImage( void *data, int width, int height,
28894 - int bands, TBandFmt format ) throw( VError );
28895 - VImage( _VipsImage *image );
28896 - VImage() throw( VError );
28897 -
28898 - // Convert to a disc file, eg:
28899 - // VImage fred = VImage::convert2disc( "im_jpeg2vips",
28900 - // "file.jpg", "temp.v" );
28901 - // Runs im_jpeg2vips to the temp file, then opens that and returns
28902 - // it. Useful for opening very large files without using a lot of RAM.
28903 - // Now superseded by the format API, though that's not yet wrapped in
28904 - // C++
28905 - // Also replaced by the new default "rd" mode
28906 - static VImage convert2disc( const char* convert,
28907 - const char* in, const char* disc ) throw( VError );
28908 -
28909 - // Copy constructor
28910 - VImage( const VImage &a );
28911 -
28912 - // Assignment - delete old ref
28913 - VImage &operator=( const VImage &a ) throw( VError );
28914 -
28915 - // Destructor
28916 - virtual ~VImage() throw( VError ) { _ref->removeref(); }
28917 -
28918 - // Extract underlying IMAGE* pointer
28919 - _VipsImage *image() const { return( _ref->im ); }
28920 -
28921 - // Extract underlying data pointer
28922 - void *data() const throw( VError );
28923 -
28924 - // Write this to another VImage, to a file, or to a mem buffer
28925 - VImage write( VImage out ) throw( VError );
28926 - VImage write( const char *name ) throw( VError );
28927 - VImage write() throw( VError );
28928 -
28929 - // Debugging ... print header fields
28930 - void debug_print();
28931 -
28932 - // Projection functions to get header fields
28933 - int Xsize();
28934 - int Ysize();
28935 - int Bands();
28936 - TBandFmt BandFmt();
28937 - TCoding Coding();
28938 - TType Type();
28939 - float Xres();
28940 - float Yres();
28941 - int Length();
28942 - TCompression Compression();
28943 - short Level();
28944 - int Xoffset();
28945 - int Yoffset();
28946 -
28947 - // Derived fields
28948 - const char *filename();
28949 - const char *Hist();
28950 -
28951 - // metadata
28952 -#ifndef SWIG
28953 - // base functionality
28954 - // we don't wrap GValue, so we can't wrap these for now
28955 - void meta_set( const char *field, GValue *value ) throw( VError );
28956 - void meta_get( const char *field, GValue *value_copy ) throw( VError );
28957 -#endif /*SWIG*/
28958 -
28959 - // We can wrap these, fwiw
28960 - gboolean meta_remove( const char *field );
28961 - GType meta_get_typeof( const char *field );
28962 -
28963 - // convenience functions
28964 - int meta_get_int( const char *field ) throw( VError );
28965 - double meta_get_double( const char *field ) throw( VError );
28966 - const char *meta_get_string( const char *field ) throw( VError );
28967 - void *meta_get_area( const char *field ) throw( VError );
28968 - void *meta_get_blob( const char *field, size_t *length )
28969 - throw( VError );
28970 -
28971 - void meta_set( const char *field, int value ) throw( VError );
28972 - void meta_set( const char *field, double value ) throw( VError );
28973 - void meta_set( const char *field, const char *value ) throw( VError );
28974 -
28975 -#ifndef SWIG
28976 - // we don't wrap callbacks yet, so we can't wrap these for now
28977 - void meta_set( const char *field,
28978 - VCallback free_fn, void *value )
28979 - throw( VError );
28980 - void meta_set( const char *field,
28981 - VCallback free_fn, void *value, size_t length )
28982 - throw( VError );
28983 -#endif /*SWIG*/
28984 -
28985 - // Set header fields
28986 - void initdesc( int, int, int, TBandFmt, TCoding, TType,
28987 - float = 1.0, float = 1.0, int = 0, int = 0 ) throw( VError );
28988 -
28989 - /* Insert automatically generated headers.
28990 - */
28991 -#include "vipsc++.h"
28992 -
28993 -/* No point getting SWIG to wrap these ... we do this by hand later so we can
28994 - * handle things like "a + 12" correctly.
28995 - */
28996 -#ifndef SWIG
28997 - // And some in-line operator equivalences done by hand
28998 - friend VImage operator+( VImage a, VImage b ) throw( VError )
28999 - { return( a.add( b ) ); }
29000 - friend VImage operator+( double a, VImage b ) throw( VError )
29001 - { return( b.lin( 1.0, a ) ); }
29002 - friend VImage operator+( VImage a, double b ) throw( VError )
29003 - { return( a.lin( 1.0, b ) ); }
29004 -
29005 - friend VImage operator-( VImage a, VImage b ) throw( VError )
29006 - { return( a.subtract( b ) ); }
29007 - friend VImage operator-( double a, VImage b ) throw( VError )
29008 - { return( b.lin( -1.0, a ) ); }
29009 - friend VImage operator-( VImage a, double b ) throw( VError )
29010 - { return( a.lin( 1.0, -b ) ); }
29011 -
29012 - friend VImage operator*( VImage a, VImage b ) throw( VError )
29013 - { return( a.multiply( b ) ); }
29014 - friend VImage operator*( double a, VImage b ) throw( VError )
29015 - { return( b.lin( a, 0.0 ) ); }
29016 - friend VImage operator*( VImage a, double b ) throw( VError )
29017 - { return( a.lin( b, 0.0 ) ); }
29018 -
29019 - friend VImage operator/( VImage a, VImage b ) throw( VError )
29020 - { return( a.divide( b ) ); }
29021 - friend VImage operator/( double a, VImage b ) throw( VError )
29022 - { return( b.pow( -1.0 ).lin( a, 0.0 ) ); }
29023 - friend VImage operator/( VImage a, double b ) throw( VError )
29024 - { return( a.lin( 1.0/b, 0.0 ) ); }
29025 -
29026 - friend VImage operator%( VImage a, VImage b ) throw( VError )
29027 - { return( a.remainder( b ) ); }
29028 - friend VImage operator%( VImage a, double b ) throw( VError )
29029 - { return( a.remainder( b ) ); }
29030 -
29031 - friend VImage operator<( VImage a, VImage b ) throw( VError )
29032 - { return( a.less( b ) ); }
29033 - friend VImage operator<( double a, VImage b ) throw( VError )
29034 - { return( b.more( a ) ); }
29035 - friend VImage operator<( VImage a, double b ) throw( VError )
29036 - { return( a.less( b ) ); }
29037 -
29038 - friend VImage operator<=( VImage a, VImage b ) throw( VError )
29039 - { return( a.lesseq( b ) ); }
29040 - friend VImage operator<=( double a, VImage b ) throw( VError )
29041 - { return( b.moreeq( a ) ); }
29042 - friend VImage operator<=( VImage a, double b ) throw( VError )
29043 - { return( a.lesseq( b ) ); }
29044 -
29045 - friend VImage operator>( VImage a, VImage b ) throw( VError )
29046 - { return( a.more( b ) ); }
29047 - friend VImage operator>( double a, VImage b ) throw( VError )
29048 - { return( b.less( a ) ); }
29049 - friend VImage operator>( VImage a, double b ) throw( VError )
29050 - { return( a.more( b ) ); }
29051 -
29052 - friend VImage operator>=( VImage a, VImage b ) throw( VError )
29053 - { return( a.moreeq( b ) ); }
29054 - friend VImage operator>=( double a, VImage b ) throw( VError )
29055 - { return( b.lesseq( a ) ); }
29056 - friend VImage operator>=( VImage a, double b ) throw( VError )
29057 - { return( a.moreeq( b ) ); }
29058 -
29059 - friend VImage operator==( VImage a, VImage b ) throw( VError )
29060 - { return( a.equal( b ) ); }
29061 - friend VImage operator==( double a, VImage b ) throw( VError )
29062 - { return( b.equal( a ) ); }
29063 - friend VImage operator==( VImage a, double b ) throw( VError )
29064 - { return( a.equal( b ) ); }
29065 -
29066 - friend VImage operator!=( VImage a, VImage b ) throw( VError )
29067 - { return( a.notequal( b ) ); }
29068 - friend VImage operator!=( double a, VImage b ) throw( VError )
29069 - { return( b.notequal( a ) ); }
29070 - friend VImage operator!=( VImage a, double b ) throw( VError )
29071 - { return( a.notequal( b ) ); }
29072 -
29073 - friend VImage operator&( VImage a, VImage b ) throw( VError )
29074 - { return( a.andimage( b ) ); }
29075 - friend VImage operator&( int a, VImage b ) throw( VError )
29076 - { return( b.andimage( a ) ); }
29077 - friend VImage operator&( VImage a, int b ) throw( VError )
29078 - { return( a.andimage( b ) ); }
29079 -
29080 - friend VImage operator|( VImage a, VImage b ) throw( VError )
29081 - { return( a.orimage( b ) ); }
29082 - friend VImage operator|( int a, VImage b ) throw( VError )
29083 - { return( b.orimage( a ) ); }
29084 - friend VImage operator|( VImage a, int b ) throw( VError )
29085 - { return( a.orimage( b ) ); }
29086 -
29087 - friend VImage operator^( VImage a, VImage b ) throw( VError )
29088 - { return( a.eorimage( b ) ); }
29089 - friend VImage operator^( int a, VImage b ) throw( VError )
29090 - { return( b.eorimage( a ) ); }
29091 - friend VImage operator^( VImage a, int b ) throw( VError )
29092 - { return( a.eorimage( b ) ); }
29093 -
29094 - friend VImage operator<<( VImage a, int b ) throw( VError )
29095 - { return( a.shiftleft( b ) ); }
29096 - friend VImage operator>>( VImage a, int b ) throw( VError )
29097 - { return( a.shiftright( b ) ); }
29098 -
29099 - friend VImage operator-( VImage a ) throw( VError )
29100 - { return( a * -1 ); }
29101 -
29102 - // Type conversion: VImage to VDMask and VIMask
29103 - operator VDMask() throw( VError )
29104 - { return( this->vips2mask() ); }
29105 - operator VIMask() throw( VError )
29106 - { return( VIMask( VDMask( *this ) ) ); }
29107 -#endif /*!SWIG*/
29108 -};
29109 -
29110 -/* Don't include these when parsing for SWIG.
29111 - */
29112 -#ifndef SWIG
29113 -
29114 -/* Class wrapping up a vargv. Member function wrappers need this. It needs to
29115 - * be part of the public API in case people subclass VImage and add their own
29116 - * members.
29117 - */
29118 -class Vargv {
29119 - // Function we are args to
29120 - im__function *fn;
29121 -
29122 - // Base of object vector
29123 - im__object *base;
29124 -
29125 -public:
29126 - Vargv( const char *name );
29127 - ~Vargv();
29128 -
29129 - // Reference to element of base
29130 - im__object &data( int i = 0 ) { return( base[i] ); };
29131 -
29132 - // Invoke function
29133 - void call();
29134 -};
29135 -
29136 -#endif /*!SWIG*/
29137 -
29138 -VIPS_NAMESPACE_END
29139 -
29140 -// Other VIPS protos we need
29141 -extern "C" {
29142 -extern int im_init_world( const char *argv0 );
29143 -extern void im__print_all();
29144 -extern void im_col_Lab2XYZ(
29145 - float, float, float,
29146 - float *, float *, float * );
29147 -}
29148 -
29149 -#endif /*IM_VIMAGE_H*/
29150 diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/vips/vips vips-7.38.5/libvipsCC/include/vips/vips
29151 --- vips-7.38.5-vanilla/libvipsCC/include/vips/vips 2014-07-17 23:48:36.237794473 -0400
29152 +++ vips-7.38.5/libvipsCC/include/vips/vips 1969-12-31 19:00:00.000000000 -0500
29153 @@ -1,110 +0,0 @@
29154 -// Include file to get all VIPS C++ bindings
29155 -
29156 -/*
29157 -
29158 - This file is part of VIPS.
29159 -
29160 - VIPS is free software; you can redistribute it and/or modify
29161 - it under the terms of the GNU Lesser General Public License as published by
29162 - the Free Software Foundation; either version 2 of the License, or
29163 - (at your option) any later version.
29164 -
29165 - This program is distributed in the hope that it will be useful,
29166 - but WITHOUT ANY WARRANTY; without even the implied warranty of
29167 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29168 - GNU Lesser General Public License for more details.
29169 -
29170 - You should have received a copy of the GNU Lesser General Public License
29171 - along with this program; if not, write to the Free Software
29172 - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
29173 - 02110-1301 USA
29174 -
29175 - */
29176 -
29177 -/*
29178 -
29179 - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
29180 -
29181 - */
29182 -
29183 -#ifndef IM_VIPS
29184 -#define IM_VIPS
29185 -
29186 -#include <vips/version.h>
29187 -
29188 -// VImage.h uses GValue for metadata
29189 -#include <glib-object.h>
29190 -
29191 -// If we have already #included the C vips headers, we have to undef a load of
29192 -// stuff to stop vips's stupid macros messing up our enums
29193 -#ifdef IM_VIPS_H
29194 -#ifdef IM_ENABLE_DEPRECATED
29195 -
29196 -#undef MULTIBAND
29197 -#undef B_W
29198 -#undef LUMINACE
29199 -#undef XRAY
29200 -#undef IR
29201 -#undef YUV
29202 -#undef RED_ONLY
29203 -#undef GREEN_ONLY
29204 -#undef BLUE_ONLY
29205 -#undef POWER_SPECTRUM
29206 -#undef HISTOGRAM
29207 -
29208 -#undef LUT
29209 -#undef XYZ
29210 -#undef LAB
29211 -#undef CMC
29212 -#undef CMYK
29213 -#undef LABQ
29214 -#undef RGB
29215 -#undef UCS
29216 -#undef LCH
29217 -#undef LABS
29218 -#undef sRGB
29219 -
29220 -#undef FMTNOTSET
29221 -#undef FMTUCHAR
29222 -#undef FMTCHAR
29223 -#undef FMTUSHORT
29224 -#undef FMTSHORT
29225 -#undef FMTUINT
29226 -#undef FMTINT
29227 -#undef FMTFLOAT
29228 -#undef FMTCOMPLEX
29229 -#undef FMTDOUBLE
29230 -#undef FMTDPCOMPLEX
29231 -
29232 -#undef NOCODING
29233 -#undef COLQUANT
29234 -#undef LABPACK
29235 -#undef LABPACK_COMPRESSED
29236 -#undef RGB_COMPRESSED
29237 -#undef LUM_COMPRESSED
29238 -
29239 -#undef NO_COMPRESSION
29240 -#undef TCSF_COMPRESSION
29241 -#undef JPEG_COMPRESSION
29242 -
29243 -#endif /*IM_ENABLE_DEPRECATED*/
29244 -#endif /*IM_VIPS_H*/
29245 -
29246 -#ifdef IM_RECT_H
29247 -#ifdef IM_ENABLE_DEPRECATED
29248 -
29249 -#undef right
29250 -#undef bottom
29251 -
29252 -#endif /*IM_ENABLE_DEPRECATED*/
29253 -#endif /*IM_RECT_H*/
29254 -
29255 -#define VIPS_NAMESPACE_START namespace vips {
29256 -#define VIPS_NAMESPACE_END }
29257 -
29258 -#include <vips/VError.h>
29259 -#include <vips/VDisplay.h>
29260 -#include <vips/VMask.h>
29261 -#include <vips/VImage.h>
29262 -
29263 -#endif /*IM_VIPS*/
29264 diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/vips/vipsc++.h vips-7.38.5/libvipsCC/include/vips/vipsc++.h
29265 --- vips-7.38.5-vanilla/libvipsCC/include/vips/vipsc++.h 2014-07-17 23:48:36.237794473 -0400
29266 +++ vips-7.38.5/libvipsCC/include/vips/vipsc++.h 1969-12-31 19:00:00.000000000 -0500
29267 @@ -1,418 +0,0 @@
29268 -
29269 -// headers for package arithmetic
29270 -// this file automatically generated from
29271 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
29272 -VImage abs() throw( VError );
29273 -VImage acos() throw( VError );
29274 -VImage add( VImage add_in2 ) throw( VError );
29275 -VImage asin() throw( VError );
29276 -VImage atan() throw( VError );
29277 -double avg() throw( VError );
29278 -double point( char* point_interpolate, double point_x, double point_y, int point_band ) throw( VError );
29279 -double point_bilinear( double point_bilinear_x, double point_bilinear_y, int point_bilinear_band ) throw( VError );
29280 -VImage bandmean() throw( VError );
29281 -VImage ceil() throw( VError );
29282 -VImage cos() throw( VError );
29283 -VImage cross_phase( VImage cross_phase_in2 ) throw( VError );
29284 -double deviate() throw( VError );
29285 -VImage divide( VImage divide_in2 ) throw( VError );
29286 -VImage exp10() throw( VError );
29287 -VImage expn( double expn_x ) throw( VError );
29288 -VImage expn( std::vector<double> expn_v ) throw( VError );
29289 -VImage exp() throw( VError );
29290 -VImage floor() throw( VError );
29291 -VImage invert() throw( VError );
29292 -VImage lin( double lin_a, double lin_b ) throw( VError );
29293 -static VImage linreg( std::vector<VImage> linreg_ins, std::vector<double> linreg_xs ) throw( VError );
29294 -VImage lin( std::vector<double> lin_a, std::vector<double> lin_b ) throw( VError );
29295 -VImage log10() throw( VError );
29296 -VImage log() throw( VError );
29297 -double max() throw( VError );
29298 -std::complex<double> maxpos() throw( VError );
29299 -double maxpos_avg( double& maxpos_avg_y, double& maxpos_avg_out ) throw( VError );
29300 -VDMask measure( int measure_x, int measure_y, int measure_w, int measure_h, int measure_h_patches, int measure_v_patches ) throw( VError );
29301 -double min() throw( VError );
29302 -std::complex<double> minpos() throw( VError );
29303 -VImage multiply( VImage multiply_in2 ) throw( VError );
29304 -VImage pow( double pow_x ) throw( VError );
29305 -VImage pow( std::vector<double> pow_v ) throw( VError );
29306 -VImage recomb( VDMask recomb_matrix ) throw( VError );
29307 -VImage remainder( VImage remainder_in2 ) throw( VError );
29308 -VImage remainder( double remainder_x ) throw( VError );
29309 -VImage remainder( std::vector<double> remainder_x ) throw( VError );
29310 -VImage rint() throw( VError );
29311 -VImage sign() throw( VError );
29312 -VImage sin() throw( VError );
29313 -VDMask stats() throw( VError );
29314 -VImage subtract( VImage subtract_in2 ) throw( VError );
29315 -VImage tan() throw( VError );
29316 -
29317 -// headers for package cimg
29318 -// this file automatically generated from
29319 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
29320 -VImage greyc( int greyc_iterations, double greyc_amplitude, double greyc_sharpness, double greyc_anisotropy, double greyc_alpha, double greyc_sigma, double greyc_dl, double greyc_da, double greyc_gauss_prec, int greyc_interpolation, int greyc_fast_approx ) throw( VError );
29321 -VImage greyc_mask( VImage greyc_mask_mask, int greyc_mask_iterations, double greyc_mask_amplitude, double greyc_mask_sharpness, double greyc_mask_anisotropy, double greyc_mask_alpha, double greyc_mask_sigma, double greyc_mask_dl, double greyc_mask_da, double greyc_mask_gauss_prec, int greyc_mask_interpolation, int greyc_mask_fast_approx ) throw( VError );
29322 -
29323 -// headers for package colour
29324 -// this file automatically generated from
29325 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
29326 -VImage LCh2Lab() throw( VError );
29327 -VImage LCh2UCS() throw( VError );
29328 -VImage Lab2LCh() throw( VError );
29329 -VImage Lab2LabQ() throw( VError );
29330 -VImage Lab2LabS() throw( VError );
29331 -VImage Lab2UCS() throw( VError );
29332 -VImage Lab2XYZ() throw( VError );
29333 -VImage Lab2XYZ_temp( double Lab2XYZ_temp_X0, double Lab2XYZ_temp_Y0, double Lab2XYZ_temp_Z0 ) throw( VError );
29334 -VImage Lab2disp( VDisplay Lab2disp_disp ) throw( VError );
29335 -VImage LabQ2LabS() throw( VError );
29336 -VImage LabQ2Lab() throw( VError );
29337 -VImage LabQ2XYZ() throw( VError );
29338 -VImage LabQ2disp( VDisplay LabQ2disp_disp ) throw( VError );
29339 -VImage LabS2LabQ() throw( VError );
29340 -VImage LabS2Lab() throw( VError );
29341 -VImage UCS2LCh() throw( VError );
29342 -VImage UCS2Lab() throw( VError );
29343 -VImage UCS2XYZ() throw( VError );
29344 -VImage XYZ2Lab() throw( VError );
29345 -VImage XYZ2Lab_temp( double XYZ2Lab_temp_X0, double XYZ2Lab_temp_Y0, double XYZ2Lab_temp_Z0 ) throw( VError );
29346 -VImage XYZ2UCS() throw( VError );
29347 -VImage XYZ2Yxy() throw( VError );
29348 -VImage XYZ2disp( VDisplay XYZ2disp_disp ) throw( VError );
29349 -VImage XYZ2sRGB() throw( VError );
29350 -VImage Yxy2XYZ() throw( VError );
29351 -VImage dE00_fromLab( VImage dE00_fromLab_in2 ) throw( VError );
29352 -VImage dECMC_fromLab( VImage dECMC_fromLab_in2 ) throw( VError );
29353 -VImage dECMC_fromdisp( VImage dECMC_fromdisp_in2, VDisplay dECMC_fromdisp_disp ) throw( VError );
29354 -VImage dE_fromLab( VImage dE_fromLab_in2 ) throw( VError );
29355 -VImage dE_fromXYZ( VImage dE_fromXYZ_in2 ) throw( VError );
29356 -VImage dE_fromdisp( VImage dE_fromdisp_in2, VDisplay dE_fromdisp_disp ) throw( VError );
29357 -VImage disp2Lab( VDisplay disp2Lab_disp ) throw( VError );
29358 -VImage disp2XYZ( VDisplay disp2XYZ_disp ) throw( VError );
29359 -VImage float2rad() throw( VError );
29360 -VImage icc_ac2rc( char* icc_ac2rc_profile ) throw( VError );
29361 -VImage icc_export_depth( int icc_export_depth_depth, char* icc_export_depth_output_profile, int icc_export_depth_intent ) throw( VError );
29362 -VImage icc_import( char* icc_import_input_profile, int icc_import_intent ) throw( VError );
29363 -VImage icc_import_embedded( int icc_import_embedded_intent ) throw( VError );
29364 -VImage icc_transform( char* icc_transform_input_profile, char* icc_transform_output_profile, int icc_transform_intent ) throw( VError );
29365 -VImage lab_morph( VDMask lab_morph_greyscale, double lab_morph_L_offset, double lab_morph_L_scale, double lab_morph_a_scale, double lab_morph_b_scale ) throw( VError );
29366 -VImage rad2float() throw( VError );
29367 -VImage sRGB2XYZ() throw( VError );
29368 -
29369 -// headers for package conversion
29370 -// this file automatically generated from
29371 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
29372 -static VImage gaussnoise( int gaussnoise_xsize, int gaussnoise_ysize, double gaussnoise_mean, double gaussnoise_sigma ) throw( VError );
29373 -VImage bandjoin( VImage bandjoin_in2 ) throw( VError );
29374 -static VImage black( int black_x_size, int black_y_size, int black_bands ) throw( VError );
29375 -VImage c2amph() throw( VError );
29376 -VImage c2imag() throw( VError );
29377 -VImage c2real() throw( VError );
29378 -VImage c2rect() throw( VError );
29379 -VImage clip2fmt( int clip2fmt_ofmt ) throw( VError );
29380 -VImage copy() throw( VError );
29381 -VImage copy_file() throw( VError );
29382 -VImage copy_morph( int copy_morph_Bands, int copy_morph_BandFmt, int copy_morph_Coding ) throw( VError );
29383 -VImage copy_swap() throw( VError );
29384 -VImage copy_set( int copy_set_Type, double copy_set_Xres, double copy_set_Yres, int copy_set_Xoffset, int copy_set_Yoffset ) throw( VError );
29385 -VImage extract_area( int extract_area_left, int extract_area_top, int extract_area_width, int extract_area_height ) throw( VError );
29386 -VImage extract_areabands( int extract_areabands_left, int extract_areabands_top, int extract_areabands_width, int extract_areabands_height, int extract_areabands_band, int extract_areabands_nbands ) throw( VError );
29387 -VImage extract_band( int extract_band_band ) throw( VError );
29388 -VImage extract_bands( int extract_bands_band, int extract_bands_nbands ) throw( VError );
29389 -VImage extract( int extract_left, int extract_top, int extract_width, int extract_height, int extract_band ) throw( VError );
29390 -VImage falsecolour() throw( VError );
29391 -VImage fliphor() throw( VError );
29392 -VImage flipver() throw( VError );
29393 -static VImage gbandjoin( std::vector<VImage> gbandjoin_in ) throw( VError );
29394 -VImage grid( int grid_tile_height, int grid_across, int grid_down ) throw( VError );
29395 -VImage insert( VImage insert_sub, int insert_x, int insert_y ) throw( VError );
29396 -VImage insert( VImage insert_sub, std::vector<int> insert_x, std::vector<int> insert_y ) throw( VError );
29397 -VImage insert_noexpand( VImage insert_noexpand_sub, int insert_noexpand_x, int insert_noexpand_y ) throw( VError );
29398 -VImage embed( int embed_type, int embed_x, int embed_y, int embed_width, int embed_height ) throw( VError );
29399 -VImage lrjoin( VImage lrjoin_in2 ) throw( VError );
29400 -VImage msb() throw( VError );
29401 -VImage msb_band( int msb_band_band ) throw( VError );
29402 -VImage replicate( int replicate_across, int replicate_down ) throw( VError );
29403 -VImage ri2c( VImage ri2c_in2 ) throw( VError );
29404 -VImage rot180() throw( VError );
29405 -VImage rot270() throw( VError );
29406 -VImage rot90() throw( VError );
29407 -VImage scale() throw( VError );
29408 -VImage scaleps() throw( VError );
29409 -VImage subsample( int subsample_xshrink, int subsample_yshrink ) throw( VError );
29410 -char* system( char* system_command ) throw( VError );
29411 -VImage system_image( char* system_image_in_format, char* system_image_out_format, char* system_image_command, char*& system_image_log ) throw( VError );
29412 -VImage tbjoin( VImage tbjoin_in2 ) throw( VError );
29413 -static VImage text( char* text_text, char* text_font, int text_width, int text_alignment, int text_dpi ) throw( VError );
29414 -VImage wrap( int wrap_x, int wrap_y ) throw( VError );
29415 -VImage zoom( int zoom_xfac, int zoom_yfac ) throw( VError );
29416 -
29417 -// headers for package convolution
29418 -// this file automatically generated from
29419 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
29420 -VImage aconvsep( VDMask aconvsep_matrix, int aconvsep_n_layers ) throw( VError );
29421 -VImage aconv( VDMask aconv_matrix, int aconv_n_layers, int aconv_cluster ) throw( VError );
29422 -VImage addgnoise( double addgnoise_sigma ) throw( VError );
29423 -VImage compass( VIMask compass_matrix ) throw( VError );
29424 -VImage contrast_surface( int contrast_surface_half_win_size, int contrast_surface_spacing ) throw( VError );
29425 -VImage conv( VIMask conv_matrix ) throw( VError );
29426 -VImage conv( VDMask conv_matrix ) throw( VError );
29427 -VImage convsep( VIMask convsep_matrix ) throw( VError );
29428 -VImage convsep( VDMask convsep_matrix ) throw( VError );
29429 -VImage fastcor( VImage fastcor_in2 ) throw( VError );
29430 -VImage gradcor( VImage gradcor_in2 ) throw( VError );
29431 -VImage gradient( VIMask gradient_matrix ) throw( VError );
29432 -VImage grad_x() throw( VError );
29433 -VImage grad_y() throw( VError );
29434 -VImage lindetect( VIMask lindetect_matrix ) throw( VError );
29435 -VImage sharpen( int sharpen_mask_size, double sharpen_x1, double sharpen_y2, double sharpen_y3, double sharpen_m1, double sharpen_m2 ) throw( VError );
29436 -VImage spcor( VImage spcor_in2 ) throw( VError );
29437 -
29438 -// headers for package deprecated
29439 -// this file automatically generated from
29440 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
29441 -VImage argb2rgba() throw( VError );
29442 -VImage flood_copy( int flood_copy_start_x, int flood_copy_start_y, std::vector<double> flood_copy_ink ) throw( VError );
29443 -VImage flood_blob_copy( int flood_blob_copy_start_x, int flood_blob_copy_start_y, std::vector<double> flood_blob_copy_ink ) throw( VError );
29444 -VImage flood_other_copy( VImage flood_other_copy_mark, int flood_other_copy_start_x, int flood_other_copy_start_y, int flood_other_copy_serial ) throw( VError );
29445 -VImage clip() throw( VError );
29446 -VImage c2ps() throw( VError );
29447 -VImage resize_linear( int resize_linear_X, int resize_linear_Y ) throw( VError );
29448 -VImage cmulnorm( VImage cmulnorm_in2 ) throw( VError );
29449 -VImage fav4( VImage fav4_in2, VImage fav4_in3, VImage fav4_in4 ) throw( VError );
29450 -VImage gadd( double gadd_a, double gadd_b, VImage gadd_in2, double gadd_c ) throw( VError );
29451 -VImage icc_export( char* icc_export_output_profile, int icc_export_intent ) throw( VError );
29452 -VImage litecor( VImage litecor_white, int litecor_clip, double litecor_factor ) throw( VError );
29453 -VImage affine( double affine_a, double affine_b, double affine_c, double affine_d, double affine_dx, double affine_dy, int affine_x, int affine_y, int affine_w, int affine_h ) throw( VError );
29454 -VImage clip2c() throw( VError );
29455 -VImage clip2cm() throw( VError );
29456 -VImage clip2d() throw( VError );
29457 -VImage clip2dcm() throw( VError );
29458 -VImage clip2f() throw( VError );
29459 -VImage clip2i() throw( VError );
29460 -VImage convsub( VIMask convsub_matrix, int convsub_xskip, int convsub_yskip ) throw( VError );
29461 -VImage convf( VDMask convf_matrix ) throw( VError );
29462 -VImage convsepf( VDMask convsepf_matrix ) throw( VError );
29463 -VImage clip2s() throw( VError );
29464 -VImage clip2ui() throw( VError );
29465 -VImage insertplace( VImage insertplace_sub, std::vector<int> insertplace_x, std::vector<int> insertplace_y ) throw( VError );
29466 -VImage clip2us() throw( VError );
29467 -VImage slice( double slice_thresh1, double slice_thresh2 ) throw( VError );
29468 -VImage segment( int& segment_segments ) throw( VError );
29469 -void line( int line_x1, int line_y1, int line_x2, int line_y2, int line_pelval ) throw( VError );
29470 -VImage thresh( double thresh_threshold ) throw( VError );
29471 -VImage convf_raw( VDMask convf_raw_matrix ) throw( VError );
29472 -VImage conv_raw( VIMask conv_raw_matrix ) throw( VError );
29473 -VImage contrast_surface_raw( int contrast_surface_raw_half_win_size, int contrast_surface_raw_spacing ) throw( VError );
29474 -VImage convsepf_raw( VDMask convsepf_raw_matrix ) throw( VError );
29475 -VImage convsep_raw( VIMask convsep_raw_matrix ) throw( VError );
29476 -VImage fastcor_raw( VImage fastcor_raw_in2 ) throw( VError );
29477 -VImage gradcor_raw( VImage gradcor_raw_in2 ) throw( VError );
29478 -VImage spcor_raw( VImage spcor_raw_in2 ) throw( VError );
29479 -VImage lhisteq_raw( int lhisteq_raw_width, int lhisteq_raw_height ) throw( VError );
29480 -VImage stdif_raw( double stdif_raw_a, double stdif_raw_m0, double stdif_raw_b, double stdif_raw_s0, int stdif_raw_xw, int stdif_raw_yw ) throw( VError );
29481 -VImage rank_raw( int rank_raw_xsize, int rank_raw_ysize, int rank_raw_n ) throw( VError );
29482 -VImage dilate_raw( VIMask dilate_raw_mask ) throw( VError );
29483 -VImage erode_raw( VIMask erode_raw_mask ) throw( VError );
29484 -VImage similarity_area( double similarity_area_a, double similarity_area_b, double similarity_area_dx, double similarity_area_dy, int similarity_area_x, int similarity_area_y, int similarity_area_w, int similarity_area_h ) throw( VError );
29485 -VImage similarity( double similarity_a, double similarity_b, double similarity_dx, double similarity_dy ) throw( VError );
29486 -static VImage mask2vips( VDMask mask2vips_input ) throw( VError );
29487 -VDMask vips2mask() throw( VError );
29488 -void insertplace( VImage insertplace_sub, int insertplace_x, int insertplace_y ) throw( VError );
29489 -void circle( int circle_cx, int circle_cy, int circle_radius, int circle_intensity ) throw( VError );
29490 -VImage andimage( VImage andimage_in2 ) throw( VError );
29491 -VImage andimage( int andimage_c ) throw( VError );
29492 -VImage andimage( std::vector<double> andimage_vec ) throw( VError );
29493 -VImage orimage( VImage orimage_in2 ) throw( VError );
29494 -VImage orimage( int orimage_c ) throw( VError );
29495 -VImage orimage( std::vector<double> orimage_vec ) throw( VError );
29496 -VImage eorimage( VImage eorimage_in2 ) throw( VError );
29497 -VImage eorimage( int eorimage_c ) throw( VError );
29498 -VImage eorimage( std::vector<double> eorimage_vec ) throw( VError );
29499 -VImage shiftleft( std::vector<double> shiftleft_vec ) throw( VError );
29500 -VImage shiftleft( int shiftleft_c ) throw( VError );
29501 -VImage shiftright( std::vector<double> shiftright_vec ) throw( VError );
29502 -VImage shiftright( int shiftright_c ) throw( VError );
29503 -VImage blend( VImage blend_in1, VImage blend_in2 ) throw( VError );
29504 -VImage equal( VImage equal_in2 ) throw( VError );
29505 -VImage equal( std::vector<double> equal_vec ) throw( VError );
29506 -VImage equal( double equal_c ) throw( VError );
29507 -VImage ifthenelse( VImage ifthenelse_in1, VImage ifthenelse_in2 ) throw( VError );
29508 -VImage less( VImage less_in2 ) throw( VError );
29509 -VImage less( std::vector<double> less_vec ) throw( VError );
29510 -VImage less( double less_c ) throw( VError );
29511 -VImage lesseq( VImage lesseq_in2 ) throw( VError );
29512 -VImage lesseq( std::vector<double> lesseq_vec ) throw( VError );
29513 -VImage lesseq( double lesseq_c ) throw( VError );
29514 -VImage more( VImage more_in2 ) throw( VError );
29515 -VImage more( std::vector<double> more_vec ) throw( VError );
29516 -VImage more( double more_c ) throw( VError );
29517 -VImage moreeq( VImage moreeq_in2 ) throw( VError );
29518 -VImage moreeq( std::vector<double> moreeq_vec ) throw( VError );
29519 -VImage moreeq( double moreeq_c ) throw( VError );
29520 -VImage notequal( VImage notequal_in2 ) throw( VError );
29521 -VImage notequal( std::vector<double> notequal_vec ) throw( VError );
29522 -VImage notequal( double notequal_c ) throw( VError );
29523 -VImage quadratic( VImage quadratic_coeff ) throw( VError );
29524 -
29525 -// headers for package format
29526 -// this file automatically generated from
29527 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
29528 -static VImage csv2vips( char* csv2vips_filename ) throw( VError );
29529 -static VImage fits2vips( char* fits2vips_in ) throw( VError );
29530 -static VImage jpeg2vips( char* jpeg2vips_in ) throw( VError );
29531 -static VImage magick2vips( char* magick2vips_in ) throw( VError );
29532 -static VImage png2vips( char* png2vips_in ) throw( VError );
29533 -static VImage exr2vips( char* exr2vips_in ) throw( VError );
29534 -static VImage ppm2vips( char* ppm2vips_filename ) throw( VError );
29535 -static VImage analyze2vips( char* analyze2vips_filename ) throw( VError );
29536 -static VImage tiff2vips( char* tiff2vips_in ) throw( VError );
29537 -void vips2csv( char* vips2csv_filename ) throw( VError );
29538 -void vips2dz( char* vips2dz_out ) throw( VError );
29539 -void vips2jpeg( char* vips2jpeg_out ) throw( VError );
29540 -void vips2mimejpeg( int vips2mimejpeg_qfac ) throw( VError );
29541 -void vips2png( char* vips2png_out ) throw( VError );
29542 -void vips2ppm( char* vips2ppm_filename ) throw( VError );
29543 -void vips2tiff( char* vips2tiff_out ) throw( VError );
29544 -
29545 -// headers for package freq_filt
29546 -// this file automatically generated from
29547 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
29548 -static VImage create_fmask( int create_fmask_width, int create_fmask_height, int create_fmask_type, double create_fmask_p1, double create_fmask_p2, double create_fmask_p3, double create_fmask_p4, double create_fmask_p5 ) throw( VError );
29549 -VImage disp_ps() throw( VError );
29550 -VImage flt_image_freq( int flt_image_freq_type, double flt_image_freq_p1, double flt_image_freq_p2, double flt_image_freq_p3, double flt_image_freq_p4, double flt_image_freq_p5 ) throw( VError );
29551 -static VImage fractsurf( int fractsurf_size, double fractsurf_dimension ) throw( VError );
29552 -VImage freqflt( VImage freqflt_mask ) throw( VError );
29553 -VImage fwfft() throw( VError );
29554 -VImage rotquad() throw( VError );
29555 -VImage invfft() throw( VError );
29556 -VImage phasecor_fft( VImage phasecor_fft_in2 ) throw( VError );
29557 -VImage invfftr() throw( VError );
29558 -
29559 -// headers for package histograms_lut
29560 -// this file automatically generated from
29561 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
29562 -VImage gammacorrect( double gammacorrect_exponent ) throw( VError );
29563 -VImage heq( int heq_band_number ) throw( VError );
29564 -VImage hist( int hist_band_number ) throw( VError );
29565 -VImage histcum() throw( VError );
29566 -VImage histeq() throw( VError );
29567 -VImage hist_indexed( VImage hist_indexed_value ) throw( VError );
29568 -VImage histgr( int histgr_band_number ) throw( VError );
29569 -VImage histnD( int histnD_bins ) throw( VError );
29570 -VImage histnorm() throw( VError );
29571 -VImage histplot() throw( VError );
29572 -VImage histspec( VImage histspec_ref ) throw( VError );
29573 -VImage hsp( VImage hsp_ref ) throw( VError );
29574 -static VImage identity( int identity_nbands ) throw( VError );
29575 -static VImage identity_ushort( int identity_ushort_nbands, int identity_ushort_size ) throw( VError );
29576 -int ismonotonic() throw( VError );
29577 -VImage lhisteq( int lhisteq_width, int lhisteq_height ) throw( VError );
29578 -int mpercent( double mpercent_percent ) throw( VError );
29579 -static VImage invertlut( VDMask invertlut_measures, int invertlut_lut_size ) throw( VError );
29580 -static VImage buildlut( VDMask buildlut_xyes ) throw( VError );
29581 -VImage maplut( VImage maplut_lut ) throw( VError );
29582 -VImage project( VImage& project_vout ) throw( VError );
29583 -VImage stdif( double stdif_a, double stdif_m0, double stdif_b, double stdif_s0, int stdif_xw, int stdif_yw ) throw( VError );
29584 -VImage tone_analyse( double tone_analyse_Ps, double tone_analyse_Pm, double tone_analyse_Ph, double tone_analyse_S, double tone_analyse_M, double tone_analyse_H ) throw( VError );
29585 -static VImage tone_build( double tone_build_Lb, double tone_build_Lw, double tone_build_Ps, double tone_build_Pm, double tone_build_Ph, double tone_build_S, double tone_build_M, double tone_build_H ) throw( VError );
29586 -static VImage tone_build_range( int tone_build_range_in_max, int tone_build_range_out_max, double tone_build_range_Lb, double tone_build_range_Lw, double tone_build_range_Ps, double tone_build_range_Pm, double tone_build_range_Ph, double tone_build_range_S, double tone_build_range_M, double tone_build_range_H ) throw( VError );
29587 -VImage tone_map( VImage tone_map_lut ) throw( VError );
29588 -
29589 -// headers for package inplace
29590 -// this file automatically generated from
29591 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
29592 -void draw_circle( int draw_circle_cx, int draw_circle_cy, int draw_circle_radius, int draw_circle_fill, std::vector<double> draw_circle_ink ) throw( VError );
29593 -void draw_rect( int draw_rect_left, int draw_rect_top, int draw_rect_width, int draw_rect_height, int draw_rect_fill, std::vector<double> draw_rect_ink ) throw( VError );
29594 -void draw_line( int draw_line_x1, int draw_line_y1, int draw_line_x2, int draw_line_y2, std::vector<double> draw_line_ink ) throw( VError );
29595 -void draw_point( int draw_point_x, int draw_point_y, std::vector<double> draw_point_ink ) throw( VError );
29596 -void draw_smudge( int draw_smudge_left, int draw_smudge_top, int draw_smudge_width, int draw_smudge_height ) throw( VError );
29597 -void draw_flood( int draw_flood_x, int draw_flood_y, std::vector<double> draw_flood_ink ) throw( VError );
29598 -void draw_flood_blob( int draw_flood_blob_x, int draw_flood_blob_y, std::vector<double> draw_flood_blob_ink ) throw( VError );
29599 -void draw_flood_other( VImage draw_flood_other_test, int draw_flood_other_x, int draw_flood_other_y, int draw_flood_other_serial ) throw( VError );
29600 -void draw_image( VImage draw_image_sub, int draw_image_x, int draw_image_y ) throw( VError );
29601 -void draw_mask( VImage draw_mask_mask, int draw_mask_x, int draw_mask_y, std::vector<double> draw_mask_ink ) throw( VError );
29602 -VImage line( VImage line_mask, VImage line_ink, std::vector<int> line_x1, std::vector<int> line_y1, std::vector<int> line_x2, std::vector<int> line_y2 ) throw( VError );
29603 -
29604 -// headers for package iofuncs
29605 -// this file automatically generated from
29606 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
29607 -static VImage binfile( char* binfile_filename, int binfile_width, int binfile_height, int binfile_bands, int binfile_offset ) throw( VError );
29608 -VImage cache( int cache_tile_width, int cache_tile_height, int cache_max_tiles ) throw( VError );
29609 -char* getext() throw( VError );
29610 -int header_get_typeof( char* header_get_typeof_field ) throw( VError );
29611 -int header_int( char* header_int_field ) throw( VError );
29612 -double header_double( char* header_double_field ) throw( VError );
29613 -char* header_string( char* header_string_field ) throw( VError );
29614 -char* history_get() throw( VError );
29615 -void printdesc() throw( VError );
29616 -
29617 -// headers for package mask
29618 -// this file automatically generated from
29619 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
29620 -
29621 -// headers for package morphology
29622 -// this file automatically generated from
29623 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
29624 -double cntlines( int cntlines_direction ) throw( VError );
29625 -VImage dilate( VIMask dilate_mask ) throw( VError );
29626 -VImage rank( int rank_xsize, int rank_ysize, int rank_n ) throw( VError );
29627 -static VImage rank_image( std::vector<VImage> rank_image_in, int rank_image_index ) throw( VError );
29628 -static VImage maxvalue( std::vector<VImage> maxvalue_in ) throw( VError );
29629 -VImage label_regions( int& label_regions_segments ) throw( VError );
29630 -VImage zerox( int zerox_flag ) throw( VError );
29631 -VImage erode( VIMask erode_mask ) throw( VError );
29632 -VImage profile( int profile_direction ) throw( VError );
29633 -
29634 -// headers for package mosaicing
29635 -// this file automatically generated from
29636 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
29637 -VImage align_bands() throw( VError );
29638 -double correl( VImage correl_sec, int correl_xref, int correl_yref, int correl_xsec, int correl_ysec, int correl_hwindowsize, int correl_hsearchsize, int& correl_x, int& correl_y ) throw( VError );
29639 -int _find_lroverlap( VImage _find_lroverlap_sec, int _find_lroverlap_bandno, int _find_lroverlap_xr, int _find_lroverlap_yr, int _find_lroverlap_xs, int _find_lroverlap_ys, int _find_lroverlap_halfcorrelation, int _find_lroverlap_halfarea, int& _find_lroverlap_dy0, double& _find_lroverlap_scale1, double& _find_lroverlap_angle1, double& _find_lroverlap_dx1, double& _find_lroverlap_dy1 ) throw( VError );
29640 -int _find_tboverlap( VImage _find_tboverlap_sec, int _find_tboverlap_bandno, int _find_tboverlap_xr, int _find_tboverlap_yr, int _find_tboverlap_xs, int _find_tboverlap_ys, int _find_tboverlap_halfcorrelation, int _find_tboverlap_halfarea, int& _find_tboverlap_dy0, double& _find_tboverlap_scale1, double& _find_tboverlap_angle1, double& _find_tboverlap_dx1, double& _find_tboverlap_dy1 ) throw( VError );
29641 -VImage global_balance( double global_balance_gamma ) throw( VError );
29642 -VImage global_balancef( double global_balancef_gamma ) throw( VError );
29643 -VImage lrmerge( VImage lrmerge_sec, int lrmerge_dx, int lrmerge_dy, int lrmerge_mwidth ) throw( VError );
29644 -VImage lrmerge1( VImage lrmerge1_sec, int lrmerge1_xr1, int lrmerge1_yr1, int lrmerge1_xs1, int lrmerge1_ys1, int lrmerge1_xr2, int lrmerge1_yr2, int lrmerge1_xs2, int lrmerge1_ys2, int lrmerge1_mwidth ) throw( VError );
29645 -VImage lrmosaic( VImage lrmosaic_sec, int lrmosaic_bandno, int lrmosaic_xr, int lrmosaic_yr, int lrmosaic_xs, int lrmosaic_ys, int lrmosaic_halfcorrelation, int lrmosaic_halfarea, int lrmosaic_balancetype, int lrmosaic_mwidth ) throw( VError );
29646 -VImage lrmosaic1( VImage lrmosaic1_sec, int lrmosaic1_bandno, int lrmosaic1_xr1, int lrmosaic1_yr1, int lrmosaic1_xs1, int lrmosaic1_ys1, int lrmosaic1_xr2, int lrmosaic1_yr2, int lrmosaic1_xs2, int lrmosaic1_ys2, int lrmosaic1_halfcorrelation, int lrmosaic1_halfarea, int lrmosaic1_balancetype, int lrmosaic1_mwidth ) throw( VError );
29647 -VImage match_linear( VImage match_linear_sec, int match_linear_xref1, int match_linear_yref1, int match_linear_xsec1, int match_linear_ysec1, int match_linear_xref2, int match_linear_yref2, int match_linear_xsec2, int match_linear_ysec2 ) throw( VError );
29648 -VImage match_linear_search( VImage match_linear_search_sec, int match_linear_search_xref1, int match_linear_search_yref1, int match_linear_search_xsec1, int match_linear_search_ysec1, int match_linear_search_xref2, int match_linear_search_yref2, int match_linear_search_xsec2, int match_linear_search_ysec2, int match_linear_search_hwindowsize, int match_linear_search_hsearchsize ) throw( VError );
29649 -double maxpos_subpel( double& maxpos_subpel_y ) throw( VError );
29650 -VImage remosaic( char* remosaic_old_str, char* remosaic_new_str ) throw( VError );
29651 -VImage tbmerge( VImage tbmerge_sec, int tbmerge_dx, int tbmerge_dy, int tbmerge_mwidth ) throw( VError );
29652 -VImage tbmerge1( VImage tbmerge1_sec, int tbmerge1_xr1, int tbmerge1_yr1, int tbmerge1_xs1, int tbmerge1_ys1, int tbmerge1_xr2, int tbmerge1_yr2, int tbmerge1_xs2, int tbmerge1_ys2, int tbmerge1_mwidth ) throw( VError );
29653 -VImage tbmosaic( VImage tbmosaic_sec, int tbmosaic_bandno, int tbmosaic_xr, int tbmosaic_yr, int tbmosaic_xs, int tbmosaic_ys, int tbmosaic_halfcorrelation, int tbmosaic_halfarea, int tbmosaic_balancetype, int tbmosaic_mwidth ) throw( VError );
29654 -VImage tbmosaic1( VImage tbmosaic1_sec, int tbmosaic1_bandno, int tbmosaic1_xr1, int tbmosaic1_yr1, int tbmosaic1_xs1, int tbmosaic1_ys1, int tbmosaic1_xr2, int tbmosaic1_yr2, int tbmosaic1_xs2, int tbmosaic1_ys2, int tbmosaic1_halfcorrelation, int tbmosaic1_halfarea, int tbmosaic1_balancetype, int tbmosaic1_mwidth ) throw( VError );
29655 -
29656 -// headers for package other
29657 -// this file automatically generated from
29658 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
29659 -VImage benchmark() throw( VError );
29660 -double benchmark2() throw( VError );
29661 -VImage benchmarkn( int benchmarkn_n ) throw( VError );
29662 -static VImage eye( int eye_xsize, int eye_ysize, double eye_factor ) throw( VError );
29663 -static VImage grey( int grey_xsize, int grey_ysize ) throw( VError );
29664 -static VImage feye( int feye_xsize, int feye_ysize, double feye_factor ) throw( VError );
29665 -static VImage fgrey( int fgrey_xsize, int fgrey_ysize ) throw( VError );
29666 -static VImage fzone( int fzone_size ) throw( VError );
29667 -static VImage make_xy( int make_xy_xsize, int make_xy_ysize ) throw( VError );
29668 -static VImage sines( int sines_xsize, int sines_ysize, double sines_horfreq, double sines_verfreq ) throw( VError );
29669 -static VImage zone( int zone_size ) throw( VError );
29670 -
29671 -// headers for package resample
29672 -// this file automatically generated from
29673 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
29674 -VImage rightshift_size( int rightshift_size_xshift, int rightshift_size_yshift, int rightshift_size_band_fmt ) throw( VError );
29675 -VImage shrink( double shrink_xfac, double shrink_yfac ) throw( VError );
29676 -VImage stretch3( double stretch3_xdisp, double stretch3_ydisp ) throw( VError );
29677 -VImage affinei( char* affinei_interpolate, double affinei_a, double affinei_b, double affinei_c, double affinei_d, double affinei_dx, double affinei_dy, int affinei_x, int affinei_y, int affinei_w, int affinei_h ) throw( VError );
29678 -VImage affinei_all( char* affinei_all_interpolate, double affinei_all_a, double affinei_all_b, double affinei_all_c, double affinei_all_d, double affinei_all_dx, double affinei_all_dy ) throw( VError );
29679 -
29680 -// headers for package video
29681 -// this file automatically generated from
29682 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
29683 -static VImage video_test( int video_test_brightness, int video_test_error ) throw( VError );
29684 -static VImage video_v4l1( char* video_v4l1_device, int video_v4l1_channel, int video_v4l1_brightness, int video_v4l1_colour, int video_v4l1_contrast, int video_v4l1_hue, int video_v4l1_ngrabs ) throw( VError );
29685 -
29686 diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/vips/vipscpp.h vips-7.38.5/libvipsCC/include/vips/vipscpp.h
29687 --- vips-7.38.5-vanilla/libvipsCC/include/vips/vipscpp.h 2014-07-17 23:48:36.237794473 -0400
29688 +++ vips-7.38.5/libvipsCC/include/vips/vipscpp.h 1969-12-31 19:00:00.000000000 -0500
29689 @@ -1,40 +0,0 @@
29690 -// Include file to get all VIPS C++ bindings
29691 -
29692 -/*
29693 -
29694 - This file is part of VIPS.
29695 -
29696 - VIPS is free software; you can redistribute it and/or modify
29697 - it under the terms of the GNU Lesser General Public License as published by
29698 - the Free Software Foundation; either version 2 of the License, or
29699 - (at your option) any later version.
29700 -
29701 - This program is distributed in the hope that it will be useful,
29702 - but WITHOUT ANY WARRANTY; without even the implied warranty of
29703 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29704 - GNU Lesser General Public License for more details.
29705 -
29706 - You should have received a copy of the GNU Lesser General Public License
29707 - along with this program; if not, write to the Free Software
29708 - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
29709 - 02110-1301 USA
29710 -
29711 - */
29712 -
29713 -/*
29714 -
29715 - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
29716 -
29717 - */
29718 -
29719 -/* This header is just for compatibility with the pre-namespace C++ bindings.
29720 - */
29721 -
29722 -#ifndef IM_VIPSCPP_H
29723 -#define IM_VIPSCPP_H
29724 -
29725 -#include <vips/vips>
29726 -
29727 -using namespace vips;
29728 -
29729 -#endif /*IM_VIPSCPP_H*/
29730 diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/vips/VMask.h vips-7.38.5/libvipsCC/include/vips/VMask.h
29731 --- vips-7.38.5-vanilla/libvipsCC/include/vips/VMask.h 2014-07-17 23:48:36.237794473 -0400
29732 +++ vips-7.38.5/libvipsCC/include/vips/VMask.h 1969-12-31 19:00:00.000000000 -0500
29733 @@ -1,411 +0,0 @@
29734 -/* VIPS mask class.
29735 - *
29736 - * Just like VImage, but we don't need dependency stuff. Instead, have a base
29737 - * wrapper over *MASK, derive VMaskD and VMaskI from that, and then put
29738 - * refcounting over all of them.
29739 - */
29740 -
29741 -/*
29742 -
29743 - This file is part of VIPS.
29744 -
29745 - VIPS is free software; you can redistribute it and/or modify
29746 - it under the terms of the GNU Lesser General Public License as published by
29747 - the Free Software Foundation; either version 2 of the License, or
29748 - (at your option) any later version.
29749 -
29750 - This program is distributed in the hope that it will be useful,
29751 - but WITHOUT ANY WARRANTY; without even the implied warranty of
29752 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29753 - GNU Lesser General Public License for more details.
29754 -
29755 - You should have received a copy of the GNU Lesser General Public License
29756 - along with this program; if not, write to the Free Software
29757 - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
29758 - 02110-1301 USA
29759 -
29760 - */
29761 -
29762 -/*
29763 -
29764 - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
29765 -
29766 - */
29767 -
29768 -#ifndef IM_VMASK_H
29769 -#define IM_VMASK_H
29770 -
29771 -/* SWIG includes this file directly rather than going through vipscpp.h ... so
29772 - * we have to define these macros here as well.
29773 - */
29774 -#ifdef SWIG
29775 -# define VIPS_NAMESPACE_START namespace vips {
29776 -# define VIPS_NAMESPACE_END }
29777 -#endif /*SWIG*/
29778 -
29779 -/* Don't include these when parsing for SWIG.
29780 - */
29781 -#ifndef SWIG
29782 -# include <cstdarg>
29783 -# include <iosfwd>
29784 -# include <vector>
29785 -#endif /*!SWIG*/
29786 -
29787 -/* Wrap pointers to these, but we don't want to import all the old C API. Just
29788 - * declare them.
29789 - */
29790 -extern "C" {
29791 - struct im__INTMASK;
29792 - struct im__DOUBLEMASK;
29793 -}
29794 -
29795 -VIPS_NAMESPACE_START
29796 -
29797 -/* This first section is private. Only expose the non-P versions of these
29798 - * classes later on. Don't need to wrap then in SWIG either.
29799 - */
29800 -#ifndef SWIG
29801 -namespace _private_detail {
29802 -
29803 -union MASKUNION {
29804 - im__INTMASK *iptr;
29805 - im__DOUBLEMASK *dptr;
29806 -};
29807 -
29808 -// Private wrapper over *MASK - user does not see this
29809 -class VPMask {
29810 - friend class VMask;
29811 -
29812 -public:
29813 - // Track type of mask with this
29814 - enum VMaskType {
29815 - UNASSIGNED, // Not yet set
29816 - INT, // mask points to INTMASK
29817 - DOUBLE // mask points to DOUBLEMASK
29818 - };
29819 -
29820 - MASKUNION data; // Mask pointer - INT or DOUBLE
29821 - VMaskType type; // Track type too, for safety
29822 -
29823 - virtual ~VPMask() {};
29824 -
29825 - // Duplicate
29826 - virtual VPMask *dup() const = 0;
29827 -
29828 - // Projection functions to get MASK fields
29829 - virtual int xsize() const = 0;
29830 - virtual int ysize() const = 0;
29831 - virtual const char *filename() const = 0;
29832 -
29833 - // Output
29834 - virtual void ostream_print( std::ostream & ) const = 0;
29835 -};
29836 -
29837 -// Specialise for INTMASK
29838 -class VPIMask : public VPMask {
29839 -public:
29840 - VPIMask( int xsize, int ysize ) throw( VError );
29841 - VPIMask( int xsize, int ysize, int scale, int offset,
29842 - std::vector<int> coeff ) throw( VError );
29843 - VPIMask( const char * )
29844 - throw( VError );
29845 - VPIMask( im__INTMASK * );
29846 - VPIMask();
29847 - virtual ~VPIMask();
29848 -
29849 - VPMask *dup() const throw( VError );
29850 - void embed( im__INTMASK * ) throw( VError );
29851 -
29852 - int xsize() const throw( VError );
29853 - int ysize() const throw( VError );
29854 - int scale() const throw( VError );
29855 - int offset() const throw( VError );
29856 - const char *filename() const throw( VError );
29857 -
29858 - // Output
29859 - virtual void ostream_print( std::ostream & ) const throw( VError );
29860 -
29861 - // Extract start of array of ints
29862 - int *array() const;
29863 -};
29864 -
29865 -// Specialise for DOUBLEMASK
29866 -class VPDMask : public VPMask {
29867 -public:
29868 - VPDMask( int xsize, int ysize ) throw( VError );
29869 - VPDMask( int xsize, int ysize,
29870 - double scale, double offset, std::vector<double> coeff )
29871 - throw( VError );
29872 - VPDMask( const char * ) throw( VError );
29873 - VPDMask( im__DOUBLEMASK * );
29874 - VPDMask();
29875 - virtual ~VPDMask();
29876 -
29877 - VPMask *dup() const throw( VError );
29878 - void embed( im__DOUBLEMASK * ) throw( VError );
29879 -
29880 - int xsize() const throw( VError );
29881 - int ysize() const throw( VError );
29882 - double scale() const throw( VError );
29883 - double offset() const throw( VError );
29884 - const char *filename() const throw( VError );
29885 -
29886 - // Output
29887 - virtual void ostream_print( std::ostream & ) const throw( VError );
29888 -
29889 - // Extract start of array of doubles
29890 - double *array() const;
29891 -};
29892 -
29893 -} // end of namespace _private_detail
29894 -
29895 -inline std::ostream &operator<<( std::ostream &file,
29896 - const _private_detail::VPMask &msk )
29897 -{
29898 - msk.ostream_print( file );
29899 - return( file );
29900 -}
29901 -
29902 -#endif /*!SWIG*/
29903 -
29904 -// Wrapper over VP?Mask with ref counting
29905 -class VMask {
29906 -protected:
29907 - struct refblock {
29908 - _private_detail::VPMask *pmask; // Mask: double or int
29909 - int nrefs; // Refs to us
29910 -
29911 - refblock() : pmask(0), nrefs(1) {}
29912 - virtual ~refblock() { delete pmask; }
29913 - };
29914 -
29915 - refblock *ref;
29916 -
29917 - // Make sure this is a private copy of pmask --- dup if nrefs != 1
29918 - void make_private();
29919 -
29920 -public:
29921 - // Constructor leaves msk uninitialised
29922 - VMask() { ref = new refblock; }
29923 -
29924 - // Copy constructor
29925 - VMask( const VMask &a ) { ref = a.ref; ref->nrefs++; }
29926 -
29927 - // Assignment
29928 - VMask &operator=( const VMask &a );
29929 -
29930 - // Destructor
29931 - virtual ~VMask();
29932 -
29933 - int xsize() const throw( VError )
29934 - { return( ref->pmask->xsize() ); }
29935 - int ysize() const throw( VError )
29936 - { return( ref->pmask->ysize() ); }
29937 - int size() const throw( VError )
29938 - { return( xsize() * ysize() ); }
29939 - const char *filename() const throw( VError )
29940 - { return( ref->pmask->filename() ); }
29941 -
29942 - // Extract underlying type
29943 - _private_detail::VPMask::VMaskType type() const
29944 - { return( ref->pmask->type ); }
29945 -
29946 - // Extract underlying VIPS pointer
29947 - _private_detail::MASKUNION mask() const { return( ref->pmask->data ); }
29948 -
29949 - void ostream_print( std::ostream & ) const;
29950 -};
29951 -
29952 -inline std::ostream &operator<<( std::ostream &file, const VMask &msk )
29953 -{
29954 - msk.ostream_print( file );
29955 - return( file );
29956 -}
29957 -
29958 -// Need to forward ref these
29959 -class VDMask;
29960 -class VImage;
29961 -
29962 -// Wrapper over _private_detail::VPIMask with ref counting
29963 -class VIMask : public VMask {
29964 -public:
29965 - VIMask( int xsize, int ysize )
29966 - {
29967 - ref->pmask = new _private_detail::VPIMask( xsize, ysize );
29968 - }
29969 -
29970 -/* Don't wrap the varargs constructor. We want Python to use the vector one.
29971 - */
29972 -#ifndef SWIG
29973 - VIMask( int xsize, int ysize, int scale, int offset, ... )
29974 - {
29975 - va_list ap;
29976 - int i;
29977 - std::vector<int> coeff( xsize * ysize );
29978 -
29979 - va_start( ap, offset );
29980 - for( i = 0; i < xsize * ysize; i++ )
29981 - coeff[i] = va_arg( ap, int );
29982 - va_end( ap );
29983 -
29984 - ref->pmask = new _private_detail::VPIMask( xsize, ysize,
29985 - scale, offset, coeff );
29986 - }
29987 -#endif /*!SWIG*/
29988 -
29989 - VIMask( int xsize, int ysize, int scale, int offset,
29990 - std::vector<int> coeff )
29991 - {
29992 - ref->pmask = new _private_detail::VPIMask( xsize, ysize,
29993 - scale, offset, coeff );
29994 - }
29995 -
29996 - VIMask( const char *name )
29997 - {
29998 - ref->pmask = new _private_detail::VPIMask( name );
29999 - }
30000 -
30001 - // No mask there yet
30002 - VIMask() {}
30003 -
30004 - int scale()
30005 - {
30006 - return( ((_private_detail::VPIMask *)ref->pmask)->scale() );
30007 - }
30008 -
30009 - int offset()
30010 - {
30011 - return( ((_private_detail::VPIMask *)ref->pmask)->offset() );
30012 - }
30013 -
30014 - // Embed INTMASK in VIMask
30015 - void embed( im__INTMASK * ) throw( VError );
30016 -
30017 - // Overload [] to get linear array subscript.
30018 - int &operator[]( int ) throw( VError );
30019 -
30020 - // Overload () to get matrix subscript.
30021 - int &operator()( int x, int y ) throw( VError )
30022 - { return( (*this)[x + y*xsize()] ); }
30023 -
30024 - // and as a function call that SWIG can wrap
30025 - int get( int i ) throw( VError )
30026 - { return( (*this)[i] ); }
30027 -
30028 - // Type conversion: INTMASK->DOUBLEMASK
30029 - operator VDMask();
30030 -
30031 - // Type conversion: INTMASK->image
30032 - operator VImage();
30033 -
30034 - // VIMask build functions
30035 - static VIMask gauss( double, double ) throw( VError );
30036 - static VIMask gauss_sep( double, double ) throw( VError );
30037 - static VIMask log( double, double ) throw( VError );
30038 -
30039 - // VIMask manipulation
30040 - VIMask rotate45() throw( VError );
30041 - VIMask rotate90() throw( VError );
30042 -
30043 - // Arithmetic ... cast to double, and use VDMask funcs. For some
30044 - // reason, the compiler won't let us do casts to VDImage yet, so no
30045 - // inlines.
30046 - VDMask trn() throw( VError );
30047 - VDMask inv() throw( VError );
30048 - VDMask cat( VDMask ) throw( VError );
30049 - VDMask mul( VDMask ) throw( VError );
30050 -};
30051 -
30052 -// Wrapper over _private_detail::VPDMask with ref counting
30053 -class VDMask : public VMask {
30054 -public:
30055 - VDMask( int xsize, int ysize )
30056 - {
30057 - ref->pmask = new _private_detail::VPDMask( xsize, ysize );
30058 - }
30059 -
30060 -/* Don't wrap the varargs constructor. We want Python to use the vector one.
30061 - */
30062 -#ifndef SWIG
30063 - VDMask( int xsize, int ysize, double scale, double offset, ... )
30064 - {
30065 - va_list ap;
30066 - int i;
30067 - std::vector<double> coeff( xsize * ysize );
30068 -
30069 - va_start( ap, offset );
30070 - for( i = 0; i < xsize * ysize; i++ )
30071 - coeff[i] = va_arg( ap, double );
30072 - va_end( ap );
30073 -
30074 - ref->pmask = new _private_detail::VPDMask( xsize, ysize,
30075 - scale, offset, coeff );
30076 - }
30077 -#endif /*!SWIG*/
30078 -
30079 - VDMask( int xsize, int ysize, double scale, double offset,
30080 - std::vector<double> coeff )
30081 - {
30082 - ref->pmask = new _private_detail::VPDMask( xsize, ysize,
30083 - scale, offset, coeff );
30084 - }
30085 -
30086 - VDMask( const char *name )
30087 - {
30088 - ref->pmask = new _private_detail::VPDMask( name );
30089 - }
30090 -
30091 - // No mask yet
30092 - VDMask() { }
30093 -
30094 - // Embed DOUBLEMASK in VDMask
30095 - void embed( im__DOUBLEMASK * ) throw( VError );
30096 -
30097 - double scale() throw( VError )
30098 - {
30099 - return( ((_private_detail::VPDMask *)ref->pmask)->scale() );
30100 - }
30101 -
30102 - double offset() throw( VError )
30103 - {
30104 - return( ((_private_detail::VPDMask *)ref->pmask)->offset() );
30105 - }
30106 -
30107 - // Overload [] to get linear array subscript.
30108 - double &operator[]( int ) throw( VError );
30109 -
30110 - // Overload () to get matrix subscript.
30111 - double &operator()( int x, int y ) throw( VError )
30112 - { return( (*this)[x + y*xsize()] ); }
30113 -
30114 - // and as a function call that SWIG can wrap
30115 - double get( int i ) throw( VError )
30116 - { return( (*this)[i] ); }
30117 -
30118 - // Type conversion: double->int
30119 - operator VIMask();
30120 -
30121 - // Type conversion: DOUBLEMASK->image
30122 - operator VImage() throw( VError );
30123 -
30124 - // VDMask build functions
30125 - static VDMask gauss( double, double ) throw( VError );
30126 - static VDMask log( double, double ) throw( VError );
30127 -
30128 - // VDMask manipulation
30129 - VDMask rotate45() throw( VError );
30130 - VDMask rotate90() throw( VError );
30131 -
30132 - // Scale to intmask
30133 - VIMask scalei() throw( VError );
30134 -
30135 - // Simple arithmetic
30136 - VDMask trn() throw( VError );
30137 - VDMask inv() throw( VError );
30138 - VDMask cat( VDMask ) throw( VError );
30139 - VDMask mul( VDMask ) throw( VError );
30140 -};
30141 -
30142 -VIPS_NAMESPACE_END
30143 -
30144 -#endif /*IM_VMASK_H*/
30145 diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/Makefile.am vips-7.38.5/libvipsCC/Makefile.am
30146 --- vips-7.38.5-vanilla/libvipsCC/Makefile.am 2014-07-17 23:48:36.237794473 -0400
30147 +++ vips-7.38.5/libvipsCC/Makefile.am 1969-12-31 19:00:00.000000000 -0500
30148 @@ -1,37 +0,0 @@
30149 -SUBDIRS = \
30150 - include
30151 -
30152 -AM_CPPFLAGS = \
30153 - -I$(top_srcdir)/libvips/include \
30154 - -I$(top_srcdir)/libvipsCC/include \
30155 - @VIPS_CFLAGS@
30156 -
30157 -lib_LTLIBRARIES = libvipsCC.la
30158 -
30159 -libvipsCC_la_SOURCES = \
30160 - VImage.cc \
30161 - VError.cc \
30162 - VDisplay.cc \
30163 - VMask.cc
30164 -
30165 -libvipsCC_la_LDFLAGS = \
30166 - -no-undefined \
30167 - -version-info @LIBRARY_CURRENT@:@LIBRARY_REVISION@:@LIBRARY_AGE@
30168 -
30169 -libvipsCC_la_LIBADD = \
30170 - $(top_builddir)/libvips/libvips.la @VIPS_LIBS@
30171 -
30172 -# swap the 'awk' line for this:
30173 -# awk '{if($$1!="deprecated") print $$1}'` ; \
30174 -# to not generate the wrappers for deprecated functions
30175 -vipsc++.cc:
30176 - packages=`vips list packages | \
30177 - awk '{print $$1}'` ; \
30178 - echo > vipsc++.cc ; \
30179 - for name in $$packages; do \
30180 - echo "// bodies for package $$name" >> vipsc++.cc ; \
30181 - vips cppc $$name >> vipsc++.cc ; \
30182 - echo >> vipsc++.cc ; \
30183 - done
30184 -
30185 -EXTRA_DIST = vipsc++.cc
30186 diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/Makefile.in vips-7.38.5/libvipsCC/Makefile.in
30187 --- vips-7.38.5-vanilla/libvipsCC/Makefile.in 2014-07-17 23:48:36.237794473 -0400
30188 +++ vips-7.38.5/libvipsCC/Makefile.in 1969-12-31 19:00:00.000000000 -0500
30189 @@ -1,898 +0,0 @@
30190 -# Makefile.in generated by automake 1.13.3 from Makefile.am.
30191 -# @configure_input@
30192 -
30193 -# Copyright (C) 1994-2013 Free Software Foundation, Inc.
30194 -
30195 -# This Makefile.in is free software; the Free Software Foundation
30196 -# gives unlimited permission to copy and/or distribute it,
30197 -# with or without modifications, as long as this notice is preserved.
30198 -
30199 -# This program is distributed in the hope that it will be useful,
30200 -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
30201 -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
30202 -# PARTICULAR PURPOSE.
30203 -
30204 -@SET_MAKE@
30205 -
30206 -VPATH = @srcdir@
30207 -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
30208 -am__make_running_with_option = \
30209 - case $${target_option-} in \
30210 - ?) ;; \
30211 - *) echo "am__make_running_with_option: internal error: invalid" \
30212 - "target option '$${target_option-}' specified" >&2; \
30213 - exit 1;; \
30214 - esac; \
30215 - has_opt=no; \
30216 - sane_makeflags=$$MAKEFLAGS; \
30217 - if $(am__is_gnu_make); then \
30218 - sane_makeflags=$$MFLAGS; \
30219 - else \
30220 - case $$MAKEFLAGS in \
30221 - *\\[\ \ ]*) \
30222 - bs=\\; \
30223 - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
30224 - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
30225 - esac; \
30226 - fi; \
30227 - skip_next=no; \
30228 - strip_trailopt () \
30229 - { \
30230 - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
30231 - }; \
30232 - for flg in $$sane_makeflags; do \
30233 - test $$skip_next = yes && { skip_next=no; continue; }; \
30234 - case $$flg in \
30235 - *=*|--*) continue;; \
30236 - -*I) strip_trailopt 'I'; skip_next=yes;; \
30237 - -*I?*) strip_trailopt 'I';; \
30238 - -*O) strip_trailopt 'O'; skip_next=yes;; \
30239 - -*O?*) strip_trailopt 'O';; \
30240 - -*l) strip_trailopt 'l'; skip_next=yes;; \
30241 - -*l?*) strip_trailopt 'l';; \
30242 - -[dEDm]) skip_next=yes;; \
30243 - -[JT]) skip_next=yes;; \
30244 - esac; \
30245 - case $$flg in \
30246 - *$$target_option*) has_opt=yes; break;; \
30247 - esac; \
30248 - done; \
30249 - test $$has_opt = yes
30250 -am__make_dryrun = (target_option=n; $(am__make_running_with_option))
30251 -am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
30252 -pkgdatadir = $(datadir)/@PACKAGE@
30253 -pkgincludedir = $(includedir)/@PACKAGE@
30254 -pkglibdir = $(libdir)/@PACKAGE@
30255 -pkglibexecdir = $(libexecdir)/@PACKAGE@
30256 -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
30257 -install_sh_DATA = $(install_sh) -c -m 644
30258 -install_sh_PROGRAM = $(install_sh) -c
30259 -install_sh_SCRIPT = $(install_sh) -c
30260 -INSTALL_HEADER = $(INSTALL_DATA)
30261 -transform = $(program_transform_name)
30262 -NORMAL_INSTALL = :
30263 -PRE_INSTALL = :
30264 -POST_INSTALL = :
30265 -NORMAL_UNINSTALL = :
30266 -PRE_UNINSTALL = :
30267 -POST_UNINSTALL = :
30268 -build_triplet = @build@
30269 -host_triplet = @host@
30270 -subdir = libvipsCC
30271 -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
30272 - $(top_srcdir)/depcomp
30273 -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
30274 -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
30275 - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \
30276 - $(top_srcdir)/configure.ac
30277 -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
30278 - $(ACLOCAL_M4)
30279 -mkinstalldirs = $(install_sh) -d
30280 -CONFIG_HEADER = $(top_builddir)/config.h
30281 -CONFIG_CLEAN_FILES =
30282 -CONFIG_CLEAN_VPATH_FILES =
30283 -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
30284 -am__vpath_adj = case $$p in \
30285 - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
30286 - *) f=$$p;; \
30287 - esac;
30288 -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
30289 -am__install_max = 40
30290 -am__nobase_strip_setup = \
30291 - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
30292 -am__nobase_strip = \
30293 - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
30294 -am__nobase_list = $(am__nobase_strip_setup); \
30295 - for p in $$list; do echo "$$p $$p"; done | \
30296 - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
30297 - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
30298 - if (++n[$$2] == $(am__install_max)) \
30299 - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
30300 - END { for (dir in files) print dir, files[dir] }'
30301 -am__base_list = \
30302 - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
30303 - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
30304 -am__uninstall_files_from_dir = { \
30305 - test -z "$$files" \
30306 - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
30307 - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
30308 - $(am__cd) "$$dir" && rm -f $$files; }; \
30309 - }
30310 -am__installdirs = "$(DESTDIR)$(libdir)"
30311 -LTLIBRARIES = $(lib_LTLIBRARIES)
30312 -libvipsCC_la_DEPENDENCIES = $(top_builddir)/libvips/libvips.la
30313 -am_libvipsCC_la_OBJECTS = VImage.lo VError.lo VDisplay.lo VMask.lo
30314 -libvipsCC_la_OBJECTS = $(am_libvipsCC_la_OBJECTS)
30315 -AM_V_lt = $(am__v_lt_@AM_V@)
30316 -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
30317 -am__v_lt_0 = --silent
30318 -am__v_lt_1 =
30319 -libvipsCC_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
30320 - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
30321 - $(CXXFLAGS) $(libvipsCC_la_LDFLAGS) $(LDFLAGS) -o $@
30322 -AM_V_P = $(am__v_P_@AM_V@)
30323 -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
30324 -am__v_P_0 = false
30325 -am__v_P_1 = :
30326 -AM_V_GEN = $(am__v_GEN_@AM_V@)
30327 -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
30328 -am__v_GEN_0 = @echo " GEN " $@;
30329 -am__v_GEN_1 =
30330 -AM_V_at = $(am__v_at_@AM_V@)
30331 -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
30332 -am__v_at_0 = @
30333 -am__v_at_1 =
30334 -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
30335 -depcomp = $(SHELL) $(top_srcdir)/depcomp
30336 -am__depfiles_maybe = depfiles
30337 -am__mv = mv -f
30338 -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
30339 - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
30340 -LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
30341 - $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
30342 - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
30343 - $(AM_CXXFLAGS) $(CXXFLAGS)
30344 -AM_V_CXX = $(am__v_CXX_@AM_V@)
30345 -am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
30346 -am__v_CXX_0 = @echo " CXX " $@;
30347 -am__v_CXX_1 =
30348 -CXXLD = $(CXX)
30349 -CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
30350 - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
30351 - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
30352 -AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
30353 -am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
30354 -am__v_CXXLD_0 = @echo " CXXLD " $@;
30355 -am__v_CXXLD_1 =
30356 -SOURCES = $(libvipsCC_la_SOURCES)
30357 -DIST_SOURCES = $(libvipsCC_la_SOURCES)
30358 -RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
30359 - ctags-recursive dvi-recursive html-recursive info-recursive \
30360 - install-data-recursive install-dvi-recursive \
30361 - install-exec-recursive install-html-recursive \
30362 - install-info-recursive install-pdf-recursive \
30363 - install-ps-recursive install-recursive installcheck-recursive \
30364 - installdirs-recursive pdf-recursive ps-recursive \
30365 - tags-recursive uninstall-recursive
30366 -am__can_run_installinfo = \
30367 - case $$AM_UPDATE_INFO_DIR in \
30368 - n|no|NO) false;; \
30369 - *) (install-info --version) >/dev/null 2>&1;; \
30370 - esac
30371 -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
30372 - distclean-recursive maintainer-clean-recursive
30373 -am__recursive_targets = \
30374 - $(RECURSIVE_TARGETS) \
30375 - $(RECURSIVE_CLEAN_TARGETS) \
30376 - $(am__extra_recursive_targets)
30377 -AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
30378 - distdir
30379 -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
30380 -# Read a list of newline-separated strings from the standard input,
30381 -# and print each of them once, without duplicates. Input order is
30382 -# *not* preserved.
30383 -am__uniquify_input = $(AWK) '\
30384 - BEGIN { nonempty = 0; } \
30385 - { items[$$0] = 1; nonempty = 1; } \
30386 - END { if (nonempty) { for (i in items) print i; }; } \
30387 -'
30388 -# Make sure the list of sources is unique. This is necessary because,
30389 -# e.g., the same source file might be shared among _SOURCES variables
30390 -# for different programs/libraries.
30391 -am__define_uniq_tagged_files = \
30392 - list='$(am__tagged_files)'; \
30393 - unique=`for i in $$list; do \
30394 - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
30395 - done | $(am__uniquify_input)`
30396 -ETAGS = etags
30397 -CTAGS = ctags
30398 -DIST_SUBDIRS = $(SUBDIRS)
30399 -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
30400 -am__relativize = \
30401 - dir0=`pwd`; \
30402 - sed_first='s,^\([^/]*\)/.*$$,\1,'; \
30403 - sed_rest='s,^[^/]*/*,,'; \
30404 - sed_last='s,^.*/\([^/]*\)$$,\1,'; \
30405 - sed_butlast='s,/*[^/]*$$,,'; \
30406 - while test -n "$$dir1"; do \
30407 - first=`echo "$$dir1" | sed -e "$$sed_first"`; \
30408 - if test "$$first" != "."; then \
30409 - if test "$$first" = ".."; then \
30410 - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
30411 - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
30412 - else \
30413 - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
30414 - if test "$$first2" = "$$first"; then \
30415 - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
30416 - else \
30417 - dir2="../$$dir2"; \
30418 - fi; \
30419 - dir0="$$dir0"/"$$first"; \
30420 - fi; \
30421 - fi; \
30422 - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
30423 - done; \
30424 - reldir="$$dir2"
30425 -ACLOCAL = @ACLOCAL@
30426 -AMTAR = @AMTAR@
30427 -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
30428 -AR = @AR@
30429 -AS = @AS@
30430 -AUTOCONF = @AUTOCONF@
30431 -AUTOHEADER = @AUTOHEADER@
30432 -AUTOMAKE = @AUTOMAKE@
30433 -AWK = @AWK@
30434 -CATALOGS = @CATALOGS@
30435 -CATOBJEXT = @CATOBJEXT@
30436 -CC = @CC@
30437 -CCDEPMODE = @CCDEPMODE@
30438 -CFITSIO_CFLAGS = @CFITSIO_CFLAGS@
30439 -CFITSIO_LIBS = @CFITSIO_LIBS@
30440 -CFLAGS = @CFLAGS@
30441 -CPP = @CPP@
30442 -CPPFLAGS = @CPPFLAGS@
30443 -CXX = @CXX@
30444 -CXXCPP = @CXXCPP@
30445 -CXXDEPMODE = @CXXDEPMODE@
30446 -CXXFLAGS = @CXXFLAGS@
30447 -CYGPATH_W = @CYGPATH_W@
30448 -DATADIRNAME = @DATADIRNAME@
30449 -DEFS = @DEFS@
30450 -DEPDIR = @DEPDIR@
30451 -DLLTOOL = @DLLTOOL@
30452 -DLLWRAP = @DLLWRAP@
30453 -DSYMUTIL = @DSYMUTIL@
30454 -DUMPBIN = @DUMPBIN@
30455 -ECHO_C = @ECHO_C@
30456 -ECHO_N = @ECHO_N@
30457 -ECHO_T = @ECHO_T@
30458 -EGREP = @EGREP@
30459 -EXEEXT = @EXEEXT@
30460 -EXIF_CFLAGS = @EXIF_CFLAGS@
30461 -EXIF_LIBS = @EXIF_LIBS@
30462 -FFTW_CFLAGS = @FFTW_CFLAGS@
30463 -FFTW_LIBS = @FFTW_LIBS@
30464 -FGREP = @FGREP@
30465 -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
30466 -GMOFILES = @GMOFILES@
30467 -GMSGFMT = @GMSGFMT@
30468 -GREP = @GREP@
30469 -GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
30470 -GTHREAD_LIBS = @GTHREAD_LIBS@
30471 -GTKDOC_CHECK = @GTKDOC_CHECK@
30472 -GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
30473 -GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
30474 -GTKDOC_MKPDF = @GTKDOC_MKPDF@
30475 -GTKDOC_REBASE = @GTKDOC_REBASE@
30476 -HTML_DIR = @HTML_DIR@
30477 -IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@
30478 -IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@
30479 -INSTALL = @INSTALL@
30480 -INSTALL_DATA = @INSTALL_DATA@
30481 -INSTALL_PROGRAM = @INSTALL_PROGRAM@
30482 -INSTALL_SCRIPT = @INSTALL_SCRIPT@
30483 -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
30484 -INSTOBJEXT = @INSTOBJEXT@
30485 -INTLLIBS = @INTLLIBS@
30486 -INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
30487 -INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
30488 -INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
30489 -INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
30490 -INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
30491 -INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
30492 -INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
30493 -INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
30494 -JPEG_INCLUDES = @JPEG_INCLUDES@
30495 -JPEG_LIBS = @JPEG_LIBS@
30496 -LCMS_CFLAGS = @LCMS_CFLAGS@
30497 -LCMS_LIBS = @LCMS_LIBS@
30498 -LD = @LD@
30499 -LDFLAGS = @LDFLAGS@
30500 -LIBOBJS = @LIBOBJS@
30501 -LIBRARY_AGE = @LIBRARY_AGE@
30502 -LIBRARY_CURRENT = @LIBRARY_CURRENT@
30503 -LIBRARY_REVISION = @LIBRARY_REVISION@
30504 -LIBS = @LIBS@
30505 -LIBTOOL = @LIBTOOL@
30506 -LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@
30507 -LIBWEBP_LIBS = @LIBWEBP_LIBS@
30508 -LIPO = @LIPO@
30509 -LN_S = @LN_S@
30510 -LTLIBOBJS = @LTLIBOBJS@
30511 -MAGICK_CFLAGS = @MAGICK_CFLAGS@
30512 -MAGICK_LIBS = @MAGICK_LIBS@
30513 -MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@
30514 -MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@
30515 -MAKEINFO = @MAKEINFO@
30516 -MANIFEST_TOOL = @MANIFEST_TOOL@
30517 -MATIO_CFLAGS = @MATIO_CFLAGS@
30518 -MATIO_LIBS = @MATIO_LIBS@
30519 -MKDIR_P = @MKDIR_P@
30520 -MKINSTALLDIRS = @MKINSTALLDIRS@
30521 -MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@
30522 -MONOTONIC_LIBS = @MONOTONIC_LIBS@
30523 -MSGFMT = @MSGFMT@
30524 -MSGFMT_OPTS = @MSGFMT_OPTS@
30525 -NM = @NM@
30526 -NMEDIT = @NMEDIT@
30527 -OBJDUMP = @OBJDUMP@
30528 -OBJEXT = @OBJEXT@
30529 -OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
30530 -OPENEXR_LIBS = @OPENEXR_LIBS@
30531 -OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@
30532 -OPENSLIDE_LIBS = @OPENSLIDE_LIBS@
30533 -ORC_CFLAGS = @ORC_CFLAGS@
30534 -ORC_LIBS = @ORC_LIBS@
30535 -OTOOL = @OTOOL@
30536 -OTOOL64 = @OTOOL64@
30537 -PACKAGE = @PACKAGE@
30538 -PACKAGES_USED = @PACKAGES_USED@
30539 -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
30540 -PACKAGE_NAME = @PACKAGE_NAME@
30541 -PACKAGE_STRING = @PACKAGE_STRING@
30542 -PACKAGE_TARNAME = @PACKAGE_TARNAME@
30543 -PACKAGE_URL = @PACKAGE_URL@
30544 -PACKAGE_VERSION = @PACKAGE_VERSION@
30545 -PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
30546 -PANGOFT2_LIBS = @PANGOFT2_LIBS@
30547 -PATH_SEPARATOR = @PATH_SEPARATOR@
30548 -PKG_CONFIG = @PKG_CONFIG@
30549 -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
30550 -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
30551 -PNG_CFLAGS = @PNG_CFLAGS@
30552 -PNG_INCLUDES = @PNG_INCLUDES@
30553 -PNG_LIBS = @PNG_LIBS@
30554 -POFILES = @POFILES@
30555 -POSUB = @POSUB@
30556 -PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
30557 -PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
30558 -PYTHON = @PYTHON@
30559 -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
30560 -PYTHON_INCLUDES = @PYTHON_INCLUDES@
30561 -PYTHON_PLATFORM = @PYTHON_PLATFORM@
30562 -PYTHON_PREFIX = @PYTHON_PREFIX@
30563 -PYTHON_VERSION = @PYTHON_VERSION@
30564 -RANLIB = @RANLIB@
30565 -REQUIRED_CFLAGS = @REQUIRED_CFLAGS@
30566 -REQUIRED_LIBS = @REQUIRED_LIBS@
30567 -SED = @SED@
30568 -SET_MAKE = @SET_MAKE@
30569 -SHELL = @SHELL@
30570 -STRIP = @STRIP@
30571 -THREADS_CFLAGS = @THREADS_CFLAGS@
30572 -THREADS_LIBS = @THREADS_LIBS@
30573 -TIFF_CFLAGS = @TIFF_CFLAGS@
30574 -TIFF_INCLUDES = @TIFF_INCLUDES@
30575 -TIFF_LIBS = @TIFF_LIBS@
30576 -TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@
30577 -TYPE_INIT_LIBS = @TYPE_INIT_LIBS@
30578 -USE_NLS = @USE_NLS@
30579 -VERSION = @VERSION@
30580 -VIPS_CFLAGS = @VIPS_CFLAGS@
30581 -VIPS_CXX_LIBS = @VIPS_CXX_LIBS@
30582 -VIPS_EXEEXT = @VIPS_EXEEXT@
30583 -VIPS_INCLUDES = @VIPS_INCLUDES@
30584 -VIPS_LIBDIR = @VIPS_LIBDIR@
30585 -VIPS_LIBS = @VIPS_LIBS@
30586 -VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@
30587 -VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@
30588 -VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@
30589 -VIPS_VERSION = @VIPS_VERSION@
30590 -VIPS_VERSION_STRING = @VIPS_VERSION_STRING@
30591 -XGETTEXT = @XGETTEXT@
30592 -XMKMF = @XMKMF@
30593 -X_CFLAGS = @X_CFLAGS@
30594 -X_EXTRA_LIBS = @X_EXTRA_LIBS@
30595 -X_LIBS = @X_LIBS@
30596 -X_PRE_LIBS = @X_PRE_LIBS@
30597 -ZIP_INCLUDES = @ZIP_INCLUDES@
30598 -ZIP_LIBS = @ZIP_LIBS@
30599 -abs_builddir = @abs_builddir@
30600 -abs_srcdir = @abs_srcdir@
30601 -abs_top_builddir = @abs_top_builddir@
30602 -abs_top_srcdir = @abs_top_srcdir@
30603 -ac_ct_AR = @ac_ct_AR@
30604 -ac_ct_CC = @ac_ct_CC@
30605 -ac_ct_CXX = @ac_ct_CXX@
30606 -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
30607 -am__include = @am__include@
30608 -am__leading_dot = @am__leading_dot@
30609 -am__quote = @am__quote@
30610 -am__tar = @am__tar@
30611 -am__untar = @am__untar@
30612 -bindir = @bindir@
30613 -build = @build@
30614 -build_alias = @build_alias@
30615 -build_cpu = @build_cpu@
30616 -build_os = @build_os@
30617 -build_vendor = @build_vendor@
30618 -builddir = @builddir@
30619 -datadir = @datadir@
30620 -datarootdir = @datarootdir@
30621 -docdir = @docdir@
30622 -dvidir = @dvidir@
30623 -exec_prefix = @exec_prefix@
30624 -host = @host@
30625 -host_alias = @host_alias@
30626 -host_cpu = @host_cpu@
30627 -host_os = @host_os@
30628 -host_vendor = @host_vendor@
30629 -htmldir = @htmldir@
30630 -includedir = @includedir@
30631 -infodir = @infodir@
30632 -install_sh = @install_sh@
30633 -libdir = @libdir@
30634 -libexecdir = @libexecdir@
30635 -localedir = @localedir@
30636 -localstatedir = @localstatedir@
30637 -mandir = @mandir@
30638 -mkdir_p = @mkdir_p@
30639 -oldincludedir = @oldincludedir@
30640 -pdfdir = @pdfdir@
30641 -pkgpyexecdir = @pkgpyexecdir@
30642 -pkgpythondir = @pkgpythondir@
30643 -prefix = @prefix@
30644 -program_transform_name = @program_transform_name@
30645 -psdir = @psdir@
30646 -pyexecdir = @pyexecdir@
30647 -pythondir = @pythondir@
30648 -sbindir = @sbindir@
30649 -sharedstatedir = @sharedstatedir@
30650 -srcdir = @srcdir@
30651 -sysconfdir = @sysconfdir@
30652 -target_alias = @target_alias@
30653 -top_build_prefix = @top_build_prefix@
30654 -top_builddir = @top_builddir@
30655 -top_srcdir = @top_srcdir@
30656 -vips_introspection_sources = @vips_introspection_sources@
30657 -SUBDIRS = \
30658 - include
30659 -
30660 -AM_CPPFLAGS = \
30661 - -I$(top_srcdir)/libvips/include \
30662 - -I$(top_srcdir)/libvipsCC/include \
30663 - @VIPS_CFLAGS@
30664 -
30665 -lib_LTLIBRARIES = libvipsCC.la
30666 -libvipsCC_la_SOURCES = \
30667 - VImage.cc \
30668 - VError.cc \
30669 - VDisplay.cc \
30670 - VMask.cc
30671 -
30672 -libvipsCC_la_LDFLAGS = \
30673 - -no-undefined \
30674 - -version-info @LIBRARY_CURRENT@:@LIBRARY_REVISION@:@LIBRARY_AGE@
30675 -
30676 -libvipsCC_la_LIBADD = \
30677 - $(top_builddir)/libvips/libvips.la @VIPS_LIBS@
30678 -
30679 -EXTRA_DIST = vipsc++.cc
30680 -all: all-recursive
30681 -
30682 -.SUFFIXES:
30683 -.SUFFIXES: .cc .lo .o .obj
30684 -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
30685 - @for dep in $?; do \
30686 - case '$(am__configure_deps)' in \
30687 - *$$dep*) \
30688 - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
30689 - && { if test -f $@; then exit 0; else break; fi; }; \
30690 - exit 1;; \
30691 - esac; \
30692 - done; \
30693 - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvipsCC/Makefile'; \
30694 - $(am__cd) $(top_srcdir) && \
30695 - $(AUTOMAKE) --foreign libvipsCC/Makefile
30696 -.PRECIOUS: Makefile
30697 -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
30698 - @case '$?' in \
30699 - *config.status*) \
30700 - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
30701 - *) \
30702 - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
30703 - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
30704 - esac;
30705 -
30706 -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
30707 - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
30708 -
30709 -$(top_srcdir)/configure: $(am__configure_deps)
30710 - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
30711 -$(ACLOCAL_M4): $(am__aclocal_m4_deps)
30712 - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
30713 -$(am__aclocal_m4_deps):
30714 -
30715 -install-libLTLIBRARIES: $(lib_LTLIBRARIES)
30716 - @$(NORMAL_INSTALL)
30717 - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
30718 - list2=; for p in $$list; do \
30719 - if test -f $$p; then \
30720 - list2="$$list2 $$p"; \
30721 - else :; fi; \
30722 - done; \
30723 - test -z "$$list2" || { \
30724 - echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
30725 - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
30726 - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
30727 - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
30728 - }
30729 -
30730 -uninstall-libLTLIBRARIES:
30731 - @$(NORMAL_UNINSTALL)
30732 - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
30733 - for p in $$list; do \
30734 - $(am__strip_dir) \
30735 - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
30736 - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
30737 - done
30738 -
30739 -clean-libLTLIBRARIES:
30740 - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
30741 - @list='$(lib_LTLIBRARIES)'; \
30742 - locs=`for p in $$list; do echo $$p; done | \
30743 - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
30744 - sort -u`; \
30745 - test -z "$$locs" || { \
30746 - echo rm -f $${locs}; \
30747 - rm -f $${locs}; \
30748 - }
30749 -
30750 -libvipsCC.la: $(libvipsCC_la_OBJECTS) $(libvipsCC_la_DEPENDENCIES) $(EXTRA_libvipsCC_la_DEPENDENCIES)
30751 - $(AM_V_CXXLD)$(libvipsCC_la_LINK) -rpath $(libdir) $(libvipsCC_la_OBJECTS) $(libvipsCC_la_LIBADD) $(LIBS)
30752 -
30753 -mostlyclean-compile:
30754 - -rm -f *.$(OBJEXT)
30755 -
30756 -distclean-compile:
30757 - -rm -f *.tab.c
30758 -
30759 -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VDisplay.Plo@am__quote@
30760 -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VError.Plo@am__quote@
30761 -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VImage.Plo@am__quote@
30762 -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VMask.Plo@am__quote@
30763 -
30764 -.cc.o:
30765 -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
30766 -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
30767 -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
30768 -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
30769 -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
30770 -
30771 -.cc.obj:
30772 -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
30773 -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
30774 -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
30775 -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
30776 -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
30777 -
30778 -.cc.lo:
30779 -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
30780 -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
30781 -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
30782 -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
30783 -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
30784 -
30785 -mostlyclean-libtool:
30786 - -rm -f *.lo
30787 -
30788 -clean-libtool:
30789 - -rm -rf .libs _libs
30790 -
30791 -# This directory's subdirectories are mostly independent; you can cd
30792 -# into them and run 'make' without going through this Makefile.
30793 -# To change the values of 'make' variables: instead of editing Makefiles,
30794 -# (1) if the variable is set in 'config.status', edit 'config.status'
30795 -# (which will cause the Makefiles to be regenerated when you run 'make');
30796 -# (2) otherwise, pass the desired values on the 'make' command line.
30797 -$(am__recursive_targets):
30798 - @fail=; \
30799 - if $(am__make_keepgoing); then \
30800 - failcom='fail=yes'; \
30801 - else \
30802 - failcom='exit 1'; \
30803 - fi; \
30804 - dot_seen=no; \
30805 - target=`echo $@ | sed s/-recursive//`; \
30806 - case "$@" in \
30807 - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
30808 - *) list='$(SUBDIRS)' ;; \
30809 - esac; \
30810 - for subdir in $$list; do \
30811 - echo "Making $$target in $$subdir"; \
30812 - if test "$$subdir" = "."; then \
30813 - dot_seen=yes; \
30814 - local_target="$$target-am"; \
30815 - else \
30816 - local_target="$$target"; \
30817 - fi; \
30818 - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
30819 - || eval $$failcom; \
30820 - done; \
30821 - if test "$$dot_seen" = "no"; then \
30822 - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
30823 - fi; test -z "$$fail"
30824 -
30825 -ID: $(am__tagged_files)
30826 - $(am__define_uniq_tagged_files); mkid -fID $$unique
30827 -tags: tags-recursive
30828 -TAGS: tags
30829 -
30830 -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
30831 - set x; \
30832 - here=`pwd`; \
30833 - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
30834 - include_option=--etags-include; \
30835 - empty_fix=.; \
30836 - else \
30837 - include_option=--include; \
30838 - empty_fix=; \
30839 - fi; \
30840 - list='$(SUBDIRS)'; for subdir in $$list; do \
30841 - if test "$$subdir" = .; then :; else \
30842 - test ! -f $$subdir/TAGS || \
30843 - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
30844 - fi; \
30845 - done; \
30846 - $(am__define_uniq_tagged_files); \
30847 - shift; \
30848 - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
30849 - test -n "$$unique" || unique=$$empty_fix; \
30850 - if test $$# -gt 0; then \
30851 - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
30852 - "$$@" $$unique; \
30853 - else \
30854 - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
30855 - $$unique; \
30856 - fi; \
30857 - fi
30858 -ctags: ctags-recursive
30859 -
30860 -CTAGS: ctags
30861 -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
30862 - $(am__define_uniq_tagged_files); \
30863 - test -z "$(CTAGS_ARGS)$$unique" \
30864 - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
30865 - $$unique
30866 -
30867 -GTAGS:
30868 - here=`$(am__cd) $(top_builddir) && pwd` \
30869 - && $(am__cd) $(top_srcdir) \
30870 - && gtags -i $(GTAGS_ARGS) "$$here"
30871 -cscopelist: cscopelist-recursive
30872 -
30873 -cscopelist-am: $(am__tagged_files)
30874 - list='$(am__tagged_files)'; \
30875 - case "$(srcdir)" in \
30876 - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
30877 - *) sdir=$(subdir)/$(srcdir) ;; \
30878 - esac; \
30879 - for i in $$list; do \
30880 - if test -f "$$i"; then \
30881 - echo "$(subdir)/$$i"; \
30882 - else \
30883 - echo "$$sdir/$$i"; \
30884 - fi; \
30885 - done >> $(top_builddir)/cscope.files
30886 -
30887 -distclean-tags:
30888 - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
30889 -
30890 -distdir: $(DISTFILES)
30891 - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
30892 - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
30893 - list='$(DISTFILES)'; \
30894 - dist_files=`for file in $$list; do echo $$file; done | \
30895 - sed -e "s|^$$srcdirstrip/||;t" \
30896 - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
30897 - case $$dist_files in \
30898 - */*) $(MKDIR_P) `echo "$$dist_files" | \
30899 - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
30900 - sort -u` ;; \
30901 - esac; \
30902 - for file in $$dist_files; do \
30903 - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
30904 - if test -d $$d/$$file; then \
30905 - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
30906 - if test -d "$(distdir)/$$file"; then \
30907 - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
30908 - fi; \
30909 - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
30910 - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
30911 - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
30912 - fi; \
30913 - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
30914 - else \
30915 - test -f "$(distdir)/$$file" \
30916 - || cp -p $$d/$$file "$(distdir)/$$file" \
30917 - || exit 1; \
30918 - fi; \
30919 - done
30920 - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
30921 - if test "$$subdir" = .; then :; else \
30922 - $(am__make_dryrun) \
30923 - || test -d "$(distdir)/$$subdir" \
30924 - || $(MKDIR_P) "$(distdir)/$$subdir" \
30925 - || exit 1; \
30926 - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
30927 - $(am__relativize); \
30928 - new_distdir=$$reldir; \
30929 - dir1=$$subdir; dir2="$(top_distdir)"; \
30930 - $(am__relativize); \
30931 - new_top_distdir=$$reldir; \
30932 - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
30933 - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
30934 - ($(am__cd) $$subdir && \
30935 - $(MAKE) $(AM_MAKEFLAGS) \
30936 - top_distdir="$$new_top_distdir" \
30937 - distdir="$$new_distdir" \
30938 - am__remove_distdir=: \
30939 - am__skip_length_check=: \
30940 - am__skip_mode_fix=: \
30941 - distdir) \
30942 - || exit 1; \
30943 - fi; \
30944 - done
30945 -check-am: all-am
30946 -check: check-recursive
30947 -all-am: Makefile $(LTLIBRARIES)
30948 -installdirs: installdirs-recursive
30949 -installdirs-am:
30950 - for dir in "$(DESTDIR)$(libdir)"; do \
30951 - test -z "$$dir" || $(MKDIR_P) "$$dir"; \
30952 - done
30953 -install: install-recursive
30954 -install-exec: install-exec-recursive
30955 -install-data: install-data-recursive
30956 -uninstall: uninstall-recursive
30957 -
30958 -install-am: all-am
30959 - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
30960 -
30961 -installcheck: installcheck-recursive
30962 -install-strip:
30963 - if test -z '$(STRIP)'; then \
30964 - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
30965 - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
30966 - install; \
30967 - else \
30968 - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
30969 - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
30970 - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
30971 - fi
30972 -mostlyclean-generic:
30973 -
30974 -clean-generic:
30975 -
30976 -distclean-generic:
30977 - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
30978 - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
30979 -
30980 -maintainer-clean-generic:
30981 - @echo "This command is intended for maintainers to use"
30982 - @echo "it deletes files that may require special tools to rebuild."
30983 -clean: clean-recursive
30984 -
30985 -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
30986 - mostlyclean-am
30987 -
30988 -distclean: distclean-recursive
30989 - -rm -rf ./$(DEPDIR)
30990 - -rm -f Makefile
30991 -distclean-am: clean-am distclean-compile distclean-generic \
30992 - distclean-tags
30993 -
30994 -dvi: dvi-recursive
30995 -
30996 -dvi-am:
30997 -
30998 -html: html-recursive
30999 -
31000 -html-am:
31001 -
31002 -info: info-recursive
31003 -
31004 -info-am:
31005 -
31006 -install-data-am:
31007 -
31008 -install-dvi: install-dvi-recursive
31009 -
31010 -install-dvi-am:
31011 -
31012 -install-exec-am: install-libLTLIBRARIES
31013 -
31014 -install-html: install-html-recursive
31015 -
31016 -install-html-am:
31017 -
31018 -install-info: install-info-recursive
31019 -
31020 -install-info-am:
31021 -
31022 -install-man:
31023 -
31024 -install-pdf: install-pdf-recursive
31025 -
31026 -install-pdf-am:
31027 -
31028 -install-ps: install-ps-recursive
31029 -
31030 -install-ps-am:
31031 -
31032 -installcheck-am:
31033 -
31034 -maintainer-clean: maintainer-clean-recursive
31035 - -rm -rf ./$(DEPDIR)
31036 - -rm -f Makefile
31037 -maintainer-clean-am: distclean-am maintainer-clean-generic
31038 -
31039 -mostlyclean: mostlyclean-recursive
31040 -
31041 -mostlyclean-am: mostlyclean-compile mostlyclean-generic \
31042 - mostlyclean-libtool
31043 -
31044 -pdf: pdf-recursive
31045 -
31046 -pdf-am:
31047 -
31048 -ps: ps-recursive
31049 -
31050 -ps-am:
31051 -
31052 -uninstall-am: uninstall-libLTLIBRARIES
31053 -
31054 -.MAKE: $(am__recursive_targets) install-am install-strip
31055 -
31056 -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
31057 - check-am clean clean-generic clean-libLTLIBRARIES \
31058 - clean-libtool cscopelist-am ctags ctags-am distclean \
31059 - distclean-compile distclean-generic distclean-libtool \
31060 - distclean-tags distdir dvi dvi-am html html-am info info-am \
31061 - install install-am install-data install-data-am install-dvi \
31062 - install-dvi-am install-exec install-exec-am install-html \
31063 - install-html-am install-info install-info-am \
31064 - install-libLTLIBRARIES install-man install-pdf install-pdf-am \
31065 - install-ps install-ps-am install-strip installcheck \
31066 - installcheck-am installdirs installdirs-am maintainer-clean \
31067 - maintainer-clean-generic mostlyclean mostlyclean-compile \
31068 - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
31069 - tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
31070 -
31071 -
31072 -# swap the 'awk' line for this:
31073 -# awk '{if($$1!="deprecated") print $$1}'` ; \
31074 -# to not generate the wrappers for deprecated functions
31075 -vipsc++.cc:
31076 - packages=`vips list packages | \
31077 - awk '{print $$1}'` ; \
31078 - echo > vipsc++.cc ; \
31079 - for name in $$packages; do \
31080 - echo "// bodies for package $$name" >> vipsc++.cc ; \
31081 - vips cppc $$name >> vipsc++.cc ; \
31082 - echo >> vipsc++.cc ; \
31083 - done
31084 -
31085 -# Tell versions [3.59,3.63) of GNU make to not export all variables.
31086 -# Otherwise a system limit (for SysV at least) may be exceeded.
31087 -.NOEXPORT:
31088 diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/VDisplay.cc vips-7.38.5/libvipsCC/VDisplay.cc
31089 --- vips-7.38.5-vanilla/libvipsCC/VDisplay.cc 2014-07-17 23:48:36.237794473 -0400
31090 +++ vips-7.38.5/libvipsCC/VDisplay.cc 1969-12-31 19:00:00.000000000 -0500
31091 @@ -1,152 +0,0 @@
31092 -// Object part of VDisplay class
31093 -
31094 -/*
31095 -
31096 - Copyright (C) 1991-2001 The National Gallery
31097 -
31098 - This program is free software; you can redistribute it and/or modify
31099 - it under the terms of the GNU Lesser General Public License as published by
31100 - the Free Software Foundation; either version 2 of the License, or
31101 - (at your option) any later version.
31102 -
31103 - This program is distributed in the hope that it will be useful,
31104 - but WITHOUT ANY WARRANTY; without even the implied warranty of
31105 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31106 - GNU Lesser General Public License for more details.
31107 -
31108 - You should have received a copy of the GNU Lesser General Public License
31109 - along with this program; if not, write to the Free Software
31110 - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
31111 - 02110-1301 USA
31112 -
31113 - */
31114 -
31115 -/*
31116 -
31117 - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
31118 -
31119 - */
31120 -
31121 -#ifdef HAVE_CONFIG_H
31122 -#include <config.h>
31123 -#endif /*HAVE_CONFIG_H*/
31124 -#include <vips/intl.h>
31125 -
31126 -#include <cstdlib>
31127 -#include <cstring>
31128 -
31129 -#include <vips/vips.h>
31130 -#include <vips/internal.h>
31131 -
31132 -#include <vips/vipscpp.h>
31133 -
31134 -#ifdef WITH_DMALLOC
31135 -#include <dmalloc.h>
31136 -#endif /*WITH_DMALLOC*/
31137 -
31138 -VIPS_NAMESPACE_START
31139 -
31140 -/* Refcounting stuff first.
31141 - */
31142 -
31143 -// Free an im_col_display
31144 -static void
31145 -free_display( im_col_display *d )
31146 -{
31147 -}
31148 -
31149 -// Dupe an im_col_display
31150 -static im_col_display *
31151 -dup_display( im_col_display *in ) throw( VError )
31152 -{
31153 - return( in );
31154 -}
31155 -
31156 -// Remove lut
31157 -void VDisplay::refblock::cleanlut()
31158 -{
31159 - if( luts ) {
31160 - im_free( luts );
31161 - luts = 0;
31162 - }
31163 -}
31164 -
31165 -// Remove attached things
31166 -void VDisplay::refblock::cleanref()
31167 -{
31168 - if( disp && priv ) {
31169 - free_display( disp );
31170 - disp = 0;
31171 - priv = 0;
31172 - }
31173 - cleanlut();
31174 -}
31175 -
31176 -// Get ready to write to disp
31177 -void VDisplay::refblock::wready() throw( VError )
31178 -{
31179 - cleanlut();
31180 - if( !priv ) {
31181 - disp = dup_display( disp );
31182 - priv = 1;
31183 - }
31184 -}
31185 -
31186 -// Check that luts are up-to-date
31187 -void VDisplay::refblock::cluts() throw( VError )
31188 -{
31189 -}
31190 -
31191 -VDisplay::~VDisplay()
31192 -{
31193 - ref->nrefs--;
31194 - if( !ref->nrefs )
31195 - delete ref;
31196 -}
31197 -
31198 -VDisplay &VDisplay::operator=( const VDisplay &a )
31199 -{
31200 - ref->nrefs--;
31201 -
31202 - if( ref->nrefs > 0 )
31203 - // Need fresh
31204 - ref = new refblock;
31205 - else
31206 - // Recycle old
31207 - ref->cleanref();
31208 -
31209 - ref = a.ref;
31210 - ref->nrefs++;
31211 -
31212 - return( *this );
31213 -}
31214 -
31215 -VDisplay::VDisplay( const char *name ) throw( VError )
31216 -{
31217 - // Install display
31218 - ref = new refblock;
31219 - ref->disp = NULL;
31220 -}
31221 -
31222 -VDisplay::VDisplay()
31223 -{
31224 - // Just use sRGB
31225 - ref = new refblock;
31226 - ref->disp = im_col_displays( 7 );
31227 -}
31228 -
31229 -/*
31230 -
31231 -Setters and getters. We used to have a lot of code of the form:
31232 -
31233 -float &VDisplay::YCW()
31234 - { ref->wready(); return( ((im_col_display*)ref->disp)->d_YCW ); }
31235 -
31236 -This should be split to separate setters/getters so we can exploit const. Too
31237 -annoying to do this on such a useless class (I'm certain no one used these
31238 -functions anyway), fix in vips8.
31239 -
31240 - */
31241 -
31242 -VIPS_NAMESPACE_END
31243 -
31244 diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/VError.cc vips-7.38.5/libvipsCC/VError.cc
31245 --- vips-7.38.5-vanilla/libvipsCC/VError.cc 2014-07-17 23:48:36.237794473 -0400
31246 +++ vips-7.38.5/libvipsCC/VError.cc 1969-12-31 19:00:00.000000000 -0500
31247 @@ -1,100 +0,0 @@
31248 -// Code for error type
31249 -
31250 -/*
31251 -
31252 - Copyright (C) 1991-2001 The National Gallery
31253 -
31254 - This program is free software; you can redistribute it and/or modify
31255 - it under the terms of the GNU Lesser General Public License as published by
31256 - the Free Software Foundation; either version 2 of the License, or
31257 - (at your option) any later version.
31258 -
31259 - This program is distributed in the hope that it will be useful,
31260 - but WITHOUT ANY WARRANTY; without even the implied warranty of
31261 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31262 - GNU Lesser General Public License for more details.
31263 -
31264 - You should have received a copy of the GNU Lesser General Public License
31265 - along with this program; if not, write to the Free Software
31266 - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
31267 - 02110-1301 USA
31268 -
31269 - */
31270 -
31271 -/*
31272 -
31273 - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
31274 -
31275 - */
31276 -
31277 -#ifdef HAVE_CONFIG_H
31278 -#include <config.h>
31279 -#endif /*HAVE_CONFIG_H*/
31280 -#include <vips/intl.h>
31281 -
31282 -#include <cstdio>
31283 -#include <cstdlib>
31284 -
31285 -#include <iostream>
31286 -
31287 -#include <vips/vips.h>
31288 -
31289 -#include <vips/vipscpp.h>
31290 -
31291 -#ifdef WITH_DMALLOC
31292 -#include <dmalloc.h>
31293 -#endif /*WITH_DMALLOC*/
31294 -
31295 -VIPS_NAMESPACE_START
31296 -
31297 -void VError::perror()
31298 -{
31299 - std::cerr << _what;
31300 - exit( 1 );
31301 -}
31302 -
31303 -void VError::perror( const char *name )
31304 -{
31305 - std::cerr << name << ": " << _what;
31306 - exit( 1 );
31307 -}
31308 -
31309 -// Add a new bit to the end of the error buffer
31310 -VError &VError::app( const int i )
31311 -{
31312 - char buf[ 256 ];
31313 -
31314 - sprintf( buf, "%d", i );
31315 - _what += buf;
31316 -
31317 - return( *this );
31318 -}
31319 -
31320 -VError &VError::app( std::string txt )
31321 -{
31322 - _what += txt;
31323 -
31324 - return( *this );
31325 -};
31326 -
31327 -void VError::ostream_print( std::ostream &file ) const
31328 -{
31329 - file << _what;
31330 -}
31331 -
31332 -void verror( std::string str ) throw( VError )
31333 -{
31334 - VError err;
31335 -
31336 - err.app( "VIPS error: " );
31337 - if( str == "" ) {
31338 - err.app( im_error_buffer() );
31339 - im_error_clear();
31340 - }
31341 - else
31342 - err.app( str ).app( "\n" );
31343 -
31344 - throw( err );
31345 -}
31346 -
31347 -VIPS_NAMESPACE_END
31348 diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/VImage.cc vips-7.38.5/libvipsCC/VImage.cc
31349 --- vips-7.38.5-vanilla/libvipsCC/VImage.cc 2014-07-17 23:48:36.237794473 -0400
31350 +++ vips-7.38.5/libvipsCC/VImage.cc 1969-12-31 19:00:00.000000000 -0500
31351 @@ -1,524 +0,0 @@
31352 -// Object part of VImage class
31353 -
31354 -/*
31355 -
31356 - Copyright (C) 1991-2001 The National Gallery
31357 -
31358 - This program is free software; you can redistribute it and/or modify
31359 - it under the terms of the GNU Lesser General Public License as published by
31360 - the Free Software Foundation; either version 2 of the License, or
31361 - (at your option) any later version.
31362 -
31363 - This program is distributed in the hope that it will be useful,
31364 - but WITHOUT ANY WARRANTY; without even the implied warranty of
31365 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31366 - GNU Lesser General Public License for more details.
31367 -
31368 - You should have received a copy of the GNU Lesser General Public License
31369 - along with this program; if not, write to the Free Software
31370 - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
31371 - 02110-1301 USA
31372 -
31373 - */
31374 -
31375 -/*
31376 -
31377 - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
31378 -
31379 - */
31380 -
31381 -#ifdef HAVE_CONFIG_H
31382 -#include <config.h>
31383 -#endif /*HAVE_CONFIG_H*/
31384 -#include <vips/intl.h>
31385 -
31386 -#include <cstdlib>
31387 -#include <cstring>
31388 -#include <cstdio>
31389 -
31390 -#include <vips/vips.h>
31391 -#include <vips/internal.h>
31392 -#include <vips/debug.h>
31393 -
31394 -#include <vips/vipscpp.h>
31395 -
31396 -#ifdef WITH_DMALLOC
31397 -#include <dmalloc.h>
31398 -#endif /*WITH_DMALLOC*/
31399 -
31400 -/*
31401 -#define DEBUG
31402 - */
31403 -
31404 -VIPS_NAMESPACE_START
31405 -
31406 -/* Useful to have these as C++ functions.
31407 - */
31408 -bool init( const char *argv0 )
31409 -{
31410 - return( vips_init( argv0 ) == 0 );
31411 -}
31412 -
31413 -void shutdown()
31414 -{
31415 - vips_shutdown();
31416 -}
31417 -
31418 -void VImage::refblock::debug_print()
31419 -{
31420 - std::list<refblock *>::iterator i;
31421 -
31422 - printf( "refblock %p:\n", this );
31423 - printf( " im = %p", im );
31424 - if( im && im->filename )
31425 - printf( " (im->filename = \"%s\")", im->filename );
31426 - printf( "\n" );
31427 - printf( " close_on_delete = %d\n", close_on_delete );
31428 - printf( " nrefs (refs to us) = %d\n", nrefs );
31429 - printf( " orefs (refs we make) = refblocks " );
31430 - for( i = orefs.begin(); i != orefs.end(); i++ )
31431 - printf( "%p ", *i );
31432 - printf( "\n" );
31433 -}
31434 -
31435 -// dump all refblocks for debugging
31436 -void VImage::print_all()
31437 -{
31438 -#ifdef DEBUG
31439 - std::list<VImage::refblock *>::iterator i;
31440 -
31441 - printf( "*** VImage::refblock::print_all() start\n" );
31442 - for( i = all_refblock.begin(); i != all_refblock.end(); i++ )
31443 - (*i)->debug_print();
31444 - printf( "*** VImage::refblock::print_all() end\n" );
31445 -#endif /*DEBUG*/
31446 -}
31447 -
31448 -// easy call from C version
31449 -void im__ccp_print_all()
31450 -{
31451 - VImage::print_all();
31452 -}
31453 -
31454 -// constructor
31455 -VImage::refblock::refblock()
31456 -{
31457 - im = 0;
31458 - close_on_delete = 1;
31459 - nrefs = 1;
31460 -
31461 -#ifdef DEBUG
31462 - all_refblock.push_front( this );
31463 -#endif /*DEBUG*/
31464 -}
31465 -
31466 -// Add a ref - this (output image) depends upon VipsImage in
31467 -void VImage::refblock::addref( refblock *in ) throw( VError )
31468 -{
31469 - if( this == in )
31470 - verror( "sanity failure" );
31471 -
31472 - in->nrefs++;
31473 - orefs.push_front( in );
31474 -}
31475 -
31476 -VImage::refblock::~refblock() throw( VError )
31477 -{
31478 -#ifdef DEBUG
31479 - printf( "VImage::refblock::removeref(): death!\n" );
31480 - debug_print();
31481 -#endif /*DEBUG*/
31482 -
31483 - std::list<refblock *>::iterator i;
31484 -
31485 - if( close_on_delete && im ) {
31486 - if( im_close( im ) )
31487 - verror();
31488 - im = 0;
31489 - }
31490 -
31491 - // remove any refs we have ... may trigger other destructs in turn
31492 - for( i = orefs.begin(); i != orefs.end(); i++ )
31493 - (*i)->removeref();
31494 -
31495 -#ifdef DEBUG
31496 - all_refblock.remove( this );
31497 -#endif /*DEBUG*/
31498 -}
31499 -
31500 -// Remove a ref
31501 -void VImage::refblock::removeref() throw( VError )
31502 -{
31503 - nrefs--;
31504 - if( nrefs < 0 )
31505 - verror( "too many closes!" );
31506 - if( nrefs == 0 )
31507 - delete this;
31508 -}
31509 -
31510 -// Init with name ... mode defaults to "rd"
31511 -VImage::VImage( const char *name, const char *mode ) throw( VError )
31512 -{
31513 - _ref = new refblock;
31514 -
31515 - if( !(_ref->im = im_open( name, mode )) )
31516 - verror();
31517 - _ref->close_on_delete = 1;
31518 -
31519 -#ifdef DEBUG
31520 - printf( "VImage::VImage( \"%s\", \"%s\" )\n", name, mode );
31521 - _ref->debug_print();
31522 -#endif /*DEBUG*/
31523 -}
31524 -
31525 -// Build a VImage from an VipsImage structure
31526 -VImage::VImage( _VipsImage *in )
31527 -{
31528 - _ref = new refblock;
31529 -
31530 - _ref->im = in;
31531 - _ref->close_on_delete = 0;
31532 -
31533 -#ifdef DEBUG
31534 - printf( "VImage::VImage( VipsImage* %p )\n", in );
31535 - _ref->debug_print();
31536 -#endif /*DEBUG*/
31537 -}
31538 -
31539 -// Build from memory buffer
31540 -VImage::VImage( void *buffer, int width, int height,
31541 - int bands, TBandFmt format ) throw( VError )
31542 -{
31543 - _ref = new refblock;
31544 -
31545 - if( !(_ref->im = im_image( buffer, width, height,
31546 - bands, VipsBandFmt( format ) )) )
31547 - verror();
31548 - _ref->close_on_delete = 1;
31549 -
31550 -#ifdef DEBUG
31551 - printf( "VImage::VImage( void* %p, %d, %d )\n",
31552 - buffer, width, height );
31553 - _ref->debug_print();
31554 -#endif /*DEBUG*/
31555 -}
31556 -
31557 -// Empty init ... means open intermediate
31558 -VImage::VImage() throw( VError )
31559 -{
31560 - static int id = 0;
31561 - char filename[256];
31562 -
31563 - _ref = new refblock;
31564 -
31565 - /* This is not 100% safe if VIPS threading is not implemented on this
31566 - * platform ... but it doesn't really matter.
31567 - */
31568 - g_mutex_lock( im__global_lock );
31569 - im_snprintf( filename, 256, "intermediate image #%d", id++ );
31570 - g_mutex_unlock( im__global_lock );
31571 -
31572 - if( !(_ref->im = im_open( filename, "p" )) )
31573 - verror();
31574 - _ref->close_on_delete = 1;
31575 -
31576 -#ifdef DEBUG
31577 - printf( "VImage::VImage()\n" );
31578 - _ref->debug_print();
31579 -#endif /*DEBUG*/
31580 -}
31581 -
31582 -// Copy constructor
31583 -VImage::VImage( const VImage &a )
31584 -{
31585 - _ref = a._ref;
31586 - _ref->nrefs++;
31587 -}
31588 -
31589 -// Assignment
31590 -VImage &VImage::operator=( const VImage &a ) throw( VError )
31591 -{
31592 - _ref->removeref();
31593 - _ref = a._ref;
31594 - _ref->nrefs++;
31595 -
31596 - return( *this );
31597 -}
31598 -
31599 -// Extract underlying data pointer
31600 -void *VImage::data() const throw( VError )
31601 -{
31602 - if( im_incheck( _ref->im ) )
31603 - verror();
31604 -
31605 - return( (void *) _ref->im->data );
31606 -}
31607 -
31608 -void VImage::debug_print()
31609 -{
31610 - im_printdesc( image() );
31611 -}
31612 -
31613 -// Like jpeg2vips, but convert to a disc file rather than to memory
31614 -// We can handle huge files without running out of RAM
31615 -VImage VImage::convert2disc( const char* convert,
31616 - const char* in, const char* disc ) throw( VError )
31617 -{
31618 - VImage out( disc, "w" );
31619 -
31620 - Vargv _vec( convert );
31621 -
31622 - _vec.data(0) = (im_object) in;
31623 - _vec.data(1) = out.image();
31624 - _vec.call();
31625 -
31626 - return( out );
31627 -}
31628 -
31629 -// Write this to a VImage
31630 -VImage VImage::write( VImage out ) throw( VError )
31631 -{
31632 - if( im_copy( _ref->im, out._ref->im ) )
31633 - verror();
31634 - out._ref->addref( _ref );
31635 -
31636 - return( out );
31637 -}
31638 -
31639 -VImage VImage::write( const char *name ) throw( VError )
31640 -{
31641 - VImage out( name, "w" );
31642 -
31643 - if( im_copy( _ref->im, out._ref->im ) )
31644 - verror();
31645 - out._ref->addref( _ref );
31646 -
31647 - return( out );
31648 -}
31649 -
31650 -VImage VImage::write() throw( VError )
31651 -{
31652 - VImage out( "VImage:w1", "t" );
31653 -
31654 - if( im_copy( _ref->im, out._ref->im ) )
31655 - verror();
31656 - out._ref->addref( _ref );
31657 -
31658 - return( out );
31659 -}
31660 -
31661 -// Projection functions to get header fields
31662 -int VImage::Xsize() { return( _ref->im->Xsize ); }
31663 -int VImage::Ysize() { return( _ref->im->Ysize ); }
31664 -int VImage::Bands() { return( _ref->im->Bands ); }
31665 -VImage::TBandFmt VImage::BandFmt()
31666 - { return( (TBandFmt) _ref->im->BandFmt ); }
31667 -VImage::TCoding VImage::Coding()
31668 - { return( (TCoding) _ref->im->Coding ); }
31669 -VImage::TType VImage::Type() { return( (TType) _ref->im->Type ); }
31670 -float VImage::Xres() { return( _ref->im->Xres ); }
31671 -float VImage::Yres() { return( _ref->im->Yres ); }
31672 -int VImage::Length() { return( _ref->im->Length ); }
31673 -VImage::TCompression VImage::Compression()
31674 - { return( (TCompression) _ref->im->Compression ); }
31675 -short VImage::Level() { return( _ref->im->Level ); }
31676 -int VImage::Xoffset() { return( _ref->im->Xoffset ); }
31677 -int VImage::Yoffset() { return( _ref->im->Yoffset ); }
31678 -
31679 -// Derived fields
31680 -const char *VImage::filename() { return( _ref->im->filename ); }
31681 -const char *VImage::Hist() { return( im_history_get( _ref->im ) ); }
31682 -
31683 -// metadata
31684 -
31685 -// base functionality
31686 -void VImage::meta_set( const char *field, GValue *value ) throw( VError )
31687 -{
31688 - if( im_meta_set( _ref->im, field, value ) )
31689 - verror();
31690 -}
31691 -
31692 -gboolean VImage::meta_remove( const char *field )
31693 -{
31694 - return( im_meta_remove( _ref->im, field ) );
31695 -}
31696 -
31697 -void VImage::meta_get( const char *field, GValue *value_copy ) throw( VError )
31698 -{
31699 - if( im_meta_get( _ref->im, field, value_copy ) )
31700 - verror();
31701 -}
31702 -
31703 -GType VImage::meta_get_typeof( const char *field )
31704 -{
31705 - return( im_meta_get_typeof( _ref->im, field ) );
31706 -}
31707 -
31708 -// convenience functions
31709 -int VImage::meta_get_int( const char *field )
31710 - throw( VError )
31711 -{
31712 - int result;
31713 -
31714 - if( im_meta_get_int( _ref->im, field, &result ) )
31715 - verror();
31716 -
31717 - return( result );
31718 -}
31719 -
31720 -double VImage::meta_get_double( const char *field )
31721 - throw( VError )
31722 -{
31723 - double result;
31724 -
31725 - if( im_meta_get_double( _ref->im, field, &result ) )
31726 - verror();
31727 -
31728 - return( result );
31729 -}
31730 -
31731 -const char *VImage::meta_get_string( const char *field )
31732 - throw( VError )
31733 -{
31734 - const char *result;
31735 -
31736 - if( im_meta_get_string( _ref->im, field, &result ) )
31737 - verror();
31738 -
31739 - return( result );
31740 -}
31741 -
31742 -void *VImage::meta_get_area( const char *field ) throw( VError )
31743 -{
31744 - void *result;
31745 -
31746 - if( im_meta_get_area( _ref->im, field, &result ) )
31747 - verror();
31748 -
31749 - return( result );
31750 -}
31751 -
31752 -void *VImage::meta_get_blob( const char *field, size_t *length ) throw( VError )
31753 -{
31754 - void *result;
31755 -
31756 - if( im_meta_get_blob( _ref->im, field, &result, length ) )
31757 - verror();
31758 -
31759 - return( result );
31760 -}
31761 -
31762 -void VImage::meta_set( const char *field, int value )
31763 - throw( VError )
31764 -{
31765 - if( im_meta_set_int( _ref->im, field, value ) )
31766 - verror();
31767 -}
31768 -
31769 -void VImage::meta_set( const char *field, double value )
31770 - throw( VError )
31771 -{
31772 - if( im_meta_set_double( _ref->im, field, value ) )
31773 - verror();
31774 -}
31775 -
31776 -void VImage::meta_set( const char *field, const char *value )
31777 - throw( VError )
31778 -{
31779 - if( im_meta_set_string( _ref->im, field, value ) )
31780 - verror();
31781 -}
31782 -
31783 -void VImage::meta_set( const char *field,
31784 - VCallback free_fn, void *value )
31785 - throw( VError )
31786 -{
31787 - if( im_meta_set_area( _ref->im, field, free_fn, value ) )
31788 - verror();
31789 -}
31790 -
31791 -void VImage::meta_set( const char *field,
31792 - VCallback free_fn, void *value, size_t length )
31793 - throw( VError )
31794 -{
31795 - if( im_meta_set_blob( _ref->im, field, free_fn, value, length ) )
31796 - verror();
31797 -}
31798 -
31799 -// Set header fields and setbuf() in one go.
31800 -void VImage::initdesc( int x, int y, int b,
31801 - TBandFmt f, TCoding c, TType t, float xr, float yr, int xo, int yo )
31802 - throw( VError )
31803 -{
31804 - im_initdesc( _ref->im, x, y, b, 0,
31805 - VipsBandFmt( f ), VipsCoding( c ), VipsType( t ),
31806 - xr, yr, xo, yo );
31807 - if( im_setupout( _ref->im ) )
31808 - verror();
31809 -}
31810 -
31811 -// Create a Vargv from a name
31812 -Vargv::Vargv( const char *name )
31813 -{
31814 - im_function *f = im_find_function( (char *) name );
31815 -
31816 - if( !f )
31817 - verror();
31818 -
31819 - fn = (im__function *) f;
31820 - base = new im_object[f->argc];
31821 - if( im_allocate_vargv( f, base ) ) {
31822 - delete[] base;
31823 - verror();
31824 - }
31825 -}
31826 -
31827 -// Destroy a Vargv
31828 -Vargv::~Vargv()
31829 -{
31830 - im_function *f = (im_function *) fn;
31831 -
31832 - // free any memory allocated for input vectors
31833 - // this is the stuff allocated in each function during _object* build,
31834 - // see vipsc++.cc
31835 - for( int i = 0; i < f->argc; i++ ) {
31836 - im_type_desc *ty = f->argv[i].desc;
31837 -
31838 - if( !(ty->flags & IM_TYPE_OUTPUT) ) {
31839 - if( strcmp( ty->type, IM_TYPE_IMAGEVEC ) == 0 ||
31840 - strcmp( ty->type, IM_TYPE_DOUBLEVEC ) == 0 ||
31841 - strcmp( ty->type, IM_TYPE_INTVEC ) == 0 ) {
31842 - // will work for doublevec and intvec too
31843 - im_imagevec_object *io =
31844 - (im_imagevec_object *) base[i];
31845 -
31846 - if( io->vec ) {
31847 - delete[] io->vec;
31848 - io->vec = NULL;
31849 - }
31850 - }
31851 - else if( strcmp( ty->type, IM_TYPE_INTERPOLATE ) == 0 )
31852 - g_object_unref( base[i] );
31853 - }
31854 - }
31855 -
31856 - im_free_vargv( f, base );
31857 - delete[] base;
31858 -}
31859 -
31860 -// Call the function
31861 -void
31862 -Vargv::call()
31863 -{
31864 - im_function *f = (im_function *) fn;
31865 -
31866 - if( f->disp( base ) )
31867 - verror();
31868 -}
31869 -
31870 -/* Insert automatically generated wrappers for VIPS image processing
31871 - * functions.
31872 - */
31873 -#include "vipsc++.cc"
31874 -
31875 -VIPS_NAMESPACE_END
31876 diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/vipsc++.cc vips-7.38.5/libvipsCC/vipsc++.cc
31877 --- vips-7.38.5-vanilla/libvipsCC/vipsc++.cc 2014-07-17 23:48:36.237794473 -0400
31878 +++ vips-7.38.5/libvipsCC/vipsc++.cc 1969-12-31 19:00:00.000000000 -0500
31879 @@ -1,6202 +0,0 @@
31880 -
31881 -// bodies for package arithmetic
31882 -// this file automatically generated from
31883 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
31884 -// im_abs: absolute value
31885 -VImage VImage::abs() throw( VError )
31886 -{
31887 - VImage in = *this;
31888 - VImage out;
31889 -
31890 - Vargv _vec( "im_abs" );
31891 -
31892 - _vec.data(0) = in.image();
31893 - _vec.data(1) = out.image();
31894 - _vec.call();
31895 - out._ref->addref( in._ref );
31896 -
31897 - return( out );
31898 -}
31899 -
31900 -// im_acostra: acos of image (result in degrees)
31901 -VImage VImage::acos() throw( VError )
31902 -{
31903 - VImage in = *this;
31904 - VImage out;
31905 -
31906 - Vargv _vec( "im_acostra" );
31907 -
31908 - _vec.data(0) = in.image();
31909 - _vec.data(1) = out.image();
31910 - _vec.call();
31911 - out._ref->addref( in._ref );
31912 -
31913 - return( out );
31914 -}
31915 -
31916 -// im_add: add two images
31917 -VImage VImage::add( VImage in2 ) throw( VError )
31918 -{
31919 - VImage in1 = *this;
31920 - VImage out;
31921 -
31922 - Vargv _vec( "im_add" );
31923 -
31924 - _vec.data(0) = in1.image();
31925 - _vec.data(1) = in2.image();
31926 - _vec.data(2) = out.image();
31927 - _vec.call();
31928 - out._ref->addref( in1._ref );
31929 - out._ref->addref( in2._ref );
31930 -
31931 - return( out );
31932 -}
31933 -
31934 -// im_asintra: asin of image (result in degrees)
31935 -VImage VImage::asin() throw( VError )
31936 -{
31937 - VImage in = *this;
31938 - VImage out;
31939 -
31940 - Vargv _vec( "im_asintra" );
31941 -
31942 - _vec.data(0) = in.image();
31943 - _vec.data(1) = out.image();
31944 - _vec.call();
31945 - out._ref->addref( in._ref );
31946 -
31947 - return( out );
31948 -}
31949 -
31950 -// im_atantra: atan of image (result in degrees)
31951 -VImage VImage::atan() throw( VError )
31952 -{
31953 - VImage in = *this;
31954 - VImage out;
31955 -
31956 - Vargv _vec( "im_atantra" );
31957 -
31958 - _vec.data(0) = in.image();
31959 - _vec.data(1) = out.image();
31960 - _vec.call();
31961 - out._ref->addref( in._ref );
31962 -
31963 - return( out );
31964 -}
31965 -
31966 -// im_avg: average value of image
31967 -double VImage::avg() throw( VError )
31968 -{
31969 - VImage in = *this;
31970 - double value;
31971 -
31972 - Vargv _vec( "im_avg" );
31973 -
31974 - _vec.data(0) = in.image();
31975 - _vec.call();
31976 - value = *((double*)_vec.data(1));
31977 -
31978 - return( value );
31979 -}
31980 -
31981 -// im_point: interpolate value at single point
31982 -double VImage::point( char* interpolate, double x, double y, int band ) throw( VError )
31983 -{
31984 - VImage in = *this;
31985 - double out;
31986 -
31987 - Vargv _vec( "im_point" );
31988 -
31989 - _vec.data(0) = in.image();
31990 - if( vips__input_interpolate_init( &_vec.data(1), interpolate ) )
31991 - verror();
31992 - *((double*) _vec.data(2)) = x;
31993 - *((double*) _vec.data(3)) = y;
31994 - *((int*) _vec.data(4)) = band;
31995 - _vec.call();
31996 - out = *((double*)_vec.data(5));
31997 -
31998 - return( out );
31999 -}
32000 -
32001 -// im_point_bilinear: interpolate value at single point, linearly
32002 -double VImage::point_bilinear( double x, double y, int band ) throw( VError )
32003 -{
32004 - VImage in = *this;
32005 - double val;
32006 -
32007 - Vargv _vec( "im_point_bilinear" );
32008 -
32009 - _vec.data(0) = in.image();
32010 - *((double*) _vec.data(1)) = x;
32011 - *((double*) _vec.data(2)) = y;
32012 - *((int*) _vec.data(3)) = band;
32013 - _vec.call();
32014 - val = *((double*)_vec.data(4));
32015 -
32016 - return( val );
32017 -}
32018 -
32019 -// im_bandmean: average image bands
32020 -VImage VImage::bandmean() throw( VError )
32021 -{
32022 - VImage in = *this;
32023 - VImage out;
32024 -
32025 - Vargv _vec( "im_bandmean" );
32026 -
32027 - _vec.data(0) = in.image();
32028 - _vec.data(1) = out.image();
32029 - _vec.call();
32030 - out._ref->addref( in._ref );
32031 -
32032 - return( out );
32033 -}
32034 -
32035 -// im_ceil: round to smallest integer value not less than
32036 -VImage VImage::ceil() throw( VError )
32037 -{
32038 - VImage in = *this;
32039 - VImage out;
32040 -
32041 - Vargv _vec( "im_ceil" );
32042 -
32043 - _vec.data(0) = in.image();
32044 - _vec.data(1) = out.image();
32045 - _vec.call();
32046 - out._ref->addref( in._ref );
32047 -
32048 - return( out );
32049 -}
32050 -
32051 -// im_costra: cos of image (angles in degrees)
32052 -VImage VImage::cos() throw( VError )
32053 -{
32054 - VImage in = *this;
32055 - VImage out;
32056 -
32057 - Vargv _vec( "im_costra" );
32058 -
32059 - _vec.data(0) = in.image();
32060 - _vec.data(1) = out.image();
32061 - _vec.call();
32062 - out._ref->addref( in._ref );
32063 -
32064 - return( out );
32065 -}
32066 -
32067 -// im_cross_phase: phase of cross power spectrum of two complex images
32068 -VImage VImage::cross_phase( VImage in2 ) throw( VError )
32069 -{
32070 - VImage in1 = *this;
32071 - VImage out;
32072 -
32073 - Vargv _vec( "im_cross_phase" );
32074 -
32075 - _vec.data(0) = in1.image();
32076 - _vec.data(1) = in2.image();
32077 - _vec.data(2) = out.image();
32078 - _vec.call();
32079 - out._ref->addref( in1._ref );
32080 - out._ref->addref( in2._ref );
32081 -
32082 - return( out );
32083 -}
32084 -
32085 -// im_deviate: standard deviation of image
32086 -double VImage::deviate() throw( VError )
32087 -{
32088 - VImage in = *this;
32089 - double value;
32090 -
32091 - Vargv _vec( "im_deviate" );
32092 -
32093 - _vec.data(0) = in.image();
32094 - _vec.call();
32095 - value = *((double*)_vec.data(1));
32096 -
32097 - return( value );
32098 -}
32099 -
32100 -// im_divide: divide two images
32101 -VImage VImage::divide( VImage in2 ) throw( VError )
32102 -{
32103 - VImage in1 = *this;
32104 - VImage out;
32105 -
32106 - Vargv _vec( "im_divide" );
32107 -
32108 - _vec.data(0) = in1.image();
32109 - _vec.data(1) = in2.image();
32110 - _vec.data(2) = out.image();
32111 - _vec.call();
32112 - out._ref->addref( in1._ref );
32113 - out._ref->addref( in2._ref );
32114 -
32115 - return( out );
32116 -}
32117 -
32118 -// im_exp10tra: 10^pel of image
32119 -VImage VImage::exp10() throw( VError )
32120 -{
32121 - VImage in = *this;
32122 - VImage out;
32123 -
32124 - Vargv _vec( "im_exp10tra" );
32125 -
32126 - _vec.data(0) = in.image();
32127 - _vec.data(1) = out.image();
32128 - _vec.call();
32129 - out._ref->addref( in._ref );
32130 -
32131 - return( out );
32132 -}
32133 -
32134 -// im_expntra: x^pel of image
32135 -VImage VImage::expn( double x ) throw( VError )
32136 -{
32137 - VImage in = *this;
32138 - VImage out;
32139 -
32140 - Vargv _vec( "im_expntra" );
32141 -
32142 - _vec.data(0) = in.image();
32143 - _vec.data(1) = out.image();
32144 - *((double*) _vec.data(2)) = x;
32145 - _vec.call();
32146 - out._ref->addref( in._ref );
32147 -
32148 - return( out );
32149 -}
32150 -
32151 -// im_expntra_vec: [x,y,z]^pel of image
32152 -VImage VImage::expn( std::vector<double> v ) throw( VError )
32153 -{
32154 - VImage in = *this;
32155 - VImage out;
32156 -
32157 - Vargv _vec( "im_expntra_vec" );
32158 -
32159 - _vec.data(0) = in.image();
32160 - _vec.data(1) = out.image();
32161 - ((im_doublevec_object*) _vec.data(2))->n = v.size();
32162 - ((im_doublevec_object*) _vec.data(2))->vec = new double[v.size()];
32163 - for( unsigned int i = 0; i < v.size(); i++ )
32164 - ((im_doublevec_object*) _vec.data(2))->vec[i] = v[i];
32165 - _vec.call();
32166 - out._ref->addref( in._ref );
32167 -
32168 - return( out );
32169 -}
32170 -
32171 -// im_exptra: e^pel of image
32172 -VImage VImage::exp() throw( VError )
32173 -{
32174 - VImage in = *this;
32175 - VImage out;
32176 -
32177 - Vargv _vec( "im_exptra" );
32178 -
32179 - _vec.data(0) = in.image();
32180 - _vec.data(1) = out.image();
32181 - _vec.call();
32182 - out._ref->addref( in._ref );
32183 -
32184 - return( out );
32185 -}
32186 -
32187 -// im_floor: round to largest integer value not greater than
32188 -VImage VImage::floor() throw( VError )
32189 -{
32190 - VImage in = *this;
32191 - VImage out;
32192 -
32193 - Vargv _vec( "im_floor" );
32194 -
32195 - _vec.data(0) = in.image();
32196 - _vec.data(1) = out.image();
32197 - _vec.call();
32198 - out._ref->addref( in._ref );
32199 -
32200 - return( out );
32201 -}
32202 -
32203 -// im_invert: photographic negative
32204 -VImage VImage::invert() throw( VError )
32205 -{
32206 - VImage in = *this;
32207 - VImage out;
32208 -
32209 - Vargv _vec( "im_invert" );
32210 -
32211 - _vec.data(0) = in.image();
32212 - _vec.data(1) = out.image();
32213 - _vec.call();
32214 - out._ref->addref( in._ref );
32215 -
32216 - return( out );
32217 -}
32218 -
32219 -// im_lintra: calculate a*in + b = outfile
32220 -VImage VImage::lin( double a, double b ) throw( VError )
32221 -{
32222 - VImage in = *this;
32223 - VImage out;
32224 -
32225 - Vargv _vec( "im_lintra" );
32226 -
32227 - *((double*) _vec.data(0)) = a;
32228 - _vec.data(1) = in.image();
32229 - *((double*) _vec.data(2)) = b;
32230 - _vec.data(3) = out.image();
32231 - _vec.call();
32232 - out._ref->addref( in._ref );
32233 -
32234 - return( out );
32235 -}
32236 -
32237 -// im_linreg: pixelwise linear regression
32238 -VImage VImage::linreg( std::vector<VImage> ins, std::vector<double> xs ) throw( VError )
32239 -{
32240 - VImage out;
32241 -
32242 - Vargv _vec( "im_linreg" );
32243 -
32244 - ((im_imagevec_object*) _vec.data(0))->n = ins.size();
32245 - ((im_imagevec_object*) _vec.data(0))->vec = new IMAGE *[ins.size()];
32246 - for( unsigned int i = 0; i < ins.size(); i++ )
32247 - ((im_imagevec_object*) _vec.data(0))->vec[i] = ins[i].image();
32248 - _vec.data(1) = out.image();
32249 - ((im_doublevec_object*) _vec.data(2))->n = xs.size();
32250 - ((im_doublevec_object*) _vec.data(2))->vec = new double[xs.size()];
32251 - for( unsigned int i = 0; i < xs.size(); i++ )
32252 - ((im_doublevec_object*) _vec.data(2))->vec[i] = xs[i];
32253 - _vec.call();
32254 - for( unsigned int i = 0; i < ins.size(); i++ )
32255 - out._ref->addref( ins[i]._ref );
32256 -
32257 - return( out );
32258 -}
32259 -
32260 -// im_lintra_vec: calculate a*in + b -> out, a and b vectors
32261 -VImage VImage::lin( std::vector<double> a, std::vector<double> b ) throw( VError )
32262 -{
32263 - VImage in = *this;
32264 - VImage out;
32265 -
32266 - Vargv _vec( "im_lintra_vec" );
32267 -
32268 - ((im_doublevec_object*) _vec.data(0))->n = a.size();
32269 - ((im_doublevec_object*) _vec.data(0))->vec = new double[a.size()];
32270 - for( unsigned int i = 0; i < a.size(); i++ )
32271 - ((im_doublevec_object*) _vec.data(0))->vec[i] = a[i];
32272 - _vec.data(1) = in.image();
32273 - ((im_doublevec_object*) _vec.data(2))->n = b.size();
32274 - ((im_doublevec_object*) _vec.data(2))->vec = new double[b.size()];
32275 - for( unsigned int i = 0; i < b.size(); i++ )
32276 - ((im_doublevec_object*) _vec.data(2))->vec[i] = b[i];
32277 - _vec.data(3) = out.image();
32278 - _vec.call();
32279 - out._ref->addref( in._ref );
32280 -
32281 - return( out );
32282 -}
32283 -
32284 -// im_log10tra: log10 of image
32285 -VImage VImage::log10() throw( VError )
32286 -{
32287 - VImage in = *this;
32288 - VImage out;
32289 -
32290 - Vargv _vec( "im_log10tra" );
32291 -
32292 - _vec.data(0) = in.image();
32293 - _vec.data(1) = out.image();
32294 - _vec.call();
32295 - out._ref->addref( in._ref );
32296 -
32297 - return( out );
32298 -}
32299 -
32300 -// im_logtra: ln of image
32301 -VImage VImage::log() throw( VError )
32302 -{
32303 - VImage in = *this;
32304 - VImage out;
32305 -
32306 - Vargv _vec( "im_logtra" );
32307 -
32308 - _vec.data(0) = in.image();
32309 - _vec.data(1) = out.image();
32310 - _vec.call();
32311 - out._ref->addref( in._ref );
32312 -
32313 - return( out );
32314 -}
32315 -
32316 -// im_max: maximum value of image
32317 -double VImage::max() throw( VError )
32318 -{
32319 - VImage in = *this;
32320 - double value;
32321 -
32322 - Vargv _vec( "im_max" );
32323 -
32324 - _vec.data(0) = in.image();
32325 - _vec.call();
32326 - value = *((double*)_vec.data(1));
32327 -
32328 - return( value );
32329 -}
32330 -
32331 -// im_maxpos: position of maximum value of image
32332 -std::complex<double> VImage::maxpos() throw( VError )
32333 -{
32334 - VImage in = *this;
32335 - std::complex<double> position;
32336 -
32337 - Vargv _vec( "im_maxpos" );
32338 -
32339 - _vec.data(0) = in.image();
32340 - _vec.call();
32341 - position = *((std::complex<double>*)_vec.data(1));
32342 -
32343 - return( position );
32344 -}
32345 -
32346 -// im_maxpos_avg: position of maximum value of image, averaging in case of draw
32347 -double VImage::maxpos_avg( double& y, double& out ) throw( VError )
32348 -{
32349 - VImage in = *this;
32350 - double x;
32351 -
32352 - Vargv _vec( "im_maxpos_avg" );
32353 -
32354 - _vec.data(0) = in.image();
32355 - _vec.call();
32356 - x = *((double*)_vec.data(1));
32357 - y = *((double*)_vec.data(2));
32358 - out = *((double*)_vec.data(3));
32359 -
32360 - return( x );
32361 -}
32362 -
32363 -// im_measure: measure averages of a grid of patches
32364 -VDMask VImage::measure( int x, int y, int w, int h, int h_patches, int v_patches ) throw( VError )
32365 -{
32366 - VImage in = *this;
32367 - VDMask mask;
32368 -
32369 - Vargv _vec( "im_measure" );
32370 -
32371 - _vec.data(0) = in.image();
32372 - ((im_mask_object*) _vec.data(1))->name = (char*)"noname";
32373 - *((int*) _vec.data(2)) = x;
32374 - *((int*) _vec.data(3)) = y;
32375 - *((int*) _vec.data(4)) = w;
32376 - *((int*) _vec.data(5)) = h;
32377 - *((int*) _vec.data(6)) = h_patches;
32378 - *((int*) _vec.data(7)) = v_patches;
32379 - _vec.call();
32380 - mask.embed( (DOUBLEMASK *)((im_mask_object*)_vec.data(1))->mask );
32381 -
32382 - return( mask );
32383 -}
32384 -
32385 -// im_min: minimum value of image
32386 -double VImage::min() throw( VError )
32387 -{
32388 - VImage in = *this;
32389 - double value;
32390 -
32391 - Vargv _vec( "im_min" );
32392 -
32393 - _vec.data(0) = in.image();
32394 - _vec.call();
32395 - value = *((double*)_vec.data(1));
32396 -
32397 - return( value );
32398 -}
32399 -
32400 -// im_minpos: position of minimum value of image
32401 -std::complex<double> VImage::minpos() throw( VError )
32402 -{
32403 - VImage in = *this;
32404 - std::complex<double> position;
32405 -
32406 - Vargv _vec( "im_minpos" );
32407 -
32408 - _vec.data(0) = in.image();
32409 - _vec.call();
32410 - position = *((std::complex<double>*)_vec.data(1));
32411 -
32412 - return( position );
32413 -}
32414 -
32415 -// im_multiply: multiply two images
32416 -VImage VImage::multiply( VImage in2 ) throw( VError )
32417 -{
32418 - VImage in1 = *this;
32419 - VImage out;
32420 -
32421 - Vargv _vec( "im_multiply" );
32422 -
32423 - _vec.data(0) = in1.image();
32424 - _vec.data(1) = in2.image();
32425 - _vec.data(2) = out.image();
32426 - _vec.call();
32427 - out._ref->addref( in1._ref );
32428 - out._ref->addref( in2._ref );
32429 -
32430 - return( out );
32431 -}
32432 -
32433 -// im_powtra: pel^x of image
32434 -VImage VImage::pow( double x ) throw( VError )
32435 -{
32436 - VImage in = *this;
32437 - VImage out;
32438 -
32439 - Vargv _vec( "im_powtra" );
32440 -
32441 - _vec.data(0) = in.image();
32442 - _vec.data(1) = out.image();
32443 - *((double*) _vec.data(2)) = x;
32444 - _vec.call();
32445 - out._ref->addref( in._ref );
32446 -
32447 - return( out );
32448 -}
32449 -
32450 -// im_powtra_vec: pel^[x,y,z] of image
32451 -VImage VImage::pow( std::vector<double> v ) throw( VError )
32452 -{
32453 - VImage in = *this;
32454 - VImage out;
32455 -
32456 - Vargv _vec( "im_powtra_vec" );
32457 -
32458 - _vec.data(0) = in.image();
32459 - _vec.data(1) = out.image();
32460 - ((im_doublevec_object*) _vec.data(2))->n = v.size();
32461 - ((im_doublevec_object*) _vec.data(2))->vec = new double[v.size()];
32462 - for( unsigned int i = 0; i < v.size(); i++ )
32463 - ((im_doublevec_object*) _vec.data(2))->vec[i] = v[i];
32464 - _vec.call();
32465 - out._ref->addref( in._ref );
32466 -
32467 - return( out );
32468 -}
32469 -
32470 -// im_recomb: linear recombination with mask
32471 -VImage VImage::recomb( VDMask matrix ) throw( VError )
32472 -{
32473 - VImage in = *this;
32474 - VImage out;
32475 -
32476 - Vargv _vec( "im_recomb" );
32477 -
32478 - _vec.data(0) = in.image();
32479 - _vec.data(1) = out.image();
32480 - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr;
32481 - _vec.call();
32482 - out._ref->addref( in._ref );
32483 -
32484 - return( out );
32485 -}
32486 -
32487 -// im_remainder: remainder after integer division
32488 -VImage VImage::remainder( VImage in2 ) throw( VError )
32489 -{
32490 - VImage in1 = *this;
32491 - VImage out;
32492 -
32493 - Vargv _vec( "im_remainder" );
32494 -
32495 - _vec.data(0) = in1.image();
32496 - _vec.data(1) = in2.image();
32497 - _vec.data(2) = out.image();
32498 - _vec.call();
32499 - out._ref->addref( in1._ref );
32500 - out._ref->addref( in2._ref );
32501 -
32502 - return( out );
32503 -}
32504 -
32505 -// im_remainderconst: remainder after integer division by a constant
32506 -VImage VImage::remainder( double x ) throw( VError )
32507 -{
32508 - VImage in = *this;
32509 - VImage out;
32510 -
32511 - Vargv _vec( "im_remainderconst" );
32512 -
32513 - _vec.data(0) = in.image();
32514 - _vec.data(1) = out.image();
32515 - *((double*) _vec.data(2)) = x;
32516 - _vec.call();
32517 - out._ref->addref( in._ref );
32518 -
32519 - return( out );
32520 -}
32521 -
32522 -// im_remainder_vec: remainder after integer division by a vector of constants
32523 -VImage VImage::remainder( std::vector<double> x ) throw( VError )
32524 -{
32525 - VImage in = *this;
32526 - VImage out;
32527 -
32528 - Vargv _vec( "im_remainder_vec" );
32529 -
32530 - _vec.data(0) = in.image();
32531 - _vec.data(1) = out.image();
32532 - ((im_doublevec_object*) _vec.data(2))->n = x.size();
32533 - ((im_doublevec_object*) _vec.data(2))->vec = new double[x.size()];
32534 - for( unsigned int i = 0; i < x.size(); i++ )
32535 - ((im_doublevec_object*) _vec.data(2))->vec[i] = x[i];
32536 - _vec.call();
32537 - out._ref->addref( in._ref );
32538 -
32539 - return( out );
32540 -}
32541 -
32542 -// im_rint: round to nearest integer value
32543 -VImage VImage::rint() throw( VError )
32544 -{
32545 - VImage in = *this;
32546 - VImage out;
32547 -
32548 - Vargv _vec( "im_rint" );
32549 -
32550 - _vec.data(0) = in.image();
32551 - _vec.data(1) = out.image();
32552 - _vec.call();
32553 - out._ref->addref( in._ref );
32554 -
32555 - return( out );
32556 -}
32557 -
32558 -// im_sign: unit vector in direction of value
32559 -VImage VImage::sign() throw( VError )
32560 -{
32561 - VImage in = *this;
32562 - VImage out;
32563 -
32564 - Vargv _vec( "im_sign" );
32565 -
32566 - _vec.data(0) = in.image();
32567 - _vec.data(1) = out.image();
32568 - _vec.call();
32569 - out._ref->addref( in._ref );
32570 -
32571 - return( out );
32572 -}
32573 -
32574 -// im_sintra: sin of image (angles in degrees)
32575 -VImage VImage::sin() throw( VError )
32576 -{
32577 - VImage in = *this;
32578 - VImage out;
32579 -
32580 - Vargv _vec( "im_sintra" );
32581 -
32582 - _vec.data(0) = in.image();
32583 - _vec.data(1) = out.image();
32584 - _vec.call();
32585 - out._ref->addref( in._ref );
32586 -
32587 - return( out );
32588 -}
32589 -
32590 -// im_stats: many image statistics in one pass
32591 -VDMask VImage::stats() throw( VError )
32592 -{
32593 - VImage in = *this;
32594 - VDMask statistics;
32595 -
32596 - Vargv _vec( "im_stats" );
32597 -
32598 - _vec.data(0) = in.image();
32599 - ((im_mask_object*) _vec.data(1))->name = (char*)"noname";
32600 - _vec.call();
32601 - statistics.embed( (DOUBLEMASK *)((im_mask_object*)_vec.data(1))->mask );
32602 -
32603 - return( statistics );
32604 -}
32605 -
32606 -// im_subtract: subtract two images
32607 -VImage VImage::subtract( VImage in2 ) throw( VError )
32608 -{
32609 - VImage in1 = *this;
32610 - VImage out;
32611 -
32612 - Vargv _vec( "im_subtract" );
32613 -
32614 - _vec.data(0) = in1.image();
32615 - _vec.data(1) = in2.image();
32616 - _vec.data(2) = out.image();
32617 - _vec.call();
32618 - out._ref->addref( in1._ref );
32619 - out._ref->addref( in2._ref );
32620 -
32621 - return( out );
32622 -}
32623 -
32624 -// im_tantra: tan of image (angles in degrees)
32625 -VImage VImage::tan() throw( VError )
32626 -{
32627 - VImage in = *this;
32628 - VImage out;
32629 -
32630 - Vargv _vec( "im_tantra" );
32631 -
32632 - _vec.data(0) = in.image();
32633 - _vec.data(1) = out.image();
32634 - _vec.call();
32635 - out._ref->addref( in._ref );
32636 -
32637 - return( out );
32638 -}
32639 -
32640 -
32641 -// bodies for package cimg
32642 -// this file automatically generated from
32643 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
32644 -// im_greyc: noise-removing filter
32645 -VImage VImage::greyc( int iterations, double amplitude, double sharpness, double anisotropy, double alpha, double sigma, double dl, double da, double gauss_prec, int interpolation, int fast_approx ) throw( VError )
32646 -{
32647 - VImage src = *this;
32648 - VImage dst;
32649 -
32650 - Vargv _vec( "im_greyc" );
32651 -
32652 - _vec.data(0) = src.image();
32653 - _vec.data(1) = dst.image();
32654 - *((int*) _vec.data(2)) = iterations;
32655 - *((double*) _vec.data(3)) = amplitude;
32656 - *((double*) _vec.data(4)) = sharpness;
32657 - *((double*) _vec.data(5)) = anisotropy;
32658 - *((double*) _vec.data(6)) = alpha;
32659 - *((double*) _vec.data(7)) = sigma;
32660 - *((double*) _vec.data(8)) = dl;
32661 - *((double*) _vec.data(9)) = da;
32662 - *((double*) _vec.data(10)) = gauss_prec;
32663 - *((int*) _vec.data(11)) = interpolation;
32664 - *((int*) _vec.data(12)) = fast_approx;
32665 - _vec.call();
32666 - dst._ref->addref( src._ref );
32667 -
32668 - return( dst );
32669 -}
32670 -
32671 -// im_greyc_mask: noise-removing filter, with a mask
32672 -VImage VImage::greyc_mask( VImage mask, int iterations, double amplitude, double sharpness, double anisotropy, double alpha, double sigma, double dl, double da, double gauss_prec, int interpolation, int fast_approx ) throw( VError )
32673 -{
32674 - VImage src = *this;
32675 - VImage dst;
32676 -
32677 - Vargv _vec( "im_greyc_mask" );
32678 -
32679 - _vec.data(0) = src.image();
32680 - _vec.data(1) = dst.image();
32681 - _vec.data(2) = mask.image();
32682 - *((int*) _vec.data(3)) = iterations;
32683 - *((double*) _vec.data(4)) = amplitude;
32684 - *((double*) _vec.data(5)) = sharpness;
32685 - *((double*) _vec.data(6)) = anisotropy;
32686 - *((double*) _vec.data(7)) = alpha;
32687 - *((double*) _vec.data(8)) = sigma;
32688 - *((double*) _vec.data(9)) = dl;
32689 - *((double*) _vec.data(10)) = da;
32690 - *((double*) _vec.data(11)) = gauss_prec;
32691 - *((int*) _vec.data(12)) = interpolation;
32692 - *((int*) _vec.data(13)) = fast_approx;
32693 - _vec.call();
32694 - dst._ref->addref( src._ref );
32695 - dst._ref->addref( mask._ref );
32696 -
32697 - return( dst );
32698 -}
32699 -
32700 -
32701 -// bodies for package colour
32702 -// this file automatically generated from
32703 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
32704 -// im_LCh2Lab: convert LCh to Lab
32705 -VImage VImage::LCh2Lab() throw( VError )
32706 -{
32707 - VImage in = *this;
32708 - VImage out;
32709 -
32710 - Vargv _vec( "im_LCh2Lab" );
32711 -
32712 - _vec.data(0) = in.image();
32713 - _vec.data(1) = out.image();
32714 - _vec.call();
32715 - out._ref->addref( in._ref );
32716 -
32717 - return( out );
32718 -}
32719 -
32720 -// im_LCh2UCS: convert LCh to UCS
32721 -VImage VImage::LCh2UCS() throw( VError )
32722 -{
32723 - VImage in = *this;
32724 - VImage out;
32725 -
32726 - Vargv _vec( "im_LCh2UCS" );
32727 -
32728 - _vec.data(0) = in.image();
32729 - _vec.data(1) = out.image();
32730 - _vec.call();
32731 - out._ref->addref( in._ref );
32732 -
32733 - return( out );
32734 -}
32735 -
32736 -// im_Lab2LCh: convert Lab to LCh
32737 -VImage VImage::Lab2LCh() throw( VError )
32738 -{
32739 - VImage in = *this;
32740 - VImage out;
32741 -
32742 - Vargv _vec( "im_Lab2LCh" );
32743 -
32744 - _vec.data(0) = in.image();
32745 - _vec.data(1) = out.image();
32746 - _vec.call();
32747 - out._ref->addref( in._ref );
32748 -
32749 - return( out );
32750 -}
32751 -
32752 -// im_Lab2LabQ: convert Lab to LabQ
32753 -VImage VImage::Lab2LabQ() throw( VError )
32754 -{
32755 - VImage in = *this;
32756 - VImage out;
32757 -
32758 - Vargv _vec( "im_Lab2LabQ" );
32759 -
32760 - _vec.data(0) = in.image();
32761 - _vec.data(1) = out.image();
32762 - _vec.call();
32763 - out._ref->addref( in._ref );
32764 -
32765 - return( out );
32766 -}
32767 -
32768 -// im_Lab2LabS: convert Lab to LabS
32769 -VImage VImage::Lab2LabS() throw( VError )
32770 -{
32771 - VImage in = *this;
32772 - VImage out;
32773 -
32774 - Vargv _vec( "im_Lab2LabS" );
32775 -
32776 - _vec.data(0) = in.image();
32777 - _vec.data(1) = out.image();
32778 - _vec.call();
32779 - out._ref->addref( in._ref );
32780 -
32781 - return( out );
32782 -}
32783 -
32784 -// im_Lab2UCS: convert Lab to UCS
32785 -VImage VImage::Lab2UCS() throw( VError )
32786 -{
32787 - VImage in = *this;
32788 - VImage out;
32789 -
32790 - Vargv _vec( "im_Lab2UCS" );
32791 -
32792 - _vec.data(0) = in.image();
32793 - _vec.data(1) = out.image();
32794 - _vec.call();
32795 - out._ref->addref( in._ref );
32796 -
32797 - return( out );
32798 -}
32799 -
32800 -// im_Lab2XYZ: convert D65 Lab to XYZ
32801 -VImage VImage::Lab2XYZ() throw( VError )
32802 -{
32803 - VImage in = *this;
32804 - VImage out;
32805 -
32806 - Vargv _vec( "im_Lab2XYZ" );
32807 -
32808 - _vec.data(0) = in.image();
32809 - _vec.data(1) = out.image();
32810 - _vec.call();
32811 - out._ref->addref( in._ref );
32812 -
32813 - return( out );
32814 -}
32815 -
32816 -// im_Lab2XYZ_temp: convert Lab to XYZ, with a specified colour temperature
32817 -VImage VImage::Lab2XYZ_temp( double X0, double Y0, double Z0 ) throw( VError )
32818 -{
32819 - VImage in = *this;
32820 - VImage out;
32821 -
32822 - Vargv _vec( "im_Lab2XYZ_temp" );
32823 -
32824 - _vec.data(0) = in.image();
32825 - _vec.data(1) = out.image();
32826 - *((double*) _vec.data(2)) = X0;
32827 - *((double*) _vec.data(3)) = Y0;
32828 - *((double*) _vec.data(4)) = Z0;
32829 - _vec.call();
32830 - out._ref->addref( in._ref );
32831 -
32832 - return( out );
32833 -}
32834 -
32835 -// im_Lab2disp: convert Lab to displayable
32836 -VImage VImage::Lab2disp( VDisplay disp ) throw( VError )
32837 -{
32838 - VImage in = *this;
32839 - VImage out;
32840 -
32841 - Vargv _vec( "im_Lab2disp" );
32842 -
32843 - _vec.data(0) = in.image();
32844 - _vec.data(1) = out.image();
32845 - _vec.data(2) = disp.disp();
32846 - _vec.call();
32847 - out._ref->addref( in._ref );
32848 -
32849 - return( out );
32850 -}
32851 -
32852 -// im_LabQ2LabS: convert LabQ to LabS
32853 -VImage VImage::LabQ2LabS() throw( VError )
32854 -{
32855 - VImage in = *this;
32856 - VImage out;
32857 -
32858 - Vargv _vec( "im_LabQ2LabS" );
32859 -
32860 - _vec.data(0) = in.image();
32861 - _vec.data(1) = out.image();
32862 - _vec.call();
32863 - out._ref->addref( in._ref );
32864 -
32865 - return( out );
32866 -}
32867 -
32868 -// im_LabQ2Lab: convert LabQ to Lab
32869 -VImage VImage::LabQ2Lab() throw( VError )
32870 -{
32871 - VImage in = *this;
32872 - VImage out;
32873 -
32874 - Vargv _vec( "im_LabQ2Lab" );
32875 -
32876 - _vec.data(0) = in.image();
32877 - _vec.data(1) = out.image();
32878 - _vec.call();
32879 - out._ref->addref( in._ref );
32880 -
32881 - return( out );
32882 -}
32883 -
32884 -// im_LabQ2XYZ: convert LabQ to XYZ
32885 -VImage VImage::LabQ2XYZ() throw( VError )
32886 -{
32887 - VImage in = *this;
32888 - VImage out;
32889 -
32890 - Vargv _vec( "im_LabQ2XYZ" );
32891 -
32892 - _vec.data(0) = in.image();
32893 - _vec.data(1) = out.image();
32894 - _vec.call();
32895 - out._ref->addref( in._ref );
32896 -
32897 - return( out );
32898 -}
32899 -
32900 -// im_LabQ2disp: convert LabQ to displayable
32901 -VImage VImage::LabQ2disp( VDisplay disp ) throw( VError )
32902 -{
32903 - VImage in = *this;
32904 - VImage out;
32905 -
32906 - Vargv _vec( "im_LabQ2disp" );
32907 -
32908 - _vec.data(0) = in.image();
32909 - _vec.data(1) = out.image();
32910 - _vec.data(2) = disp.disp();
32911 - _vec.call();
32912 - out._ref->addref( in._ref );
32913 -
32914 - return( out );
32915 -}
32916 -
32917 -// im_LabS2LabQ: convert LabS to LabQ
32918 -VImage VImage::LabS2LabQ() throw( VError )
32919 -{
32920 - VImage in = *this;
32921 - VImage out;
32922 -
32923 - Vargv _vec( "im_LabS2LabQ" );
32924 -
32925 - _vec.data(0) = in.image();
32926 - _vec.data(1) = out.image();
32927 - _vec.call();
32928 - out._ref->addref( in._ref );
32929 -
32930 - return( out );
32931 -}
32932 -
32933 -// im_LabS2Lab: convert LabS to Lab
32934 -VImage VImage::LabS2Lab() throw( VError )
32935 -{
32936 - VImage in = *this;
32937 - VImage out;
32938 -
32939 - Vargv _vec( "im_LabS2Lab" );
32940 -
32941 - _vec.data(0) = in.image();
32942 - _vec.data(1) = out.image();
32943 - _vec.call();
32944 - out._ref->addref( in._ref );
32945 -
32946 - return( out );
32947 -}
32948 -
32949 -// im_UCS2LCh: convert UCS to LCh
32950 -VImage VImage::UCS2LCh() throw( VError )
32951 -{
32952 - VImage in = *this;
32953 - VImage out;
32954 -
32955 - Vargv _vec( "im_UCS2LCh" );
32956 -
32957 - _vec.data(0) = in.image();
32958 - _vec.data(1) = out.image();
32959 - _vec.call();
32960 - out._ref->addref( in._ref );
32961 -
32962 - return( out );
32963 -}
32964 -
32965 -// im_UCS2Lab: convert UCS to Lab
32966 -VImage VImage::UCS2Lab() throw( VError )
32967 -{
32968 - VImage in = *this;
32969 - VImage out;
32970 -
32971 - Vargv _vec( "im_UCS2Lab" );
32972 -
32973 - _vec.data(0) = in.image();
32974 - _vec.data(1) = out.image();
32975 - _vec.call();
32976 - out._ref->addref( in._ref );
32977 -
32978 - return( out );
32979 -}
32980 -
32981 -// im_UCS2XYZ: convert UCS to XYZ
32982 -VImage VImage::UCS2XYZ() throw( VError )
32983 -{
32984 - VImage in = *this;
32985 - VImage out;
32986 -
32987 - Vargv _vec( "im_UCS2XYZ" );
32988 -
32989 - _vec.data(0) = in.image();
32990 - _vec.data(1) = out.image();
32991 - _vec.call();
32992 - out._ref->addref( in._ref );
32993 -
32994 - return( out );
32995 -}
32996 -
32997 -// im_XYZ2Lab: convert D65 XYZ to Lab
32998 -VImage VImage::XYZ2Lab() throw( VError )
32999 -{
33000 - VImage in = *this;
33001 - VImage out;
33002 -
33003 - Vargv _vec( "im_XYZ2Lab" );
33004 -
33005 - _vec.data(0) = in.image();
33006 - _vec.data(1) = out.image();
33007 - _vec.call();
33008 - out._ref->addref( in._ref );
33009 -
33010 - return( out );
33011 -}
33012 -
33013 -// im_XYZ2Lab_temp: convert XYZ to Lab, with a specified colour temperature
33014 -VImage VImage::XYZ2Lab_temp( double X0, double Y0, double Z0 ) throw( VError )
33015 -{
33016 - VImage in = *this;
33017 - VImage out;
33018 -
33019 - Vargv _vec( "im_XYZ2Lab_temp" );
33020 -
33021 - _vec.data(0) = in.image();
33022 - _vec.data(1) = out.image();
33023 - *((double*) _vec.data(2)) = X0;
33024 - *((double*) _vec.data(3)) = Y0;
33025 - *((double*) _vec.data(4)) = Z0;
33026 - _vec.call();
33027 - out._ref->addref( in._ref );
33028 -
33029 - return( out );
33030 -}
33031 -
33032 -// im_XYZ2UCS: convert XYZ to UCS
33033 -VImage VImage::XYZ2UCS() throw( VError )
33034 -{
33035 - VImage in = *this;
33036 - VImage out;
33037 -
33038 - Vargv _vec( "im_XYZ2UCS" );
33039 -
33040 - _vec.data(0) = in.image();
33041 - _vec.data(1) = out.image();
33042 - _vec.call();
33043 - out._ref->addref( in._ref );
33044 -
33045 - return( out );
33046 -}
33047 -
33048 -// im_XYZ2Yxy: convert XYZ to Yxy
33049 -VImage VImage::XYZ2Yxy() throw( VError )
33050 -{
33051 - VImage in = *this;
33052 - VImage out;
33053 -
33054 - Vargv _vec( "im_XYZ2Yxy" );
33055 -
33056 - _vec.data(0) = in.image();
33057 - _vec.data(1) = out.image();
33058 - _vec.call();
33059 - out._ref->addref( in._ref );
33060 -
33061 - return( out );
33062 -}
33063 -
33064 -// im_XYZ2disp: convert XYZ to displayble
33065 -VImage VImage::XYZ2disp( VDisplay disp ) throw( VError )
33066 -{
33067 - VImage in = *this;
33068 - VImage out;
33069 -
33070 - Vargv _vec( "im_XYZ2disp" );
33071 -
33072 - _vec.data(0) = in.image();
33073 - _vec.data(1) = out.image();
33074 - _vec.data(2) = disp.disp();
33075 - _vec.call();
33076 - out._ref->addref( in._ref );
33077 -
33078 - return( out );
33079 -}
33080 -
33081 -// im_XYZ2sRGB: convert XYZ to sRGB
33082 -VImage VImage::XYZ2sRGB() throw( VError )
33083 -{
33084 - VImage in = *this;
33085 - VImage out;
33086 -
33087 - Vargv _vec( "im_XYZ2sRGB" );
33088 -
33089 - _vec.data(0) = in.image();
33090 - _vec.data(1) = out.image();
33091 - _vec.call();
33092 - out._ref->addref( in._ref );
33093 -
33094 - return( out );
33095 -}
33096 -
33097 -// im_Yxy2XYZ: convert Yxy to XYZ
33098 -VImage VImage::Yxy2XYZ() throw( VError )
33099 -{
33100 - VImage in = *this;
33101 - VImage out;
33102 -
33103 - Vargv _vec( "im_Yxy2XYZ" );
33104 -
33105 - _vec.data(0) = in.image();
33106 - _vec.data(1) = out.image();
33107 - _vec.call();
33108 - out._ref->addref( in._ref );
33109 -
33110 - return( out );
33111 -}
33112 -
33113 -// im_dE00_fromLab: calculate delta-E CIE2000 for two Lab images
33114 -VImage VImage::dE00_fromLab( VImage in2 ) throw( VError )
33115 -{
33116 - VImage in1 = *this;
33117 - VImage out;
33118 -
33119 - Vargv _vec( "im_dE00_fromLab" );
33120 -
33121 - _vec.data(0) = in1.image();
33122 - _vec.data(1) = in2.image();
33123 - _vec.data(2) = out.image();
33124 - _vec.call();
33125 - out._ref->addref( in1._ref );
33126 - out._ref->addref( in2._ref );
33127 -
33128 - return( out );
33129 -}
33130 -
33131 -// im_dECMC_fromLab: calculate delta-E CMC(1:1) for two Lab images
33132 -VImage VImage::dECMC_fromLab( VImage in2 ) throw( VError )
33133 -{
33134 - VImage in1 = *this;
33135 - VImage out;
33136 -
33137 - Vargv _vec( "im_dECMC_fromLab" );
33138 -
33139 - _vec.data(0) = in1.image();
33140 - _vec.data(1) = in2.image();
33141 - _vec.data(2) = out.image();
33142 - _vec.call();
33143 - out._ref->addref( in1._ref );
33144 - out._ref->addref( in2._ref );
33145 -
33146 - return( out );
33147 -}
33148 -
33149 -// im_dECMC_fromdisp: calculate delta-E CMC(1:1) for two displayable images
33150 -VImage VImage::dECMC_fromdisp( VImage in2, VDisplay disp ) throw( VError )
33151 -{
33152 - VImage in1 = *this;
33153 - VImage out;
33154 -
33155 - Vargv _vec( "im_dECMC_fromdisp" );
33156 -
33157 - _vec.data(0) = in1.image();
33158 - _vec.data(1) = in2.image();
33159 - _vec.data(2) = out.image();
33160 - _vec.data(3) = disp.disp();
33161 - _vec.call();
33162 - out._ref->addref( in1._ref );
33163 - out._ref->addref( in2._ref );
33164 -
33165 - return( out );
33166 -}
33167 -
33168 -// im_dE_fromLab: calculate delta-E for two Lab images
33169 -VImage VImage::dE_fromLab( VImage in2 ) throw( VError )
33170 -{
33171 - VImage in1 = *this;
33172 - VImage out;
33173 -
33174 - Vargv _vec( "im_dE_fromLab" );
33175 -
33176 - _vec.data(0) = in1.image();
33177 - _vec.data(1) = in2.image();
33178 - _vec.data(2) = out.image();
33179 - _vec.call();
33180 - out._ref->addref( in1._ref );
33181 - out._ref->addref( in2._ref );
33182 -
33183 - return( out );
33184 -}
33185 -
33186 -// im_dE_fromXYZ: calculate delta-E for two XYZ images
33187 -VImage VImage::dE_fromXYZ( VImage in2 ) throw( VError )
33188 -{
33189 - VImage in1 = *this;
33190 - VImage out;
33191 -
33192 - Vargv _vec( "im_dE_fromXYZ" );
33193 -
33194 - _vec.data(0) = in1.image();
33195 - _vec.data(1) = in2.image();
33196 - _vec.data(2) = out.image();
33197 - _vec.call();
33198 - out._ref->addref( in1._ref );
33199 - out._ref->addref( in2._ref );
33200 -
33201 - return( out );
33202 -}
33203 -
33204 -// im_dE_fromdisp: calculate delta-E for two displayable images
33205 -VImage VImage::dE_fromdisp( VImage in2, VDisplay disp ) throw( VError )
33206 -{
33207 - VImage in1 = *this;
33208 - VImage out;
33209 -
33210 - Vargv _vec( "im_dE_fromdisp" );
33211 -
33212 - _vec.data(0) = in1.image();
33213 - _vec.data(1) = in2.image();
33214 - _vec.data(2) = out.image();
33215 - _vec.data(3) = disp.disp();
33216 - _vec.call();
33217 - out._ref->addref( in1._ref );
33218 - out._ref->addref( in2._ref );
33219 -
33220 - return( out );
33221 -}
33222 -
33223 -// im_disp2Lab: convert displayable to Lab
33224 -VImage VImage::disp2Lab( VDisplay disp ) throw( VError )
33225 -{
33226 - VImage in = *this;
33227 - VImage out;
33228 -
33229 - Vargv _vec( "im_disp2Lab" );
33230 -
33231 - _vec.data(0) = in.image();
33232 - _vec.data(1) = out.image();
33233 - _vec.data(2) = disp.disp();
33234 - _vec.call();
33235 - out._ref->addref( in._ref );
33236 -
33237 - return( out );
33238 -}
33239 -
33240 -// im_disp2XYZ: convert displayable to XYZ
33241 -VImage VImage::disp2XYZ( VDisplay disp ) throw( VError )
33242 -{
33243 - VImage in = *this;
33244 - VImage out;
33245 -
33246 - Vargv _vec( "im_disp2XYZ" );
33247 -
33248 - _vec.data(0) = in.image();
33249 - _vec.data(1) = out.image();
33250 - _vec.data(2) = disp.disp();
33251 - _vec.call();
33252 - out._ref->addref( in._ref );
33253 -
33254 - return( out );
33255 -}
33256 -
33257 -// im_float2rad: convert float to Radiance packed
33258 -VImage VImage::float2rad() throw( VError )
33259 -{
33260 - VImage in = *this;
33261 - VImage out;
33262 -
33263 - Vargv _vec( "im_float2rad" );
33264 -
33265 - _vec.data(0) = in.image();
33266 - _vec.data(1) = out.image();
33267 - _vec.call();
33268 - out._ref->addref( in._ref );
33269 -
33270 - return( out );
33271 -}
33272 -
33273 -// im_icc_ac2rc: convert LAB from AC to RC using an ICC profile
33274 -VImage VImage::icc_ac2rc( char* profile ) throw( VError )
33275 -{
33276 - VImage in = *this;
33277 - VImage out;
33278 -
33279 - Vargv _vec( "im_icc_ac2rc" );
33280 -
33281 - _vec.data(0) = in.image();
33282 - _vec.data(1) = out.image();
33283 - _vec.data(2) = (im_object) profile;
33284 - _vec.call();
33285 - out._ref->addref( in._ref );
33286 -
33287 - return( out );
33288 -}
33289 -
33290 -// im_icc_export_depth: convert a float LAB to device space with an ICC profile
33291 -VImage VImage::icc_export_depth( int depth, char* output_profile, int intent ) throw( VError )
33292 -{
33293 - VImage in = *this;
33294 - VImage out;
33295 -
33296 - Vargv _vec( "im_icc_export_depth" );
33297 -
33298 - _vec.data(0) = in.image();
33299 - _vec.data(1) = out.image();
33300 - *((int*) _vec.data(2)) = depth;
33301 - _vec.data(3) = (im_object) output_profile;
33302 - *((int*) _vec.data(4)) = intent;
33303 - _vec.call();
33304 - out._ref->addref( in._ref );
33305 -
33306 - return( out );
33307 -}
33308 -
33309 -// im_icc_import: convert a device image to float LAB with an ICC profile
33310 -VImage VImage::icc_import( char* input_profile, int intent ) throw( VError )
33311 -{
33312 - VImage in = *this;
33313 - VImage out;
33314 -
33315 - Vargv _vec( "im_icc_import" );
33316 -
33317 - _vec.data(0) = in.image();
33318 - _vec.data(1) = out.image();
33319 - _vec.data(2) = (im_object) input_profile;
33320 - *((int*) _vec.data(3)) = intent;
33321 - _vec.call();
33322 - out._ref->addref( in._ref );
33323 -
33324 - return( out );
33325 -}
33326 -
33327 -// im_icc_import_embedded: convert a device image to float LAB using the embedded profile
33328 -VImage VImage::icc_import_embedded( int intent ) throw( VError )
33329 -{
33330 - VImage in = *this;
33331 - VImage out;
33332 -
33333 - Vargv _vec( "im_icc_import_embedded" );
33334 -
33335 - _vec.data(0) = in.image();
33336 - _vec.data(1) = out.image();
33337 - *((int*) _vec.data(2)) = intent;
33338 - _vec.call();
33339 - out._ref->addref( in._ref );
33340 -
33341 - return( out );
33342 -}
33343 -
33344 -// im_icc_transform: convert between two device images with a pair of ICC profiles
33345 -VImage VImage::icc_transform( char* input_profile, char* output_profile, int intent ) throw( VError )
33346 -{
33347 - VImage in = *this;
33348 - VImage out;
33349 -
33350 - Vargv _vec( "im_icc_transform" );
33351 -
33352 - _vec.data(0) = in.image();
33353 - _vec.data(1) = out.image();
33354 - _vec.data(2) = (im_object) input_profile;
33355 - _vec.data(3) = (im_object) output_profile;
33356 - *((int*) _vec.data(4)) = intent;
33357 - _vec.call();
33358 - out._ref->addref( in._ref );
33359 -
33360 - return( out );
33361 -}
33362 -
33363 -// im_lab_morph: morph colourspace of a LAB image
33364 -VImage VImage::lab_morph( VDMask greyscale, double L_offset, double L_scale, double a_scale, double b_scale ) throw( VError )
33365 -{
33366 - VImage in = *this;
33367 - VImage out;
33368 -
33369 - Vargv _vec( "im_lab_morph" );
33370 -
33371 - _vec.data(0) = in.image();
33372 - _vec.data(1) = out.image();
33373 - ((im_mask_object*) _vec.data(2))->mask = greyscale.mask().dptr;
33374 - *((double*) _vec.data(3)) = L_offset;
33375 - *((double*) _vec.data(4)) = L_scale;
33376 - *((double*) _vec.data(5)) = a_scale;
33377 - *((double*) _vec.data(6)) = b_scale;
33378 - _vec.call();
33379 - out._ref->addref( in._ref );
33380 -
33381 - return( out );
33382 -}
33383 -
33384 -// im_rad2float: convert Radiance packed to float
33385 -VImage VImage::rad2float() throw( VError )
33386 -{
33387 - VImage in = *this;
33388 - VImage out;
33389 -
33390 - Vargv _vec( "im_rad2float" );
33391 -
33392 - _vec.data(0) = in.image();
33393 - _vec.data(1) = out.image();
33394 - _vec.call();
33395 - out._ref->addref( in._ref );
33396 -
33397 - return( out );
33398 -}
33399 -
33400 -// im_sRGB2XYZ: convert sRGB to XYZ
33401 -VImage VImage::sRGB2XYZ() throw( VError )
33402 -{
33403 - VImage in = *this;
33404 - VImage out;
33405 -
33406 - Vargv _vec( "im_sRGB2XYZ" );
33407 -
33408 - _vec.data(0) = in.image();
33409 - _vec.data(1) = out.image();
33410 - _vec.call();
33411 - out._ref->addref( in._ref );
33412 -
33413 - return( out );
33414 -}
33415 -
33416 -
33417 -// bodies for package conversion
33418 -// this file automatically generated from
33419 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
33420 -// im_gaussnoise: generate image of gaussian noise with specified statistics
33421 -VImage VImage::gaussnoise( int xsize, int ysize, double mean, double sigma ) throw( VError )
33422 -{
33423 - VImage out;
33424 -
33425 - Vargv _vec( "im_gaussnoise" );
33426 -
33427 - _vec.data(0) = out.image();
33428 - *((int*) _vec.data(1)) = xsize;
33429 - *((int*) _vec.data(2)) = ysize;
33430 - *((double*) _vec.data(3)) = mean;
33431 - *((double*) _vec.data(4)) = sigma;
33432 - _vec.call();
33433 -
33434 - return( out );
33435 -}
33436 -
33437 -// im_bandjoin: bandwise join of two images
33438 -VImage VImage::bandjoin( VImage in2 ) throw( VError )
33439 -{
33440 - VImage in1 = *this;
33441 - VImage out;
33442 -
33443 - Vargv _vec( "im_bandjoin" );
33444 -
33445 - _vec.data(0) = in1.image();
33446 - _vec.data(1) = in2.image();
33447 - _vec.data(2) = out.image();
33448 - _vec.call();
33449 - out._ref->addref( in1._ref );
33450 - out._ref->addref( in2._ref );
33451 -
33452 - return( out );
33453 -}
33454 -
33455 -// im_black: generate black image
33456 -VImage VImage::black( int x_size, int y_size, int bands ) throw( VError )
33457 -{
33458 - VImage output;
33459 -
33460 - Vargv _vec( "im_black" );
33461 -
33462 - _vec.data(0) = output.image();
33463 - *((int*) _vec.data(1)) = x_size;
33464 - *((int*) _vec.data(2)) = y_size;
33465 - *((int*) _vec.data(3)) = bands;
33466 - _vec.call();
33467 -
33468 - return( output );
33469 -}
33470 -
33471 -// im_c2amph: convert real and imaginary to phase and amplitude
33472 -VImage VImage::c2amph() throw( VError )
33473 -{
33474 - VImage in = *this;
33475 - VImage out;
33476 -
33477 - Vargv _vec( "im_c2amph" );
33478 -
33479 - _vec.data(0) = in.image();
33480 - _vec.data(1) = out.image();
33481 - _vec.call();
33482 - out._ref->addref( in._ref );
33483 -
33484 - return( out );
33485 -}
33486 -
33487 -// im_c2imag: extract imaginary part of complex image
33488 -VImage VImage::c2imag() throw( VError )
33489 -{
33490 - VImage in = *this;
33491 - VImage out;
33492 -
33493 - Vargv _vec( "im_c2imag" );
33494 -
33495 - _vec.data(0) = in.image();
33496 - _vec.data(1) = out.image();
33497 - _vec.call();
33498 - out._ref->addref( in._ref );
33499 -
33500 - return( out );
33501 -}
33502 -
33503 -// im_c2real: extract real part of complex image
33504 -VImage VImage::c2real() throw( VError )
33505 -{
33506 - VImage in = *this;
33507 - VImage out;
33508 -
33509 - Vargv _vec( "im_c2real" );
33510 -
33511 - _vec.data(0) = in.image();
33512 - _vec.data(1) = out.image();
33513 - _vec.call();
33514 - out._ref->addref( in._ref );
33515 -
33516 - return( out );
33517 -}
33518 -
33519 -// im_c2rect: convert phase and amplitude to real and imaginary
33520 -VImage VImage::c2rect() throw( VError )
33521 -{
33522 - VImage in = *this;
33523 - VImage out;
33524 -
33525 - Vargv _vec( "im_c2rect" );
33526 -
33527 - _vec.data(0) = in.image();
33528 - _vec.data(1) = out.image();
33529 - _vec.call();
33530 - out._ref->addref( in._ref );
33531 -
33532 - return( out );
33533 -}
33534 -
33535 -// im_clip2fmt: convert image format to ofmt
33536 -VImage VImage::clip2fmt( int ofmt ) throw( VError )
33537 -{
33538 - VImage in = *this;
33539 - VImage out;
33540 -
33541 - Vargv _vec( "im_clip2fmt" );
33542 -
33543 - _vec.data(0) = in.image();
33544 - _vec.data(1) = out.image();
33545 - *((int*) _vec.data(2)) = ofmt;
33546 - _vec.call();
33547 - out._ref->addref( in._ref );
33548 -
33549 - return( out );
33550 -}
33551 -
33552 -// im_copy: copy image
33553 -VImage VImage::copy() throw( VError )
33554 -{
33555 - VImage in = *this;
33556 - VImage out;
33557 -
33558 - Vargv _vec( "im_copy" );
33559 -
33560 - _vec.data(0) = in.image();
33561 - _vec.data(1) = out.image();
33562 - _vec.call();
33563 - out._ref->addref( in._ref );
33564 -
33565 - return( out );
33566 -}
33567 -
33568 -// im_copy_file: copy image to a file and return that
33569 -VImage VImage::copy_file() throw( VError )
33570 -{
33571 - VImage in = *this;
33572 - VImage out;
33573 -
33574 - Vargv _vec( "im_copy_file" );
33575 -
33576 - _vec.data(0) = in.image();
33577 - _vec.data(1) = out.image();
33578 - _vec.call();
33579 - out._ref->addref( in._ref );
33580 -
33581 - return( out );
33582 -}
33583 -
33584 -// im_copy_morph: copy image, setting pixel layout
33585 -VImage VImage::copy_morph( int Bands, int BandFmt, int Coding ) throw( VError )
33586 -{
33587 - VImage input = *this;
33588 - VImage output;
33589 -
33590 - Vargv _vec( "im_copy_morph" );
33591 -
33592 - _vec.data(0) = input.image();
33593 - _vec.data(1) = output.image();
33594 - *((int*) _vec.data(2)) = Bands;
33595 - *((int*) _vec.data(3)) = BandFmt;
33596 - *((int*) _vec.data(4)) = Coding;
33597 - _vec.call();
33598 - output._ref->addref( input._ref );
33599 -
33600 - return( output );
33601 -}
33602 -
33603 -// im_copy_swap: copy image, swapping byte order
33604 -VImage VImage::copy_swap() throw( VError )
33605 -{
33606 - VImage in = *this;
33607 - VImage out;
33608 -
33609 - Vargv _vec( "im_copy_swap" );
33610 -
33611 - _vec.data(0) = in.image();
33612 - _vec.data(1) = out.image();
33613 - _vec.call();
33614 - out._ref->addref( in._ref );
33615 -
33616 - return( out );
33617 -}
33618 -
33619 -// im_copy_set: copy image, setting informational fields
33620 -VImage VImage::copy_set( int Type, double Xres, double Yres, int Xoffset, int Yoffset ) throw( VError )
33621 -{
33622 - VImage input = *this;
33623 - VImage output;
33624 -
33625 - Vargv _vec( "im_copy_set" );
33626 -
33627 - _vec.data(0) = input.image();
33628 - _vec.data(1) = output.image();
33629 - *((int*) _vec.data(2)) = Type;
33630 - *((double*) _vec.data(3)) = Xres;
33631 - *((double*) _vec.data(4)) = Yres;
33632 - *((int*) _vec.data(5)) = Xoffset;
33633 - *((int*) _vec.data(6)) = Yoffset;
33634 - _vec.call();
33635 - output._ref->addref( input._ref );
33636 -
33637 - return( output );
33638 -}
33639 -
33640 -// im_extract_area: extract area
33641 -VImage VImage::extract_area( int left, int top, int width, int height ) throw( VError )
33642 -{
33643 - VImage input = *this;
33644 - VImage output;
33645 -
33646 - Vargv _vec( "im_extract_area" );
33647 -
33648 - _vec.data(0) = input.image();
33649 - _vec.data(1) = output.image();
33650 - *((int*) _vec.data(2)) = left;
33651 - *((int*) _vec.data(3)) = top;
33652 - *((int*) _vec.data(4)) = width;
33653 - *((int*) _vec.data(5)) = height;
33654 - _vec.call();
33655 - output._ref->addref( input._ref );
33656 -
33657 - return( output );
33658 -}
33659 -
33660 -// im_extract_areabands: extract area and bands
33661 -VImage VImage::extract_areabands( int left, int top, int width, int height, int band, int nbands ) throw( VError )
33662 -{
33663 - VImage input = *this;
33664 - VImage output;
33665 -
33666 - Vargv _vec( "im_extract_areabands" );
33667 -
33668 - _vec.data(0) = input.image();
33669 - _vec.data(1) = output.image();
33670 - *((int*) _vec.data(2)) = left;
33671 - *((int*) _vec.data(3)) = top;
33672 - *((int*) _vec.data(4)) = width;
33673 - *((int*) _vec.data(5)) = height;
33674 - *((int*) _vec.data(6)) = band;
33675 - *((int*) _vec.data(7)) = nbands;
33676 - _vec.call();
33677 - output._ref->addref( input._ref );
33678 -
33679 - return( output );
33680 -}
33681 -
33682 -// im_extract_band: extract band
33683 -VImage VImage::extract_band( int band ) throw( VError )
33684 -{
33685 - VImage input = *this;
33686 - VImage output;
33687 -
33688 - Vargv _vec( "im_extract_band" );
33689 -
33690 - _vec.data(0) = input.image();
33691 - _vec.data(1) = output.image();
33692 - *((int*) _vec.data(2)) = band;
33693 - _vec.call();
33694 - output._ref->addref( input._ref );
33695 -
33696 - return( output );
33697 -}
33698 -
33699 -// im_extract_bands: extract several bands
33700 -VImage VImage::extract_bands( int band, int nbands ) throw( VError )
33701 -{
33702 - VImage input = *this;
33703 - VImage output;
33704 -
33705 - Vargv _vec( "im_extract_bands" );
33706 -
33707 - _vec.data(0) = input.image();
33708 - _vec.data(1) = output.image();
33709 - *((int*) _vec.data(2)) = band;
33710 - *((int*) _vec.data(3)) = nbands;
33711 - _vec.call();
33712 - output._ref->addref( input._ref );
33713 -
33714 - return( output );
33715 -}
33716 -
33717 -// im_extract: extract area/band
33718 -VImage VImage::extract( int left, int top, int width, int height, int band ) throw( VError )
33719 -{
33720 - VImage input = *this;
33721 - VImage output;
33722 -
33723 - Vargv _vec( "im_extract" );
33724 -
33725 - _vec.data(0) = input.image();
33726 - _vec.data(1) = output.image();
33727 - *((int*) _vec.data(2)) = left;
33728 - *((int*) _vec.data(3)) = top;
33729 - *((int*) _vec.data(4)) = width;
33730 - *((int*) _vec.data(5)) = height;
33731 - *((int*) _vec.data(6)) = band;
33732 - _vec.call();
33733 - output._ref->addref( input._ref );
33734 -
33735 - return( output );
33736 -}
33737 -
33738 -// im_falsecolour: turn luminance changes into chrominance changes
33739 -VImage VImage::falsecolour() throw( VError )
33740 -{
33741 - VImage in = *this;
33742 - VImage out;
33743 -
33744 - Vargv _vec( "im_falsecolour" );
33745 -
33746 - _vec.data(0) = in.image();
33747 - _vec.data(1) = out.image();
33748 - _vec.call();
33749 - out._ref->addref( in._ref );
33750 -
33751 - return( out );
33752 -}
33753 -
33754 -// im_fliphor: flip image left-right
33755 -VImage VImage::fliphor() throw( VError )
33756 -{
33757 - VImage in = *this;
33758 - VImage out;
33759 -
33760 - Vargv _vec( "im_fliphor" );
33761 -
33762 - _vec.data(0) = in.image();
33763 - _vec.data(1) = out.image();
33764 - _vec.call();
33765 - out._ref->addref( in._ref );
33766 -
33767 - return( out );
33768 -}
33769 -
33770 -// im_flipver: flip image top-bottom
33771 -VImage VImage::flipver() throw( VError )
33772 -{
33773 - VImage in = *this;
33774 - VImage out;
33775 -
33776 - Vargv _vec( "im_flipver" );
33777 -
33778 - _vec.data(0) = in.image();
33779 - _vec.data(1) = out.image();
33780 - _vec.call();
33781 - out._ref->addref( in._ref );
33782 -
33783 - return( out );
33784 -}
33785 -
33786 -// im_gbandjoin: bandwise join of many images
33787 -VImage VImage::gbandjoin( std::vector<VImage> in ) throw( VError )
33788 -{
33789 - VImage out;
33790 -
33791 - Vargv _vec( "im_gbandjoin" );
33792 -
33793 - ((im_imagevec_object*) _vec.data(0))->n = in.size();
33794 - ((im_imagevec_object*) _vec.data(0))->vec = new IMAGE *[in.size()];
33795 - for( unsigned int i = 0; i < in.size(); i++ )
33796 - ((im_imagevec_object*) _vec.data(0))->vec[i] = in[i].image();
33797 - _vec.data(1) = out.image();
33798 - _vec.call();
33799 - for( unsigned int i = 0; i < in.size(); i++ )
33800 - out._ref->addref( in[i]._ref );
33801 -
33802 - return( out );
33803 -}
33804 -
33805 -// im_grid: chop a tall thin image into a grid of images
33806 -VImage VImage::grid( int tile_height, int across, int down ) throw( VError )
33807 -{
33808 - VImage input = *this;
33809 - VImage output;
33810 -
33811 - Vargv _vec( "im_grid" );
33812 -
33813 - _vec.data(0) = input.image();
33814 - _vec.data(1) = output.image();
33815 - *((int*) _vec.data(2)) = tile_height;
33816 - *((int*) _vec.data(3)) = across;
33817 - *((int*) _vec.data(4)) = down;
33818 - _vec.call();
33819 - output._ref->addref( input._ref );
33820 -
33821 - return( output );
33822 -}
33823 -
33824 -// im_insert: insert sub-image into main image at position
33825 -VImage VImage::insert( VImage sub, int x, int y ) throw( VError )
33826 -{
33827 - VImage in = *this;
33828 - VImage out;
33829 -
33830 - Vargv _vec( "im_insert" );
33831 -
33832 - _vec.data(0) = in.image();
33833 - _vec.data(1) = sub.image();
33834 - _vec.data(2) = out.image();
33835 - *((int*) _vec.data(3)) = x;
33836 - *((int*) _vec.data(4)) = y;
33837 - _vec.call();
33838 - out._ref->addref( in._ref );
33839 - out._ref->addref( sub._ref );
33840 -
33841 - return( out );
33842 -}
33843 -
33844 -// im_insertset: insert sub into main at every position in x, y
33845 -VImage VImage::insert( VImage sub, std::vector<int> x, std::vector<int> y ) throw( VError )
33846 -{
33847 - VImage main = *this;
33848 - VImage out;
33849 -
33850 - Vargv _vec( "im_insertset" );
33851 -
33852 - _vec.data(0) = main.image();
33853 - _vec.data(1) = sub.image();
33854 - _vec.data(2) = out.image();
33855 - ((im_intvec_object*) _vec.data(3))->n = x.size();
33856 - ((im_intvec_object*) _vec.data(3))->vec = new int[x.size()];
33857 - for( unsigned int i = 0; i < x.size(); i++ )
33858 - ((im_intvec_object*) _vec.data(3))->vec[i] = x[i];
33859 - ((im_intvec_object*) _vec.data(4))->n = y.size();
33860 - ((im_intvec_object*) _vec.data(4))->vec = new int[y.size()];
33861 - for( unsigned int i = 0; i < y.size(); i++ )
33862 - ((im_intvec_object*) _vec.data(4))->vec[i] = y[i];
33863 - _vec.call();
33864 -
33865 - return( out );
33866 -}
33867 -
33868 -// im_insert_noexpand: insert sub-image into main image at position, no expansion
33869 -VImage VImage::insert_noexpand( VImage sub, int x, int y ) throw( VError )
33870 -{
33871 - VImage in = *this;
33872 - VImage out;
33873 -
33874 - Vargv _vec( "im_insert_noexpand" );
33875 -
33876 - _vec.data(0) = in.image();
33877 - _vec.data(1) = sub.image();
33878 - _vec.data(2) = out.image();
33879 - *((int*) _vec.data(3)) = x;
33880 - *((int*) _vec.data(4)) = y;
33881 - _vec.call();
33882 - out._ref->addref( in._ref );
33883 - out._ref->addref( sub._ref );
33884 -
33885 - return( out );
33886 -}
33887 -
33888 -// im_embed: embed in within a set of borders
33889 -VImage VImage::embed( int type, int x, int y, int width, int height ) throw( VError )
33890 -{
33891 - VImage in = *this;
33892 - VImage out;
33893 -
33894 - Vargv _vec( "im_embed" );
33895 -
33896 - _vec.data(0) = in.image();
33897 - _vec.data(1) = out.image();
33898 - *((int*) _vec.data(2)) = type;
33899 - *((int*) _vec.data(3)) = x;
33900 - *((int*) _vec.data(4)) = y;
33901 - *((int*) _vec.data(5)) = width;
33902 - *((int*) _vec.data(6)) = height;
33903 - _vec.call();
33904 - out._ref->addref( in._ref );
33905 -
33906 - return( out );
33907 -}
33908 -
33909 -// im_lrjoin: join two images left-right
33910 -VImage VImage::lrjoin( VImage in2 ) throw( VError )
33911 -{
33912 - VImage in1 = *this;
33913 - VImage out;
33914 -
33915 - Vargv _vec( "im_lrjoin" );
33916 -
33917 - _vec.data(0) = in1.image();
33918 - _vec.data(1) = in2.image();
33919 - _vec.data(2) = out.image();
33920 - _vec.call();
33921 - out._ref->addref( in1._ref );
33922 - out._ref->addref( in2._ref );
33923 -
33924 - return( out );
33925 -}
33926 -
33927 -// im_msb: convert to uchar by discarding bits
33928 -VImage VImage::msb() throw( VError )
33929 -{
33930 - VImage in = *this;
33931 - VImage out;
33932 -
33933 - Vargv _vec( "im_msb" );
33934 -
33935 - _vec.data(0) = in.image();
33936 - _vec.data(1) = out.image();
33937 - _vec.call();
33938 - out._ref->addref( in._ref );
33939 -
33940 - return( out );
33941 -}
33942 -
33943 -// im_msb_band: convert to single band uchar by discarding bits
33944 -VImage VImage::msb_band( int band ) throw( VError )
33945 -{
33946 - VImage in = *this;
33947 - VImage out;
33948 -
33949 - Vargv _vec( "im_msb_band" );
33950 -
33951 - _vec.data(0) = in.image();
33952 - _vec.data(1) = out.image();
33953 - *((int*) _vec.data(2)) = band;
33954 - _vec.call();
33955 - out._ref->addref( in._ref );
33956 -
33957 - return( out );
33958 -}
33959 -
33960 -// im_replicate: replicate an image horizontally and vertically
33961 -VImage VImage::replicate( int across, int down ) throw( VError )
33962 -{
33963 - VImage input = *this;
33964 - VImage output;
33965 -
33966 - Vargv _vec( "im_replicate" );
33967 -
33968 - _vec.data(0) = input.image();
33969 - _vec.data(1) = output.image();
33970 - *((int*) _vec.data(2)) = across;
33971 - *((int*) _vec.data(3)) = down;
33972 - _vec.call();
33973 - output._ref->addref( input._ref );
33974 -
33975 - return( output );
33976 -}
33977 -
33978 -// im_ri2c: join two non-complex images to form complex
33979 -VImage VImage::ri2c( VImage in2 ) throw( VError )
33980 -{
33981 - VImage in1 = *this;
33982 - VImage out;
33983 -
33984 - Vargv _vec( "im_ri2c" );
33985 -
33986 - _vec.data(0) = in1.image();
33987 - _vec.data(1) = in2.image();
33988 - _vec.data(2) = out.image();
33989 - _vec.call();
33990 - out._ref->addref( in1._ref );
33991 - out._ref->addref( in2._ref );
33992 -
33993 - return( out );
33994 -}
33995 -
33996 -// im_rot180: rotate image 180 degrees
33997 -VImage VImage::rot180() throw( VError )
33998 -{
33999 - VImage in = *this;
34000 - VImage out;
34001 -
34002 - Vargv _vec( "im_rot180" );
34003 -
34004 - _vec.data(0) = in.image();
34005 - _vec.data(1) = out.image();
34006 - _vec.call();
34007 - out._ref->addref( in._ref );
34008 -
34009 - return( out );
34010 -}
34011 -
34012 -// im_rot270: rotate image 270 degrees clockwise
34013 -VImage VImage::rot270() throw( VError )
34014 -{
34015 - VImage in = *this;
34016 - VImage out;
34017 -
34018 - Vargv _vec( "im_rot270" );
34019 -
34020 - _vec.data(0) = in.image();
34021 - _vec.data(1) = out.image();
34022 - _vec.call();
34023 - out._ref->addref( in._ref );
34024 -
34025 - return( out );
34026 -}
34027 -
34028 -// im_rot90: rotate image 90 degrees clockwise
34029 -VImage VImage::rot90() throw( VError )
34030 -{
34031 - VImage in = *this;
34032 - VImage out;
34033 -
34034 - Vargv _vec( "im_rot90" );
34035 -
34036 - _vec.data(0) = in.image();
34037 - _vec.data(1) = out.image();
34038 - _vec.call();
34039 - out._ref->addref( in._ref );
34040 -
34041 - return( out );
34042 -}
34043 -
34044 -// im_scale: scale image linearly to fit range 0-255
34045 -VImage VImage::scale() throw( VError )
34046 -{
34047 - VImage in = *this;
34048 - VImage out;
34049 -
34050 - Vargv _vec( "im_scale" );
34051 -
34052 - _vec.data(0) = in.image();
34053 - _vec.data(1) = out.image();
34054 - _vec.call();
34055 - out._ref->addref( in._ref );
34056 -
34057 - return( out );
34058 -}
34059 -
34060 -// im_scaleps: logarithmic scale of image to fit range 0-255
34061 -VImage VImage::scaleps() throw( VError )
34062 -{
34063 - VImage in = *this;
34064 - VImage out;
34065 -
34066 - Vargv _vec( "im_scaleps" );
34067 -
34068 - _vec.data(0) = in.image();
34069 - _vec.data(1) = out.image();
34070 - _vec.call();
34071 -
34072 - return( out );
34073 -}
34074 -
34075 -// im_subsample: subsample image by integer factors
34076 -VImage VImage::subsample( int xshrink, int yshrink ) throw( VError )
34077 -{
34078 - VImage in = *this;
34079 - VImage out;
34080 -
34081 - Vargv _vec( "im_subsample" );
34082 -
34083 - _vec.data(0) = in.image();
34084 - _vec.data(1) = out.image();
34085 - *((int*) _vec.data(2)) = xshrink;
34086 - *((int*) _vec.data(3)) = yshrink;
34087 - _vec.call();
34088 - out._ref->addref( in._ref );
34089 -
34090 - return( out );
34091 -}
34092 -
34093 -// im_system: run command on image
34094 -char* VImage::system( char* command ) throw( VError )
34095 -{
34096 - VImage im = *this;
34097 - char* output;
34098 -
34099 - Vargv _vec( "im_system" );
34100 -
34101 - _vec.data(0) = im.image();
34102 - _vec.data(1) = (im_object) command;
34103 - _vec.call();
34104 - output = (char*) _vec.data(2);
34105 -
34106 - return( output );
34107 -}
34108 -
34109 -// im_system_image: run command on image, with image output
34110 -VImage VImage::system_image( char* in_format, char* out_format, char* command, char*& log ) throw( VError )
34111 -{
34112 - VImage in = *this;
34113 - VImage out;
34114 -
34115 - Vargv _vec( "im_system_image" );
34116 -
34117 - _vec.data(0) = in.image();
34118 - _vec.data(1) = out.image();
34119 - _vec.data(2) = (im_object) in_format;
34120 - _vec.data(3) = (im_object) out_format;
34121 - _vec.data(4) = (im_object) command;
34122 - _vec.call();
34123 - log = (char*) _vec.data(5);
34124 -
34125 - return( out );
34126 -}
34127 -
34128 -// im_tbjoin: join two images top-bottom
34129 -VImage VImage::tbjoin( VImage in2 ) throw( VError )
34130 -{
34131 - VImage in1 = *this;
34132 - VImage out;
34133 -
34134 - Vargv _vec( "im_tbjoin" );
34135 -
34136 - _vec.data(0) = in1.image();
34137 - _vec.data(1) = in2.image();
34138 - _vec.data(2) = out.image();
34139 - _vec.call();
34140 - out._ref->addref( in1._ref );
34141 - out._ref->addref( in2._ref );
34142 -
34143 - return( out );
34144 -}
34145 -
34146 -// im_text: generate text image
34147 -VImage VImage::text( char* text, char* font, int width, int alignment, int dpi ) throw( VError )
34148 -{
34149 - VImage out;
34150 -
34151 - Vargv _vec( "im_text" );
34152 -
34153 - _vec.data(0) = out.image();
34154 - _vec.data(1) = (im_object) text;
34155 - _vec.data(2) = (im_object) font;
34156 - *((int*) _vec.data(3)) = width;
34157 - *((int*) _vec.data(4)) = alignment;
34158 - *((int*) _vec.data(5)) = dpi;
34159 - _vec.call();
34160 -
34161 - return( out );
34162 -}
34163 -
34164 -// im_wrap: shift image origin, wrapping at sides
34165 -VImage VImage::wrap( int x, int y ) throw( VError )
34166 -{
34167 - VImage in = *this;
34168 - VImage out;
34169 -
34170 - Vargv _vec( "im_wrap" );
34171 -
34172 - _vec.data(0) = in.image();
34173 - _vec.data(1) = out.image();
34174 - *((int*) _vec.data(2)) = x;
34175 - *((int*) _vec.data(3)) = y;
34176 - _vec.call();
34177 - out._ref->addref( in._ref );
34178 -
34179 - return( out );
34180 -}
34181 -
34182 -// im_zoom: simple zoom of an image by integer factors
34183 -VImage VImage::zoom( int xfac, int yfac ) throw( VError )
34184 -{
34185 - VImage input = *this;
34186 - VImage output;
34187 -
34188 - Vargv _vec( "im_zoom" );
34189 -
34190 - _vec.data(0) = input.image();
34191 - _vec.data(1) = output.image();
34192 - *((int*) _vec.data(2)) = xfac;
34193 - *((int*) _vec.data(3)) = yfac;
34194 - _vec.call();
34195 - output._ref->addref( input._ref );
34196 -
34197 - return( output );
34198 -}
34199 -
34200 -
34201 -// bodies for package convolution
34202 -// this file automatically generated from
34203 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
34204 -// im_aconvsep: approximate separable convolution
34205 -VImage VImage::aconvsep( VDMask matrix, int n_layers ) throw( VError )
34206 -{
34207 - VImage in = *this;
34208 - VImage out;
34209 -
34210 - Vargv _vec( "im_aconvsep" );
34211 -
34212 - _vec.data(0) = in.image();
34213 - _vec.data(1) = out.image();
34214 - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr;
34215 - *((int*) _vec.data(3)) = n_layers;
34216 - _vec.call();
34217 - out._ref->addref( in._ref );
34218 -
34219 - return( out );
34220 -}
34221 -
34222 -// im_aconv: approximate convolution
34223 -VImage VImage::aconv( VDMask matrix, int n_layers, int cluster ) throw( VError )
34224 -{
34225 - VImage in = *this;
34226 - VImage out;
34227 -
34228 - Vargv _vec( "im_aconv" );
34229 -
34230 - _vec.data(0) = in.image();
34231 - _vec.data(1) = out.image();
34232 - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr;
34233 - *((int*) _vec.data(3)) = n_layers;
34234 - *((int*) _vec.data(4)) = cluster;
34235 - _vec.call();
34236 - out._ref->addref( in._ref );
34237 -
34238 - return( out );
34239 -}
34240 -
34241 -// im_addgnoise: add gaussian noise with mean 0 and std. dev. sigma
34242 -VImage VImage::addgnoise( double sigma ) throw( VError )
34243 -{
34244 - VImage in = *this;
34245 - VImage out;
34246 -
34247 - Vargv _vec( "im_addgnoise" );
34248 -
34249 - _vec.data(0) = in.image();
34250 - _vec.data(1) = out.image();
34251 - *((double*) _vec.data(2)) = sigma;
34252 - _vec.call();
34253 - out._ref->addref( in._ref );
34254 -
34255 - return( out );
34256 -}
34257 -
34258 -// im_compass: convolve with 8-way rotating integer mask
34259 -VImage VImage::compass( VIMask matrix ) throw( VError )
34260 -{
34261 - VImage in = *this;
34262 - VImage out;
34263 -
34264 - Vargv _vec( "im_compass" );
34265 -
34266 - _vec.data(0) = in.image();
34267 - _vec.data(1) = out.image();
34268 - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr;
34269 - _vec.call();
34270 - out._ref->addref( in._ref );
34271 -
34272 - return( out );
34273 -}
34274 -
34275 -// im_contrast_surface: find high-contrast points in an image
34276 -VImage VImage::contrast_surface( int half_win_size, int spacing ) throw( VError )
34277 -{
34278 - VImage in = *this;
34279 - VImage out;
34280 -
34281 - Vargv _vec( "im_contrast_surface" );
34282 -
34283 - _vec.data(0) = in.image();
34284 - _vec.data(1) = out.image();
34285 - *((int*) _vec.data(2)) = half_win_size;
34286 - *((int*) _vec.data(3)) = spacing;
34287 - _vec.call();
34288 - out._ref->addref( in._ref );
34289 -
34290 - return( out );
34291 -}
34292 -
34293 -// im_conv: convolve
34294 -VImage VImage::conv( VIMask matrix ) throw( VError )
34295 -{
34296 - VImage in = *this;
34297 - VImage out;
34298 -
34299 - Vargv _vec( "im_conv" );
34300 -
34301 - _vec.data(0) = in.image();
34302 - _vec.data(1) = out.image();
34303 - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr;
34304 - _vec.call();
34305 - out._ref->addref( in._ref );
34306 -
34307 - return( out );
34308 -}
34309 -
34310 -// im_conv_f: convolve, with DOUBLEMASK
34311 -VImage VImage::conv( VDMask matrix ) throw( VError )
34312 -{
34313 - VImage in = *this;
34314 - VImage out;
34315 -
34316 - Vargv _vec( "im_conv_f" );
34317 -
34318 - _vec.data(0) = in.image();
34319 - _vec.data(1) = out.image();
34320 - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr;
34321 - _vec.call();
34322 - out._ref->addref( in._ref );
34323 -
34324 - return( out );
34325 -}
34326 -
34327 -// im_convsep: seperable convolution
34328 -VImage VImage::convsep( VIMask matrix ) throw( VError )
34329 -{
34330 - VImage in = *this;
34331 - VImage out;
34332 -
34333 - Vargv _vec( "im_convsep" );
34334 -
34335 - _vec.data(0) = in.image();
34336 - _vec.data(1) = out.image();
34337 - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr;
34338 - _vec.call();
34339 - out._ref->addref( in._ref );
34340 -
34341 - return( out );
34342 -}
34343 -
34344 -// im_convsep_f: seperable convolution, with DOUBLEMASK
34345 -VImage VImage::convsep( VDMask matrix ) throw( VError )
34346 -{
34347 - VImage in = *this;
34348 - VImage out;
34349 -
34350 - Vargv _vec( "im_convsep_f" );
34351 -
34352 - _vec.data(0) = in.image();
34353 - _vec.data(1) = out.image();
34354 - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr;
34355 - _vec.call();
34356 - out._ref->addref( in._ref );
34357 -
34358 - return( out );
34359 -}
34360 -
34361 -// im_fastcor: fast correlate in2 within in1
34362 -VImage VImage::fastcor( VImage in2 ) throw( VError )
34363 -{
34364 - VImage in1 = *this;
34365 - VImage out;
34366 -
34367 - Vargv _vec( "im_fastcor" );
34368 -
34369 - _vec.data(0) = in1.image();
34370 - _vec.data(1) = in2.image();
34371 - _vec.data(2) = out.image();
34372 - _vec.call();
34373 - out._ref->addref( in1._ref );
34374 - out._ref->addref( in2._ref );
34375 -
34376 - return( out );
34377 -}
34378 -
34379 -// im_gradcor: non-normalised correlation of gradient of in2 within in1
34380 -VImage VImage::gradcor( VImage in2 ) throw( VError )
34381 -{
34382 - VImage in1 = *this;
34383 - VImage out;
34384 -
34385 - Vargv _vec( "im_gradcor" );
34386 -
34387 - _vec.data(0) = in1.image();
34388 - _vec.data(1) = in2.image();
34389 - _vec.data(2) = out.image();
34390 - _vec.call();
34391 - out._ref->addref( in1._ref );
34392 - out._ref->addref( in2._ref );
34393 -
34394 - return( out );
34395 -}
34396 -
34397 -// im_gradient: convolve with 2-way rotating mask
34398 -VImage VImage::gradient( VIMask matrix ) throw( VError )
34399 -{
34400 - VImage in = *this;
34401 - VImage out;
34402 -
34403 - Vargv _vec( "im_gradient" );
34404 -
34405 - _vec.data(0) = in.image();
34406 - _vec.data(1) = out.image();
34407 - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr;
34408 - _vec.call();
34409 - out._ref->addref( in._ref );
34410 -
34411 - return( out );
34412 -}
34413 -
34414 -// im_grad_x: horizontal difference image
34415 -VImage VImage::grad_x() throw( VError )
34416 -{
34417 - VImage in = *this;
34418 - VImage out;
34419 -
34420 - Vargv _vec( "im_grad_x" );
34421 -
34422 - _vec.data(0) = in.image();
34423 - _vec.data(1) = out.image();
34424 - _vec.call();
34425 - out._ref->addref( in._ref );
34426 -
34427 - return( out );
34428 -}
34429 -
34430 -// im_grad_y: vertical difference image
34431 -VImage VImage::grad_y() throw( VError )
34432 -{
34433 - VImage in = *this;
34434 - VImage out;
34435 -
34436 - Vargv _vec( "im_grad_y" );
34437 -
34438 - _vec.data(0) = in.image();
34439 - _vec.data(1) = out.image();
34440 - _vec.call();
34441 - out._ref->addref( in._ref );
34442 -
34443 - return( out );
34444 -}
34445 -
34446 -// im_lindetect: convolve with 4-way rotating mask
34447 -VImage VImage::lindetect( VIMask matrix ) throw( VError )
34448 -{
34449 - VImage in = *this;
34450 - VImage out;
34451 -
34452 - Vargv _vec( "im_lindetect" );
34453 -
34454 - _vec.data(0) = in.image();
34455 - _vec.data(1) = out.image();
34456 - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr;
34457 - _vec.call();
34458 - out._ref->addref( in._ref );
34459 -
34460 - return( out );
34461 -}
34462 -
34463 -// im_sharpen: sharpen high frequencies of L channel of LabQ
34464 -VImage VImage::sharpen( int mask_size, double x1, double y2, double y3, double m1, double m2 ) throw( VError )
34465 -{
34466 - VImage in = *this;
34467 - VImage out;
34468 -
34469 - Vargv _vec( "im_sharpen" );
34470 -
34471 - _vec.data(0) = in.image();
34472 - _vec.data(1) = out.image();
34473 - *((int*) _vec.data(2)) = mask_size;
34474 - *((double*) _vec.data(3)) = x1;
34475 - *((double*) _vec.data(4)) = y2;
34476 - *((double*) _vec.data(5)) = y3;
34477 - *((double*) _vec.data(6)) = m1;
34478 - *((double*) _vec.data(7)) = m2;
34479 - _vec.call();
34480 - out._ref->addref( in._ref );
34481 -
34482 - return( out );
34483 -}
34484 -
34485 -// im_spcor: normalised correlation of in2 within in1
34486 -VImage VImage::spcor( VImage in2 ) throw( VError )
34487 -{
34488 - VImage in1 = *this;
34489 - VImage out;
34490 -
34491 - Vargv _vec( "im_spcor" );
34492 -
34493 - _vec.data(0) = in1.image();
34494 - _vec.data(1) = in2.image();
34495 - _vec.data(2) = out.image();
34496 - _vec.call();
34497 - out._ref->addref( in1._ref );
34498 - out._ref->addref( in2._ref );
34499 -
34500 - return( out );
34501 -}
34502 -
34503 -
34504 -// bodies for package deprecated
34505 -// this file automatically generated from
34506 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
34507 -// im_argb2rgba: convert pre-multipled argb to png-style rgba
34508 -VImage VImage::argb2rgba() throw( VError )
34509 -{
34510 - VImage in = *this;
34511 - VImage out;
34512 -
34513 - Vargv _vec( "im_argb2rgba" );
34514 -
34515 - _vec.data(0) = in.image();
34516 - _vec.data(1) = out.image();
34517 - _vec.call();
34518 - out._ref->addref( in._ref );
34519 -
34520 - return( out );
34521 -}
34522 -
34523 -// im_flood_copy: flood with ink from start_x, start_y while pixel == start pixel
34524 -VImage VImage::flood_copy( int start_x, int start_y, std::vector<double> ink ) throw( VError )
34525 -{
34526 - VImage in = *this;
34527 - VImage out;
34528 -
34529 - Vargv _vec( "im_flood_copy" );
34530 -
34531 - _vec.data(0) = in.image();
34532 - _vec.data(1) = out.image();
34533 - *((int*) _vec.data(2)) = start_x;
34534 - *((int*) _vec.data(3)) = start_y;
34535 - ((im_doublevec_object*) _vec.data(4))->n = ink.size();
34536 - ((im_doublevec_object*) _vec.data(4))->vec = new double[ink.size()];
34537 - for( unsigned int i = 0; i < ink.size(); i++ )
34538 - ((im_doublevec_object*) _vec.data(4))->vec[i] = ink[i];
34539 - _vec.call();
34540 -
34541 - return( out );
34542 -}
34543 -
34544 -// im_flood_blob_copy: flood with ink from start_x, start_y while pixel == start pixel
34545 -VImage VImage::flood_blob_copy( int start_x, int start_y, std::vector<double> ink ) throw( VError )
34546 -{
34547 - VImage in = *this;
34548 - VImage out;
34549 -
34550 - Vargv _vec( "im_flood_blob_copy" );
34551 -
34552 - _vec.data(0) = in.image();
34553 - _vec.data(1) = out.image();
34554 - *((int*) _vec.data(2)) = start_x;
34555 - *((int*) _vec.data(3)) = start_y;
34556 - ((im_doublevec_object*) _vec.data(4))->n = ink.size();
34557 - ((im_doublevec_object*) _vec.data(4))->vec = new double[ink.size()];
34558 - for( unsigned int i = 0; i < ink.size(); i++ )
34559 - ((im_doublevec_object*) _vec.data(4))->vec[i] = ink[i];
34560 - _vec.call();
34561 -
34562 - return( out );
34563 -}
34564 -
34565 -// im_flood_other_copy: flood mark with serial from start_x, start_y while pixel == start pixel
34566 -VImage VImage::flood_other_copy( VImage mark, int start_x, int start_y, int serial ) throw( VError )
34567 -{
34568 - VImage test = *this;
34569 - VImage out;
34570 -
34571 - Vargv _vec( "im_flood_other_copy" );
34572 -
34573 - _vec.data(0) = test.image();
34574 - _vec.data(1) = mark.image();
34575 - _vec.data(2) = out.image();
34576 - *((int*) _vec.data(3)) = start_x;
34577 - *((int*) _vec.data(4)) = start_y;
34578 - *((int*) _vec.data(5)) = serial;
34579 - _vec.call();
34580 -
34581 - return( out );
34582 -}
34583 -
34584 -// im_clip: convert to unsigned 8-bit integer
34585 -VImage VImage::clip() throw( VError )
34586 -{
34587 - VImage in = *this;
34588 - VImage out;
34589 -
34590 - Vargv _vec( "im_clip" );
34591 -
34592 - _vec.data(0) = in.image();
34593 - _vec.data(1) = out.image();
34594 - _vec.call();
34595 - out._ref->addref( in._ref );
34596 -
34597 - return( out );
34598 -}
34599 -
34600 -// im_c2ps: find power spectrum of complex image
34601 -VImage VImage::c2ps() throw( VError )
34602 -{
34603 - VImage in = *this;
34604 - VImage out;
34605 -
34606 - Vargv _vec( "im_c2ps" );
34607 -
34608 - _vec.data(0) = in.image();
34609 - _vec.data(1) = out.image();
34610 - _vec.call();
34611 - out._ref->addref( in._ref );
34612 -
34613 - return( out );
34614 -}
34615 -
34616 -// im_resize_linear: resize to X by Y pixels with linear interpolation
34617 -VImage VImage::resize_linear( int X, int Y ) throw( VError )
34618 -{
34619 - VImage in = *this;
34620 - VImage out;
34621 -
34622 - Vargv _vec( "im_resize_linear" );
34623 -
34624 - _vec.data(0) = in.image();
34625 - _vec.data(1) = out.image();
34626 - *((int*) _vec.data(2)) = X;
34627 - *((int*) _vec.data(3)) = Y;
34628 - _vec.call();
34629 -
34630 - return( out );
34631 -}
34632 -
34633 -// im_cmulnorm: multiply two complex images, normalising output
34634 -VImage VImage::cmulnorm( VImage in2 ) throw( VError )
34635 -{
34636 - VImage in1 = *this;
34637 - VImage out;
34638 -
34639 - Vargv _vec( "im_cmulnorm" );
34640 -
34641 - _vec.data(0) = in1.image();
34642 - _vec.data(1) = in2.image();
34643 - _vec.data(2) = out.image();
34644 - _vec.call();
34645 - out._ref->addref( in1._ref );
34646 - out._ref->addref( in2._ref );
34647 -
34648 - return( out );
34649 -}
34650 -
34651 -// im_fav4: average of 4 images
34652 -VImage VImage::fav4( VImage in2, VImage in3, VImage in4 ) throw( VError )
34653 -{
34654 - VImage in1 = *this;
34655 - VImage out;
34656 -
34657 - Vargv _vec( "im_fav4" );
34658 -
34659 - _vec.data(0) = in1.image();
34660 - _vec.data(1) = in2.image();
34661 - _vec.data(2) = in3.image();
34662 - _vec.data(3) = in4.image();
34663 - _vec.data(4) = out.image();
34664 - _vec.call();
34665 -
34666 - return( out );
34667 -}
34668 -
34669 -// im_gadd: calculate a*in1 + b*in2 + c = outfile
34670 -VImage VImage::gadd( double a, double b, VImage in2, double c ) throw( VError )
34671 -{
34672 - VImage in1 = *this;
34673 - VImage out;
34674 -
34675 - Vargv _vec( "im_gadd" );
34676 -
34677 - *((double*) _vec.data(0)) = a;
34678 - _vec.data(1) = in1.image();
34679 - *((double*) _vec.data(2)) = b;
34680 - _vec.data(3) = in2.image();
34681 - *((double*) _vec.data(4)) = c;
34682 - _vec.data(5) = out.image();
34683 - _vec.call();
34684 -
34685 - return( out );
34686 -}
34687 -
34688 -// im_icc_export: convert a float LAB to an 8-bit device image with an ICC profile
34689 -VImage VImage::icc_export( char* output_profile, int intent ) throw( VError )
34690 -{
34691 - VImage in = *this;
34692 - VImage out;
34693 -
34694 - Vargv _vec( "im_icc_export" );
34695 -
34696 - _vec.data(0) = in.image();
34697 - _vec.data(1) = out.image();
34698 - _vec.data(2) = (im_object) output_profile;
34699 - *((int*) _vec.data(3)) = intent;
34700 - _vec.call();
34701 - out._ref->addref( in._ref );
34702 -
34703 - return( out );
34704 -}
34705 -
34706 -// im_litecor: calculate max(white)*factor*(in/white), if clip == 1
34707 -VImage VImage::litecor( VImage white, int clip, double factor ) throw( VError )
34708 -{
34709 - VImage in = *this;
34710 - VImage out;
34711 -
34712 - Vargv _vec( "im_litecor" );
34713 -
34714 - _vec.data(0) = in.image();
34715 - _vec.data(1) = white.image();
34716 - _vec.data(2) = out.image();
34717 - *((int*) _vec.data(3)) = clip;
34718 - *((double*) _vec.data(4)) = factor;
34719 - _vec.call();
34720 -
34721 - return( out );
34722 -}
34723 -
34724 -// im_affine: affine transform
34725 -VImage VImage::affine( double a, double b, double c, double d, double dx, double dy, int x, int y, int w, int h ) throw( VError )
34726 -{
34727 - VImage in = *this;
34728 - VImage out;
34729 -
34730 - Vargv _vec( "im_affine" );
34731 -
34732 - _vec.data(0) = in.image();
34733 - _vec.data(1) = out.image();
34734 - *((double*) _vec.data(2)) = a;
34735 - *((double*) _vec.data(3)) = b;
34736 - *((double*) _vec.data(4)) = c;
34737 - *((double*) _vec.data(5)) = d;
34738 - *((double*) _vec.data(6)) = dx;
34739 - *((double*) _vec.data(7)) = dy;
34740 - *((int*) _vec.data(8)) = x;
34741 - *((int*) _vec.data(9)) = y;
34742 - *((int*) _vec.data(10)) = w;
34743 - *((int*) _vec.data(11)) = h;
34744 - _vec.call();
34745 - out._ref->addref( in._ref );
34746 -
34747 - return( out );
34748 -}
34749 -
34750 -// im_clip2c: convert to signed 8-bit integer
34751 -VImage VImage::clip2c() throw( VError )
34752 -{
34753 - VImage in = *this;
34754 - VImage out;
34755 -
34756 - Vargv _vec( "im_clip2c" );
34757 -
34758 - _vec.data(0) = in.image();
34759 - _vec.data(1) = out.image();
34760 - _vec.call();
34761 - out._ref->addref( in._ref );
34762 -
34763 - return( out );
34764 -}
34765 -
34766 -// im_clip2cm: convert to complex
34767 -VImage VImage::clip2cm() throw( VError )
34768 -{
34769 - VImage in = *this;
34770 - VImage out;
34771 -
34772 - Vargv _vec( "im_clip2cm" );
34773 -
34774 - _vec.data(0) = in.image();
34775 - _vec.data(1) = out.image();
34776 - _vec.call();
34777 - out._ref->addref( in._ref );
34778 -
34779 - return( out );
34780 -}
34781 -
34782 -// im_clip2d: convert to double-precision float
34783 -VImage VImage::clip2d() throw( VError )
34784 -{
34785 - VImage in = *this;
34786 - VImage out;
34787 -
34788 - Vargv _vec( "im_clip2d" );
34789 -
34790 - _vec.data(0) = in.image();
34791 - _vec.data(1) = out.image();
34792 - _vec.call();
34793 - out._ref->addref( in._ref );
34794 -
34795 - return( out );
34796 -}
34797 -
34798 -// im_clip2dcm: convert to double complex
34799 -VImage VImage::clip2dcm() throw( VError )
34800 -{
34801 - VImage in = *this;
34802 - VImage out;
34803 -
34804 - Vargv _vec( "im_clip2dcm" );
34805 -
34806 - _vec.data(0) = in.image();
34807 - _vec.data(1) = out.image();
34808 - _vec.call();
34809 - out._ref->addref( in._ref );
34810 -
34811 - return( out );
34812 -}
34813 -
34814 -// im_clip2f: convert to single-precision float
34815 -VImage VImage::clip2f() throw( VError )
34816 -{
34817 - VImage in = *this;
34818 - VImage out;
34819 -
34820 - Vargv _vec( "im_clip2f" );
34821 -
34822 - _vec.data(0) = in.image();
34823 - _vec.data(1) = out.image();
34824 - _vec.call();
34825 - out._ref->addref( in._ref );
34826 -
34827 - return( out );
34828 -}
34829 -
34830 -// im_clip2i: convert to signed 32-bit integer
34831 -VImage VImage::clip2i() throw( VError )
34832 -{
34833 - VImage in = *this;
34834 - VImage out;
34835 -
34836 - Vargv _vec( "im_clip2i" );
34837 -
34838 - _vec.data(0) = in.image();
34839 - _vec.data(1) = out.image();
34840 - _vec.call();
34841 - out._ref->addref( in._ref );
34842 -
34843 - return( out );
34844 -}
34845 -
34846 -// im_convsub: convolve uchar to uchar, sub-sampling by xskip, yskip
34847 -VImage VImage::convsub( VIMask matrix, int xskip, int yskip ) throw( VError )
34848 -{
34849 - VImage in = *this;
34850 - VImage out;
34851 -
34852 - Vargv _vec( "im_convsub" );
34853 -
34854 - _vec.data(0) = in.image();
34855 - _vec.data(1) = out.image();
34856 - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr;
34857 - *((int*) _vec.data(3)) = xskip;
34858 - *((int*) _vec.data(4)) = yskip;
34859 - _vec.call();
34860 -
34861 - return( out );
34862 -}
34863 -
34864 -// im_convf: convolve, with DOUBLEMASK
34865 -VImage VImage::convf( VDMask matrix ) throw( VError )
34866 -{
34867 - VImage in = *this;
34868 - VImage out;
34869 -
34870 - Vargv _vec( "im_convf" );
34871 -
34872 - _vec.data(0) = in.image();
34873 - _vec.data(1) = out.image();
34874 - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr;
34875 - _vec.call();
34876 - out._ref->addref( in._ref );
34877 -
34878 - return( out );
34879 -}
34880 -
34881 -// im_convsepf: seperable convolution, with DOUBLEMASK
34882 -VImage VImage::convsepf( VDMask matrix ) throw( VError )
34883 -{
34884 - VImage in = *this;
34885 - VImage out;
34886 -
34887 - Vargv _vec( "im_convsepf" );
34888 -
34889 - _vec.data(0) = in.image();
34890 - _vec.data(1) = out.image();
34891 - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr;
34892 - _vec.call();
34893 - out._ref->addref( in._ref );
34894 -
34895 - return( out );
34896 -}
34897 -
34898 -// im_clip2s: convert to signed 16-bit integer
34899 -VImage VImage::clip2s() throw( VError )
34900 -{
34901 - VImage in = *this;
34902 - VImage out;
34903 -
34904 - Vargv _vec( "im_clip2s" );
34905 -
34906 - _vec.data(0) = in.image();
34907 - _vec.data(1) = out.image();
34908 - _vec.call();
34909 - out._ref->addref( in._ref );
34910 -
34911 - return( out );
34912 -}
34913 -
34914 -// im_clip2ui: convert to unsigned 32-bit integer
34915 -VImage VImage::clip2ui() throw( VError )
34916 -{
34917 - VImage in = *this;
34918 - VImage out;
34919 -
34920 - Vargv _vec( "im_clip2ui" );
34921 -
34922 - _vec.data(0) = in.image();
34923 - _vec.data(1) = out.image();
34924 - _vec.call();
34925 - out._ref->addref( in._ref );
34926 -
34927 - return( out );
34928 -}
34929 -
34930 -// im_insertplaceset: insert sub into main at every position in x, y
34931 -VImage VImage::insertplace( VImage sub, std::vector<int> x, std::vector<int> y ) throw( VError )
34932 -{
34933 - VImage main = *this;
34934 - VImage out;
34935 -
34936 - Vargv _vec( "im_insertplaceset" );
34937 -
34938 - _vec.data(0) = main.image();
34939 - _vec.data(1) = sub.image();
34940 - _vec.data(2) = out.image();
34941 - ((im_intvec_object*) _vec.data(3))->n = x.size();
34942 - ((im_intvec_object*) _vec.data(3))->vec = new int[x.size()];
34943 - for( unsigned int i = 0; i < x.size(); i++ )
34944 - ((im_intvec_object*) _vec.data(3))->vec[i] = x[i];
34945 - ((im_intvec_object*) _vec.data(4))->n = y.size();
34946 - ((im_intvec_object*) _vec.data(4))->vec = new int[y.size()];
34947 - for( unsigned int i = 0; i < y.size(); i++ )
34948 - ((im_intvec_object*) _vec.data(4))->vec[i] = y[i];
34949 - _vec.call();
34950 -
34951 - return( out );
34952 -}
34953 -
34954 -// im_clip2us: convert to unsigned 16-bit integer
34955 -VImage VImage::clip2us() throw( VError )
34956 -{
34957 - VImage in = *this;
34958 - VImage out;
34959 -
34960 - Vargv _vec( "im_clip2us" );
34961 -
34962 - _vec.data(0) = in.image();
34963 - _vec.data(1) = out.image();
34964 - _vec.call();
34965 - out._ref->addref( in._ref );
34966 -
34967 - return( out );
34968 -}
34969 -
34970 -// im_slice: slice an image using two thresholds
34971 -VImage VImage::slice( double thresh1, double thresh2 ) throw( VError )
34972 -{
34973 - VImage input = *this;
34974 - VImage output;
34975 -
34976 - Vargv _vec( "im_slice" );
34977 -
34978 - _vec.data(0) = input.image();
34979 - _vec.data(1) = output.image();
34980 - *((double*) _vec.data(2)) = thresh1;
34981 - *((double*) _vec.data(3)) = thresh2;
34982 - _vec.call();
34983 -
34984 - return( output );
34985 -}
34986 -
34987 -// im_segment: number continuous regions in an image
34988 -VImage VImage::segment( int& segments ) throw( VError )
34989 -{
34990 - VImage test = *this;
34991 - VImage mask;
34992 -
34993 - Vargv _vec( "im_segment" );
34994 -
34995 - _vec.data(0) = test.image();
34996 - _vec.data(1) = mask.image();
34997 - _vec.call();
34998 - segments = *((int*)_vec.data(2));
34999 -
35000 - return( mask );
35001 -}
35002 -
35003 -// im_line: draw line between points (x1,y1) and (x2,y2)
35004 -void VImage::line( int x1, int y1, int x2, int y2, int pelval ) throw( VError )
35005 -{
35006 - VImage im = *this;
35007 - Vargv _vec( "im_line" );
35008 -
35009 - _vec.data(0) = im.image();
35010 - *((int*) _vec.data(1)) = x1;
35011 - *((int*) _vec.data(2)) = y1;
35012 - *((int*) _vec.data(3)) = x2;
35013 - *((int*) _vec.data(4)) = y2;
35014 - *((int*) _vec.data(5)) = pelval;
35015 - _vec.call();
35016 -}
35017 -
35018 -// im_thresh: slice an image at a threshold
35019 -VImage VImage::thresh( double threshold ) throw( VError )
35020 -{
35021 - VImage input = *this;
35022 - VImage output;
35023 -
35024 - Vargv _vec( "im_thresh" );
35025 -
35026 - _vec.data(0) = input.image();
35027 - _vec.data(1) = output.image();
35028 - *((double*) _vec.data(2)) = threshold;
35029 - _vec.call();
35030 -
35031 - return( output );
35032 -}
35033 -
35034 -// im_convf_raw: convolve, with DOUBLEMASK, no border
35035 -VImage VImage::convf_raw( VDMask matrix ) throw( VError )
35036 -{
35037 - VImage in = *this;
35038 - VImage out;
35039 -
35040 - Vargv _vec( "im_convf_raw" );
35041 -
35042 - _vec.data(0) = in.image();
35043 - _vec.data(1) = out.image();
35044 - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr;
35045 - _vec.call();
35046 - out._ref->addref( in._ref );
35047 -
35048 - return( out );
35049 -}
35050 -
35051 -// im_conv_raw: convolve, no border
35052 -VImage VImage::conv_raw( VIMask matrix ) throw( VError )
35053 -{
35054 - VImage in = *this;
35055 - VImage out;
35056 -
35057 - Vargv _vec( "im_conv_raw" );
35058 -
35059 - _vec.data(0) = in.image();
35060 - _vec.data(1) = out.image();
35061 - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr;
35062 - _vec.call();
35063 - out._ref->addref( in._ref );
35064 -
35065 - return( out );
35066 -}
35067 -
35068 -// im_contrast_surface_raw: find high-contrast points in an image
35069 -VImage VImage::contrast_surface_raw( int half_win_size, int spacing ) throw( VError )
35070 -{
35071 - VImage in = *this;
35072 - VImage out;
35073 -
35074 - Vargv _vec( "im_contrast_surface_raw" );
35075 -
35076 - _vec.data(0) = in.image();
35077 - _vec.data(1) = out.image();
35078 - *((int*) _vec.data(2)) = half_win_size;
35079 - *((int*) _vec.data(3)) = spacing;
35080 - _vec.call();
35081 - out._ref->addref( in._ref );
35082 -
35083 - return( out );
35084 -}
35085 -
35086 -// im_convsepf_raw: seperable convolution, with DOUBLEMASK, no border
35087 -VImage VImage::convsepf_raw( VDMask matrix ) throw( VError )
35088 -{
35089 - VImage in = *this;
35090 - VImage out;
35091 -
35092 - Vargv _vec( "im_convsepf_raw" );
35093 -
35094 - _vec.data(0) = in.image();
35095 - _vec.data(1) = out.image();
35096 - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr;
35097 - _vec.call();
35098 - out._ref->addref( in._ref );
35099 -
35100 - return( out );
35101 -}
35102 -
35103 -// im_convsep_raw: seperable convolution, no border
35104 -VImage VImage::convsep_raw( VIMask matrix ) throw( VError )
35105 -{
35106 - VImage in = *this;
35107 - VImage out;
35108 -
35109 - Vargv _vec( "im_convsep_raw" );
35110 -
35111 - _vec.data(0) = in.image();
35112 - _vec.data(1) = out.image();
35113 - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr;
35114 - _vec.call();
35115 - out._ref->addref( in._ref );
35116 -
35117 - return( out );
35118 -}
35119 -
35120 -// im_fastcor_raw: fast correlate in2 within in1, no border
35121 -VImage VImage::fastcor_raw( VImage in2 ) throw( VError )
35122 -{
35123 - VImage in1 = *this;
35124 - VImage out;
35125 -
35126 - Vargv _vec( "im_fastcor_raw" );
35127 -
35128 - _vec.data(0) = in1.image();
35129 - _vec.data(1) = in2.image();
35130 - _vec.data(2) = out.image();
35131 - _vec.call();
35132 - out._ref->addref( in1._ref );
35133 - out._ref->addref( in2._ref );
35134 -
35135 - return( out );
35136 -}
35137 -
35138 -// im_gradcor_raw: non-normalised correlation of gradient of in2 within in1, no padding
35139 -VImage VImage::gradcor_raw( VImage in2 ) throw( VError )
35140 -{
35141 - VImage in1 = *this;
35142 - VImage out;
35143 -
35144 - Vargv _vec( "im_gradcor_raw" );
35145 -
35146 - _vec.data(0) = in1.image();
35147 - _vec.data(1) = in2.image();
35148 - _vec.data(2) = out.image();
35149 - _vec.call();
35150 - out._ref->addref( in1._ref );
35151 - out._ref->addref( in2._ref );
35152 -
35153 - return( out );
35154 -}
35155 -
35156 -// im_spcor_raw: normalised correlation of in2 within in1, no black padding
35157 -VImage VImage::spcor_raw( VImage in2 ) throw( VError )
35158 -{
35159 - VImage in1 = *this;
35160 - VImage out;
35161 -
35162 - Vargv _vec( "im_spcor_raw" );
35163 -
35164 - _vec.data(0) = in1.image();
35165 - _vec.data(1) = in2.image();
35166 - _vec.data(2) = out.image();
35167 - _vec.call();
35168 - out._ref->addref( in1._ref );
35169 - out._ref->addref( in2._ref );
35170 -
35171 - return( out );
35172 -}
35173 -
35174 -// im_lhisteq_raw: local histogram equalisation, no border
35175 -VImage VImage::lhisteq_raw( int width, int height ) throw( VError )
35176 -{
35177 - VImage in = *this;
35178 - VImage out;
35179 -
35180 - Vargv _vec( "im_lhisteq_raw" );
35181 -
35182 - _vec.data(0) = in.image();
35183 - _vec.data(1) = out.image();
35184 - *((int*) _vec.data(2)) = width;
35185 - *((int*) _vec.data(3)) = height;
35186 - _vec.call();
35187 - out._ref->addref( in._ref );
35188 -
35189 - return( out );
35190 -}
35191 -
35192 -// im_stdif_raw: statistical differencing, no border
35193 -VImage VImage::stdif_raw( double a, double m0, double b, double s0, int xw, int yw ) throw( VError )
35194 -{
35195 - VImage in = *this;
35196 - VImage out;
35197 -
35198 - Vargv _vec( "im_stdif_raw" );
35199 -
35200 - _vec.data(0) = in.image();
35201 - _vec.data(1) = out.image();
35202 - *((double*) _vec.data(2)) = a;
35203 - *((double*) _vec.data(3)) = m0;
35204 - *((double*) _vec.data(4)) = b;
35205 - *((double*) _vec.data(5)) = s0;
35206 - *((int*) _vec.data(6)) = xw;
35207 - *((int*) _vec.data(7)) = yw;
35208 - _vec.call();
35209 - out._ref->addref( in._ref );
35210 -
35211 - return( out );
35212 -}
35213 -
35214 -// im_rank_raw: rank filter nth element of xsize/ysize window, no border
35215 -VImage VImage::rank_raw( int xsize, int ysize, int n ) throw( VError )
35216 -{
35217 - VImage in = *this;
35218 - VImage out;
35219 -
35220 - Vargv _vec( "im_rank_raw" );
35221 -
35222 - _vec.data(0) = in.image();
35223 - _vec.data(1) = out.image();
35224 - *((int*) _vec.data(2)) = xsize;
35225 - *((int*) _vec.data(3)) = ysize;
35226 - *((int*) _vec.data(4)) = n;
35227 - _vec.call();
35228 - out._ref->addref( in._ref );
35229 -
35230 - return( out );
35231 -}
35232 -
35233 -// im_dilate_raw: dilate image with mask
35234 -VImage VImage::dilate_raw( VIMask mask ) throw( VError )
35235 -{
35236 - VImage in = *this;
35237 - VImage out;
35238 -
35239 - Vargv _vec( "im_dilate_raw" );
35240 -
35241 - _vec.data(0) = in.image();
35242 - _vec.data(1) = out.image();
35243 - ((im_mask_object*) _vec.data(2))->mask = mask.mask().iptr;
35244 - _vec.call();
35245 - out._ref->addref( in._ref );
35246 -
35247 - return( out );
35248 -}
35249 -
35250 -// im_erode_raw: erode image with mask
35251 -VImage VImage::erode_raw( VIMask mask ) throw( VError )
35252 -{
35253 - VImage in = *this;
35254 - VImage out;
35255 -
35256 - Vargv _vec( "im_erode_raw" );
35257 -
35258 - _vec.data(0) = in.image();
35259 - _vec.data(1) = out.image();
35260 - ((im_mask_object*) _vec.data(2))->mask = mask.mask().iptr;
35261 - _vec.call();
35262 - out._ref->addref( in._ref );
35263 -
35264 - return( out );
35265 -}
35266 -
35267 -// im_similarity_area: output area xywh of similarity transformation
35268 -VImage VImage::similarity_area( double a, double b, double dx, double dy, int x, int y, int w, int h ) throw( VError )
35269 -{
35270 - VImage in = *this;
35271 - VImage out;
35272 -
35273 - Vargv _vec( "im_similarity_area" );
35274 -
35275 - _vec.data(0) = in.image();
35276 - _vec.data(1) = out.image();
35277 - *((double*) _vec.data(2)) = a;
35278 - *((double*) _vec.data(3)) = b;
35279 - *((double*) _vec.data(4)) = dx;
35280 - *((double*) _vec.data(5)) = dy;
35281 - *((int*) _vec.data(6)) = x;
35282 - *((int*) _vec.data(7)) = y;
35283 - *((int*) _vec.data(8)) = w;
35284 - *((int*) _vec.data(9)) = h;
35285 - _vec.call();
35286 - out._ref->addref( in._ref );
35287 -
35288 - return( out );
35289 -}
35290 -
35291 -// im_similarity: similarity transformation
35292 -VImage VImage::similarity( double a, double b, double dx, double dy ) throw( VError )
35293 -{
35294 - VImage in = *this;
35295 - VImage out;
35296 -
35297 - Vargv _vec( "im_similarity" );
35298 -
35299 - _vec.data(0) = in.image();
35300 - _vec.data(1) = out.image();
35301 - *((double*) _vec.data(2)) = a;
35302 - *((double*) _vec.data(3)) = b;
35303 - *((double*) _vec.data(4)) = dx;
35304 - *((double*) _vec.data(5)) = dy;
35305 - _vec.call();
35306 - out._ref->addref( in._ref );
35307 -
35308 - return( out );
35309 -}
35310 -
35311 -// im_mask2vips: convert DOUBLEMASK to VIPS image
35312 -VImage VImage::mask2vips( VDMask input ) throw( VError )
35313 -{
35314 - VImage output;
35315 -
35316 - Vargv _vec( "im_mask2vips" );
35317 -
35318 - ((im_mask_object*) _vec.data(0))->mask = input.mask().dptr;
35319 - _vec.data(1) = output.image();
35320 - _vec.call();
35321 -
35322 - return( output );
35323 -}
35324 -
35325 -// im_vips2mask: convert VIPS image to DOUBLEMASK
35326 -VDMask VImage::vips2mask() throw( VError )
35327 -{
35328 - VImage input = *this;
35329 - VDMask output;
35330 -
35331 - Vargv _vec( "im_vips2mask" );
35332 -
35333 - _vec.data(0) = input.image();
35334 - ((im_mask_object*) _vec.data(1))->name = (char*)"noname";
35335 - _vec.call();
35336 - output.embed( (DOUBLEMASK *)((im_mask_object*)_vec.data(1))->mask );
35337 -
35338 - return( output );
35339 -}
35340 -
35341 -// im_insertplace: draw image sub inside image main at position (x,y)
35342 -void VImage::insertplace( VImage sub, int x, int y ) throw( VError )
35343 -{
35344 - VImage main = *this;
35345 - Vargv _vec( "im_insertplace" );
35346 -
35347 - _vec.data(0) = main.image();
35348 - _vec.data(1) = sub.image();
35349 - *((int*) _vec.data(2)) = x;
35350 - *((int*) _vec.data(3)) = y;
35351 - _vec.call();
35352 -}
35353 -
35354 -// im_circle: plot circle on image
35355 -void VImage::circle( int cx, int cy, int radius, int intensity ) throw( VError )
35356 -{
35357 - VImage image = *this;
35358 - Vargv _vec( "im_circle" );
35359 -
35360 - _vec.data(0) = image.image();
35361 - *((int*) _vec.data(1)) = cx;
35362 - *((int*) _vec.data(2)) = cy;
35363 - *((int*) _vec.data(3)) = radius;
35364 - *((int*) _vec.data(4)) = intensity;
35365 - _vec.call();
35366 -}
35367 -
35368 -// im_andimage: bitwise and of two images
35369 -VImage VImage::andimage( VImage in2 ) throw( VError )
35370 -{
35371 - VImage in1 = *this;
35372 - VImage out;
35373 -
35374 - Vargv _vec( "im_andimage" );
35375 -
35376 - _vec.data(0) = in1.image();
35377 - _vec.data(1) = in2.image();
35378 - _vec.data(2) = out.image();
35379 - _vec.call();
35380 - out._ref->addref( in1._ref );
35381 - out._ref->addref( in2._ref );
35382 -
35383 - return( out );
35384 -}
35385 -
35386 -// im_andimageconst: bitwise and of an image with a constant
35387 -VImage VImage::andimage( int c ) throw( VError )
35388 -{
35389 - VImage in1 = *this;
35390 - VImage out;
35391 -
35392 - Vargv _vec( "im_andimageconst" );
35393 -
35394 - _vec.data(0) = in1.image();
35395 - _vec.data(1) = out.image();
35396 - *((int*) _vec.data(2)) = c;
35397 - _vec.call();
35398 - out._ref->addref( in1._ref );
35399 -
35400 - return( out );
35401 -}
35402 -
35403 -// im_andimage_vec: bitwise and of an image with a vector constant
35404 -VImage VImage::andimage( std::vector<double> vec ) throw( VError )
35405 -{
35406 - VImage in = *this;
35407 - VImage out;
35408 -
35409 - Vargv _vec( "im_andimage_vec" );
35410 -
35411 - _vec.data(0) = in.image();
35412 - _vec.data(1) = out.image();
35413 - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
35414 - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
35415 - for( unsigned int i = 0; i < vec.size(); i++ )
35416 - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
35417 - _vec.call();
35418 - out._ref->addref( in._ref );
35419 -
35420 - return( out );
35421 -}
35422 -
35423 -// im_orimage: bitwise or of two images
35424 -VImage VImage::orimage( VImage in2 ) throw( VError )
35425 -{
35426 - VImage in1 = *this;
35427 - VImage out;
35428 -
35429 - Vargv _vec( "im_orimage" );
35430 -
35431 - _vec.data(0) = in1.image();
35432 - _vec.data(1) = in2.image();
35433 - _vec.data(2) = out.image();
35434 - _vec.call();
35435 - out._ref->addref( in1._ref );
35436 - out._ref->addref( in2._ref );
35437 -
35438 - return( out );
35439 -}
35440 -
35441 -// im_orimageconst: bitwise or of an image with a constant
35442 -VImage VImage::orimage( int c ) throw( VError )
35443 -{
35444 - VImage in1 = *this;
35445 - VImage out;
35446 -
35447 - Vargv _vec( "im_orimageconst" );
35448 -
35449 - _vec.data(0) = in1.image();
35450 - _vec.data(1) = out.image();
35451 - *((int*) _vec.data(2)) = c;
35452 - _vec.call();
35453 - out._ref->addref( in1._ref );
35454 -
35455 - return( out );
35456 -}
35457 -
35458 -// im_orimage_vec: bitwise or of an image with a vector constant
35459 -VImage VImage::orimage( std::vector<double> vec ) throw( VError )
35460 -{
35461 - VImage in = *this;
35462 - VImage out;
35463 -
35464 - Vargv _vec( "im_orimage_vec" );
35465 -
35466 - _vec.data(0) = in.image();
35467 - _vec.data(1) = out.image();
35468 - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
35469 - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
35470 - for( unsigned int i = 0; i < vec.size(); i++ )
35471 - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
35472 - _vec.call();
35473 - out._ref->addref( in._ref );
35474 -
35475 - return( out );
35476 -}
35477 -
35478 -// im_eorimage: bitwise eor of two images
35479 -VImage VImage::eorimage( VImage in2 ) throw( VError )
35480 -{
35481 - VImage in1 = *this;
35482 - VImage out;
35483 -
35484 - Vargv _vec( "im_eorimage" );
35485 -
35486 - _vec.data(0) = in1.image();
35487 - _vec.data(1) = in2.image();
35488 - _vec.data(2) = out.image();
35489 - _vec.call();
35490 - out._ref->addref( in1._ref );
35491 - out._ref->addref( in2._ref );
35492 -
35493 - return( out );
35494 -}
35495 -
35496 -// im_eorimageconst: bitwise eor of an image with a constant
35497 -VImage VImage::eorimage( int c ) throw( VError )
35498 -{
35499 - VImage in1 = *this;
35500 - VImage out;
35501 -
35502 - Vargv _vec( "im_eorimageconst" );
35503 -
35504 - _vec.data(0) = in1.image();
35505 - _vec.data(1) = out.image();
35506 - *((int*) _vec.data(2)) = c;
35507 - _vec.call();
35508 - out._ref->addref( in1._ref );
35509 -
35510 - return( out );
35511 -}
35512 -
35513 -// im_eorimage_vec: bitwise eor of an image with a vector constant
35514 -VImage VImage::eorimage( std::vector<double> vec ) throw( VError )
35515 -{
35516 - VImage in = *this;
35517 - VImage out;
35518 -
35519 - Vargv _vec( "im_eorimage_vec" );
35520 -
35521 - _vec.data(0) = in.image();
35522 - _vec.data(1) = out.image();
35523 - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
35524 - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
35525 - for( unsigned int i = 0; i < vec.size(); i++ )
35526 - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
35527 - _vec.call();
35528 - out._ref->addref( in._ref );
35529 -
35530 - return( out );
35531 -}
35532 -
35533 -// im_shiftleft_vec: shift image array bits to left
35534 -VImage VImage::shiftleft( std::vector<double> vec ) throw( VError )
35535 -{
35536 - VImage in = *this;
35537 - VImage out;
35538 -
35539 - Vargv _vec( "im_shiftleft_vec" );
35540 -
35541 - _vec.data(0) = in.image();
35542 - _vec.data(1) = out.image();
35543 - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
35544 - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
35545 - for( unsigned int i = 0; i < vec.size(); i++ )
35546 - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
35547 - _vec.call();
35548 - out._ref->addref( in._ref );
35549 -
35550 - return( out );
35551 -}
35552 -
35553 -// im_shiftleft: shift image n bits to left
35554 -VImage VImage::shiftleft( int c ) throw( VError )
35555 -{
35556 - VImage in1 = *this;
35557 - VImage out;
35558 -
35559 - Vargv _vec( "im_shiftleft" );
35560 -
35561 - _vec.data(0) = in1.image();
35562 - _vec.data(1) = out.image();
35563 - *((int*) _vec.data(2)) = c;
35564 - _vec.call();
35565 - out._ref->addref( in1._ref );
35566 -
35567 - return( out );
35568 -}
35569 -
35570 -// im_shiftright_vec: shift image array bits to right
35571 -VImage VImage::shiftright( std::vector<double> vec ) throw( VError )
35572 -{
35573 - VImage in = *this;
35574 - VImage out;
35575 -
35576 - Vargv _vec( "im_shiftright_vec" );
35577 -
35578 - _vec.data(0) = in.image();
35579 - _vec.data(1) = out.image();
35580 - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
35581 - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
35582 - for( unsigned int i = 0; i < vec.size(); i++ )
35583 - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
35584 - _vec.call();
35585 - out._ref->addref( in._ref );
35586 -
35587 - return( out );
35588 -}
35589 -
35590 -// im_shiftright: shift integer image n bits to right
35591 -VImage VImage::shiftright( int c ) throw( VError )
35592 -{
35593 - VImage in1 = *this;
35594 - VImage out;
35595 -
35596 - Vargv _vec( "im_shiftright" );
35597 -
35598 - _vec.data(0) = in1.image();
35599 - _vec.data(1) = out.image();
35600 - *((int*) _vec.data(2)) = c;
35601 - _vec.call();
35602 - out._ref->addref( in1._ref );
35603 -
35604 - return( out );
35605 -}
35606 -
35607 -// im_blend: use cond image to blend between images in1 and in2
35608 -VImage VImage::blend( VImage in1, VImage in2 ) throw( VError )
35609 -{
35610 - VImage cond = *this;
35611 - VImage out;
35612 -
35613 - Vargv _vec( "im_blend" );
35614 -
35615 - _vec.data(0) = cond.image();
35616 - _vec.data(1) = in1.image();
35617 - _vec.data(2) = in2.image();
35618 - _vec.data(3) = out.image();
35619 - _vec.call();
35620 - out._ref->addref( cond._ref );
35621 - out._ref->addref( in1._ref );
35622 - out._ref->addref( in2._ref );
35623 -
35624 - return( out );
35625 -}
35626 -
35627 -// im_equal: two images equal in value
35628 -VImage VImage::equal( VImage in2 ) throw( VError )
35629 -{
35630 - VImage in1 = *this;
35631 - VImage out;
35632 -
35633 - Vargv _vec( "im_equal" );
35634 -
35635 - _vec.data(0) = in1.image();
35636 - _vec.data(1) = in2.image();
35637 - _vec.data(2) = out.image();
35638 - _vec.call();
35639 - out._ref->addref( in1._ref );
35640 - out._ref->addref( in2._ref );
35641 -
35642 - return( out );
35643 -}
35644 -
35645 -// im_equal_vec: image equals doublevec
35646 -VImage VImage::equal( std::vector<double> vec ) throw( VError )
35647 -{
35648 - VImage in = *this;
35649 - VImage out;
35650 -
35651 - Vargv _vec( "im_equal_vec" );
35652 -
35653 - _vec.data(0) = in.image();
35654 - _vec.data(1) = out.image();
35655 - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
35656 - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
35657 - for( unsigned int i = 0; i < vec.size(); i++ )
35658 - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
35659 - _vec.call();
35660 - out._ref->addref( in._ref );
35661 -
35662 - return( out );
35663 -}
35664 -
35665 -// im_equalconst: image equals const
35666 -VImage VImage::equal( double c ) throw( VError )
35667 -{
35668 - VImage in1 = *this;
35669 - VImage out;
35670 -
35671 - Vargv _vec( "im_equalconst" );
35672 -
35673 - _vec.data(0) = in1.image();
35674 - _vec.data(1) = out.image();
35675 - *((double*) _vec.data(2)) = c;
35676 - _vec.call();
35677 - out._ref->addref( in1._ref );
35678 -
35679 - return( out );
35680 -}
35681 -
35682 -// im_ifthenelse: use cond image to choose pels from image in1 or in2
35683 -VImage VImage::ifthenelse( VImage in1, VImage in2 ) throw( VError )
35684 -{
35685 - VImage cond = *this;
35686 - VImage out;
35687 -
35688 - Vargv _vec( "im_ifthenelse" );
35689 -
35690 - _vec.data(0) = cond.image();
35691 - _vec.data(1) = in1.image();
35692 - _vec.data(2) = in2.image();
35693 - _vec.data(3) = out.image();
35694 - _vec.call();
35695 - out._ref->addref( cond._ref );
35696 - out._ref->addref( in1._ref );
35697 - out._ref->addref( in2._ref );
35698 -
35699 - return( out );
35700 -}
35701 -
35702 -// im_less: in1 less than in2 in value
35703 -VImage VImage::less( VImage in2 ) throw( VError )
35704 -{
35705 - VImage in1 = *this;
35706 - VImage out;
35707 -
35708 - Vargv _vec( "im_less" );
35709 -
35710 - _vec.data(0) = in1.image();
35711 - _vec.data(1) = in2.image();
35712 - _vec.data(2) = out.image();
35713 - _vec.call();
35714 - out._ref->addref( in1._ref );
35715 - out._ref->addref( in2._ref );
35716 -
35717 - return( out );
35718 -}
35719 -
35720 -// im_less_vec: in less than doublevec
35721 -VImage VImage::less( std::vector<double> vec ) throw( VError )
35722 -{
35723 - VImage in = *this;
35724 - VImage out;
35725 -
35726 - Vargv _vec( "im_less_vec" );
35727 -
35728 - _vec.data(0) = in.image();
35729 - _vec.data(1) = out.image();
35730 - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
35731 - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
35732 - for( unsigned int i = 0; i < vec.size(); i++ )
35733 - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
35734 - _vec.call();
35735 - out._ref->addref( in._ref );
35736 -
35737 - return( out );
35738 -}
35739 -
35740 -// im_lessconst: in less than const
35741 -VImage VImage::less( double c ) throw( VError )
35742 -{
35743 - VImage in1 = *this;
35744 - VImage out;
35745 -
35746 - Vargv _vec( "im_lessconst" );
35747 -
35748 - _vec.data(0) = in1.image();
35749 - _vec.data(1) = out.image();
35750 - *((double*) _vec.data(2)) = c;
35751 - _vec.call();
35752 - out._ref->addref( in1._ref );
35753 -
35754 - return( out );
35755 -}
35756 -
35757 -// im_lesseq: in1 less than or equal to in2 in value
35758 -VImage VImage::lesseq( VImage in2 ) throw( VError )
35759 -{
35760 - VImage in1 = *this;
35761 - VImage out;
35762 -
35763 - Vargv _vec( "im_lesseq" );
35764 -
35765 - _vec.data(0) = in1.image();
35766 - _vec.data(1) = in2.image();
35767 - _vec.data(2) = out.image();
35768 - _vec.call();
35769 - out._ref->addref( in1._ref );
35770 - out._ref->addref( in2._ref );
35771 -
35772 - return( out );
35773 -}
35774 -
35775 -// im_lesseq_vec: in less than or equal to doublevec
35776 -VImage VImage::lesseq( std::vector<double> vec ) throw( VError )
35777 -{
35778 - VImage in = *this;
35779 - VImage out;
35780 -
35781 - Vargv _vec( "im_lesseq_vec" );
35782 -
35783 - _vec.data(0) = in.image();
35784 - _vec.data(1) = out.image();
35785 - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
35786 - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
35787 - for( unsigned int i = 0; i < vec.size(); i++ )
35788 - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
35789 - _vec.call();
35790 - out._ref->addref( in._ref );
35791 -
35792 - return( out );
35793 -}
35794 -
35795 -// im_lesseqconst: in less than or equal to const
35796 -VImage VImage::lesseq( double c ) throw( VError )
35797 -{
35798 - VImage in1 = *this;
35799 - VImage out;
35800 -
35801 - Vargv _vec( "im_lesseqconst" );
35802 -
35803 - _vec.data(0) = in1.image();
35804 - _vec.data(1) = out.image();
35805 - *((double*) _vec.data(2)) = c;
35806 - _vec.call();
35807 - out._ref->addref( in1._ref );
35808 -
35809 - return( out );
35810 -}
35811 -
35812 -// im_more: in1 more than in2 in value
35813 -VImage VImage::more( VImage in2 ) throw( VError )
35814 -{
35815 - VImage in1 = *this;
35816 - VImage out;
35817 -
35818 - Vargv _vec( "im_more" );
35819 -
35820 - _vec.data(0) = in1.image();
35821 - _vec.data(1) = in2.image();
35822 - _vec.data(2) = out.image();
35823 - _vec.call();
35824 - out._ref->addref( in1._ref );
35825 - out._ref->addref( in2._ref );
35826 -
35827 - return( out );
35828 -}
35829 -
35830 -// im_more_vec: in more than doublevec
35831 -VImage VImage::more( std::vector<double> vec ) throw( VError )
35832 -{
35833 - VImage in = *this;
35834 - VImage out;
35835 -
35836 - Vargv _vec( "im_more_vec" );
35837 -
35838 - _vec.data(0) = in.image();
35839 - _vec.data(1) = out.image();
35840 - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
35841 - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
35842 - for( unsigned int i = 0; i < vec.size(); i++ )
35843 - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
35844 - _vec.call();
35845 - out._ref->addref( in._ref );
35846 -
35847 - return( out );
35848 -}
35849 -
35850 -// im_moreconst: in more than const
35851 -VImage VImage::more( double c ) throw( VError )
35852 -{
35853 - VImage in1 = *this;
35854 - VImage out;
35855 -
35856 - Vargv _vec( "im_moreconst" );
35857 -
35858 - _vec.data(0) = in1.image();
35859 - _vec.data(1) = out.image();
35860 - *((double*) _vec.data(2)) = c;
35861 - _vec.call();
35862 - out._ref->addref( in1._ref );
35863 -
35864 - return( out );
35865 -}
35866 -
35867 -// im_moreeq: in1 more than or equal to in2 in value
35868 -VImage VImage::moreeq( VImage in2 ) throw( VError )
35869 -{
35870 - VImage in1 = *this;
35871 - VImage out;
35872 -
35873 - Vargv _vec( "im_moreeq" );
35874 -
35875 - _vec.data(0) = in1.image();
35876 - _vec.data(1) = in2.image();
35877 - _vec.data(2) = out.image();
35878 - _vec.call();
35879 - out._ref->addref( in1._ref );
35880 - out._ref->addref( in2._ref );
35881 -
35882 - return( out );
35883 -}
35884 -
35885 -// im_moreeq_vec: in more than or equal to doublevec
35886 -VImage VImage::moreeq( std::vector<double> vec ) throw( VError )
35887 -{
35888 - VImage in = *this;
35889 - VImage out;
35890 -
35891 - Vargv _vec( "im_moreeq_vec" );
35892 -
35893 - _vec.data(0) = in.image();
35894 - _vec.data(1) = out.image();
35895 - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
35896 - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
35897 - for( unsigned int i = 0; i < vec.size(); i++ )
35898 - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
35899 - _vec.call();
35900 - out._ref->addref( in._ref );
35901 -
35902 - return( out );
35903 -}
35904 -
35905 -// im_moreeqconst: in more than or equal to const
35906 -VImage VImage::moreeq( double c ) throw( VError )
35907 -{
35908 - VImage in1 = *this;
35909 - VImage out;
35910 -
35911 - Vargv _vec( "im_moreeqconst" );
35912 -
35913 - _vec.data(0) = in1.image();
35914 - _vec.data(1) = out.image();
35915 - *((double*) _vec.data(2)) = c;
35916 - _vec.call();
35917 - out._ref->addref( in1._ref );
35918 -
35919 - return( out );
35920 -}
35921 -
35922 -// im_notequal: two images not equal in value
35923 -VImage VImage::notequal( VImage in2 ) throw( VError )
35924 -{
35925 - VImage in1 = *this;
35926 - VImage out;
35927 -
35928 - Vargv _vec( "im_notequal" );
35929 -
35930 - _vec.data(0) = in1.image();
35931 - _vec.data(1) = in2.image();
35932 - _vec.data(2) = out.image();
35933 - _vec.call();
35934 - out._ref->addref( in1._ref );
35935 - out._ref->addref( in2._ref );
35936 -
35937 - return( out );
35938 -}
35939 -
35940 -// im_notequal_vec: image does not equal doublevec
35941 -VImage VImage::notequal( std::vector<double> vec ) throw( VError )
35942 -{
35943 - VImage in = *this;
35944 - VImage out;
35945 -
35946 - Vargv _vec( "im_notequal_vec" );
35947 -
35948 - _vec.data(0) = in.image();
35949 - _vec.data(1) = out.image();
35950 - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
35951 - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
35952 - for( unsigned int i = 0; i < vec.size(); i++ )
35953 - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
35954 - _vec.call();
35955 - out._ref->addref( in._ref );
35956 -
35957 - return( out );
35958 -}
35959 -
35960 -// im_notequalconst: image does not equal const
35961 -VImage VImage::notequal( double c ) throw( VError )
35962 -{
35963 - VImage in1 = *this;
35964 - VImage out;
35965 -
35966 - Vargv _vec( "im_notequalconst" );
35967 -
35968 - _vec.data(0) = in1.image();
35969 - _vec.data(1) = out.image();
35970 - *((double*) _vec.data(2)) = c;
35971 - _vec.call();
35972 - out._ref->addref( in1._ref );
35973 -
35974 - return( out );
35975 -}
35976 -
35977 -// im_quadratic: transform via quadratic
35978 -VImage VImage::quadratic( VImage coeff ) throw( VError )
35979 -{
35980 - VImage in = *this;
35981 - VImage out;
35982 -
35983 - Vargv _vec( "im_quadratic" );
35984 -
35985 - _vec.data(0) = in.image();
35986 - _vec.data(1) = out.image();
35987 - _vec.data(2) = coeff.image();
35988 - _vec.call();
35989 - out._ref->addref( in._ref );
35990 - out._ref->addref( coeff._ref );
35991 -
35992 - return( out );
35993 -}
35994 -
35995 -
35996 -// bodies for package format
35997 -// this file automatically generated from
35998 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
35999 -// im_csv2vips: read a file in csv format
36000 -VImage VImage::csv2vips( char* filename ) throw( VError )
36001 -{
36002 - VImage im;
36003 -
36004 - Vargv _vec( "im_csv2vips" );
36005 -
36006 - _vec.data(0) = (im_object) filename;
36007 - _vec.data(1) = im.image();
36008 - _vec.call();
36009 -
36010 - return( im );
36011 -}
36012 -
36013 -// im_fits2vips: convert from fits
36014 -VImage VImage::fits2vips( char* in ) throw( VError )
36015 -{
36016 - VImage out;
36017 -
36018 - Vargv _vec( "im_fits2vips" );
36019 -
36020 - _vec.data(0) = (im_object) in;
36021 - _vec.data(1) = out.image();
36022 - _vec.call();
36023 -
36024 - return( out );
36025 -}
36026 -
36027 -// im_jpeg2vips: convert from jpeg
36028 -VImage VImage::jpeg2vips( char* in ) throw( VError )
36029 -{
36030 - VImage out;
36031 -
36032 - Vargv _vec( "im_jpeg2vips" );
36033 -
36034 - _vec.data(0) = (im_object) in;
36035 - _vec.data(1) = out.image();
36036 - _vec.call();
36037 -
36038 - return( out );
36039 -}
36040 -
36041 -// im_magick2vips: load file with libMagick
36042 -VImage VImage::magick2vips( char* in ) throw( VError )
36043 -{
36044 - VImage out;
36045 -
36046 - Vargv _vec( "im_magick2vips" );
36047 -
36048 - _vec.data(0) = (im_object) in;
36049 - _vec.data(1) = out.image();
36050 - _vec.call();
36051 -
36052 - return( out );
36053 -}
36054 -
36055 -// im_png2vips: convert PNG file to VIPS image
36056 -VImage VImage::png2vips( char* in ) throw( VError )
36057 -{
36058 - VImage out;
36059 -
36060 - Vargv _vec( "im_png2vips" );
36061 -
36062 - _vec.data(0) = (im_object) in;
36063 - _vec.data(1) = out.image();
36064 - _vec.call();
36065 -
36066 - return( out );
36067 -}
36068 -
36069 -// im_exr2vips: convert an OpenEXR file to VIPS
36070 -VImage VImage::exr2vips( char* in ) throw( VError )
36071 -{
36072 - VImage out;
36073 -
36074 - Vargv _vec( "im_exr2vips" );
36075 -
36076 - _vec.data(0) = (im_object) in;
36077 - _vec.data(1) = out.image();
36078 - _vec.call();
36079 -
36080 - return( out );
36081 -}
36082 -
36083 -// im_ppm2vips: read a file in pbm/pgm/ppm format
36084 -VImage VImage::ppm2vips( char* filename ) throw( VError )
36085 -{
36086 - VImage im;
36087 -
36088 - Vargv _vec( "im_ppm2vips" );
36089 -
36090 - _vec.data(0) = (im_object) filename;
36091 - _vec.data(1) = im.image();
36092 - _vec.call();
36093 -
36094 - return( im );
36095 -}
36096 -
36097 -// im_analyze2vips: read a file in analyze format
36098 -VImage VImage::analyze2vips( char* filename ) throw( VError )
36099 -{
36100 - VImage im;
36101 -
36102 - Vargv _vec( "im_analyze2vips" );
36103 -
36104 - _vec.data(0) = (im_object) filename;
36105 - _vec.data(1) = im.image();
36106 - _vec.call();
36107 -
36108 - return( im );
36109 -}
36110 -
36111 -// im_tiff2vips: convert TIFF file to VIPS image
36112 -VImage VImage::tiff2vips( char* in ) throw( VError )
36113 -{
36114 - VImage out;
36115 -
36116 - Vargv _vec( "im_tiff2vips" );
36117 -
36118 - _vec.data(0) = (im_object) in;
36119 - _vec.data(1) = out.image();
36120 - _vec.call();
36121 -
36122 - return( out );
36123 -}
36124 -
36125 -// im_vips2csv: write an image in csv format
36126 -void VImage::vips2csv( char* filename ) throw( VError )
36127 -{
36128 - VImage in = *this;
36129 - Vargv _vec( "im_vips2csv" );
36130 -
36131 - _vec.data(0) = in.image();
36132 - _vec.data(1) = (im_object) filename;
36133 - _vec.call();
36134 -}
36135 -
36136 -// im_vips2dz: save as deepzoom
36137 -void VImage::vips2dz( char* out ) throw( VError )
36138 -{
36139 - VImage in = *this;
36140 - Vargv _vec( "im_vips2dz" );
36141 -
36142 - _vec.data(0) = in.image();
36143 - _vec.data(1) = (im_object) out;
36144 - _vec.call();
36145 -}
36146 -
36147 -// im_vips2jpeg: convert to jpeg
36148 -void VImage::vips2jpeg( char* out ) throw( VError )
36149 -{
36150 - VImage in = *this;
36151 - Vargv _vec( "im_vips2jpeg" );
36152 -
36153 - _vec.data(0) = in.image();
36154 - _vec.data(1) = (im_object) out;
36155 - _vec.call();
36156 -}
36157 -
36158 -// im_vips2mimejpeg: convert to jpeg as mime type on stdout
36159 -void VImage::vips2mimejpeg( int qfac ) throw( VError )
36160 -{
36161 - VImage in = *this;
36162 - Vargv _vec( "im_vips2mimejpeg" );
36163 -
36164 - _vec.data(0) = in.image();
36165 - *((int*) _vec.data(1)) = qfac;
36166 - _vec.call();
36167 -}
36168 -
36169 -// im_vips2png: convert VIPS image to PNG file
36170 -void VImage::vips2png( char* out ) throw( VError )
36171 -{
36172 - VImage in = *this;
36173 - Vargv _vec( "im_vips2png" );
36174 -
36175 - _vec.data(0) = in.image();
36176 - _vec.data(1) = (im_object) out;
36177 - _vec.call();
36178 -}
36179 -
36180 -// im_vips2ppm: write a file in pbm/pgm/ppm format
36181 -void VImage::vips2ppm( char* filename ) throw( VError )
36182 -{
36183 - VImage im = *this;
36184 - Vargv _vec( "im_vips2ppm" );
36185 -
36186 - _vec.data(0) = im.image();
36187 - _vec.data(1) = (im_object) filename;
36188 - _vec.call();
36189 -}
36190 -
36191 -// im_vips2tiff: convert VIPS image to TIFF file
36192 -void VImage::vips2tiff( char* out ) throw( VError )
36193 -{
36194 - VImage in = *this;
36195 - Vargv _vec( "im_vips2tiff" );
36196 -
36197 - _vec.data(0) = in.image();
36198 - _vec.data(1) = (im_object) out;
36199 - _vec.call();
36200 -}
36201 -
36202 -
36203 -// bodies for package freq_filt
36204 -// this file automatically generated from
36205 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
36206 -// im_create_fmask: create frequency domain filter mask
36207 -VImage VImage::create_fmask( int width, int height, int type, double p1, double p2, double p3, double p4, double p5 ) throw( VError )
36208 -{
36209 - VImage out;
36210 -
36211 - Vargv _vec( "im_create_fmask" );
36212 -
36213 - _vec.data(0) = out.image();
36214 - *((int*) _vec.data(1)) = width;
36215 - *((int*) _vec.data(2)) = height;
36216 - *((int*) _vec.data(3)) = type;
36217 - *((double*) _vec.data(4)) = p1;
36218 - *((double*) _vec.data(5)) = p2;
36219 - *((double*) _vec.data(6)) = p3;
36220 - *((double*) _vec.data(7)) = p4;
36221 - *((double*) _vec.data(8)) = p5;
36222 - _vec.call();
36223 -
36224 - return( out );
36225 -}
36226 -
36227 -// im_disp_ps: make displayable power spectrum
36228 -VImage VImage::disp_ps() throw( VError )
36229 -{
36230 - VImage in = *this;
36231 - VImage out;
36232 -
36233 - Vargv _vec( "im_disp_ps" );
36234 -
36235 - _vec.data(0) = in.image();
36236 - _vec.data(1) = out.image();
36237 - _vec.call();
36238 -
36239 - return( out );
36240 -}
36241 -
36242 -// im_flt_image_freq: frequency domain filter image
36243 -VImage VImage::flt_image_freq( int type, double p1, double p2, double p3, double p4, double p5 ) throw( VError )
36244 -{
36245 - VImage in = *this;
36246 - VImage out;
36247 -
36248 - Vargv _vec( "im_flt_image_freq" );
36249 -
36250 - _vec.data(0) = in.image();
36251 - _vec.data(1) = out.image();
36252 - *((int*) _vec.data(2)) = type;
36253 - *((double*) _vec.data(3)) = p1;
36254 - *((double*) _vec.data(4)) = p2;
36255 - *((double*) _vec.data(5)) = p3;
36256 - *((double*) _vec.data(6)) = p4;
36257 - *((double*) _vec.data(7)) = p5;
36258 - _vec.call();
36259 -
36260 - return( out );
36261 -}
36262 -
36263 -// im_fractsurf: generate a fractal surface of given dimension
36264 -VImage VImage::fractsurf( int size, double dimension ) throw( VError )
36265 -{
36266 - VImage out;
36267 -
36268 - Vargv _vec( "im_fractsurf" );
36269 -
36270 - _vec.data(0) = out.image();
36271 - *((int*) _vec.data(1)) = size;
36272 - *((double*) _vec.data(2)) = dimension;
36273 - _vec.call();
36274 -
36275 - return( out );
36276 -}
36277 -
36278 -// im_freqflt: frequency-domain filter of in with mask
36279 -VImage VImage::freqflt( VImage mask ) throw( VError )
36280 -{
36281 - VImage in = *this;
36282 - VImage out;
36283 -
36284 - Vargv _vec( "im_freqflt" );
36285 -
36286 - _vec.data(0) = in.image();
36287 - _vec.data(1) = mask.image();
36288 - _vec.data(2) = out.image();
36289 - _vec.call();
36290 -
36291 - return( out );
36292 -}
36293 -
36294 -// im_fwfft: forward fast-fourier transform
36295 -VImage VImage::fwfft() throw( VError )
36296 -{
36297 - VImage in = *this;
36298 - VImage out;
36299 -
36300 - Vargv _vec( "im_fwfft" );
36301 -
36302 - _vec.data(0) = in.image();
36303 - _vec.data(1) = out.image();
36304 - _vec.call();
36305 -
36306 - return( out );
36307 -}
36308 -
36309 -// im_rotquad: rotate image quadrants to move origin to centre
36310 -VImage VImage::rotquad() throw( VError )
36311 -{
36312 - VImage in = *this;
36313 - VImage out;
36314 -
36315 - Vargv _vec( "im_rotquad" );
36316 -
36317 - _vec.data(0) = in.image();
36318 - _vec.data(1) = out.image();
36319 - _vec.call();
36320 -
36321 - return( out );
36322 -}
36323 -
36324 -// im_invfft: inverse fast-fourier transform
36325 -VImage VImage::invfft() throw( VError )
36326 -{
36327 - VImage in = *this;
36328 - VImage out;
36329 -
36330 - Vargv _vec( "im_invfft" );
36331 -
36332 - _vec.data(0) = in.image();
36333 - _vec.data(1) = out.image();
36334 - _vec.call();
36335 -
36336 - return( out );
36337 -}
36338 -
36339 -// im_phasecor_fft: non-normalised correlation of gradient of in2 within in1
36340 -VImage VImage::phasecor_fft( VImage in2 ) throw( VError )
36341 -{
36342 - VImage in1 = *this;
36343 - VImage out;
36344 -
36345 - Vargv _vec( "im_phasecor_fft" );
36346 -
36347 - _vec.data(0) = in1.image();
36348 - _vec.data(1) = in2.image();
36349 - _vec.data(2) = out.image();
36350 - _vec.call();
36351 -
36352 - return( out );
36353 -}
36354 -
36355 -// im_invfftr: real part of inverse fast-fourier transform
36356 -VImage VImage::invfftr() throw( VError )
36357 -{
36358 - VImage in = *this;
36359 - VImage out;
36360 -
36361 - Vargv _vec( "im_invfftr" );
36362 -
36363 - _vec.data(0) = in.image();
36364 - _vec.data(1) = out.image();
36365 - _vec.call();
36366 -
36367 - return( out );
36368 -}
36369 -
36370 -
36371 -// bodies for package histograms_lut
36372 -// this file automatically generated from
36373 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
36374 -// im_gammacorrect: gamma-correct image
36375 -VImage VImage::gammacorrect( double exponent ) throw( VError )
36376 -{
36377 - VImage in = *this;
36378 - VImage out;
36379 -
36380 - Vargv _vec( "im_gammacorrect" );
36381 -
36382 - _vec.data(0) = in.image();
36383 - _vec.data(1) = out.image();
36384 - *((double*) _vec.data(2)) = exponent;
36385 - _vec.call();
36386 - out._ref->addref( in._ref );
36387 -
36388 - return( out );
36389 -}
36390 -
36391 -// im_heq: histogram-equalise image
36392 -VImage VImage::heq( int band_number ) throw( VError )
36393 -{
36394 - VImage in = *this;
36395 - VImage out;
36396 -
36397 - Vargv _vec( "im_heq" );
36398 -
36399 - _vec.data(0) = in.image();
36400 - _vec.data(1) = out.image();
36401 - *((int*) _vec.data(2)) = band_number;
36402 - _vec.call();
36403 - out._ref->addref( in._ref );
36404 -
36405 - return( out );
36406 -}
36407 -
36408 -// im_hist: find and graph histogram of image
36409 -VImage VImage::hist( int band_number ) throw( VError )
36410 -{
36411 - VImage in = *this;
36412 - VImage out;
36413 -
36414 - Vargv _vec( "im_hist" );
36415 -
36416 - _vec.data(0) = in.image();
36417 - _vec.data(1) = out.image();
36418 - *((int*) _vec.data(2)) = band_number;
36419 - _vec.call();
36420 - out._ref->addref( in._ref );
36421 -
36422 - return( out );
36423 -}
36424 -
36425 -// im_histcum: turn histogram to cumulative histogram
36426 -VImage VImage::histcum() throw( VError )
36427 -{
36428 - VImage in = *this;
36429 - VImage out;
36430 -
36431 - Vargv _vec( "im_histcum" );
36432 -
36433 - _vec.data(0) = in.image();
36434 - _vec.data(1) = out.image();
36435 - _vec.call();
36436 - out._ref->addref( in._ref );
36437 -
36438 - return( out );
36439 -}
36440 -
36441 -// im_histeq: form histogram equalistion LUT
36442 -VImage VImage::histeq() throw( VError )
36443 -{
36444 - VImage in = *this;
36445 - VImage out;
36446 -
36447 - Vargv _vec( "im_histeq" );
36448 -
36449 - _vec.data(0) = in.image();
36450 - _vec.data(1) = out.image();
36451 - _vec.call();
36452 - out._ref->addref( in._ref );
36453 -
36454 - return( out );
36455 -}
36456 -
36457 -// im_hist_indexed: make a histogram with an index image
36458 -VImage VImage::hist_indexed( VImage value ) throw( VError )
36459 -{
36460 - VImage index = *this;
36461 - VImage out;
36462 -
36463 - Vargv _vec( "im_hist_indexed" );
36464 -
36465 - _vec.data(0) = index.image();
36466 - _vec.data(1) = value.image();
36467 - _vec.data(2) = out.image();
36468 - _vec.call();
36469 - out._ref->addref( index._ref );
36470 - out._ref->addref( value._ref );
36471 -
36472 - return( out );
36473 -}
36474 -
36475 -// im_histgr: find histogram of image
36476 -VImage VImage::histgr( int band_number ) throw( VError )
36477 -{
36478 - VImage in = *this;
36479 - VImage out;
36480 -
36481 - Vargv _vec( "im_histgr" );
36482 -
36483 - _vec.data(0) = in.image();
36484 - _vec.data(1) = out.image();
36485 - *((int*) _vec.data(2)) = band_number;
36486 - _vec.call();
36487 -
36488 - return( out );
36489 -}
36490 -
36491 -// im_histnD: find 1D, 2D or 3D histogram of image
36492 -VImage VImage::histnD( int bins ) throw( VError )
36493 -{
36494 - VImage in = *this;
36495 - VImage out;
36496 -
36497 - Vargv _vec( "im_histnD" );
36498 -
36499 - _vec.data(0) = in.image();
36500 - _vec.data(1) = out.image();
36501 - *((int*) _vec.data(2)) = bins;
36502 - _vec.call();
36503 -
36504 - return( out );
36505 -}
36506 -
36507 -// im_histnorm: form normalised histogram
36508 -VImage VImage::histnorm() throw( VError )
36509 -{
36510 - VImage in = *this;
36511 - VImage out;
36512 -
36513 - Vargv _vec( "im_histnorm" );
36514 -
36515 - _vec.data(0) = in.image();
36516 - _vec.data(1) = out.image();
36517 - _vec.call();
36518 - out._ref->addref( in._ref );
36519 -
36520 - return( out );
36521 -}
36522 -
36523 -// im_histplot: plot graph of histogram
36524 -VImage VImage::histplot() throw( VError )
36525 -{
36526 - VImage in = *this;
36527 - VImage out;
36528 -
36529 - Vargv _vec( "im_histplot" );
36530 -
36531 - _vec.data(0) = in.image();
36532 - _vec.data(1) = out.image();
36533 - _vec.call();
36534 - out._ref->addref( in._ref );
36535 -
36536 - return( out );
36537 -}
36538 -
36539 -// im_histspec: find histogram which will make pdf of in match ref
36540 -VImage VImage::histspec( VImage ref ) throw( VError )
36541 -{
36542 - VImage in = *this;
36543 - VImage out;
36544 -
36545 - Vargv _vec( "im_histspec" );
36546 -
36547 - _vec.data(0) = in.image();
36548 - _vec.data(1) = ref.image();
36549 - _vec.data(2) = out.image();
36550 - _vec.call();
36551 -
36552 - return( out );
36553 -}
36554 -
36555 -// im_hsp: match stats of in to stats of ref
36556 -VImage VImage::hsp( VImage ref ) throw( VError )
36557 -{
36558 - VImage in = *this;
36559 - VImage out;
36560 -
36561 - Vargv _vec( "im_hsp" );
36562 -
36563 - _vec.data(0) = in.image();
36564 - _vec.data(1) = ref.image();
36565 - _vec.data(2) = out.image();
36566 - _vec.call();
36567 -
36568 - return( out );
36569 -}
36570 -
36571 -// im_identity: generate identity histogram
36572 -VImage VImage::identity( int nbands ) throw( VError )
36573 -{
36574 - VImage out;
36575 -
36576 - Vargv _vec( "im_identity" );
36577 -
36578 - _vec.data(0) = out.image();
36579 - *((int*) _vec.data(1)) = nbands;
36580 - _vec.call();
36581 -
36582 - return( out );
36583 -}
36584 -
36585 -// im_identity_ushort: generate ushort identity histogram
36586 -VImage VImage::identity_ushort( int nbands, int size ) throw( VError )
36587 -{
36588 - VImage out;
36589 -
36590 - Vargv _vec( "im_identity_ushort" );
36591 -
36592 - _vec.data(0) = out.image();
36593 - *((int*) _vec.data(1)) = nbands;
36594 - *((int*) _vec.data(2)) = size;
36595 - _vec.call();
36596 -
36597 - return( out );
36598 -}
36599 -
36600 -// im_ismonotonic: test LUT for monotonicity
36601 -int VImage::ismonotonic() throw( VError )
36602 -{
36603 - VImage lut = *this;
36604 - int mono;
36605 -
36606 - Vargv _vec( "im_ismonotonic" );
36607 -
36608 - _vec.data(0) = lut.image();
36609 - _vec.call();
36610 - mono = *((int*)_vec.data(1));
36611 -
36612 - return( mono );
36613 -}
36614 -
36615 -// im_lhisteq: local histogram equalisation
36616 -VImage VImage::lhisteq( int width, int height ) throw( VError )
36617 -{
36618 - VImage in = *this;
36619 - VImage out;
36620 -
36621 - Vargv _vec( "im_lhisteq" );
36622 -
36623 - _vec.data(0) = in.image();
36624 - _vec.data(1) = out.image();
36625 - *((int*) _vec.data(2)) = width;
36626 - *((int*) _vec.data(3)) = height;
36627 - _vec.call();
36628 - out._ref->addref( in._ref );
36629 -
36630 - return( out );
36631 -}
36632 -
36633 -// im_mpercent: find threshold above which there are percent values
36634 -int VImage::mpercent( double percent ) throw( VError )
36635 -{
36636 - VImage in = *this;
36637 - int thresh;
36638 -
36639 - Vargv _vec( "im_mpercent" );
36640 -
36641 - _vec.data(0) = in.image();
36642 - *((double*) _vec.data(1)) = percent;
36643 - _vec.call();
36644 - thresh = *((int*)_vec.data(2));
36645 -
36646 - return( thresh );
36647 -}
36648 -
36649 -// im_invertlut: generate correction table from set of measures
36650 -VImage VImage::invertlut( VDMask measures, int lut_size ) throw( VError )
36651 -{
36652 - VImage lut;
36653 -
36654 - Vargv _vec( "im_invertlut" );
36655 -
36656 - ((im_mask_object*) _vec.data(0))->mask = measures.mask().dptr;
36657 - _vec.data(1) = lut.image();
36658 - *((int*) _vec.data(2)) = lut_size;
36659 - _vec.call();
36660 -
36661 - return( lut );
36662 -}
36663 -
36664 -// im_buildlut: generate LUT table from set of x/y positions
36665 -VImage VImage::buildlut( VDMask xyes ) throw( VError )
36666 -{
36667 - VImage lut;
36668 -
36669 - Vargv _vec( "im_buildlut" );
36670 -
36671 - ((im_mask_object*) _vec.data(0))->mask = xyes.mask().dptr;
36672 - _vec.data(1) = lut.image();
36673 - _vec.call();
36674 -
36675 - return( lut );
36676 -}
36677 -
36678 -// im_maplut: map image through LUT
36679 -VImage VImage::maplut( VImage lut ) throw( VError )
36680 -{
36681 - VImage in = *this;
36682 - VImage out;
36683 -
36684 - Vargv _vec( "im_maplut" );
36685 -
36686 - _vec.data(0) = in.image();
36687 - _vec.data(1) = out.image();
36688 - _vec.data(2) = lut.image();
36689 - _vec.call();
36690 - out._ref->addref( in._ref );
36691 - out._ref->addref( lut._ref );
36692 -
36693 - return( out );
36694 -}
36695 -
36696 -// im_project: find horizontal and vertical projections of an image
36697 -VImage VImage::project( VImage& vout ) throw( VError )
36698 -{
36699 - VImage in = *this;
36700 - VImage hout;
36701 -
36702 - Vargv _vec( "im_project" );
36703 -
36704 - _vec.data(0) = in.image();
36705 - _vec.data(1) = hout.image();
36706 - _vec.data(2) = vout.image();
36707 - _vec.call();
36708 -
36709 - return( hout );
36710 -}
36711 -
36712 -// im_stdif: statistical differencing
36713 -VImage VImage::stdif( double a, double m0, double b, double s0, int xw, int yw ) throw( VError )
36714 -{
36715 - VImage in = *this;
36716 - VImage out;
36717 -
36718 - Vargv _vec( "im_stdif" );
36719 -
36720 - _vec.data(0) = in.image();
36721 - _vec.data(1) = out.image();
36722 - *((double*) _vec.data(2)) = a;
36723 - *((double*) _vec.data(3)) = m0;
36724 - *((double*) _vec.data(4)) = b;
36725 - *((double*) _vec.data(5)) = s0;
36726 - *((int*) _vec.data(6)) = xw;
36727 - *((int*) _vec.data(7)) = yw;
36728 - _vec.call();
36729 - out._ref->addref( in._ref );
36730 -
36731 - return( out );
36732 -}
36733 -
36734 -// im_tone_analyse: analyse in and create LUT for tone adjustment
36735 -VImage VImage::tone_analyse( double Ps, double Pm, double Ph, double S, double M, double H ) throw( VError )
36736 -{
36737 - VImage in = *this;
36738 - VImage hist;
36739 -
36740 - Vargv _vec( "im_tone_analyse" );
36741 -
36742 - _vec.data(0) = in.image();
36743 - _vec.data(1) = hist.image();
36744 - *((double*) _vec.data(2)) = Ps;
36745 - *((double*) _vec.data(3)) = Pm;
36746 - *((double*) _vec.data(4)) = Ph;
36747 - *((double*) _vec.data(5)) = S;
36748 - *((double*) _vec.data(6)) = M;
36749 - *((double*) _vec.data(7)) = H;
36750 - _vec.call();
36751 -
36752 - return( hist );
36753 -}
36754 -
36755 -// im_tone_build: create LUT for tone adjustment of LabS images
36756 -VImage VImage::tone_build( double Lb, double Lw, double Ps, double Pm, double Ph, double S, double M, double H ) throw( VError )
36757 -{
36758 - VImage hist;
36759 -
36760 - Vargv _vec( "im_tone_build" );
36761 -
36762 - _vec.data(0) = hist.image();
36763 - *((double*) _vec.data(1)) = Lb;
36764 - *((double*) _vec.data(2)) = Lw;
36765 - *((double*) _vec.data(3)) = Ps;
36766 - *((double*) _vec.data(4)) = Pm;
36767 - *((double*) _vec.data(5)) = Ph;
36768 - *((double*) _vec.data(6)) = S;
36769 - *((double*) _vec.data(7)) = M;
36770 - *((double*) _vec.data(8)) = H;
36771 - _vec.call();
36772 -
36773 - return( hist );
36774 -}
36775 -
36776 -// im_tone_build_range: create LUT for tone adjustment
36777 -VImage VImage::tone_build_range( int in_max, int out_max, double Lb, double Lw, double Ps, double Pm, double Ph, double S, double M, double H ) throw( VError )
36778 -{
36779 - VImage hist;
36780 -
36781 - Vargv _vec( "im_tone_build_range" );
36782 -
36783 - _vec.data(0) = hist.image();
36784 - *((int*) _vec.data(1)) = in_max;
36785 - *((int*) _vec.data(2)) = out_max;
36786 - *((double*) _vec.data(3)) = Lb;
36787 - *((double*) _vec.data(4)) = Lw;
36788 - *((double*) _vec.data(5)) = Ps;
36789 - *((double*) _vec.data(6)) = Pm;
36790 - *((double*) _vec.data(7)) = Ph;
36791 - *((double*) _vec.data(8)) = S;
36792 - *((double*) _vec.data(9)) = M;
36793 - *((double*) _vec.data(10)) = H;
36794 - _vec.call();
36795 -
36796 - return( hist );
36797 -}
36798 -
36799 -// im_tone_map: map L channel of LabS or LabQ image through LUT
36800 -VImage VImage::tone_map( VImage lut ) throw( VError )
36801 -{
36802 - VImage in = *this;
36803 - VImage out;
36804 -
36805 - Vargv _vec( "im_tone_map" );
36806 -
36807 - _vec.data(0) = in.image();
36808 - _vec.data(1) = out.image();
36809 - _vec.data(2) = lut.image();
36810 - _vec.call();
36811 - out._ref->addref( in._ref );
36812 - out._ref->addref( lut._ref );
36813 -
36814 - return( out );
36815 -}
36816 -
36817 -
36818 -// bodies for package inplace
36819 -// this file automatically generated from
36820 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
36821 -// im_draw_circle: draw circle on image
36822 -void VImage::draw_circle( int cx, int cy, int radius, int fill, std::vector<double> ink ) throw( VError )
36823 -{
36824 - VImage image = *this;
36825 - Vargv _vec( "im_draw_circle" );
36826 -
36827 - _vec.data(0) = image.image();
36828 - *((int*) _vec.data(1)) = cx;
36829 - *((int*) _vec.data(2)) = cy;
36830 - *((int*) _vec.data(3)) = radius;
36831 - *((int*) _vec.data(4)) = fill;
36832 - ((im_doublevec_object*) _vec.data(5))->n = ink.size();
36833 - ((im_doublevec_object*) _vec.data(5))->vec = new double[ink.size()];
36834 - for( unsigned int i = 0; i < ink.size(); i++ )
36835 - ((im_doublevec_object*) _vec.data(5))->vec[i] = ink[i];
36836 - _vec.call();
36837 -}
36838 -
36839 -// im_draw_rect: draw rect on image
36840 -void VImage::draw_rect( int left, int top, int width, int height, int fill, std::vector<double> ink ) throw( VError )
36841 -{
36842 - VImage image = *this;
36843 - Vargv _vec( "im_draw_rect" );
36844 -
36845 - _vec.data(0) = image.image();
36846 - *((int*) _vec.data(1)) = left;
36847 - *((int*) _vec.data(2)) = top;
36848 - *((int*) _vec.data(3)) = width;
36849 - *((int*) _vec.data(4)) = height;
36850 - *((int*) _vec.data(5)) = fill;
36851 - ((im_doublevec_object*) _vec.data(6))->n = ink.size();
36852 - ((im_doublevec_object*) _vec.data(6))->vec = new double[ink.size()];
36853 - for( unsigned int i = 0; i < ink.size(); i++ )
36854 - ((im_doublevec_object*) _vec.data(6))->vec[i] = ink[i];
36855 - _vec.call();
36856 -}
36857 -
36858 -// im_draw_line: draw line on image
36859 -void VImage::draw_line( int x1, int y1, int x2, int y2, std::vector<double> ink ) throw( VError )
36860 -{
36861 - VImage image = *this;
36862 - Vargv _vec( "im_draw_line" );
36863 -
36864 - _vec.data(0) = image.image();
36865 - *((int*) _vec.data(1)) = x1;
36866 - *((int*) _vec.data(2)) = y1;
36867 - *((int*) _vec.data(3)) = x2;
36868 - *((int*) _vec.data(4)) = y2;
36869 - ((im_doublevec_object*) _vec.data(5))->n = ink.size();
36870 - ((im_doublevec_object*) _vec.data(5))->vec = new double[ink.size()];
36871 - for( unsigned int i = 0; i < ink.size(); i++ )
36872 - ((im_doublevec_object*) _vec.data(5))->vec[i] = ink[i];
36873 - _vec.call();
36874 -}
36875 -
36876 -// im_draw_point: draw point on image
36877 -void VImage::draw_point( int x, int y, std::vector<double> ink ) throw( VError )
36878 -{
36879 - VImage image = *this;
36880 - Vargv _vec( "im_draw_point" );
36881 -
36882 - _vec.data(0) = image.image();
36883 - *((int*) _vec.data(1)) = x;
36884 - *((int*) _vec.data(2)) = y;
36885 - ((im_doublevec_object*) _vec.data(3))->n = ink.size();
36886 - ((im_doublevec_object*) _vec.data(3))->vec = new double[ink.size()];
36887 - for( unsigned int i = 0; i < ink.size(); i++ )
36888 - ((im_doublevec_object*) _vec.data(3))->vec[i] = ink[i];
36889 - _vec.call();
36890 -}
36891 -
36892 -// im_draw_smudge: smudge part of an image
36893 -void VImage::draw_smudge( int left, int top, int width, int height ) throw( VError )
36894 -{
36895 - VImage image = *this;
36896 - Vargv _vec( "im_draw_smudge" );
36897 -
36898 - _vec.data(0) = image.image();
36899 - *((int*) _vec.data(1)) = left;
36900 - *((int*) _vec.data(2)) = top;
36901 - *((int*) _vec.data(3)) = width;
36902 - *((int*) _vec.data(4)) = height;
36903 - _vec.call();
36904 -}
36905 -
36906 -// im_draw_flood: flood with ink from x, y while pixel != ink
36907 -void VImage::draw_flood( int x, int y, std::vector<double> ink ) throw( VError )
36908 -{
36909 - VImage image = *this;
36910 - Vargv _vec( "im_draw_flood" );
36911 -
36912 - _vec.data(0) = image.image();
36913 - *((int*) _vec.data(1)) = x;
36914 - *((int*) _vec.data(2)) = y;
36915 - ((im_doublevec_object*) _vec.data(3))->n = ink.size();
36916 - ((im_doublevec_object*) _vec.data(3))->vec = new double[ink.size()];
36917 - for( unsigned int i = 0; i < ink.size(); i++ )
36918 - ((im_doublevec_object*) _vec.data(3))->vec[i] = ink[i];
36919 - _vec.call();
36920 -}
36921 -
36922 -// im_draw_flood_blob: flood with ink from x, y while pixel == start
36923 -void VImage::draw_flood_blob( int x, int y, std::vector<double> ink ) throw( VError )
36924 -{
36925 - VImage image = *this;
36926 - Vargv _vec( "im_draw_flood_blob" );
36927 -
36928 - _vec.data(0) = image.image();
36929 - *((int*) _vec.data(1)) = x;
36930 - *((int*) _vec.data(2)) = y;
36931 - ((im_doublevec_object*) _vec.data(3))->n = ink.size();
36932 - ((im_doublevec_object*) _vec.data(3))->vec = new double[ink.size()];
36933 - for( unsigned int i = 0; i < ink.size(); i++ )
36934 - ((im_doublevec_object*) _vec.data(3))->vec[i] = ink[i];
36935 - _vec.call();
36936 -}
36937 -
36938 -// im_draw_flood_other: flood image with serial from x, y while pixel == start
36939 -void VImage::draw_flood_other( VImage test, int x, int y, int serial ) throw( VError )
36940 -{
36941 - VImage image = *this;
36942 - Vargv _vec( "im_draw_flood_other" );
36943 -
36944 - _vec.data(0) = image.image();
36945 - _vec.data(1) = test.image();
36946 - *((int*) _vec.data(2)) = x;
36947 - *((int*) _vec.data(3)) = y;
36948 - *((int*) _vec.data(4)) = serial;
36949 - _vec.call();
36950 -}
36951 -
36952 -// im_draw_image: draw image sub inside image main at position (x,y)
36953 -void VImage::draw_image( VImage sub, int x, int y ) throw( VError )
36954 -{
36955 - VImage image = *this;
36956 - Vargv _vec( "im_draw_image" );
36957 -
36958 - _vec.data(0) = image.image();
36959 - _vec.data(1) = sub.image();
36960 - *((int*) _vec.data(2)) = x;
36961 - *((int*) _vec.data(3)) = y;
36962 - _vec.call();
36963 -}
36964 -
36965 -// im_draw_mask: draw mask sub inside image main at position (x,y)
36966 -void VImage::draw_mask( VImage mask, int x, int y, std::vector<double> ink ) throw( VError )
36967 -{
36968 - VImage image = *this;
36969 - Vargv _vec( "im_draw_mask" );
36970 -
36971 - _vec.data(0) = image.image();
36972 - _vec.data(1) = mask.image();
36973 - *((int*) _vec.data(2)) = x;
36974 - *((int*) _vec.data(3)) = y;
36975 - ((im_doublevec_object*) _vec.data(4))->n = ink.size();
36976 - ((im_doublevec_object*) _vec.data(4))->vec = new double[ink.size()];
36977 - for( unsigned int i = 0; i < ink.size(); i++ )
36978 - ((im_doublevec_object*) _vec.data(4))->vec[i] = ink[i];
36979 - _vec.call();
36980 -}
36981 -
36982 -// im_lineset: draw line between points (x1,y1) and (x2,y2)
36983 -VImage VImage::line( VImage mask, VImage ink, std::vector<int> x1, std::vector<int> y1, std::vector<int> x2, std::vector<int> y2 ) throw( VError )
36984 -{
36985 - VImage in = *this;
36986 - VImage out;
36987 -
36988 - Vargv _vec( "im_lineset" );
36989 -
36990 - _vec.data(0) = in.image();
36991 - _vec.data(1) = out.image();
36992 - _vec.data(2) = mask.image();
36993 - _vec.data(3) = ink.image();
36994 - ((im_intvec_object*) _vec.data(4))->n = x1.size();
36995 - ((im_intvec_object*) _vec.data(4))->vec = new int[x1.size()];
36996 - for( unsigned int i = 0; i < x1.size(); i++ )
36997 - ((im_intvec_object*) _vec.data(4))->vec[i] = x1[i];
36998 - ((im_intvec_object*) _vec.data(5))->n = y1.size();
36999 - ((im_intvec_object*) _vec.data(5))->vec = new int[y1.size()];
37000 - for( unsigned int i = 0; i < y1.size(); i++ )
37001 - ((im_intvec_object*) _vec.data(5))->vec[i] = y1[i];
37002 - ((im_intvec_object*) _vec.data(6))->n = x2.size();
37003 - ((im_intvec_object*) _vec.data(6))->vec = new int[x2.size()];
37004 - for( unsigned int i = 0; i < x2.size(); i++ )
37005 - ((im_intvec_object*) _vec.data(6))->vec[i] = x2[i];
37006 - ((im_intvec_object*) _vec.data(7))->n = y2.size();
37007 - ((im_intvec_object*) _vec.data(7))->vec = new int[y2.size()];
37008 - for( unsigned int i = 0; i < y2.size(); i++ )
37009 - ((im_intvec_object*) _vec.data(7))->vec[i] = y2[i];
37010 - _vec.call();
37011 -
37012 - return( out );
37013 -}
37014 -
37015 -
37016 -// bodies for package iofuncs
37017 -// this file automatically generated from
37018 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
37019 -// im_binfile: open a headerless binary file
37020 -VImage VImage::binfile( char* filename, int width, int height, int bands, int offset ) throw( VError )
37021 -{
37022 - VImage out;
37023 -
37024 - Vargv _vec( "im_binfile" );
37025 -
37026 - _vec.data(0) = (im_object) filename;
37027 - _vec.data(1) = out.image();
37028 - *((int*) _vec.data(2)) = width;
37029 - *((int*) _vec.data(3)) = height;
37030 - *((int*) _vec.data(4)) = bands;
37031 - *((int*) _vec.data(5)) = offset;
37032 - _vec.call();
37033 -
37034 - return( out );
37035 -}
37036 -
37037 -// im_cache: cache results of an operation
37038 -VImage VImage::cache( int tile_width, int tile_height, int max_tiles ) throw( VError )
37039 -{
37040 - VImage in = *this;
37041 - VImage out;
37042 -
37043 - Vargv _vec( "im_cache" );
37044 -
37045 - _vec.data(0) = in.image();
37046 - _vec.data(1) = out.image();
37047 - *((int*) _vec.data(2)) = tile_width;
37048 - *((int*) _vec.data(3)) = tile_height;
37049 - *((int*) _vec.data(4)) = max_tiles;
37050 - _vec.call();
37051 -
37052 - return( out );
37053 -}
37054 -
37055 -// im_getext: return the image metadata XML as a string
37056 -char* VImage::getext() throw( VError )
37057 -{
37058 - VImage image = *this;
37059 - char* history;
37060 -
37061 - Vargv _vec( "im_getext" );
37062 -
37063 - _vec.data(0) = image.image();
37064 - _vec.call();
37065 - history = (char*) _vec.data(1);
37066 -
37067 - return( history );
37068 -}
37069 -
37070 -// im_header_get_typeof: return field type
37071 -int VImage::header_get_typeof( char* field ) throw( VError )
37072 -{
37073 - VImage image = *this;
37074 - int gtype;
37075 -
37076 - Vargv _vec( "im_header_get_typeof" );
37077 -
37078 - _vec.data(0) = (im_object) field;
37079 - _vec.data(1) = image.image();
37080 - _vec.call();
37081 - gtype = *((int*)_vec.data(2));
37082 -
37083 - return( gtype );
37084 -}
37085 -
37086 -// im_header_int: extract int fields from header
37087 -int VImage::header_int( char* field ) throw( VError )
37088 -{
37089 - VImage image = *this;
37090 - int value;
37091 -
37092 - Vargv _vec( "im_header_int" );
37093 -
37094 - _vec.data(0) = (im_object) field;
37095 - _vec.data(1) = image.image();
37096 - _vec.call();
37097 - value = *((int*)_vec.data(2));
37098 -
37099 - return( value );
37100 -}
37101 -
37102 -// im_header_double: extract double fields from header
37103 -double VImage::header_double( char* field ) throw( VError )
37104 -{
37105 - VImage image = *this;
37106 - double value;
37107 -
37108 - Vargv _vec( "im_header_double" );
37109 -
37110 - _vec.data(0) = (im_object) field;
37111 - _vec.data(1) = image.image();
37112 - _vec.call();
37113 - value = *((double*)_vec.data(2));
37114 -
37115 - return( value );
37116 -}
37117 -
37118 -// im_header_string: extract fields from headers as strings
37119 -char* VImage::header_string( char* field ) throw( VError )
37120 -{
37121 - VImage image = *this;
37122 - char* value;
37123 -
37124 - Vargv _vec( "im_header_string" );
37125 -
37126 - _vec.data(0) = (im_object) field;
37127 - _vec.data(1) = image.image();
37128 - _vec.call();
37129 - value = (char*) _vec.data(2);
37130 -
37131 - return( value );
37132 -}
37133 -
37134 -// im_history_get: return the image history as a string
37135 -char* VImage::history_get() throw( VError )
37136 -{
37137 - VImage image = *this;
37138 - char* history;
37139 -
37140 - Vargv _vec( "im_history_get" );
37141 -
37142 - _vec.data(0) = image.image();
37143 - _vec.call();
37144 - history = (char*) _vec.data(1);
37145 -
37146 - return( history );
37147 -}
37148 -
37149 -// im_printdesc: print an image header to stdout
37150 -void VImage::printdesc() throw( VError )
37151 -{
37152 - VImage image = *this;
37153 - Vargv _vec( "im_printdesc" );
37154 -
37155 - _vec.data(0) = image.image();
37156 - _vec.call();
37157 -}
37158 -
37159 -
37160 -// bodies for package mask
37161 -// this file automatically generated from
37162 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
37163 -
37164 -// bodies for package morphology
37165 -// this file automatically generated from
37166 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
37167 -// im_cntlines: count horizontal or vertical lines
37168 -double VImage::cntlines( int direction ) throw( VError )
37169 -{
37170 - VImage in = *this;
37171 - double nlines;
37172 -
37173 - Vargv _vec( "im_cntlines" );
37174 -
37175 - _vec.data(0) = in.image();
37176 - *((int*) _vec.data(2)) = direction;
37177 - _vec.call();
37178 - nlines = *((double*)_vec.data(1));
37179 -
37180 - return( nlines );
37181 -}
37182 -
37183 -// im_dilate: dilate image with mask, adding a black border
37184 -VImage VImage::dilate( VIMask mask ) throw( VError )
37185 -{
37186 - VImage in = *this;
37187 - VImage out;
37188 -
37189 - Vargv _vec( "im_dilate" );
37190 -
37191 - _vec.data(0) = in.image();
37192 - _vec.data(1) = out.image();
37193 - ((im_mask_object*) _vec.data(2))->mask = mask.mask().iptr;
37194 - _vec.call();
37195 - out._ref->addref( in._ref );
37196 -
37197 - return( out );
37198 -}
37199 -
37200 -// im_rank: rank filter nth element of xsize/ysize window
37201 -VImage VImage::rank( int xsize, int ysize, int n ) throw( VError )
37202 -{
37203 - VImage in = *this;
37204 - VImage out;
37205 -
37206 - Vargv _vec( "im_rank" );
37207 -
37208 - _vec.data(0) = in.image();
37209 - _vec.data(1) = out.image();
37210 - *((int*) _vec.data(2)) = xsize;
37211 - *((int*) _vec.data(3)) = ysize;
37212 - *((int*) _vec.data(4)) = n;
37213 - _vec.call();
37214 - out._ref->addref( in._ref );
37215 -
37216 - return( out );
37217 -}
37218 -
37219 -// im_rank_image: point-wise pixel rank
37220 -VImage VImage::rank_image( std::vector<VImage> in, int index ) throw( VError )
37221 -{
37222 - VImage out;
37223 -
37224 - Vargv _vec( "im_rank_image" );
37225 -
37226 - ((im_imagevec_object*) _vec.data(0))->n = in.size();
37227 - ((im_imagevec_object*) _vec.data(0))->vec = new IMAGE *[in.size()];
37228 - for( unsigned int i = 0; i < in.size(); i++ )
37229 - ((im_imagevec_object*) _vec.data(0))->vec[i] = in[i].image();
37230 - _vec.data(1) = out.image();
37231 - *((int*) _vec.data(2)) = index;
37232 - _vec.call();
37233 - for( unsigned int i = 0; i < in.size(); i++ )
37234 - out._ref->addref( in[i]._ref );
37235 -
37236 - return( out );
37237 -}
37238 -
37239 -// im_maxvalue: point-wise maximum value
37240 -VImage VImage::maxvalue( std::vector<VImage> in ) throw( VError )
37241 -{
37242 - VImage out;
37243 -
37244 - Vargv _vec( "im_maxvalue" );
37245 -
37246 - ((im_imagevec_object*) _vec.data(0))->n = in.size();
37247 - ((im_imagevec_object*) _vec.data(0))->vec = new IMAGE *[in.size()];
37248 - for( unsigned int i = 0; i < in.size(); i++ )
37249 - ((im_imagevec_object*) _vec.data(0))->vec[i] = in[i].image();
37250 - _vec.data(1) = out.image();
37251 - _vec.call();
37252 - for( unsigned int i = 0; i < in.size(); i++ )
37253 - out._ref->addref( in[i]._ref );
37254 -
37255 - return( out );
37256 -}
37257 -
37258 -// im_label_regions: number continuous regions in an image
37259 -VImage VImage::label_regions( int& segments ) throw( VError )
37260 -{
37261 - VImage test = *this;
37262 - VImage mask;
37263 -
37264 - Vargv _vec( "im_label_regions" );
37265 -
37266 - _vec.data(0) = test.image();
37267 - _vec.data(1) = mask.image();
37268 - _vec.call();
37269 - segments = *((int*)_vec.data(2));
37270 -
37271 - return( mask );
37272 -}
37273 -
37274 -// im_zerox: find +ve or -ve zero crossings in image
37275 -VImage VImage::zerox( int flag ) throw( VError )
37276 -{
37277 - VImage in = *this;
37278 - VImage out;
37279 -
37280 - Vargv _vec( "im_zerox" );
37281 -
37282 - _vec.data(0) = in.image();
37283 - _vec.data(1) = out.image();
37284 - *((int*) _vec.data(2)) = flag;
37285 - _vec.call();
37286 - out._ref->addref( in._ref );
37287 -
37288 - return( out );
37289 -}
37290 -
37291 -// im_erode: erode image with mask, adding a black border
37292 -VImage VImage::erode( VIMask mask ) throw( VError )
37293 -{
37294 - VImage in = *this;
37295 - VImage out;
37296 -
37297 - Vargv _vec( "im_erode" );
37298 -
37299 - _vec.data(0) = in.image();
37300 - _vec.data(1) = out.image();
37301 - ((im_mask_object*) _vec.data(2))->mask = mask.mask().iptr;
37302 - _vec.call();
37303 - out._ref->addref( in._ref );
37304 -
37305 - return( out );
37306 -}
37307 -
37308 -// im_profile: find first horizontal/vertical edge
37309 -VImage VImage::profile( int direction ) throw( VError )
37310 -{
37311 - VImage in = *this;
37312 - VImage out;
37313 -
37314 - Vargv _vec( "im_profile" );
37315 -
37316 - _vec.data(0) = in.image();
37317 - _vec.data(1) = out.image();
37318 - *((int*) _vec.data(2)) = direction;
37319 - _vec.call();
37320 -
37321 - return( out );
37322 -}
37323 -
37324 -
37325 -// bodies for package mosaicing
37326 -// this file automatically generated from
37327 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
37328 -// im_align_bands: align the bands of an image
37329 -VImage VImage::align_bands() throw( VError )
37330 -{
37331 - VImage in = *this;
37332 - VImage out;
37333 -
37334 - Vargv _vec( "im_align_bands" );
37335 -
37336 - _vec.data(0) = in.image();
37337 - _vec.data(1) = out.image();
37338 - _vec.call();
37339 -
37340 - return( out );
37341 -}
37342 -
37343 -// im_correl: search area around sec for match for area around ref
37344 -double VImage::correl( VImage sec, int xref, int yref, int xsec, int ysec, int hwindowsize, int hsearchsize, int& x, int& y ) throw( VError )
37345 -{
37346 - VImage ref = *this;
37347 - double correlation;
37348 -
37349 - Vargv _vec( "im_correl" );
37350 -
37351 - _vec.data(0) = ref.image();
37352 - _vec.data(1) = sec.image();
37353 - *((int*) _vec.data(2)) = xref;
37354 - *((int*) _vec.data(3)) = yref;
37355 - *((int*) _vec.data(4)) = xsec;
37356 - *((int*) _vec.data(5)) = ysec;
37357 - *((int*) _vec.data(6)) = hwindowsize;
37358 - *((int*) _vec.data(7)) = hsearchsize;
37359 - _vec.call();
37360 - correlation = *((double*)_vec.data(8));
37361 - x = *((int*)_vec.data(9));
37362 - y = *((int*)_vec.data(10));
37363 -
37364 - return( correlation );
37365 -}
37366 -
37367 -// im__find_lroverlap: search for left-right overlap of ref and sec
37368 -int VImage::_find_lroverlap( VImage sec, int bandno, int xr, int yr, int xs, int ys, int halfcorrelation, int halfarea, int& dy0, double& scale1, double& angle1, double& dx1, double& dy1 ) throw( VError )
37369 -{
37370 - VImage ref = *this;
37371 - int dx0;
37372 -
37373 - Vargv _vec( "im__find_lroverlap" );
37374 -
37375 - _vec.data(0) = ref.image();
37376 - _vec.data(1) = sec.image();
37377 - *((int*) _vec.data(2)) = bandno;
37378 - *((int*) _vec.data(3)) = xr;
37379 - *((int*) _vec.data(4)) = yr;
37380 - *((int*) _vec.data(5)) = xs;
37381 - *((int*) _vec.data(6)) = ys;
37382 - *((int*) _vec.data(7)) = halfcorrelation;
37383 - *((int*) _vec.data(8)) = halfarea;
37384 - _vec.call();
37385 - dx0 = *((int*)_vec.data(9));
37386 - dy0 = *((int*)_vec.data(10));
37387 - scale1 = *((double*)_vec.data(11));
37388 - angle1 = *((double*)_vec.data(12));
37389 - dx1 = *((double*)_vec.data(13));
37390 - dy1 = *((double*)_vec.data(14));
37391 -
37392 - return( dx0 );
37393 -}
37394 -
37395 -// im__find_tboverlap: search for top-bottom overlap of ref and sec
37396 -int VImage::_find_tboverlap( VImage sec, int bandno, int xr, int yr, int xs, int ys, int halfcorrelation, int halfarea, int& dy0, double& scale1, double& angle1, double& dx1, double& dy1 ) throw( VError )
37397 -{
37398 - VImage ref = *this;
37399 - int dx0;
37400 -
37401 - Vargv _vec( "im__find_tboverlap" );
37402 -
37403 - _vec.data(0) = ref.image();
37404 - _vec.data(1) = sec.image();
37405 - *((int*) _vec.data(2)) = bandno;
37406 - *((int*) _vec.data(3)) = xr;
37407 - *((int*) _vec.data(4)) = yr;
37408 - *((int*) _vec.data(5)) = xs;
37409 - *((int*) _vec.data(6)) = ys;
37410 - *((int*) _vec.data(7)) = halfcorrelation;
37411 - *((int*) _vec.data(8)) = halfarea;
37412 - _vec.call();
37413 - dx0 = *((int*)_vec.data(9));
37414 - dy0 = *((int*)_vec.data(10));
37415 - scale1 = *((double*)_vec.data(11));
37416 - angle1 = *((double*)_vec.data(12));
37417 - dx1 = *((double*)_vec.data(13));
37418 - dy1 = *((double*)_vec.data(14));
37419 -
37420 - return( dx0 );
37421 -}
37422 -
37423 -// im_global_balance: automatically rebuild mosaic with balancing
37424 -VImage VImage::global_balance( double gamma ) throw( VError )
37425 -{
37426 - VImage in = *this;
37427 - VImage out;
37428 -
37429 - Vargv _vec( "im_global_balance" );
37430 -
37431 - _vec.data(0) = in.image();
37432 - _vec.data(1) = out.image();
37433 - *((double*) _vec.data(2)) = gamma;
37434 - _vec.call();
37435 - out._ref->addref( in._ref );
37436 -
37437 - return( out );
37438 -}
37439 -
37440 -// im_global_balancef: automatically rebuild mosaic with balancing, float output
37441 -VImage VImage::global_balancef( double gamma ) throw( VError )
37442 -{
37443 - VImage in = *this;
37444 - VImage out;
37445 -
37446 - Vargv _vec( "im_global_balancef" );
37447 -
37448 - _vec.data(0) = in.image();
37449 - _vec.data(1) = out.image();
37450 - *((double*) _vec.data(2)) = gamma;
37451 - _vec.call();
37452 - out._ref->addref( in._ref );
37453 -
37454 - return( out );
37455 -}
37456 -
37457 -// im_lrmerge: left-right merge of in1 and in2
37458 -VImage VImage::lrmerge( VImage sec, int dx, int dy, int mwidth ) throw( VError )
37459 -{
37460 - VImage ref = *this;
37461 - VImage out;
37462 -
37463 - Vargv _vec( "im_lrmerge" );
37464 -
37465 - _vec.data(0) = ref.image();
37466 - _vec.data(1) = sec.image();
37467 - _vec.data(2) = out.image();
37468 - *((int*) _vec.data(3)) = dx;
37469 - *((int*) _vec.data(4)) = dy;
37470 - *((int*) _vec.data(5)) = mwidth;
37471 - _vec.call();
37472 - out._ref->addref( ref._ref );
37473 - out._ref->addref( sec._ref );
37474 -
37475 - return( out );
37476 -}
37477 -
37478 -// im_lrmerge1: first-order left-right merge of ref and sec
37479 -VImage VImage::lrmerge1( VImage sec, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int mwidth ) throw( VError )
37480 -{
37481 - VImage ref = *this;
37482 - VImage out;
37483 -
37484 - Vargv _vec( "im_lrmerge1" );
37485 -
37486 - _vec.data(0) = ref.image();
37487 - _vec.data(1) = sec.image();
37488 - _vec.data(2) = out.image();
37489 - *((int*) _vec.data(3)) = xr1;
37490 - *((int*) _vec.data(4)) = yr1;
37491 - *((int*) _vec.data(5)) = xs1;
37492 - *((int*) _vec.data(6)) = ys1;
37493 - *((int*) _vec.data(7)) = xr2;
37494 - *((int*) _vec.data(8)) = yr2;
37495 - *((int*) _vec.data(9)) = xs2;
37496 - *((int*) _vec.data(10)) = ys2;
37497 - *((int*) _vec.data(11)) = mwidth;
37498 - _vec.call();
37499 - out._ref->addref( ref._ref );
37500 - out._ref->addref( sec._ref );
37501 -
37502 - return( out );
37503 -}
37504 -
37505 -// im_lrmosaic: left-right mosaic of ref and sec
37506 -VImage VImage::lrmosaic( VImage sec, int bandno, int xr, int yr, int xs, int ys, int halfcorrelation, int halfarea, int balancetype, int mwidth ) throw( VError )
37507 -{
37508 - VImage ref = *this;
37509 - VImage out;
37510 -
37511 - Vargv _vec( "im_lrmosaic" );
37512 -
37513 - _vec.data(0) = ref.image();
37514 - _vec.data(1) = sec.image();
37515 - _vec.data(2) = out.image();
37516 - *((int*) _vec.data(3)) = bandno;
37517 - *((int*) _vec.data(4)) = xr;
37518 - *((int*) _vec.data(5)) = yr;
37519 - *((int*) _vec.data(6)) = xs;
37520 - *((int*) _vec.data(7)) = ys;
37521 - *((int*) _vec.data(8)) = halfcorrelation;
37522 - *((int*) _vec.data(9)) = halfarea;
37523 - *((int*) _vec.data(10)) = balancetype;
37524 - *((int*) _vec.data(11)) = mwidth;
37525 - _vec.call();
37526 - out._ref->addref( ref._ref );
37527 - out._ref->addref( sec._ref );
37528 -
37529 - return( out );
37530 -}
37531 -
37532 -// im_lrmosaic1: first-order left-right mosaic of ref and sec
37533 -VImage VImage::lrmosaic1( VImage sec, int bandno, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int halfcorrelation, int halfarea, int balancetype, int mwidth ) throw( VError )
37534 -{
37535 - VImage ref = *this;
37536 - VImage out;
37537 -
37538 - Vargv _vec( "im_lrmosaic1" );
37539 -
37540 - _vec.data(0) = ref.image();
37541 - _vec.data(1) = sec.image();
37542 - _vec.data(2) = out.image();
37543 - *((int*) _vec.data(3)) = bandno;
37544 - *((int*) _vec.data(4)) = xr1;
37545 - *((int*) _vec.data(5)) = yr1;
37546 - *((int*) _vec.data(6)) = xs1;
37547 - *((int*) _vec.data(7)) = ys1;
37548 - *((int*) _vec.data(8)) = xr2;
37549 - *((int*) _vec.data(9)) = yr2;
37550 - *((int*) _vec.data(10)) = xs2;
37551 - *((int*) _vec.data(11)) = ys2;
37552 - *((int*) _vec.data(12)) = halfcorrelation;
37553 - *((int*) _vec.data(13)) = halfarea;
37554 - *((int*) _vec.data(14)) = balancetype;
37555 - *((int*) _vec.data(15)) = mwidth;
37556 - _vec.call();
37557 - out._ref->addref( ref._ref );
37558 - out._ref->addref( sec._ref );
37559 -
37560 - return( out );
37561 -}
37562 -
37563 -// im_match_linear: resample ref so that tie-points match
37564 -VImage VImage::match_linear( VImage sec, int xref1, int yref1, int xsec1, int ysec1, int xref2, int yref2, int xsec2, int ysec2 ) throw( VError )
37565 -{
37566 - VImage ref = *this;
37567 - VImage out;
37568 -
37569 - Vargv _vec( "im_match_linear" );
37570 -
37571 - _vec.data(0) = ref.image();
37572 - _vec.data(1) = sec.image();
37573 - _vec.data(2) = out.image();
37574 - *((int*) _vec.data(3)) = xref1;
37575 - *((int*) _vec.data(4)) = yref1;
37576 - *((int*) _vec.data(5)) = xsec1;
37577 - *((int*) _vec.data(6)) = ysec1;
37578 - *((int*) _vec.data(7)) = xref2;
37579 - *((int*) _vec.data(8)) = yref2;
37580 - *((int*) _vec.data(9)) = xsec2;
37581 - *((int*) _vec.data(10)) = ysec2;
37582 - _vec.call();
37583 - out._ref->addref( ref._ref );
37584 - out._ref->addref( sec._ref );
37585 -
37586 - return( out );
37587 -}
37588 -
37589 -// im_match_linear_search: search sec, then resample so that tie-points match
37590 -VImage VImage::match_linear_search( VImage sec, int xref1, int yref1, int xsec1, int ysec1, int xref2, int yref2, int xsec2, int ysec2, int hwindowsize, int hsearchsize ) throw( VError )
37591 -{
37592 - VImage ref = *this;
37593 - VImage out;
37594 -
37595 - Vargv _vec( "im_match_linear_search" );
37596 -
37597 - _vec.data(0) = ref.image();
37598 - _vec.data(1) = sec.image();
37599 - _vec.data(2) = out.image();
37600 - *((int*) _vec.data(3)) = xref1;
37601 - *((int*) _vec.data(4)) = yref1;
37602 - *((int*) _vec.data(5)) = xsec1;
37603 - *((int*) _vec.data(6)) = ysec1;
37604 - *((int*) _vec.data(7)) = xref2;
37605 - *((int*) _vec.data(8)) = yref2;
37606 - *((int*) _vec.data(9)) = xsec2;
37607 - *((int*) _vec.data(10)) = ysec2;
37608 - *((int*) _vec.data(11)) = hwindowsize;
37609 - *((int*) _vec.data(12)) = hsearchsize;
37610 - _vec.call();
37611 - out._ref->addref( ref._ref );
37612 - out._ref->addref( sec._ref );
37613 -
37614 - return( out );
37615 -}
37616 -
37617 -// im_maxpos_subpel: subpixel position of maximum of (phase correlation) image
37618 -double VImage::maxpos_subpel( double& y ) throw( VError )
37619 -{
37620 - VImage im = *this;
37621 - double x;
37622 -
37623 - Vargv _vec( "im_maxpos_subpel" );
37624 -
37625 - _vec.data(0) = im.image();
37626 - _vec.call();
37627 - x = *((double*)_vec.data(1));
37628 - y = *((double*)_vec.data(2));
37629 -
37630 - return( x );
37631 -}
37632 -
37633 -// im_remosaic: automatically rebuild mosaic with new files
37634 -VImage VImage::remosaic( char* old_str, char* new_str ) throw( VError )
37635 -{
37636 - VImage in = *this;
37637 - VImage out;
37638 -
37639 - Vargv _vec( "im_remosaic" );
37640 -
37641 - _vec.data(0) = in.image();
37642 - _vec.data(1) = out.image();
37643 - _vec.data(2) = (im_object) old_str;
37644 - _vec.data(3) = (im_object) new_str;
37645 - _vec.call();
37646 - out._ref->addref( in._ref );
37647 -
37648 - return( out );
37649 -}
37650 -
37651 -// im_tbmerge: top-bottom merge of in1 and in2
37652 -VImage VImage::tbmerge( VImage sec, int dx, int dy, int mwidth ) throw( VError )
37653 -{
37654 - VImage ref = *this;
37655 - VImage out;
37656 -
37657 - Vargv _vec( "im_tbmerge" );
37658 -
37659 - _vec.data(0) = ref.image();
37660 - _vec.data(1) = sec.image();
37661 - _vec.data(2) = out.image();
37662 - *((int*) _vec.data(3)) = dx;
37663 - *((int*) _vec.data(4)) = dy;
37664 - *((int*) _vec.data(5)) = mwidth;
37665 - _vec.call();
37666 - out._ref->addref( ref._ref );
37667 - out._ref->addref( sec._ref );
37668 -
37669 - return( out );
37670 -}
37671 -
37672 -// im_tbmerge1: first-order top-bottom merge of in1 and in2
37673 -VImage VImage::tbmerge1( VImage sec, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int mwidth ) throw( VError )
37674 -{
37675 - VImage ref = *this;
37676 - VImage out;
37677 -
37678 - Vargv _vec( "im_tbmerge1" );
37679 -
37680 - _vec.data(0) = ref.image();
37681 - _vec.data(1) = sec.image();
37682 - _vec.data(2) = out.image();
37683 - *((int*) _vec.data(3)) = xr1;
37684 - *((int*) _vec.data(4)) = yr1;
37685 - *((int*) _vec.data(5)) = xs1;
37686 - *((int*) _vec.data(6)) = ys1;
37687 - *((int*) _vec.data(7)) = xr2;
37688 - *((int*) _vec.data(8)) = yr2;
37689 - *((int*) _vec.data(9)) = xs2;
37690 - *((int*) _vec.data(10)) = ys2;
37691 - *((int*) _vec.data(11)) = mwidth;
37692 - _vec.call();
37693 - out._ref->addref( ref._ref );
37694 - out._ref->addref( sec._ref );
37695 -
37696 - return( out );
37697 -}
37698 -
37699 -// im_tbmosaic: top-bottom mosaic of in1 and in2
37700 -VImage VImage::tbmosaic( VImage sec, int bandno, int xr, int yr, int xs, int ys, int halfcorrelation, int halfarea, int balancetype, int mwidth ) throw( VError )
37701 -{
37702 - VImage ref = *this;
37703 - VImage out;
37704 -
37705 - Vargv _vec( "im_tbmosaic" );
37706 -
37707 - _vec.data(0) = ref.image();
37708 - _vec.data(1) = sec.image();
37709 - _vec.data(2) = out.image();
37710 - *((int*) _vec.data(3)) = bandno;
37711 - *((int*) _vec.data(4)) = xr;
37712 - *((int*) _vec.data(5)) = yr;
37713 - *((int*) _vec.data(6)) = xs;
37714 - *((int*) _vec.data(7)) = ys;
37715 - *((int*) _vec.data(8)) = halfcorrelation;
37716 - *((int*) _vec.data(9)) = halfarea;
37717 - *((int*) _vec.data(10)) = balancetype;
37718 - *((int*) _vec.data(11)) = mwidth;
37719 - _vec.call();
37720 - out._ref->addref( ref._ref );
37721 - out._ref->addref( sec._ref );
37722 -
37723 - return( out );
37724 -}
37725 -
37726 -// im_tbmosaic1: first-order top-bottom mosaic of ref and sec
37727 -VImage VImage::tbmosaic1( VImage sec, int bandno, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int halfcorrelation, int halfarea, int balancetype, int mwidth ) throw( VError )
37728 -{
37729 - VImage ref = *this;
37730 - VImage out;
37731 -
37732 - Vargv _vec( "im_tbmosaic1" );
37733 -
37734 - _vec.data(0) = ref.image();
37735 - _vec.data(1) = sec.image();
37736 - _vec.data(2) = out.image();
37737 - *((int*) _vec.data(3)) = bandno;
37738 - *((int*) _vec.data(4)) = xr1;
37739 - *((int*) _vec.data(5)) = yr1;
37740 - *((int*) _vec.data(6)) = xs1;
37741 - *((int*) _vec.data(7)) = ys1;
37742 - *((int*) _vec.data(8)) = xr2;
37743 - *((int*) _vec.data(9)) = yr2;
37744 - *((int*) _vec.data(10)) = xs2;
37745 - *((int*) _vec.data(11)) = ys2;
37746 - *((int*) _vec.data(12)) = halfcorrelation;
37747 - *((int*) _vec.data(13)) = halfarea;
37748 - *((int*) _vec.data(14)) = balancetype;
37749 - *((int*) _vec.data(15)) = mwidth;
37750 - _vec.call();
37751 - out._ref->addref( ref._ref );
37752 - out._ref->addref( sec._ref );
37753 -
37754 - return( out );
37755 -}
37756 -
37757 -
37758 -// bodies for package other
37759 -// this file automatically generated from
37760 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
37761 -// im_benchmark: do something complicated for testing
37762 -VImage VImage::benchmark() throw( VError )
37763 -{
37764 - VImage in = *this;
37765 - VImage out;
37766 -
37767 - Vargv _vec( "im_benchmark" );
37768 -
37769 - _vec.data(0) = in.image();
37770 - _vec.data(1) = out.image();
37771 - _vec.call();
37772 - out._ref->addref( in._ref );
37773 -
37774 - return( out );
37775 -}
37776 -
37777 -// im_benchmark2: do something complicated for testing
37778 -double VImage::benchmark2() throw( VError )
37779 -{
37780 - VImage in = *this;
37781 - double value;
37782 -
37783 - Vargv _vec( "im_benchmark2" );
37784 -
37785 - _vec.data(0) = in.image();
37786 - _vec.call();
37787 - value = *((double*)_vec.data(1));
37788 -
37789 - return( value );
37790 -}
37791 -
37792 -// im_benchmarkn: do something complicated for testing
37793 -VImage VImage::benchmarkn( int n ) throw( VError )
37794 -{
37795 - VImage in = *this;
37796 - VImage out;
37797 -
37798 - Vargv _vec( "im_benchmarkn" );
37799 -
37800 - _vec.data(0) = in.image();
37801 - _vec.data(1) = out.image();
37802 - *((int*) _vec.data(2)) = n;
37803 - _vec.call();
37804 - out._ref->addref( in._ref );
37805 -
37806 - return( out );
37807 -}
37808 -
37809 -// im_eye: generate IM_BANDFMT_UCHAR [0,255] frequency/amplitude image
37810 -VImage VImage::eye( int xsize, int ysize, double factor ) throw( VError )
37811 -{
37812 - VImage out;
37813 -
37814 - Vargv _vec( "im_eye" );
37815 -
37816 - _vec.data(0) = out.image();
37817 - *((int*) _vec.data(1)) = xsize;
37818 - *((int*) _vec.data(2)) = ysize;
37819 - *((double*) _vec.data(3)) = factor;
37820 - _vec.call();
37821 -
37822 - return( out );
37823 -}
37824 -
37825 -// im_grey: generate IM_BANDFMT_UCHAR [0,255] grey scale image
37826 -VImage VImage::grey( int xsize, int ysize ) throw( VError )
37827 -{
37828 - VImage out;
37829 -
37830 - Vargv _vec( "im_grey" );
37831 -
37832 - _vec.data(0) = out.image();
37833 - *((int*) _vec.data(1)) = xsize;
37834 - *((int*) _vec.data(2)) = ysize;
37835 - _vec.call();
37836 -
37837 - return( out );
37838 -}
37839 -
37840 -// im_feye: generate IM_BANDFMT_FLOAT [-1,1] frequency/amplitude image
37841 -VImage VImage::feye( int xsize, int ysize, double factor ) throw( VError )
37842 -{
37843 - VImage out;
37844 -
37845 - Vargv _vec( "im_feye" );
37846 -
37847 - _vec.data(0) = out.image();
37848 - *((int*) _vec.data(1)) = xsize;
37849 - *((int*) _vec.data(2)) = ysize;
37850 - *((double*) _vec.data(3)) = factor;
37851 - _vec.call();
37852 -
37853 - return( out );
37854 -}
37855 -
37856 -// im_fgrey: generate IM_BANDFMT_FLOAT [0,1] grey scale image
37857 -VImage VImage::fgrey( int xsize, int ysize ) throw( VError )
37858 -{
37859 - VImage out;
37860 -
37861 - Vargv _vec( "im_fgrey" );
37862 -
37863 - _vec.data(0) = out.image();
37864 - *((int*) _vec.data(1)) = xsize;
37865 - *((int*) _vec.data(2)) = ysize;
37866 - _vec.call();
37867 -
37868 - return( out );
37869 -}
37870 -
37871 -// im_fzone: generate IM_BANDFMT_FLOAT [-1,1] zone plate image
37872 -VImage VImage::fzone( int size ) throw( VError )
37873 -{
37874 - VImage out;
37875 -
37876 - Vargv _vec( "im_fzone" );
37877 -
37878 - _vec.data(0) = out.image();
37879 - *((int*) _vec.data(1)) = size;
37880 - _vec.call();
37881 -
37882 - return( out );
37883 -}
37884 -
37885 -// im_make_xy: generate image with pixel value equal to coordinate
37886 -VImage VImage::make_xy( int xsize, int ysize ) throw( VError )
37887 -{
37888 - VImage out;
37889 -
37890 - Vargv _vec( "im_make_xy" );
37891 -
37892 - _vec.data(0) = out.image();
37893 - *((int*) _vec.data(1)) = xsize;
37894 - *((int*) _vec.data(2)) = ysize;
37895 - _vec.call();
37896 -
37897 - return( out );
37898 -}
37899 -
37900 -// im_sines: generate 2D sine image
37901 -VImage VImage::sines( int xsize, int ysize, double horfreq, double verfreq ) throw( VError )
37902 -{
37903 - VImage out;
37904 -
37905 - Vargv _vec( "im_sines" );
37906 -
37907 - _vec.data(0) = out.image();
37908 - *((int*) _vec.data(1)) = xsize;
37909 - *((int*) _vec.data(2)) = ysize;
37910 - *((double*) _vec.data(3)) = horfreq;
37911 - *((double*) _vec.data(4)) = verfreq;
37912 - _vec.call();
37913 -
37914 - return( out );
37915 -}
37916 -
37917 -// im_zone: generate IM_BANDFMT_UCHAR [0,255] zone plate image
37918 -VImage VImage::zone( int size ) throw( VError )
37919 -{
37920 - VImage out;
37921 -
37922 - Vargv _vec( "im_zone" );
37923 -
37924 - _vec.data(0) = out.image();
37925 - *((int*) _vec.data(1)) = size;
37926 - _vec.call();
37927 -
37928 - return( out );
37929 -}
37930 -
37931 -
37932 -// bodies for package resample
37933 -// this file automatically generated from
37934 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
37935 -// im_rightshift_size: decrease size by a power-of-two factor
37936 -VImage VImage::rightshift_size( int xshift, int yshift, int band_fmt ) throw( VError )
37937 -{
37938 - VImage in = *this;
37939 - VImage out;
37940 -
37941 - Vargv _vec( "im_rightshift_size" );
37942 -
37943 - _vec.data(0) = in.image();
37944 - _vec.data(1) = out.image();
37945 - *((int*) _vec.data(2)) = xshift;
37946 - *((int*) _vec.data(3)) = yshift;
37947 - *((int*) _vec.data(4)) = band_fmt;
37948 - _vec.call();
37949 - out._ref->addref( in._ref );
37950 -
37951 - return( out );
37952 -}
37953 -
37954 -// im_shrink: shrink image by xfac, yfac times
37955 -VImage VImage::shrink( double xfac, double yfac ) throw( VError )
37956 -{
37957 - VImage in = *this;
37958 - VImage out;
37959 -
37960 - Vargv _vec( "im_shrink" );
37961 -
37962 - _vec.data(0) = in.image();
37963 - _vec.data(1) = out.image();
37964 - *((double*) _vec.data(2)) = xfac;
37965 - *((double*) _vec.data(3)) = yfac;
37966 - _vec.call();
37967 - out._ref->addref( in._ref );
37968 -
37969 - return( out );
37970 -}
37971 -
37972 -// im_stretch3: stretch 3%, sub-pixel displace by xdisp/ydisp
37973 -VImage VImage::stretch3( double xdisp, double ydisp ) throw( VError )
37974 -{
37975 - VImage in = *this;
37976 - VImage out;
37977 -
37978 - Vargv _vec( "im_stretch3" );
37979 -
37980 - _vec.data(0) = in.image();
37981 - _vec.data(1) = out.image();
37982 - *((double*) _vec.data(2)) = xdisp;
37983 - *((double*) _vec.data(3)) = ydisp;
37984 - _vec.call();
37985 - out._ref->addref( in._ref );
37986 -
37987 - return( out );
37988 -}
37989 -
37990 -// im_affinei: affine transform
37991 -VImage VImage::affinei( char* interpolate, double a, double b, double c, double d, double dx, double dy, int x, int y, int w, int h ) throw( VError )
37992 -{
37993 - VImage in = *this;
37994 - VImage out;
37995 -
37996 - Vargv _vec( "im_affinei" );
37997 -
37998 - _vec.data(0) = in.image();
37999 - _vec.data(1) = out.image();
38000 - if( vips__input_interpolate_init( &_vec.data(2), interpolate ) )
38001 - verror();
38002 - *((double*) _vec.data(3)) = a;
38003 - *((double*) _vec.data(4)) = b;
38004 - *((double*) _vec.data(5)) = c;
38005 - *((double*) _vec.data(6)) = d;
38006 - *((double*) _vec.data(7)) = dx;
38007 - *((double*) _vec.data(8)) = dy;
38008 - *((int*) _vec.data(9)) = x;
38009 - *((int*) _vec.data(10)) = y;
38010 - *((int*) _vec.data(11)) = w;
38011 - *((int*) _vec.data(12)) = h;
38012 - _vec.call();
38013 - out._ref->addref( in._ref );
38014 -
38015 - return( out );
38016 -}
38017 -
38018 -// im_affinei_all: affine transform of whole image
38019 -VImage VImage::affinei_all( char* interpolate, double a, double b, double c, double d, double dx, double dy ) throw( VError )
38020 -{
38021 - VImage in = *this;
38022 - VImage out;
38023 -
38024 - Vargv _vec( "im_affinei_all" );
38025 -
38026 - _vec.data(0) = in.image();
38027 - _vec.data(1) = out.image();
38028 - if( vips__input_interpolate_init( &_vec.data(2), interpolate ) )
38029 - verror();
38030 - *((double*) _vec.data(3)) = a;
38031 - *((double*) _vec.data(4)) = b;
38032 - *((double*) _vec.data(5)) = c;
38033 - *((double*) _vec.data(6)) = d;
38034 - *((double*) _vec.data(7)) = dx;
38035 - *((double*) _vec.data(8)) = dy;
38036 - _vec.call();
38037 - out._ref->addref( in._ref );
38038 -
38039 - return( out );
38040 -}
38041 -
38042 -
38043 -// bodies for package video
38044 -// this file automatically generated from
38045 -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
38046 -// im_video_test: test video grabber
38047 -VImage VImage::video_test( int brightness, int error ) throw( VError )
38048 -{
38049 - VImage out;
38050 -
38051 - Vargv _vec( "im_video_test" );
38052 -
38053 - _vec.data(0) = out.image();
38054 - *((int*) _vec.data(1)) = brightness;
38055 - *((int*) _vec.data(2)) = error;
38056 - _vec.call();
38057 -
38058 - return( out );
38059 -}
38060 -
38061 -// im_video_v4l1: grab a video frame with v4l1
38062 -VImage VImage::video_v4l1( char* device, int channel, int brightness, int colour, int contrast, int hue, int ngrabs ) throw( VError )
38063 -{
38064 - VImage out;
38065 -
38066 - Vargv _vec( "im_video_v4l1" );
38067 -
38068 - _vec.data(0) = out.image();
38069 - _vec.data(1) = (im_object) device;
38070 - *((int*) _vec.data(2)) = channel;
38071 - *((int*) _vec.data(3)) = brightness;
38072 - *((int*) _vec.data(4)) = colour;
38073 - *((int*) _vec.data(5)) = contrast;
38074 - *((int*) _vec.data(6)) = hue;
38075 - *((int*) _vec.data(7)) = ngrabs;
38076 - _vec.call();
38077 -
38078 - return( out );
38079 -}
38080 -
38081 -
38082 diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/VMask.cc vips-7.38.5/libvipsCC/VMask.cc
38083 --- vips-7.38.5-vanilla/libvipsCC/VMask.cc 2014-07-17 23:48:36.237794473 -0400
38084 +++ vips-7.38.5/libvipsCC/VMask.cc 1969-12-31 19:00:00.000000000 -0500
38085 @@ -1,662 +0,0 @@
38086 -// Object part of VMask class
38087 -
38088 -/*
38089 -
38090 - Copyright (C) 1991-2001 The National Gallery
38091 -
38092 - This program is free software; you can redistribute it and/or modify
38093 - it under the terms of the GNU Lesser General Public License as published by
38094 - the Free Software Foundation; either version 2 of the License, or
38095 - (at your option) any later version.
38096 -
38097 - This program is distributed in the hope that it will be useful,
38098 - but WITHOUT ANY WARRANTY; without even the implied warranty of
38099 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38100 - GNU Lesser General Public License for more details.
38101 -
38102 - You should have received a copy of the GNU Lesser General Public License
38103 - along with this program; if not, write to the Free Software
38104 - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
38105 - 02110-1301 USA
38106 -
38107 - */
38108 -
38109 -/*
38110 -
38111 - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
38112 -
38113 - */
38114 -
38115 -#ifdef HAVE_CONFIG_H
38116 -#include <config.h>
38117 -#endif /*HAVE_CONFIG_H*/
38118 -#include <vips/intl.h>
38119 -
38120 -#include <cstdlib>
38121 -#include <cmath>
38122 -
38123 -#include <vips/vips.h>
38124 -
38125 -#include <vips/vipscpp.h>
38126 -
38127 -#ifdef WITH_DMALLOC
38128 -#include <dmalloc.h>
38129 -#endif /*WITH_DMALLOC*/
38130 -
38131 -VIPS_NAMESPACE_START
38132 -
38133 -/* Functions for VMask - refcounting layer over VPMask.
38134 - */
38135 -
38136 -VMask::~VMask()
38137 -{
38138 - ref->nrefs--;
38139 - if( !ref->nrefs )
38140 - delete ref;
38141 -}
38142 -
38143 -VMask &VMask::operator=( const VMask &a )
38144 -{
38145 - // Loosing ref to LHS
38146 - ref->nrefs--;
38147 -
38148 - if( ref->nrefs > 0 )
38149 - // Need fresh refblock
38150 - ref = new refblock;
38151 - else
38152 - // Recycle old refblock
38153 - delete ref->pmask;
38154 -
38155 - // LHS now points to RHS
38156 - ref = a.ref;
38157 - ref->nrefs++;
38158 -
38159 - return( *this );
38160 -}
38161 -
38162 -// Make sure this is a private copy of pmask --- dup if nrefs != 1
38163 -void VMask::make_private()
38164 -{
38165 - if( ref->nrefs > 1 ) {
38166 - // Make fresh refblock
38167 - refblock *ref2 = new refblock;
38168 -
38169 - // And copy the mask
38170 - ref2->pmask = ref->pmask->dup();
38171 - ref->nrefs--;
38172 - ref = ref2;
38173 - }
38174 -}
38175 -
38176 -void VMask::ostream_print( std::ostream &file ) const
38177 -{
38178 - file << *(ref->pmask);
38179 -}
38180 -
38181 -// Embed INTMASK in VIMask
38182 -void VIMask::embed( INTMASK *i ) throw( VError )
38183 -{
38184 - if( ref->pmask )
38185 - verror( "embed: VIMask not empty" );
38186 - ref->pmask = new _private_detail::VPIMask( i );
38187 -}
38188 -
38189 -// Type conversions: implicit INTMASK to DOUBLEMASK
38190 -VIMask::operator VDMask()
38191 -{
38192 - VDMask out( xsize(), ysize() );
38193 -
38194 - out.mask().dptr->scale = scale();
38195 - out.mask().dptr->offset = offset();
38196 -
38197 - for( int i = 0; i < size(); i++ )
38198 - out[i] = (*this)[i];
38199 -
38200 - return( out );
38201 -}
38202 -
38203 -
38204 -// Forward ref of VImage class
38205 -class VImage;
38206 -
38207 -// Type conversions: implicit DOUBLEMASK to INTMASK
38208 -VDMask::operator VIMask()
38209 -{
38210 - VIMask out( xsize(), ysize() );
38211 -
38212 - out.mask().iptr->scale = int( scale() );
38213 - out.mask().iptr->offset = int( offset() );
38214 -
38215 - for( int i = 0; i < size(); i++ )
38216 - out[i] = (int) rint( (*this)[i] );
38217 -
38218 - return( out );
38219 -}
38220 -
38221 -// Type conversions: implicit DOUBLEMASK to VImage
38222 -VDMask::operator VImage() throw( VError )
38223 -{
38224 - VImage out;
38225 -
38226 - if( im_mask2vips( mask().dptr, out.image() ) )
38227 - verror();
38228 -
38229 - return( out );
38230 -}
38231 -
38232 -// ... and INTMASK to VImage
38233 -VIMask::operator VImage() { return( VImage( VDMask( *this ) ) ); }
38234 -
38235 -// Embed DOUBLEMASK in VDMask
38236 -void VDMask::embed( DOUBLEMASK *i ) throw( VError )
38237 -{
38238 - if( ref->pmask )
38239 - verror( "embed: VDMask not empty" );
38240 - ref->pmask = new _private_detail::VPDMask( i );
38241 -}
38242 -
38243 -/* Functions for P*Mask - layer over im_*_*mask() functions.
38244 - */
38245 -
38246 -// Create empty imask
38247 -_private_detail::VPIMask::VPIMask( int xsize, int ysize ) throw( VError )
38248 -{
38249 - if( !(data.iptr = im_create_imask( "VPIMask::VPIMask", xsize, ysize )) )
38250 - verror();
38251 - type = _private_detail::VPMask::INT;
38252 -}
38253 -
38254 -// Init from vector
38255 -_private_detail::VPIMask::VPIMask( int xsize, int ysize,
38256 - int scale, int offset, std::vector<int> coeff )
38257 - throw( VError )
38258 -{
38259 - int i;
38260 -
38261 - if( !(data.iptr = im_create_imask( "VPIMask::VPIMask", xsize, ysize )) )
38262 - verror();
38263 - type = _private_detail::VPMask::INT;
38264 -
38265 - data.iptr->scale = scale;
38266 - data.iptr->offset = offset;
38267 - for( i = 0; i < xsize * ysize; i++ )
38268 - data.iptr->coeff[i] = coeff[i];
38269 -}
38270 -
38271 -// Create from filename
38272 -_private_detail::VPIMask::VPIMask( const char *name ) throw( VError )
38273 -{
38274 - if( !(data.iptr = im_read_imask( (char *) name )) )
38275 - verror();
38276 - type = _private_detail::VPMask::INT;
38277 -}
38278 -
38279 -// Create from existing INTMASK
38280 -_private_detail::VPIMask::VPIMask( INTMASK *imask )
38281 -{
38282 - data.iptr = imask;
38283 - type = _private_detail::VPMask::INT;
38284 -}
38285 -
38286 -// Create empty
38287 -_private_detail::VPIMask::VPIMask()
38288 -{
38289 - data.iptr = 0;
38290 - type = _private_detail::VPMask::UNASSIGNED;
38291 -}
38292 -
38293 -_private_detail::VPIMask::~VPIMask()
38294 -{
38295 - if( data.iptr ) {
38296 - im_free_imask( data.iptr );
38297 - data.iptr = 0;
38298 - type = _private_detail::VPMask::UNASSIGNED;
38299 - }
38300 -}
38301 -
38302 -// Duplicate -- we are a VPIMask, return a new VPIMask which is a copy of us.
38303 -// Return as a VPMask tho'.
38304 -_private_detail::VPMask *_private_detail::VPIMask::dup() const throw( VError )
38305 -{
38306 - _private_detail::VPIMask *out = new _private_detail::VPIMask();
38307 -
38308 - INTMASK *msk;
38309 - if( !(msk = im_dup_imask( data.iptr, "VPIMask::dup" )) ) {
38310 - delete out;
38311 - verror();
38312 - }
38313 - out->embed( msk );
38314 -
38315 - return( out );
38316 -}
38317 -
38318 -// Insert INTMASK pointer
38319 -void _private_detail::VPIMask::embed( INTMASK *msk ) throw( VError )
38320 -{
38321 - if( type != _private_detail::VPMask::UNASSIGNED )
38322 - verror( "VPIMask::embed: VPIMask not empty" );
38323 -
38324 - data.iptr = msk;
38325 - type = _private_detail::VPMask::INT;
38326 -}
38327 -
38328 -int _private_detail::VPIMask::xsize() const throw( VError )
38329 -{
38330 - if( !data.iptr )
38331 - verror( "xsize: mask not set" );
38332 -
38333 - return( data.iptr->xsize );
38334 -}
38335 -
38336 -int _private_detail::VPIMask::ysize() const throw( VError )
38337 -{
38338 - if( !data.iptr )
38339 - verror( "ysize: mask not set" );
38340 -
38341 - return( data.iptr->ysize );
38342 -}
38343 -
38344 -int _private_detail::VPIMask::scale() const throw( VError )
38345 -{
38346 - if( !data.iptr )
38347 - verror( "scale: mask not set" );
38348 -
38349 - return( data.iptr->scale );
38350 -}
38351 -
38352 -int _private_detail::VPIMask::offset() const throw( VError )
38353 -{
38354 - if( !data.iptr )
38355 - verror( "offset: mask not set" );
38356 -
38357 - return( data.iptr->offset );
38358 -}
38359 -
38360 -const char *_private_detail::VPIMask::filename() const throw( VError )
38361 -{
38362 - if( !data.iptr )
38363 - verror( "filename: mask not set" );
38364 -
38365 - return( data.iptr->filename );
38366 -}
38367 -
38368 -void _private_detail::VPIMask::ostream_print( std::ostream &file ) const
38369 - throw( VError )
38370 -{
38371 - if( !data.iptr )
38372 - verror( "internal error #7447234" );
38373 -
38374 - int i, j;
38375 - int *p = data.iptr->coeff;
38376 -
38377 - file << this->xsize() << "\t" << this->ysize() << "\t";
38378 - file << this->scale() << "\t" << this->offset() << "\n";
38379 -
38380 - for( i = 0; i < this->ysize(); i++ ) {
38381 - for( j = 0; j < this->xsize(); j++ )
38382 - file << *p++ << "\t";
38383 -
38384 - file << "\n";
38385 - }
38386 -}
38387 -
38388 -// Extract start of int array
38389 -int *_private_detail::VPIMask::array() const
38390 -{
38391 - return( data.iptr->coeff );
38392 -}
38393 -
38394 -// Create empty dmask
38395 -_private_detail::VPDMask::VPDMask( int xsize, int ysize ) throw( VError )
38396 -{
38397 - if( !(data.dptr = im_create_dmask( "VPDMask::VPDMask", xsize, ysize )) )
38398 - verror();
38399 - type = _private_detail::VPMask::DOUBLE;
38400 -}
38401 -
38402 -// Create from vector
38403 -_private_detail::VPDMask::VPDMask( int xsize, int ysize,
38404 - double scale, double offset, std::vector<double> coeff ) throw( VError )
38405 -{
38406 - int i;
38407 -
38408 - if( !(data.dptr = im_create_dmask( "VPDMask::VPDMask", xsize, ysize )) )
38409 - verror();
38410 - type = _private_detail::VPMask::DOUBLE;
38411 -
38412 - data.dptr->scale = scale;
38413 - data.dptr->offset = offset;
38414 - for( i = 0; i < xsize * ysize; i++ )
38415 - data.dptr->coeff[i] = coeff[i];
38416 -}
38417 -
38418 -// Create from filename
38419 -_private_detail::VPDMask::VPDMask( const char *name ) throw( VError )
38420 -{
38421 - if( !(data.dptr = im_read_dmask( (char *) name )) )
38422 - verror();
38423 - type = _private_detail::VPMask::DOUBLE;
38424 -}
38425 -
38426 -// Create empty
38427 -_private_detail::VPDMask::VPDMask()
38428 -{
38429 - data.dptr = 0;
38430 - type = _private_detail::VPMask::UNASSIGNED;
38431 -}
38432 -
38433 -// Create from existing DOUBLEMASK
38434 -_private_detail::VPDMask::VPDMask( DOUBLEMASK *dmask )
38435 -{
38436 - data.dptr = dmask;
38437 - type = _private_detail::VPMask::DOUBLE;
38438 -}
38439 -
38440 -_private_detail::VPDMask::~VPDMask()
38441 -{
38442 - if( data.dptr ) {
38443 - im_free_dmask( data.dptr );
38444 - data.dptr = 0;
38445 - type = _private_detail::VPMask::UNASSIGNED;
38446 - }
38447 -}
38448 -
38449 -// Duplicate -- we are a VPIMask, return a new VPIMask which is a copy of us.
38450 -// Return as a VPMask tho'.
38451 -_private_detail::VPMask *_private_detail::VPDMask::dup() const throw( VError )
38452 -{
38453 - _private_detail::VPDMask *out = new _private_detail::VPDMask();
38454 -
38455 - DOUBLEMASK *msk;
38456 - if( !(msk = im_dup_dmask( data.dptr, "VPDMask::dup" )) ) {
38457 - delete out;
38458 - verror();
38459 - }
38460 - out->embed( msk );
38461 -
38462 - return( out );
38463 -}
38464 -
38465 -// Insert DOUBLEMASK pointer
38466 -void _private_detail::VPDMask::embed( DOUBLEMASK *msk ) throw( VError )
38467 -{
38468 - if( type != _private_detail::VPMask::UNASSIGNED )
38469 - verror( "VPDMask::embed: VPDMask not empty" );
38470 -
38471 - data.dptr = msk;
38472 - type = _private_detail::VPMask::DOUBLE;
38473 -}
38474 -
38475 -int _private_detail::VPDMask::xsize() const throw( VError )
38476 -{
38477 - if( !data.dptr )
38478 - verror( "xsize: mask not set" );
38479 -
38480 - return( data.dptr->xsize );
38481 -}
38482 -
38483 -int _private_detail::VPDMask::ysize() const throw( VError )
38484 -{
38485 - if( !data.dptr )
38486 - verror( "ysize: mask not set" );
38487 -
38488 - return( data.dptr->ysize );
38489 -}
38490 -
38491 -double _private_detail::VPDMask::scale() const throw( VError )
38492 -{
38493 - if( !data.dptr )
38494 - verror( "scale: mask not set" );
38495 -
38496 - return( data.dptr->scale );
38497 -}
38498 -
38499 -double _private_detail::VPDMask::offset() const throw( VError )
38500 -{
38501 - if( !data.dptr )
38502 - verror( "offset: mask not set" );
38503 -
38504 - return( data.dptr->offset );
38505 -}
38506 -
38507 -const char *_private_detail::VPDMask::filename() const throw( VError )
38508 -{
38509 - if( !data.dptr )
38510 - verror( "filename: mask not set" );
38511 -
38512 - return( data.dptr->filename );
38513 -}
38514 -
38515 -void _private_detail::VPDMask::ostream_print( std::ostream &file ) const
38516 - throw( VError )
38517 -{
38518 - if( !data.dptr )
38519 - verror( "internal error #7447234" );
38520 -
38521 - int i, j;
38522 - double *p = data.dptr->coeff;
38523 -
38524 - file << this->xsize() << "\t" << this->ysize() << "\t";
38525 - file << this->scale() << "\t" << this->offset() << "\n";
38526 -
38527 - for( i = 0; i < this->ysize(); i++ ) {
38528 - for( j = 0; j < this->xsize(); j++ )
38529 - file << *p++ << "\t";
38530 -
38531 - file << "\n";
38532 - }
38533 -}
38534 -
38535 -// Extract data pointer
38536 -double *_private_detail::VPDMask::array() const
38537 -{
38538 - return( data.dptr->coeff );
38539 -}
38540 -
38541 -// Build functions
38542 -VIMask VIMask::gauss( double sig, double minamp ) throw( VError )
38543 -{
38544 - VIMask out;
38545 - INTMASK *msk;
38546 -
38547 - if( !(msk = im_gauss_imask( "VIMask::gauss", sig, minamp )) )
38548 - verror();
38549 - out.embed( msk );
38550 -
38551 - return( out );
38552 -}
38553 -
38554 -VIMask VIMask::gauss_sep( double sig, double minamp ) throw( VError )
38555 -{
38556 - VIMask out;
38557 - INTMASK *msk;
38558 -
38559 - if( !(msk = im_gauss_imask_sep( "VIMask::gauss", sig, minamp )) )
38560 - verror();
38561 - out.embed( msk );
38562 -
38563 - return( out );
38564 -}
38565 -
38566 -VDMask VDMask::gauss( double sig, double minamp ) throw( VError )
38567 -{
38568 - VDMask out;
38569 - DOUBLEMASK *msk;
38570 -
38571 - if( !(msk = im_gauss_dmask( "VDMask::gauss", sig, minamp )) )
38572 - verror();
38573 - out.embed( msk );
38574 -
38575 - return( out );
38576 -}
38577 -
38578 -VIMask VIMask::log( double sig, double minamp ) throw( VError )
38579 -{
38580 - VIMask out;
38581 - INTMASK *msk;
38582 -
38583 - if( !(msk = im_log_imask( "VIMask::log", sig, minamp )) )
38584 - verror();
38585 - out.embed( msk );
38586 -
38587 - return( out );
38588 -}
38589 -
38590 -VDMask VDMask::log( double sig, double minamp ) throw( VError )
38591 -{
38592 - VDMask out;
38593 - DOUBLEMASK *msk;
38594 -
38595 - if( !(msk = im_log_dmask( "VDMask::log", sig, minamp )) )
38596 - verror();
38597 - out.embed( msk );
38598 -
38599 - return( out );
38600 -}
38601 -
38602 -// Manipulation functions
38603 -VIMask VIMask::rotate45() throw( VError )
38604 -{
38605 - VIMask out;
38606 - INTMASK *msk;
38607 -
38608 - if( !(msk = im_rotate_imask45( mask().iptr, "VIMask::rotate45" )) )
38609 - verror();
38610 - out.embed( msk );
38611 -
38612 - return( out );
38613 -}
38614 -
38615 -VIMask VIMask::rotate90() throw( VError )
38616 -{
38617 - VIMask out;
38618 - INTMASK *msk;
38619 -
38620 - if( !(msk = im_rotate_imask90( mask().iptr, "VIMask::rotate90" )) )
38621 - verror();
38622 - out.embed( msk );
38623 -
38624 - return( out );
38625 -}
38626 -
38627 -VDMask VDMask::rotate45() throw( VError )
38628 -{
38629 - VDMask out;
38630 - DOUBLEMASK *msk;
38631 -
38632 - if( !(msk = im_rotate_dmask45( mask().dptr, "VDMask::rotate45" )) )
38633 - verror();
38634 - out.embed( msk );
38635 -
38636 - return( out );
38637 -}
38638 -
38639 -VDMask VDMask::rotate90() throw( VError )
38640 -{
38641 - VDMask out;
38642 - DOUBLEMASK *msk;
38643 -
38644 - if( !(msk = im_rotate_dmask90( mask().dptr, "VDMask::rotate90" )) )
38645 - verror();
38646 - out.embed( msk );
38647 -
38648 - return( out );
38649 -}
38650 -
38651 -VDMask VDMask::trn() throw( VError )
38652 -{
38653 - VDMask out;
38654 - DOUBLEMASK *msk;
38655 -
38656 - if( !(msk = im_mattrn( mask().dptr, "VDMask::trn" )) )
38657 - verror();
38658 - out.embed( msk );
38659 -
38660 - return( out );
38661 -}
38662 -
38663 -VDMask VDMask::inv() throw( VError )
38664 -{
38665 - VDMask out;
38666 - DOUBLEMASK *msk;
38667 -
38668 - if( !(msk = im_matinv( mask().dptr, "VDMask::inv" )) )
38669 - verror();
38670 - out.embed( msk );
38671 -
38672 - return( out );
38673 -}
38674 -
38675 -VDMask VDMask::mul( VDMask m ) throw( VError )
38676 -{
38677 - VDMask out;
38678 - DOUBLEMASK *msk;
38679 -
38680 - if( !(msk = im_matmul( mask().dptr, m.mask().dptr, "VDMask::mul" )) )
38681 - verror();
38682 - out.embed( msk );
38683 -
38684 - return( out );
38685 -}
38686 -
38687 -VDMask VDMask::cat( VDMask m ) throw( VError )
38688 -{
38689 - VDMask out;
38690 - DOUBLEMASK *msk;
38691 -
38692 - if( !(msk = im_matcat( mask().dptr, m.mask().dptr, "VDMask::cat" )) )
38693 - verror();
38694 - out.embed( msk );
38695 -
38696 - return( out );
38697 -}
38698 -
38699 -VIMask VDMask::scalei() throw( VError )
38700 -{
38701 - VIMask out;
38702 - INTMASK *msk;
38703 -
38704 - if( !(msk = im_scale_dmask( mask().dptr, "VDMask::scalei" )) )
38705 - verror();
38706 - out.embed( msk );
38707 -
38708 - return( out );
38709 -}
38710 -
38711 -// Arithmetic on a VIMask ... just cast and use VDMask
38712 -VDMask VIMask::trn() throw( VError )
38713 - { return( ((VDMask)*this).trn() ); }
38714 -VDMask VIMask::inv() throw( VError )
38715 - { return( ((VDMask)*this).inv() ); }
38716 -VDMask VIMask::cat( VDMask a ) throw( VError )
38717 - { return( ((VDMask)*this).cat( a ) ); }
38718 -VDMask VIMask::mul( VDMask a ) throw( VError )
38719 - { return( ((VDMask)*this).mul( a ) ); }
38720 -
38721 -// Overload [] to get linear array subscript.
38722 -// Our caller may write to the result, so make sure we have a private
38723 -// copy.
38724 -// Involves function call, slow anyway, so do range checking
38725 -int &VIMask::operator[]( int x ) throw( VError )
38726 -{
38727 - if( ref->nrefs != 1 )
38728 - make_private();
38729 -
38730 - if( x > size() )
38731 - verror( "VIMask::operator[]: subscript out of range" );
38732 -
38733 - return( ((_private_detail::VPIMask *)ref->pmask)->array()[x] );
38734 -}
38735 -
38736 -double &VDMask::operator[]( int x ) throw( VError )
38737 -{
38738 - if( ref->nrefs != 1 )
38739 - make_private();
38740 -
38741 - if( x > size() )
38742 - verror( "VDMask::operator[]: subscript out of range" );
38743 -
38744 - return( ((_private_detail::VPDMask *)ref->pmask)->array()[x] );
38745 -}
38746 -
38747 -VIPS_NAMESPACE_END
38748 diff -u --recursive --new-file vips-7.38.5-vanilla/Makefile.am vips-7.38.5/Makefile.am
38749 --- vips-7.38.5-vanilla/Makefile.am 2014-07-17 23:48:36.206794473 -0400
38750 +++ vips-7.38.5/Makefile.am 2014-07-17 23:49:32.827792979 -0400
38751 @@ -1,23 +1,9 @@
38752
38753 -# turn off libvipsCC if C++ is disabled
38754 -if ENABLE_CXX
38755 -C_COMPILE_DIR = libvipsCC
38756 -C_DIST_DIR =
38757 -C_PKGCONFIG = vipsCC.pc
38758 -
38759 -# turn on Python if we can (requires C++)
38760 -if HAVE_PYTHON
38761 -P_COMPILE_DIR = swig
38762 -P_DIST_DIR =
38763 -endif
38764 -
38765 -else
38766 C_COMPILE_DIR =
38767 -C_DIST_DIR = libvipsCC
38768 +C_DIST_DIR =
38769 C_PKGCONFIG =
38770 P_COMPILE_DIR =
38771 P_DIST_DIR = swig
38772 -endif
38773
38774 SUBDIRS = \
38775 libvips \
38776 diff -u --recursive --new-file vips-7.38.5-vanilla/swig/Makefile.am vips-7.38.5/swig/Makefile.am
38777 --- vips-7.38.5-vanilla/swig/Makefile.am 2014-07-17 23:48:36.206794473 -0400
38778 +++ vips-7.38.5/swig/Makefile.am 2014-07-17 23:49:32.827792979 -0400
38779 @@ -1,5 +1,2 @@
38780 -SUBDIRS = \
38781 - vipsCC
38782 -
38783 EXTRA_DIST = \
38784 test
38785 diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/__init__.py vips-7.38.5/swig/vipsCC/__init__.py
38786 --- vips-7.38.5-vanilla/swig/vipsCC/__init__.py 2014-07-17 23:48:36.208794473 -0400
38787 +++ vips-7.38.5/swig/vipsCC/__init__.py 1969-12-31 19:00:00.000000000 -0500
38788 @@ -1 +0,0 @@
38789 -__all__=["VImage","VMask","VError","VDisplay"]
38790 diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/Makefile.am vips-7.38.5/swig/vipsCC/Makefile.am
38791 --- vips-7.38.5-vanilla/swig/vipsCC/Makefile.am 2014-07-17 23:48:36.208794473 -0400
38792 +++ vips-7.38.5/swig/vipsCC/Makefile.am 1969-12-31 19:00:00.000000000 -0500
38793 @@ -1,58 +0,0 @@
38794 -# Let make substitute the value of PYTHON_INCLUDES rather than auto*
38795 -# this makes it easier to support multiple python installs
38796 -AM_CPPFLAGS = \
38797 - -I${top_srcdir}/libvips/include \
38798 - -I${top_srcdir}/libvipsCC/include \
38799 - @VIPS_CFLAGS@ \
38800 - @VIPS_INCLUDES@ \
38801 - $(PYTHON_INCLUDES)
38802 -
38803 -# we install to a directory inside the python area, since we are a module
38804 -vipsccdir = $(pyexecdir)/vipsCC
38805 -
38806 -vipscc_PYTHON = VImage.py VDisplay.py VError.py VMask.py __init__.py
38807 -
38808 -# I tried making a suffix rule for this (and defining SUFFIXES) but I couldn't
38809 -# get it to work, how annoying
38810 -# FIXME at some point
38811 -#
38812 -# need an expanded VImage.h ... SWIG's preprocessor b0rks on includes inside
38813 -# class definitions
38814 -vimagemodule.cxx: VImage.i
38815 - cpp -DSWIG -E $(top_srcdir)/libvipsCC/include/vips/VImage.h > VImage.h
38816 - swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $<
38817 -
38818 -vdisplaymodule.cxx: VDisplay.i
38819 - swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $<
38820 -verrormodule.cxx: VError.i
38821 - swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $<
38822 -vmaskmodule.cxx: VMask.i
38823 - swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $<
38824 -
38825 -vipscc_LTLIBRARIES = vimagemodule.la vdisplaymodule.la verrormodule.la vmaskmodule.la
38826 -
38827 -# maybe there's a clever way to avoid repeating the link stuff 4 times
38828 -# vimagemodule uses the C API as well, so it needs libvips too
38829 -vimagemodule_la_LDFLAGS = -module -avoid-version
38830 -vimagemodule_la_LIBADD = ../../libvipsCC/libvipsCC.la ../../libvips/libvips.la $(VIPS_LIBS)
38831 -nodist_vimagemodule_la_SOURCES = vimagemodule.cxx
38832 -
38833 -vdisplaymodule_la_LDFLAGS = -module -avoid-version
38834 -vdisplaymodule_la_LIBADD = ../../libvipsCC/libvipsCC.la $(VIPS_LIBS)
38835 -nodist_vdisplaymodule_la_SOURCES = vdisplaymodule.cxx
38836 -
38837 -verrormodule_la_LDFLAGS = -module -avoid-version
38838 -verrormodule_la_LIBADD = ../../libvipsCC/libvipsCC.la $(VIPS_LIBS)
38839 -nodist_verrormodule_la_SOURCES = verrormodule.cxx
38840 -
38841 -vmaskmodule_la_LDFLAGS = -module -avoid-version
38842 -vmaskmodule_la_LIBADD = ../../libvipsCC/libvipsCC.la $(VIPS_LIBS)
38843 -nodist_vmaskmodule_la_SOURCES = vmaskmodule.cxx
38844 -
38845 -CLEANFILES = VImage.h
38846 -
38847 -EXTRA_DIST = \
38848 - VImage.i VDisplay.i VError.i VMask.i __init__.py \
38849 - vimagemodule.cxx \
38850 - verrormodule.cxx vdisplaymodule.cxx vmaskmodule.cxx \
38851 - VImage.py VDisplay.py VError.py VMask.py
38852 diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/Makefile.in vips-7.38.5/swig/vipsCC/Makefile.in
38853 --- vips-7.38.5-vanilla/swig/vipsCC/Makefile.in 2014-07-17 23:48:36.208794473 -0400
38854 +++ vips-7.38.5/swig/vipsCC/Makefile.in 1969-12-31 19:00:00.000000000 -0500
38855 @@ -1,895 +0,0 @@
38856 -# Makefile.in generated by automake 1.13.3 from Makefile.am.
38857 -# @configure_input@
38858 -
38859 -# Copyright (C) 1994-2013 Free Software Foundation, Inc.
38860 -
38861 -# This Makefile.in is free software; the Free Software Foundation
38862 -# gives unlimited permission to copy and/or distribute it,
38863 -# with or without modifications, as long as this notice is preserved.
38864 -
38865 -# This program is distributed in the hope that it will be useful,
38866 -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
38867 -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
38868 -# PARTICULAR PURPOSE.
38869 -
38870 -@SET_MAKE@
38871 -
38872 -VPATH = @srcdir@
38873 -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
38874 -am__make_running_with_option = \
38875 - case $${target_option-} in \
38876 - ?) ;; \
38877 - *) echo "am__make_running_with_option: internal error: invalid" \
38878 - "target option '$${target_option-}' specified" >&2; \
38879 - exit 1;; \
38880 - esac; \
38881 - has_opt=no; \
38882 - sane_makeflags=$$MAKEFLAGS; \
38883 - if $(am__is_gnu_make); then \
38884 - sane_makeflags=$$MFLAGS; \
38885 - else \
38886 - case $$MAKEFLAGS in \
38887 - *\\[\ \ ]*) \
38888 - bs=\\; \
38889 - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
38890 - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
38891 - esac; \
38892 - fi; \
38893 - skip_next=no; \
38894 - strip_trailopt () \
38895 - { \
38896 - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
38897 - }; \
38898 - for flg in $$sane_makeflags; do \
38899 - test $$skip_next = yes && { skip_next=no; continue; }; \
38900 - case $$flg in \
38901 - *=*|--*) continue;; \
38902 - -*I) strip_trailopt 'I'; skip_next=yes;; \
38903 - -*I?*) strip_trailopt 'I';; \
38904 - -*O) strip_trailopt 'O'; skip_next=yes;; \
38905 - -*O?*) strip_trailopt 'O';; \
38906 - -*l) strip_trailopt 'l'; skip_next=yes;; \
38907 - -*l?*) strip_trailopt 'l';; \
38908 - -[dEDm]) skip_next=yes;; \
38909 - -[JT]) skip_next=yes;; \
38910 - esac; \
38911 - case $$flg in \
38912 - *$$target_option*) has_opt=yes; break;; \
38913 - esac; \
38914 - done; \
38915 - test $$has_opt = yes
38916 -am__make_dryrun = (target_option=n; $(am__make_running_with_option))
38917 -am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
38918 -pkgdatadir = $(datadir)/@PACKAGE@
38919 -pkgincludedir = $(includedir)/@PACKAGE@
38920 -pkglibdir = $(libdir)/@PACKAGE@
38921 -pkglibexecdir = $(libexecdir)/@PACKAGE@
38922 -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
38923 -install_sh_DATA = $(install_sh) -c -m 644
38924 -install_sh_PROGRAM = $(install_sh) -c
38925 -install_sh_SCRIPT = $(install_sh) -c
38926 -INSTALL_HEADER = $(INSTALL_DATA)
38927 -transform = $(program_transform_name)
38928 -NORMAL_INSTALL = :
38929 -PRE_INSTALL = :
38930 -POST_INSTALL = :
38931 -NORMAL_UNINSTALL = :
38932 -PRE_UNINSTALL = :
38933 -POST_UNINSTALL = :
38934 -build_triplet = @build@
38935 -host_triplet = @host@
38936 -subdir = swig/vipsCC
38937 -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
38938 - $(top_srcdir)/depcomp $(vipscc_PYTHON) \
38939 - $(top_srcdir)/py-compile
38940 -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
38941 -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
38942 - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \
38943 - $(top_srcdir)/configure.ac
38944 -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
38945 - $(ACLOCAL_M4)
38946 -mkinstalldirs = $(install_sh) -d
38947 -CONFIG_HEADER = $(top_builddir)/config.h
38948 -CONFIG_CLEAN_FILES =
38949 -CONFIG_CLEAN_VPATH_FILES =
38950 -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
38951 -am__vpath_adj = case $$p in \
38952 - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
38953 - *) f=$$p;; \
38954 - esac;
38955 -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
38956 -am__install_max = 40
38957 -am__nobase_strip_setup = \
38958 - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
38959 -am__nobase_strip = \
38960 - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
38961 -am__nobase_list = $(am__nobase_strip_setup); \
38962 - for p in $$list; do echo "$$p $$p"; done | \
38963 - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
38964 - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
38965 - if (++n[$$2] == $(am__install_max)) \
38966 - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
38967 - END { for (dir in files) print dir, files[dir] }'
38968 -am__base_list = \
38969 - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
38970 - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
38971 -am__uninstall_files_from_dir = { \
38972 - test -z "$$files" \
38973 - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
38974 - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
38975 - $(am__cd) "$$dir" && rm -f $$files; }; \
38976 - }
38977 -am__installdirs = "$(DESTDIR)$(vipsccdir)" "$(DESTDIR)$(vipsccdir)"
38978 -LTLIBRARIES = $(vipscc_LTLIBRARIES)
38979 -am__DEPENDENCIES_1 =
38980 -vdisplaymodule_la_DEPENDENCIES = ../../libvipsCC/libvipsCC.la \
38981 - $(am__DEPENDENCIES_1)
38982 -nodist_vdisplaymodule_la_OBJECTS = vdisplaymodule.lo
38983 -vdisplaymodule_la_OBJECTS = $(nodist_vdisplaymodule_la_OBJECTS)
38984 -AM_V_lt = $(am__v_lt_@AM_V@)
38985 -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
38986 -am__v_lt_0 = --silent
38987 -am__v_lt_1 =
38988 -vdisplaymodule_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
38989 - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
38990 - $(AM_CXXFLAGS) $(CXXFLAGS) $(vdisplaymodule_la_LDFLAGS) \
38991 - $(LDFLAGS) -o $@
38992 -verrormodule_la_DEPENDENCIES = ../../libvipsCC/libvipsCC.la \
38993 - $(am__DEPENDENCIES_1)
38994 -nodist_verrormodule_la_OBJECTS = verrormodule.lo
38995 -verrormodule_la_OBJECTS = $(nodist_verrormodule_la_OBJECTS)
38996 -verrormodule_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
38997 - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
38998 - $(AM_CXXFLAGS) $(CXXFLAGS) $(verrormodule_la_LDFLAGS) \
38999 - $(LDFLAGS) -o $@
39000 -vimagemodule_la_DEPENDENCIES = ../../libvipsCC/libvipsCC.la \
39001 - ../../libvips/libvips.la $(am__DEPENDENCIES_1)
39002 -nodist_vimagemodule_la_OBJECTS = vimagemodule.lo
39003 -vimagemodule_la_OBJECTS = $(nodist_vimagemodule_la_OBJECTS)
39004 -vimagemodule_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
39005 - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
39006 - $(AM_CXXFLAGS) $(CXXFLAGS) $(vimagemodule_la_LDFLAGS) \
39007 - $(LDFLAGS) -o $@
39008 -vmaskmodule_la_DEPENDENCIES = ../../libvipsCC/libvipsCC.la \
39009 - $(am__DEPENDENCIES_1)
39010 -nodist_vmaskmodule_la_OBJECTS = vmaskmodule.lo
39011 -vmaskmodule_la_OBJECTS = $(nodist_vmaskmodule_la_OBJECTS)
39012 -vmaskmodule_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
39013 - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
39014 - $(AM_CXXFLAGS) $(CXXFLAGS) $(vmaskmodule_la_LDFLAGS) \
39015 - $(LDFLAGS) -o $@
39016 -AM_V_P = $(am__v_P_@AM_V@)
39017 -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
39018 -am__v_P_0 = false
39019 -am__v_P_1 = :
39020 -AM_V_GEN = $(am__v_GEN_@AM_V@)
39021 -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
39022 -am__v_GEN_0 = @echo " GEN " $@;
39023 -am__v_GEN_1 =
39024 -AM_V_at = $(am__v_at_@AM_V@)
39025 -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
39026 -am__v_at_0 = @
39027 -am__v_at_1 =
39028 -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
39029 -depcomp = $(SHELL) $(top_srcdir)/depcomp
39030 -am__depfiles_maybe = depfiles
39031 -am__mv = mv -f
39032 -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
39033 - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
39034 -LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
39035 - $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
39036 - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
39037 - $(AM_CXXFLAGS) $(CXXFLAGS)
39038 -AM_V_CXX = $(am__v_CXX_@AM_V@)
39039 -am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
39040 -am__v_CXX_0 = @echo " CXX " $@;
39041 -am__v_CXX_1 =
39042 -CXXLD = $(CXX)
39043 -CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
39044 - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
39045 - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
39046 -AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
39047 -am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
39048 -am__v_CXXLD_0 = @echo " CXXLD " $@;
39049 -am__v_CXXLD_1 =
39050 -SOURCES = $(nodist_vdisplaymodule_la_SOURCES) \
39051 - $(nodist_verrormodule_la_SOURCES) \
39052 - $(nodist_vimagemodule_la_SOURCES) \
39053 - $(nodist_vmaskmodule_la_SOURCES)
39054 -DIST_SOURCES =
39055 -am__can_run_installinfo = \
39056 - case $$AM_UPDATE_INFO_DIR in \
39057 - n|no|NO) false;; \
39058 - *) (install-info --version) >/dev/null 2>&1;; \
39059 - esac
39060 -am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile)
39061 -am__pep3147_tweak = \
39062 - sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.py|'
39063 -py_compile = $(top_srcdir)/py-compile
39064 -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
39065 -# Read a list of newline-separated strings from the standard input,
39066 -# and print each of them once, without duplicates. Input order is
39067 -# *not* preserved.
39068 -am__uniquify_input = $(AWK) '\
39069 - BEGIN { nonempty = 0; } \
39070 - { items[$$0] = 1; nonempty = 1; } \
39071 - END { if (nonempty) { for (i in items) print i; }; } \
39072 -'
39073 -# Make sure the list of sources is unique. This is necessary because,
39074 -# e.g., the same source file might be shared among _SOURCES variables
39075 -# for different programs/libraries.
39076 -am__define_uniq_tagged_files = \
39077 - list='$(am__tagged_files)'; \
39078 - unique=`for i in $$list; do \
39079 - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
39080 - done | $(am__uniquify_input)`
39081 -ETAGS = etags
39082 -CTAGS = ctags
39083 -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
39084 -ACLOCAL = @ACLOCAL@
39085 -AMTAR = @AMTAR@
39086 -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
39087 -AR = @AR@
39088 -AS = @AS@
39089 -AUTOCONF = @AUTOCONF@
39090 -AUTOHEADER = @AUTOHEADER@
39091 -AUTOMAKE = @AUTOMAKE@
39092 -AWK = @AWK@
39093 -CATALOGS = @CATALOGS@
39094 -CATOBJEXT = @CATOBJEXT@
39095 -CC = @CC@
39096 -CCDEPMODE = @CCDEPMODE@
39097 -CFITSIO_CFLAGS = @CFITSIO_CFLAGS@
39098 -CFITSIO_LIBS = @CFITSIO_LIBS@
39099 -CFLAGS = @CFLAGS@
39100 -CPP = @CPP@
39101 -CPPFLAGS = @CPPFLAGS@
39102 -CXX = @CXX@
39103 -CXXCPP = @CXXCPP@
39104 -CXXDEPMODE = @CXXDEPMODE@
39105 -CXXFLAGS = @CXXFLAGS@
39106 -CYGPATH_W = @CYGPATH_W@
39107 -DATADIRNAME = @DATADIRNAME@
39108 -DEFS = @DEFS@
39109 -DEPDIR = @DEPDIR@
39110 -DLLTOOL = @DLLTOOL@
39111 -DLLWRAP = @DLLWRAP@
39112 -DSYMUTIL = @DSYMUTIL@
39113 -DUMPBIN = @DUMPBIN@
39114 -ECHO_C = @ECHO_C@
39115 -ECHO_N = @ECHO_N@
39116 -ECHO_T = @ECHO_T@
39117 -EGREP = @EGREP@
39118 -EXEEXT = @EXEEXT@
39119 -EXIF_CFLAGS = @EXIF_CFLAGS@
39120 -EXIF_LIBS = @EXIF_LIBS@
39121 -FFTW_CFLAGS = @FFTW_CFLAGS@
39122 -FFTW_LIBS = @FFTW_LIBS@
39123 -FGREP = @FGREP@
39124 -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
39125 -GMOFILES = @GMOFILES@
39126 -GMSGFMT = @GMSGFMT@
39127 -GREP = @GREP@
39128 -GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
39129 -GTHREAD_LIBS = @GTHREAD_LIBS@
39130 -GTKDOC_CHECK = @GTKDOC_CHECK@
39131 -GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
39132 -GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
39133 -GTKDOC_MKPDF = @GTKDOC_MKPDF@
39134 -GTKDOC_REBASE = @GTKDOC_REBASE@
39135 -HTML_DIR = @HTML_DIR@
39136 -IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@
39137 -IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@
39138 -INSTALL = @INSTALL@
39139 -INSTALL_DATA = @INSTALL_DATA@
39140 -INSTALL_PROGRAM = @INSTALL_PROGRAM@
39141 -INSTALL_SCRIPT = @INSTALL_SCRIPT@
39142 -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
39143 -INSTOBJEXT = @INSTOBJEXT@
39144 -INTLLIBS = @INTLLIBS@
39145 -INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
39146 -INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
39147 -INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
39148 -INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
39149 -INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
39150 -INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
39151 -INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
39152 -INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
39153 -JPEG_INCLUDES = @JPEG_INCLUDES@
39154 -JPEG_LIBS = @JPEG_LIBS@
39155 -LCMS_CFLAGS = @LCMS_CFLAGS@
39156 -LCMS_LIBS = @LCMS_LIBS@
39157 -LD = @LD@
39158 -LDFLAGS = @LDFLAGS@
39159 -LIBOBJS = @LIBOBJS@
39160 -LIBRARY_AGE = @LIBRARY_AGE@
39161 -LIBRARY_CURRENT = @LIBRARY_CURRENT@
39162 -LIBRARY_REVISION = @LIBRARY_REVISION@
39163 -LIBS = @LIBS@
39164 -LIBTOOL = @LIBTOOL@
39165 -LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@
39166 -LIBWEBP_LIBS = @LIBWEBP_LIBS@
39167 -LIPO = @LIPO@
39168 -LN_S = @LN_S@
39169 -LTLIBOBJS = @LTLIBOBJS@
39170 -MAGICK_CFLAGS = @MAGICK_CFLAGS@
39171 -MAGICK_LIBS = @MAGICK_LIBS@
39172 -MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@
39173 -MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@
39174 -MAKEINFO = @MAKEINFO@
39175 -MANIFEST_TOOL = @MANIFEST_TOOL@
39176 -MATIO_CFLAGS = @MATIO_CFLAGS@
39177 -MATIO_LIBS = @MATIO_LIBS@
39178 -MKDIR_P = @MKDIR_P@
39179 -MKINSTALLDIRS = @MKINSTALLDIRS@
39180 -MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@
39181 -MONOTONIC_LIBS = @MONOTONIC_LIBS@
39182 -MSGFMT = @MSGFMT@
39183 -MSGFMT_OPTS = @MSGFMT_OPTS@
39184 -NM = @NM@
39185 -NMEDIT = @NMEDIT@
39186 -OBJDUMP = @OBJDUMP@
39187 -OBJEXT = @OBJEXT@
39188 -OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
39189 -OPENEXR_LIBS = @OPENEXR_LIBS@
39190 -OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@
39191 -OPENSLIDE_LIBS = @OPENSLIDE_LIBS@
39192 -ORC_CFLAGS = @ORC_CFLAGS@
39193 -ORC_LIBS = @ORC_LIBS@
39194 -OTOOL = @OTOOL@
39195 -OTOOL64 = @OTOOL64@
39196 -PACKAGE = @PACKAGE@
39197 -PACKAGES_USED = @PACKAGES_USED@
39198 -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
39199 -PACKAGE_NAME = @PACKAGE_NAME@
39200 -PACKAGE_STRING = @PACKAGE_STRING@
39201 -PACKAGE_TARNAME = @PACKAGE_TARNAME@
39202 -PACKAGE_URL = @PACKAGE_URL@
39203 -PACKAGE_VERSION = @PACKAGE_VERSION@
39204 -PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
39205 -PANGOFT2_LIBS = @PANGOFT2_LIBS@
39206 -PATH_SEPARATOR = @PATH_SEPARATOR@
39207 -PKG_CONFIG = @PKG_CONFIG@
39208 -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
39209 -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
39210 -PNG_CFLAGS = @PNG_CFLAGS@
39211 -PNG_INCLUDES = @PNG_INCLUDES@
39212 -PNG_LIBS = @PNG_LIBS@
39213 -POFILES = @POFILES@
39214 -POSUB = @POSUB@
39215 -PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
39216 -PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
39217 -PYTHON = @PYTHON@
39218 -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
39219 -PYTHON_INCLUDES = @PYTHON_INCLUDES@
39220 -PYTHON_PLATFORM = @PYTHON_PLATFORM@
39221 -PYTHON_PREFIX = @PYTHON_PREFIX@
39222 -PYTHON_VERSION = @PYTHON_VERSION@
39223 -RANLIB = @RANLIB@
39224 -REQUIRED_CFLAGS = @REQUIRED_CFLAGS@
39225 -REQUIRED_LIBS = @REQUIRED_LIBS@
39226 -SED = @SED@
39227 -SET_MAKE = @SET_MAKE@
39228 -SHELL = @SHELL@
39229 -STRIP = @STRIP@
39230 -THREADS_CFLAGS = @THREADS_CFLAGS@
39231 -THREADS_LIBS = @THREADS_LIBS@
39232 -TIFF_CFLAGS = @TIFF_CFLAGS@
39233 -TIFF_INCLUDES = @TIFF_INCLUDES@
39234 -TIFF_LIBS = @TIFF_LIBS@
39235 -TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@
39236 -TYPE_INIT_LIBS = @TYPE_INIT_LIBS@
39237 -USE_NLS = @USE_NLS@
39238 -VERSION = @VERSION@
39239 -VIPS_CFLAGS = @VIPS_CFLAGS@
39240 -VIPS_CXX_LIBS = @VIPS_CXX_LIBS@
39241 -VIPS_EXEEXT = @VIPS_EXEEXT@
39242 -VIPS_INCLUDES = @VIPS_INCLUDES@
39243 -VIPS_LIBDIR = @VIPS_LIBDIR@
39244 -VIPS_LIBS = @VIPS_LIBS@
39245 -VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@
39246 -VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@
39247 -VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@
39248 -VIPS_VERSION = @VIPS_VERSION@
39249 -VIPS_VERSION_STRING = @VIPS_VERSION_STRING@
39250 -XGETTEXT = @XGETTEXT@
39251 -XMKMF = @XMKMF@
39252 -X_CFLAGS = @X_CFLAGS@
39253 -X_EXTRA_LIBS = @X_EXTRA_LIBS@
39254 -X_LIBS = @X_LIBS@
39255 -X_PRE_LIBS = @X_PRE_LIBS@
39256 -ZIP_INCLUDES = @ZIP_INCLUDES@
39257 -ZIP_LIBS = @ZIP_LIBS@
39258 -abs_builddir = @abs_builddir@
39259 -abs_srcdir = @abs_srcdir@
39260 -abs_top_builddir = @abs_top_builddir@
39261 -abs_top_srcdir = @abs_top_srcdir@
39262 -ac_ct_AR = @ac_ct_AR@
39263 -ac_ct_CC = @ac_ct_CC@
39264 -ac_ct_CXX = @ac_ct_CXX@
39265 -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
39266 -am__include = @am__include@
39267 -am__leading_dot = @am__leading_dot@
39268 -am__quote = @am__quote@
39269 -am__tar = @am__tar@
39270 -am__untar = @am__untar@
39271 -bindir = @bindir@
39272 -build = @build@
39273 -build_alias = @build_alias@
39274 -build_cpu = @build_cpu@
39275 -build_os = @build_os@
39276 -build_vendor = @build_vendor@
39277 -builddir = @builddir@
39278 -datadir = @datadir@
39279 -datarootdir = @datarootdir@
39280 -docdir = @docdir@
39281 -dvidir = @dvidir@
39282 -exec_prefix = @exec_prefix@
39283 -host = @host@
39284 -host_alias = @host_alias@
39285 -host_cpu = @host_cpu@
39286 -host_os = @host_os@
39287 -host_vendor = @host_vendor@
39288 -htmldir = @htmldir@
39289 -includedir = @includedir@
39290 -infodir = @infodir@
39291 -install_sh = @install_sh@
39292 -libdir = @libdir@
39293 -libexecdir = @libexecdir@
39294 -localedir = @localedir@
39295 -localstatedir = @localstatedir@
39296 -mandir = @mandir@
39297 -mkdir_p = @mkdir_p@
39298 -oldincludedir = @oldincludedir@
39299 -pdfdir = @pdfdir@
39300 -pkgpyexecdir = @pkgpyexecdir@
39301 -pkgpythondir = @pkgpythondir@
39302 -prefix = @prefix@
39303 -program_transform_name = @program_transform_name@
39304 -psdir = @psdir@
39305 -pyexecdir = @pyexecdir@
39306 -pythondir = @pythondir@
39307 -sbindir = @sbindir@
39308 -sharedstatedir = @sharedstatedir@
39309 -srcdir = @srcdir@
39310 -sysconfdir = @sysconfdir@
39311 -target_alias = @target_alias@
39312 -top_build_prefix = @top_build_prefix@
39313 -top_builddir = @top_builddir@
39314 -top_srcdir = @top_srcdir@
39315 -vips_introspection_sources = @vips_introspection_sources@
39316 -
39317 -# Let make substitute the value of PYTHON_INCLUDES rather than auto*
39318 -# this makes it easier to support multiple python installs
39319 -AM_CPPFLAGS = \
39320 - -I${top_srcdir}/libvips/include \
39321 - -I${top_srcdir}/libvipsCC/include \
39322 - @VIPS_CFLAGS@ \
39323 - @VIPS_INCLUDES@ \
39324 - $(PYTHON_INCLUDES)
39325 -
39326 -
39327 -# we install to a directory inside the python area, since we are a module
39328 -vipsccdir = $(pyexecdir)/vipsCC
39329 -vipscc_PYTHON = VImage.py VDisplay.py VError.py VMask.py __init__.py
39330 -vipscc_LTLIBRARIES = vimagemodule.la vdisplaymodule.la verrormodule.la vmaskmodule.la
39331 -
39332 -# maybe there's a clever way to avoid repeating the link stuff 4 times
39333 -# vimagemodule uses the C API as well, so it needs libvips too
39334 -vimagemodule_la_LDFLAGS = -module -avoid-version
39335 -vimagemodule_la_LIBADD = ../../libvipsCC/libvipsCC.la ../../libvips/libvips.la $(VIPS_LIBS)
39336 -nodist_vimagemodule_la_SOURCES = vimagemodule.cxx
39337 -vdisplaymodule_la_LDFLAGS = -module -avoid-version
39338 -vdisplaymodule_la_LIBADD = ../../libvipsCC/libvipsCC.la $(VIPS_LIBS)
39339 -nodist_vdisplaymodule_la_SOURCES = vdisplaymodule.cxx
39340 -verrormodule_la_LDFLAGS = -module -avoid-version
39341 -verrormodule_la_LIBADD = ../../libvipsCC/libvipsCC.la $(VIPS_LIBS)
39342 -nodist_verrormodule_la_SOURCES = verrormodule.cxx
39343 -vmaskmodule_la_LDFLAGS = -module -avoid-version
39344 -vmaskmodule_la_LIBADD = ../../libvipsCC/libvipsCC.la $(VIPS_LIBS)
39345 -nodist_vmaskmodule_la_SOURCES = vmaskmodule.cxx
39346 -CLEANFILES = VImage.h
39347 -EXTRA_DIST = \
39348 - VImage.i VDisplay.i VError.i VMask.i __init__.py \
39349 - vimagemodule.cxx \
39350 - verrormodule.cxx vdisplaymodule.cxx vmaskmodule.cxx \
39351 - VImage.py VDisplay.py VError.py VMask.py
39352 -
39353 -all: all-am
39354 -
39355 -.SUFFIXES:
39356 -.SUFFIXES: .cxx .lo .o .obj
39357 -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
39358 - @for dep in $?; do \
39359 - case '$(am__configure_deps)' in \
39360 - *$$dep*) \
39361 - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
39362 - && { if test -f $@; then exit 0; else break; fi; }; \
39363 - exit 1;; \
39364 - esac; \
39365 - done; \
39366 - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign swig/vipsCC/Makefile'; \
39367 - $(am__cd) $(top_srcdir) && \
39368 - $(AUTOMAKE) --foreign swig/vipsCC/Makefile
39369 -.PRECIOUS: Makefile
39370 -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
39371 - @case '$?' in \
39372 - *config.status*) \
39373 - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
39374 - *) \
39375 - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
39376 - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
39377 - esac;
39378 -
39379 -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
39380 - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
39381 -
39382 -$(top_srcdir)/configure: $(am__configure_deps)
39383 - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
39384 -$(ACLOCAL_M4): $(am__aclocal_m4_deps)
39385 - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
39386 -$(am__aclocal_m4_deps):
39387 -
39388 -install-vipsccLTLIBRARIES: $(vipscc_LTLIBRARIES)
39389 - @$(NORMAL_INSTALL)
39390 - @list='$(vipscc_LTLIBRARIES)'; test -n "$(vipsccdir)" || list=; \
39391 - list2=; for p in $$list; do \
39392 - if test -f $$p; then \
39393 - list2="$$list2 $$p"; \
39394 - else :; fi; \
39395 - done; \
39396 - test -z "$$list2" || { \
39397 - echo " $(MKDIR_P) '$(DESTDIR)$(vipsccdir)'"; \
39398 - $(MKDIR_P) "$(DESTDIR)$(vipsccdir)" || exit 1; \
39399 - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(vipsccdir)'"; \
39400 - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(vipsccdir)"; \
39401 - }
39402 -
39403 -uninstall-vipsccLTLIBRARIES:
39404 - @$(NORMAL_UNINSTALL)
39405 - @list='$(vipscc_LTLIBRARIES)'; test -n "$(vipsccdir)" || list=; \
39406 - for p in $$list; do \
39407 - $(am__strip_dir) \
39408 - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(vipsccdir)/$$f'"; \
39409 - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(vipsccdir)/$$f"; \
39410 - done
39411 -
39412 -clean-vipsccLTLIBRARIES:
39413 - -test -z "$(vipscc_LTLIBRARIES)" || rm -f $(vipscc_LTLIBRARIES)
39414 - @list='$(vipscc_LTLIBRARIES)'; \
39415 - locs=`for p in $$list; do echo $$p; done | \
39416 - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
39417 - sort -u`; \
39418 - test -z "$$locs" || { \
39419 - echo rm -f $${locs}; \
39420 - rm -f $${locs}; \
39421 - }
39422 -
39423 -vdisplaymodule.la: $(vdisplaymodule_la_OBJECTS) $(vdisplaymodule_la_DEPENDENCIES) $(EXTRA_vdisplaymodule_la_DEPENDENCIES)
39424 - $(AM_V_CXXLD)$(vdisplaymodule_la_LINK) -rpath $(vipsccdir) $(vdisplaymodule_la_OBJECTS) $(vdisplaymodule_la_LIBADD) $(LIBS)
39425 -
39426 -verrormodule.la: $(verrormodule_la_OBJECTS) $(verrormodule_la_DEPENDENCIES) $(EXTRA_verrormodule_la_DEPENDENCIES)
39427 - $(AM_V_CXXLD)$(verrormodule_la_LINK) -rpath $(vipsccdir) $(verrormodule_la_OBJECTS) $(verrormodule_la_LIBADD) $(LIBS)
39428 -
39429 -vimagemodule.la: $(vimagemodule_la_OBJECTS) $(vimagemodule_la_DEPENDENCIES) $(EXTRA_vimagemodule_la_DEPENDENCIES)
39430 - $(AM_V_CXXLD)$(vimagemodule_la_LINK) -rpath $(vipsccdir) $(vimagemodule_la_OBJECTS) $(vimagemodule_la_LIBADD) $(LIBS)
39431 -
39432 -vmaskmodule.la: $(vmaskmodule_la_OBJECTS) $(vmaskmodule_la_DEPENDENCIES) $(EXTRA_vmaskmodule_la_DEPENDENCIES)
39433 - $(AM_V_CXXLD)$(vmaskmodule_la_LINK) -rpath $(vipsccdir) $(vmaskmodule_la_OBJECTS) $(vmaskmodule_la_LIBADD) $(LIBS)
39434 -
39435 -mostlyclean-compile:
39436 - -rm -f *.$(OBJEXT)
39437 -
39438 -distclean-compile:
39439 - -rm -f *.tab.c
39440 -
39441 -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vdisplaymodule.Plo@am__quote@
39442 -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verrormodule.Plo@am__quote@
39443 -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vimagemodule.Plo@am__quote@
39444 -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmaskmodule.Plo@am__quote@
39445 -
39446 -.cxx.o:
39447 -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
39448 -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
39449 -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
39450 -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
39451 -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
39452 -
39453 -.cxx.obj:
39454 -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
39455 -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
39456 -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
39457 -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
39458 -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
39459 -
39460 -.cxx.lo:
39461 -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
39462 -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
39463 -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
39464 -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
39465 -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
39466 -
39467 -mostlyclean-libtool:
39468 - -rm -f *.lo
39469 -
39470 -clean-libtool:
39471 - -rm -rf .libs _libs
39472 -install-vipsccPYTHON: $(vipscc_PYTHON)
39473 - @$(NORMAL_INSTALL)
39474 - @list='$(vipscc_PYTHON)'; dlist=; list2=; test -n "$(vipsccdir)" || list=; \
39475 - if test -n "$$list"; then \
39476 - echo " $(MKDIR_P) '$(DESTDIR)$(vipsccdir)'"; \
39477 - $(MKDIR_P) "$(DESTDIR)$(vipsccdir)" || exit 1; \
39478 - fi; \
39479 - for p in $$list; do \
39480 - if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
39481 - if test -f $$b$$p; then \
39482 - $(am__strip_dir) \
39483 - dlist="$$dlist $$f"; \
39484 - list2="$$list2 $$b$$p"; \
39485 - else :; fi; \
39486 - done; \
39487 - for file in $$list2; do echo $$file; done | $(am__base_list) | \
39488 - while read files; do \
39489 - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(vipsccdir)'"; \
39490 - $(INSTALL_DATA) $$files "$(DESTDIR)$(vipsccdir)" || exit $$?; \
39491 - done || exit $$?; \
39492 - if test -n "$$dlist"; then \
39493 - $(am__py_compile) --destdir "$(DESTDIR)" \
39494 - --basedir "$(vipsccdir)" $$dlist; \
39495 - else :; fi
39496 -
39497 -uninstall-vipsccPYTHON:
39498 - @$(NORMAL_UNINSTALL)
39499 - @list='$(vipscc_PYTHON)'; test -n "$(vipsccdir)" || list=; \
39500 - py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
39501 - test -n "$$py_files" || exit 0; \
39502 - dir='$(DESTDIR)$(vipsccdir)'; \
39503 - pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \
39504 - pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \
39505 - py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \
39506 - echo "$$py_files_pep3147";\
39507 - pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \
39508 - pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \
39509 - st=0; \
39510 - for files in \
39511 - "$$py_files" \
39512 - "$$pyc_files" \
39513 - "$$pyo_files" \
39514 - "$$pyc_files_pep3147" \
39515 - "$$pyo_files_pep3147" \
39516 - ; do \
39517 - $(am__uninstall_files_from_dir) || st=$$?; \
39518 - done; \
39519 - exit $$st
39520 -
39521 -ID: $(am__tagged_files)
39522 - $(am__define_uniq_tagged_files); mkid -fID $$unique
39523 -tags: tags-am
39524 -TAGS: tags
39525 -
39526 -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
39527 - set x; \
39528 - here=`pwd`; \
39529 - $(am__define_uniq_tagged_files); \
39530 - shift; \
39531 - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
39532 - test -n "$$unique" || unique=$$empty_fix; \
39533 - if test $$# -gt 0; then \
39534 - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
39535 - "$$@" $$unique; \
39536 - else \
39537 - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
39538 - $$unique; \
39539 - fi; \
39540 - fi
39541 -ctags: ctags-am
39542 -
39543 -CTAGS: ctags
39544 -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
39545 - $(am__define_uniq_tagged_files); \
39546 - test -z "$(CTAGS_ARGS)$$unique" \
39547 - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
39548 - $$unique
39549 -
39550 -GTAGS:
39551 - here=`$(am__cd) $(top_builddir) && pwd` \
39552 - && $(am__cd) $(top_srcdir) \
39553 - && gtags -i $(GTAGS_ARGS) "$$here"
39554 -cscopelist: cscopelist-am
39555 -
39556 -cscopelist-am: $(am__tagged_files)
39557 - list='$(am__tagged_files)'; \
39558 - case "$(srcdir)" in \
39559 - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
39560 - *) sdir=$(subdir)/$(srcdir) ;; \
39561 - esac; \
39562 - for i in $$list; do \
39563 - if test -f "$$i"; then \
39564 - echo "$(subdir)/$$i"; \
39565 - else \
39566 - echo "$$sdir/$$i"; \
39567 - fi; \
39568 - done >> $(top_builddir)/cscope.files
39569 -
39570 -distclean-tags:
39571 - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
39572 -
39573 -distdir: $(DISTFILES)
39574 - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
39575 - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
39576 - list='$(DISTFILES)'; \
39577 - dist_files=`for file in $$list; do echo $$file; done | \
39578 - sed -e "s|^$$srcdirstrip/||;t" \
39579 - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
39580 - case $$dist_files in \
39581 - */*) $(MKDIR_P) `echo "$$dist_files" | \
39582 - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
39583 - sort -u` ;; \
39584 - esac; \
39585 - for file in $$dist_files; do \
39586 - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
39587 - if test -d $$d/$$file; then \
39588 - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
39589 - if test -d "$(distdir)/$$file"; then \
39590 - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
39591 - fi; \
39592 - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
39593 - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
39594 - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
39595 - fi; \
39596 - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
39597 - else \
39598 - test -f "$(distdir)/$$file" \
39599 - || cp -p $$d/$$file "$(distdir)/$$file" \
39600 - || exit 1; \
39601 - fi; \
39602 - done
39603 -check-am: all-am
39604 -check: check-am
39605 -all-am: Makefile $(LTLIBRARIES)
39606 -installdirs:
39607 - for dir in "$(DESTDIR)$(vipsccdir)" "$(DESTDIR)$(vipsccdir)"; do \
39608 - test -z "$$dir" || $(MKDIR_P) "$$dir"; \
39609 - done
39610 -install: install-am
39611 -install-exec: install-exec-am
39612 -install-data: install-data-am
39613 -uninstall: uninstall-am
39614 -
39615 -install-am: all-am
39616 - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
39617 -
39618 -installcheck: installcheck-am
39619 -install-strip:
39620 - if test -z '$(STRIP)'; then \
39621 - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
39622 - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
39623 - install; \
39624 - else \
39625 - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
39626 - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
39627 - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
39628 - fi
39629 -mostlyclean-generic:
39630 -
39631 -clean-generic:
39632 - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
39633 -
39634 -distclean-generic:
39635 - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
39636 - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
39637 -
39638 -maintainer-clean-generic:
39639 - @echo "This command is intended for maintainers to use"
39640 - @echo "it deletes files that may require special tools to rebuild."
39641 -clean: clean-am
39642 -
39643 -clean-am: clean-generic clean-libtool clean-vipsccLTLIBRARIES \
39644 - mostlyclean-am
39645 -
39646 -distclean: distclean-am
39647 - -rm -rf ./$(DEPDIR)
39648 - -rm -f Makefile
39649 -distclean-am: clean-am distclean-compile distclean-generic \
39650 - distclean-tags
39651 -
39652 -dvi: dvi-am
39653 -
39654 -dvi-am:
39655 -
39656 -html: html-am
39657 -
39658 -html-am:
39659 -
39660 -info: info-am
39661 -
39662 -info-am:
39663 -
39664 -install-data-am: install-vipsccLTLIBRARIES install-vipsccPYTHON
39665 -
39666 -install-dvi: install-dvi-am
39667 -
39668 -install-dvi-am:
39669 -
39670 -install-exec-am:
39671 -
39672 -install-html: install-html-am
39673 -
39674 -install-html-am:
39675 -
39676 -install-info: install-info-am
39677 -
39678 -install-info-am:
39679 -
39680 -install-man:
39681 -
39682 -install-pdf: install-pdf-am
39683 -
39684 -install-pdf-am:
39685 -
39686 -install-ps: install-ps-am
39687 -
39688 -install-ps-am:
39689 -
39690 -installcheck-am:
39691 -
39692 -maintainer-clean: maintainer-clean-am
39693 - -rm -rf ./$(DEPDIR)
39694 - -rm -f Makefile
39695 -maintainer-clean-am: distclean-am maintainer-clean-generic
39696 -
39697 -mostlyclean: mostlyclean-am
39698 -
39699 -mostlyclean-am: mostlyclean-compile mostlyclean-generic \
39700 - mostlyclean-libtool
39701 -
39702 -pdf: pdf-am
39703 -
39704 -pdf-am:
39705 -
39706 -ps: ps-am
39707 -
39708 -ps-am:
39709 -
39710 -uninstall-am: uninstall-vipsccLTLIBRARIES uninstall-vipsccPYTHON
39711 -
39712 -.MAKE: install-am install-strip
39713 -
39714 -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
39715 - clean-libtool clean-vipsccLTLIBRARIES cscopelist-am ctags \
39716 - ctags-am distclean distclean-compile distclean-generic \
39717 - distclean-libtool distclean-tags distdir dvi dvi-am html \
39718 - html-am info info-am install install-am install-data \
39719 - install-data-am install-dvi install-dvi-am install-exec \
39720 - install-exec-am install-html install-html-am install-info \
39721 - install-info-am install-man install-pdf install-pdf-am \
39722 - install-ps install-ps-am install-strip \
39723 - install-vipsccLTLIBRARIES install-vipsccPYTHON installcheck \
39724 - installcheck-am installdirs maintainer-clean \
39725 - maintainer-clean-generic mostlyclean mostlyclean-compile \
39726 - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
39727 - tags tags-am uninstall uninstall-am \
39728 - uninstall-vipsccLTLIBRARIES uninstall-vipsccPYTHON
39729 -
39730 -
39731 -# I tried making a suffix rule for this (and defining SUFFIXES) but I couldn't
39732 -# get it to work, how annoying
39733 -# FIXME at some point
39734 -#
39735 -# need an expanded VImage.h ... SWIG's preprocessor b0rks on includes inside
39736 -# class definitions
39737 -vimagemodule.cxx: VImage.i
39738 - cpp -DSWIG -E $(top_srcdir)/libvipsCC/include/vips/VImage.h > VImage.h
39739 - swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $<
39740 -
39741 -vdisplaymodule.cxx: VDisplay.i
39742 - swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $<
39743 -verrormodule.cxx: VError.i
39744 - swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $<
39745 -vmaskmodule.cxx: VMask.i
39746 - swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $<
39747 -
39748 -# Tell versions [3.59,3.63) of GNU make to not export all variables.
39749 -# Otherwise a system limit (for SysV at least) may be exceeded.
39750 -.NOEXPORT:
39751 diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/VDisplay.i vips-7.38.5/swig/vipsCC/VDisplay.i
39752 --- vips-7.38.5-vanilla/swig/vipsCC/VDisplay.i 2014-07-17 23:48:36.208794473 -0400
39753 +++ vips-7.38.5/swig/vipsCC/VDisplay.i 1969-12-31 19:00:00.000000000 -0500
39754 @@ -1,15 +0,0 @@
39755 -/* SWIG interface file for VDisplay.
39756 - */
39757 -
39758 -%module VDisplay
39759 -%{
39760 -#include <vips/vipscpp.h>
39761 -%}
39762 -
39763 -%import "VError.i"
39764 -
39765 -/* Need to override assignment to get refcounting working.
39766 - */
39767 -%rename(__assign__) *::operator=;
39768 -
39769 -%include vips/VDisplay.h
39770 diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/vdisplaymodule.cxx vips-7.38.5/swig/vipsCC/vdisplaymodule.cxx
39771 --- vips-7.38.5-vanilla/swig/vipsCC/vdisplaymodule.cxx 2014-07-17 23:48:36.211794473 -0400
39772 +++ vips-7.38.5/swig/vipsCC/vdisplaymodule.cxx 1969-12-31 19:00:00.000000000 -0500
39773 @@ -1,4117 +0,0 @@
39774 -/* ----------------------------------------------------------------------------
39775 - * This file was automatically generated by SWIG (http://www.swig.org).
39776 - * Version 2.0.10
39777 - *
39778 - * This file is not intended to be easily readable and contains a number of
39779 - * coding conventions designed to improve portability and efficiency. Do not make
39780 - * changes to this file unless you know what you are doing--modify the SWIG
39781 - * interface file instead.
39782 - * ----------------------------------------------------------------------------- */
39783 -
39784 -#define SWIGPYTHON
39785 -#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
39786 -
39787 -
39788 -#ifdef __cplusplus
39789 -/* SwigValueWrapper is described in swig.swg */
39790 -template<typename T> class SwigValueWrapper {
39791 - struct SwigMovePointer {
39792 - T *ptr;
39793 - SwigMovePointer(T *p) : ptr(p) { }
39794 - ~SwigMovePointer() { delete ptr; }
39795 - SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
39796 - } pointer;
39797 - SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
39798 - SwigValueWrapper(const SwigValueWrapper<T>& rhs);
39799 -public:
39800 - SwigValueWrapper() : pointer(0) { }
39801 - SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
39802 - operator T&() const { return *pointer.ptr; }
39803 - T *operator&() { return pointer.ptr; }
39804 -};
39805 -
39806 -template <typename T> T SwigValueInit() {
39807 - return T();
39808 -}
39809 -#endif
39810 -
39811 -/* -----------------------------------------------------------------------------
39812 - * This section contains generic SWIG labels for method/variable
39813 - * declarations/attributes, and other compiler dependent labels.
39814 - * ----------------------------------------------------------------------------- */
39815 -
39816 -/* template workaround for compilers that cannot correctly implement the C++ standard */
39817 -#ifndef SWIGTEMPLATEDISAMBIGUATOR
39818 -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
39819 -# define SWIGTEMPLATEDISAMBIGUATOR template
39820 -# elif defined(__HP_aCC)
39821 -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
39822 -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
39823 -# define SWIGTEMPLATEDISAMBIGUATOR template
39824 -# else
39825 -# define SWIGTEMPLATEDISAMBIGUATOR
39826 -# endif
39827 -#endif
39828 -
39829 -/* inline attribute */
39830 -#ifndef SWIGINLINE
39831 -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
39832 -# define SWIGINLINE inline
39833 -# else
39834 -# define SWIGINLINE
39835 -# endif
39836 -#endif
39837 -
39838 -/* attribute recognised by some compilers to avoid 'unused' warnings */
39839 -#ifndef SWIGUNUSED
39840 -# if defined(__GNUC__)
39841 -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
39842 -# define SWIGUNUSED __attribute__ ((__unused__))
39843 -# else
39844 -# define SWIGUNUSED
39845 -# endif
39846 -# elif defined(__ICC)
39847 -# define SWIGUNUSED __attribute__ ((__unused__))
39848 -# else
39849 -# define SWIGUNUSED
39850 -# endif
39851 -#endif
39852 -
39853 -#ifndef SWIG_MSC_UNSUPPRESS_4505
39854 -# if defined(_MSC_VER)
39855 -# pragma warning(disable : 4505) /* unreferenced local function has been removed */
39856 -# endif
39857 -#endif
39858 -
39859 -#ifndef SWIGUNUSEDPARM
39860 -# ifdef __cplusplus
39861 -# define SWIGUNUSEDPARM(p)
39862 -# else
39863 -# define SWIGUNUSEDPARM(p) p SWIGUNUSED
39864 -# endif
39865 -#endif
39866 -
39867 -/* internal SWIG method */
39868 -#ifndef SWIGINTERN
39869 -# define SWIGINTERN static SWIGUNUSED
39870 -#endif
39871 -
39872 -/* internal inline SWIG method */
39873 -#ifndef SWIGINTERNINLINE
39874 -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
39875 -#endif
39876 -
39877 -/* exporting methods */
39878 -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
39879 -# ifndef GCC_HASCLASSVISIBILITY
39880 -# define GCC_HASCLASSVISIBILITY
39881 -# endif
39882 -#endif
39883 -
39884 -#ifndef SWIGEXPORT
39885 -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
39886 -# if defined(STATIC_LINKED)
39887 -# define SWIGEXPORT
39888 -# else
39889 -# define SWIGEXPORT __declspec(dllexport)
39890 -# endif
39891 -# else
39892 -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
39893 -# define SWIGEXPORT __attribute__ ((visibility("default")))
39894 -# else
39895 -# define SWIGEXPORT
39896 -# endif
39897 -# endif
39898 -#endif
39899 -
39900 -/* calling conventions for Windows */
39901 -#ifndef SWIGSTDCALL
39902 -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
39903 -# define SWIGSTDCALL __stdcall
39904 -# else
39905 -# define SWIGSTDCALL
39906 -# endif
39907 -#endif
39908 -
39909 -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
39910 -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
39911 -# define _CRT_SECURE_NO_DEPRECATE
39912 -#endif
39913 -
39914 -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
39915 -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
39916 -# define _SCL_SECURE_NO_DEPRECATE
39917 -#endif
39918 -
39919 -
39920 -
39921 -/* Python.h has to appear first */
39922 -#include <Python.h>
39923 -
39924 -/* -----------------------------------------------------------------------------
39925 - * swigrun.swg
39926 - *
39927 - * This file contains generic C API SWIG runtime support for pointer
39928 - * type checking.
39929 - * ----------------------------------------------------------------------------- */
39930 -
39931 -/* This should only be incremented when either the layout of swig_type_info changes,
39932 - or for whatever reason, the runtime changes incompatibly */
39933 -#define SWIG_RUNTIME_VERSION "4"
39934 -
39935 -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
39936 -#ifdef SWIG_TYPE_TABLE
39937 -# define SWIG_QUOTE_STRING(x) #x
39938 -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
39939 -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
39940 -#else
39941 -# define SWIG_TYPE_TABLE_NAME
39942 -#endif
39943 -
39944 -/*
39945 - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
39946 - creating a static or dynamic library from the SWIG runtime code.
39947 - In 99.9% of the cases, SWIG just needs to declare them as 'static'.
39948 -
39949 - But only do this if strictly necessary, ie, if you have problems
39950 - with your compiler or suchlike.
39951 -*/
39952 -
39953 -#ifndef SWIGRUNTIME
39954 -# define SWIGRUNTIME SWIGINTERN
39955 -#endif
39956 -
39957 -#ifndef SWIGRUNTIMEINLINE
39958 -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
39959 -#endif
39960 -
39961 -/* Generic buffer size */
39962 -#ifndef SWIG_BUFFER_SIZE
39963 -# define SWIG_BUFFER_SIZE 1024
39964 -#endif
39965 -
39966 -/* Flags for pointer conversions */
39967 -#define SWIG_POINTER_DISOWN 0x1
39968 -#define SWIG_CAST_NEW_MEMORY 0x2
39969 -
39970 -/* Flags for new pointer objects */
39971 -#define SWIG_POINTER_OWN 0x1
39972 -
39973 -
39974 -/*
39975 - Flags/methods for returning states.
39976 -
39977 - The SWIG conversion methods, as ConvertPtr, return an integer
39978 - that tells if the conversion was successful or not. And if not,
39979 - an error code can be returned (see swigerrors.swg for the codes).
39980 -
39981 - Use the following macros/flags to set or process the returning
39982 - states.
39983 -
39984 - In old versions of SWIG, code such as the following was usually written:
39985 -
39986 - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
39987 - // success code
39988 - } else {
39989 - //fail code
39990 - }
39991 -
39992 - Now you can be more explicit:
39993 -
39994 - int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
39995 - if (SWIG_IsOK(res)) {
39996 - // success code
39997 - } else {
39998 - // fail code
39999 - }
40000 -
40001 - which is the same really, but now you can also do
40002 -
40003 - Type *ptr;
40004 - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
40005 - if (SWIG_IsOK(res)) {
40006 - // success code
40007 - if (SWIG_IsNewObj(res) {
40008 - ...
40009 - delete *ptr;
40010 - } else {
40011 - ...
40012 - }
40013 - } else {
40014 - // fail code
40015 - }
40016 -
40017 - I.e., now SWIG_ConvertPtr can return new objects and you can
40018 - identify the case and take care of the deallocation. Of course that
40019 - also requires SWIG_ConvertPtr to return new result values, such as
40020 -
40021 - int SWIG_ConvertPtr(obj, ptr,...) {
40022 - if (<obj is ok>) {
40023 - if (<need new object>) {
40024 - *ptr = <ptr to new allocated object>;
40025 - return SWIG_NEWOBJ;
40026 - } else {
40027 - *ptr = <ptr to old object>;
40028 - return SWIG_OLDOBJ;
40029 - }
40030 - } else {
40031 - return SWIG_BADOBJ;
40032 - }
40033 - }
40034 -
40035 - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
40036 - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
40037 - SWIG errors code.
40038 -
40039 - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
40040 - allows to return the 'cast rank', for example, if you have this
40041 -
40042 - int food(double)
40043 - int fooi(int);
40044 -
40045 - and you call
40046 -
40047 - food(1) // cast rank '1' (1 -> 1.0)
40048 - fooi(1) // cast rank '0'
40049 -
40050 - just use the SWIG_AddCast()/SWIG_CheckState()
40051 -*/
40052 -
40053 -#define SWIG_OK (0)
40054 -#define SWIG_ERROR (-1)
40055 -#define SWIG_IsOK(r) (r >= 0)
40056 -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
40057 -
40058 -/* The CastRankLimit says how many bits are used for the cast rank */
40059 -#define SWIG_CASTRANKLIMIT (1 << 8)
40060 -/* The NewMask denotes the object was created (using new/malloc) */
40061 -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
40062 -/* The TmpMask is for in/out typemaps that use temporal objects */
40063 -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
40064 -/* Simple returning values */
40065 -#define SWIG_BADOBJ (SWIG_ERROR)
40066 -#define SWIG_OLDOBJ (SWIG_OK)
40067 -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
40068 -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
40069 -/* Check, add and del mask methods */
40070 -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
40071 -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
40072 -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
40073 -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
40074 -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
40075 -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
40076 -
40077 -/* Cast-Rank Mode */
40078 -#if defined(SWIG_CASTRANK_MODE)
40079 -# ifndef SWIG_TypeRank
40080 -# define SWIG_TypeRank unsigned long
40081 -# endif
40082 -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */
40083 -# define SWIG_MAXCASTRANK (2)
40084 -# endif
40085 -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
40086 -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
40087 -SWIGINTERNINLINE int SWIG_AddCast(int r) {
40088 - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
40089 -}
40090 -SWIGINTERNINLINE int SWIG_CheckState(int r) {
40091 - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
40092 -}
40093 -#else /* no cast-rank mode */
40094 -# define SWIG_AddCast(r) (r)
40095 -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
40096 -#endif
40097 -
40098 -
40099 -#include <string.h>
40100 -
40101 -#ifdef __cplusplus
40102 -extern "C" {
40103 -#endif
40104 -
40105 -typedef void *(*swig_converter_func)(void *, int *);
40106 -typedef struct swig_type_info *(*swig_dycast_func)(void **);
40107 -
40108 -/* Structure to store information on one type */
40109 -typedef struct swig_type_info {
40110 - const char *name; /* mangled name of this type */
40111 - const char *str; /* human readable name of this type */
40112 - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
40113 - struct swig_cast_info *cast; /* linked list of types that can cast into this type */
40114 - void *clientdata; /* language specific type data */
40115 - int owndata; /* flag if the structure owns the clientdata */
40116 -} swig_type_info;
40117 -
40118 -/* Structure to store a type and conversion function used for casting */
40119 -typedef struct swig_cast_info {
40120 - swig_type_info *type; /* pointer to type that is equivalent to this type */
40121 - swig_converter_func converter; /* function to cast the void pointers */
40122 - struct swig_cast_info *next; /* pointer to next cast in linked list */
40123 - struct swig_cast_info *prev; /* pointer to the previous cast */
40124 -} swig_cast_info;
40125 -
40126 -/* Structure used to store module information
40127 - * Each module generates one structure like this, and the runtime collects
40128 - * all of these structures and stores them in a circularly linked list.*/
40129 -typedef struct swig_module_info {
40130 - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
40131 - size_t size; /* Number of types in this module */
40132 - struct swig_module_info *next; /* Pointer to next element in circularly linked list */
40133 - swig_type_info **type_initial; /* Array of initially generated type structures */
40134 - swig_cast_info **cast_initial; /* Array of initially generated casting structures */
40135 - void *clientdata; /* Language specific module data */
40136 -} swig_module_info;
40137 -
40138 -/*
40139 - Compare two type names skipping the space characters, therefore
40140 - "char*" == "char *" and "Class<int>" == "Class<int >", etc.
40141 -
40142 - Return 0 when the two name types are equivalent, as in
40143 - strncmp, but skipping ' '.
40144 -*/
40145 -SWIGRUNTIME int
40146 -SWIG_TypeNameComp(const char *f1, const char *l1,
40147 - const char *f2, const char *l2) {
40148 - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
40149 - while ((*f1 == ' ') && (f1 != l1)) ++f1;
40150 - while ((*f2 == ' ') && (f2 != l2)) ++f2;
40151 - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
40152 - }
40153 - return (int)((l1 - f1) - (l2 - f2));
40154 -}
40155 -
40156 -/*
40157 - Check type equivalence in a name list like <name1>|<name2>|...
40158 - Return 0 if equal, -1 if nb < tb, 1 if nb > tb
40159 -*/
40160 -SWIGRUNTIME int
40161 -SWIG_TypeCmp(const char *nb, const char *tb) {
40162 - int equiv = 1;
40163 - const char* te = tb + strlen(tb);
40164 - const char* ne = nb;
40165 - while (equiv != 0 && *ne) {
40166 - for (nb = ne; *ne; ++ne) {
40167 - if (*ne == '|') break;
40168 - }
40169 - equiv = SWIG_TypeNameComp(nb, ne, tb, te);
40170 - if (*ne) ++ne;
40171 - }
40172 - return equiv;
40173 -}
40174 -
40175 -/*
40176 - Check type equivalence in a name list like <name1>|<name2>|...
40177 - Return 0 if not equal, 1 if equal
40178 -*/
40179 -SWIGRUNTIME int
40180 -SWIG_TypeEquiv(const char *nb, const char *tb) {
40181 - return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
40182 -}
40183 -
40184 -/*
40185 - Check the typename
40186 -*/
40187 -SWIGRUNTIME swig_cast_info *
40188 -SWIG_TypeCheck(const char *c, swig_type_info *ty) {
40189 - if (ty) {
40190 - swig_cast_info *iter = ty->cast;
40191 - while (iter) {
40192 - if (strcmp(iter->type->name, c) == 0) {
40193 - if (iter == ty->cast)
40194 - return iter;
40195 - /* Move iter to the top of the linked list */
40196 - iter->prev->next = iter->next;
40197 - if (iter->next)
40198 - iter->next->prev = iter->prev;
40199 - iter->next = ty->cast;
40200 - iter->prev = 0;
40201 - if (ty->cast) ty->cast->prev = iter;
40202 - ty->cast = iter;
40203 - return iter;
40204 - }
40205 - iter = iter->next;
40206 - }
40207 - }
40208 - return 0;
40209 -}
40210 -
40211 -/*
40212 - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
40213 -*/
40214 -SWIGRUNTIME swig_cast_info *
40215 -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
40216 - if (ty) {
40217 - swig_cast_info *iter = ty->cast;
40218 - while (iter) {
40219 - if (iter->type == from) {
40220 - if (iter == ty->cast)
40221 - return iter;
40222 - /* Move iter to the top of the linked list */
40223 - iter->prev->next = iter->next;
40224 - if (iter->next)
40225 - iter->next->prev = iter->prev;
40226 - iter->next = ty->cast;
40227 - iter->prev = 0;
40228 - if (ty->cast) ty->cast->prev = iter;
40229 - ty->cast = iter;
40230 - return iter;
40231 - }
40232 - iter = iter->next;
40233 - }
40234 - }
40235 - return 0;
40236 -}
40237 -
40238 -/*
40239 - Cast a pointer up an inheritance hierarchy
40240 -*/
40241 -SWIGRUNTIMEINLINE void *
40242 -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
40243 - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
40244 -}
40245 -
40246 -/*
40247 - Dynamic pointer casting. Down an inheritance hierarchy
40248 -*/
40249 -SWIGRUNTIME swig_type_info *
40250 -SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
40251 - swig_type_info *lastty = ty;
40252 - if (!ty || !ty->dcast) return ty;
40253 - while (ty && (ty->dcast)) {
40254 - ty = (*ty->dcast)(ptr);
40255 - if (ty) lastty = ty;
40256 - }
40257 - return lastty;
40258 -}
40259 -
40260 -/*
40261 - Return the name associated with this type
40262 -*/
40263 -SWIGRUNTIMEINLINE const char *
40264 -SWIG_TypeName(const swig_type_info *ty) {
40265 - return ty->name;
40266 -}
40267 -
40268 -/*
40269 - Return the pretty name associated with this type,
40270 - that is an unmangled type name in a form presentable to the user.
40271 -*/
40272 -SWIGRUNTIME const char *
40273 -SWIG_TypePrettyName(const swig_type_info *type) {
40274 - /* The "str" field contains the equivalent pretty names of the
40275 - type, separated by vertical-bar characters. We choose
40276 - to print the last name, as it is often (?) the most
40277 - specific. */
40278 - if (!type) return NULL;
40279 - if (type->str != NULL) {
40280 - const char *last_name = type->str;
40281 - const char *s;
40282 - for (s = type->str; *s; s++)
40283 - if (*s == '|') last_name = s+1;
40284 - return last_name;
40285 - }
40286 - else
40287 - return type->name;
40288 -}
40289 -
40290 -/*
40291 - Set the clientdata field for a type
40292 -*/
40293 -SWIGRUNTIME void
40294 -SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
40295 - swig_cast_info *cast = ti->cast;
40296 - /* if (ti->clientdata == clientdata) return; */
40297 - ti->clientdata = clientdata;
40298 -
40299 - while (cast) {
40300 - if (!cast->converter) {
40301 - swig_type_info *tc = cast->type;
40302 - if (!tc->clientdata) {
40303 - SWIG_TypeClientData(tc, clientdata);
40304 - }
40305 - }
40306 - cast = cast->next;
40307 - }
40308 -}
40309 -SWIGRUNTIME void
40310 -SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
40311 - SWIG_TypeClientData(ti, clientdata);
40312 - ti->owndata = 1;
40313 -}
40314 -
40315 -/*
40316 - Search for a swig_type_info structure only by mangled name
40317 - Search is a O(log #types)
40318 -
40319 - We start searching at module start, and finish searching when start == end.
40320 - Note: if start == end at the beginning of the function, we go all the way around
40321 - the circular list.
40322 -*/
40323 -SWIGRUNTIME swig_type_info *
40324 -SWIG_MangledTypeQueryModule(swig_module_info *start,
40325 - swig_module_info *end,
40326 - const char *name) {
40327 - swig_module_info *iter = start;
40328 - do {
40329 - if (iter->size) {
40330 - register size_t l = 0;
40331 - register size_t r = iter->size - 1;
40332 - do {
40333 - /* since l+r >= 0, we can (>> 1) instead (/ 2) */
40334 - register size_t i = (l + r) >> 1;
40335 - const char *iname = iter->types[i]->name;
40336 - if (iname) {
40337 - register int compare = strcmp(name, iname);
40338 - if (compare == 0) {
40339 - return iter->types[i];
40340 - } else if (compare < 0) {
40341 - if (i) {
40342 - r = i - 1;
40343 - } else {
40344 - break;
40345 - }
40346 - } else if (compare > 0) {
40347 - l = i + 1;
40348 - }
40349 - } else {
40350 - break; /* should never happen */
40351 - }
40352 - } while (l <= r);
40353 - }
40354 - iter = iter->next;
40355 - } while (iter != end);
40356 - return 0;
40357 -}
40358 -
40359 -/*
40360 - Search for a swig_type_info structure for either a mangled name or a human readable name.
40361 - It first searches the mangled names of the types, which is a O(log #types)
40362 - If a type is not found it then searches the human readable names, which is O(#types).
40363 -
40364 - We start searching at module start, and finish searching when start == end.
40365 - Note: if start == end at the beginning of the function, we go all the way around
40366 - the circular list.
40367 -*/
40368 -SWIGRUNTIME swig_type_info *
40369 -SWIG_TypeQueryModule(swig_module_info *start,
40370 - swig_module_info *end,
40371 - const char *name) {
40372 - /* STEP 1: Search the name field using binary search */
40373 - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
40374 - if (ret) {
40375 - return ret;
40376 - } else {
40377 - /* STEP 2: If the type hasn't been found, do a complete search
40378 - of the str field (the human readable name) */
40379 - swig_module_info *iter = start;
40380 - do {
40381 - register size_t i = 0;
40382 - for (; i < iter->size; ++i) {
40383 - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
40384 - return iter->types[i];
40385 - }
40386 - iter = iter->next;
40387 - } while (iter != end);
40388 - }
40389 -
40390 - /* neither found a match */
40391 - return 0;
40392 -}
40393 -
40394 -/*
40395 - Pack binary data into a string
40396 -*/
40397 -SWIGRUNTIME char *
40398 -SWIG_PackData(char *c, void *ptr, size_t sz) {
40399 - static const char hex[17] = "0123456789abcdef";
40400 - register const unsigned char *u = (unsigned char *) ptr;
40401 - register const unsigned char *eu = u + sz;
40402 - for (; u != eu; ++u) {
40403 - register unsigned char uu = *u;
40404 - *(c++) = hex[(uu & 0xf0) >> 4];
40405 - *(c++) = hex[uu & 0xf];
40406 - }
40407 - return c;
40408 -}
40409 -
40410 -/*
40411 - Unpack binary data from a string
40412 -*/
40413 -SWIGRUNTIME const char *
40414 -SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
40415 - register unsigned char *u = (unsigned char *) ptr;
40416 - register const unsigned char *eu = u + sz;
40417 - for (; u != eu; ++u) {
40418 - register char d = *(c++);
40419 - register unsigned char uu;
40420 - if ((d >= '0') && (d <= '9'))
40421 - uu = ((d - '0') << 4);
40422 - else if ((d >= 'a') && (d <= 'f'))
40423 - uu = ((d - ('a'-10)) << 4);
40424 - else
40425 - return (char *) 0;
40426 - d = *(c++);
40427 - if ((d >= '0') && (d <= '9'))
40428 - uu |= (d - '0');
40429 - else if ((d >= 'a') && (d <= 'f'))
40430 - uu |= (d - ('a'-10));
40431 - else
40432 - return (char *) 0;
40433 - *u = uu;
40434 - }
40435 - return c;
40436 -}
40437 -
40438 -/*
40439 - Pack 'void *' into a string buffer.
40440 -*/
40441 -SWIGRUNTIME char *
40442 -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
40443 - char *r = buff;
40444 - if ((2*sizeof(void *) + 2) > bsz) return 0;
40445 - *(r++) = '_';
40446 - r = SWIG_PackData(r,&ptr,sizeof(void *));
40447 - if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
40448 - strcpy(r,name);
40449 - return buff;
40450 -}
40451 -
40452 -SWIGRUNTIME const char *
40453 -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
40454 - if (*c != '_') {
40455 - if (strcmp(c,"NULL") == 0) {
40456 - *ptr = (void *) 0;
40457 - return name;
40458 - } else {
40459 - return 0;
40460 - }
40461 - }
40462 - return SWIG_UnpackData(++c,ptr,sizeof(void *));
40463 -}
40464 -
40465 -SWIGRUNTIME char *
40466 -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
40467 - char *r = buff;
40468 - size_t lname = (name ? strlen(name) : 0);
40469 - if ((2*sz + 2 + lname) > bsz) return 0;
40470 - *(r++) = '_';
40471 - r = SWIG_PackData(r,ptr,sz);
40472 - if (lname) {
40473 - strncpy(r,name,lname+1);
40474 - } else {
40475 - *r = 0;
40476 - }
40477 - return buff;
40478 -}
40479 -
40480 -SWIGRUNTIME const char *
40481 -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
40482 - if (*c != '_') {
40483 - if (strcmp(c,"NULL") == 0) {
40484 - memset(ptr,0,sz);
40485 - return name;
40486 - } else {
40487 - return 0;
40488 - }
40489 - }
40490 - return SWIG_UnpackData(++c,ptr,sz);
40491 -}
40492 -
40493 -#ifdef __cplusplus
40494 -}
40495 -#endif
40496 -
40497 -/* Errors in SWIG */
40498 -#define SWIG_UnknownError -1
40499 -#define SWIG_IOError -2
40500 -#define SWIG_RuntimeError -3
40501 -#define SWIG_IndexError -4
40502 -#define SWIG_TypeError -5
40503 -#define SWIG_DivisionByZero -6
40504 -#define SWIG_OverflowError -7
40505 -#define SWIG_SyntaxError -8
40506 -#define SWIG_ValueError -9
40507 -#define SWIG_SystemError -10
40508 -#define SWIG_AttributeError -11
40509 -#define SWIG_MemoryError -12
40510 -#define SWIG_NullReferenceError -13
40511 -
40512 -
40513 -
40514 -/* Compatibility macros for Python 3 */
40515 -#if PY_VERSION_HEX >= 0x03000000
40516 -
40517 -#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
40518 -#define PyInt_Check(x) PyLong_Check(x)
40519 -#define PyInt_AsLong(x) PyLong_AsLong(x)
40520 -#define PyInt_FromLong(x) PyLong_FromLong(x)
40521 -#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
40522 -#define PyString_Check(name) PyBytes_Check(name)
40523 -#define PyString_FromString(x) PyUnicode_FromString(x)
40524 -#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
40525 -#define PyString_AsString(str) PyBytes_AsString(str)
40526 -#define PyString_Size(str) PyBytes_Size(str)
40527 -#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
40528 -#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
40529 -#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
40530 -#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
40531 -
40532 -#endif
40533 -
40534 -#ifndef Py_TYPE
40535 -# define Py_TYPE(op) ((op)->ob_type)
40536 -#endif
40537 -
40538 -/* SWIG APIs for compatibility of both Python 2 & 3 */
40539 -
40540 -#if PY_VERSION_HEX >= 0x03000000
40541 -# define SWIG_Python_str_FromFormat PyUnicode_FromFormat
40542 -#else
40543 -# define SWIG_Python_str_FromFormat PyString_FromFormat
40544 -#endif
40545 -
40546 -
40547 -/* Warning: This function will allocate a new string in Python 3,
40548 - * so please call SWIG_Python_str_DelForPy3(x) to free the space.
40549 - */
40550 -SWIGINTERN char*
40551 -SWIG_Python_str_AsChar(PyObject *str)
40552 -{
40553 -#if PY_VERSION_HEX >= 0x03000000
40554 - char *cstr;
40555 - char *newstr;
40556 - Py_ssize_t len;
40557 - str = PyUnicode_AsUTF8String(str);
40558 - PyBytes_AsStringAndSize(str, &cstr, &len);
40559 - newstr = (char *) malloc(len+1);
40560 - memcpy(newstr, cstr, len+1);
40561 - Py_XDECREF(str);
40562 - return newstr;
40563 -#else
40564 - return PyString_AsString(str);
40565 -#endif
40566 -}
40567 -
40568 -#if PY_VERSION_HEX >= 0x03000000
40569 -# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
40570 -#else
40571 -# define SWIG_Python_str_DelForPy3(x)
40572 -#endif
40573 -
40574 -
40575 -SWIGINTERN PyObject*
40576 -SWIG_Python_str_FromChar(const char *c)
40577 -{
40578 -#if PY_VERSION_HEX >= 0x03000000
40579 - return PyUnicode_FromString(c);
40580 -#else
40581 - return PyString_FromString(c);
40582 -#endif
40583 -}
40584 -
40585 -/* Add PyOS_snprintf for old Pythons */
40586 -#if PY_VERSION_HEX < 0x02020000
40587 -# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
40588 -# define PyOS_snprintf _snprintf
40589 -# else
40590 -# define PyOS_snprintf snprintf
40591 -# endif
40592 -#endif
40593 -
40594 -/* A crude PyString_FromFormat implementation for old Pythons */
40595 -#if PY_VERSION_HEX < 0x02020000
40596 -
40597 -#ifndef SWIG_PYBUFFER_SIZE
40598 -# define SWIG_PYBUFFER_SIZE 1024
40599 -#endif
40600 -
40601 -static PyObject *
40602 -PyString_FromFormat(const char *fmt, ...) {
40603 - va_list ap;
40604 - char buf[SWIG_PYBUFFER_SIZE * 2];
40605 - int res;
40606 - va_start(ap, fmt);
40607 - res = vsnprintf(buf, sizeof(buf), fmt, ap);
40608 - va_end(ap);
40609 - return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
40610 -}
40611 -#endif
40612 -
40613 -/* Add PyObject_Del for old Pythons */
40614 -#if PY_VERSION_HEX < 0x01060000
40615 -# define PyObject_Del(op) PyMem_DEL((op))
40616 -#endif
40617 -#ifndef PyObject_DEL
40618 -# define PyObject_DEL PyObject_Del
40619 -#endif
40620 -
40621 -/* A crude PyExc_StopIteration exception for old Pythons */
40622 -#if PY_VERSION_HEX < 0x02020000
40623 -# ifndef PyExc_StopIteration
40624 -# define PyExc_StopIteration PyExc_RuntimeError
40625 -# endif
40626 -# ifndef PyObject_GenericGetAttr
40627 -# define PyObject_GenericGetAttr 0
40628 -# endif
40629 -#endif
40630 -
40631 -/* Py_NotImplemented is defined in 2.1 and up. */
40632 -#if PY_VERSION_HEX < 0x02010000
40633 -# ifndef Py_NotImplemented
40634 -# define Py_NotImplemented PyExc_RuntimeError
40635 -# endif
40636 -#endif
40637 -
40638 -/* A crude PyString_AsStringAndSize implementation for old Pythons */
40639 -#if PY_VERSION_HEX < 0x02010000
40640 -# ifndef PyString_AsStringAndSize
40641 -# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
40642 -# endif
40643 -#endif
40644 -
40645 -/* PySequence_Size for old Pythons */
40646 -#if PY_VERSION_HEX < 0x02000000
40647 -# ifndef PySequence_Size
40648 -# define PySequence_Size PySequence_Length
40649 -# endif
40650 -#endif
40651 -
40652 -/* PyBool_FromLong for old Pythons */
40653 -#if PY_VERSION_HEX < 0x02030000
40654 -static
40655 -PyObject *PyBool_FromLong(long ok)
40656 -{
40657 - PyObject *result = ok ? Py_True : Py_False;
40658 - Py_INCREF(result);
40659 - return result;
40660 -}
40661 -#endif
40662 -
40663 -/* Py_ssize_t for old Pythons */
40664 -/* This code is as recommended by: */
40665 -/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
40666 -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
40667 -typedef int Py_ssize_t;
40668 -# define PY_SSIZE_T_MAX INT_MAX
40669 -# define PY_SSIZE_T_MIN INT_MIN
40670 -typedef inquiry lenfunc;
40671 -typedef intargfunc ssizeargfunc;
40672 -typedef intintargfunc ssizessizeargfunc;
40673 -typedef intobjargproc ssizeobjargproc;
40674 -typedef intintobjargproc ssizessizeobjargproc;
40675 -typedef getreadbufferproc readbufferproc;
40676 -typedef getwritebufferproc writebufferproc;
40677 -typedef getsegcountproc segcountproc;
40678 -typedef getcharbufferproc charbufferproc;
40679 -static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
40680 -{
40681 - long result = 0;
40682 - PyObject *i = PyNumber_Int(x);
40683 - if (i) {
40684 - result = PyInt_AsLong(i);
40685 - Py_DECREF(i);
40686 - }
40687 - return result;
40688 -}
40689 -#endif
40690 -
40691 -#if PY_VERSION_HEX < 0x02050000
40692 -#define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
40693 -#endif
40694 -
40695 -#if PY_VERSION_HEX < 0x02040000
40696 -#define Py_VISIT(op) \
40697 - do { \
40698 - if (op) { \
40699 - int vret = visit((op), arg); \
40700 - if (vret) \
40701 - return vret; \
40702 - } \
40703 - } while (0)
40704 -#endif
40705 -
40706 -#if PY_VERSION_HEX < 0x02030000
40707 -typedef struct {
40708 - PyTypeObject type;
40709 - PyNumberMethods as_number;
40710 - PyMappingMethods as_mapping;
40711 - PySequenceMethods as_sequence;
40712 - PyBufferProcs as_buffer;
40713 - PyObject *name, *slots;
40714 -} PyHeapTypeObject;
40715 -#endif
40716 -
40717 -#if PY_VERSION_HEX < 0x02030000
40718 -typedef destructor freefunc;
40719 -#endif
40720 -
40721 -#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
40722 - (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
40723 - (PY_MAJOR_VERSION > 3))
40724 -# define SWIGPY_USE_CAPSULE
40725 -# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
40726 -#endif
40727 -
40728 -#if PY_VERSION_HEX < 0x03020000
40729 -#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
40730 -#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
40731 -#endif
40732 -
40733 -/* -----------------------------------------------------------------------------
40734 - * error manipulation
40735 - * ----------------------------------------------------------------------------- */
40736 -
40737 -SWIGRUNTIME PyObject*
40738 -SWIG_Python_ErrorType(int code) {
40739 - PyObject* type = 0;
40740 - switch(code) {
40741 - case SWIG_MemoryError:
40742 - type = PyExc_MemoryError;
40743 - break;
40744 - case SWIG_IOError:
40745 - type = PyExc_IOError;
40746 - break;
40747 - case SWIG_RuntimeError:
40748 - type = PyExc_RuntimeError;
40749 - break;
40750 - case SWIG_IndexError:
40751 - type = PyExc_IndexError;
40752 - break;
40753 - case SWIG_TypeError:
40754 - type = PyExc_TypeError;
40755 - break;
40756 - case SWIG_DivisionByZero:
40757 - type = PyExc_ZeroDivisionError;
40758 - break;
40759 - case SWIG_OverflowError:
40760 - type = PyExc_OverflowError;
40761 - break;
40762 - case SWIG_SyntaxError:
40763 - type = PyExc_SyntaxError;
40764 - break;
40765 - case SWIG_ValueError:
40766 - type = PyExc_ValueError;
40767 - break;
40768 - case SWIG_SystemError:
40769 - type = PyExc_SystemError;
40770 - break;
40771 - case SWIG_AttributeError:
40772 - type = PyExc_AttributeError;
40773 - break;
40774 - default:
40775 - type = PyExc_RuntimeError;
40776 - }
40777 - return type;
40778 -}
40779 -
40780 -
40781 -SWIGRUNTIME void
40782 -SWIG_Python_AddErrorMsg(const char* mesg)
40783 -{
40784 - PyObject *type = 0;
40785 - PyObject *value = 0;
40786 - PyObject *traceback = 0;
40787 -
40788 - if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
40789 - if (value) {
40790 - char *tmp;
40791 - PyObject *old_str = PyObject_Str(value);
40792 - PyErr_Clear();
40793 - Py_XINCREF(type);
40794 -
40795 - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
40796 - SWIG_Python_str_DelForPy3(tmp);
40797 - Py_DECREF(old_str);
40798 - Py_DECREF(value);
40799 - } else {
40800 - PyErr_SetString(PyExc_RuntimeError, mesg);
40801 - }
40802 -}
40803 -
40804 -#if defined(SWIG_PYTHON_NO_THREADS)
40805 -# if defined(SWIG_PYTHON_THREADS)
40806 -# undef SWIG_PYTHON_THREADS
40807 -# endif
40808 -#endif
40809 -#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
40810 -# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
40811 -# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
40812 -# define SWIG_PYTHON_USE_GIL
40813 -# endif
40814 -# endif
40815 -# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
40816 -# ifndef SWIG_PYTHON_INITIALIZE_THREADS
40817 -# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
40818 -# endif
40819 -# ifdef __cplusplus /* C++ code */
40820 - class SWIG_Python_Thread_Block {
40821 - bool status;
40822 - PyGILState_STATE state;
40823 - public:
40824 - void end() { if (status) { PyGILState_Release(state); status = false;} }
40825 - SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
40826 - ~SWIG_Python_Thread_Block() { end(); }
40827 - };
40828 - class SWIG_Python_Thread_Allow {
40829 - bool status;
40830 - PyThreadState *save;
40831 - public:
40832 - void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
40833 - SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
40834 - ~SWIG_Python_Thread_Allow() { end(); }
40835 - };
40836 -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
40837 -# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
40838 -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
40839 -# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
40840 -# else /* C code */
40841 -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
40842 -# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
40843 -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
40844 -# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
40845 -# endif
40846 -# else /* Old thread way, not implemented, user must provide it */
40847 -# if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
40848 -# define SWIG_PYTHON_INITIALIZE_THREADS
40849 -# endif
40850 -# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
40851 -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
40852 -# endif
40853 -# if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
40854 -# define SWIG_PYTHON_THREAD_END_BLOCK
40855 -# endif
40856 -# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
40857 -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
40858 -# endif
40859 -# if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
40860 -# define SWIG_PYTHON_THREAD_END_ALLOW
40861 -# endif
40862 -# endif
40863 -#else /* No thread support */
40864 -# define SWIG_PYTHON_INITIALIZE_THREADS
40865 -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
40866 -# define SWIG_PYTHON_THREAD_END_BLOCK
40867 -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
40868 -# define SWIG_PYTHON_THREAD_END_ALLOW
40869 -#endif
40870 -
40871 -/* -----------------------------------------------------------------------------
40872 - * Python API portion that goes into the runtime
40873 - * ----------------------------------------------------------------------------- */
40874 -
40875 -#ifdef __cplusplus
40876 -extern "C" {
40877 -#endif
40878 -
40879 -/* -----------------------------------------------------------------------------
40880 - * Constant declarations
40881 - * ----------------------------------------------------------------------------- */
40882 -
40883 -/* Constant Types */
40884 -#define SWIG_PY_POINTER 4
40885 -#define SWIG_PY_BINARY 5
40886 -
40887 -/* Constant information structure */
40888 -typedef struct swig_const_info {
40889 - int type;
40890 - char *name;
40891 - long lvalue;
40892 - double dvalue;
40893 - void *pvalue;
40894 - swig_type_info **ptype;
40895 -} swig_const_info;
40896 -
40897 -
40898 -/* -----------------------------------------------------------------------------
40899 - * Wrapper of PyInstanceMethod_New() used in Python 3
40900 - * It is exported to the generated module, used for -fastproxy
40901 - * ----------------------------------------------------------------------------- */
40902 -#if PY_VERSION_HEX >= 0x03000000
40903 -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
40904 -{
40905 - return PyInstanceMethod_New(func);
40906 -}
40907 -#else
40908 -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
40909 -{
40910 - return NULL;
40911 -}
40912 -#endif
40913 -
40914 -#ifdef __cplusplus
40915 -}
40916 -#endif
40917 -
40918 -
40919 -/* -----------------------------------------------------------------------------
40920 - * pyrun.swg
40921 - *
40922 - * This file contains the runtime support for Python modules
40923 - * and includes code for managing global variables and pointer
40924 - * type checking.
40925 - *
40926 - * ----------------------------------------------------------------------------- */
40927 -
40928 -/* Common SWIG API */
40929 -
40930 -/* for raw pointers */
40931 -#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
40932 -#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
40933 -#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
40934 -
40935 -#ifdef SWIGPYTHON_BUILTIN
40936 -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
40937 -#else
40938 -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
40939 -#endif
40940 -
40941 -#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
40942 -
40943 -#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
40944 -#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
40945 -#define swig_owntype int
40946 -
40947 -/* for raw packed data */
40948 -#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
40949 -#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
40950 -
40951 -/* for class or struct pointers */
40952 -#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
40953 -#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
40954 -
40955 -/* for C or C++ function pointers */
40956 -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
40957 -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
40958 -
40959 -/* for C++ member pointers, ie, member methods */
40960 -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
40961 -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
40962 -
40963 -
40964 -/* Runtime API */
40965 -
40966 -#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
40967 -#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
40968 -#define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
40969 -
40970 -#define SWIG_SetErrorObj SWIG_Python_SetErrorObj
40971 -#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
40972 -#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
40973 -#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
40974 -#define SWIG_fail goto fail
40975 -
40976 -
40977 -/* Runtime API implementation */
40978 -
40979 -/* Error manipulation */
40980 -
40981 -SWIGINTERN void
40982 -SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
40983 - SWIG_PYTHON_THREAD_BEGIN_BLOCK;
40984 - PyErr_SetObject(errtype, obj);
40985 - Py_DECREF(obj);
40986 - SWIG_PYTHON_THREAD_END_BLOCK;
40987 -}
40988 -
40989 -SWIGINTERN void
40990 -SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
40991 - SWIG_PYTHON_THREAD_BEGIN_BLOCK;
40992 - PyErr_SetString(errtype, msg);
40993 - SWIG_PYTHON_THREAD_END_BLOCK;
40994 -}
40995 -
40996 -#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
40997 -
40998 -/* Set a constant value */
40999 -
41000 -#if defined(SWIGPYTHON_BUILTIN)
41001 -
41002 -SWIGINTERN void
41003 -SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
41004 - PyObject *s = PyString_InternFromString(key);
41005 - PyList_Append(seq, s);
41006 - Py_DECREF(s);
41007 -}
41008 -
41009 -SWIGINTERN void
41010 -SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
41011 -#if PY_VERSION_HEX < 0x02030000
41012 - PyDict_SetItemString(d, (char *)name, obj);
41013 -#else
41014 - PyDict_SetItemString(d, name, obj);
41015 -#endif
41016 - Py_DECREF(obj);
41017 - if (public_interface)
41018 - SwigPyBuiltin_AddPublicSymbol(public_interface, name);
41019 -}
41020 -
41021 -#else
41022 -
41023 -SWIGINTERN void
41024 -SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
41025 -#if PY_VERSION_HEX < 0x02030000
41026 - PyDict_SetItemString(d, (char *)name, obj);
41027 -#else
41028 - PyDict_SetItemString(d, name, obj);
41029 -#endif
41030 - Py_DECREF(obj);
41031 -}
41032 -
41033 -#endif
41034 -
41035 -/* Append a value to the result obj */
41036 -
41037 -SWIGINTERN PyObject*
41038 -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
41039 -#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
41040 - if (!result) {
41041 - result = obj;
41042 - } else if (result == Py_None) {
41043 - Py_DECREF(result);
41044 - result = obj;
41045 - } else {
41046 - if (!PyList_Check(result)) {
41047 - PyObject *o2 = result;
41048 - result = PyList_New(1);
41049 - PyList_SetItem(result, 0, o2);
41050 - }
41051 - PyList_Append(result,obj);
41052 - Py_DECREF(obj);
41053 - }
41054 - return result;
41055 -#else
41056 - PyObject* o2;
41057 - PyObject* o3;
41058 - if (!result) {
41059 - result = obj;
41060 - } else if (result == Py_None) {
41061 - Py_DECREF(result);
41062 - result = obj;
41063 - } else {
41064 - if (!PyTuple_Check(result)) {
41065 - o2 = result;
41066 - result = PyTuple_New(1);
41067 - PyTuple_SET_ITEM(result, 0, o2);
41068 - }
41069 - o3 = PyTuple_New(1);
41070 - PyTuple_SET_ITEM(o3, 0, obj);
41071 - o2 = result;
41072 - result = PySequence_Concat(o2, o3);
41073 - Py_DECREF(o2);
41074 - Py_DECREF(o3);
41075 - }
41076 - return result;
41077 -#endif
41078 -}
41079 -
41080 -/* Unpack the argument tuple */
41081 -
41082 -SWIGINTERN int
41083 -SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
41084 -{
41085 - if (!args) {
41086 - if (!min && !max) {
41087 - return 1;
41088 - } else {
41089 - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
41090 - name, (min == max ? "" : "at least "), (int)min);
41091 - return 0;
41092 - }
41093 - }
41094 - if (!PyTuple_Check(args)) {
41095 - if (min <= 1 && max >= 1) {
41096 - register int i;
41097 - objs[0] = args;
41098 - for (i = 1; i < max; ++i) {
41099 - objs[i] = 0;
41100 - }
41101 - return 2;
41102 - }
41103 - PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
41104 - return 0;
41105 - } else {
41106 - register Py_ssize_t l = PyTuple_GET_SIZE(args);
41107 - if (l < min) {
41108 - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
41109 - name, (min == max ? "" : "at least "), (int)min, (int)l);
41110 - return 0;
41111 - } else if (l > max) {
41112 - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
41113 - name, (min == max ? "" : "at most "), (int)max, (int)l);
41114 - return 0;
41115 - } else {
41116 - register int i;
41117 - for (i = 0; i < l; ++i) {
41118 - objs[i] = PyTuple_GET_ITEM(args, i);
41119 - }
41120 - for (; l < max; ++l) {
41121 - objs[l] = 0;
41122 - }
41123 - return i + 1;
41124 - }
41125 - }
41126 -}
41127 -
41128 -/* A functor is a function object with one single object argument */
41129 -#if PY_VERSION_HEX >= 0x02020000
41130 -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
41131 -#else
41132 -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
41133 -#endif
41134 -
41135 -/*
41136 - Helper for static pointer initialization for both C and C++ code, for example
41137 - static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
41138 -*/
41139 -#ifdef __cplusplus
41140 -#define SWIG_STATIC_POINTER(var) var
41141 -#else
41142 -#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
41143 -#endif
41144 -
41145 -/* -----------------------------------------------------------------------------
41146 - * Pointer declarations
41147 - * ----------------------------------------------------------------------------- */
41148 -
41149 -/* Flags for new pointer objects */
41150 -#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
41151 -#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
41152 -
41153 -#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
41154 -
41155 -#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
41156 -#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
41157 -
41158 -#ifdef __cplusplus
41159 -extern "C" {
41160 -#endif
41161 -
41162 -/* How to access Py_None */
41163 -#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
41164 -# ifndef SWIG_PYTHON_NO_BUILD_NONE
41165 -# ifndef SWIG_PYTHON_BUILD_NONE
41166 -# define SWIG_PYTHON_BUILD_NONE
41167 -# endif
41168 -# endif
41169 -#endif
41170 -
41171 -#ifdef SWIG_PYTHON_BUILD_NONE
41172 -# ifdef Py_None
41173 -# undef Py_None
41174 -# define Py_None SWIG_Py_None()
41175 -# endif
41176 -SWIGRUNTIMEINLINE PyObject *
41177 -_SWIG_Py_None(void)
41178 -{
41179 - PyObject *none = Py_BuildValue((char*)"");
41180 - Py_DECREF(none);
41181 - return none;
41182 -}
41183 -SWIGRUNTIME PyObject *
41184 -SWIG_Py_None(void)
41185 -{
41186 - static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
41187 - return none;
41188 -}
41189 -#endif
41190 -
41191 -/* The python void return value */
41192 -
41193 -SWIGRUNTIMEINLINE PyObject *
41194 -SWIG_Py_Void(void)
41195 -{
41196 - PyObject *none = Py_None;
41197 - Py_INCREF(none);
41198 - return none;
41199 -}
41200 -
41201 -/* SwigPyClientData */
41202 -
41203 -typedef struct {
41204 - PyObject *klass;
41205 - PyObject *newraw;
41206 - PyObject *newargs;
41207 - PyObject *destroy;
41208 - int delargs;
41209 - int implicitconv;
41210 - PyTypeObject *pytype;
41211 -} SwigPyClientData;
41212 -
41213 -SWIGRUNTIMEINLINE int
41214 -SWIG_Python_CheckImplicit(swig_type_info *ty)
41215 -{
41216 - SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
41217 - return data ? data->implicitconv : 0;
41218 -}
41219 -
41220 -SWIGRUNTIMEINLINE PyObject *
41221 -SWIG_Python_ExceptionType(swig_type_info *desc) {
41222 - SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
41223 - PyObject *klass = data ? data->klass : 0;
41224 - return (klass ? klass : PyExc_RuntimeError);
41225 -}
41226 -
41227 -
41228 -SWIGRUNTIME SwigPyClientData *
41229 -SwigPyClientData_New(PyObject* obj)
41230 -{
41231 - if (!obj) {
41232 - return 0;
41233 - } else {
41234 - SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
41235 - /* the klass element */
41236 - data->klass = obj;
41237 - Py_INCREF(data->klass);
41238 - /* the newraw method and newargs arguments used to create a new raw instance */
41239 - if (PyClass_Check(obj)) {
41240 - data->newraw = 0;
41241 - data->newargs = obj;
41242 - Py_INCREF(obj);
41243 - } else {
41244 -#if (PY_VERSION_HEX < 0x02020000)
41245 - data->newraw = 0;
41246 -#else
41247 - data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
41248 -#endif
41249 - if (data->newraw) {
41250 - Py_INCREF(data->newraw);
41251 - data->newargs = PyTuple_New(1);
41252 - PyTuple_SetItem(data->newargs, 0, obj);
41253 - } else {
41254 - data->newargs = obj;
41255 - }
41256 - Py_INCREF(data->newargs);
41257 - }
41258 - /* the destroy method, aka as the C++ delete method */
41259 - data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
41260 - if (PyErr_Occurred()) {
41261 - PyErr_Clear();
41262 - data->destroy = 0;
41263 - }
41264 - if (data->destroy) {
41265 - int flags;
41266 - Py_INCREF(data->destroy);
41267 - flags = PyCFunction_GET_FLAGS(data->destroy);
41268 -#ifdef METH_O
41269 - data->delargs = !(flags & (METH_O));
41270 -#else
41271 - data->delargs = 0;
41272 -#endif
41273 - } else {
41274 - data->delargs = 0;
41275 - }
41276 - data->implicitconv = 0;
41277 - data->pytype = 0;
41278 - return data;
41279 - }
41280 -}
41281 -
41282 -SWIGRUNTIME void
41283 -SwigPyClientData_Del(SwigPyClientData *data) {
41284 - Py_XDECREF(data->newraw);
41285 - Py_XDECREF(data->newargs);
41286 - Py_XDECREF(data->destroy);
41287 -}
41288 -
41289 -/* =============== SwigPyObject =====================*/
41290 -
41291 -typedef struct {
41292 - PyObject_HEAD
41293 - void *ptr;
41294 - swig_type_info *ty;
41295 - int own;
41296 - PyObject *next;
41297 -#ifdef SWIGPYTHON_BUILTIN
41298 - PyObject *dict;
41299 -#endif
41300 -} SwigPyObject;
41301 -
41302 -SWIGRUNTIME PyObject *
41303 -SwigPyObject_long(SwigPyObject *v)
41304 -{
41305 - return PyLong_FromVoidPtr(v->ptr);
41306 -}
41307 -
41308 -SWIGRUNTIME PyObject *
41309 -SwigPyObject_format(const char* fmt, SwigPyObject *v)
41310 -{
41311 - PyObject *res = NULL;
41312 - PyObject *args = PyTuple_New(1);
41313 - if (args) {
41314 - if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
41315 - PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
41316 - if (ofmt) {
41317 -#if PY_VERSION_HEX >= 0x03000000
41318 - res = PyUnicode_Format(ofmt,args);
41319 -#else
41320 - res = PyString_Format(ofmt,args);
41321 -#endif
41322 - Py_DECREF(ofmt);
41323 - }
41324 - Py_DECREF(args);
41325 - }
41326 - }
41327 - return res;
41328 -}
41329 -
41330 -SWIGRUNTIME PyObject *
41331 -SwigPyObject_oct(SwigPyObject *v)
41332 -{
41333 - return SwigPyObject_format("%o",v);
41334 -}
41335 -
41336 -SWIGRUNTIME PyObject *
41337 -SwigPyObject_hex(SwigPyObject *v)
41338 -{
41339 - return SwigPyObject_format("%x",v);
41340 -}
41341 -
41342 -SWIGRUNTIME PyObject *
41343 -#ifdef METH_NOARGS
41344 -SwigPyObject_repr(SwigPyObject *v)
41345 -#else
41346 -SwigPyObject_repr(SwigPyObject *v, PyObject *args)
41347 -#endif
41348 -{
41349 - const char *name = SWIG_TypePrettyName(v->ty);
41350 - PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
41351 - if (v->next) {
41352 -# ifdef METH_NOARGS
41353 - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
41354 -# else
41355 - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
41356 -# endif
41357 -# if PY_VERSION_HEX >= 0x03000000
41358 - PyObject *joined = PyUnicode_Concat(repr, nrep);
41359 - Py_DecRef(repr);
41360 - Py_DecRef(nrep);
41361 - repr = joined;
41362 -# else
41363 - PyString_ConcatAndDel(&repr,nrep);
41364 -# endif
41365 - }
41366 - return repr;
41367 -}
41368 -
41369 -SWIGRUNTIME int
41370 -SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
41371 -{
41372 - char *str;
41373 -#ifdef METH_NOARGS
41374 - PyObject *repr = SwigPyObject_repr(v);
41375 -#else
41376 - PyObject *repr = SwigPyObject_repr(v, NULL);
41377 -#endif
41378 - if (repr) {
41379 - str = SWIG_Python_str_AsChar(repr);
41380 - fputs(str, fp);
41381 - SWIG_Python_str_DelForPy3(str);
41382 - Py_DECREF(repr);
41383 - return 0;
41384 - } else {
41385 - return 1;
41386 - }
41387 -}
41388 -
41389 -SWIGRUNTIME PyObject *
41390 -SwigPyObject_str(SwigPyObject *v)
41391 -{
41392 - char result[SWIG_BUFFER_SIZE];
41393 - return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
41394 - SWIG_Python_str_FromChar(result) : 0;
41395 -}
41396 -
41397 -SWIGRUNTIME int
41398 -SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
41399 -{
41400 - void *i = v->ptr;
41401 - void *j = w->ptr;
41402 - return (i < j) ? -1 : ((i > j) ? 1 : 0);
41403 -}
41404 -
41405 -/* Added for Python 3.x, would it also be useful for Python 2.x? */
41406 -SWIGRUNTIME PyObject*
41407 -SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
41408 -{
41409 - PyObject* res;
41410 - if( op != Py_EQ && op != Py_NE ) {
41411 - Py_INCREF(Py_NotImplemented);
41412 - return Py_NotImplemented;
41413 - }
41414 - res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
41415 - return res;
41416 -}
41417 -
41418 -
41419 -SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
41420 -
41421 -#ifdef SWIGPYTHON_BUILTIN
41422 -static swig_type_info *SwigPyObject_stype = 0;
41423 -SWIGRUNTIME PyTypeObject*
41424 -SwigPyObject_type(void) {
41425 - SwigPyClientData *cd;
41426 - assert(SwigPyObject_stype);
41427 - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
41428 - assert(cd);
41429 - assert(cd->pytype);
41430 - return cd->pytype;
41431 -}
41432 -#else
41433 -SWIGRUNTIME PyTypeObject*
41434 -SwigPyObject_type(void) {
41435 - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
41436 - return type;
41437 -}
41438 -#endif
41439 -
41440 -SWIGRUNTIMEINLINE int
41441 -SwigPyObject_Check(PyObject *op) {
41442 -#ifdef SWIGPYTHON_BUILTIN
41443 - PyTypeObject *target_tp = SwigPyObject_type();
41444 - if (PyType_IsSubtype(op->ob_type, target_tp))
41445 - return 1;
41446 - return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
41447 -#else
41448 - return (Py_TYPE(op) == SwigPyObject_type())
41449 - || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
41450 -#endif
41451 -}
41452 -
41453 -SWIGRUNTIME PyObject *
41454 -SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
41455 -
41456 -SWIGRUNTIME void
41457 -SwigPyObject_dealloc(PyObject *v)
41458 -{
41459 - SwigPyObject *sobj = (SwigPyObject *) v;
41460 - PyObject *next = sobj->next;
41461 - if (sobj->own == SWIG_POINTER_OWN) {
41462 - swig_type_info *ty = sobj->ty;
41463 - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
41464 - PyObject *destroy = data ? data->destroy : 0;
41465 - if (destroy) {
41466 - /* destroy is always a VARARGS method */
41467 - PyObject *res;
41468 - if (data->delargs) {
41469 - /* we need to create a temporary object to carry the destroy operation */
41470 - PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
41471 - res = SWIG_Python_CallFunctor(destroy, tmp);
41472 - Py_DECREF(tmp);
41473 - } else {
41474 - PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
41475 - PyObject *mself = PyCFunction_GET_SELF(destroy);
41476 - res = ((*meth)(mself, v));
41477 - }
41478 - Py_XDECREF(res);
41479 - }
41480 -#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
41481 - else {
41482 - const char *name = SWIG_TypePrettyName(ty);
41483 - printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
41484 - }
41485 -#endif
41486 - }
41487 - Py_XDECREF(next);
41488 - PyObject_DEL(v);
41489 -}
41490 -
41491 -SWIGRUNTIME PyObject*
41492 -SwigPyObject_append(PyObject* v, PyObject* next)
41493 -{
41494 - SwigPyObject *sobj = (SwigPyObject *) v;
41495 -#ifndef METH_O
41496 - PyObject *tmp = 0;
41497 - if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
41498 - next = tmp;
41499 -#endif
41500 - if (!SwigPyObject_Check(next)) {
41501 - return NULL;
41502 - }
41503 - sobj->next = next;
41504 - Py_INCREF(next);
41505 - return SWIG_Py_Void();
41506 -}
41507 -
41508 -SWIGRUNTIME PyObject*
41509 -#ifdef METH_NOARGS
41510 -SwigPyObject_next(PyObject* v)
41511 -#else
41512 -SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
41513 -#endif
41514 -{
41515 - SwigPyObject *sobj = (SwigPyObject *) v;
41516 - if (sobj->next) {
41517 - Py_INCREF(sobj->next);
41518 - return sobj->next;
41519 - } else {
41520 - return SWIG_Py_Void();
41521 - }
41522 -}
41523 -
41524 -SWIGINTERN PyObject*
41525 -#ifdef METH_NOARGS
41526 -SwigPyObject_disown(PyObject *v)
41527 -#else
41528 -SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
41529 -#endif
41530 -{
41531 - SwigPyObject *sobj = (SwigPyObject *)v;
41532 - sobj->own = 0;
41533 - return SWIG_Py_Void();
41534 -}
41535 -
41536 -SWIGINTERN PyObject*
41537 -#ifdef METH_NOARGS
41538 -SwigPyObject_acquire(PyObject *v)
41539 -#else
41540 -SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
41541 -#endif
41542 -{
41543 - SwigPyObject *sobj = (SwigPyObject *)v;
41544 - sobj->own = SWIG_POINTER_OWN;
41545 - return SWIG_Py_Void();
41546 -}
41547 -
41548 -SWIGINTERN PyObject*
41549 -SwigPyObject_own(PyObject *v, PyObject *args)
41550 -{
41551 - PyObject *val = 0;
41552 -#if (PY_VERSION_HEX < 0x02020000)
41553 - if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
41554 -#elif (PY_VERSION_HEX < 0x02050000)
41555 - if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
41556 -#else
41557 - if (!PyArg_UnpackTuple(args, "own", 0, 1, &val))
41558 -#endif
41559 - {
41560 - return NULL;
41561 - }
41562 - else
41563 - {
41564 - SwigPyObject *sobj = (SwigPyObject *)v;
41565 - PyObject *obj = PyBool_FromLong(sobj->own);
41566 - if (val) {
41567 -#ifdef METH_NOARGS
41568 - if (PyObject_IsTrue(val)) {
41569 - SwigPyObject_acquire(v);
41570 - } else {
41571 - SwigPyObject_disown(v);
41572 - }
41573 -#else
41574 - if (PyObject_IsTrue(val)) {
41575 - SwigPyObject_acquire(v,args);
41576 - } else {
41577 - SwigPyObject_disown(v,args);
41578 - }
41579 -#endif
41580 - }
41581 - return obj;
41582 - }
41583 -}
41584 -
41585 -#ifdef METH_O
41586 -static PyMethodDef
41587 -swigobject_methods[] = {
41588 - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
41589 - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
41590 - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
41591 - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
41592 - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
41593 - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
41594 - {0, 0, 0, 0}
41595 -};
41596 -#else
41597 -static PyMethodDef
41598 -swigobject_methods[] = {
41599 - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
41600 - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
41601 - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
41602 - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
41603 - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
41604 - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
41605 - {0, 0, 0, 0}
41606 -};
41607 -#endif
41608 -
41609 -#if PY_VERSION_HEX < 0x02020000
41610 -SWIGINTERN PyObject *
41611 -SwigPyObject_getattr(SwigPyObject *sobj,char *name)
41612 -{
41613 - return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
41614 -}
41615 -#endif
41616 -
41617 -SWIGRUNTIME PyTypeObject*
41618 -SwigPyObject_TypeOnce(void) {
41619 - static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
41620 -
41621 - static PyNumberMethods SwigPyObject_as_number = {
41622 - (binaryfunc)0, /*nb_add*/
41623 - (binaryfunc)0, /*nb_subtract*/
41624 - (binaryfunc)0, /*nb_multiply*/
41625 - /* nb_divide removed in Python 3 */
41626 -#if PY_VERSION_HEX < 0x03000000
41627 - (binaryfunc)0, /*nb_divide*/
41628 -#endif
41629 - (binaryfunc)0, /*nb_remainder*/
41630 - (binaryfunc)0, /*nb_divmod*/
41631 - (ternaryfunc)0,/*nb_power*/
41632 - (unaryfunc)0, /*nb_negative*/
41633 - (unaryfunc)0, /*nb_positive*/
41634 - (unaryfunc)0, /*nb_absolute*/
41635 - (inquiry)0, /*nb_nonzero*/
41636 - 0, /*nb_invert*/
41637 - 0, /*nb_lshift*/
41638 - 0, /*nb_rshift*/
41639 - 0, /*nb_and*/
41640 - 0, /*nb_xor*/
41641 - 0, /*nb_or*/
41642 -#if PY_VERSION_HEX < 0x03000000
41643 - 0, /*nb_coerce*/
41644 -#endif
41645 - (unaryfunc)SwigPyObject_long, /*nb_int*/
41646 -#if PY_VERSION_HEX < 0x03000000
41647 - (unaryfunc)SwigPyObject_long, /*nb_long*/
41648 -#else
41649 - 0, /*nb_reserved*/
41650 -#endif
41651 - (unaryfunc)0, /*nb_float*/
41652 -#if PY_VERSION_HEX < 0x03000000
41653 - (unaryfunc)SwigPyObject_oct, /*nb_oct*/
41654 - (unaryfunc)SwigPyObject_hex, /*nb_hex*/
41655 -#endif
41656 -#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
41657 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
41658 -#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
41659 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
41660 -#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
41661 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
41662 -#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
41663 - 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
41664 -#endif
41665 - };
41666 -
41667 - static PyTypeObject swigpyobject_type;
41668 - static int type_init = 0;
41669 - if (!type_init) {
41670 - const PyTypeObject tmp = {
41671 - /* PyObject header changed in Python 3 */
41672 -#if PY_VERSION_HEX >= 0x03000000
41673 - PyVarObject_HEAD_INIT(NULL, 0)
41674 -#else
41675 - PyObject_HEAD_INIT(NULL)
41676 - 0, /* ob_size */
41677 -#endif
41678 - (char *)"SwigPyObject", /* tp_name */
41679 - sizeof(SwigPyObject), /* tp_basicsize */
41680 - 0, /* tp_itemsize */
41681 - (destructor)SwigPyObject_dealloc, /* tp_dealloc */
41682 - (printfunc)SwigPyObject_print, /* tp_print */
41683 -#if PY_VERSION_HEX < 0x02020000
41684 - (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
41685 -#else
41686 - (getattrfunc)0, /* tp_getattr */
41687 -#endif
41688 - (setattrfunc)0, /* tp_setattr */
41689 -#if PY_VERSION_HEX >= 0x03000000
41690 - 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
41691 -#else
41692 - (cmpfunc)SwigPyObject_compare, /* tp_compare */
41693 -#endif
41694 - (reprfunc)SwigPyObject_repr, /* tp_repr */
41695 - &SwigPyObject_as_number, /* tp_as_number */
41696 - 0, /* tp_as_sequence */
41697 - 0, /* tp_as_mapping */
41698 - (hashfunc)0, /* tp_hash */
41699 - (ternaryfunc)0, /* tp_call */
41700 - (reprfunc)SwigPyObject_str, /* tp_str */
41701 - PyObject_GenericGetAttr, /* tp_getattro */
41702 - 0, /* tp_setattro */
41703 - 0, /* tp_as_buffer */
41704 - Py_TPFLAGS_DEFAULT, /* tp_flags */
41705 - swigobject_doc, /* tp_doc */
41706 - 0, /* tp_traverse */
41707 - 0, /* tp_clear */
41708 - (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
41709 - 0, /* tp_weaklistoffset */
41710 -#if PY_VERSION_HEX >= 0x02020000
41711 - 0, /* tp_iter */
41712 - 0, /* tp_iternext */
41713 - swigobject_methods, /* tp_methods */
41714 - 0, /* tp_members */
41715 - 0, /* tp_getset */
41716 - 0, /* tp_base */
41717 - 0, /* tp_dict */
41718 - 0, /* tp_descr_get */
41719 - 0, /* tp_descr_set */
41720 - 0, /* tp_dictoffset */
41721 - 0, /* tp_init */
41722 - 0, /* tp_alloc */
41723 - 0, /* tp_new */
41724 - 0, /* tp_free */
41725 - 0, /* tp_is_gc */
41726 - 0, /* tp_bases */
41727 - 0, /* tp_mro */
41728 - 0, /* tp_cache */
41729 - 0, /* tp_subclasses */
41730 - 0, /* tp_weaklist */
41731 -#endif
41732 -#if PY_VERSION_HEX >= 0x02030000
41733 - 0, /* tp_del */
41734 -#endif
41735 -#if PY_VERSION_HEX >= 0x02060000
41736 - 0, /* tp_version */
41737 -#endif
41738 -#ifdef COUNT_ALLOCS
41739 - 0,0,0,0 /* tp_alloc -> tp_next */
41740 -#endif
41741 - };
41742 - swigpyobject_type = tmp;
41743 - type_init = 1;
41744 -#if PY_VERSION_HEX < 0x02020000
41745 - swigpyobject_type.ob_type = &PyType_Type;
41746 -#else
41747 - if (PyType_Ready(&swigpyobject_type) < 0)
41748 - return NULL;
41749 -#endif
41750 - }
41751 - return &swigpyobject_type;
41752 -}
41753 -
41754 -SWIGRUNTIME PyObject *
41755 -SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
41756 -{
41757 - SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
41758 - if (sobj) {
41759 - sobj->ptr = ptr;
41760 - sobj->ty = ty;
41761 - sobj->own = own;
41762 - sobj->next = 0;
41763 - }
41764 - return (PyObject *)sobj;
41765 -}
41766 -
41767 -/* -----------------------------------------------------------------------------
41768 - * Implements a simple Swig Packed type, and use it instead of string
41769 - * ----------------------------------------------------------------------------- */
41770 -
41771 -typedef struct {
41772 - PyObject_HEAD
41773 - void *pack;
41774 - swig_type_info *ty;
41775 - size_t size;
41776 -} SwigPyPacked;
41777 -
41778 -SWIGRUNTIME int
41779 -SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
41780 -{
41781 - char result[SWIG_BUFFER_SIZE];
41782 - fputs("<Swig Packed ", fp);
41783 - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
41784 - fputs("at ", fp);
41785 - fputs(result, fp);
41786 - }
41787 - fputs(v->ty->name,fp);
41788 - fputs(">", fp);
41789 - return 0;
41790 -}
41791 -
41792 -SWIGRUNTIME PyObject *
41793 -SwigPyPacked_repr(SwigPyPacked *v)
41794 -{
41795 - char result[SWIG_BUFFER_SIZE];
41796 - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
41797 - return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
41798 - } else {
41799 - return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
41800 - }
41801 -}
41802 -
41803 -SWIGRUNTIME PyObject *
41804 -SwigPyPacked_str(SwigPyPacked *v)
41805 -{
41806 - char result[SWIG_BUFFER_SIZE];
41807 - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
41808 - return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
41809 - } else {
41810 - return SWIG_Python_str_FromChar(v->ty->name);
41811 - }
41812 -}
41813 -
41814 -SWIGRUNTIME int
41815 -SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
41816 -{
41817 - size_t i = v->size;
41818 - size_t j = w->size;
41819 - int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
41820 - return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
41821 -}
41822 -
41823 -SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
41824 -
41825 -SWIGRUNTIME PyTypeObject*
41826 -SwigPyPacked_type(void) {
41827 - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
41828 - return type;
41829 -}
41830 -
41831 -SWIGRUNTIMEINLINE int
41832 -SwigPyPacked_Check(PyObject *op) {
41833 - return ((op)->ob_type == SwigPyPacked_TypeOnce())
41834 - || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
41835 -}
41836 -
41837 -SWIGRUNTIME void
41838 -SwigPyPacked_dealloc(PyObject *v)
41839 -{
41840 - if (SwigPyPacked_Check(v)) {
41841 - SwigPyPacked *sobj = (SwigPyPacked *) v;
41842 - free(sobj->pack);
41843 - }
41844 - PyObject_DEL(v);
41845 -}
41846 -
41847 -SWIGRUNTIME PyTypeObject*
41848 -SwigPyPacked_TypeOnce(void) {
41849 - static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
41850 - static PyTypeObject swigpypacked_type;
41851 - static int type_init = 0;
41852 - if (!type_init) {
41853 - const PyTypeObject tmp = {
41854 - /* PyObject header changed in Python 3 */
41855 -#if PY_VERSION_HEX>=0x03000000
41856 - PyVarObject_HEAD_INIT(NULL, 0)
41857 -#else
41858 - PyObject_HEAD_INIT(NULL)
41859 - 0, /* ob_size */
41860 -#endif
41861 - (char *)"SwigPyPacked", /* tp_name */
41862 - sizeof(SwigPyPacked), /* tp_basicsize */
41863 - 0, /* tp_itemsize */
41864 - (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
41865 - (printfunc)SwigPyPacked_print, /* tp_print */
41866 - (getattrfunc)0, /* tp_getattr */
41867 - (setattrfunc)0, /* tp_setattr */
41868 -#if PY_VERSION_HEX>=0x03000000
41869 - 0, /* tp_reserved in 3.0.1 */
41870 -#else
41871 - (cmpfunc)SwigPyPacked_compare, /* tp_compare */
41872 -#endif
41873 - (reprfunc)SwigPyPacked_repr, /* tp_repr */
41874 - 0, /* tp_as_number */
41875 - 0, /* tp_as_sequence */
41876 - 0, /* tp_as_mapping */
41877 - (hashfunc)0, /* tp_hash */
41878 - (ternaryfunc)0, /* tp_call */
41879 - (reprfunc)SwigPyPacked_str, /* tp_str */
41880 - PyObject_GenericGetAttr, /* tp_getattro */
41881 - 0, /* tp_setattro */
41882 - 0, /* tp_as_buffer */
41883 - Py_TPFLAGS_DEFAULT, /* tp_flags */
41884 - swigpacked_doc, /* tp_doc */
41885 - 0, /* tp_traverse */
41886 - 0, /* tp_clear */
41887 - 0, /* tp_richcompare */
41888 - 0, /* tp_weaklistoffset */
41889 -#if PY_VERSION_HEX >= 0x02020000
41890 - 0, /* tp_iter */
41891 - 0, /* tp_iternext */
41892 - 0, /* tp_methods */
41893 - 0, /* tp_members */
41894 - 0, /* tp_getset */
41895 - 0, /* tp_base */
41896 - 0, /* tp_dict */
41897 - 0, /* tp_descr_get */
41898 - 0, /* tp_descr_set */
41899 - 0, /* tp_dictoffset */
41900 - 0, /* tp_init */
41901 - 0, /* tp_alloc */
41902 - 0, /* tp_new */
41903 - 0, /* tp_free */
41904 - 0, /* tp_is_gc */
41905 - 0, /* tp_bases */
41906 - 0, /* tp_mro */
41907 - 0, /* tp_cache */
41908 - 0, /* tp_subclasses */
41909 - 0, /* tp_weaklist */
41910 -#endif
41911 -#if PY_VERSION_HEX >= 0x02030000
41912 - 0, /* tp_del */
41913 -#endif
41914 -#if PY_VERSION_HEX >= 0x02060000
41915 - 0, /* tp_version */
41916 -#endif
41917 -#ifdef COUNT_ALLOCS
41918 - 0,0,0,0 /* tp_alloc -> tp_next */
41919 -#endif
41920 - };
41921 - swigpypacked_type = tmp;
41922 - type_init = 1;
41923 -#if PY_VERSION_HEX < 0x02020000
41924 - swigpypacked_type.ob_type = &PyType_Type;
41925 -#else
41926 - if (PyType_Ready(&swigpypacked_type) < 0)
41927 - return NULL;
41928 -#endif
41929 - }
41930 - return &swigpypacked_type;
41931 -}
41932 -
41933 -SWIGRUNTIME PyObject *
41934 -SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
41935 -{
41936 - SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
41937 - if (sobj) {
41938 - void *pack = malloc(size);
41939 - if (pack) {
41940 - memcpy(pack, ptr, size);
41941 - sobj->pack = pack;
41942 - sobj->ty = ty;
41943 - sobj->size = size;
41944 - } else {
41945 - PyObject_DEL((PyObject *) sobj);
41946 - sobj = 0;
41947 - }
41948 - }
41949 - return (PyObject *) sobj;
41950 -}
41951 -
41952 -SWIGRUNTIME swig_type_info *
41953 -SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
41954 -{
41955 - if (SwigPyPacked_Check(obj)) {
41956 - SwigPyPacked *sobj = (SwigPyPacked *)obj;
41957 - if (sobj->size != size) return 0;
41958 - memcpy(ptr, sobj->pack, size);
41959 - return sobj->ty;
41960 - } else {
41961 - return 0;
41962 - }
41963 -}
41964 -
41965 -/* -----------------------------------------------------------------------------
41966 - * pointers/data manipulation
41967 - * ----------------------------------------------------------------------------- */
41968 -
41969 -SWIGRUNTIMEINLINE PyObject *
41970 -_SWIG_This(void)
41971 -{
41972 - return SWIG_Python_str_FromChar("this");
41973 -}
41974 -
41975 -static PyObject *swig_this = NULL;
41976 -
41977 -SWIGRUNTIME PyObject *
41978 -SWIG_This(void)
41979 -{
41980 - if (swig_this == NULL)
41981 - swig_this = _SWIG_This();
41982 - return swig_this;
41983 -}
41984 -
41985 -/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
41986 -
41987 -/* TODO: I don't know how to implement the fast getset in Python 3 right now */
41988 -#if PY_VERSION_HEX>=0x03000000
41989 -#define SWIG_PYTHON_SLOW_GETSET_THIS
41990 -#endif
41991 -
41992 -SWIGRUNTIME SwigPyObject *
41993 -SWIG_Python_GetSwigThis(PyObject *pyobj)
41994 -{
41995 - PyObject *obj;
41996 -
41997 - if (SwigPyObject_Check(pyobj))
41998 - return (SwigPyObject *) pyobj;
41999 -
42000 -#ifdef SWIGPYTHON_BUILTIN
42001 - (void)obj;
42002 -# ifdef PyWeakref_CheckProxy
42003 - if (PyWeakref_CheckProxy(pyobj)) {
42004 - pyobj = PyWeakref_GET_OBJECT(pyobj);
42005 - if (pyobj && SwigPyObject_Check(pyobj))
42006 - return (SwigPyObject*) pyobj;
42007 - }
42008 -# endif
42009 - return NULL;
42010 -#else
42011 -
42012 - obj = 0;
42013 -
42014 -#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
42015 - if (PyInstance_Check(pyobj)) {
42016 - obj = _PyInstance_Lookup(pyobj, SWIG_This());
42017 - } else {
42018 - PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
42019 - if (dictptr != NULL) {
42020 - PyObject *dict = *dictptr;
42021 - obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
42022 - } else {
42023 -#ifdef PyWeakref_CheckProxy
42024 - if (PyWeakref_CheckProxy(pyobj)) {
42025 - PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
42026 - return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
42027 - }
42028 -#endif
42029 - obj = PyObject_GetAttr(pyobj,SWIG_This());
42030 - if (obj) {
42031 - Py_DECREF(obj);
42032 - } else {
42033 - if (PyErr_Occurred()) PyErr_Clear();
42034 - return 0;
42035 - }
42036 - }
42037 - }
42038 -#else
42039 - obj = PyObject_GetAttr(pyobj,SWIG_This());
42040 - if (obj) {
42041 - Py_DECREF(obj);
42042 - } else {
42043 - if (PyErr_Occurred()) PyErr_Clear();
42044 - return 0;
42045 - }
42046 -#endif
42047 - if (obj && !SwigPyObject_Check(obj)) {
42048 - /* a PyObject is called 'this', try to get the 'real this'
42049 - SwigPyObject from it */
42050 - return SWIG_Python_GetSwigThis(obj);
42051 - }
42052 - return (SwigPyObject *)obj;
42053 -#endif
42054 -}
42055 -
42056 -/* Acquire a pointer value */
42057 -
42058 -SWIGRUNTIME int
42059 -SWIG_Python_AcquirePtr(PyObject *obj, int own) {
42060 - if (own == SWIG_POINTER_OWN) {
42061 - SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
42062 - if (sobj) {
42063 - int oldown = sobj->own;
42064 - sobj->own = own;
42065 - return oldown;
42066 - }
42067 - }
42068 - return 0;
42069 -}
42070 -
42071 -/* Convert a pointer value */
42072 -
42073 -SWIGRUNTIME int
42074 -SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
42075 - int res;
42076 - SwigPyObject *sobj;
42077 -
42078 - if (!obj)
42079 - return SWIG_ERROR;
42080 - if (obj == Py_None) {
42081 - if (ptr)
42082 - *ptr = 0;
42083 - return SWIG_OK;
42084 - }
42085 -
42086 - res = SWIG_ERROR;
42087 -
42088 - sobj = SWIG_Python_GetSwigThis(obj);
42089 - if (own)
42090 - *own = 0;
42091 - while (sobj) {
42092 - void *vptr = sobj->ptr;
42093 - if (ty) {
42094 - swig_type_info *to = sobj->ty;
42095 - if (to == ty) {
42096 - /* no type cast needed */
42097 - if (ptr) *ptr = vptr;
42098 - break;
42099 - } else {
42100 - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
42101 - if (!tc) {
42102 - sobj = (SwigPyObject *)sobj->next;
42103 - } else {
42104 - if (ptr) {
42105 - int newmemory = 0;
42106 - *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
42107 - if (newmemory == SWIG_CAST_NEW_MEMORY) {
42108 - assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
42109 - if (own)
42110 - *own = *own | SWIG_CAST_NEW_MEMORY;
42111 - }
42112 - }
42113 - break;
42114 - }
42115 - }
42116 - } else {
42117 - if (ptr) *ptr = vptr;
42118 - break;
42119 - }
42120 - }
42121 - if (sobj) {
42122 - if (own)
42123 - *own = *own | sobj->own;
42124 - if (flags & SWIG_POINTER_DISOWN) {
42125 - sobj->own = 0;
42126 - }
42127 - res = SWIG_OK;
42128 - } else {
42129 - if (flags & SWIG_POINTER_IMPLICIT_CONV) {
42130 - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
42131 - if (data && !data->implicitconv) {
42132 - PyObject *klass = data->klass;
42133 - if (klass) {
42134 - PyObject *impconv;
42135 - data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
42136 - impconv = SWIG_Python_CallFunctor(klass, obj);
42137 - data->implicitconv = 0;
42138 - if (PyErr_Occurred()) {
42139 - PyErr_Clear();
42140 - impconv = 0;
42141 - }
42142 - if (impconv) {
42143 - SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
42144 - if (iobj) {
42145 - void *vptr;
42146 - res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
42147 - if (SWIG_IsOK(res)) {
42148 - if (ptr) {
42149 - *ptr = vptr;
42150 - /* transfer the ownership to 'ptr' */
42151 - iobj->own = 0;
42152 - res = SWIG_AddCast(res);
42153 - res = SWIG_AddNewMask(res);
42154 - } else {
42155 - res = SWIG_AddCast(res);
42156 - }
42157 - }
42158 - }
42159 - Py_DECREF(impconv);
42160 - }
42161 - }
42162 - }
42163 - }
42164 - }
42165 - return res;
42166 -}
42167 -
42168 -/* Convert a function ptr value */
42169 -
42170 -SWIGRUNTIME int
42171 -SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
42172 - if (!PyCFunction_Check(obj)) {
42173 - return SWIG_ConvertPtr(obj, ptr, ty, 0);
42174 - } else {
42175 - void *vptr = 0;
42176 -
42177 - /* here we get the method pointer for callbacks */
42178 - const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
42179 - const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
42180 - if (desc)
42181 - desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
42182 - if (!desc)
42183 - return SWIG_ERROR;
42184 - if (ty) {
42185 - swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
42186 - if (tc) {
42187 - int newmemory = 0;
42188 - *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
42189 - assert(!newmemory); /* newmemory handling not yet implemented */
42190 - } else {
42191 - return SWIG_ERROR;
42192 - }
42193 - } else {
42194 - *ptr = vptr;
42195 - }
42196 - return SWIG_OK;
42197 - }
42198 -}
42199 -
42200 -/* Convert a packed value value */
42201 -
42202 -SWIGRUNTIME int
42203 -SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
42204 - swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
42205 - if (!to) return SWIG_ERROR;
42206 - if (ty) {
42207 - if (to != ty) {
42208 - /* check type cast? */
42209 - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
42210 - if (!tc) return SWIG_ERROR;
42211 - }
42212 - }
42213 - return SWIG_OK;
42214 -}
42215 -
42216 -/* -----------------------------------------------------------------------------
42217 - * Create a new pointer object
42218 - * ----------------------------------------------------------------------------- */
42219 -
42220 -/*
42221 - Create a new instance object, without calling __init__, and set the
42222 - 'this' attribute.
42223 -*/
42224 -
42225 -SWIGRUNTIME PyObject*
42226 -SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
42227 -{
42228 -#if (PY_VERSION_HEX >= 0x02020000)
42229 - PyObject *inst = 0;
42230 - PyObject *newraw = data->newraw;
42231 - if (newraw) {
42232 - inst = PyObject_Call(newraw, data->newargs, NULL);
42233 - if (inst) {
42234 -#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
42235 - PyObject **dictptr = _PyObject_GetDictPtr(inst);
42236 - if (dictptr != NULL) {
42237 - PyObject *dict = *dictptr;
42238 - if (dict == NULL) {
42239 - dict = PyDict_New();
42240 - *dictptr = dict;
42241 - PyDict_SetItem(dict, SWIG_This(), swig_this);
42242 - }
42243 - }
42244 -#else
42245 - PyObject *key = SWIG_This();
42246 - PyObject_SetAttr(inst, key, swig_this);
42247 -#endif
42248 - }
42249 - } else {
42250 -#if PY_VERSION_HEX >= 0x03000000
42251 - inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
42252 - if (inst) {
42253 - PyObject_SetAttr(inst, SWIG_This(), swig_this);
42254 - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
42255 - }
42256 -#else
42257 - PyObject *dict = PyDict_New();
42258 - if (dict) {
42259 - PyDict_SetItem(dict, SWIG_This(), swig_this);
42260 - inst = PyInstance_NewRaw(data->newargs, dict);
42261 - Py_DECREF(dict);
42262 - }
42263 -#endif
42264 - }
42265 - return inst;
42266 -#else
42267 -#if (PY_VERSION_HEX >= 0x02010000)
42268 - PyObject *inst = 0;
42269 - PyObject *dict = PyDict_New();
42270 - if (dict) {
42271 - PyDict_SetItem(dict, SWIG_This(), swig_this);
42272 - inst = PyInstance_NewRaw(data->newargs, dict);
42273 - Py_DECREF(dict);
42274 - }
42275 - return (PyObject *) inst;
42276 -#else
42277 - PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
42278 - if (inst == NULL) {
42279 - return NULL;
42280 - }
42281 - inst->in_class = (PyClassObject *)data->newargs;
42282 - Py_INCREF(inst->in_class);
42283 - inst->in_dict = PyDict_New();
42284 - if (inst->in_dict == NULL) {
42285 - Py_DECREF(inst);
42286 - return NULL;
42287 - }
42288 -#ifdef Py_TPFLAGS_HAVE_WEAKREFS
42289 - inst->in_weakreflist = NULL;
42290 -#endif
42291 -#ifdef Py_TPFLAGS_GC
42292 - PyObject_GC_Init(inst);
42293 -#endif
42294 - PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
42295 - return (PyObject *) inst;
42296 -#endif
42297 -#endif
42298 -}
42299 -
42300 -SWIGRUNTIME void
42301 -SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
42302 -{
42303 - PyObject *dict;
42304 -#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
42305 - PyObject **dictptr = _PyObject_GetDictPtr(inst);
42306 - if (dictptr != NULL) {
42307 - dict = *dictptr;
42308 - if (dict == NULL) {
42309 - dict = PyDict_New();
42310 - *dictptr = dict;
42311 - }
42312 - PyDict_SetItem(dict, SWIG_This(), swig_this);
42313 - return;
42314 - }
42315 -#endif
42316 - dict = PyObject_GetAttrString(inst, (char*)"__dict__");
42317 - PyDict_SetItem(dict, SWIG_This(), swig_this);
42318 - Py_DECREF(dict);
42319 -}
42320 -
42321 -
42322 -SWIGINTERN PyObject *
42323 -SWIG_Python_InitShadowInstance(PyObject *args) {
42324 - PyObject *obj[2];
42325 - if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
42326 - return NULL;
42327 - } else {
42328 - SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
42329 - if (sthis) {
42330 - SwigPyObject_append((PyObject*) sthis, obj[1]);
42331 - } else {
42332 - SWIG_Python_SetSwigThis(obj[0], obj[1]);
42333 - }
42334 - return SWIG_Py_Void();
42335 - }
42336 -}
42337 -
42338 -/* Create a new pointer object */
42339 -
42340 -SWIGRUNTIME PyObject *
42341 -SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
42342 - SwigPyClientData *clientdata;
42343 - PyObject * robj;
42344 - int own;
42345 -
42346 - if (!ptr)
42347 - return SWIG_Py_Void();
42348 -
42349 - clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
42350 - own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
42351 - if (clientdata && clientdata->pytype) {
42352 - SwigPyObject *newobj;
42353 - if (flags & SWIG_BUILTIN_TP_INIT) {
42354 - newobj = (SwigPyObject*) self;
42355 - if (newobj->ptr) {
42356 - PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
42357 - while (newobj->next)
42358 - newobj = (SwigPyObject *) newobj->next;
42359 - newobj->next = next_self;
42360 - newobj = (SwigPyObject *)next_self;
42361 - }
42362 - } else {
42363 - newobj = PyObject_New(SwigPyObject, clientdata->pytype);
42364 - }
42365 - if (newobj) {
42366 - newobj->ptr = ptr;
42367 - newobj->ty = type;
42368 - newobj->own = own;
42369 - newobj->next = 0;
42370 -#ifdef SWIGPYTHON_BUILTIN
42371 - newobj->dict = 0;
42372 -#endif
42373 - return (PyObject*) newobj;
42374 - }
42375 - return SWIG_Py_Void();
42376 - }
42377 -
42378 - assert(!(flags & SWIG_BUILTIN_TP_INIT));
42379 -
42380 - robj = SwigPyObject_New(ptr, type, own);
42381 - if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
42382 - PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
42383 - Py_DECREF(robj);
42384 - robj = inst;
42385 - }
42386 - return robj;
42387 -}
42388 -
42389 -/* Create a new packed object */
42390 -
42391 -SWIGRUNTIMEINLINE PyObject *
42392 -SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
42393 - return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
42394 -}
42395 -
42396 -/* -----------------------------------------------------------------------------*
42397 - * Get type list
42398 - * -----------------------------------------------------------------------------*/
42399 -
42400 -#ifdef SWIG_LINK_RUNTIME
42401 -void *SWIG_ReturnGlobalTypeList(void *);
42402 -#endif
42403 -
42404 -SWIGRUNTIME swig_module_info *
42405 -SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
42406 - static void *type_pointer = (void *)0;
42407 - /* first check if module already created */
42408 - if (!type_pointer) {
42409 -#ifdef SWIG_LINK_RUNTIME
42410 - type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
42411 -#else
42412 -# ifdef SWIGPY_USE_CAPSULE
42413 - type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
42414 -# else
42415 - type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
42416 - (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
42417 -# endif
42418 - if (PyErr_Occurred()) {
42419 - PyErr_Clear();
42420 - type_pointer = (void *)0;
42421 - }
42422 -#endif
42423 - }
42424 - return (swig_module_info *) type_pointer;
42425 -}
42426 -
42427 -#if PY_MAJOR_VERSION < 2
42428 -/* PyModule_AddObject function was introduced in Python 2.0. The following function
42429 - is copied out of Python/modsupport.c in python version 2.3.4 */
42430 -SWIGINTERN int
42431 -PyModule_AddObject(PyObject *m, char *name, PyObject *o)
42432 -{
42433 - PyObject *dict;
42434 - if (!PyModule_Check(m)) {
42435 - PyErr_SetString(PyExc_TypeError,
42436 - "PyModule_AddObject() needs module as first arg");
42437 - return SWIG_ERROR;
42438 - }
42439 - if (!o) {
42440 - PyErr_SetString(PyExc_TypeError,
42441 - "PyModule_AddObject() needs non-NULL value");
42442 - return SWIG_ERROR;
42443 - }
42444 -
42445 - dict = PyModule_GetDict(m);
42446 - if (dict == NULL) {
42447 - /* Internal error -- modules must have a dict! */
42448 - PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
42449 - PyModule_GetName(m));
42450 - return SWIG_ERROR;
42451 - }
42452 - if (PyDict_SetItemString(dict, name, o))
42453 - return SWIG_ERROR;
42454 - Py_DECREF(o);
42455 - return SWIG_OK;
42456 -}
42457 -#endif
42458 -
42459 -SWIGRUNTIME void
42460 -#ifdef SWIGPY_USE_CAPSULE
42461 -SWIG_Python_DestroyModule(PyObject *obj)
42462 -#else
42463 -SWIG_Python_DestroyModule(void *vptr)
42464 -#endif
42465 -{
42466 -#ifdef SWIGPY_USE_CAPSULE
42467 - swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
42468 -#else
42469 - swig_module_info *swig_module = (swig_module_info *) vptr;
42470 -#endif
42471 - swig_type_info **types = swig_module->types;
42472 - size_t i;
42473 - for (i =0; i < swig_module->size; ++i) {
42474 - swig_type_info *ty = types[i];
42475 - if (ty->owndata) {
42476 - SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
42477 - if (data) SwigPyClientData_Del(data);
42478 - }
42479 - }
42480 - Py_DECREF(SWIG_This());
42481 - swig_this = NULL;
42482 -}
42483 -
42484 -SWIGRUNTIME void
42485 -SWIG_Python_SetModule(swig_module_info *swig_module) {
42486 -#if PY_VERSION_HEX >= 0x03000000
42487 - /* Add a dummy module object into sys.modules */
42488 - PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
42489 -#else
42490 - static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
42491 - PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
42492 -#endif
42493 -#ifdef SWIGPY_USE_CAPSULE
42494 - PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
42495 - if (pointer && module) {
42496 - PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
42497 - } else {
42498 - Py_XDECREF(pointer);
42499 - }
42500 -#else
42501 - PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
42502 - if (pointer && module) {
42503 - PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
42504 - } else {
42505 - Py_XDECREF(pointer);
42506 - }
42507 -#endif
42508 -}
42509 -
42510 -/* The python cached type query */
42511 -SWIGRUNTIME PyObject *
42512 -SWIG_Python_TypeCache(void) {
42513 - static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
42514 - return cache;
42515 -}
42516 -
42517 -SWIGRUNTIME swig_type_info *
42518 -SWIG_Python_TypeQuery(const char *type)
42519 -{
42520 - PyObject *cache = SWIG_Python_TypeCache();
42521 - PyObject *key = SWIG_Python_str_FromChar(type);
42522 - PyObject *obj = PyDict_GetItem(cache, key);
42523 - swig_type_info *descriptor;
42524 - if (obj) {
42525 -#ifdef SWIGPY_USE_CAPSULE
42526 - descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
42527 -#else
42528 - descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
42529 -#endif
42530 - } else {
42531 - swig_module_info *swig_module = SWIG_GetModule(0);
42532 - descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
42533 - if (descriptor) {
42534 -#ifdef SWIGPY_USE_CAPSULE
42535 - obj = PyCapsule_New((void*) descriptor, NULL, NULL);
42536 -#else
42537 - obj = PyCObject_FromVoidPtr(descriptor, NULL);
42538 -#endif
42539 - PyDict_SetItem(cache, key, obj);
42540 - Py_DECREF(obj);
42541 - }
42542 - }
42543 - Py_DECREF(key);
42544 - return descriptor;
42545 -}
42546 -
42547 -/*
42548 - For backward compatibility only
42549 -*/
42550 -#define SWIG_POINTER_EXCEPTION 0
42551 -#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
42552 -#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
42553 -
42554 -SWIGRUNTIME int
42555 -SWIG_Python_AddErrMesg(const char* mesg, int infront)
42556 -{
42557 - if (PyErr_Occurred()) {
42558 - PyObject *type = 0;
42559 - PyObject *value = 0;
42560 - PyObject *traceback = 0;
42561 - PyErr_Fetch(&type, &value, &traceback);
42562 - if (value) {
42563 - char *tmp;
42564 - PyObject *old_str = PyObject_Str(value);
42565 - Py_XINCREF(type);
42566 - PyErr_Clear();
42567 - if (infront) {
42568 - PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
42569 - } else {
42570 - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
42571 - }
42572 - SWIG_Python_str_DelForPy3(tmp);
42573 - Py_DECREF(old_str);
42574 - }
42575 - return 1;
42576 - } else {
42577 - return 0;
42578 - }
42579 -}
42580 -
42581 -SWIGRUNTIME int
42582 -SWIG_Python_ArgFail(int argnum)
42583 -{
42584 - if (PyErr_Occurred()) {
42585 - /* add information about failing argument */
42586 - char mesg[256];
42587 - PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
42588 - return SWIG_Python_AddErrMesg(mesg, 1);
42589 - } else {
42590 - return 0;
42591 - }
42592 -}
42593 -
42594 -SWIGRUNTIMEINLINE const char *
42595 -SwigPyObject_GetDesc(PyObject *self)
42596 -{
42597 - SwigPyObject *v = (SwigPyObject *)self;
42598 - swig_type_info *ty = v ? v->ty : 0;
42599 - return ty ? ty->str : "";
42600 -}
42601 -
42602 -SWIGRUNTIME void
42603 -SWIG_Python_TypeError(const char *type, PyObject *obj)
42604 -{
42605 - if (type) {
42606 -#if defined(SWIG_COBJECT_TYPES)
42607 - if (obj && SwigPyObject_Check(obj)) {
42608 - const char *otype = (const char *) SwigPyObject_GetDesc(obj);
42609 - if (otype) {
42610 - PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
42611 - type, otype);
42612 - return;
42613 - }
42614 - } else
42615 -#endif
42616 - {
42617 - const char *otype = (obj ? obj->ob_type->tp_name : 0);
42618 - if (otype) {
42619 - PyObject *str = PyObject_Str(obj);
42620 - const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
42621 - if (cstr) {
42622 - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
42623 - type, otype, cstr);
42624 - SWIG_Python_str_DelForPy3(cstr);
42625 - } else {
42626 - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
42627 - type, otype);
42628 - }
42629 - Py_XDECREF(str);
42630 - return;
42631 - }
42632 - }
42633 - PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
42634 - } else {
42635 - PyErr_Format(PyExc_TypeError, "unexpected type is received");
42636 - }
42637 -}
42638 -
42639 -
42640 -/* Convert a pointer value, signal an exception on a type mismatch */
42641 -SWIGRUNTIME void *
42642 -SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
42643 - void *result;
42644 - if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
42645 - PyErr_Clear();
42646 -#if SWIG_POINTER_EXCEPTION
42647 - if (flags) {
42648 - SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
42649 - SWIG_Python_ArgFail(argnum);
42650 - }
42651 -#endif
42652 - }
42653 - return result;
42654 -}
42655 -
42656 -#ifdef SWIGPYTHON_BUILTIN
42657 -SWIGRUNTIME int
42658 -SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
42659 - PyTypeObject *tp = obj->ob_type;
42660 - PyObject *descr;
42661 - PyObject *encoded_name;
42662 - descrsetfunc f;
42663 - int res;
42664 -
42665 -# ifdef Py_USING_UNICODE
42666 - if (PyString_Check(name)) {
42667 - name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
42668 - if (!name)
42669 - return -1;
42670 - } else if (!PyUnicode_Check(name))
42671 -# else
42672 - if (!PyString_Check(name))
42673 -# endif
42674 - {
42675 - PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
42676 - return -1;
42677 - } else {
42678 - Py_INCREF(name);
42679 - }
42680 -
42681 - if (!tp->tp_dict) {
42682 - if (PyType_Ready(tp) < 0)
42683 - goto done;
42684 - }
42685 -
42686 - res = -1;
42687 - descr = _PyType_Lookup(tp, name);
42688 - f = NULL;
42689 - if (descr != NULL)
42690 - f = descr->ob_type->tp_descr_set;
42691 - if (!f) {
42692 - if (PyString_Check(name)) {
42693 - encoded_name = name;
42694 - Py_INCREF(name);
42695 - } else {
42696 - encoded_name = PyUnicode_AsUTF8String(name);
42697 - }
42698 - PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
42699 - Py_DECREF(encoded_name);
42700 - } else {
42701 - res = f(descr, obj, value);
42702 - }
42703 -
42704 - done:
42705 - Py_DECREF(name);
42706 - return res;
42707 -}
42708 -#endif
42709 -
42710 -
42711 -#ifdef __cplusplus
42712 -}
42713 -#endif
42714 -
42715 -
42716 -
42717 -#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
42718 -
42719 -#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
42720 -
42721 -
42722 -
42723 -/* -------- TYPES TABLE (BEGIN) -------- */
42724 -
42725 -#define SWIGTYPE_p_char swig_types[0]
42726 -#define SWIGTYPE_p_im_col_tab_disp swig_types[1]
42727 -#define SWIGTYPE_p_matrix swig_types[2]
42728 -#define SWIGTYPE_p_vips__VDisplay swig_types[3]
42729 -#define SWIGTYPE_p_vips__VError swig_types[4]
42730 -#define SWIGTYPE_p_void swig_types[5]
42731 -static swig_type_info *swig_types[7];
42732 -static swig_module_info swig_module = {swig_types, 6, 0, 0, 0, 0};
42733 -#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
42734 -#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
42735 -
42736 -/* -------- TYPES TABLE (END) -------- */
42737 -
42738 -#if (PY_VERSION_HEX <= 0x02000000)
42739 -# if !defined(SWIG_PYTHON_CLASSIC)
42740 -# error "This python version requires swig to be run with the '-classic' option"
42741 -# endif
42742 -#endif
42743 -
42744 -/*-----------------------------------------------
42745 - @(target):= vdisplaymodule.so
42746 - ------------------------------------------------*/
42747 -#if PY_VERSION_HEX >= 0x03000000
42748 -# define SWIG_init PyInit_vdisplaymodule
42749 -
42750 -#else
42751 -# define SWIG_init initvdisplaymodule
42752 -
42753 -#endif
42754 -#define SWIG_name "vdisplaymodule"
42755 -
42756 -#define SWIGVERSION 0x020010
42757 -#define SWIG_VERSION SWIGVERSION
42758 -
42759 -
42760 -#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
42761 -#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
42762 -
42763 -
42764 -#include <stdexcept>
42765 -
42766 -
42767 -namespace swig {
42768 - class SwigPtr_PyObject {
42769 - protected:
42770 - PyObject *_obj;
42771 -
42772 - public:
42773 - SwigPtr_PyObject() :_obj(0)
42774 - {
42775 - }
42776 -
42777 - SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
42778 - {
42779 - Py_XINCREF(_obj);
42780 - }
42781 -
42782 - SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
42783 - {
42784 - if (initial_ref) {
42785 - Py_XINCREF(_obj);
42786 - }
42787 - }
42788 -
42789 - SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
42790 - {
42791 - Py_XINCREF(item._obj);
42792 - Py_XDECREF(_obj);
42793 - _obj = item._obj;
42794 - return *this;
42795 - }
42796 -
42797 - ~SwigPtr_PyObject()
42798 - {
42799 - Py_XDECREF(_obj);
42800 - }
42801 -
42802 - operator PyObject *() const
42803 - {
42804 - return _obj;
42805 - }
42806 -
42807 - PyObject *operator->() const
42808 - {
42809 - return _obj;
42810 - }
42811 - };
42812 -}
42813 -
42814 -
42815 -namespace swig {
42816 - struct SwigVar_PyObject : SwigPtr_PyObject {
42817 - SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
42818 -
42819 - SwigVar_PyObject & operator = (PyObject* obj)
42820 - {
42821 - Py_XDECREF(_obj);
42822 - _obj = obj;
42823 - return *this;
42824 - }
42825 - };
42826 -}
42827 -
42828 -
42829 -#include <vips/vipscpp.h>
42830 -
42831 -
42832 -SWIGINTERNINLINE PyObject*
42833 - SWIG_From_int (int value)
42834 -{
42835 - return PyInt_FromLong((long) value);
42836 -}
42837 -
42838 -
42839 -SWIGINTERN swig_type_info*
42840 -SWIG_pchar_descriptor(void)
42841 -{
42842 - static int init = 0;
42843 - static swig_type_info* info = 0;
42844 - if (!init) {
42845 - info = SWIG_TypeQuery("_p_char");
42846 - init = 1;
42847 - }
42848 - return info;
42849 -}
42850 -
42851 -
42852 -SWIGINTERN int
42853 -SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
42854 -{
42855 -#if PY_VERSION_HEX>=0x03000000
42856 - if (PyUnicode_Check(obj))
42857 -#else
42858 - if (PyString_Check(obj))
42859 -#endif
42860 - {
42861 - char *cstr; Py_ssize_t len;
42862 -#if PY_VERSION_HEX>=0x03000000
42863 - if (!alloc && cptr) {
42864 - /* We can't allow converting without allocation, since the internal
42865 - representation of string in Python 3 is UCS-2/UCS-4 but we require
42866 - a UTF-8 representation.
42867 - TODO(bhy) More detailed explanation */
42868 - return SWIG_RuntimeError;
42869 - }
42870 - obj = PyUnicode_AsUTF8String(obj);
42871 - PyBytes_AsStringAndSize(obj, &cstr, &len);
42872 - if(alloc) *alloc = SWIG_NEWOBJ;
42873 -#else
42874 - PyString_AsStringAndSize(obj, &cstr, &len);
42875 -#endif
42876 - if (cptr) {
42877 - if (alloc) {
42878 - /*
42879 - In python the user should not be able to modify the inner
42880 - string representation. To warranty that, if you define
42881 - SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
42882 - buffer is always returned.
42883 -
42884 - The default behavior is just to return the pointer value,
42885 - so, be careful.
42886 - */
42887 -#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
42888 - if (*alloc != SWIG_OLDOBJ)
42889 -#else
42890 - if (*alloc == SWIG_NEWOBJ)
42891 -#endif
42892 - {
42893 - *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
42894 - *alloc = SWIG_NEWOBJ;
42895 - }
42896 - else {
42897 - *cptr = cstr;
42898 - *alloc = SWIG_OLDOBJ;
42899 - }
42900 - } else {
42901 - #if PY_VERSION_HEX>=0x03000000
42902 - assert(0); /* Should never reach here in Python 3 */
42903 - #endif
42904 - *cptr = SWIG_Python_str_AsChar(obj);
42905 - }
42906 - }
42907 - if (psize) *psize = len + 1;
42908 -#if PY_VERSION_HEX>=0x03000000
42909 - Py_XDECREF(obj);
42910 -#endif
42911 - return SWIG_OK;
42912 - } else {
42913 - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
42914 - if (pchar_descriptor) {
42915 - void* vptr = 0;
42916 - if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
42917 - if (cptr) *cptr = (char *) vptr;
42918 - if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
42919 - if (alloc) *alloc = SWIG_OLDOBJ;
42920 - return SWIG_OK;
42921 - }
42922 - }
42923 - }
42924 - return SWIG_TypeError;
42925 -}
42926 -
42927 -
42928 -
42929 -
42930 -#ifdef __cplusplus
42931 -extern "C" {
42932 -#endif
42933 -SWIGINTERN PyObject *_wrap_new_VDisplay__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42934 - PyObject *resultobj = 0;
42935 - char *arg1 = (char *) 0 ;
42936 - int res1 ;
42937 - char *buf1 = 0 ;
42938 - int alloc1 = 0 ;
42939 - PyObject * obj0 = 0 ;
42940 - vips::VDisplay *result = 0 ;
42941 -
42942 - if (!PyArg_ParseTuple(args,(char *)"O:new_VDisplay",&obj0)) SWIG_fail;
42943 - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
42944 - if (!SWIG_IsOK(res1)) {
42945 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VDisplay" "', argument " "1"" of type '" "char const *""'");
42946 - }
42947 - arg1 = reinterpret_cast< char * >(buf1);
42948 - try {
42949 - result = (vips::VDisplay *)new vips::VDisplay((char const *)arg1);
42950 - }
42951 - catch(vips::VError &_e) {
42952 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
42953 - }
42954 -
42955 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDisplay, SWIG_POINTER_NEW | 0 );
42956 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
42957 - return resultobj;
42958 -fail:
42959 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
42960 - return NULL;
42961 -}
42962 -
42963 -
42964 -SWIGINTERN PyObject *_wrap_new_VDisplay__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42965 - PyObject *resultobj = 0;
42966 - vips::VDisplay *result = 0 ;
42967 -
42968 - if (!PyArg_ParseTuple(args,(char *)":new_VDisplay")) SWIG_fail;
42969 - result = (vips::VDisplay *)new vips::VDisplay();
42970 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDisplay, SWIG_POINTER_NEW | 0 );
42971 - return resultobj;
42972 -fail:
42973 - return NULL;
42974 -}
42975 -
42976 -
42977 -SWIGINTERN PyObject *_wrap_new_VDisplay__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42978 - PyObject *resultobj = 0;
42979 - vips::VDisplay *arg1 = 0 ;
42980 - void *argp1 = 0 ;
42981 - int res1 = 0 ;
42982 - PyObject * obj0 = 0 ;
42983 - vips::VDisplay *result = 0 ;
42984 -
42985 - if (!PyArg_ParseTuple(args,(char *)"O:new_VDisplay",&obj0)) SWIG_fail;
42986 - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_vips__VDisplay, 0 | 0);
42987 - if (!SWIG_IsOK(res1)) {
42988 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VDisplay" "', argument " "1"" of type '" "vips::VDisplay const &""'");
42989 - }
42990 - if (!argp1) {
42991 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VDisplay" "', argument " "1"" of type '" "vips::VDisplay const &""'");
42992 - }
42993 - arg1 = reinterpret_cast< vips::VDisplay * >(argp1);
42994 - result = (vips::VDisplay *)new vips::VDisplay((vips::VDisplay const &)*arg1);
42995 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDisplay, SWIG_POINTER_NEW | 0 );
42996 - return resultobj;
42997 -fail:
42998 - return NULL;
42999 -}
43000 -
43001 -
43002 -SWIGINTERN PyObject *_wrap_new_VDisplay(PyObject *self, PyObject *args) {
43003 - int argc;
43004 - PyObject *argv[2];
43005 - int ii;
43006 -
43007 - if (!PyTuple_Check(args)) SWIG_fail;
43008 - argc = args ? (int)PyObject_Length(args) : 0;
43009 - for (ii = 0; (ii < 1) && (ii < argc); ii++) {
43010 - argv[ii] = PyTuple_GET_ITEM(args,ii);
43011 - }
43012 - if (argc == 0) {
43013 - return _wrap_new_VDisplay__SWIG_1(self, args);
43014 - }
43015 - if (argc == 1) {
43016 - int _v;
43017 - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_vips__VDisplay, 0);
43018 - _v = SWIG_CheckState(res);
43019 - if (_v) {
43020 - return _wrap_new_VDisplay__SWIG_2(self, args);
43021 - }
43022 - }
43023 - if (argc == 1) {
43024 - int _v;
43025 - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
43026 - _v = SWIG_CheckState(res);
43027 - if (_v) {
43028 - return _wrap_new_VDisplay__SWIG_0(self, args);
43029 - }
43030 - }
43031 -
43032 -fail:
43033 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VDisplay'.\n"
43034 - " Possible C/C++ prototypes are:\n"
43035 - " vips::VDisplay::VDisplay(char const *)\n"
43036 - " vips::VDisplay::VDisplay()\n"
43037 - " vips::VDisplay::VDisplay(vips::VDisplay const &)\n");
43038 - return 0;
43039 -}
43040 -
43041 -
43042 -SWIGINTERN PyObject *_wrap_VDisplay___assign__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43043 - PyObject *resultobj = 0;
43044 - vips::VDisplay *arg1 = (vips::VDisplay *) 0 ;
43045 - vips::VDisplay *arg2 = 0 ;
43046 - void *argp1 = 0 ;
43047 - int res1 = 0 ;
43048 - void *argp2 = 0 ;
43049 - int res2 = 0 ;
43050 - PyObject * obj0 = 0 ;
43051 - PyObject * obj1 = 0 ;
43052 - vips::VDisplay *result = 0 ;
43053 -
43054 - if (!PyArg_ParseTuple(args,(char *)"OO:VDisplay___assign__",&obj0,&obj1)) SWIG_fail;
43055 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDisplay, 0 | 0 );
43056 - if (!SWIG_IsOK(res1)) {
43057 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDisplay___assign__" "', argument " "1"" of type '" "vips::VDisplay *""'");
43058 - }
43059 - arg1 = reinterpret_cast< vips::VDisplay * >(argp1);
43060 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDisplay, 0 | 0);
43061 - if (!SWIG_IsOK(res2)) {
43062 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VDisplay___assign__" "', argument " "2"" of type '" "vips::VDisplay const &""'");
43063 - }
43064 - if (!argp2) {
43065 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VDisplay___assign__" "', argument " "2"" of type '" "vips::VDisplay const &""'");
43066 - }
43067 - arg2 = reinterpret_cast< vips::VDisplay * >(argp2);
43068 - result = (vips::VDisplay *) &(arg1)->operator =((vips::VDisplay const &)*arg2);
43069 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDisplay, 0 | 0 );
43070 - return resultobj;
43071 -fail:
43072 - return NULL;
43073 -}
43074 -
43075 -
43076 -SWIGINTERN PyObject *_wrap_delete_VDisplay(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43077 - PyObject *resultobj = 0;
43078 - vips::VDisplay *arg1 = (vips::VDisplay *) 0 ;
43079 - void *argp1 = 0 ;
43080 - int res1 = 0 ;
43081 - PyObject * obj0 = 0 ;
43082 -
43083 - if (!PyArg_ParseTuple(args,(char *)"O:delete_VDisplay",&obj0)) SWIG_fail;
43084 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDisplay, SWIG_POINTER_DISOWN | 0 );
43085 - if (!SWIG_IsOK(res1)) {
43086 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VDisplay" "', argument " "1"" of type '" "vips::VDisplay *""'");
43087 - }
43088 - arg1 = reinterpret_cast< vips::VDisplay * >(argp1);
43089 - delete arg1;
43090 - resultobj = SWIG_Py_Void();
43091 - return resultobj;
43092 -fail:
43093 - return NULL;
43094 -}
43095 -
43096 -
43097 -SWIGINTERN PyObject *_wrap_VDisplay_disp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43098 - PyObject *resultobj = 0;
43099 - vips::VDisplay *arg1 = (vips::VDisplay *) 0 ;
43100 - void *argp1 = 0 ;
43101 - int res1 = 0 ;
43102 - PyObject * obj0 = 0 ;
43103 - void *result = 0 ;
43104 -
43105 - if (!PyArg_ParseTuple(args,(char *)"O:VDisplay_disp",&obj0)) SWIG_fail;
43106 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDisplay, 0 | 0 );
43107 - if (!SWIG_IsOK(res1)) {
43108 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDisplay_disp" "', argument " "1"" of type '" "vips::VDisplay const *""'");
43109 - }
43110 - arg1 = reinterpret_cast< vips::VDisplay * >(argp1);
43111 - result = (void *)((vips::VDisplay const *)arg1)->disp();
43112 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 );
43113 - return resultobj;
43114 -fail:
43115 - return NULL;
43116 -}
43117 -
43118 -
43119 -SWIGINTERN PyObject *_wrap_VDisplay_luts(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43120 - PyObject *resultobj = 0;
43121 - vips::VDisplay *arg1 = (vips::VDisplay *) 0 ;
43122 - void *argp1 = 0 ;
43123 - int res1 = 0 ;
43124 - PyObject * obj0 = 0 ;
43125 - im_col_tab_disp *result = 0 ;
43126 -
43127 - if (!PyArg_ParseTuple(args,(char *)"O:VDisplay_luts",&obj0)) SWIG_fail;
43128 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDisplay, 0 | 0 );
43129 - if (!SWIG_IsOK(res1)) {
43130 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDisplay_luts" "', argument " "1"" of type '" "vips::VDisplay const *""'");
43131 - }
43132 - arg1 = reinterpret_cast< vips::VDisplay * >(argp1);
43133 - try {
43134 - result = (im_col_tab_disp *)((vips::VDisplay const *)arg1)->luts();
43135 - }
43136 - catch(vips::VError &_e) {
43137 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
43138 - }
43139 -
43140 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_im_col_tab_disp, 0 | 0 );
43141 - return resultobj;
43142 -fail:
43143 - return NULL;
43144 -}
43145 -
43146 -
43147 -SWIGINTERN PyObject *VDisplay_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43148 - PyObject *obj;
43149 - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
43150 - SWIG_TypeNewClientData(SWIGTYPE_p_vips__VDisplay, SWIG_NewClientData(obj));
43151 - return SWIG_Py_Void();
43152 -}
43153 -
43154 -static PyMethodDef SwigMethods[] = {
43155 - { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
43156 - { (char *)"new_VDisplay", _wrap_new_VDisplay, METH_VARARGS, NULL},
43157 - { (char *)"VDisplay___assign__", _wrap_VDisplay___assign__, METH_VARARGS, NULL},
43158 - { (char *)"delete_VDisplay", _wrap_delete_VDisplay, METH_VARARGS, NULL},
43159 - { (char *)"VDisplay_disp", _wrap_VDisplay_disp, METH_VARARGS, NULL},
43160 - { (char *)"VDisplay_luts", _wrap_VDisplay_luts, METH_VARARGS, NULL},
43161 - { (char *)"VDisplay_swigregister", VDisplay_swigregister, METH_VARARGS, NULL},
43162 - { NULL, NULL, 0, NULL }
43163 -};
43164 -
43165 -
43166 -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
43167 -
43168 -static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
43169 -static swig_type_info _swigt__p_im_col_tab_disp = {"_p_im_col_tab_disp", "im_col_tab_disp *", 0, 0, (void*)0, 0};
43170 -static swig_type_info _swigt__p_matrix = {"_p_matrix", "matrix *", 0, 0, (void*)0, 0};
43171 -static swig_type_info _swigt__p_vips__VDisplay = {"_p_vips__VDisplay", "vips::VDisplay *", 0, 0, (void*)0, 0};
43172 -static swig_type_info _swigt__p_vips__VError = {"_p_vips__VError", "vips::VError *", 0, 0, (void*)0, 0};
43173 -static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};
43174 -
43175 -static swig_type_info *swig_type_initial[] = {
43176 - &_swigt__p_char,
43177 - &_swigt__p_im_col_tab_disp,
43178 - &_swigt__p_matrix,
43179 - &_swigt__p_vips__VDisplay,
43180 - &_swigt__p_vips__VError,
43181 - &_swigt__p_void,
43182 -};
43183 -
43184 -static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
43185 -static swig_cast_info _swigc__p_im_col_tab_disp[] = { {&_swigt__p_im_col_tab_disp, 0, 0, 0},{0, 0, 0, 0}};
43186 -static swig_cast_info _swigc__p_matrix[] = { {&_swigt__p_matrix, 0, 0, 0},{0, 0, 0, 0}};
43187 -static swig_cast_info _swigc__p_vips__VDisplay[] = { {&_swigt__p_vips__VDisplay, 0, 0, 0},{0, 0, 0, 0}};
43188 -static swig_cast_info _swigc__p_vips__VError[] = { {&_swigt__p_vips__VError, 0, 0, 0},{0, 0, 0, 0}};
43189 -static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
43190 -
43191 -static swig_cast_info *swig_cast_initial[] = {
43192 - _swigc__p_char,
43193 - _swigc__p_im_col_tab_disp,
43194 - _swigc__p_matrix,
43195 - _swigc__p_vips__VDisplay,
43196 - _swigc__p_vips__VError,
43197 - _swigc__p_void,
43198 -};
43199 -
43200 -
43201 -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
43202 -
43203 -static swig_const_info swig_const_table[] = {
43204 -{0, 0, 0, 0.0, 0, 0}};
43205 -
43206 -#ifdef __cplusplus
43207 -}
43208 -#endif
43209 -/* -----------------------------------------------------------------------------
43210 - * Type initialization:
43211 - * This problem is tough by the requirement that no dynamic
43212 - * memory is used. Also, since swig_type_info structures store pointers to
43213 - * swig_cast_info structures and swig_cast_info structures store pointers back
43214 - * to swig_type_info structures, we need some lookup code at initialization.
43215 - * The idea is that swig generates all the structures that are needed.
43216 - * The runtime then collects these partially filled structures.
43217 - * The SWIG_InitializeModule function takes these initial arrays out of
43218 - * swig_module, and does all the lookup, filling in the swig_module.types
43219 - * array with the correct data and linking the correct swig_cast_info
43220 - * structures together.
43221 - *
43222 - * The generated swig_type_info structures are assigned staticly to an initial
43223 - * array. We just loop through that array, and handle each type individually.
43224 - * First we lookup if this type has been already loaded, and if so, use the
43225 - * loaded structure instead of the generated one. Then we have to fill in the
43226 - * cast linked list. The cast data is initially stored in something like a
43227 - * two-dimensional array. Each row corresponds to a type (there are the same
43228 - * number of rows as there are in the swig_type_initial array). Each entry in
43229 - * a column is one of the swig_cast_info structures for that type.
43230 - * The cast_initial array is actually an array of arrays, because each row has
43231 - * a variable number of columns. So to actually build the cast linked list,
43232 - * we find the array of casts associated with the type, and loop through it
43233 - * adding the casts to the list. The one last trick we need to do is making
43234 - * sure the type pointer in the swig_cast_info struct is correct.
43235 - *
43236 - * First off, we lookup the cast->type name to see if it is already loaded.
43237 - * There are three cases to handle:
43238 - * 1) If the cast->type has already been loaded AND the type we are adding
43239 - * casting info to has not been loaded (it is in this module), THEN we
43240 - * replace the cast->type pointer with the type pointer that has already
43241 - * been loaded.
43242 - * 2) If BOTH types (the one we are adding casting info to, and the
43243 - * cast->type) are loaded, THEN the cast info has already been loaded by
43244 - * the previous module so we just ignore it.
43245 - * 3) Finally, if cast->type has not already been loaded, then we add that
43246 - * swig_cast_info to the linked list (because the cast->type) pointer will
43247 - * be correct.
43248 - * ----------------------------------------------------------------------------- */
43249 -
43250 -#ifdef __cplusplus
43251 -extern "C" {
43252 -#if 0
43253 -} /* c-mode */
43254 -#endif
43255 -#endif
43256 -
43257 -#if 0
43258 -#define SWIGRUNTIME_DEBUG
43259 -#endif
43260 -
43261 -
43262 -SWIGRUNTIME void
43263 -SWIG_InitializeModule(void *clientdata) {
43264 - size_t i;
43265 - swig_module_info *module_head, *iter;
43266 - int found, init;
43267 -
43268 - /* check to see if the circular list has been setup, if not, set it up */
43269 - if (swig_module.next==0) {
43270 - /* Initialize the swig_module */
43271 - swig_module.type_initial = swig_type_initial;
43272 - swig_module.cast_initial = swig_cast_initial;
43273 - swig_module.next = &swig_module;
43274 - init = 1;
43275 - } else {
43276 - init = 0;
43277 - }
43278 -
43279 - /* Try and load any already created modules */
43280 - module_head = SWIG_GetModule(clientdata);
43281 - if (!module_head) {
43282 - /* This is the first module loaded for this interpreter */
43283 - /* so set the swig module into the interpreter */
43284 - SWIG_SetModule(clientdata, &swig_module);
43285 - module_head = &swig_module;
43286 - } else {
43287 - /* the interpreter has loaded a SWIG module, but has it loaded this one? */
43288 - found=0;
43289 - iter=module_head;
43290 - do {
43291 - if (iter==&swig_module) {
43292 - found=1;
43293 - break;
43294 - }
43295 - iter=iter->next;
43296 - } while (iter!= module_head);
43297 -
43298 - /* if the is found in the list, then all is done and we may leave */
43299 - if (found) return;
43300 - /* otherwise we must add out module into the list */
43301 - swig_module.next = module_head->next;
43302 - module_head->next = &swig_module;
43303 - }
43304 -
43305 - /* When multiple interpeters are used, a module could have already been initialized in
43306 - a different interpreter, but not yet have a pointer in this interpreter.
43307 - In this case, we do not want to continue adding types... everything should be
43308 - set up already */
43309 - if (init == 0) return;
43310 -
43311 - /* Now work on filling in swig_module.types */
43312 -#ifdef SWIGRUNTIME_DEBUG
43313 - printf("SWIG_InitializeModule: size %d\n", swig_module.size);
43314 -#endif
43315 - for (i = 0; i < swig_module.size; ++i) {
43316 - swig_type_info *type = 0;
43317 - swig_type_info *ret;
43318 - swig_cast_info *cast;
43319 -
43320 -#ifdef SWIGRUNTIME_DEBUG
43321 - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
43322 -#endif
43323 -
43324 - /* if there is another module already loaded */
43325 - if (swig_module.next != &swig_module) {
43326 - type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
43327 - }
43328 - if (type) {
43329 - /* Overwrite clientdata field */
43330 -#ifdef SWIGRUNTIME_DEBUG
43331 - printf("SWIG_InitializeModule: found type %s\n", type->name);
43332 -#endif
43333 - if (swig_module.type_initial[i]->clientdata) {
43334 - type->clientdata = swig_module.type_initial[i]->clientdata;
43335 -#ifdef SWIGRUNTIME_DEBUG
43336 - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
43337 -#endif
43338 - }
43339 - } else {
43340 - type = swig_module.type_initial[i];
43341 - }
43342 -
43343 - /* Insert casting types */
43344 - cast = swig_module.cast_initial[i];
43345 - while (cast->type) {
43346 - /* Don't need to add information already in the list */
43347 - ret = 0;
43348 -#ifdef SWIGRUNTIME_DEBUG
43349 - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
43350 -#endif
43351 - if (swig_module.next != &swig_module) {
43352 - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
43353 -#ifdef SWIGRUNTIME_DEBUG
43354 - if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
43355 -#endif
43356 - }
43357 - if (ret) {
43358 - if (type == swig_module.type_initial[i]) {
43359 -#ifdef SWIGRUNTIME_DEBUG
43360 - printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
43361 -#endif
43362 - cast->type = ret;
43363 - ret = 0;
43364 - } else {
43365 - /* Check for casting already in the list */
43366 - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
43367 -#ifdef SWIGRUNTIME_DEBUG
43368 - if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
43369 -#endif
43370 - if (!ocast) ret = 0;
43371 - }
43372 - }
43373 -
43374 - if (!ret) {
43375 -#ifdef SWIGRUNTIME_DEBUG
43376 - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
43377 -#endif
43378 - if (type->cast) {
43379 - type->cast->prev = cast;
43380 - cast->next = type->cast;
43381 - }
43382 - type->cast = cast;
43383 - }
43384 - cast++;
43385 - }
43386 - /* Set entry in modules->types array equal to the type */
43387 - swig_module.types[i] = type;
43388 - }
43389 - swig_module.types[i] = 0;
43390 -
43391 -#ifdef SWIGRUNTIME_DEBUG
43392 - printf("**** SWIG_InitializeModule: Cast List ******\n");
43393 - for (i = 0; i < swig_module.size; ++i) {
43394 - int j = 0;
43395 - swig_cast_info *cast = swig_module.cast_initial[i];
43396 - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
43397 - while (cast->type) {
43398 - printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
43399 - cast++;
43400 - ++j;
43401 - }
43402 - printf("---- Total casts: %d\n",j);
43403 - }
43404 - printf("**** SWIG_InitializeModule: Cast List ******\n");
43405 -#endif
43406 -}
43407 -
43408 -/* This function will propagate the clientdata field of type to
43409 -* any new swig_type_info structures that have been added into the list
43410 -* of equivalent types. It is like calling
43411 -* SWIG_TypeClientData(type, clientdata) a second time.
43412 -*/
43413 -SWIGRUNTIME void
43414 -SWIG_PropagateClientData(void) {
43415 - size_t i;
43416 - swig_cast_info *equiv;
43417 - static int init_run = 0;
43418 -
43419 - if (init_run) return;
43420 - init_run = 1;
43421 -
43422 - for (i = 0; i < swig_module.size; i++) {
43423 - if (swig_module.types[i]->clientdata) {
43424 - equiv = swig_module.types[i]->cast;
43425 - while (equiv) {
43426 - if (!equiv->converter) {
43427 - if (equiv->type && !equiv->type->clientdata)
43428 - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
43429 - }
43430 - equiv = equiv->next;
43431 - }
43432 - }
43433 - }
43434 -}
43435 -
43436 -#ifdef __cplusplus
43437 -#if 0
43438 -{
43439 - /* c-mode */
43440 -#endif
43441 -}
43442 -#endif
43443 -
43444 -
43445 -
43446 -#ifdef __cplusplus
43447 -extern "C" {
43448 -#endif
43449 -
43450 - /* Python-specific SWIG API */
43451 -#define SWIG_newvarlink() SWIG_Python_newvarlink()
43452 -#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
43453 -#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
43454 -
43455 - /* -----------------------------------------------------------------------------
43456 - * global variable support code.
43457 - * ----------------------------------------------------------------------------- */
43458 -
43459 - typedef struct swig_globalvar {
43460 - char *name; /* Name of global variable */
43461 - PyObject *(*get_attr)(void); /* Return the current value */
43462 - int (*set_attr)(PyObject *); /* Set the value */
43463 - struct swig_globalvar *next;
43464 - } swig_globalvar;
43465 -
43466 - typedef struct swig_varlinkobject {
43467 - PyObject_HEAD
43468 - swig_globalvar *vars;
43469 - } swig_varlinkobject;
43470 -
43471 - SWIGINTERN PyObject *
43472 - swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
43473 -#if PY_VERSION_HEX >= 0x03000000
43474 - return PyUnicode_InternFromString("<Swig global variables>");
43475 -#else
43476 - return PyString_FromString("<Swig global variables>");
43477 -#endif
43478 - }
43479 -
43480 - SWIGINTERN PyObject *
43481 - swig_varlink_str(swig_varlinkobject *v) {
43482 -#if PY_VERSION_HEX >= 0x03000000
43483 - PyObject *str = PyUnicode_InternFromString("(");
43484 - PyObject *tail;
43485 - PyObject *joined;
43486 - swig_globalvar *var;
43487 - for (var = v->vars; var; var=var->next) {
43488 - tail = PyUnicode_FromString(var->name);
43489 - joined = PyUnicode_Concat(str, tail);
43490 - Py_DecRef(str);
43491 - Py_DecRef(tail);
43492 - str = joined;
43493 - if (var->next) {
43494 - tail = PyUnicode_InternFromString(", ");
43495 - joined = PyUnicode_Concat(str, tail);
43496 - Py_DecRef(str);
43497 - Py_DecRef(tail);
43498 - str = joined;
43499 - }
43500 - }
43501 - tail = PyUnicode_InternFromString(")");
43502 - joined = PyUnicode_Concat(str, tail);
43503 - Py_DecRef(str);
43504 - Py_DecRef(tail);
43505 - str = joined;
43506 -#else
43507 - PyObject *str = PyString_FromString("(");
43508 - swig_globalvar *var;
43509 - for (var = v->vars; var; var=var->next) {
43510 - PyString_ConcatAndDel(&str,PyString_FromString(var->name));
43511 - if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
43512 - }
43513 - PyString_ConcatAndDel(&str,PyString_FromString(")"));
43514 -#endif
43515 - return str;
43516 - }
43517 -
43518 - SWIGINTERN int
43519 - swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
43520 - char *tmp;
43521 - PyObject *str = swig_varlink_str(v);
43522 - fprintf(fp,"Swig global variables ");
43523 - fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
43524 - SWIG_Python_str_DelForPy3(tmp);
43525 - Py_DECREF(str);
43526 - return 0;
43527 - }
43528 -
43529 - SWIGINTERN void
43530 - swig_varlink_dealloc(swig_varlinkobject *v) {
43531 - swig_globalvar *var = v->vars;
43532 - while (var) {
43533 - swig_globalvar *n = var->next;
43534 - free(var->name);
43535 - free(var);
43536 - var = n;
43537 - }
43538 - }
43539 -
43540 - SWIGINTERN PyObject *
43541 - swig_varlink_getattr(swig_varlinkobject *v, char *n) {
43542 - PyObject *res = NULL;
43543 - swig_globalvar *var = v->vars;
43544 - while (var) {
43545 - if (strcmp(var->name,n) == 0) {
43546 - res = (*var->get_attr)();
43547 - break;
43548 - }
43549 - var = var->next;
43550 - }
43551 - if (res == NULL && !PyErr_Occurred()) {
43552 - PyErr_SetString(PyExc_NameError,"Unknown C global variable");
43553 - }
43554 - return res;
43555 - }
43556 -
43557 - SWIGINTERN int
43558 - swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
43559 - int res = 1;
43560 - swig_globalvar *var = v->vars;
43561 - while (var) {
43562 - if (strcmp(var->name,n) == 0) {
43563 - res = (*var->set_attr)(p);
43564 - break;
43565 - }
43566 - var = var->next;
43567 - }
43568 - if (res == 1 && !PyErr_Occurred()) {
43569 - PyErr_SetString(PyExc_NameError,"Unknown C global variable");
43570 - }
43571 - return res;
43572 - }
43573 -
43574 - SWIGINTERN PyTypeObject*
43575 - swig_varlink_type(void) {
43576 - static char varlink__doc__[] = "Swig var link object";
43577 - static PyTypeObject varlink_type;
43578 - static int type_init = 0;
43579 - if (!type_init) {
43580 - const PyTypeObject tmp = {
43581 - /* PyObject header changed in Python 3 */
43582 -#if PY_VERSION_HEX >= 0x03000000
43583 - PyVarObject_HEAD_INIT(NULL, 0)
43584 -#else
43585 - PyObject_HEAD_INIT(NULL)
43586 - 0, /* ob_size */
43587 -#endif
43588 - (char *)"swigvarlink", /* tp_name */
43589 - sizeof(swig_varlinkobject), /* tp_basicsize */
43590 - 0, /* tp_itemsize */
43591 - (destructor) swig_varlink_dealloc, /* tp_dealloc */
43592 - (printfunc) swig_varlink_print, /* tp_print */
43593 - (getattrfunc) swig_varlink_getattr, /* tp_getattr */
43594 - (setattrfunc) swig_varlink_setattr, /* tp_setattr */
43595 - 0, /* tp_compare */
43596 - (reprfunc) swig_varlink_repr, /* tp_repr */
43597 - 0, /* tp_as_number */
43598 - 0, /* tp_as_sequence */
43599 - 0, /* tp_as_mapping */
43600 - 0, /* tp_hash */
43601 - 0, /* tp_call */
43602 - (reprfunc) swig_varlink_str, /* tp_str */
43603 - 0, /* tp_getattro */
43604 - 0, /* tp_setattro */
43605 - 0, /* tp_as_buffer */
43606 - 0, /* tp_flags */
43607 - varlink__doc__, /* tp_doc */
43608 - 0, /* tp_traverse */
43609 - 0, /* tp_clear */
43610 - 0, /* tp_richcompare */
43611 - 0, /* tp_weaklistoffset */
43612 -#if PY_VERSION_HEX >= 0x02020000
43613 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
43614 -#endif
43615 -#if PY_VERSION_HEX >= 0x02030000
43616 - 0, /* tp_del */
43617 -#endif
43618 -#if PY_VERSION_HEX >= 0x02060000
43619 - 0, /* tp_version */
43620 -#endif
43621 -#ifdef COUNT_ALLOCS
43622 - 0,0,0,0 /* tp_alloc -> tp_next */
43623 -#endif
43624 - };
43625 - varlink_type = tmp;
43626 - type_init = 1;
43627 -#if PY_VERSION_HEX < 0x02020000
43628 - varlink_type.ob_type = &PyType_Type;
43629 -#else
43630 - if (PyType_Ready(&varlink_type) < 0)
43631 - return NULL;
43632 -#endif
43633 - }
43634 - return &varlink_type;
43635 - }
43636 -
43637 - /* Create a variable linking object for use later */
43638 - SWIGINTERN PyObject *
43639 - SWIG_Python_newvarlink(void) {
43640 - swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
43641 - if (result) {
43642 - result->vars = 0;
43643 - }
43644 - return ((PyObject*) result);
43645 - }
43646 -
43647 - SWIGINTERN void
43648 - SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
43649 - swig_varlinkobject *v = (swig_varlinkobject *) p;
43650 - swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
43651 - if (gv) {
43652 - size_t size = strlen(name)+1;
43653 - gv->name = (char *)malloc(size);
43654 - if (gv->name) {
43655 - strncpy(gv->name,name,size);
43656 - gv->get_attr = get_attr;
43657 - gv->set_attr = set_attr;
43658 - gv->next = v->vars;
43659 - }
43660 - }
43661 - v->vars = gv;
43662 - }
43663 -
43664 - SWIGINTERN PyObject *
43665 - SWIG_globals(void) {
43666 - static PyObject *_SWIG_globals = 0;
43667 - if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
43668 - return _SWIG_globals;
43669 - }
43670 -
43671 - /* -----------------------------------------------------------------------------
43672 - * constants/methods manipulation
43673 - * ----------------------------------------------------------------------------- */
43674 -
43675 - /* Install Constants */
43676 - SWIGINTERN void
43677 - SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
43678 - PyObject *obj = 0;
43679 - size_t i;
43680 - for (i = 0; constants[i].type; ++i) {
43681 - switch(constants[i].type) {
43682 - case SWIG_PY_POINTER:
43683 - obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
43684 - break;
43685 - case SWIG_PY_BINARY:
43686 - obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
43687 - break;
43688 - default:
43689 - obj = 0;
43690 - break;
43691 - }
43692 - if (obj) {
43693 - PyDict_SetItemString(d, constants[i].name, obj);
43694 - Py_DECREF(obj);
43695 - }
43696 - }
43697 - }
43698 -
43699 - /* -----------------------------------------------------------------------------*/
43700 - /* Fix SwigMethods to carry the callback ptrs when needed */
43701 - /* -----------------------------------------------------------------------------*/
43702 -
43703 - SWIGINTERN void
43704 - SWIG_Python_FixMethods(PyMethodDef *methods,
43705 - swig_const_info *const_table,
43706 - swig_type_info **types,
43707 - swig_type_info **types_initial) {
43708 - size_t i;
43709 - for (i = 0; methods[i].ml_name; ++i) {
43710 - const char *c = methods[i].ml_doc;
43711 - if (c && (c = strstr(c, "swig_ptr: "))) {
43712 - int j;
43713 - swig_const_info *ci = 0;
43714 - const char *name = c + 10;
43715 - for (j = 0; const_table[j].type; ++j) {
43716 - if (strncmp(const_table[j].name, name,
43717 - strlen(const_table[j].name)) == 0) {
43718 - ci = &(const_table[j]);
43719 - break;
43720 - }
43721 - }
43722 - if (ci) {
43723 - void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
43724 - if (ptr) {
43725 - size_t shift = (ci->ptype) - types;
43726 - swig_type_info *ty = types_initial[shift];
43727 - size_t ldoc = (c - methods[i].ml_doc);
43728 - size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
43729 - char *ndoc = (char*)malloc(ldoc + lptr + 10);
43730 - if (ndoc) {
43731 - char *buff = ndoc;
43732 - strncpy(buff, methods[i].ml_doc, ldoc);
43733 - buff += ldoc;
43734 - strncpy(buff, "swig_ptr: ", 10);
43735 - buff += 10;
43736 - SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
43737 - methods[i].ml_doc = ndoc;
43738 - }
43739 - }
43740 - }
43741 - }
43742 - }
43743 - }
43744 -
43745 -#ifdef __cplusplus
43746 -}
43747 -#endif
43748 -
43749 -/* -----------------------------------------------------------------------------*
43750 - * Partial Init method
43751 - * -----------------------------------------------------------------------------*/
43752 -
43753 -#ifdef __cplusplus
43754 -extern "C"
43755 -#endif
43756 -
43757 -SWIGEXPORT
43758 -#if PY_VERSION_HEX >= 0x03000000
43759 -PyObject*
43760 -#else
43761 -void
43762 -#endif
43763 -SWIG_init(void) {
43764 - PyObject *m, *d, *md;
43765 -#if PY_VERSION_HEX >= 0x03000000
43766 - static struct PyModuleDef SWIG_module = {
43767 -# if PY_VERSION_HEX >= 0x03020000
43768 - PyModuleDef_HEAD_INIT,
43769 -# else
43770 - {
43771 - PyObject_HEAD_INIT(NULL)
43772 - NULL, /* m_init */
43773 - 0, /* m_index */
43774 - NULL, /* m_copy */
43775 - },
43776 -# endif
43777 - (char *) SWIG_name,
43778 - NULL,
43779 - -1,
43780 - SwigMethods,
43781 - NULL,
43782 - NULL,
43783 - NULL,
43784 - NULL
43785 - };
43786 -#endif
43787 -
43788 -#if defined(SWIGPYTHON_BUILTIN)
43789 - static SwigPyClientData SwigPyObject_clientdata = {
43790 - 0, 0, 0, 0, 0, 0, 0
43791 - };
43792 - static PyGetSetDef this_getset_def = {
43793 - (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
43794 - };
43795 - static SwigPyGetSet thisown_getset_closure = {
43796 - (PyCFunction) SwigPyObject_own,
43797 - (PyCFunction) SwigPyObject_own
43798 - };
43799 - static PyGetSetDef thisown_getset_def = {
43800 - (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
43801 - };
43802 - PyObject *metatype_args;
43803 - PyTypeObject *builtin_pytype;
43804 - int builtin_base_count;
43805 - swig_type_info *builtin_basetype;
43806 - PyObject *tuple;
43807 - PyGetSetDescrObject *static_getset;
43808 - PyTypeObject *metatype;
43809 - SwigPyClientData *cd;
43810 - PyObject *public_interface, *public_symbol;
43811 - PyObject *this_descr;
43812 - PyObject *thisown_descr;
43813 - int i;
43814 -
43815 - (void)builtin_pytype;
43816 - (void)builtin_base_count;
43817 - (void)builtin_basetype;
43818 - (void)tuple;
43819 - (void)static_getset;
43820 -
43821 - /* metatype is used to implement static member variables. */
43822 - metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
43823 - assert(metatype_args);
43824 - metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
43825 - assert(metatype);
43826 - Py_DECREF(metatype_args);
43827 - metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
43828 - assert(PyType_Ready(metatype) >= 0);
43829 -#endif
43830 -
43831 - /* Fix SwigMethods to carry the callback ptrs when needed */
43832 - SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
43833 -
43834 -#if PY_VERSION_HEX >= 0x03000000
43835 - m = PyModule_Create(&SWIG_module);
43836 -#else
43837 - m = Py_InitModule((char *) SWIG_name, SwigMethods);
43838 -#endif
43839 - md = d = PyModule_GetDict(m);
43840 - (void)md;
43841 -
43842 - SWIG_InitializeModule(0);
43843 -
43844 -#ifdef SWIGPYTHON_BUILTIN
43845 - SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
43846 - assert(SwigPyObject_stype);
43847 - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
43848 - if (!cd) {
43849 - SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
43850 - SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
43851 - } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
43852 - PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
43853 -# if PY_VERSION_HEX >= 0x03000000
43854 - return NULL;
43855 -# else
43856 - return;
43857 -# endif
43858 - }
43859 -
43860 - /* All objects have a 'this' attribute */
43861 - this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
43862 - (void)this_descr;
43863 -
43864 - /* All objects have a 'thisown' attribute */
43865 - thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
43866 - (void)thisown_descr;
43867 -
43868 - public_interface = PyList_New(0);
43869 - public_symbol = 0;
43870 - (void)public_symbol;
43871 -
43872 - PyDict_SetItemString(md, "__all__", public_interface);
43873 - Py_DECREF(public_interface);
43874 - for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
43875 - SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
43876 - for (i = 0; swig_const_table[i].name != 0; ++i)
43877 - SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
43878 -#endif
43879 -
43880 - SWIG_InstallConstants(d,swig_const_table);
43881 -
43882 - SWIG_Python_SetConstant(d, "VDisplay_BARCO",SWIG_From_int(static_cast< int >(vips::VDisplay::BARCO)));
43883 - SWIG_Python_SetConstant(d, "VDisplay_DUMB",SWIG_From_int(static_cast< int >(vips::VDisplay::DUMB)));
43884 -#if PY_VERSION_HEX >= 0x03000000
43885 - return m;
43886 -#else
43887 - return;
43888 -#endif
43889 -}
43890 -
43891 diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/VDisplay.py vips-7.38.5/swig/vipsCC/VDisplay.py
43892 --- vips-7.38.5-vanilla/swig/vipsCC/VDisplay.py 2014-07-17 23:48:36.211794473 -0400
43893 +++ vips-7.38.5/swig/vipsCC/VDisplay.py 1969-12-31 19:00:00.000000000 -0500
43894 @@ -1,93 +0,0 @@
43895 -# This file was automatically generated by SWIG (http://www.swig.org).
43896 -# Version 2.0.10
43897 -#
43898 -# Do not make changes to this file unless you know what you are doing--modify
43899 -# the SWIG interface file instead.
43900 -
43901 -
43902 -
43903 -from sys import version_info
43904 -if version_info >= (2,6,0):
43905 - def swig_import_helper():
43906 - from os.path import dirname
43907 - import imp
43908 - fp = None
43909 - try:
43910 - fp, pathname, description = imp.find_module('vdisplaymodule', [dirname(__file__)])
43911 - except ImportError:
43912 - import vdisplaymodule
43913 - return vdisplaymodule
43914 - if fp is not None:
43915 - try:
43916 - _mod = imp.load_module('vdisplaymodule', fp, pathname, description)
43917 - finally:
43918 - fp.close()
43919 - return _mod
43920 - vdisplaymodule = swig_import_helper()
43921 - del swig_import_helper
43922 -else:
43923 - import vdisplaymodule
43924 -del version_info
43925 -try:
43926 - _swig_property = property
43927 -except NameError:
43928 - pass # Python < 2.2 doesn't have 'property'.
43929 -def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
43930 - if (name == "thisown"): return self.this.own(value)
43931 - if (name == "this"):
43932 - if type(value).__name__ == 'SwigPyObject':
43933 - self.__dict__[name] = value
43934 - return
43935 - method = class_type.__swig_setmethods__.get(name,None)
43936 - if method: return method(self,value)
43937 - if (not static):
43938 - self.__dict__[name] = value
43939 - else:
43940 - raise AttributeError("You cannot add attributes to %s" % self)
43941 -
43942 -def _swig_setattr(self,class_type,name,value):
43943 - return _swig_setattr_nondynamic(self,class_type,name,value,0)
43944 -
43945 -def _swig_getattr(self,class_type,name):
43946 - if (name == "thisown"): return self.this.own()
43947 - method = class_type.__swig_getmethods__.get(name,None)
43948 - if method: return method(self)
43949 - raise AttributeError(name)
43950 -
43951 -def _swig_repr(self):
43952 - try: strthis = "proxy of " + self.this.__repr__()
43953 - except: strthis = ""
43954 - return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
43955 -
43956 -try:
43957 - _object = object
43958 - _newclass = 1
43959 -except AttributeError:
43960 - class _object : pass
43961 - _newclass = 0
43962 -
43963 -
43964 -import VError
43965 -class VDisplay(_object):
43966 - __swig_setmethods__ = {}
43967 - __setattr__ = lambda self, name, value: _swig_setattr(self, VDisplay, name, value)
43968 - __swig_getmethods__ = {}
43969 - __getattr__ = lambda self, name: _swig_getattr(self, VDisplay, name)
43970 - __repr__ = _swig_repr
43971 - BARCO = vdisplaymodule.VDisplay_BARCO
43972 - DUMB = vdisplaymodule.VDisplay_DUMB
43973 - def __init__(self, *args):
43974 - this = vdisplaymodule.new_VDisplay(*args)
43975 - try: self.this.append(this)
43976 - except: self.this = this
43977 - def __assign__(self, *args): return vdisplaymodule.VDisplay___assign__(self, *args)
43978 - __swig_destroy__ = vdisplaymodule.delete_VDisplay
43979 - __del__ = lambda self : None;
43980 - def disp(self): return vdisplaymodule.VDisplay_disp(self)
43981 - def luts(self): return vdisplaymodule.VDisplay_luts(self)
43982 -VDisplay_swigregister = vdisplaymodule.VDisplay_swigregister
43983 -VDisplay_swigregister(VDisplay)
43984 -
43985 -# This file is compatible with both classic and new-style classes.
43986 -
43987 -
43988 diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/VError.i vips-7.38.5/swig/vipsCC/VError.i
43989 --- vips-7.38.5-vanilla/swig/vipsCC/VError.i 2014-07-17 23:48:36.209794473 -0400
43990 +++ vips-7.38.5/swig/vipsCC/VError.i 1969-12-31 19:00:00.000000000 -0500
43991 @@ -1,19 +0,0 @@
43992 -/* SWIG interface file for VError.
43993 - */
43994 -
43995 -%module VError
43996 -%{
43997 -#include <vips/vipscpp.h>
43998 -%}
43999 -
44000 -%include "std_except.i"
44001 -%include "std_string.i"
44002 -
44003 -%include vips/VError.h
44004 -
44005 -%extend vips::VError {
44006 - const char *__str__ () {
44007 - return $self->what ();
44008 - }
44009 -}
44010 -
44011 diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/verrormodule.cxx vips-7.38.5/swig/vipsCC/verrormodule.cxx
44012 --- vips-7.38.5-vanilla/swig/vipsCC/verrormodule.cxx 2014-07-17 23:48:36.211794473 -0400
44013 +++ vips-7.38.5/swig/vipsCC/verrormodule.cxx 1969-12-31 19:00:00.000000000 -0500
44014 @@ -1,4593 +0,0 @@
44015 -/* ----------------------------------------------------------------------------
44016 - * This file was automatically generated by SWIG (http://www.swig.org).
44017 - * Version 2.0.10
44018 - *
44019 - * This file is not intended to be easily readable and contains a number of
44020 - * coding conventions designed to improve portability and efficiency. Do not make
44021 - * changes to this file unless you know what you are doing--modify the SWIG
44022 - * interface file instead.
44023 - * ----------------------------------------------------------------------------- */
44024 -
44025 -#define SWIGPYTHON
44026 -#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
44027 -
44028 -
44029 -#ifdef __cplusplus
44030 -/* SwigValueWrapper is described in swig.swg */
44031 -template<typename T> class SwigValueWrapper {
44032 - struct SwigMovePointer {
44033 - T *ptr;
44034 - SwigMovePointer(T *p) : ptr(p) { }
44035 - ~SwigMovePointer() { delete ptr; }
44036 - SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
44037 - } pointer;
44038 - SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
44039 - SwigValueWrapper(const SwigValueWrapper<T>& rhs);
44040 -public:
44041 - SwigValueWrapper() : pointer(0) { }
44042 - SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
44043 - operator T&() const { return *pointer.ptr; }
44044 - T *operator&() { return pointer.ptr; }
44045 -};
44046 -
44047 -template <typename T> T SwigValueInit() {
44048 - return T();
44049 -}
44050 -#endif
44051 -
44052 -/* -----------------------------------------------------------------------------
44053 - * This section contains generic SWIG labels for method/variable
44054 - * declarations/attributes, and other compiler dependent labels.
44055 - * ----------------------------------------------------------------------------- */
44056 -
44057 -/* template workaround for compilers that cannot correctly implement the C++ standard */
44058 -#ifndef SWIGTEMPLATEDISAMBIGUATOR
44059 -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
44060 -# define SWIGTEMPLATEDISAMBIGUATOR template
44061 -# elif defined(__HP_aCC)
44062 -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
44063 -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
44064 -# define SWIGTEMPLATEDISAMBIGUATOR template
44065 -# else
44066 -# define SWIGTEMPLATEDISAMBIGUATOR
44067 -# endif
44068 -#endif
44069 -
44070 -/* inline attribute */
44071 -#ifndef SWIGINLINE
44072 -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
44073 -# define SWIGINLINE inline
44074 -# else
44075 -# define SWIGINLINE
44076 -# endif
44077 -#endif
44078 -
44079 -/* attribute recognised by some compilers to avoid 'unused' warnings */
44080 -#ifndef SWIGUNUSED
44081 -# if defined(__GNUC__)
44082 -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
44083 -# define SWIGUNUSED __attribute__ ((__unused__))
44084 -# else
44085 -# define SWIGUNUSED
44086 -# endif
44087 -# elif defined(__ICC)
44088 -# define SWIGUNUSED __attribute__ ((__unused__))
44089 -# else
44090 -# define SWIGUNUSED
44091 -# endif
44092 -#endif
44093 -
44094 -#ifndef SWIG_MSC_UNSUPPRESS_4505
44095 -# if defined(_MSC_VER)
44096 -# pragma warning(disable : 4505) /* unreferenced local function has been removed */
44097 -# endif
44098 -#endif
44099 -
44100 -#ifndef SWIGUNUSEDPARM
44101 -# ifdef __cplusplus
44102 -# define SWIGUNUSEDPARM(p)
44103 -# else
44104 -# define SWIGUNUSEDPARM(p) p SWIGUNUSED
44105 -# endif
44106 -#endif
44107 -
44108 -/* internal SWIG method */
44109 -#ifndef SWIGINTERN
44110 -# define SWIGINTERN static SWIGUNUSED
44111 -#endif
44112 -
44113 -/* internal inline SWIG method */
44114 -#ifndef SWIGINTERNINLINE
44115 -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
44116 -#endif
44117 -
44118 -/* exporting methods */
44119 -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
44120 -# ifndef GCC_HASCLASSVISIBILITY
44121 -# define GCC_HASCLASSVISIBILITY
44122 -# endif
44123 -#endif
44124 -
44125 -#ifndef SWIGEXPORT
44126 -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
44127 -# if defined(STATIC_LINKED)
44128 -# define SWIGEXPORT
44129 -# else
44130 -# define SWIGEXPORT __declspec(dllexport)
44131 -# endif
44132 -# else
44133 -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
44134 -# define SWIGEXPORT __attribute__ ((visibility("default")))
44135 -# else
44136 -# define SWIGEXPORT
44137 -# endif
44138 -# endif
44139 -#endif
44140 -
44141 -/* calling conventions for Windows */
44142 -#ifndef SWIGSTDCALL
44143 -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
44144 -# define SWIGSTDCALL __stdcall
44145 -# else
44146 -# define SWIGSTDCALL
44147 -# endif
44148 -#endif
44149 -
44150 -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
44151 -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
44152 -# define _CRT_SECURE_NO_DEPRECATE
44153 -#endif
44154 -
44155 -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
44156 -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
44157 -# define _SCL_SECURE_NO_DEPRECATE
44158 -#endif
44159 -
44160 -
44161 -
44162 -/* Python.h has to appear first */
44163 -#include <Python.h>
44164 -
44165 -/* -----------------------------------------------------------------------------
44166 - * swigrun.swg
44167 - *
44168 - * This file contains generic C API SWIG runtime support for pointer
44169 - * type checking.
44170 - * ----------------------------------------------------------------------------- */
44171 -
44172 -/* This should only be incremented when either the layout of swig_type_info changes,
44173 - or for whatever reason, the runtime changes incompatibly */
44174 -#define SWIG_RUNTIME_VERSION "4"
44175 -
44176 -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
44177 -#ifdef SWIG_TYPE_TABLE
44178 -# define SWIG_QUOTE_STRING(x) #x
44179 -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
44180 -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
44181 -#else
44182 -# define SWIG_TYPE_TABLE_NAME
44183 -#endif
44184 -
44185 -/*
44186 - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
44187 - creating a static or dynamic library from the SWIG runtime code.
44188 - In 99.9% of the cases, SWIG just needs to declare them as 'static'.
44189 -
44190 - But only do this if strictly necessary, ie, if you have problems
44191 - with your compiler or suchlike.
44192 -*/
44193 -
44194 -#ifndef SWIGRUNTIME
44195 -# define SWIGRUNTIME SWIGINTERN
44196 -#endif
44197 -
44198 -#ifndef SWIGRUNTIMEINLINE
44199 -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
44200 -#endif
44201 -
44202 -/* Generic buffer size */
44203 -#ifndef SWIG_BUFFER_SIZE
44204 -# define SWIG_BUFFER_SIZE 1024
44205 -#endif
44206 -
44207 -/* Flags for pointer conversions */
44208 -#define SWIG_POINTER_DISOWN 0x1
44209 -#define SWIG_CAST_NEW_MEMORY 0x2
44210 -
44211 -/* Flags for new pointer objects */
44212 -#define SWIG_POINTER_OWN 0x1
44213 -
44214 -
44215 -/*
44216 - Flags/methods for returning states.
44217 -
44218 - The SWIG conversion methods, as ConvertPtr, return an integer
44219 - that tells if the conversion was successful or not. And if not,
44220 - an error code can be returned (see swigerrors.swg for the codes).
44221 -
44222 - Use the following macros/flags to set or process the returning
44223 - states.
44224 -
44225 - In old versions of SWIG, code such as the following was usually written:
44226 -
44227 - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
44228 - // success code
44229 - } else {
44230 - //fail code
44231 - }
44232 -
44233 - Now you can be more explicit:
44234 -
44235 - int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
44236 - if (SWIG_IsOK(res)) {
44237 - // success code
44238 - } else {
44239 - // fail code
44240 - }
44241 -
44242 - which is the same really, but now you can also do
44243 -
44244 - Type *ptr;
44245 - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
44246 - if (SWIG_IsOK(res)) {
44247 - // success code
44248 - if (SWIG_IsNewObj(res) {
44249 - ...
44250 - delete *ptr;
44251 - } else {
44252 - ...
44253 - }
44254 - } else {
44255 - // fail code
44256 - }
44257 -
44258 - I.e., now SWIG_ConvertPtr can return new objects and you can
44259 - identify the case and take care of the deallocation. Of course that
44260 - also requires SWIG_ConvertPtr to return new result values, such as
44261 -
44262 - int SWIG_ConvertPtr(obj, ptr,...) {
44263 - if (<obj is ok>) {
44264 - if (<need new object>) {
44265 - *ptr = <ptr to new allocated object>;
44266 - return SWIG_NEWOBJ;
44267 - } else {
44268 - *ptr = <ptr to old object>;
44269 - return SWIG_OLDOBJ;
44270 - }
44271 - } else {
44272 - return SWIG_BADOBJ;
44273 - }
44274 - }
44275 -
44276 - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
44277 - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
44278 - SWIG errors code.
44279 -
44280 - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
44281 - allows to return the 'cast rank', for example, if you have this
44282 -
44283 - int food(double)
44284 - int fooi(int);
44285 -
44286 - and you call
44287 -
44288 - food(1) // cast rank '1' (1 -> 1.0)
44289 - fooi(1) // cast rank '0'
44290 -
44291 - just use the SWIG_AddCast()/SWIG_CheckState()
44292 -*/
44293 -
44294 -#define SWIG_OK (0)
44295 -#define SWIG_ERROR (-1)
44296 -#define SWIG_IsOK(r) (r >= 0)
44297 -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
44298 -
44299 -/* The CastRankLimit says how many bits are used for the cast rank */
44300 -#define SWIG_CASTRANKLIMIT (1 << 8)
44301 -/* The NewMask denotes the object was created (using new/malloc) */
44302 -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
44303 -/* The TmpMask is for in/out typemaps that use temporal objects */
44304 -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
44305 -/* Simple returning values */
44306 -#define SWIG_BADOBJ (SWIG_ERROR)
44307 -#define SWIG_OLDOBJ (SWIG_OK)
44308 -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
44309 -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
44310 -/* Check, add and del mask methods */
44311 -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
44312 -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
44313 -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
44314 -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
44315 -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
44316 -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
44317 -
44318 -/* Cast-Rank Mode */
44319 -#if defined(SWIG_CASTRANK_MODE)
44320 -# ifndef SWIG_TypeRank
44321 -# define SWIG_TypeRank unsigned long
44322 -# endif
44323 -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */
44324 -# define SWIG_MAXCASTRANK (2)
44325 -# endif
44326 -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
44327 -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
44328 -SWIGINTERNINLINE int SWIG_AddCast(int r) {
44329 - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
44330 -}
44331 -SWIGINTERNINLINE int SWIG_CheckState(int r) {
44332 - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
44333 -}
44334 -#else /* no cast-rank mode */
44335 -# define SWIG_AddCast(r) (r)
44336 -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
44337 -#endif
44338 -
44339 -
44340 -#include <string.h>
44341 -
44342 -#ifdef __cplusplus
44343 -extern "C" {
44344 -#endif
44345 -
44346 -typedef void *(*swig_converter_func)(void *, int *);
44347 -typedef struct swig_type_info *(*swig_dycast_func)(void **);
44348 -
44349 -/* Structure to store information on one type */
44350 -typedef struct swig_type_info {
44351 - const char *name; /* mangled name of this type */
44352 - const char *str; /* human readable name of this type */
44353 - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
44354 - struct swig_cast_info *cast; /* linked list of types that can cast into this type */
44355 - void *clientdata; /* language specific type data */
44356 - int owndata; /* flag if the structure owns the clientdata */
44357 -} swig_type_info;
44358 -
44359 -/* Structure to store a type and conversion function used for casting */
44360 -typedef struct swig_cast_info {
44361 - swig_type_info *type; /* pointer to type that is equivalent to this type */
44362 - swig_converter_func converter; /* function to cast the void pointers */
44363 - struct swig_cast_info *next; /* pointer to next cast in linked list */
44364 - struct swig_cast_info *prev; /* pointer to the previous cast */
44365 -} swig_cast_info;
44366 -
44367 -/* Structure used to store module information
44368 - * Each module generates one structure like this, and the runtime collects
44369 - * all of these structures and stores them in a circularly linked list.*/
44370 -typedef struct swig_module_info {
44371 - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
44372 - size_t size; /* Number of types in this module */
44373 - struct swig_module_info *next; /* Pointer to next element in circularly linked list */
44374 - swig_type_info **type_initial; /* Array of initially generated type structures */
44375 - swig_cast_info **cast_initial; /* Array of initially generated casting structures */
44376 - void *clientdata; /* Language specific module data */
44377 -} swig_module_info;
44378 -
44379 -/*
44380 - Compare two type names skipping the space characters, therefore
44381 - "char*" == "char *" and "Class<int>" == "Class<int >", etc.
44382 -
44383 - Return 0 when the two name types are equivalent, as in
44384 - strncmp, but skipping ' '.
44385 -*/
44386 -SWIGRUNTIME int
44387 -SWIG_TypeNameComp(const char *f1, const char *l1,
44388 - const char *f2, const char *l2) {
44389 - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
44390 - while ((*f1 == ' ') && (f1 != l1)) ++f1;
44391 - while ((*f2 == ' ') && (f2 != l2)) ++f2;
44392 - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
44393 - }
44394 - return (int)((l1 - f1) - (l2 - f2));
44395 -}
44396 -
44397 -/*
44398 - Check type equivalence in a name list like <name1>|<name2>|...
44399 - Return 0 if equal, -1 if nb < tb, 1 if nb > tb
44400 -*/
44401 -SWIGRUNTIME int
44402 -SWIG_TypeCmp(const char *nb, const char *tb) {
44403 - int equiv = 1;
44404 - const char* te = tb + strlen(tb);
44405 - const char* ne = nb;
44406 - while (equiv != 0 && *ne) {
44407 - for (nb = ne; *ne; ++ne) {
44408 - if (*ne == '|') break;
44409 - }
44410 - equiv = SWIG_TypeNameComp(nb, ne, tb, te);
44411 - if (*ne) ++ne;
44412 - }
44413 - return equiv;
44414 -}
44415 -
44416 -/*
44417 - Check type equivalence in a name list like <name1>|<name2>|...
44418 - Return 0 if not equal, 1 if equal
44419 -*/
44420 -SWIGRUNTIME int
44421 -SWIG_TypeEquiv(const char *nb, const char *tb) {
44422 - return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
44423 -}
44424 -
44425 -/*
44426 - Check the typename
44427 -*/
44428 -SWIGRUNTIME swig_cast_info *
44429 -SWIG_TypeCheck(const char *c, swig_type_info *ty) {
44430 - if (ty) {
44431 - swig_cast_info *iter = ty->cast;
44432 - while (iter) {
44433 - if (strcmp(iter->type->name, c) == 0) {
44434 - if (iter == ty->cast)
44435 - return iter;
44436 - /* Move iter to the top of the linked list */
44437 - iter->prev->next = iter->next;
44438 - if (iter->next)
44439 - iter->next->prev = iter->prev;
44440 - iter->next = ty->cast;
44441 - iter->prev = 0;
44442 - if (ty->cast) ty->cast->prev = iter;
44443 - ty->cast = iter;
44444 - return iter;
44445 - }
44446 - iter = iter->next;
44447 - }
44448 - }
44449 - return 0;
44450 -}
44451 -
44452 -/*
44453 - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
44454 -*/
44455 -SWIGRUNTIME swig_cast_info *
44456 -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
44457 - if (ty) {
44458 - swig_cast_info *iter = ty->cast;
44459 - while (iter) {
44460 - if (iter->type == from) {
44461 - if (iter == ty->cast)
44462 - return iter;
44463 - /* Move iter to the top of the linked list */
44464 - iter->prev->next = iter->next;
44465 - if (iter->next)
44466 - iter->next->prev = iter->prev;
44467 - iter->next = ty->cast;
44468 - iter->prev = 0;
44469 - if (ty->cast) ty->cast->prev = iter;
44470 - ty->cast = iter;
44471 - return iter;
44472 - }
44473 - iter = iter->next;
44474 - }
44475 - }
44476 - return 0;
44477 -}
44478 -
44479 -/*
44480 - Cast a pointer up an inheritance hierarchy
44481 -*/
44482 -SWIGRUNTIMEINLINE void *
44483 -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
44484 - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
44485 -}
44486 -
44487 -/*
44488 - Dynamic pointer casting. Down an inheritance hierarchy
44489 -*/
44490 -SWIGRUNTIME swig_type_info *
44491 -SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
44492 - swig_type_info *lastty = ty;
44493 - if (!ty || !ty->dcast) return ty;
44494 - while (ty && (ty->dcast)) {
44495 - ty = (*ty->dcast)(ptr);
44496 - if (ty) lastty = ty;
44497 - }
44498 - return lastty;
44499 -}
44500 -
44501 -/*
44502 - Return the name associated with this type
44503 -*/
44504 -SWIGRUNTIMEINLINE const char *
44505 -SWIG_TypeName(const swig_type_info *ty) {
44506 - return ty->name;
44507 -}
44508 -
44509 -/*
44510 - Return the pretty name associated with this type,
44511 - that is an unmangled type name in a form presentable to the user.
44512 -*/
44513 -SWIGRUNTIME const char *
44514 -SWIG_TypePrettyName(const swig_type_info *type) {
44515 - /* The "str" field contains the equivalent pretty names of the
44516 - type, separated by vertical-bar characters. We choose
44517 - to print the last name, as it is often (?) the most
44518 - specific. */
44519 - if (!type) return NULL;
44520 - if (type->str != NULL) {
44521 - const char *last_name = type->str;
44522 - const char *s;
44523 - for (s = type->str; *s; s++)
44524 - if (*s == '|') last_name = s+1;
44525 - return last_name;
44526 - }
44527 - else
44528 - return type->name;
44529 -}
44530 -
44531 -/*
44532 - Set the clientdata field for a type
44533 -*/
44534 -SWIGRUNTIME void
44535 -SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
44536 - swig_cast_info *cast = ti->cast;
44537 - /* if (ti->clientdata == clientdata) return; */
44538 - ti->clientdata = clientdata;
44539 -
44540 - while (cast) {
44541 - if (!cast->converter) {
44542 - swig_type_info *tc = cast->type;
44543 - if (!tc->clientdata) {
44544 - SWIG_TypeClientData(tc, clientdata);
44545 - }
44546 - }
44547 - cast = cast->next;
44548 - }
44549 -}
44550 -SWIGRUNTIME void
44551 -SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
44552 - SWIG_TypeClientData(ti, clientdata);
44553 - ti->owndata = 1;
44554 -}
44555 -
44556 -/*
44557 - Search for a swig_type_info structure only by mangled name
44558 - Search is a O(log #types)
44559 -
44560 - We start searching at module start, and finish searching when start == end.
44561 - Note: if start == end at the beginning of the function, we go all the way around
44562 - the circular list.
44563 -*/
44564 -SWIGRUNTIME swig_type_info *
44565 -SWIG_MangledTypeQueryModule(swig_module_info *start,
44566 - swig_module_info *end,
44567 - const char *name) {
44568 - swig_module_info *iter = start;
44569 - do {
44570 - if (iter->size) {
44571 - register size_t l = 0;
44572 - register size_t r = iter->size - 1;
44573 - do {
44574 - /* since l+r >= 0, we can (>> 1) instead (/ 2) */
44575 - register size_t i = (l + r) >> 1;
44576 - const char *iname = iter->types[i]->name;
44577 - if (iname) {
44578 - register int compare = strcmp(name, iname);
44579 - if (compare == 0) {
44580 - return iter->types[i];
44581 - } else if (compare < 0) {
44582 - if (i) {
44583 - r = i - 1;
44584 - } else {
44585 - break;
44586 - }
44587 - } else if (compare > 0) {
44588 - l = i + 1;
44589 - }
44590 - } else {
44591 - break; /* should never happen */
44592 - }
44593 - } while (l <= r);
44594 - }
44595 - iter = iter->next;
44596 - } while (iter != end);
44597 - return 0;
44598 -}
44599 -
44600 -/*
44601 - Search for a swig_type_info structure for either a mangled name or a human readable name.
44602 - It first searches the mangled names of the types, which is a O(log #types)
44603 - If a type is not found it then searches the human readable names, which is O(#types).
44604 -
44605 - We start searching at module start, and finish searching when start == end.
44606 - Note: if start == end at the beginning of the function, we go all the way around
44607 - the circular list.
44608 -*/
44609 -SWIGRUNTIME swig_type_info *
44610 -SWIG_TypeQueryModule(swig_module_info *start,
44611 - swig_module_info *end,
44612 - const char *name) {
44613 - /* STEP 1: Search the name field using binary search */
44614 - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
44615 - if (ret) {
44616 - return ret;
44617 - } else {
44618 - /* STEP 2: If the type hasn't been found, do a complete search
44619 - of the str field (the human readable name) */
44620 - swig_module_info *iter = start;
44621 - do {
44622 - register size_t i = 0;
44623 - for (; i < iter->size; ++i) {
44624 - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
44625 - return iter->types[i];
44626 - }
44627 - iter = iter->next;
44628 - } while (iter != end);
44629 - }
44630 -
44631 - /* neither found a match */
44632 - return 0;
44633 -}
44634 -
44635 -/*
44636 - Pack binary data into a string
44637 -*/
44638 -SWIGRUNTIME char *
44639 -SWIG_PackData(char *c, void *ptr, size_t sz) {
44640 - static const char hex[17] = "0123456789abcdef";
44641 - register const unsigned char *u = (unsigned char *) ptr;
44642 - register const unsigned char *eu = u + sz;
44643 - for (; u != eu; ++u) {
44644 - register unsigned char uu = *u;
44645 - *(c++) = hex[(uu & 0xf0) >> 4];
44646 - *(c++) = hex[uu & 0xf];
44647 - }
44648 - return c;
44649 -}
44650 -
44651 -/*
44652 - Unpack binary data from a string
44653 -*/
44654 -SWIGRUNTIME const char *
44655 -SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
44656 - register unsigned char *u = (unsigned char *) ptr;
44657 - register const unsigned char *eu = u + sz;
44658 - for (; u != eu; ++u) {
44659 - register char d = *(c++);
44660 - register unsigned char uu;
44661 - if ((d >= '0') && (d <= '9'))
44662 - uu = ((d - '0') << 4);
44663 - else if ((d >= 'a') && (d <= 'f'))
44664 - uu = ((d - ('a'-10)) << 4);
44665 - else
44666 - return (char *) 0;
44667 - d = *(c++);
44668 - if ((d >= '0') && (d <= '9'))
44669 - uu |= (d - '0');
44670 - else if ((d >= 'a') && (d <= 'f'))
44671 - uu |= (d - ('a'-10));
44672 - else
44673 - return (char *) 0;
44674 - *u = uu;
44675 - }
44676 - return c;
44677 -}
44678 -
44679 -/*
44680 - Pack 'void *' into a string buffer.
44681 -*/
44682 -SWIGRUNTIME char *
44683 -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
44684 - char *r = buff;
44685 - if ((2*sizeof(void *) + 2) > bsz) return 0;
44686 - *(r++) = '_';
44687 - r = SWIG_PackData(r,&ptr,sizeof(void *));
44688 - if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
44689 - strcpy(r,name);
44690 - return buff;
44691 -}
44692 -
44693 -SWIGRUNTIME const char *
44694 -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
44695 - if (*c != '_') {
44696 - if (strcmp(c,"NULL") == 0) {
44697 - *ptr = (void *) 0;
44698 - return name;
44699 - } else {
44700 - return 0;
44701 - }
44702 - }
44703 - return SWIG_UnpackData(++c,ptr,sizeof(void *));
44704 -}
44705 -
44706 -SWIGRUNTIME char *
44707 -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
44708 - char *r = buff;
44709 - size_t lname = (name ? strlen(name) : 0);
44710 - if ((2*sz + 2 + lname) > bsz) return 0;
44711 - *(r++) = '_';
44712 - r = SWIG_PackData(r,ptr,sz);
44713 - if (lname) {
44714 - strncpy(r,name,lname+1);
44715 - } else {
44716 - *r = 0;
44717 - }
44718 - return buff;
44719 -}
44720 -
44721 -SWIGRUNTIME const char *
44722 -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
44723 - if (*c != '_') {
44724 - if (strcmp(c,"NULL") == 0) {
44725 - memset(ptr,0,sz);
44726 - return name;
44727 - } else {
44728 - return 0;
44729 - }
44730 - }
44731 - return SWIG_UnpackData(++c,ptr,sz);
44732 -}
44733 -
44734 -#ifdef __cplusplus
44735 -}
44736 -#endif
44737 -
44738 -/* Errors in SWIG */
44739 -#define SWIG_UnknownError -1
44740 -#define SWIG_IOError -2
44741 -#define SWIG_RuntimeError -3
44742 -#define SWIG_IndexError -4
44743 -#define SWIG_TypeError -5
44744 -#define SWIG_DivisionByZero -6
44745 -#define SWIG_OverflowError -7
44746 -#define SWIG_SyntaxError -8
44747 -#define SWIG_ValueError -9
44748 -#define SWIG_SystemError -10
44749 -#define SWIG_AttributeError -11
44750 -#define SWIG_MemoryError -12
44751 -#define SWIG_NullReferenceError -13
44752 -
44753 -
44754 -
44755 -/* Compatibility macros for Python 3 */
44756 -#if PY_VERSION_HEX >= 0x03000000
44757 -
44758 -#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
44759 -#define PyInt_Check(x) PyLong_Check(x)
44760 -#define PyInt_AsLong(x) PyLong_AsLong(x)
44761 -#define PyInt_FromLong(x) PyLong_FromLong(x)
44762 -#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
44763 -#define PyString_Check(name) PyBytes_Check(name)
44764 -#define PyString_FromString(x) PyUnicode_FromString(x)
44765 -#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
44766 -#define PyString_AsString(str) PyBytes_AsString(str)
44767 -#define PyString_Size(str) PyBytes_Size(str)
44768 -#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
44769 -#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
44770 -#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
44771 -#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
44772 -
44773 -#endif
44774 -
44775 -#ifndef Py_TYPE
44776 -# define Py_TYPE(op) ((op)->ob_type)
44777 -#endif
44778 -
44779 -/* SWIG APIs for compatibility of both Python 2 & 3 */
44780 -
44781 -#if PY_VERSION_HEX >= 0x03000000
44782 -# define SWIG_Python_str_FromFormat PyUnicode_FromFormat
44783 -#else
44784 -# define SWIG_Python_str_FromFormat PyString_FromFormat
44785 -#endif
44786 -
44787 -
44788 -/* Warning: This function will allocate a new string in Python 3,
44789 - * so please call SWIG_Python_str_DelForPy3(x) to free the space.
44790 - */
44791 -SWIGINTERN char*
44792 -SWIG_Python_str_AsChar(PyObject *str)
44793 -{
44794 -#if PY_VERSION_HEX >= 0x03000000
44795 - char *cstr;
44796 - char *newstr;
44797 - Py_ssize_t len;
44798 - str = PyUnicode_AsUTF8String(str);
44799 - PyBytes_AsStringAndSize(str, &cstr, &len);
44800 - newstr = (char *) malloc(len+1);
44801 - memcpy(newstr, cstr, len+1);
44802 - Py_XDECREF(str);
44803 - return newstr;
44804 -#else
44805 - return PyString_AsString(str);
44806 -#endif
44807 -}
44808 -
44809 -#if PY_VERSION_HEX >= 0x03000000
44810 -# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
44811 -#else
44812 -# define SWIG_Python_str_DelForPy3(x)
44813 -#endif
44814 -
44815 -
44816 -SWIGINTERN PyObject*
44817 -SWIG_Python_str_FromChar(const char *c)
44818 -{
44819 -#if PY_VERSION_HEX >= 0x03000000
44820 - return PyUnicode_FromString(c);
44821 -#else
44822 - return PyString_FromString(c);
44823 -#endif
44824 -}
44825 -
44826 -/* Add PyOS_snprintf for old Pythons */
44827 -#if PY_VERSION_HEX < 0x02020000
44828 -# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
44829 -# define PyOS_snprintf _snprintf
44830 -# else
44831 -# define PyOS_snprintf snprintf
44832 -# endif
44833 -#endif
44834 -
44835 -/* A crude PyString_FromFormat implementation for old Pythons */
44836 -#if PY_VERSION_HEX < 0x02020000
44837 -
44838 -#ifndef SWIG_PYBUFFER_SIZE
44839 -# define SWIG_PYBUFFER_SIZE 1024
44840 -#endif
44841 -
44842 -static PyObject *
44843 -PyString_FromFormat(const char *fmt, ...) {
44844 - va_list ap;
44845 - char buf[SWIG_PYBUFFER_SIZE * 2];
44846 - int res;
44847 - va_start(ap, fmt);
44848 - res = vsnprintf(buf, sizeof(buf), fmt, ap);
44849 - va_end(ap);
44850 - return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
44851 -}
44852 -#endif
44853 -
44854 -/* Add PyObject_Del for old Pythons */
44855 -#if PY_VERSION_HEX < 0x01060000
44856 -# define PyObject_Del(op) PyMem_DEL((op))
44857 -#endif
44858 -#ifndef PyObject_DEL
44859 -# define PyObject_DEL PyObject_Del
44860 -#endif
44861 -
44862 -/* A crude PyExc_StopIteration exception for old Pythons */
44863 -#if PY_VERSION_HEX < 0x02020000
44864 -# ifndef PyExc_StopIteration
44865 -# define PyExc_StopIteration PyExc_RuntimeError
44866 -# endif
44867 -# ifndef PyObject_GenericGetAttr
44868 -# define PyObject_GenericGetAttr 0
44869 -# endif
44870 -#endif
44871 -
44872 -/* Py_NotImplemented is defined in 2.1 and up. */
44873 -#if PY_VERSION_HEX < 0x02010000
44874 -# ifndef Py_NotImplemented
44875 -# define Py_NotImplemented PyExc_RuntimeError
44876 -# endif
44877 -#endif
44878 -
44879 -/* A crude PyString_AsStringAndSize implementation for old Pythons */
44880 -#if PY_VERSION_HEX < 0x02010000
44881 -# ifndef PyString_AsStringAndSize
44882 -# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
44883 -# endif
44884 -#endif
44885 -
44886 -/* PySequence_Size for old Pythons */
44887 -#if PY_VERSION_HEX < 0x02000000
44888 -# ifndef PySequence_Size
44889 -# define PySequence_Size PySequence_Length
44890 -# endif
44891 -#endif
44892 -
44893 -/* PyBool_FromLong for old Pythons */
44894 -#if PY_VERSION_HEX < 0x02030000
44895 -static
44896 -PyObject *PyBool_FromLong(long ok)
44897 -{
44898 - PyObject *result = ok ? Py_True : Py_False;
44899 - Py_INCREF(result);
44900 - return result;
44901 -}
44902 -#endif
44903 -
44904 -/* Py_ssize_t for old Pythons */
44905 -/* This code is as recommended by: */
44906 -/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
44907 -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
44908 -typedef int Py_ssize_t;
44909 -# define PY_SSIZE_T_MAX INT_MAX
44910 -# define PY_SSIZE_T_MIN INT_MIN
44911 -typedef inquiry lenfunc;
44912 -typedef intargfunc ssizeargfunc;
44913 -typedef intintargfunc ssizessizeargfunc;
44914 -typedef intobjargproc ssizeobjargproc;
44915 -typedef intintobjargproc ssizessizeobjargproc;
44916 -typedef getreadbufferproc readbufferproc;
44917 -typedef getwritebufferproc writebufferproc;
44918 -typedef getsegcountproc segcountproc;
44919 -typedef getcharbufferproc charbufferproc;
44920 -static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
44921 -{
44922 - long result = 0;
44923 - PyObject *i = PyNumber_Int(x);
44924 - if (i) {
44925 - result = PyInt_AsLong(i);
44926 - Py_DECREF(i);
44927 - }
44928 - return result;
44929 -}
44930 -#endif
44931 -
44932 -#if PY_VERSION_HEX < 0x02050000
44933 -#define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
44934 -#endif
44935 -
44936 -#if PY_VERSION_HEX < 0x02040000
44937 -#define Py_VISIT(op) \
44938 - do { \
44939 - if (op) { \
44940 - int vret = visit((op), arg); \
44941 - if (vret) \
44942 - return vret; \
44943 - } \
44944 - } while (0)
44945 -#endif
44946 -
44947 -#if PY_VERSION_HEX < 0x02030000
44948 -typedef struct {
44949 - PyTypeObject type;
44950 - PyNumberMethods as_number;
44951 - PyMappingMethods as_mapping;
44952 - PySequenceMethods as_sequence;
44953 - PyBufferProcs as_buffer;
44954 - PyObject *name, *slots;
44955 -} PyHeapTypeObject;
44956 -#endif
44957 -
44958 -#if PY_VERSION_HEX < 0x02030000
44959 -typedef destructor freefunc;
44960 -#endif
44961 -
44962 -#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
44963 - (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
44964 - (PY_MAJOR_VERSION > 3))
44965 -# define SWIGPY_USE_CAPSULE
44966 -# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
44967 -#endif
44968 -
44969 -#if PY_VERSION_HEX < 0x03020000
44970 -#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
44971 -#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
44972 -#endif
44973 -
44974 -/* -----------------------------------------------------------------------------
44975 - * error manipulation
44976 - * ----------------------------------------------------------------------------- */
44977 -
44978 -SWIGRUNTIME PyObject*
44979 -SWIG_Python_ErrorType(int code) {
44980 - PyObject* type = 0;
44981 - switch(code) {
44982 - case SWIG_MemoryError:
44983 - type = PyExc_MemoryError;
44984 - break;
44985 - case SWIG_IOError:
44986 - type = PyExc_IOError;
44987 - break;
44988 - case SWIG_RuntimeError:
44989 - type = PyExc_RuntimeError;
44990 - break;
44991 - case SWIG_IndexError:
44992 - type = PyExc_IndexError;
44993 - break;
44994 - case SWIG_TypeError:
44995 - type = PyExc_TypeError;
44996 - break;
44997 - case SWIG_DivisionByZero:
44998 - type = PyExc_ZeroDivisionError;
44999 - break;
45000 - case SWIG_OverflowError:
45001 - type = PyExc_OverflowError;
45002 - break;
45003 - case SWIG_SyntaxError:
45004 - type = PyExc_SyntaxError;
45005 - break;
45006 - case SWIG_ValueError:
45007 - type = PyExc_ValueError;
45008 - break;
45009 - case SWIG_SystemError:
45010 - type = PyExc_SystemError;
45011 - break;
45012 - case SWIG_AttributeError:
45013 - type = PyExc_AttributeError;
45014 - break;
45015 - default:
45016 - type = PyExc_RuntimeError;
45017 - }
45018 - return type;
45019 -}
45020 -
45021 -
45022 -SWIGRUNTIME void
45023 -SWIG_Python_AddErrorMsg(const char* mesg)
45024 -{
45025 - PyObject *type = 0;
45026 - PyObject *value = 0;
45027 - PyObject *traceback = 0;
45028 -
45029 - if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
45030 - if (value) {
45031 - char *tmp;
45032 - PyObject *old_str = PyObject_Str(value);
45033 - PyErr_Clear();
45034 - Py_XINCREF(type);
45035 -
45036 - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
45037 - SWIG_Python_str_DelForPy3(tmp);
45038 - Py_DECREF(old_str);
45039 - Py_DECREF(value);
45040 - } else {
45041 - PyErr_SetString(PyExc_RuntimeError, mesg);
45042 - }
45043 -}
45044 -
45045 -#if defined(SWIG_PYTHON_NO_THREADS)
45046 -# if defined(SWIG_PYTHON_THREADS)
45047 -# undef SWIG_PYTHON_THREADS
45048 -# endif
45049 -#endif
45050 -#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
45051 -# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
45052 -# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
45053 -# define SWIG_PYTHON_USE_GIL
45054 -# endif
45055 -# endif
45056 -# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
45057 -# ifndef SWIG_PYTHON_INITIALIZE_THREADS
45058 -# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
45059 -# endif
45060 -# ifdef __cplusplus /* C++ code */
45061 - class SWIG_Python_Thread_Block {
45062 - bool status;
45063 - PyGILState_STATE state;
45064 - public:
45065 - void end() { if (status) { PyGILState_Release(state); status = false;} }
45066 - SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
45067 - ~SWIG_Python_Thread_Block() { end(); }
45068 - };
45069 - class SWIG_Python_Thread_Allow {
45070 - bool status;
45071 - PyThreadState *save;
45072 - public:
45073 - void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
45074 - SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
45075 - ~SWIG_Python_Thread_Allow() { end(); }
45076 - };
45077 -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
45078 -# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
45079 -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
45080 -# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
45081 -# else /* C code */
45082 -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
45083 -# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
45084 -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
45085 -# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
45086 -# endif
45087 -# else /* Old thread way, not implemented, user must provide it */
45088 -# if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
45089 -# define SWIG_PYTHON_INITIALIZE_THREADS
45090 -# endif
45091 -# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
45092 -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
45093 -# endif
45094 -# if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
45095 -# define SWIG_PYTHON_THREAD_END_BLOCK
45096 -# endif
45097 -# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
45098 -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
45099 -# endif
45100 -# if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
45101 -# define SWIG_PYTHON_THREAD_END_ALLOW
45102 -# endif
45103 -# endif
45104 -#else /* No thread support */
45105 -# define SWIG_PYTHON_INITIALIZE_THREADS
45106 -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
45107 -# define SWIG_PYTHON_THREAD_END_BLOCK
45108 -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
45109 -# define SWIG_PYTHON_THREAD_END_ALLOW
45110 -#endif
45111 -
45112 -/* -----------------------------------------------------------------------------
45113 - * Python API portion that goes into the runtime
45114 - * ----------------------------------------------------------------------------- */
45115 -
45116 -#ifdef __cplusplus
45117 -extern "C" {
45118 -#endif
45119 -
45120 -/* -----------------------------------------------------------------------------
45121 - * Constant declarations
45122 - * ----------------------------------------------------------------------------- */
45123 -
45124 -/* Constant Types */
45125 -#define SWIG_PY_POINTER 4
45126 -#define SWIG_PY_BINARY 5
45127 -
45128 -/* Constant information structure */
45129 -typedef struct swig_const_info {
45130 - int type;
45131 - char *name;
45132 - long lvalue;
45133 - double dvalue;
45134 - void *pvalue;
45135 - swig_type_info **ptype;
45136 -} swig_const_info;
45137 -
45138 -
45139 -/* -----------------------------------------------------------------------------
45140 - * Wrapper of PyInstanceMethod_New() used in Python 3
45141 - * It is exported to the generated module, used for -fastproxy
45142 - * ----------------------------------------------------------------------------- */
45143 -#if PY_VERSION_HEX >= 0x03000000
45144 -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
45145 -{
45146 - return PyInstanceMethod_New(func);
45147 -}
45148 -#else
45149 -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
45150 -{
45151 - return NULL;
45152 -}
45153 -#endif
45154 -
45155 -#ifdef __cplusplus
45156 -}
45157 -#endif
45158 -
45159 -
45160 -/* -----------------------------------------------------------------------------
45161 - * pyrun.swg
45162 - *
45163 - * This file contains the runtime support for Python modules
45164 - * and includes code for managing global variables and pointer
45165 - * type checking.
45166 - *
45167 - * ----------------------------------------------------------------------------- */
45168 -
45169 -/* Common SWIG API */
45170 -
45171 -/* for raw pointers */
45172 -#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
45173 -#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
45174 -#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
45175 -
45176 -#ifdef SWIGPYTHON_BUILTIN
45177 -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
45178 -#else
45179 -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
45180 -#endif
45181 -
45182 -#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
45183 -
45184 -#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
45185 -#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
45186 -#define swig_owntype int
45187 -
45188 -/* for raw packed data */
45189 -#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
45190 -#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
45191 -
45192 -/* for class or struct pointers */
45193 -#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
45194 -#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
45195 -
45196 -/* for C or C++ function pointers */
45197 -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
45198 -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
45199 -
45200 -/* for C++ member pointers, ie, member methods */
45201 -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
45202 -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
45203 -
45204 -
45205 -/* Runtime API */
45206 -
45207 -#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
45208 -#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
45209 -#define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
45210 -
45211 -#define SWIG_SetErrorObj SWIG_Python_SetErrorObj
45212 -#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
45213 -#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
45214 -#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
45215 -#define SWIG_fail goto fail
45216 -
45217 -
45218 -/* Runtime API implementation */
45219 -
45220 -/* Error manipulation */
45221 -
45222 -SWIGINTERN void
45223 -SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
45224 - SWIG_PYTHON_THREAD_BEGIN_BLOCK;
45225 - PyErr_SetObject(errtype, obj);
45226 - Py_DECREF(obj);
45227 - SWIG_PYTHON_THREAD_END_BLOCK;
45228 -}
45229 -
45230 -SWIGINTERN void
45231 -SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
45232 - SWIG_PYTHON_THREAD_BEGIN_BLOCK;
45233 - PyErr_SetString(errtype, msg);
45234 - SWIG_PYTHON_THREAD_END_BLOCK;
45235 -}
45236 -
45237 -#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
45238 -
45239 -/* Set a constant value */
45240 -
45241 -#if defined(SWIGPYTHON_BUILTIN)
45242 -
45243 -SWIGINTERN void
45244 -SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
45245 - PyObject *s = PyString_InternFromString(key);
45246 - PyList_Append(seq, s);
45247 - Py_DECREF(s);
45248 -}
45249 -
45250 -SWIGINTERN void
45251 -SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
45252 -#if PY_VERSION_HEX < 0x02030000
45253 - PyDict_SetItemString(d, (char *)name, obj);
45254 -#else
45255 - PyDict_SetItemString(d, name, obj);
45256 -#endif
45257 - Py_DECREF(obj);
45258 - if (public_interface)
45259 - SwigPyBuiltin_AddPublicSymbol(public_interface, name);
45260 -}
45261 -
45262 -#else
45263 -
45264 -SWIGINTERN void
45265 -SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
45266 -#if PY_VERSION_HEX < 0x02030000
45267 - PyDict_SetItemString(d, (char *)name, obj);
45268 -#else
45269 - PyDict_SetItemString(d, name, obj);
45270 -#endif
45271 - Py_DECREF(obj);
45272 -}
45273 -
45274 -#endif
45275 -
45276 -/* Append a value to the result obj */
45277 -
45278 -SWIGINTERN PyObject*
45279 -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
45280 -#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
45281 - if (!result) {
45282 - result = obj;
45283 - } else if (result == Py_None) {
45284 - Py_DECREF(result);
45285 - result = obj;
45286 - } else {
45287 - if (!PyList_Check(result)) {
45288 - PyObject *o2 = result;
45289 - result = PyList_New(1);
45290 - PyList_SetItem(result, 0, o2);
45291 - }
45292 - PyList_Append(result,obj);
45293 - Py_DECREF(obj);
45294 - }
45295 - return result;
45296 -#else
45297 - PyObject* o2;
45298 - PyObject* o3;
45299 - if (!result) {
45300 - result = obj;
45301 - } else if (result == Py_None) {
45302 - Py_DECREF(result);
45303 - result = obj;
45304 - } else {
45305 - if (!PyTuple_Check(result)) {
45306 - o2 = result;
45307 - result = PyTuple_New(1);
45308 - PyTuple_SET_ITEM(result, 0, o2);
45309 - }
45310 - o3 = PyTuple_New(1);
45311 - PyTuple_SET_ITEM(o3, 0, obj);
45312 - o2 = result;
45313 - result = PySequence_Concat(o2, o3);
45314 - Py_DECREF(o2);
45315 - Py_DECREF(o3);
45316 - }
45317 - return result;
45318 -#endif
45319 -}
45320 -
45321 -/* Unpack the argument tuple */
45322 -
45323 -SWIGINTERN int
45324 -SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
45325 -{
45326 - if (!args) {
45327 - if (!min && !max) {
45328 - return 1;
45329 - } else {
45330 - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
45331 - name, (min == max ? "" : "at least "), (int)min);
45332 - return 0;
45333 - }
45334 - }
45335 - if (!PyTuple_Check(args)) {
45336 - if (min <= 1 && max >= 1) {
45337 - register int i;
45338 - objs[0] = args;
45339 - for (i = 1; i < max; ++i) {
45340 - objs[i] = 0;
45341 - }
45342 - return 2;
45343 - }
45344 - PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
45345 - return 0;
45346 - } else {
45347 - register Py_ssize_t l = PyTuple_GET_SIZE(args);
45348 - if (l < min) {
45349 - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
45350 - name, (min == max ? "" : "at least "), (int)min, (int)l);
45351 - return 0;
45352 - } else if (l > max) {
45353 - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
45354 - name, (min == max ? "" : "at most "), (int)max, (int)l);
45355 - return 0;
45356 - } else {
45357 - register int i;
45358 - for (i = 0; i < l; ++i) {
45359 - objs[i] = PyTuple_GET_ITEM(args, i);
45360 - }
45361 - for (; l < max; ++l) {
45362 - objs[l] = 0;
45363 - }
45364 - return i + 1;
45365 - }
45366 - }
45367 -}
45368 -
45369 -/* A functor is a function object with one single object argument */
45370 -#if PY_VERSION_HEX >= 0x02020000
45371 -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
45372 -#else
45373 -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
45374 -#endif
45375 -
45376 -/*
45377 - Helper for static pointer initialization for both C and C++ code, for example
45378 - static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
45379 -*/
45380 -#ifdef __cplusplus
45381 -#define SWIG_STATIC_POINTER(var) var
45382 -#else
45383 -#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
45384 -#endif
45385 -
45386 -/* -----------------------------------------------------------------------------
45387 - * Pointer declarations
45388 - * ----------------------------------------------------------------------------- */
45389 -
45390 -/* Flags for new pointer objects */
45391 -#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
45392 -#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
45393 -
45394 -#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
45395 -
45396 -#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
45397 -#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
45398 -
45399 -#ifdef __cplusplus
45400 -extern "C" {
45401 -#endif
45402 -
45403 -/* How to access Py_None */
45404 -#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
45405 -# ifndef SWIG_PYTHON_NO_BUILD_NONE
45406 -# ifndef SWIG_PYTHON_BUILD_NONE
45407 -# define SWIG_PYTHON_BUILD_NONE
45408 -# endif
45409 -# endif
45410 -#endif
45411 -
45412 -#ifdef SWIG_PYTHON_BUILD_NONE
45413 -# ifdef Py_None
45414 -# undef Py_None
45415 -# define Py_None SWIG_Py_None()
45416 -# endif
45417 -SWIGRUNTIMEINLINE PyObject *
45418 -_SWIG_Py_None(void)
45419 -{
45420 - PyObject *none = Py_BuildValue((char*)"");
45421 - Py_DECREF(none);
45422 - return none;
45423 -}
45424 -SWIGRUNTIME PyObject *
45425 -SWIG_Py_None(void)
45426 -{
45427 - static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
45428 - return none;
45429 -}
45430 -#endif
45431 -
45432 -/* The python void return value */
45433 -
45434 -SWIGRUNTIMEINLINE PyObject *
45435 -SWIG_Py_Void(void)
45436 -{
45437 - PyObject *none = Py_None;
45438 - Py_INCREF(none);
45439 - return none;
45440 -}
45441 -
45442 -/* SwigPyClientData */
45443 -
45444 -typedef struct {
45445 - PyObject *klass;
45446 - PyObject *newraw;
45447 - PyObject *newargs;
45448 - PyObject *destroy;
45449 - int delargs;
45450 - int implicitconv;
45451 - PyTypeObject *pytype;
45452 -} SwigPyClientData;
45453 -
45454 -SWIGRUNTIMEINLINE int
45455 -SWIG_Python_CheckImplicit(swig_type_info *ty)
45456 -{
45457 - SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
45458 - return data ? data->implicitconv : 0;
45459 -}
45460 -
45461 -SWIGRUNTIMEINLINE PyObject *
45462 -SWIG_Python_ExceptionType(swig_type_info *desc) {
45463 - SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
45464 - PyObject *klass = data ? data->klass : 0;
45465 - return (klass ? klass : PyExc_RuntimeError);
45466 -}
45467 -
45468 -
45469 -SWIGRUNTIME SwigPyClientData *
45470 -SwigPyClientData_New(PyObject* obj)
45471 -{
45472 - if (!obj) {
45473 - return 0;
45474 - } else {
45475 - SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
45476 - /* the klass element */
45477 - data->klass = obj;
45478 - Py_INCREF(data->klass);
45479 - /* the newraw method and newargs arguments used to create a new raw instance */
45480 - if (PyClass_Check(obj)) {
45481 - data->newraw = 0;
45482 - data->newargs = obj;
45483 - Py_INCREF(obj);
45484 - } else {
45485 -#if (PY_VERSION_HEX < 0x02020000)
45486 - data->newraw = 0;
45487 -#else
45488 - data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
45489 -#endif
45490 - if (data->newraw) {
45491 - Py_INCREF(data->newraw);
45492 - data->newargs = PyTuple_New(1);
45493 - PyTuple_SetItem(data->newargs, 0, obj);
45494 - } else {
45495 - data->newargs = obj;
45496 - }
45497 - Py_INCREF(data->newargs);
45498 - }
45499 - /* the destroy method, aka as the C++ delete method */
45500 - data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
45501 - if (PyErr_Occurred()) {
45502 - PyErr_Clear();
45503 - data->destroy = 0;
45504 - }
45505 - if (data->destroy) {
45506 - int flags;
45507 - Py_INCREF(data->destroy);
45508 - flags = PyCFunction_GET_FLAGS(data->destroy);
45509 -#ifdef METH_O
45510 - data->delargs = !(flags & (METH_O));
45511 -#else
45512 - data->delargs = 0;
45513 -#endif
45514 - } else {
45515 - data->delargs = 0;
45516 - }
45517 - data->implicitconv = 0;
45518 - data->pytype = 0;
45519 - return data;
45520 - }
45521 -}
45522 -
45523 -SWIGRUNTIME void
45524 -SwigPyClientData_Del(SwigPyClientData *data) {
45525 - Py_XDECREF(data->newraw);
45526 - Py_XDECREF(data->newargs);
45527 - Py_XDECREF(data->destroy);
45528 -}
45529 -
45530 -/* =============== SwigPyObject =====================*/
45531 -
45532 -typedef struct {
45533 - PyObject_HEAD
45534 - void *ptr;
45535 - swig_type_info *ty;
45536 - int own;
45537 - PyObject *next;
45538 -#ifdef SWIGPYTHON_BUILTIN
45539 - PyObject *dict;
45540 -#endif
45541 -} SwigPyObject;
45542 -
45543 -SWIGRUNTIME PyObject *
45544 -SwigPyObject_long(SwigPyObject *v)
45545 -{
45546 - return PyLong_FromVoidPtr(v->ptr);
45547 -}
45548 -
45549 -SWIGRUNTIME PyObject *
45550 -SwigPyObject_format(const char* fmt, SwigPyObject *v)
45551 -{
45552 - PyObject *res = NULL;
45553 - PyObject *args = PyTuple_New(1);
45554 - if (args) {
45555 - if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
45556 - PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
45557 - if (ofmt) {
45558 -#if PY_VERSION_HEX >= 0x03000000
45559 - res = PyUnicode_Format(ofmt,args);
45560 -#else
45561 - res = PyString_Format(ofmt,args);
45562 -#endif
45563 - Py_DECREF(ofmt);
45564 - }
45565 - Py_DECREF(args);
45566 - }
45567 - }
45568 - return res;
45569 -}
45570 -
45571 -SWIGRUNTIME PyObject *
45572 -SwigPyObject_oct(SwigPyObject *v)
45573 -{
45574 - return SwigPyObject_format("%o",v);
45575 -}
45576 -
45577 -SWIGRUNTIME PyObject *
45578 -SwigPyObject_hex(SwigPyObject *v)
45579 -{
45580 - return SwigPyObject_format("%x",v);
45581 -}
45582 -
45583 -SWIGRUNTIME PyObject *
45584 -#ifdef METH_NOARGS
45585 -SwigPyObject_repr(SwigPyObject *v)
45586 -#else
45587 -SwigPyObject_repr(SwigPyObject *v, PyObject *args)
45588 -#endif
45589 -{
45590 - const char *name = SWIG_TypePrettyName(v->ty);
45591 - PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
45592 - if (v->next) {
45593 -# ifdef METH_NOARGS
45594 - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
45595 -# else
45596 - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
45597 -# endif
45598 -# if PY_VERSION_HEX >= 0x03000000
45599 - PyObject *joined = PyUnicode_Concat(repr, nrep);
45600 - Py_DecRef(repr);
45601 - Py_DecRef(nrep);
45602 - repr = joined;
45603 -# else
45604 - PyString_ConcatAndDel(&repr,nrep);
45605 -# endif
45606 - }
45607 - return repr;
45608 -}
45609 -
45610 -SWIGRUNTIME int
45611 -SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
45612 -{
45613 - char *str;
45614 -#ifdef METH_NOARGS
45615 - PyObject *repr = SwigPyObject_repr(v);
45616 -#else
45617 - PyObject *repr = SwigPyObject_repr(v, NULL);
45618 -#endif
45619 - if (repr) {
45620 - str = SWIG_Python_str_AsChar(repr);
45621 - fputs(str, fp);
45622 - SWIG_Python_str_DelForPy3(str);
45623 - Py_DECREF(repr);
45624 - return 0;
45625 - } else {
45626 - return 1;
45627 - }
45628 -}
45629 -
45630 -SWIGRUNTIME PyObject *
45631 -SwigPyObject_str(SwigPyObject *v)
45632 -{
45633 - char result[SWIG_BUFFER_SIZE];
45634 - return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
45635 - SWIG_Python_str_FromChar(result) : 0;
45636 -}
45637 -
45638 -SWIGRUNTIME int
45639 -SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
45640 -{
45641 - void *i = v->ptr;
45642 - void *j = w->ptr;
45643 - return (i < j) ? -1 : ((i > j) ? 1 : 0);
45644 -}
45645 -
45646 -/* Added for Python 3.x, would it also be useful for Python 2.x? */
45647 -SWIGRUNTIME PyObject*
45648 -SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
45649 -{
45650 - PyObject* res;
45651 - if( op != Py_EQ && op != Py_NE ) {
45652 - Py_INCREF(Py_NotImplemented);
45653 - return Py_NotImplemented;
45654 - }
45655 - res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
45656 - return res;
45657 -}
45658 -
45659 -
45660 -SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
45661 -
45662 -#ifdef SWIGPYTHON_BUILTIN
45663 -static swig_type_info *SwigPyObject_stype = 0;
45664 -SWIGRUNTIME PyTypeObject*
45665 -SwigPyObject_type(void) {
45666 - SwigPyClientData *cd;
45667 - assert(SwigPyObject_stype);
45668 - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
45669 - assert(cd);
45670 - assert(cd->pytype);
45671 - return cd->pytype;
45672 -}
45673 -#else
45674 -SWIGRUNTIME PyTypeObject*
45675 -SwigPyObject_type(void) {
45676 - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
45677 - return type;
45678 -}
45679 -#endif
45680 -
45681 -SWIGRUNTIMEINLINE int
45682 -SwigPyObject_Check(PyObject *op) {
45683 -#ifdef SWIGPYTHON_BUILTIN
45684 - PyTypeObject *target_tp = SwigPyObject_type();
45685 - if (PyType_IsSubtype(op->ob_type, target_tp))
45686 - return 1;
45687 - return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
45688 -#else
45689 - return (Py_TYPE(op) == SwigPyObject_type())
45690 - || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
45691 -#endif
45692 -}
45693 -
45694 -SWIGRUNTIME PyObject *
45695 -SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
45696 -
45697 -SWIGRUNTIME void
45698 -SwigPyObject_dealloc(PyObject *v)
45699 -{
45700 - SwigPyObject *sobj = (SwigPyObject *) v;
45701 - PyObject *next = sobj->next;
45702 - if (sobj->own == SWIG_POINTER_OWN) {
45703 - swig_type_info *ty = sobj->ty;
45704 - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
45705 - PyObject *destroy = data ? data->destroy : 0;
45706 - if (destroy) {
45707 - /* destroy is always a VARARGS method */
45708 - PyObject *res;
45709 - if (data->delargs) {
45710 - /* we need to create a temporary object to carry the destroy operation */
45711 - PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
45712 - res = SWIG_Python_CallFunctor(destroy, tmp);
45713 - Py_DECREF(tmp);
45714 - } else {
45715 - PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
45716 - PyObject *mself = PyCFunction_GET_SELF(destroy);
45717 - res = ((*meth)(mself, v));
45718 - }
45719 - Py_XDECREF(res);
45720 - }
45721 -#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
45722 - else {
45723 - const char *name = SWIG_TypePrettyName(ty);
45724 - printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
45725 - }
45726 -#endif
45727 - }
45728 - Py_XDECREF(next);
45729 - PyObject_DEL(v);
45730 -}
45731 -
45732 -SWIGRUNTIME PyObject*
45733 -SwigPyObject_append(PyObject* v, PyObject* next)
45734 -{
45735 - SwigPyObject *sobj = (SwigPyObject *) v;
45736 -#ifndef METH_O
45737 - PyObject *tmp = 0;
45738 - if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
45739 - next = tmp;
45740 -#endif
45741 - if (!SwigPyObject_Check(next)) {
45742 - return NULL;
45743 - }
45744 - sobj->next = next;
45745 - Py_INCREF(next);
45746 - return SWIG_Py_Void();
45747 -}
45748 -
45749 -SWIGRUNTIME PyObject*
45750 -#ifdef METH_NOARGS
45751 -SwigPyObject_next(PyObject* v)
45752 -#else
45753 -SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
45754 -#endif
45755 -{
45756 - SwigPyObject *sobj = (SwigPyObject *) v;
45757 - if (sobj->next) {
45758 - Py_INCREF(sobj->next);
45759 - return sobj->next;
45760 - } else {
45761 - return SWIG_Py_Void();
45762 - }
45763 -}
45764 -
45765 -SWIGINTERN PyObject*
45766 -#ifdef METH_NOARGS
45767 -SwigPyObject_disown(PyObject *v)
45768 -#else
45769 -SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
45770 -#endif
45771 -{
45772 - SwigPyObject *sobj = (SwigPyObject *)v;
45773 - sobj->own = 0;
45774 - return SWIG_Py_Void();
45775 -}
45776 -
45777 -SWIGINTERN PyObject*
45778 -#ifdef METH_NOARGS
45779 -SwigPyObject_acquire(PyObject *v)
45780 -#else
45781 -SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
45782 -#endif
45783 -{
45784 - SwigPyObject *sobj = (SwigPyObject *)v;
45785 - sobj->own = SWIG_POINTER_OWN;
45786 - return SWIG_Py_Void();
45787 -}
45788 -
45789 -SWIGINTERN PyObject*
45790 -SwigPyObject_own(PyObject *v, PyObject *args)
45791 -{
45792 - PyObject *val = 0;
45793 -#if (PY_VERSION_HEX < 0x02020000)
45794 - if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
45795 -#elif (PY_VERSION_HEX < 0x02050000)
45796 - if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
45797 -#else
45798 - if (!PyArg_UnpackTuple(args, "own", 0, 1, &val))
45799 -#endif
45800 - {
45801 - return NULL;
45802 - }
45803 - else
45804 - {
45805 - SwigPyObject *sobj = (SwigPyObject *)v;
45806 - PyObject *obj = PyBool_FromLong(sobj->own);
45807 - if (val) {
45808 -#ifdef METH_NOARGS
45809 - if (PyObject_IsTrue(val)) {
45810 - SwigPyObject_acquire(v);
45811 - } else {
45812 - SwigPyObject_disown(v);
45813 - }
45814 -#else
45815 - if (PyObject_IsTrue(val)) {
45816 - SwigPyObject_acquire(v,args);
45817 - } else {
45818 - SwigPyObject_disown(v,args);
45819 - }
45820 -#endif
45821 - }
45822 - return obj;
45823 - }
45824 -}
45825 -
45826 -#ifdef METH_O
45827 -static PyMethodDef
45828 -swigobject_methods[] = {
45829 - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
45830 - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
45831 - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
45832 - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
45833 - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
45834 - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
45835 - {0, 0, 0, 0}
45836 -};
45837 -#else
45838 -static PyMethodDef
45839 -swigobject_methods[] = {
45840 - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
45841 - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
45842 - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
45843 - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
45844 - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
45845 - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
45846 - {0, 0, 0, 0}
45847 -};
45848 -#endif
45849 -
45850 -#if PY_VERSION_HEX < 0x02020000
45851 -SWIGINTERN PyObject *
45852 -SwigPyObject_getattr(SwigPyObject *sobj,char *name)
45853 -{
45854 - return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
45855 -}
45856 -#endif
45857 -
45858 -SWIGRUNTIME PyTypeObject*
45859 -SwigPyObject_TypeOnce(void) {
45860 - static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
45861 -
45862 - static PyNumberMethods SwigPyObject_as_number = {
45863 - (binaryfunc)0, /*nb_add*/
45864 - (binaryfunc)0, /*nb_subtract*/
45865 - (binaryfunc)0, /*nb_multiply*/
45866 - /* nb_divide removed in Python 3 */
45867 -#if PY_VERSION_HEX < 0x03000000
45868 - (binaryfunc)0, /*nb_divide*/
45869 -#endif
45870 - (binaryfunc)0, /*nb_remainder*/
45871 - (binaryfunc)0, /*nb_divmod*/
45872 - (ternaryfunc)0,/*nb_power*/
45873 - (unaryfunc)0, /*nb_negative*/
45874 - (unaryfunc)0, /*nb_positive*/
45875 - (unaryfunc)0, /*nb_absolute*/
45876 - (inquiry)0, /*nb_nonzero*/
45877 - 0, /*nb_invert*/
45878 - 0, /*nb_lshift*/
45879 - 0, /*nb_rshift*/
45880 - 0, /*nb_and*/
45881 - 0, /*nb_xor*/
45882 - 0, /*nb_or*/
45883 -#if PY_VERSION_HEX < 0x03000000
45884 - 0, /*nb_coerce*/
45885 -#endif
45886 - (unaryfunc)SwigPyObject_long, /*nb_int*/
45887 -#if PY_VERSION_HEX < 0x03000000
45888 - (unaryfunc)SwigPyObject_long, /*nb_long*/
45889 -#else
45890 - 0, /*nb_reserved*/
45891 -#endif
45892 - (unaryfunc)0, /*nb_float*/
45893 -#if PY_VERSION_HEX < 0x03000000
45894 - (unaryfunc)SwigPyObject_oct, /*nb_oct*/
45895 - (unaryfunc)SwigPyObject_hex, /*nb_hex*/
45896 -#endif
45897 -#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
45898 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
45899 -#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
45900 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
45901 -#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
45902 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
45903 -#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
45904 - 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
45905 -#endif
45906 - };
45907 -
45908 - static PyTypeObject swigpyobject_type;
45909 - static int type_init = 0;
45910 - if (!type_init) {
45911 - const PyTypeObject tmp = {
45912 - /* PyObject header changed in Python 3 */
45913 -#if PY_VERSION_HEX >= 0x03000000
45914 - PyVarObject_HEAD_INIT(NULL, 0)
45915 -#else
45916 - PyObject_HEAD_INIT(NULL)
45917 - 0, /* ob_size */
45918 -#endif
45919 - (char *)"SwigPyObject", /* tp_name */
45920 - sizeof(SwigPyObject), /* tp_basicsize */
45921 - 0, /* tp_itemsize */
45922 - (destructor)SwigPyObject_dealloc, /* tp_dealloc */
45923 - (printfunc)SwigPyObject_print, /* tp_print */
45924 -#if PY_VERSION_HEX < 0x02020000
45925 - (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
45926 -#else
45927 - (getattrfunc)0, /* tp_getattr */
45928 -#endif
45929 - (setattrfunc)0, /* tp_setattr */
45930 -#if PY_VERSION_HEX >= 0x03000000
45931 - 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
45932 -#else
45933 - (cmpfunc)SwigPyObject_compare, /* tp_compare */
45934 -#endif
45935 - (reprfunc)SwigPyObject_repr, /* tp_repr */
45936 - &SwigPyObject_as_number, /* tp_as_number */
45937 - 0, /* tp_as_sequence */
45938 - 0, /* tp_as_mapping */
45939 - (hashfunc)0, /* tp_hash */
45940 - (ternaryfunc)0, /* tp_call */
45941 - (reprfunc)SwigPyObject_str, /* tp_str */
45942 - PyObject_GenericGetAttr, /* tp_getattro */
45943 - 0, /* tp_setattro */
45944 - 0, /* tp_as_buffer */
45945 - Py_TPFLAGS_DEFAULT, /* tp_flags */
45946 - swigobject_doc, /* tp_doc */
45947 - 0, /* tp_traverse */
45948 - 0, /* tp_clear */
45949 - (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
45950 - 0, /* tp_weaklistoffset */
45951 -#if PY_VERSION_HEX >= 0x02020000
45952 - 0, /* tp_iter */
45953 - 0, /* tp_iternext */
45954 - swigobject_methods, /* tp_methods */
45955 - 0, /* tp_members */
45956 - 0, /* tp_getset */
45957 - 0, /* tp_base */
45958 - 0, /* tp_dict */
45959 - 0, /* tp_descr_get */
45960 - 0, /* tp_descr_set */
45961 - 0, /* tp_dictoffset */
45962 - 0, /* tp_init */
45963 - 0, /* tp_alloc */
45964 - 0, /* tp_new */
45965 - 0, /* tp_free */
45966 - 0, /* tp_is_gc */
45967 - 0, /* tp_bases */
45968 - 0, /* tp_mro */
45969 - 0, /* tp_cache */
45970 - 0, /* tp_subclasses */
45971 - 0, /* tp_weaklist */
45972 -#endif
45973 -#if PY_VERSION_HEX >= 0x02030000
45974 - 0, /* tp_del */
45975 -#endif
45976 -#if PY_VERSION_HEX >= 0x02060000
45977 - 0, /* tp_version */
45978 -#endif
45979 -#ifdef COUNT_ALLOCS
45980 - 0,0,0,0 /* tp_alloc -> tp_next */
45981 -#endif
45982 - };
45983 - swigpyobject_type = tmp;
45984 - type_init = 1;
45985 -#if PY_VERSION_HEX < 0x02020000
45986 - swigpyobject_type.ob_type = &PyType_Type;
45987 -#else
45988 - if (PyType_Ready(&swigpyobject_type) < 0)
45989 - return NULL;
45990 -#endif
45991 - }
45992 - return &swigpyobject_type;
45993 -}
45994 -
45995 -SWIGRUNTIME PyObject *
45996 -SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
45997 -{
45998 - SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
45999 - if (sobj) {
46000 - sobj->ptr = ptr;
46001 - sobj->ty = ty;
46002 - sobj->own = own;
46003 - sobj->next = 0;
46004 - }
46005 - return (PyObject *)sobj;
46006 -}
46007 -
46008 -/* -----------------------------------------------------------------------------
46009 - * Implements a simple Swig Packed type, and use it instead of string
46010 - * ----------------------------------------------------------------------------- */
46011 -
46012 -typedef struct {
46013 - PyObject_HEAD
46014 - void *pack;
46015 - swig_type_info *ty;
46016 - size_t size;
46017 -} SwigPyPacked;
46018 -
46019 -SWIGRUNTIME int
46020 -SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
46021 -{
46022 - char result[SWIG_BUFFER_SIZE];
46023 - fputs("<Swig Packed ", fp);
46024 - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
46025 - fputs("at ", fp);
46026 - fputs(result, fp);
46027 - }
46028 - fputs(v->ty->name,fp);
46029 - fputs(">", fp);
46030 - return 0;
46031 -}
46032 -
46033 -SWIGRUNTIME PyObject *
46034 -SwigPyPacked_repr(SwigPyPacked *v)
46035 -{
46036 - char result[SWIG_BUFFER_SIZE];
46037 - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
46038 - return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
46039 - } else {
46040 - return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
46041 - }
46042 -}
46043 -
46044 -SWIGRUNTIME PyObject *
46045 -SwigPyPacked_str(SwigPyPacked *v)
46046 -{
46047 - char result[SWIG_BUFFER_SIZE];
46048 - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
46049 - return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
46050 - } else {
46051 - return SWIG_Python_str_FromChar(v->ty->name);
46052 - }
46053 -}
46054 -
46055 -SWIGRUNTIME int
46056 -SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
46057 -{
46058 - size_t i = v->size;
46059 - size_t j = w->size;
46060 - int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
46061 - return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
46062 -}
46063 -
46064 -SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
46065 -
46066 -SWIGRUNTIME PyTypeObject*
46067 -SwigPyPacked_type(void) {
46068 - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
46069 - return type;
46070 -}
46071 -
46072 -SWIGRUNTIMEINLINE int
46073 -SwigPyPacked_Check(PyObject *op) {
46074 - return ((op)->ob_type == SwigPyPacked_TypeOnce())
46075 - || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
46076 -}
46077 -
46078 -SWIGRUNTIME void
46079 -SwigPyPacked_dealloc(PyObject *v)
46080 -{
46081 - if (SwigPyPacked_Check(v)) {
46082 - SwigPyPacked *sobj = (SwigPyPacked *) v;
46083 - free(sobj->pack);
46084 - }
46085 - PyObject_DEL(v);
46086 -}
46087 -
46088 -SWIGRUNTIME PyTypeObject*
46089 -SwigPyPacked_TypeOnce(void) {
46090 - static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
46091 - static PyTypeObject swigpypacked_type;
46092 - static int type_init = 0;
46093 - if (!type_init) {
46094 - const PyTypeObject tmp = {
46095 - /* PyObject header changed in Python 3 */
46096 -#if PY_VERSION_HEX>=0x03000000
46097 - PyVarObject_HEAD_INIT(NULL, 0)
46098 -#else
46099 - PyObject_HEAD_INIT(NULL)
46100 - 0, /* ob_size */
46101 -#endif
46102 - (char *)"SwigPyPacked", /* tp_name */
46103 - sizeof(SwigPyPacked), /* tp_basicsize */
46104 - 0, /* tp_itemsize */
46105 - (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
46106 - (printfunc)SwigPyPacked_print, /* tp_print */
46107 - (getattrfunc)0, /* tp_getattr */
46108 - (setattrfunc)0, /* tp_setattr */
46109 -#if PY_VERSION_HEX>=0x03000000
46110 - 0, /* tp_reserved in 3.0.1 */
46111 -#else
46112 - (cmpfunc)SwigPyPacked_compare, /* tp_compare */
46113 -#endif
46114 - (reprfunc)SwigPyPacked_repr, /* tp_repr */
46115 - 0, /* tp_as_number */
46116 - 0, /* tp_as_sequence */
46117 - 0, /* tp_as_mapping */
46118 - (hashfunc)0, /* tp_hash */
46119 - (ternaryfunc)0, /* tp_call */
46120 - (reprfunc)SwigPyPacked_str, /* tp_str */
46121 - PyObject_GenericGetAttr, /* tp_getattro */
46122 - 0, /* tp_setattro */
46123 - 0, /* tp_as_buffer */
46124 - Py_TPFLAGS_DEFAULT, /* tp_flags */
46125 - swigpacked_doc, /* tp_doc */
46126 - 0, /* tp_traverse */
46127 - 0, /* tp_clear */
46128 - 0, /* tp_richcompare */
46129 - 0, /* tp_weaklistoffset */
46130 -#if PY_VERSION_HEX >= 0x02020000
46131 - 0, /* tp_iter */
46132 - 0, /* tp_iternext */
46133 - 0, /* tp_methods */
46134 - 0, /* tp_members */
46135 - 0, /* tp_getset */
46136 - 0, /* tp_base */
46137 - 0, /* tp_dict */
46138 - 0, /* tp_descr_get */
46139 - 0, /* tp_descr_set */
46140 - 0, /* tp_dictoffset */
46141 - 0, /* tp_init */
46142 - 0, /* tp_alloc */
46143 - 0, /* tp_new */
46144 - 0, /* tp_free */
46145 - 0, /* tp_is_gc */
46146 - 0, /* tp_bases */
46147 - 0, /* tp_mro */
46148 - 0, /* tp_cache */
46149 - 0, /* tp_subclasses */
46150 - 0, /* tp_weaklist */
46151 -#endif
46152 -#if PY_VERSION_HEX >= 0x02030000
46153 - 0, /* tp_del */
46154 -#endif
46155 -#if PY_VERSION_HEX >= 0x02060000
46156 - 0, /* tp_version */
46157 -#endif
46158 -#ifdef COUNT_ALLOCS
46159 - 0,0,0,0 /* tp_alloc -> tp_next */
46160 -#endif
46161 - };
46162 - swigpypacked_type = tmp;
46163 - type_init = 1;
46164 -#if PY_VERSION_HEX < 0x02020000
46165 - swigpypacked_type.ob_type = &PyType_Type;
46166 -#else
46167 - if (PyType_Ready(&swigpypacked_type) < 0)
46168 - return NULL;
46169 -#endif
46170 - }
46171 - return &swigpypacked_type;
46172 -}
46173 -
46174 -SWIGRUNTIME PyObject *
46175 -SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
46176 -{
46177 - SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
46178 - if (sobj) {
46179 - void *pack = malloc(size);
46180 - if (pack) {
46181 - memcpy(pack, ptr, size);
46182 - sobj->pack = pack;
46183 - sobj->ty = ty;
46184 - sobj->size = size;
46185 - } else {
46186 - PyObject_DEL((PyObject *) sobj);
46187 - sobj = 0;
46188 - }
46189 - }
46190 - return (PyObject *) sobj;
46191 -}
46192 -
46193 -SWIGRUNTIME swig_type_info *
46194 -SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
46195 -{
46196 - if (SwigPyPacked_Check(obj)) {
46197 - SwigPyPacked *sobj = (SwigPyPacked *)obj;
46198 - if (sobj->size != size) return 0;
46199 - memcpy(ptr, sobj->pack, size);
46200 - return sobj->ty;
46201 - } else {
46202 - return 0;
46203 - }
46204 -}
46205 -
46206 -/* -----------------------------------------------------------------------------
46207 - * pointers/data manipulation
46208 - * ----------------------------------------------------------------------------- */
46209 -
46210 -SWIGRUNTIMEINLINE PyObject *
46211 -_SWIG_This(void)
46212 -{
46213 - return SWIG_Python_str_FromChar("this");
46214 -}
46215 -
46216 -static PyObject *swig_this = NULL;
46217 -
46218 -SWIGRUNTIME PyObject *
46219 -SWIG_This(void)
46220 -{
46221 - if (swig_this == NULL)
46222 - swig_this = _SWIG_This();
46223 - return swig_this;
46224 -}
46225 -
46226 -/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
46227 -
46228 -/* TODO: I don't know how to implement the fast getset in Python 3 right now */
46229 -#if PY_VERSION_HEX>=0x03000000
46230 -#define SWIG_PYTHON_SLOW_GETSET_THIS
46231 -#endif
46232 -
46233 -SWIGRUNTIME SwigPyObject *
46234 -SWIG_Python_GetSwigThis(PyObject *pyobj)
46235 -{
46236 - PyObject *obj;
46237 -
46238 - if (SwigPyObject_Check(pyobj))
46239 - return (SwigPyObject *) pyobj;
46240 -
46241 -#ifdef SWIGPYTHON_BUILTIN
46242 - (void)obj;
46243 -# ifdef PyWeakref_CheckProxy
46244 - if (PyWeakref_CheckProxy(pyobj)) {
46245 - pyobj = PyWeakref_GET_OBJECT(pyobj);
46246 - if (pyobj && SwigPyObject_Check(pyobj))
46247 - return (SwigPyObject*) pyobj;
46248 - }
46249 -# endif
46250 - return NULL;
46251 -#else
46252 -
46253 - obj = 0;
46254 -
46255 -#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
46256 - if (PyInstance_Check(pyobj)) {
46257 - obj = _PyInstance_Lookup(pyobj, SWIG_This());
46258 - } else {
46259 - PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
46260 - if (dictptr != NULL) {
46261 - PyObject *dict = *dictptr;
46262 - obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
46263 - } else {
46264 -#ifdef PyWeakref_CheckProxy
46265 - if (PyWeakref_CheckProxy(pyobj)) {
46266 - PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
46267 - return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
46268 - }
46269 -#endif
46270 - obj = PyObject_GetAttr(pyobj,SWIG_This());
46271 - if (obj) {
46272 - Py_DECREF(obj);
46273 - } else {
46274 - if (PyErr_Occurred()) PyErr_Clear();
46275 - return 0;
46276 - }
46277 - }
46278 - }
46279 -#else
46280 - obj = PyObject_GetAttr(pyobj,SWIG_This());
46281 - if (obj) {
46282 - Py_DECREF(obj);
46283 - } else {
46284 - if (PyErr_Occurred()) PyErr_Clear();
46285 - return 0;
46286 - }
46287 -#endif
46288 - if (obj && !SwigPyObject_Check(obj)) {
46289 - /* a PyObject is called 'this', try to get the 'real this'
46290 - SwigPyObject from it */
46291 - return SWIG_Python_GetSwigThis(obj);
46292 - }
46293 - return (SwigPyObject *)obj;
46294 -#endif
46295 -}
46296 -
46297 -/* Acquire a pointer value */
46298 -
46299 -SWIGRUNTIME int
46300 -SWIG_Python_AcquirePtr(PyObject *obj, int own) {
46301 - if (own == SWIG_POINTER_OWN) {
46302 - SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
46303 - if (sobj) {
46304 - int oldown = sobj->own;
46305 - sobj->own = own;
46306 - return oldown;
46307 - }
46308 - }
46309 - return 0;
46310 -}
46311 -
46312 -/* Convert a pointer value */
46313 -
46314 -SWIGRUNTIME int
46315 -SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
46316 - int res;
46317 - SwigPyObject *sobj;
46318 -
46319 - if (!obj)
46320 - return SWIG_ERROR;
46321 - if (obj == Py_None) {
46322 - if (ptr)
46323 - *ptr = 0;
46324 - return SWIG_OK;
46325 - }
46326 -
46327 - res = SWIG_ERROR;
46328 -
46329 - sobj = SWIG_Python_GetSwigThis(obj);
46330 - if (own)
46331 - *own = 0;
46332 - while (sobj) {
46333 - void *vptr = sobj->ptr;
46334 - if (ty) {
46335 - swig_type_info *to = sobj->ty;
46336 - if (to == ty) {
46337 - /* no type cast needed */
46338 - if (ptr) *ptr = vptr;
46339 - break;
46340 - } else {
46341 - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
46342 - if (!tc) {
46343 - sobj = (SwigPyObject *)sobj->next;
46344 - } else {
46345 - if (ptr) {
46346 - int newmemory = 0;
46347 - *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
46348 - if (newmemory == SWIG_CAST_NEW_MEMORY) {
46349 - assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
46350 - if (own)
46351 - *own = *own | SWIG_CAST_NEW_MEMORY;
46352 - }
46353 - }
46354 - break;
46355 - }
46356 - }
46357 - } else {
46358 - if (ptr) *ptr = vptr;
46359 - break;
46360 - }
46361 - }
46362 - if (sobj) {
46363 - if (own)
46364 - *own = *own | sobj->own;
46365 - if (flags & SWIG_POINTER_DISOWN) {
46366 - sobj->own = 0;
46367 - }
46368 - res = SWIG_OK;
46369 - } else {
46370 - if (flags & SWIG_POINTER_IMPLICIT_CONV) {
46371 - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
46372 - if (data && !data->implicitconv) {
46373 - PyObject *klass = data->klass;
46374 - if (klass) {
46375 - PyObject *impconv;
46376 - data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
46377 - impconv = SWIG_Python_CallFunctor(klass, obj);
46378 - data->implicitconv = 0;
46379 - if (PyErr_Occurred()) {
46380 - PyErr_Clear();
46381 - impconv = 0;
46382 - }
46383 - if (impconv) {
46384 - SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
46385 - if (iobj) {
46386 - void *vptr;
46387 - res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
46388 - if (SWIG_IsOK(res)) {
46389 - if (ptr) {
46390 - *ptr = vptr;
46391 - /* transfer the ownership to 'ptr' */
46392 - iobj->own = 0;
46393 - res = SWIG_AddCast(res);
46394 - res = SWIG_AddNewMask(res);
46395 - } else {
46396 - res = SWIG_AddCast(res);
46397 - }
46398 - }
46399 - }
46400 - Py_DECREF(impconv);
46401 - }
46402 - }
46403 - }
46404 - }
46405 - }
46406 - return res;
46407 -}
46408 -
46409 -/* Convert a function ptr value */
46410 -
46411 -SWIGRUNTIME int
46412 -SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
46413 - if (!PyCFunction_Check(obj)) {
46414 - return SWIG_ConvertPtr(obj, ptr, ty, 0);
46415 - } else {
46416 - void *vptr = 0;
46417 -
46418 - /* here we get the method pointer for callbacks */
46419 - const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
46420 - const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
46421 - if (desc)
46422 - desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
46423 - if (!desc)
46424 - return SWIG_ERROR;
46425 - if (ty) {
46426 - swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
46427 - if (tc) {
46428 - int newmemory = 0;
46429 - *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
46430 - assert(!newmemory); /* newmemory handling not yet implemented */
46431 - } else {
46432 - return SWIG_ERROR;
46433 - }
46434 - } else {
46435 - *ptr = vptr;
46436 - }
46437 - return SWIG_OK;
46438 - }
46439 -}
46440 -
46441 -/* Convert a packed value value */
46442 -
46443 -SWIGRUNTIME int
46444 -SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
46445 - swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
46446 - if (!to) return SWIG_ERROR;
46447 - if (ty) {
46448 - if (to != ty) {
46449 - /* check type cast? */
46450 - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
46451 - if (!tc) return SWIG_ERROR;
46452 - }
46453 - }
46454 - return SWIG_OK;
46455 -}
46456 -
46457 -/* -----------------------------------------------------------------------------
46458 - * Create a new pointer object
46459 - * ----------------------------------------------------------------------------- */
46460 -
46461 -/*
46462 - Create a new instance object, without calling __init__, and set the
46463 - 'this' attribute.
46464 -*/
46465 -
46466 -SWIGRUNTIME PyObject*
46467 -SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
46468 -{
46469 -#if (PY_VERSION_HEX >= 0x02020000)
46470 - PyObject *inst = 0;
46471 - PyObject *newraw = data->newraw;
46472 - if (newraw) {
46473 - inst = PyObject_Call(newraw, data->newargs, NULL);
46474 - if (inst) {
46475 -#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
46476 - PyObject **dictptr = _PyObject_GetDictPtr(inst);
46477 - if (dictptr != NULL) {
46478 - PyObject *dict = *dictptr;
46479 - if (dict == NULL) {
46480 - dict = PyDict_New();
46481 - *dictptr = dict;
46482 - PyDict_SetItem(dict, SWIG_This(), swig_this);
46483 - }
46484 - }
46485 -#else
46486 - PyObject *key = SWIG_This();
46487 - PyObject_SetAttr(inst, key, swig_this);
46488 -#endif
46489 - }
46490 - } else {
46491 -#if PY_VERSION_HEX >= 0x03000000
46492 - inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
46493 - if (inst) {
46494 - PyObject_SetAttr(inst, SWIG_This(), swig_this);
46495 - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
46496 - }
46497 -#else
46498 - PyObject *dict = PyDict_New();
46499 - if (dict) {
46500 - PyDict_SetItem(dict, SWIG_This(), swig_this);
46501 - inst = PyInstance_NewRaw(data->newargs, dict);
46502 - Py_DECREF(dict);
46503 - }
46504 -#endif
46505 - }
46506 - return inst;
46507 -#else
46508 -#if (PY_VERSION_HEX >= 0x02010000)
46509 - PyObject *inst = 0;
46510 - PyObject *dict = PyDict_New();
46511 - if (dict) {
46512 - PyDict_SetItem(dict, SWIG_This(), swig_this);
46513 - inst = PyInstance_NewRaw(data->newargs, dict);
46514 - Py_DECREF(dict);
46515 - }
46516 - return (PyObject *) inst;
46517 -#else
46518 - PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
46519 - if (inst == NULL) {
46520 - return NULL;
46521 - }
46522 - inst->in_class = (PyClassObject *)data->newargs;
46523 - Py_INCREF(inst->in_class);
46524 - inst->in_dict = PyDict_New();
46525 - if (inst->in_dict == NULL) {
46526 - Py_DECREF(inst);
46527 - return NULL;
46528 - }
46529 -#ifdef Py_TPFLAGS_HAVE_WEAKREFS
46530 - inst->in_weakreflist = NULL;
46531 -#endif
46532 -#ifdef Py_TPFLAGS_GC
46533 - PyObject_GC_Init(inst);
46534 -#endif
46535 - PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
46536 - return (PyObject *) inst;
46537 -#endif
46538 -#endif
46539 -}
46540 -
46541 -SWIGRUNTIME void
46542 -SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
46543 -{
46544 - PyObject *dict;
46545 -#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
46546 - PyObject **dictptr = _PyObject_GetDictPtr(inst);
46547 - if (dictptr != NULL) {
46548 - dict = *dictptr;
46549 - if (dict == NULL) {
46550 - dict = PyDict_New();
46551 - *dictptr = dict;
46552 - }
46553 - PyDict_SetItem(dict, SWIG_This(), swig_this);
46554 - return;
46555 - }
46556 -#endif
46557 - dict = PyObject_GetAttrString(inst, (char*)"__dict__");
46558 - PyDict_SetItem(dict, SWIG_This(), swig_this);
46559 - Py_DECREF(dict);
46560 -}
46561 -
46562 -
46563 -SWIGINTERN PyObject *
46564 -SWIG_Python_InitShadowInstance(PyObject *args) {
46565 - PyObject *obj[2];
46566 - if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
46567 - return NULL;
46568 - } else {
46569 - SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
46570 - if (sthis) {
46571 - SwigPyObject_append((PyObject*) sthis, obj[1]);
46572 - } else {
46573 - SWIG_Python_SetSwigThis(obj[0], obj[1]);
46574 - }
46575 - return SWIG_Py_Void();
46576 - }
46577 -}
46578 -
46579 -/* Create a new pointer object */
46580 -
46581 -SWIGRUNTIME PyObject *
46582 -SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
46583 - SwigPyClientData *clientdata;
46584 - PyObject * robj;
46585 - int own;
46586 -
46587 - if (!ptr)
46588 - return SWIG_Py_Void();
46589 -
46590 - clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
46591 - own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
46592 - if (clientdata && clientdata->pytype) {
46593 - SwigPyObject *newobj;
46594 - if (flags & SWIG_BUILTIN_TP_INIT) {
46595 - newobj = (SwigPyObject*) self;
46596 - if (newobj->ptr) {
46597 - PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
46598 - while (newobj->next)
46599 - newobj = (SwigPyObject *) newobj->next;
46600 - newobj->next = next_self;
46601 - newobj = (SwigPyObject *)next_self;
46602 - }
46603 - } else {
46604 - newobj = PyObject_New(SwigPyObject, clientdata->pytype);
46605 - }
46606 - if (newobj) {
46607 - newobj->ptr = ptr;
46608 - newobj->ty = type;
46609 - newobj->own = own;
46610 - newobj->next = 0;
46611 -#ifdef SWIGPYTHON_BUILTIN
46612 - newobj->dict = 0;
46613 -#endif
46614 - return (PyObject*) newobj;
46615 - }
46616 - return SWIG_Py_Void();
46617 - }
46618 -
46619 - assert(!(flags & SWIG_BUILTIN_TP_INIT));
46620 -
46621 - robj = SwigPyObject_New(ptr, type, own);
46622 - if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
46623 - PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
46624 - Py_DECREF(robj);
46625 - robj = inst;
46626 - }
46627 - return robj;
46628 -}
46629 -
46630 -/* Create a new packed object */
46631 -
46632 -SWIGRUNTIMEINLINE PyObject *
46633 -SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
46634 - return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
46635 -}
46636 -
46637 -/* -----------------------------------------------------------------------------*
46638 - * Get type list
46639 - * -----------------------------------------------------------------------------*/
46640 -
46641 -#ifdef SWIG_LINK_RUNTIME
46642 -void *SWIG_ReturnGlobalTypeList(void *);
46643 -#endif
46644 -
46645 -SWIGRUNTIME swig_module_info *
46646 -SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
46647 - static void *type_pointer = (void *)0;
46648 - /* first check if module already created */
46649 - if (!type_pointer) {
46650 -#ifdef SWIG_LINK_RUNTIME
46651 - type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
46652 -#else
46653 -# ifdef SWIGPY_USE_CAPSULE
46654 - type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
46655 -# else
46656 - type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
46657 - (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
46658 -# endif
46659 - if (PyErr_Occurred()) {
46660 - PyErr_Clear();
46661 - type_pointer = (void *)0;
46662 - }
46663 -#endif
46664 - }
46665 - return (swig_module_info *) type_pointer;
46666 -}
46667 -
46668 -#if PY_MAJOR_VERSION < 2
46669 -/* PyModule_AddObject function was introduced in Python 2.0. The following function
46670 - is copied out of Python/modsupport.c in python version 2.3.4 */
46671 -SWIGINTERN int
46672 -PyModule_AddObject(PyObject *m, char *name, PyObject *o)
46673 -{
46674 - PyObject *dict;
46675 - if (!PyModule_Check(m)) {
46676 - PyErr_SetString(PyExc_TypeError,
46677 - "PyModule_AddObject() needs module as first arg");
46678 - return SWIG_ERROR;
46679 - }
46680 - if (!o) {
46681 - PyErr_SetString(PyExc_TypeError,
46682 - "PyModule_AddObject() needs non-NULL value");
46683 - return SWIG_ERROR;
46684 - }
46685 -
46686 - dict = PyModule_GetDict(m);
46687 - if (dict == NULL) {
46688 - /* Internal error -- modules must have a dict! */
46689 - PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
46690 - PyModule_GetName(m));
46691 - return SWIG_ERROR;
46692 - }
46693 - if (PyDict_SetItemString(dict, name, o))
46694 - return SWIG_ERROR;
46695 - Py_DECREF(o);
46696 - return SWIG_OK;
46697 -}
46698 -#endif
46699 -
46700 -SWIGRUNTIME void
46701 -#ifdef SWIGPY_USE_CAPSULE
46702 -SWIG_Python_DestroyModule(PyObject *obj)
46703 -#else
46704 -SWIG_Python_DestroyModule(void *vptr)
46705 -#endif
46706 -{
46707 -#ifdef SWIGPY_USE_CAPSULE
46708 - swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
46709 -#else
46710 - swig_module_info *swig_module = (swig_module_info *) vptr;
46711 -#endif
46712 - swig_type_info **types = swig_module->types;
46713 - size_t i;
46714 - for (i =0; i < swig_module->size; ++i) {
46715 - swig_type_info *ty = types[i];
46716 - if (ty->owndata) {
46717 - SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
46718 - if (data) SwigPyClientData_Del(data);
46719 - }
46720 - }
46721 - Py_DECREF(SWIG_This());
46722 - swig_this = NULL;
46723 -}
46724 -
46725 -SWIGRUNTIME void
46726 -SWIG_Python_SetModule(swig_module_info *swig_module) {
46727 -#if PY_VERSION_HEX >= 0x03000000
46728 - /* Add a dummy module object into sys.modules */
46729 - PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
46730 -#else
46731 - static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
46732 - PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
46733 -#endif
46734 -#ifdef SWIGPY_USE_CAPSULE
46735 - PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
46736 - if (pointer && module) {
46737 - PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
46738 - } else {
46739 - Py_XDECREF(pointer);
46740 - }
46741 -#else
46742 - PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
46743 - if (pointer && module) {
46744 - PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
46745 - } else {
46746 - Py_XDECREF(pointer);
46747 - }
46748 -#endif
46749 -}
46750 -
46751 -/* The python cached type query */
46752 -SWIGRUNTIME PyObject *
46753 -SWIG_Python_TypeCache(void) {
46754 - static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
46755 - return cache;
46756 -}
46757 -
46758 -SWIGRUNTIME swig_type_info *
46759 -SWIG_Python_TypeQuery(const char *type)
46760 -{
46761 - PyObject *cache = SWIG_Python_TypeCache();
46762 - PyObject *key = SWIG_Python_str_FromChar(type);
46763 - PyObject *obj = PyDict_GetItem(cache, key);
46764 - swig_type_info *descriptor;
46765 - if (obj) {
46766 -#ifdef SWIGPY_USE_CAPSULE
46767 - descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
46768 -#else
46769 - descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
46770 -#endif
46771 - } else {
46772 - swig_module_info *swig_module = SWIG_GetModule(0);
46773 - descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
46774 - if (descriptor) {
46775 -#ifdef SWIGPY_USE_CAPSULE
46776 - obj = PyCapsule_New((void*) descriptor, NULL, NULL);
46777 -#else
46778 - obj = PyCObject_FromVoidPtr(descriptor, NULL);
46779 -#endif
46780 - PyDict_SetItem(cache, key, obj);
46781 - Py_DECREF(obj);
46782 - }
46783 - }
46784 - Py_DECREF(key);
46785 - return descriptor;
46786 -}
46787 -
46788 -/*
46789 - For backward compatibility only
46790 -*/
46791 -#define SWIG_POINTER_EXCEPTION 0
46792 -#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
46793 -#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
46794 -
46795 -SWIGRUNTIME int
46796 -SWIG_Python_AddErrMesg(const char* mesg, int infront)
46797 -{
46798 - if (PyErr_Occurred()) {
46799 - PyObject *type = 0;
46800 - PyObject *value = 0;
46801 - PyObject *traceback = 0;
46802 - PyErr_Fetch(&type, &value, &traceback);
46803 - if (value) {
46804 - char *tmp;
46805 - PyObject *old_str = PyObject_Str(value);
46806 - Py_XINCREF(type);
46807 - PyErr_Clear();
46808 - if (infront) {
46809 - PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
46810 - } else {
46811 - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
46812 - }
46813 - SWIG_Python_str_DelForPy3(tmp);
46814 - Py_DECREF(old_str);
46815 - }
46816 - return 1;
46817 - } else {
46818 - return 0;
46819 - }
46820 -}
46821 -
46822 -SWIGRUNTIME int
46823 -SWIG_Python_ArgFail(int argnum)
46824 -{
46825 - if (PyErr_Occurred()) {
46826 - /* add information about failing argument */
46827 - char mesg[256];
46828 - PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
46829 - return SWIG_Python_AddErrMesg(mesg, 1);
46830 - } else {
46831 - return 0;
46832 - }
46833 -}
46834 -
46835 -SWIGRUNTIMEINLINE const char *
46836 -SwigPyObject_GetDesc(PyObject *self)
46837 -{
46838 - SwigPyObject *v = (SwigPyObject *)self;
46839 - swig_type_info *ty = v ? v->ty : 0;
46840 - return ty ? ty->str : "";
46841 -}
46842 -
46843 -SWIGRUNTIME void
46844 -SWIG_Python_TypeError(const char *type, PyObject *obj)
46845 -{
46846 - if (type) {
46847 -#if defined(SWIG_COBJECT_TYPES)
46848 - if (obj && SwigPyObject_Check(obj)) {
46849 - const char *otype = (const char *) SwigPyObject_GetDesc(obj);
46850 - if (otype) {
46851 - PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
46852 - type, otype);
46853 - return;
46854 - }
46855 - } else
46856 -#endif
46857 - {
46858 - const char *otype = (obj ? obj->ob_type->tp_name : 0);
46859 - if (otype) {
46860 - PyObject *str = PyObject_Str(obj);
46861 - const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
46862 - if (cstr) {
46863 - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
46864 - type, otype, cstr);
46865 - SWIG_Python_str_DelForPy3(cstr);
46866 - } else {
46867 - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
46868 - type, otype);
46869 - }
46870 - Py_XDECREF(str);
46871 - return;
46872 - }
46873 - }
46874 - PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
46875 - } else {
46876 - PyErr_Format(PyExc_TypeError, "unexpected type is received");
46877 - }
46878 -}
46879 -
46880 -
46881 -/* Convert a pointer value, signal an exception on a type mismatch */
46882 -SWIGRUNTIME void *
46883 -SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
46884 - void *result;
46885 - if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
46886 - PyErr_Clear();
46887 -#if SWIG_POINTER_EXCEPTION
46888 - if (flags) {
46889 - SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
46890 - SWIG_Python_ArgFail(argnum);
46891 - }
46892 -#endif
46893 - }
46894 - return result;
46895 -}
46896 -
46897 -#ifdef SWIGPYTHON_BUILTIN
46898 -SWIGRUNTIME int
46899 -SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
46900 - PyTypeObject *tp = obj->ob_type;
46901 - PyObject *descr;
46902 - PyObject *encoded_name;
46903 - descrsetfunc f;
46904 - int res;
46905 -
46906 -# ifdef Py_USING_UNICODE
46907 - if (PyString_Check(name)) {
46908 - name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
46909 - if (!name)
46910 - return -1;
46911 - } else if (!PyUnicode_Check(name))
46912 -# else
46913 - if (!PyString_Check(name))
46914 -# endif
46915 - {
46916 - PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
46917 - return -1;
46918 - } else {
46919 - Py_INCREF(name);
46920 - }
46921 -
46922 - if (!tp->tp_dict) {
46923 - if (PyType_Ready(tp) < 0)
46924 - goto done;
46925 - }
46926 -
46927 - res = -1;
46928 - descr = _PyType_Lookup(tp, name);
46929 - f = NULL;
46930 - if (descr != NULL)
46931 - f = descr->ob_type->tp_descr_set;
46932 - if (!f) {
46933 - if (PyString_Check(name)) {
46934 - encoded_name = name;
46935 - Py_INCREF(name);
46936 - } else {
46937 - encoded_name = PyUnicode_AsUTF8String(name);
46938 - }
46939 - PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
46940 - Py_DECREF(encoded_name);
46941 - } else {
46942 - res = f(descr, obj, value);
46943 - }
46944 -
46945 - done:
46946 - Py_DECREF(name);
46947 - return res;
46948 -}
46949 -#endif
46950 -
46951 -
46952 -#ifdef __cplusplus
46953 -}
46954 -#endif
46955 -
46956 -
46957 -
46958 -#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
46959 -
46960 -#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
46961 -
46962 -
46963 -
46964 -/* -------- TYPES TABLE (BEGIN) -------- */
46965 -
46966 -#define SWIGTYPE_p_char swig_types[0]
46967 -#define SWIGTYPE_p_std__exception swig_types[1]
46968 -#define SWIGTYPE_p_std__ostream swig_types[2]
46969 -#define SWIGTYPE_p_vips__VError swig_types[3]
46970 -static swig_type_info *swig_types[5];
46971 -static swig_module_info swig_module = {swig_types, 4, 0, 0, 0, 0};
46972 -#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
46973 -#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
46974 -
46975 -/* -------- TYPES TABLE (END) -------- */
46976 -
46977 -#if (PY_VERSION_HEX <= 0x02000000)
46978 -# if !defined(SWIG_PYTHON_CLASSIC)
46979 -# error "This python version requires swig to be run with the '-classic' option"
46980 -# endif
46981 -#endif
46982 -
46983 -/*-----------------------------------------------
46984 - @(target):= verrormodule.so
46985 - ------------------------------------------------*/
46986 -#if PY_VERSION_HEX >= 0x03000000
46987 -# define SWIG_init PyInit_verrormodule
46988 -
46989 -#else
46990 -# define SWIG_init initverrormodule
46991 -
46992 -#endif
46993 -#define SWIG_name "verrormodule"
46994 -
46995 -#define SWIGVERSION 0x020010
46996 -#define SWIG_VERSION SWIGVERSION
46997 -
46998 -
46999 -#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
47000 -#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
47001 -
47002 -
47003 -#include <stdexcept>
47004 -
47005 -
47006 -namespace swig {
47007 - class SwigPtr_PyObject {
47008 - protected:
47009 - PyObject *_obj;
47010 -
47011 - public:
47012 - SwigPtr_PyObject() :_obj(0)
47013 - {
47014 - }
47015 -
47016 - SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
47017 - {
47018 - Py_XINCREF(_obj);
47019 - }
47020 -
47021 - SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
47022 - {
47023 - if (initial_ref) {
47024 - Py_XINCREF(_obj);
47025 - }
47026 - }
47027 -
47028 - SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
47029 - {
47030 - Py_XINCREF(item._obj);
47031 - Py_XDECREF(_obj);
47032 - _obj = item._obj;
47033 - return *this;
47034 - }
47035 -
47036 - ~SwigPtr_PyObject()
47037 - {
47038 - Py_XDECREF(_obj);
47039 - }
47040 -
47041 - operator PyObject *() const
47042 - {
47043 - return _obj;
47044 - }
47045 -
47046 - PyObject *operator->() const
47047 - {
47048 - return _obj;
47049 - }
47050 - };
47051 -}
47052 -
47053 -
47054 -namespace swig {
47055 - struct SwigVar_PyObject : SwigPtr_PyObject {
47056 - SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
47057 -
47058 - SwigVar_PyObject & operator = (PyObject* obj)
47059 - {
47060 - Py_XDECREF(_obj);
47061 - _obj = obj;
47062 - return *this;
47063 - }
47064 - };
47065 -}
47066 -
47067 -
47068 -#include <vips/vipscpp.h>
47069 -
47070 -
47071 -#include <stdexcept>
47072 -
47073 -
47074 -#include <string>
47075 -
47076 -
47077 -SWIGINTERN swig_type_info*
47078 -SWIG_pchar_descriptor(void)
47079 -{
47080 - static int init = 0;
47081 - static swig_type_info* info = 0;
47082 - if (!init) {
47083 - info = SWIG_TypeQuery("_p_char");
47084 - init = 1;
47085 - }
47086 - return info;
47087 -}
47088 -
47089 -
47090 -SWIGINTERN int
47091 -SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
47092 -{
47093 -#if PY_VERSION_HEX>=0x03000000
47094 - if (PyUnicode_Check(obj))
47095 -#else
47096 - if (PyString_Check(obj))
47097 -#endif
47098 - {
47099 - char *cstr; Py_ssize_t len;
47100 -#if PY_VERSION_HEX>=0x03000000
47101 - if (!alloc && cptr) {
47102 - /* We can't allow converting without allocation, since the internal
47103 - representation of string in Python 3 is UCS-2/UCS-4 but we require
47104 - a UTF-8 representation.
47105 - TODO(bhy) More detailed explanation */
47106 - return SWIG_RuntimeError;
47107 - }
47108 - obj = PyUnicode_AsUTF8String(obj);
47109 - PyBytes_AsStringAndSize(obj, &cstr, &len);
47110 - if(alloc) *alloc = SWIG_NEWOBJ;
47111 -#else
47112 - PyString_AsStringAndSize(obj, &cstr, &len);
47113 -#endif
47114 - if (cptr) {
47115 - if (alloc) {
47116 - /*
47117 - In python the user should not be able to modify the inner
47118 - string representation. To warranty that, if you define
47119 - SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
47120 - buffer is always returned.
47121 -
47122 - The default behavior is just to return the pointer value,
47123 - so, be careful.
47124 - */
47125 -#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
47126 - if (*alloc != SWIG_OLDOBJ)
47127 -#else
47128 - if (*alloc == SWIG_NEWOBJ)
47129 -#endif
47130 - {
47131 - *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
47132 - *alloc = SWIG_NEWOBJ;
47133 - }
47134 - else {
47135 - *cptr = cstr;
47136 - *alloc = SWIG_OLDOBJ;
47137 - }
47138 - } else {
47139 - #if PY_VERSION_HEX>=0x03000000
47140 - assert(0); /* Should never reach here in Python 3 */
47141 - #endif
47142 - *cptr = SWIG_Python_str_AsChar(obj);
47143 - }
47144 - }
47145 - if (psize) *psize = len + 1;
47146 -#if PY_VERSION_HEX>=0x03000000
47147 - Py_XDECREF(obj);
47148 -#endif
47149 - return SWIG_OK;
47150 - } else {
47151 - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
47152 - if (pchar_descriptor) {
47153 - void* vptr = 0;
47154 - if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
47155 - if (cptr) *cptr = (char *) vptr;
47156 - if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
47157 - if (alloc) *alloc = SWIG_OLDOBJ;
47158 - return SWIG_OK;
47159 - }
47160 - }
47161 - }
47162 - return SWIG_TypeError;
47163 -}
47164 -
47165 -
47166 -SWIGINTERN int
47167 -SWIG_AsPtr_std_string (PyObject * obj, std::string **val)
47168 -{
47169 - char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
47170 - if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
47171 - if (buf) {
47172 - if (val) *val = new std::string(buf, size - 1);
47173 - if (alloc == SWIG_NEWOBJ) delete[] buf;
47174 - return SWIG_NEWOBJ;
47175 - } else {
47176 - if (val) *val = 0;
47177 - return SWIG_OLDOBJ;
47178 - }
47179 - } else {
47180 - static int init = 0;
47181 - static swig_type_info* descriptor = 0;
47182 - if (!init) {
47183 - descriptor = SWIG_TypeQuery("std::string" " *");
47184 - init = 1;
47185 - }
47186 - if (descriptor) {
47187 - std::string *vptr;
47188 - int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0);
47189 - if (SWIG_IsOK(res) && val) *val = vptr;
47190 - return res;
47191 - }
47192 - }
47193 - return SWIG_ERROR;
47194 -}
47195 -
47196 -
47197 -
47198 -
47199 -
47200 -#include <limits.h>
47201 -#if !defined(SWIG_NO_LLONG_MAX)
47202 -# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
47203 -# define LLONG_MAX __LONG_LONG_MAX__
47204 -# define LLONG_MIN (-LLONG_MAX - 1LL)
47205 -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
47206 -# endif
47207 -#endif
47208 -
47209 -
47210 -SWIGINTERN int
47211 -SWIG_AsVal_double (PyObject *obj, double *val)
47212 -{
47213 - int res = SWIG_TypeError;
47214 - if (PyFloat_Check(obj)) {
47215 - if (val) *val = PyFloat_AsDouble(obj);
47216 - return SWIG_OK;
47217 - } else if (PyInt_Check(obj)) {
47218 - if (val) *val = PyInt_AsLong(obj);
47219 - return SWIG_OK;
47220 - } else if (PyLong_Check(obj)) {
47221 - double v = PyLong_AsDouble(obj);
47222 - if (!PyErr_Occurred()) {
47223 - if (val) *val = v;
47224 - return SWIG_OK;
47225 - } else {
47226 - PyErr_Clear();
47227 - }
47228 - }
47229 -#ifdef SWIG_PYTHON_CAST_MODE
47230 - {
47231 - int dispatch = 0;
47232 - double d = PyFloat_AsDouble(obj);
47233 - if (!PyErr_Occurred()) {
47234 - if (val) *val = d;
47235 - return SWIG_AddCast(SWIG_OK);
47236 - } else {
47237 - PyErr_Clear();
47238 - }
47239 - if (!dispatch) {
47240 - long v = PyLong_AsLong(obj);
47241 - if (!PyErr_Occurred()) {
47242 - if (val) *val = v;
47243 - return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
47244 - } else {
47245 - PyErr_Clear();
47246 - }
47247 - }
47248 - }
47249 -#endif
47250 - return res;
47251 -}
47252 -
47253 -
47254 -#include <float.h>
47255 -
47256 -
47257 -#include <math.h>
47258 -
47259 -
47260 -SWIGINTERNINLINE int
47261 -SWIG_CanCastAsInteger(double *d, double min, double max) {
47262 - double x = *d;
47263 - if ((min <= x && x <= max)) {
47264 - double fx = floor(x);
47265 - double cx = ceil(x);
47266 - double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
47267 - if ((errno == EDOM) || (errno == ERANGE)) {
47268 - errno = 0;
47269 - } else {
47270 - double summ, reps, diff;
47271 - if (rd < x) {
47272 - diff = x - rd;
47273 - } else if (rd > x) {
47274 - diff = rd - x;
47275 - } else {
47276 - return 1;
47277 - }
47278 - summ = rd + x;
47279 - reps = diff/summ;
47280 - if (reps < 8*DBL_EPSILON) {
47281 - *d = rd;
47282 - return 1;
47283 - }
47284 - }
47285 - }
47286 - return 0;
47287 -}
47288 -
47289 -
47290 -SWIGINTERN int
47291 -SWIG_AsVal_long (PyObject *obj, long* val)
47292 -{
47293 - if (PyInt_Check(obj)) {
47294 - if (val) *val = PyInt_AsLong(obj);
47295 - return SWIG_OK;
47296 - } else if (PyLong_Check(obj)) {
47297 - long v = PyLong_AsLong(obj);
47298 - if (!PyErr_Occurred()) {
47299 - if (val) *val = v;
47300 - return SWIG_OK;
47301 - } else {
47302 - PyErr_Clear();
47303 - }
47304 - }
47305 -#ifdef SWIG_PYTHON_CAST_MODE
47306 - {
47307 - int dispatch = 0;
47308 - long v = PyInt_AsLong(obj);
47309 - if (!PyErr_Occurred()) {
47310 - if (val) *val = v;
47311 - return SWIG_AddCast(SWIG_OK);
47312 - } else {
47313 - PyErr_Clear();
47314 - }
47315 - if (!dispatch) {
47316 - double d;
47317 - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
47318 - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
47319 - if (val) *val = (long)(d);
47320 - return res;
47321 - }
47322 - }
47323 - }
47324 -#endif
47325 - return SWIG_TypeError;
47326 -}
47327 -
47328 -
47329 -SWIGINTERN int
47330 -SWIG_AsVal_int (PyObject * obj, int *val)
47331 -{
47332 - long v;
47333 - int res = SWIG_AsVal_long (obj, &v);
47334 - if (SWIG_IsOK(res)) {
47335 - if ((v < INT_MIN || v > INT_MAX)) {
47336 - return SWIG_OverflowError;
47337 - } else {
47338 - if (val) *val = static_cast< int >(v);
47339 - }
47340 - }
47341 - return res;
47342 -}
47343 -
47344 -
47345 -SWIGINTERNINLINE PyObject *
47346 -SWIG_FromCharPtrAndSize(const char* carray, size_t size)
47347 -{
47348 - if (carray) {
47349 - if (size > INT_MAX) {
47350 - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
47351 - return pchar_descriptor ?
47352 - SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
47353 - } else {
47354 -#if PY_VERSION_HEX >= 0x03000000
47355 - return PyUnicode_FromStringAndSize(carray, static_cast< int >(size));
47356 -#else
47357 - return PyString_FromStringAndSize(carray, static_cast< int >(size));
47358 -#endif
47359 - }
47360 - } else {
47361 - return SWIG_Py_Void();
47362 - }
47363 -}
47364 -
47365 -
47366 -SWIGINTERNINLINE PyObject *
47367 -SWIG_FromCharPtr(const char *cptr)
47368 -{
47369 - return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
47370 -}
47371 -
47372 -SWIGINTERN char const *vips_VError___str__(vips::VError *self){
47373 - return self->what ();
47374 - }
47375 -#ifdef __cplusplus
47376 -extern "C" {
47377 -#endif
47378 -SWIGINTERN PyObject *_wrap_new_VError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47379 - PyObject *resultobj = 0;
47380 - std::string arg1 ;
47381 - PyObject * obj0 = 0 ;
47382 - vips::VError *result = 0 ;
47383 -
47384 - if (!PyArg_ParseTuple(args,(char *)"O:new_VError",&obj0)) SWIG_fail;
47385 - {
47386 - std::string *ptr = (std::string *)0;
47387 - int res = SWIG_AsPtr_std_string(obj0, &ptr);
47388 - if (!SWIG_IsOK(res) || !ptr) {
47389 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_VError" "', argument " "1"" of type '" "std::string""'");
47390 - }
47391 - arg1 = *ptr;
47392 - if (SWIG_IsNewObj(res)) delete ptr;
47393 - }
47394 - result = (vips::VError *)new vips::VError(arg1);
47395 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VError, SWIG_POINTER_NEW | 0 );
47396 - return resultobj;
47397 -fail:
47398 - return NULL;
47399 -}
47400 -
47401 -
47402 -SWIGINTERN PyObject *_wrap_new_VError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47403 - PyObject *resultobj = 0;
47404 - vips::VError *result = 0 ;
47405 -
47406 - if (!PyArg_ParseTuple(args,(char *)":new_VError")) SWIG_fail;
47407 - result = (vips::VError *)new vips::VError();
47408 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VError, SWIG_POINTER_NEW | 0 );
47409 - return resultobj;
47410 -fail:
47411 - return NULL;
47412 -}
47413 -
47414 -
47415 -SWIGINTERN PyObject *_wrap_new_VError(PyObject *self, PyObject *args) {
47416 - int argc;
47417 - PyObject *argv[2];
47418 - int ii;
47419 -
47420 - if (!PyTuple_Check(args)) SWIG_fail;
47421 - argc = args ? (int)PyObject_Length(args) : 0;
47422 - for (ii = 0; (ii < 1) && (ii < argc); ii++) {
47423 - argv[ii] = PyTuple_GET_ITEM(args,ii);
47424 - }
47425 - if (argc == 0) {
47426 - return _wrap_new_VError__SWIG_1(self, args);
47427 - }
47428 - if (argc == 1) {
47429 - int _v;
47430 - int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
47431 - _v = SWIG_CheckState(res);
47432 - if (_v) {
47433 - return _wrap_new_VError__SWIG_0(self, args);
47434 - }
47435 - }
47436 -
47437 -fail:
47438 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VError'.\n"
47439 - " Possible C/C++ prototypes are:\n"
47440 - " vips::VError::VError(std::string)\n"
47441 - " vips::VError::VError()\n");
47442 - return 0;
47443 -}
47444 -
47445 -
47446 -SWIGINTERN PyObject *_wrap_delete_VError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47447 - PyObject *resultobj = 0;
47448 - vips::VError *arg1 = (vips::VError *) 0 ;
47449 - void *argp1 = 0 ;
47450 - int res1 = 0 ;
47451 - PyObject * obj0 = 0 ;
47452 -
47453 - if (!PyArg_ParseTuple(args,(char *)"O:delete_VError",&obj0)) SWIG_fail;
47454 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, SWIG_POINTER_DISOWN | 0 );
47455 - if (!SWIG_IsOK(res1)) {
47456 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VError" "', argument " "1"" of type '" "vips::VError *""'");
47457 - }
47458 - arg1 = reinterpret_cast< vips::VError * >(argp1);
47459 - delete arg1;
47460 - resultobj = SWIG_Py_Void();
47461 - return resultobj;
47462 -fail:
47463 - return NULL;
47464 -}
47465 -
47466 -
47467 -SWIGINTERN PyObject *_wrap_VError_perror__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47468 - PyObject *resultobj = 0;
47469 - vips::VError *arg1 = (vips::VError *) 0 ;
47470 - char *arg2 = (char *) 0 ;
47471 - void *argp1 = 0 ;
47472 - int res1 = 0 ;
47473 - int res2 ;
47474 - char *buf2 = 0 ;
47475 - int alloc2 = 0 ;
47476 - PyObject * obj0 = 0 ;
47477 - PyObject * obj1 = 0 ;
47478 -
47479 - if (!PyArg_ParseTuple(args,(char *)"OO:VError_perror",&obj0,&obj1)) SWIG_fail;
47480 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, 0 | 0 );
47481 - if (!SWIG_IsOK(res1)) {
47482 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VError_perror" "', argument " "1"" of type '" "vips::VError *""'");
47483 - }
47484 - arg1 = reinterpret_cast< vips::VError * >(argp1);
47485 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
47486 - if (!SWIG_IsOK(res2)) {
47487 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VError_perror" "', argument " "2"" of type '" "char const *""'");
47488 - }
47489 - arg2 = reinterpret_cast< char * >(buf2);
47490 - (arg1)->perror((char const *)arg2);
47491 - resultobj = SWIG_Py_Void();
47492 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
47493 - return resultobj;
47494 -fail:
47495 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
47496 - return NULL;
47497 -}
47498 -
47499 -
47500 -SWIGINTERN PyObject *_wrap_VError_perror__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47501 - PyObject *resultobj = 0;
47502 - vips::VError *arg1 = (vips::VError *) 0 ;
47503 - void *argp1 = 0 ;
47504 - int res1 = 0 ;
47505 - PyObject * obj0 = 0 ;
47506 -
47507 - if (!PyArg_ParseTuple(args,(char *)"O:VError_perror",&obj0)) SWIG_fail;
47508 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, 0 | 0 );
47509 - if (!SWIG_IsOK(res1)) {
47510 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VError_perror" "', argument " "1"" of type '" "vips::VError *""'");
47511 - }
47512 - arg1 = reinterpret_cast< vips::VError * >(argp1);
47513 - (arg1)->perror();
47514 - resultobj = SWIG_Py_Void();
47515 - return resultobj;
47516 -fail:
47517 - return NULL;
47518 -}
47519 -
47520 -
47521 -SWIGINTERN PyObject *_wrap_VError_perror(PyObject *self, PyObject *args) {
47522 - int argc;
47523 - PyObject *argv[3];
47524 - int ii;
47525 -
47526 - if (!PyTuple_Check(args)) SWIG_fail;
47527 - argc = args ? (int)PyObject_Length(args) : 0;
47528 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
47529 - argv[ii] = PyTuple_GET_ITEM(args,ii);
47530 - }
47531 - if (argc == 1) {
47532 - int _v;
47533 - void *vptr = 0;
47534 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VError, 0);
47535 - _v = SWIG_CheckState(res);
47536 - if (_v) {
47537 - return _wrap_VError_perror__SWIG_1(self, args);
47538 - }
47539 - }
47540 - if (argc == 2) {
47541 - int _v;
47542 - void *vptr = 0;
47543 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VError, 0);
47544 - _v = SWIG_CheckState(res);
47545 - if (_v) {
47546 - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
47547 - _v = SWIG_CheckState(res);
47548 - if (_v) {
47549 - return _wrap_VError_perror__SWIG_0(self, args);
47550 - }
47551 - }
47552 - }
47553 -
47554 -fail:
47555 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VError_perror'.\n"
47556 - " Possible C/C++ prototypes are:\n"
47557 - " vips::VError::perror(char const *)\n"
47558 - " vips::VError::perror()\n");
47559 - return 0;
47560 -}
47561 -
47562 -
47563 -SWIGINTERN PyObject *_wrap_VError_app__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47564 - PyObject *resultobj = 0;
47565 - vips::VError *arg1 = (vips::VError *) 0 ;
47566 - std::string arg2 ;
47567 - void *argp1 = 0 ;
47568 - int res1 = 0 ;
47569 - PyObject * obj0 = 0 ;
47570 - PyObject * obj1 = 0 ;
47571 - vips::VError *result = 0 ;
47572 -
47573 - if (!PyArg_ParseTuple(args,(char *)"OO:VError_app",&obj0,&obj1)) SWIG_fail;
47574 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, 0 | 0 );
47575 - if (!SWIG_IsOK(res1)) {
47576 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VError_app" "', argument " "1"" of type '" "vips::VError *""'");
47577 - }
47578 - arg1 = reinterpret_cast< vips::VError * >(argp1);
47579 - {
47580 - std::string *ptr = (std::string *)0;
47581 - int res = SWIG_AsPtr_std_string(obj1, &ptr);
47582 - if (!SWIG_IsOK(res) || !ptr) {
47583 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VError_app" "', argument " "2"" of type '" "std::string""'");
47584 - }
47585 - arg2 = *ptr;
47586 - if (SWIG_IsNewObj(res)) delete ptr;
47587 - }
47588 - result = (vips::VError *) &(arg1)->app(arg2);
47589 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VError, 0 | 0 );
47590 - return resultobj;
47591 -fail:
47592 - return NULL;
47593 -}
47594 -
47595 -
47596 -SWIGINTERN PyObject *_wrap_VError_app__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47597 - PyObject *resultobj = 0;
47598 - vips::VError *arg1 = (vips::VError *) 0 ;
47599 - int arg2 ;
47600 - void *argp1 = 0 ;
47601 - int res1 = 0 ;
47602 - int val2 ;
47603 - int ecode2 = 0 ;
47604 - PyObject * obj0 = 0 ;
47605 - PyObject * obj1 = 0 ;
47606 - vips::VError *result = 0 ;
47607 -
47608 - if (!PyArg_ParseTuple(args,(char *)"OO:VError_app",&obj0,&obj1)) SWIG_fail;
47609 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, 0 | 0 );
47610 - if (!SWIG_IsOK(res1)) {
47611 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VError_app" "', argument " "1"" of type '" "vips::VError *""'");
47612 - }
47613 - arg1 = reinterpret_cast< vips::VError * >(argp1);
47614 - ecode2 = SWIG_AsVal_int(obj1, &val2);
47615 - if (!SWIG_IsOK(ecode2)) {
47616 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VError_app" "', argument " "2"" of type '" "int""'");
47617 - }
47618 - arg2 = static_cast< int >(val2);
47619 - result = (vips::VError *) &(arg1)->app(arg2);
47620 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VError, 0 | 0 );
47621 - return resultobj;
47622 -fail:
47623 - return NULL;
47624 -}
47625 -
47626 -
47627 -SWIGINTERN PyObject *_wrap_VError_app(PyObject *self, PyObject *args) {
47628 - int argc;
47629 - PyObject *argv[3];
47630 - int ii;
47631 -
47632 - if (!PyTuple_Check(args)) SWIG_fail;
47633 - argc = args ? (int)PyObject_Length(args) : 0;
47634 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
47635 - argv[ii] = PyTuple_GET_ITEM(args,ii);
47636 - }
47637 - if (argc == 2) {
47638 - int _v;
47639 - void *vptr = 0;
47640 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VError, 0);
47641 - _v = SWIG_CheckState(res);
47642 - if (_v) {
47643 - {
47644 - int res = SWIG_AsVal_int(argv[1], NULL);
47645 - _v = SWIG_CheckState(res);
47646 - }
47647 - if (_v) {
47648 - return _wrap_VError_app__SWIG_1(self, args);
47649 - }
47650 - }
47651 - }
47652 - if (argc == 2) {
47653 - int _v;
47654 - void *vptr = 0;
47655 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VError, 0);
47656 - _v = SWIG_CheckState(res);
47657 - if (_v) {
47658 - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
47659 - _v = SWIG_CheckState(res);
47660 - if (_v) {
47661 - return _wrap_VError_app__SWIG_0(self, args);
47662 - }
47663 - }
47664 - }
47665 -
47666 -fail:
47667 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VError_app'.\n"
47668 - " Possible C/C++ prototypes are:\n"
47669 - " vips::VError::app(std::string)\n"
47670 - " vips::VError::app(int const)\n");
47671 - return 0;
47672 -}
47673 -
47674 -
47675 -SWIGINTERN PyObject *_wrap_VError_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47676 - PyObject *resultobj = 0;
47677 - vips::VError *arg1 = (vips::VError *) 0 ;
47678 - void *argp1 = 0 ;
47679 - int res1 = 0 ;
47680 - PyObject * obj0 = 0 ;
47681 - char *result = 0 ;
47682 -
47683 - if (!PyArg_ParseTuple(args,(char *)"O:VError_what",&obj0)) SWIG_fail;
47684 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, 0 | 0 );
47685 - if (!SWIG_IsOK(res1)) {
47686 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VError_what" "', argument " "1"" of type '" "vips::VError const *""'");
47687 - }
47688 - arg1 = reinterpret_cast< vips::VError * >(argp1);
47689 - result = (char *)((vips::VError const *)arg1)->what();
47690 - resultobj = SWIG_FromCharPtr((const char *)result);
47691 - return resultobj;
47692 -fail:
47693 - return NULL;
47694 -}
47695 -
47696 -
47697 -SWIGINTERN PyObject *_wrap_VError_ostream_print(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47698 - PyObject *resultobj = 0;
47699 - vips::VError *arg1 = (vips::VError *) 0 ;
47700 - std::ostream *arg2 = 0 ;
47701 - void *argp1 = 0 ;
47702 - int res1 = 0 ;
47703 - void *argp2 = 0 ;
47704 - int res2 = 0 ;
47705 - PyObject * obj0 = 0 ;
47706 - PyObject * obj1 = 0 ;
47707 -
47708 - if (!PyArg_ParseTuple(args,(char *)"OO:VError_ostream_print",&obj0,&obj1)) SWIG_fail;
47709 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, 0 | 0 );
47710 - if (!SWIG_IsOK(res1)) {
47711 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VError_ostream_print" "', argument " "1"" of type '" "vips::VError const *""'");
47712 - }
47713 - arg1 = reinterpret_cast< vips::VError * >(argp1);
47714 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__ostream, 0 );
47715 - if (!SWIG_IsOK(res2)) {
47716 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VError_ostream_print" "', argument " "2"" of type '" "std::ostream &""'");
47717 - }
47718 - if (!argp2) {
47719 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VError_ostream_print" "', argument " "2"" of type '" "std::ostream &""'");
47720 - }
47721 - arg2 = reinterpret_cast< std::ostream * >(argp2);
47722 - ((vips::VError const *)arg1)->ostream_print(*arg2);
47723 - resultobj = SWIG_Py_Void();
47724 - return resultobj;
47725 -fail:
47726 - return NULL;
47727 -}
47728 -
47729 -
47730 -SWIGINTERN PyObject *_wrap_VError___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47731 - PyObject *resultobj = 0;
47732 - vips::VError *arg1 = (vips::VError *) 0 ;
47733 - void *argp1 = 0 ;
47734 - int res1 = 0 ;
47735 - PyObject * obj0 = 0 ;
47736 - char *result = 0 ;
47737 -
47738 - if (!PyArg_ParseTuple(args,(char *)"O:VError___str__",&obj0)) SWIG_fail;
47739 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, 0 | 0 );
47740 - if (!SWIG_IsOK(res1)) {
47741 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VError___str__" "', argument " "1"" of type '" "vips::VError *""'");
47742 - }
47743 - arg1 = reinterpret_cast< vips::VError * >(argp1);
47744 - result = (char *)vips_VError___str__(arg1);
47745 - resultobj = SWIG_FromCharPtr((const char *)result);
47746 - return resultobj;
47747 -fail:
47748 - return NULL;
47749 -}
47750 -
47751 -
47752 -SWIGINTERN PyObject *VError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47753 - PyObject *obj;
47754 - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
47755 - SWIG_TypeNewClientData(SWIGTYPE_p_vips__VError, SWIG_NewClientData(obj));
47756 - return SWIG_Py_Void();
47757 -}
47758 -
47759 -SWIGINTERN PyObject *_wrap___lshift__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47760 - PyObject *resultobj = 0;
47761 - std::ostream *arg1 = 0 ;
47762 - vips::VError *arg2 = 0 ;
47763 - void *argp1 = 0 ;
47764 - int res1 = 0 ;
47765 - void *argp2 = 0 ;
47766 - int res2 = 0 ;
47767 - PyObject * obj0 = 0 ;
47768 - PyObject * obj1 = 0 ;
47769 - std::ostream *result = 0 ;
47770 -
47771 - if (!PyArg_ParseTuple(args,(char *)"OO:__lshift__",&obj0,&obj1)) SWIG_fail;
47772 - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__ostream, 0 );
47773 - if (!SWIG_IsOK(res1)) {
47774 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__lshift__" "', argument " "1"" of type '" "std::ostream &""'");
47775 - }
47776 - if (!argp1) {
47777 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lshift__" "', argument " "1"" of type '" "std::ostream &""'");
47778 - }
47779 - arg1 = reinterpret_cast< std::ostream * >(argp1);
47780 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VError, 0 | 0);
47781 - if (!SWIG_IsOK(res2)) {
47782 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__lshift__" "', argument " "2"" of type '" "vips::VError const &""'");
47783 - }
47784 - if (!argp2) {
47785 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lshift__" "', argument " "2"" of type '" "vips::VError const &""'");
47786 - }
47787 - arg2 = reinterpret_cast< vips::VError * >(argp2);
47788 - result = (std::ostream *) &vips::operator <<(*arg1,(vips::VError const &)*arg2);
47789 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__ostream, 0 | 0 );
47790 - return resultobj;
47791 -fail:
47792 - return NULL;
47793 -}
47794 -
47795 -
47796 -SWIGINTERN PyObject *_wrap_verror__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47797 - PyObject *resultobj = 0;
47798 - std::string arg1 ;
47799 - PyObject * obj0 = 0 ;
47800 -
47801 - if (!PyArg_ParseTuple(args,(char *)"O:verror",&obj0)) SWIG_fail;
47802 - {
47803 - std::string *ptr = (std::string *)0;
47804 - int res = SWIG_AsPtr_std_string(obj0, &ptr);
47805 - if (!SWIG_IsOK(res) || !ptr) {
47806 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "verror" "', argument " "1"" of type '" "std::string""'");
47807 - }
47808 - arg1 = *ptr;
47809 - if (SWIG_IsNewObj(res)) delete ptr;
47810 - }
47811 - try {
47812 - vips::verror(arg1);
47813 - }
47814 - catch(vips::VError &_e) {
47815 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
47816 - }
47817 -
47818 - resultobj = SWIG_Py_Void();
47819 - return resultobj;
47820 -fail:
47821 - return NULL;
47822 -}
47823 -
47824 -
47825 -SWIGINTERN PyObject *_wrap_verror__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47826 - PyObject *resultobj = 0;
47827 -
47828 - if (!PyArg_ParseTuple(args,(char *)":verror")) SWIG_fail;
47829 - try {
47830 - vips::verror();
47831 - }
47832 - catch(vips::VError &_e) {
47833 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
47834 - }
47835 -
47836 - resultobj = SWIG_Py_Void();
47837 - return resultobj;
47838 -fail:
47839 - return NULL;
47840 -}
47841 -
47842 -
47843 -SWIGINTERN PyObject *_wrap_verror(PyObject *self, PyObject *args) {
47844 - int argc;
47845 - PyObject *argv[2];
47846 - int ii;
47847 -
47848 - if (!PyTuple_Check(args)) SWIG_fail;
47849 - argc = args ? (int)PyObject_Length(args) : 0;
47850 - for (ii = 0; (ii < 1) && (ii < argc); ii++) {
47851 - argv[ii] = PyTuple_GET_ITEM(args,ii);
47852 - }
47853 - if (argc == 0) {
47854 - return _wrap_verror__SWIG_1(self, args);
47855 - }
47856 - if (argc == 1) {
47857 - int _v;
47858 - int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
47859 - _v = SWIG_CheckState(res);
47860 - if (_v) {
47861 - return _wrap_verror__SWIG_0(self, args);
47862 - }
47863 - }
47864 -
47865 -fail:
47866 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'verror'.\n"
47867 - " Possible C/C++ prototypes are:\n"
47868 - " vips::verror(std::string)\n"
47869 - " vips::verror()\n");
47870 - return 0;
47871 -}
47872 -
47873 -
47874 -static PyMethodDef SwigMethods[] = {
47875 - { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
47876 - { (char *)"new_VError", _wrap_new_VError, METH_VARARGS, NULL},
47877 - { (char *)"delete_VError", _wrap_delete_VError, METH_VARARGS, NULL},
47878 - { (char *)"VError_perror", _wrap_VError_perror, METH_VARARGS, NULL},
47879 - { (char *)"VError_app", _wrap_VError_app, METH_VARARGS, NULL},
47880 - { (char *)"VError_what", _wrap_VError_what, METH_VARARGS, NULL},
47881 - { (char *)"VError_ostream_print", _wrap_VError_ostream_print, METH_VARARGS, NULL},
47882 - { (char *)"VError___str__", _wrap_VError___str__, METH_VARARGS, NULL},
47883 - { (char *)"VError_swigregister", VError_swigregister, METH_VARARGS, NULL},
47884 - { (char *)"__lshift__", _wrap___lshift__, METH_VARARGS, NULL},
47885 - { (char *)"verror", _wrap_verror, METH_VARARGS, NULL},
47886 - { NULL, NULL, 0, NULL }
47887 -};
47888 -
47889 -
47890 -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
47891 -
47892 -static void *_p_vips__VErrorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
47893 - return (void *)((std::exception *) ((vips::VError *) x));
47894 -}
47895 -static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
47896 -static swig_type_info _swigt__p_std__exception = {"_p_std__exception", "std::exception *", 0, 0, (void*)0, 0};
47897 -static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0};
47898 -static swig_type_info _swigt__p_vips__VError = {"_p_vips__VError", "vips::VError *", 0, 0, (void*)0, 0};
47899 -
47900 -static swig_type_info *swig_type_initial[] = {
47901 - &_swigt__p_char,
47902 - &_swigt__p_std__exception,
47903 - &_swigt__p_std__ostream,
47904 - &_swigt__p_vips__VError,
47905 -};
47906 -
47907 -static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
47908 -static swig_cast_info _swigc__p_std__exception[] = { {&_swigt__p_std__exception, 0, 0, 0}, {&_swigt__p_vips__VError, _p_vips__VErrorTo_p_std__exception, 0, 0},{0, 0, 0, 0}};
47909 -static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}};
47910 -static swig_cast_info _swigc__p_vips__VError[] = { {&_swigt__p_vips__VError, 0, 0, 0},{0, 0, 0, 0}};
47911 -
47912 -static swig_cast_info *swig_cast_initial[] = {
47913 - _swigc__p_char,
47914 - _swigc__p_std__exception,
47915 - _swigc__p_std__ostream,
47916 - _swigc__p_vips__VError,
47917 -};
47918 -
47919 -
47920 -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
47921 -
47922 -static swig_const_info swig_const_table[] = {
47923 -{0, 0, 0, 0.0, 0, 0}};
47924 -
47925 -#ifdef __cplusplus
47926 -}
47927 -#endif
47928 -/* -----------------------------------------------------------------------------
47929 - * Type initialization:
47930 - * This problem is tough by the requirement that no dynamic
47931 - * memory is used. Also, since swig_type_info structures store pointers to
47932 - * swig_cast_info structures and swig_cast_info structures store pointers back
47933 - * to swig_type_info structures, we need some lookup code at initialization.
47934 - * The idea is that swig generates all the structures that are needed.
47935 - * The runtime then collects these partially filled structures.
47936 - * The SWIG_InitializeModule function takes these initial arrays out of
47937 - * swig_module, and does all the lookup, filling in the swig_module.types
47938 - * array with the correct data and linking the correct swig_cast_info
47939 - * structures together.
47940 - *
47941 - * The generated swig_type_info structures are assigned staticly to an initial
47942 - * array. We just loop through that array, and handle each type individually.
47943 - * First we lookup if this type has been already loaded, and if so, use the
47944 - * loaded structure instead of the generated one. Then we have to fill in the
47945 - * cast linked list. The cast data is initially stored in something like a
47946 - * two-dimensional array. Each row corresponds to a type (there are the same
47947 - * number of rows as there are in the swig_type_initial array). Each entry in
47948 - * a column is one of the swig_cast_info structures for that type.
47949 - * The cast_initial array is actually an array of arrays, because each row has
47950 - * a variable number of columns. So to actually build the cast linked list,
47951 - * we find the array of casts associated with the type, and loop through it
47952 - * adding the casts to the list. The one last trick we need to do is making
47953 - * sure the type pointer in the swig_cast_info struct is correct.
47954 - *
47955 - * First off, we lookup the cast->type name to see if it is already loaded.
47956 - * There are three cases to handle:
47957 - * 1) If the cast->type has already been loaded AND the type we are adding
47958 - * casting info to has not been loaded (it is in this module), THEN we
47959 - * replace the cast->type pointer with the type pointer that has already
47960 - * been loaded.
47961 - * 2) If BOTH types (the one we are adding casting info to, and the
47962 - * cast->type) are loaded, THEN the cast info has already been loaded by
47963 - * the previous module so we just ignore it.
47964 - * 3) Finally, if cast->type has not already been loaded, then we add that
47965 - * swig_cast_info to the linked list (because the cast->type) pointer will
47966 - * be correct.
47967 - * ----------------------------------------------------------------------------- */
47968 -
47969 -#ifdef __cplusplus
47970 -extern "C" {
47971 -#if 0
47972 -} /* c-mode */
47973 -#endif
47974 -#endif
47975 -
47976 -#if 0
47977 -#define SWIGRUNTIME_DEBUG
47978 -#endif
47979 -
47980 -
47981 -SWIGRUNTIME void
47982 -SWIG_InitializeModule(void *clientdata) {
47983 - size_t i;
47984 - swig_module_info *module_head, *iter;
47985 - int found, init;
47986 -
47987 - /* check to see if the circular list has been setup, if not, set it up */
47988 - if (swig_module.next==0) {
47989 - /* Initialize the swig_module */
47990 - swig_module.type_initial = swig_type_initial;
47991 - swig_module.cast_initial = swig_cast_initial;
47992 - swig_module.next = &swig_module;
47993 - init = 1;
47994 - } else {
47995 - init = 0;
47996 - }
47997 -
47998 - /* Try and load any already created modules */
47999 - module_head = SWIG_GetModule(clientdata);
48000 - if (!module_head) {
48001 - /* This is the first module loaded for this interpreter */
48002 - /* so set the swig module into the interpreter */
48003 - SWIG_SetModule(clientdata, &swig_module);
48004 - module_head = &swig_module;
48005 - } else {
48006 - /* the interpreter has loaded a SWIG module, but has it loaded this one? */
48007 - found=0;
48008 - iter=module_head;
48009 - do {
48010 - if (iter==&swig_module) {
48011 - found=1;
48012 - break;
48013 - }
48014 - iter=iter->next;
48015 - } while (iter!= module_head);
48016 -
48017 - /* if the is found in the list, then all is done and we may leave */
48018 - if (found) return;
48019 - /* otherwise we must add out module into the list */
48020 - swig_module.next = module_head->next;
48021 - module_head->next = &swig_module;
48022 - }
48023 -
48024 - /* When multiple interpeters are used, a module could have already been initialized in
48025 - a different interpreter, but not yet have a pointer in this interpreter.
48026 - In this case, we do not want to continue adding types... everything should be
48027 - set up already */
48028 - if (init == 0) return;
48029 -
48030 - /* Now work on filling in swig_module.types */
48031 -#ifdef SWIGRUNTIME_DEBUG
48032 - printf("SWIG_InitializeModule: size %d\n", swig_module.size);
48033 -#endif
48034 - for (i = 0; i < swig_module.size; ++i) {
48035 - swig_type_info *type = 0;
48036 - swig_type_info *ret;
48037 - swig_cast_info *cast;
48038 -
48039 -#ifdef SWIGRUNTIME_DEBUG
48040 - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
48041 -#endif
48042 -
48043 - /* if there is another module already loaded */
48044 - if (swig_module.next != &swig_module) {
48045 - type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
48046 - }
48047 - if (type) {
48048 - /* Overwrite clientdata field */
48049 -#ifdef SWIGRUNTIME_DEBUG
48050 - printf("SWIG_InitializeModule: found type %s\n", type->name);
48051 -#endif
48052 - if (swig_module.type_initial[i]->clientdata) {
48053 - type->clientdata = swig_module.type_initial[i]->clientdata;
48054 -#ifdef SWIGRUNTIME_DEBUG
48055 - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
48056 -#endif
48057 - }
48058 - } else {
48059 - type = swig_module.type_initial[i];
48060 - }
48061 -
48062 - /* Insert casting types */
48063 - cast = swig_module.cast_initial[i];
48064 - while (cast->type) {
48065 - /* Don't need to add information already in the list */
48066 - ret = 0;
48067 -#ifdef SWIGRUNTIME_DEBUG
48068 - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
48069 -#endif
48070 - if (swig_module.next != &swig_module) {
48071 - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
48072 -#ifdef SWIGRUNTIME_DEBUG
48073 - if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
48074 -#endif
48075 - }
48076 - if (ret) {
48077 - if (type == swig_module.type_initial[i]) {
48078 -#ifdef SWIGRUNTIME_DEBUG
48079 - printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
48080 -#endif
48081 - cast->type = ret;
48082 - ret = 0;
48083 - } else {
48084 - /* Check for casting already in the list */
48085 - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
48086 -#ifdef SWIGRUNTIME_DEBUG
48087 - if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
48088 -#endif
48089 - if (!ocast) ret = 0;
48090 - }
48091 - }
48092 -
48093 - if (!ret) {
48094 -#ifdef SWIGRUNTIME_DEBUG
48095 - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
48096 -#endif
48097 - if (type->cast) {
48098 - type->cast->prev = cast;
48099 - cast->next = type->cast;
48100 - }
48101 - type->cast = cast;
48102 - }
48103 - cast++;
48104 - }
48105 - /* Set entry in modules->types array equal to the type */
48106 - swig_module.types[i] = type;
48107 - }
48108 - swig_module.types[i] = 0;
48109 -
48110 -#ifdef SWIGRUNTIME_DEBUG
48111 - printf("**** SWIG_InitializeModule: Cast List ******\n");
48112 - for (i = 0; i < swig_module.size; ++i) {
48113 - int j = 0;
48114 - swig_cast_info *cast = swig_module.cast_initial[i];
48115 - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
48116 - while (cast->type) {
48117 - printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
48118 - cast++;
48119 - ++j;
48120 - }
48121 - printf("---- Total casts: %d\n",j);
48122 - }
48123 - printf("**** SWIG_InitializeModule: Cast List ******\n");
48124 -#endif
48125 -}
48126 -
48127 -/* This function will propagate the clientdata field of type to
48128 -* any new swig_type_info structures that have been added into the list
48129 -* of equivalent types. It is like calling
48130 -* SWIG_TypeClientData(type, clientdata) a second time.
48131 -*/
48132 -SWIGRUNTIME void
48133 -SWIG_PropagateClientData(void) {
48134 - size_t i;
48135 - swig_cast_info *equiv;
48136 - static int init_run = 0;
48137 -
48138 - if (init_run) return;
48139 - init_run = 1;
48140 -
48141 - for (i = 0; i < swig_module.size; i++) {
48142 - if (swig_module.types[i]->clientdata) {
48143 - equiv = swig_module.types[i]->cast;
48144 - while (equiv) {
48145 - if (!equiv->converter) {
48146 - if (equiv->type && !equiv->type->clientdata)
48147 - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
48148 - }
48149 - equiv = equiv->next;
48150 - }
48151 - }
48152 - }
48153 -}
48154 -
48155 -#ifdef __cplusplus
48156 -#if 0
48157 -{
48158 - /* c-mode */
48159 -#endif
48160 -}
48161 -#endif
48162 -
48163 -
48164 -
48165 -#ifdef __cplusplus
48166 -extern "C" {
48167 -#endif
48168 -
48169 - /* Python-specific SWIG API */
48170 -#define SWIG_newvarlink() SWIG_Python_newvarlink()
48171 -#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
48172 -#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
48173 -
48174 - /* -----------------------------------------------------------------------------
48175 - * global variable support code.
48176 - * ----------------------------------------------------------------------------- */
48177 -
48178 - typedef struct swig_globalvar {
48179 - char *name; /* Name of global variable */
48180 - PyObject *(*get_attr)(void); /* Return the current value */
48181 - int (*set_attr)(PyObject *); /* Set the value */
48182 - struct swig_globalvar *next;
48183 - } swig_globalvar;
48184 -
48185 - typedef struct swig_varlinkobject {
48186 - PyObject_HEAD
48187 - swig_globalvar *vars;
48188 - } swig_varlinkobject;
48189 -
48190 - SWIGINTERN PyObject *
48191 - swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
48192 -#if PY_VERSION_HEX >= 0x03000000
48193 - return PyUnicode_InternFromString("<Swig global variables>");
48194 -#else
48195 - return PyString_FromString("<Swig global variables>");
48196 -#endif
48197 - }
48198 -
48199 - SWIGINTERN PyObject *
48200 - swig_varlink_str(swig_varlinkobject *v) {
48201 -#if PY_VERSION_HEX >= 0x03000000
48202 - PyObject *str = PyUnicode_InternFromString("(");
48203 - PyObject *tail;
48204 - PyObject *joined;
48205 - swig_globalvar *var;
48206 - for (var = v->vars; var; var=var->next) {
48207 - tail = PyUnicode_FromString(var->name);
48208 - joined = PyUnicode_Concat(str, tail);
48209 - Py_DecRef(str);
48210 - Py_DecRef(tail);
48211 - str = joined;
48212 - if (var->next) {
48213 - tail = PyUnicode_InternFromString(", ");
48214 - joined = PyUnicode_Concat(str, tail);
48215 - Py_DecRef(str);
48216 - Py_DecRef(tail);
48217 - str = joined;
48218 - }
48219 - }
48220 - tail = PyUnicode_InternFromString(")");
48221 - joined = PyUnicode_Concat(str, tail);
48222 - Py_DecRef(str);
48223 - Py_DecRef(tail);
48224 - str = joined;
48225 -#else
48226 - PyObject *str = PyString_FromString("(");
48227 - swig_globalvar *var;
48228 - for (var = v->vars; var; var=var->next) {
48229 - PyString_ConcatAndDel(&str,PyString_FromString(var->name));
48230 - if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
48231 - }
48232 - PyString_ConcatAndDel(&str,PyString_FromString(")"));
48233 -#endif
48234 - return str;
48235 - }
48236 -
48237 - SWIGINTERN int
48238 - swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
48239 - char *tmp;
48240 - PyObject *str = swig_varlink_str(v);
48241 - fprintf(fp,"Swig global variables ");
48242 - fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
48243 - SWIG_Python_str_DelForPy3(tmp);
48244 - Py_DECREF(str);
48245 - return 0;
48246 - }
48247 -
48248 - SWIGINTERN void
48249 - swig_varlink_dealloc(swig_varlinkobject *v) {
48250 - swig_globalvar *var = v->vars;
48251 - while (var) {
48252 - swig_globalvar *n = var->next;
48253 - free(var->name);
48254 - free(var);
48255 - var = n;
48256 - }
48257 - }
48258 -
48259 - SWIGINTERN PyObject *
48260 - swig_varlink_getattr(swig_varlinkobject *v, char *n) {
48261 - PyObject *res = NULL;
48262 - swig_globalvar *var = v->vars;
48263 - while (var) {
48264 - if (strcmp(var->name,n) == 0) {
48265 - res = (*var->get_attr)();
48266 - break;
48267 - }
48268 - var = var->next;
48269 - }
48270 - if (res == NULL && !PyErr_Occurred()) {
48271 - PyErr_SetString(PyExc_NameError,"Unknown C global variable");
48272 - }
48273 - return res;
48274 - }
48275 -
48276 - SWIGINTERN int
48277 - swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
48278 - int res = 1;
48279 - swig_globalvar *var = v->vars;
48280 - while (var) {
48281 - if (strcmp(var->name,n) == 0) {
48282 - res = (*var->set_attr)(p);
48283 - break;
48284 - }
48285 - var = var->next;
48286 - }
48287 - if (res == 1 && !PyErr_Occurred()) {
48288 - PyErr_SetString(PyExc_NameError,"Unknown C global variable");
48289 - }
48290 - return res;
48291 - }
48292 -
48293 - SWIGINTERN PyTypeObject*
48294 - swig_varlink_type(void) {
48295 - static char varlink__doc__[] = "Swig var link object";
48296 - static PyTypeObject varlink_type;
48297 - static int type_init = 0;
48298 - if (!type_init) {
48299 - const PyTypeObject tmp = {
48300 - /* PyObject header changed in Python 3 */
48301 -#if PY_VERSION_HEX >= 0x03000000
48302 - PyVarObject_HEAD_INIT(NULL, 0)
48303 -#else
48304 - PyObject_HEAD_INIT(NULL)
48305 - 0, /* ob_size */
48306 -#endif
48307 - (char *)"swigvarlink", /* tp_name */
48308 - sizeof(swig_varlinkobject), /* tp_basicsize */
48309 - 0, /* tp_itemsize */
48310 - (destructor) swig_varlink_dealloc, /* tp_dealloc */
48311 - (printfunc) swig_varlink_print, /* tp_print */
48312 - (getattrfunc) swig_varlink_getattr, /* tp_getattr */
48313 - (setattrfunc) swig_varlink_setattr, /* tp_setattr */
48314 - 0, /* tp_compare */
48315 - (reprfunc) swig_varlink_repr, /* tp_repr */
48316 - 0, /* tp_as_number */
48317 - 0, /* tp_as_sequence */
48318 - 0, /* tp_as_mapping */
48319 - 0, /* tp_hash */
48320 - 0, /* tp_call */
48321 - (reprfunc) swig_varlink_str, /* tp_str */
48322 - 0, /* tp_getattro */
48323 - 0, /* tp_setattro */
48324 - 0, /* tp_as_buffer */
48325 - 0, /* tp_flags */
48326 - varlink__doc__, /* tp_doc */
48327 - 0, /* tp_traverse */
48328 - 0, /* tp_clear */
48329 - 0, /* tp_richcompare */
48330 - 0, /* tp_weaklistoffset */
48331 -#if PY_VERSION_HEX >= 0x02020000
48332 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
48333 -#endif
48334 -#if PY_VERSION_HEX >= 0x02030000
48335 - 0, /* tp_del */
48336 -#endif
48337 -#if PY_VERSION_HEX >= 0x02060000
48338 - 0, /* tp_version */
48339 -#endif
48340 -#ifdef COUNT_ALLOCS
48341 - 0,0,0,0 /* tp_alloc -> tp_next */
48342 -#endif
48343 - };
48344 - varlink_type = tmp;
48345 - type_init = 1;
48346 -#if PY_VERSION_HEX < 0x02020000
48347 - varlink_type.ob_type = &PyType_Type;
48348 -#else
48349 - if (PyType_Ready(&varlink_type) < 0)
48350 - return NULL;
48351 -#endif
48352 - }
48353 - return &varlink_type;
48354 - }
48355 -
48356 - /* Create a variable linking object for use later */
48357 - SWIGINTERN PyObject *
48358 - SWIG_Python_newvarlink(void) {
48359 - swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
48360 - if (result) {
48361 - result->vars = 0;
48362 - }
48363 - return ((PyObject*) result);
48364 - }
48365 -
48366 - SWIGINTERN void
48367 - SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
48368 - swig_varlinkobject *v = (swig_varlinkobject *) p;
48369 - swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
48370 - if (gv) {
48371 - size_t size = strlen(name)+1;
48372 - gv->name = (char *)malloc(size);
48373 - if (gv->name) {
48374 - strncpy(gv->name,name,size);
48375 - gv->get_attr = get_attr;
48376 - gv->set_attr = set_attr;
48377 - gv->next = v->vars;
48378 - }
48379 - }
48380 - v->vars = gv;
48381 - }
48382 -
48383 - SWIGINTERN PyObject *
48384 - SWIG_globals(void) {
48385 - static PyObject *_SWIG_globals = 0;
48386 - if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
48387 - return _SWIG_globals;
48388 - }
48389 -
48390 - /* -----------------------------------------------------------------------------
48391 - * constants/methods manipulation
48392 - * ----------------------------------------------------------------------------- */
48393 -
48394 - /* Install Constants */
48395 - SWIGINTERN void
48396 - SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
48397 - PyObject *obj = 0;
48398 - size_t i;
48399 - for (i = 0; constants[i].type; ++i) {
48400 - switch(constants[i].type) {
48401 - case SWIG_PY_POINTER:
48402 - obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
48403 - break;
48404 - case SWIG_PY_BINARY:
48405 - obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
48406 - break;
48407 - default:
48408 - obj = 0;
48409 - break;
48410 - }
48411 - if (obj) {
48412 - PyDict_SetItemString(d, constants[i].name, obj);
48413 - Py_DECREF(obj);
48414 - }
48415 - }
48416 - }
48417 -
48418 - /* -----------------------------------------------------------------------------*/
48419 - /* Fix SwigMethods to carry the callback ptrs when needed */
48420 - /* -----------------------------------------------------------------------------*/
48421 -
48422 - SWIGINTERN void
48423 - SWIG_Python_FixMethods(PyMethodDef *methods,
48424 - swig_const_info *const_table,
48425 - swig_type_info **types,
48426 - swig_type_info **types_initial) {
48427 - size_t i;
48428 - for (i = 0; methods[i].ml_name; ++i) {
48429 - const char *c = methods[i].ml_doc;
48430 - if (c && (c = strstr(c, "swig_ptr: "))) {
48431 - int j;
48432 - swig_const_info *ci = 0;
48433 - const char *name = c + 10;
48434 - for (j = 0; const_table[j].type; ++j) {
48435 - if (strncmp(const_table[j].name, name,
48436 - strlen(const_table[j].name)) == 0) {
48437 - ci = &(const_table[j]);
48438 - break;
48439 - }
48440 - }
48441 - if (ci) {
48442 - void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
48443 - if (ptr) {
48444 - size_t shift = (ci->ptype) - types;
48445 - swig_type_info *ty = types_initial[shift];
48446 - size_t ldoc = (c - methods[i].ml_doc);
48447 - size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
48448 - char *ndoc = (char*)malloc(ldoc + lptr + 10);
48449 - if (ndoc) {
48450 - char *buff = ndoc;
48451 - strncpy(buff, methods[i].ml_doc, ldoc);
48452 - buff += ldoc;
48453 - strncpy(buff, "swig_ptr: ", 10);
48454 - buff += 10;
48455 - SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
48456 - methods[i].ml_doc = ndoc;
48457 - }
48458 - }
48459 - }
48460 - }
48461 - }
48462 - }
48463 -
48464 -#ifdef __cplusplus
48465 -}
48466 -#endif
48467 -
48468 -/* -----------------------------------------------------------------------------*
48469 - * Partial Init method
48470 - * -----------------------------------------------------------------------------*/
48471 -
48472 -#ifdef __cplusplus
48473 -extern "C"
48474 -#endif
48475 -
48476 -SWIGEXPORT
48477 -#if PY_VERSION_HEX >= 0x03000000
48478 -PyObject*
48479 -#else
48480 -void
48481 -#endif
48482 -SWIG_init(void) {
48483 - PyObject *m, *d, *md;
48484 -#if PY_VERSION_HEX >= 0x03000000
48485 - static struct PyModuleDef SWIG_module = {
48486 -# if PY_VERSION_HEX >= 0x03020000
48487 - PyModuleDef_HEAD_INIT,
48488 -# else
48489 - {
48490 - PyObject_HEAD_INIT(NULL)
48491 - NULL, /* m_init */
48492 - 0, /* m_index */
48493 - NULL, /* m_copy */
48494 - },
48495 -# endif
48496 - (char *) SWIG_name,
48497 - NULL,
48498 - -1,
48499 - SwigMethods,
48500 - NULL,
48501 - NULL,
48502 - NULL,
48503 - NULL
48504 - };
48505 -#endif
48506 -
48507 -#if defined(SWIGPYTHON_BUILTIN)
48508 - static SwigPyClientData SwigPyObject_clientdata = {
48509 - 0, 0, 0, 0, 0, 0, 0
48510 - };
48511 - static PyGetSetDef this_getset_def = {
48512 - (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
48513 - };
48514 - static SwigPyGetSet thisown_getset_closure = {
48515 - (PyCFunction) SwigPyObject_own,
48516 - (PyCFunction) SwigPyObject_own
48517 - };
48518 - static PyGetSetDef thisown_getset_def = {
48519 - (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
48520 - };
48521 - PyObject *metatype_args;
48522 - PyTypeObject *builtin_pytype;
48523 - int builtin_base_count;
48524 - swig_type_info *builtin_basetype;
48525 - PyObject *tuple;
48526 - PyGetSetDescrObject *static_getset;
48527 - PyTypeObject *metatype;
48528 - SwigPyClientData *cd;
48529 - PyObject *public_interface, *public_symbol;
48530 - PyObject *this_descr;
48531 - PyObject *thisown_descr;
48532 - int i;
48533 -
48534 - (void)builtin_pytype;
48535 - (void)builtin_base_count;
48536 - (void)builtin_basetype;
48537 - (void)tuple;
48538 - (void)static_getset;
48539 -
48540 - /* metatype is used to implement static member variables. */
48541 - metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
48542 - assert(metatype_args);
48543 - metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
48544 - assert(metatype);
48545 - Py_DECREF(metatype_args);
48546 - metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
48547 - assert(PyType_Ready(metatype) >= 0);
48548 -#endif
48549 -
48550 - /* Fix SwigMethods to carry the callback ptrs when needed */
48551 - SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
48552 -
48553 -#if PY_VERSION_HEX >= 0x03000000
48554 - m = PyModule_Create(&SWIG_module);
48555 -#else
48556 - m = Py_InitModule((char *) SWIG_name, SwigMethods);
48557 -#endif
48558 - md = d = PyModule_GetDict(m);
48559 - (void)md;
48560 -
48561 - SWIG_InitializeModule(0);
48562 -
48563 -#ifdef SWIGPYTHON_BUILTIN
48564 - SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
48565 - assert(SwigPyObject_stype);
48566 - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
48567 - if (!cd) {
48568 - SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
48569 - SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
48570 - } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
48571 - PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
48572 -# if PY_VERSION_HEX >= 0x03000000
48573 - return NULL;
48574 -# else
48575 - return;
48576 -# endif
48577 - }
48578 -
48579 - /* All objects have a 'this' attribute */
48580 - this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
48581 - (void)this_descr;
48582 -
48583 - /* All objects have a 'thisown' attribute */
48584 - thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
48585 - (void)thisown_descr;
48586 -
48587 - public_interface = PyList_New(0);
48588 - public_symbol = 0;
48589 - (void)public_symbol;
48590 -
48591 - PyDict_SetItemString(md, "__all__", public_interface);
48592 - Py_DECREF(public_interface);
48593 - for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
48594 - SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
48595 - for (i = 0; swig_const_table[i].name != 0; ++i)
48596 - SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
48597 -#endif
48598 -
48599 - SWIG_InstallConstants(d,swig_const_table);
48600 -
48601 -#if PY_VERSION_HEX >= 0x03000000
48602 - return m;
48603 -#else
48604 - return;
48605 -#endif
48606 -}
48607 -
48608 diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/VError.py vips-7.38.5/swig/vipsCC/VError.py
48609 --- vips-7.38.5-vanilla/swig/vipsCC/VError.py 2014-07-17 23:48:36.211794473 -0400
48610 +++ vips-7.38.5/swig/vipsCC/VError.py 1969-12-31 19:00:00.000000000 -0500
48611 @@ -1,100 +0,0 @@
48612 -# This file was automatically generated by SWIG (http://www.swig.org).
48613 -# Version 2.0.10
48614 -#
48615 -# Do not make changes to this file unless you know what you are doing--modify
48616 -# the SWIG interface file instead.
48617 -
48618 -
48619 -
48620 -from sys import version_info
48621 -if version_info >= (2,6,0):
48622 - def swig_import_helper():
48623 - from os.path import dirname
48624 - import imp
48625 - fp = None
48626 - try:
48627 - fp, pathname, description = imp.find_module('verrormodule', [dirname(__file__)])
48628 - except ImportError:
48629 - import verrormodule
48630 - return verrormodule
48631 - if fp is not None:
48632 - try:
48633 - _mod = imp.load_module('verrormodule', fp, pathname, description)
48634 - finally:
48635 - fp.close()
48636 - return _mod
48637 - verrormodule = swig_import_helper()
48638 - del swig_import_helper
48639 -else:
48640 - import verrormodule
48641 -del version_info
48642 -try:
48643 - _swig_property = property
48644 -except NameError:
48645 - pass # Python < 2.2 doesn't have 'property'.
48646 -def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
48647 - if (name == "thisown"): return self.this.own(value)
48648 - if (name == "this"):
48649 - if type(value).__name__ == 'SwigPyObject':
48650 - self.__dict__[name] = value
48651 - return
48652 - method = class_type.__swig_setmethods__.get(name,None)
48653 - if method: return method(self,value)
48654 - if (not static):
48655 - self.__dict__[name] = value
48656 - else:
48657 - raise AttributeError("You cannot add attributes to %s" % self)
48658 -
48659 -def _swig_setattr(self,class_type,name,value):
48660 - return _swig_setattr_nondynamic(self,class_type,name,value,0)
48661 -
48662 -def _swig_getattr(self,class_type,name):
48663 - if (name == "thisown"): return self.this.own()
48664 - method = class_type.__swig_getmethods__.get(name,None)
48665 - if method: return method(self)
48666 - raise AttributeError(name)
48667 -
48668 -def _swig_repr(self):
48669 - try: strthis = "proxy of " + self.this.__repr__()
48670 - except: strthis = ""
48671 - return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
48672 -
48673 -try:
48674 - _object = object
48675 - _newclass = 1
48676 -except AttributeError:
48677 - class _object : pass
48678 - _newclass = 0
48679 -
48680 -
48681 -class VError(Exception):
48682 - __swig_setmethods__ = {}
48683 - __setattr__ = lambda self, name, value: _swig_setattr(self, VError, name, value)
48684 - __swig_getmethods__ = {}
48685 - __getattr__ = lambda self, name: _swig_getattr(self, VError, name)
48686 - __repr__ = _swig_repr
48687 - def __init__(self, *args):
48688 - this = verrormodule.new_VError(*args)
48689 - try: self.this.append(this)
48690 - except: self.this = this
48691 - __swig_destroy__ = verrormodule.delete_VError
48692 - __del__ = lambda self : None;
48693 - def perror(self, *args): return verrormodule.VError_perror(self, *args)
48694 - def app(self, *args): return verrormodule.VError_app(self, *args)
48695 - def what(self): return verrormodule.VError_what(self)
48696 - def ostream_print(self, *args): return verrormodule.VError_ostream_print(self, *args)
48697 - def __str__(self): return verrormodule.VError___str__(self)
48698 -VError_swigregister = verrormodule.VError_swigregister
48699 -VError_swigregister(VError)
48700 -
48701 -
48702 -def __lshift__(*args):
48703 - return verrormodule.__lshift__(*args)
48704 -__lshift__ = verrormodule.__lshift__
48705 -
48706 -def verror(str=""):
48707 - return verrormodule.verror(str)
48708 -verror = verrormodule.verror
48709 -# This file is compatible with both classic and new-style classes.
48710 -
48711 -
48712 diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/VImage.i vips-7.38.5/swig/vipsCC/VImage.i
48713 --- vips-7.38.5-vanilla/swig/vipsCC/VImage.i 2014-07-17 23:48:36.207794473 -0400
48714 +++ vips-7.38.5/swig/vipsCC/VImage.i 1969-12-31 19:00:00.000000000 -0500
48715 @@ -1,380 +0,0 @@
48716 -/* SWIG interface file for vipsCC7
48717 - *
48718 - * 5/9/07
48719 - * - use g_option_context_set_ignore_unknown_options() so we don't fail
48720 - * on unrecognied -args (thanks Simon)
48721 - * 3/8/08
48722 - * - add .tobuffer() / .frombuffer (), .tostring (), .fromstring ()
48723 - * methods
48724 - * - add PIL_mode_from_vips () and vips_from_PIL_mode () utility
48725 - * functions
48726 - * 6/11/09
48727 - * - arg, std::vector<vips::VImage> was missing the "vips::"
48728 - */
48729 -
48730 -%module VImage
48731 -
48732 -%{
48733 -#include <vips/vipscpp.h>
48734 -
48735 -/* We need the C API too for the args init and some of the
48736 - * frombuffer/tobuffer stuff.
48737 - */
48738 -#include <vips/vips.h>
48739 -%}
48740 -
48741 -/* Need to override assignment to get refcounting working.
48742 - */
48743 -%rename(__assign__) vips::VImage::operator=;
48744 -
48745 -%include "std_list.i"
48746 -%include "std_complex.i"
48747 -%include "std_vector.i"
48748 -%include "std_except.i"
48749 -%include "std_string.i"
48750 -%include "cstring.i"
48751 -%include "typemaps.i"
48752 -
48753 -%import "VError.i"
48754 -%import "VMask.i"
48755 -%import "VDisplay.i"
48756 -
48757 -namespace std {
48758 - %template(IntVector) vector<int>;
48759 - %template(DoubleVector) vector<double>;
48760 - %template(ImageVector) vector<vips::VImage>;
48761 -}
48762 -
48763 -/* To get image data to and from VImage (eg. when interfacing with PIL) we
48764 - * need to be able to import and export Python buffer() objects. Add new
48765 - * methods to construct from and return pointer/length pairs, then wrap them
48766 - * ourselves with a couple of typemaps.
48767 - */
48768 -
48769 -%{
48770 -struct VBuffer {
48771 - void *data;
48772 - size_t size;
48773 -};
48774 -%}
48775 -
48776 -%typemap (out) VBuffer {
48777 - $result = PyBuffer_FromMemory ($1.data, $1.size);
48778 -}
48779 -
48780 -%typemap (in) VBuffer {
48781 - const char *buffer;
48782 - Py_ssize_t buffer_len;
48783 -
48784 - if (PyObject_AsCharBuffer ($input, &buffer, &buffer_len) == -1) {
48785 - PyErr_SetString (PyExc_TypeError,"Type error. Unable to get char pointer from buffer");
48786 - return NULL;
48787 - }
48788 -
48789 - $1.data = (void *) buffer;
48790 - $1.size = buffer_len;
48791 -}
48792 -
48793 -/* Functions which return extra values though their parameters need special
48794 - * typemaps.
48795 - */
48796 -
48797 -// double maxpos_avg( double& maxpos_avg_y, double& maxpos_avg_out )
48798 -%apply double *OUTPUT { double & maxpos_avg_y };
48799 -%apply double *OUTPUT { double & maxpos_avg_out };
48800 -
48801 -// VImage system_image( char* system_image_in_format, char* system_image_out_format, char* system_image_command, char*& system_image_log )
48802 -%cstring_output_allocate(char **system_image_log, g_free(*$1));
48803 -
48804 -// VImage segment( int& segment_segments )
48805 -%apply int *OUTPUT { int & segment_segments };
48806 -
48807 -// VImage project( VImage& project_vout ) throw( VError );
48808 -// nope ... not sure how to handle this one
48809 -//%apply VImage *OUTPUT { VImage & project_vout };
48810 -
48811 -// VImage label_regions( int& label_regions_segments )
48812 -%apply int *OUTPUT { int & label_regions_segments };
48813 -
48814 -// double correl( VImage correl_sec, int correl_xref, int correl_yref, int correl_xsec, int correl_ysec, int correl_hwindowsize, int correl_hsearchsize, int& correl_x, int& correl_y )
48815 -%apply int *OUTPUT { int & correl_x };
48816 -%apply int *OUTPUT { int & correl_y };
48817 -
48818 -// int _find_lroverlap( VImage _find_lroverlap_sec, int _find_lroverlap_bandno, int _find_lroverlap_xr, int _find_lroverlap_yr, int _find_lroverlap_xs, int _find_lroverlap_ys, int _find_lroverlap_halfcorrelation, int _find_lroverlap_halfarea, int& _find_lroverlap_dy0, double& _find_lroverlap_scale1, double& _find_lroverlap_angle1, double& _find_lroverlap_dx1, double& _find_lroverlap_dy1 )
48819 -%apply int *OUTPUT { int & _find_lroverlap_dy0 };
48820 -%apply double *OUTPUT { double & _find_lroverlap_scale1 };
48821 -%apply double *OUTPUT { double & _find_lroverlap_angle1 };
48822 -%apply double *OUTPUT { double & _find_lroverlap_dx1 };
48823 -%apply double *OUTPUT { double & _find_lroverlap_dy1 };
48824 -
48825 -// int _find_tboverlap( VImage _find_tboverlap_sec, int _find_tboverlap_bandno, int _find_tboverlap_xr, int _find_tboverlap_yr, int _find_tboverlap_xs, int _find_tboverlap_ys, int _find_tboverlap_halfcorrelation, int _find_tboverlap_halfarea, int& _find_tboverlap_dy0, double& _find_tboverlap_scale1, double& _find_tboverlap_angle1, double& _find_tboverlap_dx1, double& _find_tboverlap_dy1 )
48826 -%apply int *OUTPUT { int & _find_tboverlap_dy0 };
48827 -%apply double *OUTPUT { double & _find_tboverlap_scale1 };
48828 -%apply double *OUTPUT { double & _find_tboverlap_angle1 };
48829 -%apply double *OUTPUT { double & _find_tboverlap_dx1 };
48830 -%apply double *OUTPUT { double & _find_tboverlap_dy1 };
48831 -
48832 -// double maxpos_subpel( double& maxpos_subpel_y )
48833 -%apply double *OUTPUT { double & maxpos_subpel_y };
48834 -
48835 -/* Need the expanded VImage.h in this directory, rather than the usual
48836 - * vips/VImage.h. SWIG b0rks on #include inside class definitions.
48837 - */
48838 -%include VImage.h
48839 -
48840 -%extend vips::VImage {
48841 -public:
48842 - VBuffer tobuffer () throw (VError)
48843 - {
48844 - VBuffer buffer;
48845 -
48846 - buffer.data = $self->data ();
48847 - buffer.size = (size_t) $self->Xsize () * $self->Ysize () *
48848 - IM_IMAGE_SIZEOF_PEL ($self->image ());
48849 -
48850 - return buffer;
48851 - }
48852 -
48853 - static VImage frombuffer (VBuffer buffer, int width, int height,
48854 - int bands, TBandFmt format) throw (VError)
48855 - {
48856 - return VImage (buffer.data, width, height, bands, format);
48857 - }
48858 -
48859 - %cstring_output_allocate_size (char **buffer, int *buffer_len, im_free (*$1))
48860 -
48861 - void tostring (char **buffer, int *buffer_len) throw (VError)
48862 - {
48863 - void *vips_memory;
48864 -
48865 - /* Eval the vips image first. This may throw an exception and we want to
48866 - * make sure we do this before we try to malloc() space for the copy.
48867 - */
48868 - vips_memory = $self->data ();
48869 -
48870 - /* We have to copy the image data to make a string that Python can
48871 - * manage. Use frombuffer() / tobuffer () if you want to avoid the copy
48872 - * and manage memory lifetime yourself.
48873 - */
48874 - *buffer_len = (size_t) $self->Xsize () * $self->Ysize () *
48875 - IM_IMAGE_SIZEOF_PEL ($self->image ());
48876 - if (!(*buffer = (char *) im_malloc (NULL, *buffer_len)))
48877 - verror ("Unable to allocate memory for image copy.");
48878 - memcpy (*buffer, vips_memory, *buffer_len);
48879 - }
48880 -
48881 - static VImage fromstring (std::string buffer, int width, int height,
48882 - int bands, TBandFmt format) throw (VError)
48883 - {
48884 - void *vips_memory;
48885 - VImage result;
48886 -
48887 - /* We have to copy the string, then add a callback to the VImage to free
48888 - * it when we free the VImage. Use frombuffer() / tobuffer () if you want
48889 - * to avoid the copy and manage memory lifetime yourself.
48890 - */
48891 - if (!(vips_memory = im_malloc (NULL, buffer.length ())))
48892 - verror ("Unable to allocate memory for image copy.");
48893 -
48894 - /* We have to use .c_str () since the string may not be contiguous.
48895 - */
48896 - memcpy (vips_memory, buffer.c_str (), buffer.length ());
48897 - result = VImage (vips_memory, width, height, bands, format);
48898 -
48899 - if (im_add_close_callback (result.image (),
48900 - (im_callback_fn) im_free, vips_memory, NULL))
48901 - verror ();
48902 -
48903 - return result;
48904 - }
48905 -}
48906 -
48907 -%pythoncode %{
48908 -# try to guess a PIL mode string from a VIPS image
48909 -def PIL_mode_from_vips (vim):
48910 - if vim.Bands () == 3 and vim.BandFmt () == VImage.FMTUCHAR:
48911 - return 'RGB'
48912 - elif vim.Bands () == 4 and vim.BandFmt () == VImage.FMTUCHAR and vim.Type () == VImage.RGB:
48913 - return 'RGBA'
48914 - elif vim.Bands () == 4 and vim.BandFmt () == VImage.FMTUCHAR and vim.Type () == VImage.CMYK:
48915 - return 'CMYK'
48916 - elif vim.Bands () == 1 and vim.BandFmt () == VImage.FMTUCHAR:
48917 - return 'L'
48918 - elif vim.Bands () == 1 and vim.BandFmt () == VImage.FMTINT:
48919 - return 'I'
48920 - elif vim.Bands () == 1 and vim.BandFmt () == VImage.FMTFLOAT:
48921 - return 'F'
48922 - elif vim.Bands () == 2 and vim.BandFmt () == VImage.FMTUCHAR:
48923 - return 'LA'
48924 - else:
48925 - raise ValueError ('unsupported vips -> pil image')
48926 -
48927 -# return vips (bands, format, type) for a PIL mode
48928 -def vips_from_PIL_mode (mode):
48929 - if mode == 'RGB':
48930 - return (3, VImage.FMTUCHAR, VImage.RGB)
48931 - elif mode == 'RGBA':
48932 - return (4, VImage.FMTUCHAR, VImage.RGB)
48933 - elif mode == 'CMYK':
48934 - return (4, VImage.FMTUCHAR, VImage.CMYK)
48935 - elif mode == 'L':
48936 - return (1, VImage.FMTUCHAR, VImage.B_W)
48937 - elif mode == 'I':
48938 - return (1, VImage.FMTINT, VImage.B_W)
48939 - elif mode == 'F':
48940 - return (1, VImage.FMTFLOAT, VImage.B_W)
48941 - elif mode == 'LA':
48942 - return (2, VImage.FMTUCHAR, VImage.B_W)
48943 - else:
48944 - raise ValueError ('unsupported pil -> vips image')
48945 -%}
48946 -
48947 -/* Helper code for vips_init().
48948 - */
48949 -%{
48950 -/* Turn on to print args.
48951 -#define DEBUG
48952 - */
48953 -
48954 -/* Command-line args during parse.
48955 - */
48956 -typedef struct _Args {
48957 - /* The n strings we alloc when we get from Python.
48958 - */
48959 - int n;
48960 - char **str;
48961 -
48962 - /* argc/argv as processed by us.
48963 - */
48964 - int argc;
48965 - char **argv;
48966 -} Args;
48967 -
48968 -#ifdef DEBUG
48969 -static void
48970 -args_print (Args *args)
48971 -{
48972 - int i;
48973 -
48974 - printf ("args_print: argc = %d\n", args->argc);
48975 - // +1 so we print the trailing NULL too
48976 - for (i = 0; i < args->argc + 1; i++)
48977 - printf ("\t%2d)\t%s\n", i, args->argv[i]);
48978 -}
48979 -#endif /*DEBUG*/
48980 -
48981 -static void
48982 -args_free (Args *args)
48983 -{
48984 - int i;
48985 -
48986 - for (i = 0; i < args->n; i++)
48987 - IM_FREE (args->str[i]);
48988 - args->n = 0;
48989 - args->argc = 0;
48990 - IM_FREE (args->str);
48991 - IM_FREE (args->argv);
48992 - IM_FREE (args);
48993 -}
48994 -
48995 -/* Get argv/argc from python.
48996 - */
48997 -static Args *
48998 -args_new (void)
48999 -{
49000 - Args *args;
49001 - PyObject *av;
49002 - int i;
49003 - int n;
49004 -
49005 - args = g_new (Args, 1);
49006 - args->n = 0;
49007 - args->str = NULL;
49008 - args->argc = 0;
49009 - args->argv = NULL;
49010 -
49011 - if (!(av = PySys_GetObject ((char *) "argv")))
49012 - return (args);
49013 - if (!PyList_Check (av)) {
49014 - PyErr_Warn (PyExc_Warning, "ignoring sys.argv: "
49015 - "it must be a list of strings");
49016 - return args;
49017 - }
49018 -
49019 - n = PyList_Size (av);
49020 - args->str = g_new (char *, n);
49021 - for (i = 0; i < n; i++)
49022 - args->str[i] = g_strdup (PyString_AsString (PyList_GetItem (av, i)));
49023 - args->n = n;
49024 -
49025 - /* +1 for NULL termination.
49026 - */
49027 - args->argc = n;
49028 - args->argv = g_new (char *, n + 1);
49029 - for (i = 0; i < n; i++)
49030 - args->argv[i] = args->str[i];
49031 - args->argv[i] = NULL;
49032 -
49033 - return args;
49034 -}
49035 -
49036 -static void
49037 -vips_fatal (const char *msg)
49038 -{
49039 - char buf[256];
49040 -
49041 - im_snprintf (buf, 256, "%s\n%s", msg, im_error_buffer());
49042 - im_error_clear ();
49043 - Py_FatalError (buf);
49044 -}
49045 -
49046 -%}
49047 -
49048 -%init %{
49049 -{
49050 - Args *args;
49051 -
49052 - args = args_new ();
49053 -
49054 -#ifdef DEBUG
49055 - printf ("on startup:\n");
49056 - args_print (args);
49057 -#endif /*DEBUG*/
49058 -
49059 - if (im_init_world (args->argv[0])) {
49060 - args_free (args);
49061 - vips_fatal ("can't initialise module vips");
49062 - }
49063 -
49064 - /* Now parse any GOptions.
49065 - */
49066 - GError *error = NULL;
49067 - GOptionContext *context;
49068 -
49069 - context = g_option_context_new ("- vips");
49070 - g_option_context_add_group (context, im_get_option_group());
49071 -
49072 - g_option_context_set_ignore_unknown_options (context, TRUE);
49073 - if (!g_option_context_parse (context,
49074 - &args->argc, &args->argv, &error)) {
49075 - g_option_context_free (context);
49076 - args_free (args);
49077 - im_error ("vipsmodule", "%s", error->message);
49078 - g_error_free (error);
49079 - vips_fatal ("can't initialise module vips");
49080 - }
49081 - g_option_context_free (context);
49082 -
49083 -#ifdef DEBUG
49084 - printf ("after parse:\n");
49085 - args_print (args);
49086 -#endif /*DEBUG*/
49087 -
49088 - // Write (possibly) modified argc/argv back again.
49089 - if (args->argv)
49090 - PySys_SetArgv (args->argc, args->argv);
49091 -
49092 - args_free (args);
49093 -}
49094 -%}
49095 -
49096 diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/vimagemodule.cxx vips-7.38.5/swig/vipsCC/vimagemodule.cxx
49097 --- vips-7.38.5-vanilla/swig/vipsCC/vimagemodule.cxx 2014-07-17 23:48:36.211794473 -0400
49098 +++ vips-7.38.5/swig/vipsCC/vimagemodule.cxx 1969-12-31 19:00:00.000000000 -0500
49099 @@ -1,33595 +0,0 @@
49100 -/* ----------------------------------------------------------------------------
49101 - * This file was automatically generated by SWIG (http://www.swig.org).
49102 - * Version 2.0.10
49103 - *
49104 - * This file is not intended to be easily readable and contains a number of
49105 - * coding conventions designed to improve portability and efficiency. Do not make
49106 - * changes to this file unless you know what you are doing--modify the SWIG
49107 - * interface file instead.
49108 - * ----------------------------------------------------------------------------- */
49109 -
49110 -#define SWIGPYTHON
49111 -#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
49112 -
49113 -
49114 -#ifdef __cplusplus
49115 -/* SwigValueWrapper is described in swig.swg */
49116 -template<typename T> class SwigValueWrapper {
49117 - struct SwigMovePointer {
49118 - T *ptr;
49119 - SwigMovePointer(T *p) : ptr(p) { }
49120 - ~SwigMovePointer() { delete ptr; }
49121 - SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
49122 - } pointer;
49123 - SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
49124 - SwigValueWrapper(const SwigValueWrapper<T>& rhs);
49125 -public:
49126 - SwigValueWrapper() : pointer(0) { }
49127 - SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
49128 - operator T&() const { return *pointer.ptr; }
49129 - T *operator&() { return pointer.ptr; }
49130 -};
49131 -
49132 -template <typename T> T SwigValueInit() {
49133 - return T();
49134 -}
49135 -#endif
49136 -
49137 -/* -----------------------------------------------------------------------------
49138 - * This section contains generic SWIG labels for method/variable
49139 - * declarations/attributes, and other compiler dependent labels.
49140 - * ----------------------------------------------------------------------------- */
49141 -
49142 -/* template workaround for compilers that cannot correctly implement the C++ standard */
49143 -#ifndef SWIGTEMPLATEDISAMBIGUATOR
49144 -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
49145 -# define SWIGTEMPLATEDISAMBIGUATOR template
49146 -# elif defined(__HP_aCC)
49147 -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
49148 -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
49149 -# define SWIGTEMPLATEDISAMBIGUATOR template
49150 -# else
49151 -# define SWIGTEMPLATEDISAMBIGUATOR
49152 -# endif
49153 -#endif
49154 -
49155 -/* inline attribute */
49156 -#ifndef SWIGINLINE
49157 -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
49158 -# define SWIGINLINE inline
49159 -# else
49160 -# define SWIGINLINE
49161 -# endif
49162 -#endif
49163 -
49164 -/* attribute recognised by some compilers to avoid 'unused' warnings */
49165 -#ifndef SWIGUNUSED
49166 -# if defined(__GNUC__)
49167 -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
49168 -# define SWIGUNUSED __attribute__ ((__unused__))
49169 -# else
49170 -# define SWIGUNUSED
49171 -# endif
49172 -# elif defined(__ICC)
49173 -# define SWIGUNUSED __attribute__ ((__unused__))
49174 -# else
49175 -# define SWIGUNUSED
49176 -# endif
49177 -#endif
49178 -
49179 -#ifndef SWIG_MSC_UNSUPPRESS_4505
49180 -# if defined(_MSC_VER)
49181 -# pragma warning(disable : 4505) /* unreferenced local function has been removed */
49182 -# endif
49183 -#endif
49184 -
49185 -#ifndef SWIGUNUSEDPARM
49186 -# ifdef __cplusplus
49187 -# define SWIGUNUSEDPARM(p)
49188 -# else
49189 -# define SWIGUNUSEDPARM(p) p SWIGUNUSED
49190 -# endif
49191 -#endif
49192 -
49193 -/* internal SWIG method */
49194 -#ifndef SWIGINTERN
49195 -# define SWIGINTERN static SWIGUNUSED
49196 -#endif
49197 -
49198 -/* internal inline SWIG method */
49199 -#ifndef SWIGINTERNINLINE
49200 -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
49201 -#endif
49202 -
49203 -/* exporting methods */
49204 -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
49205 -# ifndef GCC_HASCLASSVISIBILITY
49206 -# define GCC_HASCLASSVISIBILITY
49207 -# endif
49208 -#endif
49209 -
49210 -#ifndef SWIGEXPORT
49211 -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
49212 -# if defined(STATIC_LINKED)
49213 -# define SWIGEXPORT
49214 -# else
49215 -# define SWIGEXPORT __declspec(dllexport)
49216 -# endif
49217 -# else
49218 -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
49219 -# define SWIGEXPORT __attribute__ ((visibility("default")))
49220 -# else
49221 -# define SWIGEXPORT
49222 -# endif
49223 -# endif
49224 -#endif
49225 -
49226 -/* calling conventions for Windows */
49227 -#ifndef SWIGSTDCALL
49228 -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
49229 -# define SWIGSTDCALL __stdcall
49230 -# else
49231 -# define SWIGSTDCALL
49232 -# endif
49233 -#endif
49234 -
49235 -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
49236 -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
49237 -# define _CRT_SECURE_NO_DEPRECATE
49238 -#endif
49239 -
49240 -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
49241 -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
49242 -# define _SCL_SECURE_NO_DEPRECATE
49243 -#endif
49244 -
49245 -
49246 -
49247 -/* Python.h has to appear first */
49248 -#include <Python.h>
49249 -
49250 -/* -----------------------------------------------------------------------------
49251 - * swigrun.swg
49252 - *
49253 - * This file contains generic C API SWIG runtime support for pointer
49254 - * type checking.
49255 - * ----------------------------------------------------------------------------- */
49256 -
49257 -/* This should only be incremented when either the layout of swig_type_info changes,
49258 - or for whatever reason, the runtime changes incompatibly */
49259 -#define SWIG_RUNTIME_VERSION "4"
49260 -
49261 -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
49262 -#ifdef SWIG_TYPE_TABLE
49263 -# define SWIG_QUOTE_STRING(x) #x
49264 -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
49265 -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
49266 -#else
49267 -# define SWIG_TYPE_TABLE_NAME
49268 -#endif
49269 -
49270 -/*
49271 - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
49272 - creating a static or dynamic library from the SWIG runtime code.
49273 - In 99.9% of the cases, SWIG just needs to declare them as 'static'.
49274 -
49275 - But only do this if strictly necessary, ie, if you have problems
49276 - with your compiler or suchlike.
49277 -*/
49278 -
49279 -#ifndef SWIGRUNTIME
49280 -# define SWIGRUNTIME SWIGINTERN
49281 -#endif
49282 -
49283 -#ifndef SWIGRUNTIMEINLINE
49284 -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
49285 -#endif
49286 -
49287 -/* Generic buffer size */
49288 -#ifndef SWIG_BUFFER_SIZE
49289 -# define SWIG_BUFFER_SIZE 1024
49290 -#endif
49291 -
49292 -/* Flags for pointer conversions */
49293 -#define SWIG_POINTER_DISOWN 0x1
49294 -#define SWIG_CAST_NEW_MEMORY 0x2
49295 -
49296 -/* Flags for new pointer objects */
49297 -#define SWIG_POINTER_OWN 0x1
49298 -
49299 -
49300 -/*
49301 - Flags/methods for returning states.
49302 -
49303 - The SWIG conversion methods, as ConvertPtr, return an integer
49304 - that tells if the conversion was successful or not. And if not,
49305 - an error code can be returned (see swigerrors.swg for the codes).
49306 -
49307 - Use the following macros/flags to set or process the returning
49308 - states.
49309 -
49310 - In old versions of SWIG, code such as the following was usually written:
49311 -
49312 - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
49313 - // success code
49314 - } else {
49315 - //fail code
49316 - }
49317 -
49318 - Now you can be more explicit:
49319 -
49320 - int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
49321 - if (SWIG_IsOK(res)) {
49322 - // success code
49323 - } else {
49324 - // fail code
49325 - }
49326 -
49327 - which is the same really, but now you can also do
49328 -
49329 - Type *ptr;
49330 - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
49331 - if (SWIG_IsOK(res)) {
49332 - // success code
49333 - if (SWIG_IsNewObj(res) {
49334 - ...
49335 - delete *ptr;
49336 - } else {
49337 - ...
49338 - }
49339 - } else {
49340 - // fail code
49341 - }
49342 -
49343 - I.e., now SWIG_ConvertPtr can return new objects and you can
49344 - identify the case and take care of the deallocation. Of course that
49345 - also requires SWIG_ConvertPtr to return new result values, such as
49346 -
49347 - int SWIG_ConvertPtr(obj, ptr,...) {
49348 - if (<obj is ok>) {
49349 - if (<need new object>) {
49350 - *ptr = <ptr to new allocated object>;
49351 - return SWIG_NEWOBJ;
49352 - } else {
49353 - *ptr = <ptr to old object>;
49354 - return SWIG_OLDOBJ;
49355 - }
49356 - } else {
49357 - return SWIG_BADOBJ;
49358 - }
49359 - }
49360 -
49361 - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
49362 - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
49363 - SWIG errors code.
49364 -
49365 - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
49366 - allows to return the 'cast rank', for example, if you have this
49367 -
49368 - int food(double)
49369 - int fooi(int);
49370 -
49371 - and you call
49372 -
49373 - food(1) // cast rank '1' (1 -> 1.0)
49374 - fooi(1) // cast rank '0'
49375 -
49376 - just use the SWIG_AddCast()/SWIG_CheckState()
49377 -*/
49378 -
49379 -#define SWIG_OK (0)
49380 -#define SWIG_ERROR (-1)
49381 -#define SWIG_IsOK(r) (r >= 0)
49382 -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
49383 -
49384 -/* The CastRankLimit says how many bits are used for the cast rank */
49385 -#define SWIG_CASTRANKLIMIT (1 << 8)
49386 -/* The NewMask denotes the object was created (using new/malloc) */
49387 -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
49388 -/* The TmpMask is for in/out typemaps that use temporal objects */
49389 -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
49390 -/* Simple returning values */
49391 -#define SWIG_BADOBJ (SWIG_ERROR)
49392 -#define SWIG_OLDOBJ (SWIG_OK)
49393 -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
49394 -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
49395 -/* Check, add and del mask methods */
49396 -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
49397 -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
49398 -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
49399 -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
49400 -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
49401 -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
49402 -
49403 -/* Cast-Rank Mode */
49404 -#if defined(SWIG_CASTRANK_MODE)
49405 -# ifndef SWIG_TypeRank
49406 -# define SWIG_TypeRank unsigned long
49407 -# endif
49408 -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */
49409 -# define SWIG_MAXCASTRANK (2)
49410 -# endif
49411 -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
49412 -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
49413 -SWIGINTERNINLINE int SWIG_AddCast(int r) {
49414 - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
49415 -}
49416 -SWIGINTERNINLINE int SWIG_CheckState(int r) {
49417 - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
49418 -}
49419 -#else /* no cast-rank mode */
49420 -# define SWIG_AddCast(r) (r)
49421 -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
49422 -#endif
49423 -
49424 -
49425 -#include <string.h>
49426 -
49427 -#ifdef __cplusplus
49428 -extern "C" {
49429 -#endif
49430 -
49431 -typedef void *(*swig_converter_func)(void *, int *);
49432 -typedef struct swig_type_info *(*swig_dycast_func)(void **);
49433 -
49434 -/* Structure to store information on one type */
49435 -typedef struct swig_type_info {
49436 - const char *name; /* mangled name of this type */
49437 - const char *str; /* human readable name of this type */
49438 - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
49439 - struct swig_cast_info *cast; /* linked list of types that can cast into this type */
49440 - void *clientdata; /* language specific type data */
49441 - int owndata; /* flag if the structure owns the clientdata */
49442 -} swig_type_info;
49443 -
49444 -/* Structure to store a type and conversion function used for casting */
49445 -typedef struct swig_cast_info {
49446 - swig_type_info *type; /* pointer to type that is equivalent to this type */
49447 - swig_converter_func converter; /* function to cast the void pointers */
49448 - struct swig_cast_info *next; /* pointer to next cast in linked list */
49449 - struct swig_cast_info *prev; /* pointer to the previous cast */
49450 -} swig_cast_info;
49451 -
49452 -/* Structure used to store module information
49453 - * Each module generates one structure like this, and the runtime collects
49454 - * all of these structures and stores them in a circularly linked list.*/
49455 -typedef struct swig_module_info {
49456 - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
49457 - size_t size; /* Number of types in this module */
49458 - struct swig_module_info *next; /* Pointer to next element in circularly linked list */
49459 - swig_type_info **type_initial; /* Array of initially generated type structures */
49460 - swig_cast_info **cast_initial; /* Array of initially generated casting structures */
49461 - void *clientdata; /* Language specific module data */
49462 -} swig_module_info;
49463 -
49464 -/*
49465 - Compare two type names skipping the space characters, therefore
49466 - "char*" == "char *" and "Class<int>" == "Class<int >", etc.
49467 -
49468 - Return 0 when the two name types are equivalent, as in
49469 - strncmp, but skipping ' '.
49470 -*/
49471 -SWIGRUNTIME int
49472 -SWIG_TypeNameComp(const char *f1, const char *l1,
49473 - const char *f2, const char *l2) {
49474 - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
49475 - while ((*f1 == ' ') && (f1 != l1)) ++f1;
49476 - while ((*f2 == ' ') && (f2 != l2)) ++f2;
49477 - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
49478 - }
49479 - return (int)((l1 - f1) - (l2 - f2));
49480 -}
49481 -
49482 -/*
49483 - Check type equivalence in a name list like <name1>|<name2>|...
49484 - Return 0 if equal, -1 if nb < tb, 1 if nb > tb
49485 -*/
49486 -SWIGRUNTIME int
49487 -SWIG_TypeCmp(const char *nb, const char *tb) {
49488 - int equiv = 1;
49489 - const char* te = tb + strlen(tb);
49490 - const char* ne = nb;
49491 - while (equiv != 0 && *ne) {
49492 - for (nb = ne; *ne; ++ne) {
49493 - if (*ne == '|') break;
49494 - }
49495 - equiv = SWIG_TypeNameComp(nb, ne, tb, te);
49496 - if (*ne) ++ne;
49497 - }
49498 - return equiv;
49499 -}
49500 -
49501 -/*
49502 - Check type equivalence in a name list like <name1>|<name2>|...
49503 - Return 0 if not equal, 1 if equal
49504 -*/
49505 -SWIGRUNTIME int
49506 -SWIG_TypeEquiv(const char *nb, const char *tb) {
49507 - return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
49508 -}
49509 -
49510 -/*
49511 - Check the typename
49512 -*/
49513 -SWIGRUNTIME swig_cast_info *
49514 -SWIG_TypeCheck(const char *c, swig_type_info *ty) {
49515 - if (ty) {
49516 - swig_cast_info *iter = ty->cast;
49517 - while (iter) {
49518 - if (strcmp(iter->type->name, c) == 0) {
49519 - if (iter == ty->cast)
49520 - return iter;
49521 - /* Move iter to the top of the linked list */
49522 - iter->prev->next = iter->next;
49523 - if (iter->next)
49524 - iter->next->prev = iter->prev;
49525 - iter->next = ty->cast;
49526 - iter->prev = 0;
49527 - if (ty->cast) ty->cast->prev = iter;
49528 - ty->cast = iter;
49529 - return iter;
49530 - }
49531 - iter = iter->next;
49532 - }
49533 - }
49534 - return 0;
49535 -}
49536 -
49537 -/*
49538 - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
49539 -*/
49540 -SWIGRUNTIME swig_cast_info *
49541 -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
49542 - if (ty) {
49543 - swig_cast_info *iter = ty->cast;
49544 - while (iter) {
49545 - if (iter->type == from) {
49546 - if (iter == ty->cast)
49547 - return iter;
49548 - /* Move iter to the top of the linked list */
49549 - iter->prev->next = iter->next;
49550 - if (iter->next)
49551 - iter->next->prev = iter->prev;
49552 - iter->next = ty->cast;
49553 - iter->prev = 0;
49554 - if (ty->cast) ty->cast->prev = iter;
49555 - ty->cast = iter;
49556 - return iter;
49557 - }
49558 - iter = iter->next;
49559 - }
49560 - }
49561 - return 0;
49562 -}
49563 -
49564 -/*
49565 - Cast a pointer up an inheritance hierarchy
49566 -*/
49567 -SWIGRUNTIMEINLINE void *
49568 -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
49569 - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
49570 -}
49571 -
49572 -/*
49573 - Dynamic pointer casting. Down an inheritance hierarchy
49574 -*/
49575 -SWIGRUNTIME swig_type_info *
49576 -SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
49577 - swig_type_info *lastty = ty;
49578 - if (!ty || !ty->dcast) return ty;
49579 - while (ty && (ty->dcast)) {
49580 - ty = (*ty->dcast)(ptr);
49581 - if (ty) lastty = ty;
49582 - }
49583 - return lastty;
49584 -}
49585 -
49586 -/*
49587 - Return the name associated with this type
49588 -*/
49589 -SWIGRUNTIMEINLINE const char *
49590 -SWIG_TypeName(const swig_type_info *ty) {
49591 - return ty->name;
49592 -}
49593 -
49594 -/*
49595 - Return the pretty name associated with this type,
49596 - that is an unmangled type name in a form presentable to the user.
49597 -*/
49598 -SWIGRUNTIME const char *
49599 -SWIG_TypePrettyName(const swig_type_info *type) {
49600 - /* The "str" field contains the equivalent pretty names of the
49601 - type, separated by vertical-bar characters. We choose
49602 - to print the last name, as it is often (?) the most
49603 - specific. */
49604 - if (!type) return NULL;
49605 - if (type->str != NULL) {
49606 - const char *last_name = type->str;
49607 - const char *s;
49608 - for (s = type->str; *s; s++)
49609 - if (*s == '|') last_name = s+1;
49610 - return last_name;
49611 - }
49612 - else
49613 - return type->name;
49614 -}
49615 -
49616 -/*
49617 - Set the clientdata field for a type
49618 -*/
49619 -SWIGRUNTIME void
49620 -SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
49621 - swig_cast_info *cast = ti->cast;
49622 - /* if (ti->clientdata == clientdata) return; */
49623 - ti->clientdata = clientdata;
49624 -
49625 - while (cast) {
49626 - if (!cast->converter) {
49627 - swig_type_info *tc = cast->type;
49628 - if (!tc->clientdata) {
49629 - SWIG_TypeClientData(tc, clientdata);
49630 - }
49631 - }
49632 - cast = cast->next;
49633 - }
49634 -}
49635 -SWIGRUNTIME void
49636 -SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
49637 - SWIG_TypeClientData(ti, clientdata);
49638 - ti->owndata = 1;
49639 -}
49640 -
49641 -/*
49642 - Search for a swig_type_info structure only by mangled name
49643 - Search is a O(log #types)
49644 -
49645 - We start searching at module start, and finish searching when start == end.
49646 - Note: if start == end at the beginning of the function, we go all the way around
49647 - the circular list.
49648 -*/
49649 -SWIGRUNTIME swig_type_info *
49650 -SWIG_MangledTypeQueryModule(swig_module_info *start,
49651 - swig_module_info *end,
49652 - const char *name) {
49653 - swig_module_info *iter = start;
49654 - do {
49655 - if (iter->size) {
49656 - register size_t l = 0;
49657 - register size_t r = iter->size - 1;
49658 - do {
49659 - /* since l+r >= 0, we can (>> 1) instead (/ 2) */
49660 - register size_t i = (l + r) >> 1;
49661 - const char *iname = iter->types[i]->name;
49662 - if (iname) {
49663 - register int compare = strcmp(name, iname);
49664 - if (compare == 0) {
49665 - return iter->types[i];
49666 - } else if (compare < 0) {
49667 - if (i) {
49668 - r = i - 1;
49669 - } else {
49670 - break;
49671 - }
49672 - } else if (compare > 0) {
49673 - l = i + 1;
49674 - }
49675 - } else {
49676 - break; /* should never happen */
49677 - }
49678 - } while (l <= r);
49679 - }
49680 - iter = iter->next;
49681 - } while (iter != end);
49682 - return 0;
49683 -}
49684 -
49685 -/*
49686 - Search for a swig_type_info structure for either a mangled name or a human readable name.
49687 - It first searches the mangled names of the types, which is a O(log #types)
49688 - If a type is not found it then searches the human readable names, which is O(#types).
49689 -
49690 - We start searching at module start, and finish searching when start == end.
49691 - Note: if start == end at the beginning of the function, we go all the way around
49692 - the circular list.
49693 -*/
49694 -SWIGRUNTIME swig_type_info *
49695 -SWIG_TypeQueryModule(swig_module_info *start,
49696 - swig_module_info *end,
49697 - const char *name) {
49698 - /* STEP 1: Search the name field using binary search */
49699 - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
49700 - if (ret) {
49701 - return ret;
49702 - } else {
49703 - /* STEP 2: If the type hasn't been found, do a complete search
49704 - of the str field (the human readable name) */
49705 - swig_module_info *iter = start;
49706 - do {
49707 - register size_t i = 0;
49708 - for (; i < iter->size; ++i) {
49709 - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
49710 - return iter->types[i];
49711 - }
49712 - iter = iter->next;
49713 - } while (iter != end);
49714 - }
49715 -
49716 - /* neither found a match */
49717 - return 0;
49718 -}
49719 -
49720 -/*
49721 - Pack binary data into a string
49722 -*/
49723 -SWIGRUNTIME char *
49724 -SWIG_PackData(char *c, void *ptr, size_t sz) {
49725 - static const char hex[17] = "0123456789abcdef";
49726 - register const unsigned char *u = (unsigned char *) ptr;
49727 - register const unsigned char *eu = u + sz;
49728 - for (; u != eu; ++u) {
49729 - register unsigned char uu = *u;
49730 - *(c++) = hex[(uu & 0xf0) >> 4];
49731 - *(c++) = hex[uu & 0xf];
49732 - }
49733 - return c;
49734 -}
49735 -
49736 -/*
49737 - Unpack binary data from a string
49738 -*/
49739 -SWIGRUNTIME const char *
49740 -SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
49741 - register unsigned char *u = (unsigned char *) ptr;
49742 - register const unsigned char *eu = u + sz;
49743 - for (; u != eu; ++u) {
49744 - register char d = *(c++);
49745 - register unsigned char uu;
49746 - if ((d >= '0') && (d <= '9'))
49747 - uu = ((d - '0') << 4);
49748 - else if ((d >= 'a') && (d <= 'f'))
49749 - uu = ((d - ('a'-10)) << 4);
49750 - else
49751 - return (char *) 0;
49752 - d = *(c++);
49753 - if ((d >= '0') && (d <= '9'))
49754 - uu |= (d - '0');
49755 - else if ((d >= 'a') && (d <= 'f'))
49756 - uu |= (d - ('a'-10));
49757 - else
49758 - return (char *) 0;
49759 - *u = uu;
49760 - }
49761 - return c;
49762 -}
49763 -
49764 -/*
49765 - Pack 'void *' into a string buffer.
49766 -*/
49767 -SWIGRUNTIME char *
49768 -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
49769 - char *r = buff;
49770 - if ((2*sizeof(void *) + 2) > bsz) return 0;
49771 - *(r++) = '_';
49772 - r = SWIG_PackData(r,&ptr,sizeof(void *));
49773 - if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
49774 - strcpy(r,name);
49775 - return buff;
49776 -}
49777 -
49778 -SWIGRUNTIME const char *
49779 -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
49780 - if (*c != '_') {
49781 - if (strcmp(c,"NULL") == 0) {
49782 - *ptr = (void *) 0;
49783 - return name;
49784 - } else {
49785 - return 0;
49786 - }
49787 - }
49788 - return SWIG_UnpackData(++c,ptr,sizeof(void *));
49789 -}
49790 -
49791 -SWIGRUNTIME char *
49792 -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
49793 - char *r = buff;
49794 - size_t lname = (name ? strlen(name) : 0);
49795 - if ((2*sz + 2 + lname) > bsz) return 0;
49796 - *(r++) = '_';
49797 - r = SWIG_PackData(r,ptr,sz);
49798 - if (lname) {
49799 - strncpy(r,name,lname+1);
49800 - } else {
49801 - *r = 0;
49802 - }
49803 - return buff;
49804 -}
49805 -
49806 -SWIGRUNTIME const char *
49807 -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
49808 - if (*c != '_') {
49809 - if (strcmp(c,"NULL") == 0) {
49810 - memset(ptr,0,sz);
49811 - return name;
49812 - } else {
49813 - return 0;
49814 - }
49815 - }
49816 - return SWIG_UnpackData(++c,ptr,sz);
49817 -}
49818 -
49819 -#ifdef __cplusplus
49820 -}
49821 -#endif
49822 -
49823 -/* Errors in SWIG */
49824 -#define SWIG_UnknownError -1
49825 -#define SWIG_IOError -2
49826 -#define SWIG_RuntimeError -3
49827 -#define SWIG_IndexError -4
49828 -#define SWIG_TypeError -5
49829 -#define SWIG_DivisionByZero -6
49830 -#define SWIG_OverflowError -7
49831 -#define SWIG_SyntaxError -8
49832 -#define SWIG_ValueError -9
49833 -#define SWIG_SystemError -10
49834 -#define SWIG_AttributeError -11
49835 -#define SWIG_MemoryError -12
49836 -#define SWIG_NullReferenceError -13
49837 -
49838 -
49839 -
49840 -/* Compatibility macros for Python 3 */
49841 -#if PY_VERSION_HEX >= 0x03000000
49842 -
49843 -#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
49844 -#define PyInt_Check(x) PyLong_Check(x)
49845 -#define PyInt_AsLong(x) PyLong_AsLong(x)
49846 -#define PyInt_FromLong(x) PyLong_FromLong(x)
49847 -#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
49848 -#define PyString_Check(name) PyBytes_Check(name)
49849 -#define PyString_FromString(x) PyUnicode_FromString(x)
49850 -#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
49851 -#define PyString_AsString(str) PyBytes_AsString(str)
49852 -#define PyString_Size(str) PyBytes_Size(str)
49853 -#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
49854 -#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
49855 -#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
49856 -#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
49857 -
49858 -#endif
49859 -
49860 -#ifndef Py_TYPE
49861 -# define Py_TYPE(op) ((op)->ob_type)
49862 -#endif
49863 -
49864 -/* SWIG APIs for compatibility of both Python 2 & 3 */
49865 -
49866 -#if PY_VERSION_HEX >= 0x03000000
49867 -# define SWIG_Python_str_FromFormat PyUnicode_FromFormat
49868 -#else
49869 -# define SWIG_Python_str_FromFormat PyString_FromFormat
49870 -#endif
49871 -
49872 -
49873 -/* Warning: This function will allocate a new string in Python 3,
49874 - * so please call SWIG_Python_str_DelForPy3(x) to free the space.
49875 - */
49876 -SWIGINTERN char*
49877 -SWIG_Python_str_AsChar(PyObject *str)
49878 -{
49879 -#if PY_VERSION_HEX >= 0x03000000
49880 - char *cstr;
49881 - char *newstr;
49882 - Py_ssize_t len;
49883 - str = PyUnicode_AsUTF8String(str);
49884 - PyBytes_AsStringAndSize(str, &cstr, &len);
49885 - newstr = (char *) malloc(len+1);
49886 - memcpy(newstr, cstr, len+1);
49887 - Py_XDECREF(str);
49888 - return newstr;
49889 -#else
49890 - return PyString_AsString(str);
49891 -#endif
49892 -}
49893 -
49894 -#if PY_VERSION_HEX >= 0x03000000
49895 -# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
49896 -#else
49897 -# define SWIG_Python_str_DelForPy3(x)
49898 -#endif
49899 -
49900 -
49901 -SWIGINTERN PyObject*
49902 -SWIG_Python_str_FromChar(const char *c)
49903 -{
49904 -#if PY_VERSION_HEX >= 0x03000000
49905 - return PyUnicode_FromString(c);
49906 -#else
49907 - return PyString_FromString(c);
49908 -#endif
49909 -}
49910 -
49911 -/* Add PyOS_snprintf for old Pythons */
49912 -#if PY_VERSION_HEX < 0x02020000
49913 -# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
49914 -# define PyOS_snprintf _snprintf
49915 -# else
49916 -# define PyOS_snprintf snprintf
49917 -# endif
49918 -#endif
49919 -
49920 -/* A crude PyString_FromFormat implementation for old Pythons */
49921 -#if PY_VERSION_HEX < 0x02020000
49922 -
49923 -#ifndef SWIG_PYBUFFER_SIZE
49924 -# define SWIG_PYBUFFER_SIZE 1024
49925 -#endif
49926 -
49927 -static PyObject *
49928 -PyString_FromFormat(const char *fmt, ...) {
49929 - va_list ap;
49930 - char buf[SWIG_PYBUFFER_SIZE * 2];
49931 - int res;
49932 - va_start(ap, fmt);
49933 - res = vsnprintf(buf, sizeof(buf), fmt, ap);
49934 - va_end(ap);
49935 - return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
49936 -}
49937 -#endif
49938 -
49939 -/* Add PyObject_Del for old Pythons */
49940 -#if PY_VERSION_HEX < 0x01060000
49941 -# define PyObject_Del(op) PyMem_DEL((op))
49942 -#endif
49943 -#ifndef PyObject_DEL
49944 -# define PyObject_DEL PyObject_Del
49945 -#endif
49946 -
49947 -/* A crude PyExc_StopIteration exception for old Pythons */
49948 -#if PY_VERSION_HEX < 0x02020000
49949 -# ifndef PyExc_StopIteration
49950 -# define PyExc_StopIteration PyExc_RuntimeError
49951 -# endif
49952 -# ifndef PyObject_GenericGetAttr
49953 -# define PyObject_GenericGetAttr 0
49954 -# endif
49955 -#endif
49956 -
49957 -/* Py_NotImplemented is defined in 2.1 and up. */
49958 -#if PY_VERSION_HEX < 0x02010000
49959 -# ifndef Py_NotImplemented
49960 -# define Py_NotImplemented PyExc_RuntimeError
49961 -# endif
49962 -#endif
49963 -
49964 -/* A crude PyString_AsStringAndSize implementation for old Pythons */
49965 -#if PY_VERSION_HEX < 0x02010000
49966 -# ifndef PyString_AsStringAndSize
49967 -# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
49968 -# endif
49969 -#endif
49970 -
49971 -/* PySequence_Size for old Pythons */
49972 -#if PY_VERSION_HEX < 0x02000000
49973 -# ifndef PySequence_Size
49974 -# define PySequence_Size PySequence_Length
49975 -# endif
49976 -#endif
49977 -
49978 -/* PyBool_FromLong for old Pythons */
49979 -#if PY_VERSION_HEX < 0x02030000
49980 -static
49981 -PyObject *PyBool_FromLong(long ok)
49982 -{
49983 - PyObject *result = ok ? Py_True : Py_False;
49984 - Py_INCREF(result);
49985 - return result;
49986 -}
49987 -#endif
49988 -
49989 -/* Py_ssize_t for old Pythons */
49990 -/* This code is as recommended by: */
49991 -/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
49992 -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
49993 -typedef int Py_ssize_t;
49994 -# define PY_SSIZE_T_MAX INT_MAX
49995 -# define PY_SSIZE_T_MIN INT_MIN
49996 -typedef inquiry lenfunc;
49997 -typedef intargfunc ssizeargfunc;
49998 -typedef intintargfunc ssizessizeargfunc;
49999 -typedef intobjargproc ssizeobjargproc;
50000 -typedef intintobjargproc ssizessizeobjargproc;
50001 -typedef getreadbufferproc readbufferproc;
50002 -typedef getwritebufferproc writebufferproc;
50003 -typedef getsegcountproc segcountproc;
50004 -typedef getcharbufferproc charbufferproc;
50005 -static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
50006 -{
50007 - long result = 0;
50008 - PyObject *i = PyNumber_Int(x);
50009 - if (i) {
50010 - result = PyInt_AsLong(i);
50011 - Py_DECREF(i);
50012 - }
50013 - return result;
50014 -}
50015 -#endif
50016 -
50017 -#if PY_VERSION_HEX < 0x02050000
50018 -#define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
50019 -#endif
50020 -
50021 -#if PY_VERSION_HEX < 0x02040000
50022 -#define Py_VISIT(op) \
50023 - do { \
50024 - if (op) { \
50025 - int vret = visit((op), arg); \
50026 - if (vret) \
50027 - return vret; \
50028 - } \
50029 - } while (0)
50030 -#endif
50031 -
50032 -#if PY_VERSION_HEX < 0x02030000
50033 -typedef struct {
50034 - PyTypeObject type;
50035 - PyNumberMethods as_number;
50036 - PyMappingMethods as_mapping;
50037 - PySequenceMethods as_sequence;
50038 - PyBufferProcs as_buffer;
50039 - PyObject *name, *slots;
50040 -} PyHeapTypeObject;
50041 -#endif
50042 -
50043 -#if PY_VERSION_HEX < 0x02030000
50044 -typedef destructor freefunc;
50045 -#endif
50046 -
50047 -#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
50048 - (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
50049 - (PY_MAJOR_VERSION > 3))
50050 -# define SWIGPY_USE_CAPSULE
50051 -# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
50052 -#endif
50053 -
50054 -#if PY_VERSION_HEX < 0x03020000
50055 -#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
50056 -#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
50057 -#endif
50058 -
50059 -/* -----------------------------------------------------------------------------
50060 - * error manipulation
50061 - * ----------------------------------------------------------------------------- */
50062 -
50063 -SWIGRUNTIME PyObject*
50064 -SWIG_Python_ErrorType(int code) {
50065 - PyObject* type = 0;
50066 - switch(code) {
50067 - case SWIG_MemoryError:
50068 - type = PyExc_MemoryError;
50069 - break;
50070 - case SWIG_IOError:
50071 - type = PyExc_IOError;
50072 - break;
50073 - case SWIG_RuntimeError:
50074 - type = PyExc_RuntimeError;
50075 - break;
50076 - case SWIG_IndexError:
50077 - type = PyExc_IndexError;
50078 - break;
50079 - case SWIG_TypeError:
50080 - type = PyExc_TypeError;
50081 - break;
50082 - case SWIG_DivisionByZero:
50083 - type = PyExc_ZeroDivisionError;
50084 - break;
50085 - case SWIG_OverflowError:
50086 - type = PyExc_OverflowError;
50087 - break;
50088 - case SWIG_SyntaxError:
50089 - type = PyExc_SyntaxError;
50090 - break;
50091 - case SWIG_ValueError:
50092 - type = PyExc_ValueError;
50093 - break;
50094 - case SWIG_SystemError:
50095 - type = PyExc_SystemError;
50096 - break;
50097 - case SWIG_AttributeError:
50098 - type = PyExc_AttributeError;
50099 - break;
50100 - default:
50101 - type = PyExc_RuntimeError;
50102 - }
50103 - return type;
50104 -}
50105 -
50106 -
50107 -SWIGRUNTIME void
50108 -SWIG_Python_AddErrorMsg(const char* mesg)
50109 -{
50110 - PyObject *type = 0;
50111 - PyObject *value = 0;
50112 - PyObject *traceback = 0;
50113 -
50114 - if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
50115 - if (value) {
50116 - char *tmp;
50117 - PyObject *old_str = PyObject_Str(value);
50118 - PyErr_Clear();
50119 - Py_XINCREF(type);
50120 -
50121 - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
50122 - SWIG_Python_str_DelForPy3(tmp);
50123 - Py_DECREF(old_str);
50124 - Py_DECREF(value);
50125 - } else {
50126 - PyErr_SetString(PyExc_RuntimeError, mesg);
50127 - }
50128 -}
50129 -
50130 -#if defined(SWIG_PYTHON_NO_THREADS)
50131 -# if defined(SWIG_PYTHON_THREADS)
50132 -# undef SWIG_PYTHON_THREADS
50133 -# endif
50134 -#endif
50135 -#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
50136 -# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
50137 -# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
50138 -# define SWIG_PYTHON_USE_GIL
50139 -# endif
50140 -# endif
50141 -# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
50142 -# ifndef SWIG_PYTHON_INITIALIZE_THREADS
50143 -# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
50144 -# endif
50145 -# ifdef __cplusplus /* C++ code */
50146 - class SWIG_Python_Thread_Block {
50147 - bool status;
50148 - PyGILState_STATE state;
50149 - public:
50150 - void end() { if (status) { PyGILState_Release(state); status = false;} }
50151 - SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
50152 - ~SWIG_Python_Thread_Block() { end(); }
50153 - };
50154 - class SWIG_Python_Thread_Allow {
50155 - bool status;
50156 - PyThreadState *save;
50157 - public:
50158 - void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
50159 - SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
50160 - ~SWIG_Python_Thread_Allow() { end(); }
50161 - };
50162 -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
50163 -# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
50164 -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
50165 -# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
50166 -# else /* C code */
50167 -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
50168 -# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
50169 -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
50170 -# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
50171 -# endif
50172 -# else /* Old thread way, not implemented, user must provide it */
50173 -# if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
50174 -# define SWIG_PYTHON_INITIALIZE_THREADS
50175 -# endif
50176 -# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
50177 -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
50178 -# endif
50179 -# if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
50180 -# define SWIG_PYTHON_THREAD_END_BLOCK
50181 -# endif
50182 -# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
50183 -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
50184 -# endif
50185 -# if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
50186 -# define SWIG_PYTHON_THREAD_END_ALLOW
50187 -# endif
50188 -# endif
50189 -#else /* No thread support */
50190 -# define SWIG_PYTHON_INITIALIZE_THREADS
50191 -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
50192 -# define SWIG_PYTHON_THREAD_END_BLOCK
50193 -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
50194 -# define SWIG_PYTHON_THREAD_END_ALLOW
50195 -#endif
50196 -
50197 -/* -----------------------------------------------------------------------------
50198 - * Python API portion that goes into the runtime
50199 - * ----------------------------------------------------------------------------- */
50200 -
50201 -#ifdef __cplusplus
50202 -extern "C" {
50203 -#endif
50204 -
50205 -/* -----------------------------------------------------------------------------
50206 - * Constant declarations
50207 - * ----------------------------------------------------------------------------- */
50208 -
50209 -/* Constant Types */
50210 -#define SWIG_PY_POINTER 4
50211 -#define SWIG_PY_BINARY 5
50212 -
50213 -/* Constant information structure */
50214 -typedef struct swig_const_info {
50215 - int type;
50216 - char *name;
50217 - long lvalue;
50218 - double dvalue;
50219 - void *pvalue;
50220 - swig_type_info **ptype;
50221 -} swig_const_info;
50222 -
50223 -
50224 -/* -----------------------------------------------------------------------------
50225 - * Wrapper of PyInstanceMethod_New() used in Python 3
50226 - * It is exported to the generated module, used for -fastproxy
50227 - * ----------------------------------------------------------------------------- */
50228 -#if PY_VERSION_HEX >= 0x03000000
50229 -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
50230 -{
50231 - return PyInstanceMethod_New(func);
50232 -}
50233 -#else
50234 -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
50235 -{
50236 - return NULL;
50237 -}
50238 -#endif
50239 -
50240 -#ifdef __cplusplus
50241 -}
50242 -#endif
50243 -
50244 -
50245 -/* -----------------------------------------------------------------------------
50246 - * pyrun.swg
50247 - *
50248 - * This file contains the runtime support for Python modules
50249 - * and includes code for managing global variables and pointer
50250 - * type checking.
50251 - *
50252 - * ----------------------------------------------------------------------------- */
50253 -
50254 -/* Common SWIG API */
50255 -
50256 -/* for raw pointers */
50257 -#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
50258 -#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
50259 -#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
50260 -
50261 -#ifdef SWIGPYTHON_BUILTIN
50262 -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
50263 -#else
50264 -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
50265 -#endif
50266 -
50267 -#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
50268 -
50269 -#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
50270 -#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
50271 -#define swig_owntype int
50272 -
50273 -/* for raw packed data */
50274 -#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
50275 -#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
50276 -
50277 -/* for class or struct pointers */
50278 -#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
50279 -#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
50280 -
50281 -/* for C or C++ function pointers */
50282 -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
50283 -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
50284 -
50285 -/* for C++ member pointers, ie, member methods */
50286 -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
50287 -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
50288 -
50289 -
50290 -/* Runtime API */
50291 -
50292 -#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
50293 -#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
50294 -#define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
50295 -
50296 -#define SWIG_SetErrorObj SWIG_Python_SetErrorObj
50297 -#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
50298 -#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
50299 -#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
50300 -#define SWIG_fail goto fail
50301 -
50302 -
50303 -/* Runtime API implementation */
50304 -
50305 -/* Error manipulation */
50306 -
50307 -SWIGINTERN void
50308 -SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
50309 - SWIG_PYTHON_THREAD_BEGIN_BLOCK;
50310 - PyErr_SetObject(errtype, obj);
50311 - Py_DECREF(obj);
50312 - SWIG_PYTHON_THREAD_END_BLOCK;
50313 -}
50314 -
50315 -SWIGINTERN void
50316 -SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
50317 - SWIG_PYTHON_THREAD_BEGIN_BLOCK;
50318 - PyErr_SetString(errtype, msg);
50319 - SWIG_PYTHON_THREAD_END_BLOCK;
50320 -}
50321 -
50322 -#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
50323 -
50324 -/* Set a constant value */
50325 -
50326 -#if defined(SWIGPYTHON_BUILTIN)
50327 -
50328 -SWIGINTERN void
50329 -SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
50330 - PyObject *s = PyString_InternFromString(key);
50331 - PyList_Append(seq, s);
50332 - Py_DECREF(s);
50333 -}
50334 -
50335 -SWIGINTERN void
50336 -SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
50337 -#if PY_VERSION_HEX < 0x02030000
50338 - PyDict_SetItemString(d, (char *)name, obj);
50339 -#else
50340 - PyDict_SetItemString(d, name, obj);
50341 -#endif
50342 - Py_DECREF(obj);
50343 - if (public_interface)
50344 - SwigPyBuiltin_AddPublicSymbol(public_interface, name);
50345 -}
50346 -
50347 -#else
50348 -
50349 -SWIGINTERN void
50350 -SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
50351 -#if PY_VERSION_HEX < 0x02030000
50352 - PyDict_SetItemString(d, (char *)name, obj);
50353 -#else
50354 - PyDict_SetItemString(d, name, obj);
50355 -#endif
50356 - Py_DECREF(obj);
50357 -}
50358 -
50359 -#endif
50360 -
50361 -/* Append a value to the result obj */
50362 -
50363 -SWIGINTERN PyObject*
50364 -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
50365 -#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
50366 - if (!result) {
50367 - result = obj;
50368 - } else if (result == Py_None) {
50369 - Py_DECREF(result);
50370 - result = obj;
50371 - } else {
50372 - if (!PyList_Check(result)) {
50373 - PyObject *o2 = result;
50374 - result = PyList_New(1);
50375 - PyList_SetItem(result, 0, o2);
50376 - }
50377 - PyList_Append(result,obj);
50378 - Py_DECREF(obj);
50379 - }
50380 - return result;
50381 -#else
50382 - PyObject* o2;
50383 - PyObject* o3;
50384 - if (!result) {
50385 - result = obj;
50386 - } else if (result == Py_None) {
50387 - Py_DECREF(result);
50388 - result = obj;
50389 - } else {
50390 - if (!PyTuple_Check(result)) {
50391 - o2 = result;
50392 - result = PyTuple_New(1);
50393 - PyTuple_SET_ITEM(result, 0, o2);
50394 - }
50395 - o3 = PyTuple_New(1);
50396 - PyTuple_SET_ITEM(o3, 0, obj);
50397 - o2 = result;
50398 - result = PySequence_Concat(o2, o3);
50399 - Py_DECREF(o2);
50400 - Py_DECREF(o3);
50401 - }
50402 - return result;
50403 -#endif
50404 -}
50405 -
50406 -/* Unpack the argument tuple */
50407 -
50408 -SWIGINTERN int
50409 -SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
50410 -{
50411 - if (!args) {
50412 - if (!min && !max) {
50413 - return 1;
50414 - } else {
50415 - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
50416 - name, (min == max ? "" : "at least "), (int)min);
50417 - return 0;
50418 - }
50419 - }
50420 - if (!PyTuple_Check(args)) {
50421 - if (min <= 1 && max >= 1) {
50422 - register int i;
50423 - objs[0] = args;
50424 - for (i = 1; i < max; ++i) {
50425 - objs[i] = 0;
50426 - }
50427 - return 2;
50428 - }
50429 - PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
50430 - return 0;
50431 - } else {
50432 - register Py_ssize_t l = PyTuple_GET_SIZE(args);
50433 - if (l < min) {
50434 - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
50435 - name, (min == max ? "" : "at least "), (int)min, (int)l);
50436 - return 0;
50437 - } else if (l > max) {
50438 - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
50439 - name, (min == max ? "" : "at most "), (int)max, (int)l);
50440 - return 0;
50441 - } else {
50442 - register int i;
50443 - for (i = 0; i < l; ++i) {
50444 - objs[i] = PyTuple_GET_ITEM(args, i);
50445 - }
50446 - for (; l < max; ++l) {
50447 - objs[l] = 0;
50448 - }
50449 - return i + 1;
50450 - }
50451 - }
50452 -}
50453 -
50454 -/* A functor is a function object with one single object argument */
50455 -#if PY_VERSION_HEX >= 0x02020000
50456 -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
50457 -#else
50458 -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
50459 -#endif
50460 -
50461 -/*
50462 - Helper for static pointer initialization for both C and C++ code, for example
50463 - static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
50464 -*/
50465 -#ifdef __cplusplus
50466 -#define SWIG_STATIC_POINTER(var) var
50467 -#else
50468 -#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
50469 -#endif
50470 -
50471 -/* -----------------------------------------------------------------------------
50472 - * Pointer declarations
50473 - * ----------------------------------------------------------------------------- */
50474 -
50475 -/* Flags for new pointer objects */
50476 -#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
50477 -#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
50478 -
50479 -#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
50480 -
50481 -#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
50482 -#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
50483 -
50484 -#ifdef __cplusplus
50485 -extern "C" {
50486 -#endif
50487 -
50488 -/* How to access Py_None */
50489 -#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
50490 -# ifndef SWIG_PYTHON_NO_BUILD_NONE
50491 -# ifndef SWIG_PYTHON_BUILD_NONE
50492 -# define SWIG_PYTHON_BUILD_NONE
50493 -# endif
50494 -# endif
50495 -#endif
50496 -
50497 -#ifdef SWIG_PYTHON_BUILD_NONE
50498 -# ifdef Py_None
50499 -# undef Py_None
50500 -# define Py_None SWIG_Py_None()
50501 -# endif
50502 -SWIGRUNTIMEINLINE PyObject *
50503 -_SWIG_Py_None(void)
50504 -{
50505 - PyObject *none = Py_BuildValue((char*)"");
50506 - Py_DECREF(none);
50507 - return none;
50508 -}
50509 -SWIGRUNTIME PyObject *
50510 -SWIG_Py_None(void)
50511 -{
50512 - static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
50513 - return none;
50514 -}
50515 -#endif
50516 -
50517 -/* The python void return value */
50518 -
50519 -SWIGRUNTIMEINLINE PyObject *
50520 -SWIG_Py_Void(void)
50521 -{
50522 - PyObject *none = Py_None;
50523 - Py_INCREF(none);
50524 - return none;
50525 -}
50526 -
50527 -/* SwigPyClientData */
50528 -
50529 -typedef struct {
50530 - PyObject *klass;
50531 - PyObject *newraw;
50532 - PyObject *newargs;
50533 - PyObject *destroy;
50534 - int delargs;
50535 - int implicitconv;
50536 - PyTypeObject *pytype;
50537 -} SwigPyClientData;
50538 -
50539 -SWIGRUNTIMEINLINE int
50540 -SWIG_Python_CheckImplicit(swig_type_info *ty)
50541 -{
50542 - SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
50543 - return data ? data->implicitconv : 0;
50544 -}
50545 -
50546 -SWIGRUNTIMEINLINE PyObject *
50547 -SWIG_Python_ExceptionType(swig_type_info *desc) {
50548 - SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
50549 - PyObject *klass = data ? data->klass : 0;
50550 - return (klass ? klass : PyExc_RuntimeError);
50551 -}
50552 -
50553 -
50554 -SWIGRUNTIME SwigPyClientData *
50555 -SwigPyClientData_New(PyObject* obj)
50556 -{
50557 - if (!obj) {
50558 - return 0;
50559 - } else {
50560 - SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
50561 - /* the klass element */
50562 - data->klass = obj;
50563 - Py_INCREF(data->klass);
50564 - /* the newraw method and newargs arguments used to create a new raw instance */
50565 - if (PyClass_Check(obj)) {
50566 - data->newraw = 0;
50567 - data->newargs = obj;
50568 - Py_INCREF(obj);
50569 - } else {
50570 -#if (PY_VERSION_HEX < 0x02020000)
50571 - data->newraw = 0;
50572 -#else
50573 - data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
50574 -#endif
50575 - if (data->newraw) {
50576 - Py_INCREF(data->newraw);
50577 - data->newargs = PyTuple_New(1);
50578 - PyTuple_SetItem(data->newargs, 0, obj);
50579 - } else {
50580 - data->newargs = obj;
50581 - }
50582 - Py_INCREF(data->newargs);
50583 - }
50584 - /* the destroy method, aka as the C++ delete method */
50585 - data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
50586 - if (PyErr_Occurred()) {
50587 - PyErr_Clear();
50588 - data->destroy = 0;
50589 - }
50590 - if (data->destroy) {
50591 - int flags;
50592 - Py_INCREF(data->destroy);
50593 - flags = PyCFunction_GET_FLAGS(data->destroy);
50594 -#ifdef METH_O
50595 - data->delargs = !(flags & (METH_O));
50596 -#else
50597 - data->delargs = 0;
50598 -#endif
50599 - } else {
50600 - data->delargs = 0;
50601 - }
50602 - data->implicitconv = 0;
50603 - data->pytype = 0;
50604 - return data;
50605 - }
50606 -}
50607 -
50608 -SWIGRUNTIME void
50609 -SwigPyClientData_Del(SwigPyClientData *data) {
50610 - Py_XDECREF(data->newraw);
50611 - Py_XDECREF(data->newargs);
50612 - Py_XDECREF(data->destroy);
50613 -}
50614 -
50615 -/* =============== SwigPyObject =====================*/
50616 -
50617 -typedef struct {
50618 - PyObject_HEAD
50619 - void *ptr;
50620 - swig_type_info *ty;
50621 - int own;
50622 - PyObject *next;
50623 -#ifdef SWIGPYTHON_BUILTIN
50624 - PyObject *dict;
50625 -#endif
50626 -} SwigPyObject;
50627 -
50628 -SWIGRUNTIME PyObject *
50629 -SwigPyObject_long(SwigPyObject *v)
50630 -{
50631 - return PyLong_FromVoidPtr(v->ptr);
50632 -}
50633 -
50634 -SWIGRUNTIME PyObject *
50635 -SwigPyObject_format(const char* fmt, SwigPyObject *v)
50636 -{
50637 - PyObject *res = NULL;
50638 - PyObject *args = PyTuple_New(1);
50639 - if (args) {
50640 - if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
50641 - PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
50642 - if (ofmt) {
50643 -#if PY_VERSION_HEX >= 0x03000000
50644 - res = PyUnicode_Format(ofmt,args);
50645 -#else
50646 - res = PyString_Format(ofmt,args);
50647 -#endif
50648 - Py_DECREF(ofmt);
50649 - }
50650 - Py_DECREF(args);
50651 - }
50652 - }
50653 - return res;
50654 -}
50655 -
50656 -SWIGRUNTIME PyObject *
50657 -SwigPyObject_oct(SwigPyObject *v)
50658 -{
50659 - return SwigPyObject_format("%o",v);
50660 -}
50661 -
50662 -SWIGRUNTIME PyObject *
50663 -SwigPyObject_hex(SwigPyObject *v)
50664 -{
50665 - return SwigPyObject_format("%x",v);
50666 -}
50667 -
50668 -SWIGRUNTIME PyObject *
50669 -#ifdef METH_NOARGS
50670 -SwigPyObject_repr(SwigPyObject *v)
50671 -#else
50672 -SwigPyObject_repr(SwigPyObject *v, PyObject *args)
50673 -#endif
50674 -{
50675 - const char *name = SWIG_TypePrettyName(v->ty);
50676 - PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
50677 - if (v->next) {
50678 -# ifdef METH_NOARGS
50679 - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
50680 -# else
50681 - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
50682 -# endif
50683 -# if PY_VERSION_HEX >= 0x03000000
50684 - PyObject *joined = PyUnicode_Concat(repr, nrep);
50685 - Py_DecRef(repr);
50686 - Py_DecRef(nrep);
50687 - repr = joined;
50688 -# else
50689 - PyString_ConcatAndDel(&repr,nrep);
50690 -# endif
50691 - }
50692 - return repr;
50693 -}
50694 -
50695 -SWIGRUNTIME int
50696 -SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
50697 -{
50698 - char *str;
50699 -#ifdef METH_NOARGS
50700 - PyObject *repr = SwigPyObject_repr(v);
50701 -#else
50702 - PyObject *repr = SwigPyObject_repr(v, NULL);
50703 -#endif
50704 - if (repr) {
50705 - str = SWIG_Python_str_AsChar(repr);
50706 - fputs(str, fp);
50707 - SWIG_Python_str_DelForPy3(str);
50708 - Py_DECREF(repr);
50709 - return 0;
50710 - } else {
50711 - return 1;
50712 - }
50713 -}
50714 -
50715 -SWIGRUNTIME PyObject *
50716 -SwigPyObject_str(SwigPyObject *v)
50717 -{
50718 - char result[SWIG_BUFFER_SIZE];
50719 - return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
50720 - SWIG_Python_str_FromChar(result) : 0;
50721 -}
50722 -
50723 -SWIGRUNTIME int
50724 -SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
50725 -{
50726 - void *i = v->ptr;
50727 - void *j = w->ptr;
50728 - return (i < j) ? -1 : ((i > j) ? 1 : 0);
50729 -}
50730 -
50731 -/* Added for Python 3.x, would it also be useful for Python 2.x? */
50732 -SWIGRUNTIME PyObject*
50733 -SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
50734 -{
50735 - PyObject* res;
50736 - if( op != Py_EQ && op != Py_NE ) {
50737 - Py_INCREF(Py_NotImplemented);
50738 - return Py_NotImplemented;
50739 - }
50740 - res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
50741 - return res;
50742 -}
50743 -
50744 -
50745 -SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
50746 -
50747 -#ifdef SWIGPYTHON_BUILTIN
50748 -static swig_type_info *SwigPyObject_stype = 0;
50749 -SWIGRUNTIME PyTypeObject*
50750 -SwigPyObject_type(void) {
50751 - SwigPyClientData *cd;
50752 - assert(SwigPyObject_stype);
50753 - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
50754 - assert(cd);
50755 - assert(cd->pytype);
50756 - return cd->pytype;
50757 -}
50758 -#else
50759 -SWIGRUNTIME PyTypeObject*
50760 -SwigPyObject_type(void) {
50761 - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
50762 - return type;
50763 -}
50764 -#endif
50765 -
50766 -SWIGRUNTIMEINLINE int
50767 -SwigPyObject_Check(PyObject *op) {
50768 -#ifdef SWIGPYTHON_BUILTIN
50769 - PyTypeObject *target_tp = SwigPyObject_type();
50770 - if (PyType_IsSubtype(op->ob_type, target_tp))
50771 - return 1;
50772 - return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
50773 -#else
50774 - return (Py_TYPE(op) == SwigPyObject_type())
50775 - || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
50776 -#endif
50777 -}
50778 -
50779 -SWIGRUNTIME PyObject *
50780 -SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
50781 -
50782 -SWIGRUNTIME void
50783 -SwigPyObject_dealloc(PyObject *v)
50784 -{
50785 - SwigPyObject *sobj = (SwigPyObject *) v;
50786 - PyObject *next = sobj->next;
50787 - if (sobj->own == SWIG_POINTER_OWN) {
50788 - swig_type_info *ty = sobj->ty;
50789 - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
50790 - PyObject *destroy = data ? data->destroy : 0;
50791 - if (destroy) {
50792 - /* destroy is always a VARARGS method */
50793 - PyObject *res;
50794 - if (data->delargs) {
50795 - /* we need to create a temporary object to carry the destroy operation */
50796 - PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
50797 - res = SWIG_Python_CallFunctor(destroy, tmp);
50798 - Py_DECREF(tmp);
50799 - } else {
50800 - PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
50801 - PyObject *mself = PyCFunction_GET_SELF(destroy);
50802 - res = ((*meth)(mself, v));
50803 - }
50804 - Py_XDECREF(res);
50805 - }
50806 -#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
50807 - else {
50808 - const char *name = SWIG_TypePrettyName(ty);
50809 - printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
50810 - }
50811 -#endif
50812 - }
50813 - Py_XDECREF(next);
50814 - PyObject_DEL(v);
50815 -}
50816 -
50817 -SWIGRUNTIME PyObject*
50818 -SwigPyObject_append(PyObject* v, PyObject* next)
50819 -{
50820 - SwigPyObject *sobj = (SwigPyObject *) v;
50821 -#ifndef METH_O
50822 - PyObject *tmp = 0;
50823 - if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
50824 - next = tmp;
50825 -#endif
50826 - if (!SwigPyObject_Check(next)) {
50827 - return NULL;
50828 - }
50829 - sobj->next = next;
50830 - Py_INCREF(next);
50831 - return SWIG_Py_Void();
50832 -}
50833 -
50834 -SWIGRUNTIME PyObject*
50835 -#ifdef METH_NOARGS
50836 -SwigPyObject_next(PyObject* v)
50837 -#else
50838 -SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
50839 -#endif
50840 -{
50841 - SwigPyObject *sobj = (SwigPyObject *) v;
50842 - if (sobj->next) {
50843 - Py_INCREF(sobj->next);
50844 - return sobj->next;
50845 - } else {
50846 - return SWIG_Py_Void();
50847 - }
50848 -}
50849 -
50850 -SWIGINTERN PyObject*
50851 -#ifdef METH_NOARGS
50852 -SwigPyObject_disown(PyObject *v)
50853 -#else
50854 -SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
50855 -#endif
50856 -{
50857 - SwigPyObject *sobj = (SwigPyObject *)v;
50858 - sobj->own = 0;
50859 - return SWIG_Py_Void();
50860 -}
50861 -
50862 -SWIGINTERN PyObject*
50863 -#ifdef METH_NOARGS
50864 -SwigPyObject_acquire(PyObject *v)
50865 -#else
50866 -SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
50867 -#endif
50868 -{
50869 - SwigPyObject *sobj = (SwigPyObject *)v;
50870 - sobj->own = SWIG_POINTER_OWN;
50871 - return SWIG_Py_Void();
50872 -}
50873 -
50874 -SWIGINTERN PyObject*
50875 -SwigPyObject_own(PyObject *v, PyObject *args)
50876 -{
50877 - PyObject *val = 0;
50878 -#if (PY_VERSION_HEX < 0x02020000)
50879 - if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
50880 -#elif (PY_VERSION_HEX < 0x02050000)
50881 - if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
50882 -#else
50883 - if (!PyArg_UnpackTuple(args, "own", 0, 1, &val))
50884 -#endif
50885 - {
50886 - return NULL;
50887 - }
50888 - else
50889 - {
50890 - SwigPyObject *sobj = (SwigPyObject *)v;
50891 - PyObject *obj = PyBool_FromLong(sobj->own);
50892 - if (val) {
50893 -#ifdef METH_NOARGS
50894 - if (PyObject_IsTrue(val)) {
50895 - SwigPyObject_acquire(v);
50896 - } else {
50897 - SwigPyObject_disown(v);
50898 - }
50899 -#else
50900 - if (PyObject_IsTrue(val)) {
50901 - SwigPyObject_acquire(v,args);
50902 - } else {
50903 - SwigPyObject_disown(v,args);
50904 - }
50905 -#endif
50906 - }
50907 - return obj;
50908 - }
50909 -}
50910 -
50911 -#ifdef METH_O
50912 -static PyMethodDef
50913 -swigobject_methods[] = {
50914 - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
50915 - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
50916 - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
50917 - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
50918 - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
50919 - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
50920 - {0, 0, 0, 0}
50921 -};
50922 -#else
50923 -static PyMethodDef
50924 -swigobject_methods[] = {
50925 - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
50926 - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
50927 - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
50928 - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
50929 - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
50930 - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
50931 - {0, 0, 0, 0}
50932 -};
50933 -#endif
50934 -
50935 -#if PY_VERSION_HEX < 0x02020000
50936 -SWIGINTERN PyObject *
50937 -SwigPyObject_getattr(SwigPyObject *sobj,char *name)
50938 -{
50939 - return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
50940 -}
50941 -#endif
50942 -
50943 -SWIGRUNTIME PyTypeObject*
50944 -SwigPyObject_TypeOnce(void) {
50945 - static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
50946 -
50947 - static PyNumberMethods SwigPyObject_as_number = {
50948 - (binaryfunc)0, /*nb_add*/
50949 - (binaryfunc)0, /*nb_subtract*/
50950 - (binaryfunc)0, /*nb_multiply*/
50951 - /* nb_divide removed in Python 3 */
50952 -#if PY_VERSION_HEX < 0x03000000
50953 - (binaryfunc)0, /*nb_divide*/
50954 -#endif
50955 - (binaryfunc)0, /*nb_remainder*/
50956 - (binaryfunc)0, /*nb_divmod*/
50957 - (ternaryfunc)0,/*nb_power*/
50958 - (unaryfunc)0, /*nb_negative*/
50959 - (unaryfunc)0, /*nb_positive*/
50960 - (unaryfunc)0, /*nb_absolute*/
50961 - (inquiry)0, /*nb_nonzero*/
50962 - 0, /*nb_invert*/
50963 - 0, /*nb_lshift*/
50964 - 0, /*nb_rshift*/
50965 - 0, /*nb_and*/
50966 - 0, /*nb_xor*/
50967 - 0, /*nb_or*/
50968 -#if PY_VERSION_HEX < 0x03000000
50969 - 0, /*nb_coerce*/
50970 -#endif
50971 - (unaryfunc)SwigPyObject_long, /*nb_int*/
50972 -#if PY_VERSION_HEX < 0x03000000
50973 - (unaryfunc)SwigPyObject_long, /*nb_long*/
50974 -#else
50975 - 0, /*nb_reserved*/
50976 -#endif
50977 - (unaryfunc)0, /*nb_float*/
50978 -#if PY_VERSION_HEX < 0x03000000
50979 - (unaryfunc)SwigPyObject_oct, /*nb_oct*/
50980 - (unaryfunc)SwigPyObject_hex, /*nb_hex*/
50981 -#endif
50982 -#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
50983 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
50984 -#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
50985 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
50986 -#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
50987 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
50988 -#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
50989 - 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
50990 -#endif
50991 - };
50992 -
50993 - static PyTypeObject swigpyobject_type;
50994 - static int type_init = 0;
50995 - if (!type_init) {
50996 - const PyTypeObject tmp = {
50997 - /* PyObject header changed in Python 3 */
50998 -#if PY_VERSION_HEX >= 0x03000000
50999 - PyVarObject_HEAD_INIT(NULL, 0)
51000 -#else
51001 - PyObject_HEAD_INIT(NULL)
51002 - 0, /* ob_size */
51003 -#endif
51004 - (char *)"SwigPyObject", /* tp_name */
51005 - sizeof(SwigPyObject), /* tp_basicsize */
51006 - 0, /* tp_itemsize */
51007 - (destructor)SwigPyObject_dealloc, /* tp_dealloc */
51008 - (printfunc)SwigPyObject_print, /* tp_print */
51009 -#if PY_VERSION_HEX < 0x02020000
51010 - (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
51011 -#else
51012 - (getattrfunc)0, /* tp_getattr */
51013 -#endif
51014 - (setattrfunc)0, /* tp_setattr */
51015 -#if PY_VERSION_HEX >= 0x03000000
51016 - 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
51017 -#else
51018 - (cmpfunc)SwigPyObject_compare, /* tp_compare */
51019 -#endif
51020 - (reprfunc)SwigPyObject_repr, /* tp_repr */
51021 - &SwigPyObject_as_number, /* tp_as_number */
51022 - 0, /* tp_as_sequence */
51023 - 0, /* tp_as_mapping */
51024 - (hashfunc)0, /* tp_hash */
51025 - (ternaryfunc)0, /* tp_call */
51026 - (reprfunc)SwigPyObject_str, /* tp_str */
51027 - PyObject_GenericGetAttr, /* tp_getattro */
51028 - 0, /* tp_setattro */
51029 - 0, /* tp_as_buffer */
51030 - Py_TPFLAGS_DEFAULT, /* tp_flags */
51031 - swigobject_doc, /* tp_doc */
51032 - 0, /* tp_traverse */
51033 - 0, /* tp_clear */
51034 - (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
51035 - 0, /* tp_weaklistoffset */
51036 -#if PY_VERSION_HEX >= 0x02020000
51037 - 0, /* tp_iter */
51038 - 0, /* tp_iternext */
51039 - swigobject_methods, /* tp_methods */
51040 - 0, /* tp_members */
51041 - 0, /* tp_getset */
51042 - 0, /* tp_base */
51043 - 0, /* tp_dict */
51044 - 0, /* tp_descr_get */
51045 - 0, /* tp_descr_set */
51046 - 0, /* tp_dictoffset */
51047 - 0, /* tp_init */
51048 - 0, /* tp_alloc */
51049 - 0, /* tp_new */
51050 - 0, /* tp_free */
51051 - 0, /* tp_is_gc */
51052 - 0, /* tp_bases */
51053 - 0, /* tp_mro */
51054 - 0, /* tp_cache */
51055 - 0, /* tp_subclasses */
51056 - 0, /* tp_weaklist */
51057 -#endif
51058 -#if PY_VERSION_HEX >= 0x02030000
51059 - 0, /* tp_del */
51060 -#endif
51061 -#if PY_VERSION_HEX >= 0x02060000
51062 - 0, /* tp_version */
51063 -#endif
51064 -#ifdef COUNT_ALLOCS
51065 - 0,0,0,0 /* tp_alloc -> tp_next */
51066 -#endif
51067 - };
51068 - swigpyobject_type = tmp;
51069 - type_init = 1;
51070 -#if PY_VERSION_HEX < 0x02020000
51071 - swigpyobject_type.ob_type = &PyType_Type;
51072 -#else
51073 - if (PyType_Ready(&swigpyobject_type) < 0)
51074 - return NULL;
51075 -#endif
51076 - }
51077 - return &swigpyobject_type;
51078 -}
51079 -
51080 -SWIGRUNTIME PyObject *
51081 -SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
51082 -{
51083 - SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
51084 - if (sobj) {
51085 - sobj->ptr = ptr;
51086 - sobj->ty = ty;
51087 - sobj->own = own;
51088 - sobj->next = 0;
51089 - }
51090 - return (PyObject *)sobj;
51091 -}
51092 -
51093 -/* -----------------------------------------------------------------------------
51094 - * Implements a simple Swig Packed type, and use it instead of string
51095 - * ----------------------------------------------------------------------------- */
51096 -
51097 -typedef struct {
51098 - PyObject_HEAD
51099 - void *pack;
51100 - swig_type_info *ty;
51101 - size_t size;
51102 -} SwigPyPacked;
51103 -
51104 -SWIGRUNTIME int
51105 -SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
51106 -{
51107 - char result[SWIG_BUFFER_SIZE];
51108 - fputs("<Swig Packed ", fp);
51109 - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
51110 - fputs("at ", fp);
51111 - fputs(result, fp);
51112 - }
51113 - fputs(v->ty->name,fp);
51114 - fputs(">", fp);
51115 - return 0;
51116 -}
51117 -
51118 -SWIGRUNTIME PyObject *
51119 -SwigPyPacked_repr(SwigPyPacked *v)
51120 -{
51121 - char result[SWIG_BUFFER_SIZE];
51122 - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
51123 - return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
51124 - } else {
51125 - return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
51126 - }
51127 -}
51128 -
51129 -SWIGRUNTIME PyObject *
51130 -SwigPyPacked_str(SwigPyPacked *v)
51131 -{
51132 - char result[SWIG_BUFFER_SIZE];
51133 - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
51134 - return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
51135 - } else {
51136 - return SWIG_Python_str_FromChar(v->ty->name);
51137 - }
51138 -}
51139 -
51140 -SWIGRUNTIME int
51141 -SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
51142 -{
51143 - size_t i = v->size;
51144 - size_t j = w->size;
51145 - int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
51146 - return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
51147 -}
51148 -
51149 -SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
51150 -
51151 -SWIGRUNTIME PyTypeObject*
51152 -SwigPyPacked_type(void) {
51153 - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
51154 - return type;
51155 -}
51156 -
51157 -SWIGRUNTIMEINLINE int
51158 -SwigPyPacked_Check(PyObject *op) {
51159 - return ((op)->ob_type == SwigPyPacked_TypeOnce())
51160 - || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
51161 -}
51162 -
51163 -SWIGRUNTIME void
51164 -SwigPyPacked_dealloc(PyObject *v)
51165 -{
51166 - if (SwigPyPacked_Check(v)) {
51167 - SwigPyPacked *sobj = (SwigPyPacked *) v;
51168 - free(sobj->pack);
51169 - }
51170 - PyObject_DEL(v);
51171 -}
51172 -
51173 -SWIGRUNTIME PyTypeObject*
51174 -SwigPyPacked_TypeOnce(void) {
51175 - static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
51176 - static PyTypeObject swigpypacked_type;
51177 - static int type_init = 0;
51178 - if (!type_init) {
51179 - const PyTypeObject tmp = {
51180 - /* PyObject header changed in Python 3 */
51181 -#if PY_VERSION_HEX>=0x03000000
51182 - PyVarObject_HEAD_INIT(NULL, 0)
51183 -#else
51184 - PyObject_HEAD_INIT(NULL)
51185 - 0, /* ob_size */
51186 -#endif
51187 - (char *)"SwigPyPacked", /* tp_name */
51188 - sizeof(SwigPyPacked), /* tp_basicsize */
51189 - 0, /* tp_itemsize */
51190 - (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
51191 - (printfunc)SwigPyPacked_print, /* tp_print */
51192 - (getattrfunc)0, /* tp_getattr */
51193 - (setattrfunc)0, /* tp_setattr */
51194 -#if PY_VERSION_HEX>=0x03000000
51195 - 0, /* tp_reserved in 3.0.1 */
51196 -#else
51197 - (cmpfunc)SwigPyPacked_compare, /* tp_compare */
51198 -#endif
51199 - (reprfunc)SwigPyPacked_repr, /* tp_repr */
51200 - 0, /* tp_as_number */
51201 - 0, /* tp_as_sequence */
51202 - 0, /* tp_as_mapping */
51203 - (hashfunc)0, /* tp_hash */
51204 - (ternaryfunc)0, /* tp_call */
51205 - (reprfunc)SwigPyPacked_str, /* tp_str */
51206 - PyObject_GenericGetAttr, /* tp_getattro */
51207 - 0, /* tp_setattro */
51208 - 0, /* tp_as_buffer */
51209 - Py_TPFLAGS_DEFAULT, /* tp_flags */
51210 - swigpacked_doc, /* tp_doc */
51211 - 0, /* tp_traverse */
51212 - 0, /* tp_clear */
51213 - 0, /* tp_richcompare */
51214 - 0, /* tp_weaklistoffset */
51215 -#if PY_VERSION_HEX >= 0x02020000
51216 - 0, /* tp_iter */
51217 - 0, /* tp_iternext */
51218 - 0, /* tp_methods */
51219 - 0, /* tp_members */
51220 - 0, /* tp_getset */
51221 - 0, /* tp_base */
51222 - 0, /* tp_dict */
51223 - 0, /* tp_descr_get */
51224 - 0, /* tp_descr_set */
51225 - 0, /* tp_dictoffset */
51226 - 0, /* tp_init */
51227 - 0, /* tp_alloc */
51228 - 0, /* tp_new */
51229 - 0, /* tp_free */
51230 - 0, /* tp_is_gc */
51231 - 0, /* tp_bases */
51232 - 0, /* tp_mro */
51233 - 0, /* tp_cache */
51234 - 0, /* tp_subclasses */
51235 - 0, /* tp_weaklist */
51236 -#endif
51237 -#if PY_VERSION_HEX >= 0x02030000
51238 - 0, /* tp_del */
51239 -#endif
51240 -#if PY_VERSION_HEX >= 0x02060000
51241 - 0, /* tp_version */
51242 -#endif
51243 -#ifdef COUNT_ALLOCS
51244 - 0,0,0,0 /* tp_alloc -> tp_next */
51245 -#endif
51246 - };
51247 - swigpypacked_type = tmp;
51248 - type_init = 1;
51249 -#if PY_VERSION_HEX < 0x02020000
51250 - swigpypacked_type.ob_type = &PyType_Type;
51251 -#else
51252 - if (PyType_Ready(&swigpypacked_type) < 0)
51253 - return NULL;
51254 -#endif
51255 - }
51256 - return &swigpypacked_type;
51257 -}
51258 -
51259 -SWIGRUNTIME PyObject *
51260 -SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
51261 -{
51262 - SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
51263 - if (sobj) {
51264 - void *pack = malloc(size);
51265 - if (pack) {
51266 - memcpy(pack, ptr, size);
51267 - sobj->pack = pack;
51268 - sobj->ty = ty;
51269 - sobj->size = size;
51270 - } else {
51271 - PyObject_DEL((PyObject *) sobj);
51272 - sobj = 0;
51273 - }
51274 - }
51275 - return (PyObject *) sobj;
51276 -}
51277 -
51278 -SWIGRUNTIME swig_type_info *
51279 -SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
51280 -{
51281 - if (SwigPyPacked_Check(obj)) {
51282 - SwigPyPacked *sobj = (SwigPyPacked *)obj;
51283 - if (sobj->size != size) return 0;
51284 - memcpy(ptr, sobj->pack, size);
51285 - return sobj->ty;
51286 - } else {
51287 - return 0;
51288 - }
51289 -}
51290 -
51291 -/* -----------------------------------------------------------------------------
51292 - * pointers/data manipulation
51293 - * ----------------------------------------------------------------------------- */
51294 -
51295 -SWIGRUNTIMEINLINE PyObject *
51296 -_SWIG_This(void)
51297 -{
51298 - return SWIG_Python_str_FromChar("this");
51299 -}
51300 -
51301 -static PyObject *swig_this = NULL;
51302 -
51303 -SWIGRUNTIME PyObject *
51304 -SWIG_This(void)
51305 -{
51306 - if (swig_this == NULL)
51307 - swig_this = _SWIG_This();
51308 - return swig_this;
51309 -}
51310 -
51311 -/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
51312 -
51313 -/* TODO: I don't know how to implement the fast getset in Python 3 right now */
51314 -#if PY_VERSION_HEX>=0x03000000
51315 -#define SWIG_PYTHON_SLOW_GETSET_THIS
51316 -#endif
51317 -
51318 -SWIGRUNTIME SwigPyObject *
51319 -SWIG_Python_GetSwigThis(PyObject *pyobj)
51320 -{
51321 - PyObject *obj;
51322 -
51323 - if (SwigPyObject_Check(pyobj))
51324 - return (SwigPyObject *) pyobj;
51325 -
51326 -#ifdef SWIGPYTHON_BUILTIN
51327 - (void)obj;
51328 -# ifdef PyWeakref_CheckProxy
51329 - if (PyWeakref_CheckProxy(pyobj)) {
51330 - pyobj = PyWeakref_GET_OBJECT(pyobj);
51331 - if (pyobj && SwigPyObject_Check(pyobj))
51332 - return (SwigPyObject*) pyobj;
51333 - }
51334 -# endif
51335 - return NULL;
51336 -#else
51337 -
51338 - obj = 0;
51339 -
51340 -#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
51341 - if (PyInstance_Check(pyobj)) {
51342 - obj = _PyInstance_Lookup(pyobj, SWIG_This());
51343 - } else {
51344 - PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
51345 - if (dictptr != NULL) {
51346 - PyObject *dict = *dictptr;
51347 - obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
51348 - } else {
51349 -#ifdef PyWeakref_CheckProxy
51350 - if (PyWeakref_CheckProxy(pyobj)) {
51351 - PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
51352 - return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
51353 - }
51354 -#endif
51355 - obj = PyObject_GetAttr(pyobj,SWIG_This());
51356 - if (obj) {
51357 - Py_DECREF(obj);
51358 - } else {
51359 - if (PyErr_Occurred()) PyErr_Clear();
51360 - return 0;
51361 - }
51362 - }
51363 - }
51364 -#else
51365 - obj = PyObject_GetAttr(pyobj,SWIG_This());
51366 - if (obj) {
51367 - Py_DECREF(obj);
51368 - } else {
51369 - if (PyErr_Occurred()) PyErr_Clear();
51370 - return 0;
51371 - }
51372 -#endif
51373 - if (obj && !SwigPyObject_Check(obj)) {
51374 - /* a PyObject is called 'this', try to get the 'real this'
51375 - SwigPyObject from it */
51376 - return SWIG_Python_GetSwigThis(obj);
51377 - }
51378 - return (SwigPyObject *)obj;
51379 -#endif
51380 -}
51381 -
51382 -/* Acquire a pointer value */
51383 -
51384 -SWIGRUNTIME int
51385 -SWIG_Python_AcquirePtr(PyObject *obj, int own) {
51386 - if (own == SWIG_POINTER_OWN) {
51387 - SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
51388 - if (sobj) {
51389 - int oldown = sobj->own;
51390 - sobj->own = own;
51391 - return oldown;
51392 - }
51393 - }
51394 - return 0;
51395 -}
51396 -
51397 -/* Convert a pointer value */
51398 -
51399 -SWIGRUNTIME int
51400 -SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
51401 - int res;
51402 - SwigPyObject *sobj;
51403 -
51404 - if (!obj)
51405 - return SWIG_ERROR;
51406 - if (obj == Py_None) {
51407 - if (ptr)
51408 - *ptr = 0;
51409 - return SWIG_OK;
51410 - }
51411 -
51412 - res = SWIG_ERROR;
51413 -
51414 - sobj = SWIG_Python_GetSwigThis(obj);
51415 - if (own)
51416 - *own = 0;
51417 - while (sobj) {
51418 - void *vptr = sobj->ptr;
51419 - if (ty) {
51420 - swig_type_info *to = sobj->ty;
51421 - if (to == ty) {
51422 - /* no type cast needed */
51423 - if (ptr) *ptr = vptr;
51424 - break;
51425 - } else {
51426 - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
51427 - if (!tc) {
51428 - sobj = (SwigPyObject *)sobj->next;
51429 - } else {
51430 - if (ptr) {
51431 - int newmemory = 0;
51432 - *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
51433 - if (newmemory == SWIG_CAST_NEW_MEMORY) {
51434 - assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
51435 - if (own)
51436 - *own = *own | SWIG_CAST_NEW_MEMORY;
51437 - }
51438 - }
51439 - break;
51440 - }
51441 - }
51442 - } else {
51443 - if (ptr) *ptr = vptr;
51444 - break;
51445 - }
51446 - }
51447 - if (sobj) {
51448 - if (own)
51449 - *own = *own | sobj->own;
51450 - if (flags & SWIG_POINTER_DISOWN) {
51451 - sobj->own = 0;
51452 - }
51453 - res = SWIG_OK;
51454 - } else {
51455 - if (flags & SWIG_POINTER_IMPLICIT_CONV) {
51456 - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
51457 - if (data && !data->implicitconv) {
51458 - PyObject *klass = data->klass;
51459 - if (klass) {
51460 - PyObject *impconv;
51461 - data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
51462 - impconv = SWIG_Python_CallFunctor(klass, obj);
51463 - data->implicitconv = 0;
51464 - if (PyErr_Occurred()) {
51465 - PyErr_Clear();
51466 - impconv = 0;
51467 - }
51468 - if (impconv) {
51469 - SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
51470 - if (iobj) {
51471 - void *vptr;
51472 - res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
51473 - if (SWIG_IsOK(res)) {
51474 - if (ptr) {
51475 - *ptr = vptr;
51476 - /* transfer the ownership to 'ptr' */
51477 - iobj->own = 0;
51478 - res = SWIG_AddCast(res);
51479 - res = SWIG_AddNewMask(res);
51480 - } else {
51481 - res = SWIG_AddCast(res);
51482 - }
51483 - }
51484 - }
51485 - Py_DECREF(impconv);
51486 - }
51487 - }
51488 - }
51489 - }
51490 - }
51491 - return res;
51492 -}
51493 -
51494 -/* Convert a function ptr value */
51495 -
51496 -SWIGRUNTIME int
51497 -SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
51498 - if (!PyCFunction_Check(obj)) {
51499 - return SWIG_ConvertPtr(obj, ptr, ty, 0);
51500 - } else {
51501 - void *vptr = 0;
51502 -
51503 - /* here we get the method pointer for callbacks */
51504 - const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
51505 - const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
51506 - if (desc)
51507 - desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
51508 - if (!desc)
51509 - return SWIG_ERROR;
51510 - if (ty) {
51511 - swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
51512 - if (tc) {
51513 - int newmemory = 0;
51514 - *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
51515 - assert(!newmemory); /* newmemory handling not yet implemented */
51516 - } else {
51517 - return SWIG_ERROR;
51518 - }
51519 - } else {
51520 - *ptr = vptr;
51521 - }
51522 - return SWIG_OK;
51523 - }
51524 -}
51525 -
51526 -/* Convert a packed value value */
51527 -
51528 -SWIGRUNTIME int
51529 -SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
51530 - swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
51531 - if (!to) return SWIG_ERROR;
51532 - if (ty) {
51533 - if (to != ty) {
51534 - /* check type cast? */
51535 - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
51536 - if (!tc) return SWIG_ERROR;
51537 - }
51538 - }
51539 - return SWIG_OK;
51540 -}
51541 -
51542 -/* -----------------------------------------------------------------------------
51543 - * Create a new pointer object
51544 - * ----------------------------------------------------------------------------- */
51545 -
51546 -/*
51547 - Create a new instance object, without calling __init__, and set the
51548 - 'this' attribute.
51549 -*/
51550 -
51551 -SWIGRUNTIME PyObject*
51552 -SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
51553 -{
51554 -#if (PY_VERSION_HEX >= 0x02020000)
51555 - PyObject *inst = 0;
51556 - PyObject *newraw = data->newraw;
51557 - if (newraw) {
51558 - inst = PyObject_Call(newraw, data->newargs, NULL);
51559 - if (inst) {
51560 -#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
51561 - PyObject **dictptr = _PyObject_GetDictPtr(inst);
51562 - if (dictptr != NULL) {
51563 - PyObject *dict = *dictptr;
51564 - if (dict == NULL) {
51565 - dict = PyDict_New();
51566 - *dictptr = dict;
51567 - PyDict_SetItem(dict, SWIG_This(), swig_this);
51568 - }
51569 - }
51570 -#else
51571 - PyObject *key = SWIG_This();
51572 - PyObject_SetAttr(inst, key, swig_this);
51573 -#endif
51574 - }
51575 - } else {
51576 -#if PY_VERSION_HEX >= 0x03000000
51577 - inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
51578 - if (inst) {
51579 - PyObject_SetAttr(inst, SWIG_This(), swig_this);
51580 - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
51581 - }
51582 -#else
51583 - PyObject *dict = PyDict_New();
51584 - if (dict) {
51585 - PyDict_SetItem(dict, SWIG_This(), swig_this);
51586 - inst = PyInstance_NewRaw(data->newargs, dict);
51587 - Py_DECREF(dict);
51588 - }
51589 -#endif
51590 - }
51591 - return inst;
51592 -#else
51593 -#if (PY_VERSION_HEX >= 0x02010000)
51594 - PyObject *inst = 0;
51595 - PyObject *dict = PyDict_New();
51596 - if (dict) {
51597 - PyDict_SetItem(dict, SWIG_This(), swig_this);
51598 - inst = PyInstance_NewRaw(data->newargs, dict);
51599 - Py_DECREF(dict);
51600 - }
51601 - return (PyObject *) inst;
51602 -#else
51603 - PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
51604 - if (inst == NULL) {
51605 - return NULL;
51606 - }
51607 - inst->in_class = (PyClassObject *)data->newargs;
51608 - Py_INCREF(inst->in_class);
51609 - inst->in_dict = PyDict_New();
51610 - if (inst->in_dict == NULL) {
51611 - Py_DECREF(inst);
51612 - return NULL;
51613 - }
51614 -#ifdef Py_TPFLAGS_HAVE_WEAKREFS
51615 - inst->in_weakreflist = NULL;
51616 -#endif
51617 -#ifdef Py_TPFLAGS_GC
51618 - PyObject_GC_Init(inst);
51619 -#endif
51620 - PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
51621 - return (PyObject *) inst;
51622 -#endif
51623 -#endif
51624 -}
51625 -
51626 -SWIGRUNTIME void
51627 -SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
51628 -{
51629 - PyObject *dict;
51630 -#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
51631 - PyObject **dictptr = _PyObject_GetDictPtr(inst);
51632 - if (dictptr != NULL) {
51633 - dict = *dictptr;
51634 - if (dict == NULL) {
51635 - dict = PyDict_New();
51636 - *dictptr = dict;
51637 - }
51638 - PyDict_SetItem(dict, SWIG_This(), swig_this);
51639 - return;
51640 - }
51641 -#endif
51642 - dict = PyObject_GetAttrString(inst, (char*)"__dict__");
51643 - PyDict_SetItem(dict, SWIG_This(), swig_this);
51644 - Py_DECREF(dict);
51645 -}
51646 -
51647 -
51648 -SWIGINTERN PyObject *
51649 -SWIG_Python_InitShadowInstance(PyObject *args) {
51650 - PyObject *obj[2];
51651 - if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
51652 - return NULL;
51653 - } else {
51654 - SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
51655 - if (sthis) {
51656 - SwigPyObject_append((PyObject*) sthis, obj[1]);
51657 - } else {
51658 - SWIG_Python_SetSwigThis(obj[0], obj[1]);
51659 - }
51660 - return SWIG_Py_Void();
51661 - }
51662 -}
51663 -
51664 -/* Create a new pointer object */
51665 -
51666 -SWIGRUNTIME PyObject *
51667 -SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
51668 - SwigPyClientData *clientdata;
51669 - PyObject * robj;
51670 - int own;
51671 -
51672 - if (!ptr)
51673 - return SWIG_Py_Void();
51674 -
51675 - clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
51676 - own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
51677 - if (clientdata && clientdata->pytype) {
51678 - SwigPyObject *newobj;
51679 - if (flags & SWIG_BUILTIN_TP_INIT) {
51680 - newobj = (SwigPyObject*) self;
51681 - if (newobj->ptr) {
51682 - PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
51683 - while (newobj->next)
51684 - newobj = (SwigPyObject *) newobj->next;
51685 - newobj->next = next_self;
51686 - newobj = (SwigPyObject *)next_self;
51687 - }
51688 - } else {
51689 - newobj = PyObject_New(SwigPyObject, clientdata->pytype);
51690 - }
51691 - if (newobj) {
51692 - newobj->ptr = ptr;
51693 - newobj->ty = type;
51694 - newobj->own = own;
51695 - newobj->next = 0;
51696 -#ifdef SWIGPYTHON_BUILTIN
51697 - newobj->dict = 0;
51698 -#endif
51699 - return (PyObject*) newobj;
51700 - }
51701 - return SWIG_Py_Void();
51702 - }
51703 -
51704 - assert(!(flags & SWIG_BUILTIN_TP_INIT));
51705 -
51706 - robj = SwigPyObject_New(ptr, type, own);
51707 - if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
51708 - PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
51709 - Py_DECREF(robj);
51710 - robj = inst;
51711 - }
51712 - return robj;
51713 -}
51714 -
51715 -/* Create a new packed object */
51716 -
51717 -SWIGRUNTIMEINLINE PyObject *
51718 -SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
51719 - return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
51720 -}
51721 -
51722 -/* -----------------------------------------------------------------------------*
51723 - * Get type list
51724 - * -----------------------------------------------------------------------------*/
51725 -
51726 -#ifdef SWIG_LINK_RUNTIME
51727 -void *SWIG_ReturnGlobalTypeList(void *);
51728 -#endif
51729 -
51730 -SWIGRUNTIME swig_module_info *
51731 -SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
51732 - static void *type_pointer = (void *)0;
51733 - /* first check if module already created */
51734 - if (!type_pointer) {
51735 -#ifdef SWIG_LINK_RUNTIME
51736 - type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
51737 -#else
51738 -# ifdef SWIGPY_USE_CAPSULE
51739 - type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
51740 -# else
51741 - type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
51742 - (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
51743 -# endif
51744 - if (PyErr_Occurred()) {
51745 - PyErr_Clear();
51746 - type_pointer = (void *)0;
51747 - }
51748 -#endif
51749 - }
51750 - return (swig_module_info *) type_pointer;
51751 -}
51752 -
51753 -#if PY_MAJOR_VERSION < 2
51754 -/* PyModule_AddObject function was introduced in Python 2.0. The following function
51755 - is copied out of Python/modsupport.c in python version 2.3.4 */
51756 -SWIGINTERN int
51757 -PyModule_AddObject(PyObject *m, char *name, PyObject *o)
51758 -{
51759 - PyObject *dict;
51760 - if (!PyModule_Check(m)) {
51761 - PyErr_SetString(PyExc_TypeError,
51762 - "PyModule_AddObject() needs module as first arg");
51763 - return SWIG_ERROR;
51764 - }
51765 - if (!o) {
51766 - PyErr_SetString(PyExc_TypeError,
51767 - "PyModule_AddObject() needs non-NULL value");
51768 - return SWIG_ERROR;
51769 - }
51770 -
51771 - dict = PyModule_GetDict(m);
51772 - if (dict == NULL) {
51773 - /* Internal error -- modules must have a dict! */
51774 - PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
51775 - PyModule_GetName(m));
51776 - return SWIG_ERROR;
51777 - }
51778 - if (PyDict_SetItemString(dict, name, o))
51779 - return SWIG_ERROR;
51780 - Py_DECREF(o);
51781 - return SWIG_OK;
51782 -}
51783 -#endif
51784 -
51785 -SWIGRUNTIME void
51786 -#ifdef SWIGPY_USE_CAPSULE
51787 -SWIG_Python_DestroyModule(PyObject *obj)
51788 -#else
51789 -SWIG_Python_DestroyModule(void *vptr)
51790 -#endif
51791 -{
51792 -#ifdef SWIGPY_USE_CAPSULE
51793 - swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
51794 -#else
51795 - swig_module_info *swig_module = (swig_module_info *) vptr;
51796 -#endif
51797 - swig_type_info **types = swig_module->types;
51798 - size_t i;
51799 - for (i =0; i < swig_module->size; ++i) {
51800 - swig_type_info *ty = types[i];
51801 - if (ty->owndata) {
51802 - SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
51803 - if (data) SwigPyClientData_Del(data);
51804 - }
51805 - }
51806 - Py_DECREF(SWIG_This());
51807 - swig_this = NULL;
51808 -}
51809 -
51810 -SWIGRUNTIME void
51811 -SWIG_Python_SetModule(swig_module_info *swig_module) {
51812 -#if PY_VERSION_HEX >= 0x03000000
51813 - /* Add a dummy module object into sys.modules */
51814 - PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
51815 -#else
51816 - static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
51817 - PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
51818 -#endif
51819 -#ifdef SWIGPY_USE_CAPSULE
51820 - PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
51821 - if (pointer && module) {
51822 - PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
51823 - } else {
51824 - Py_XDECREF(pointer);
51825 - }
51826 -#else
51827 - PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
51828 - if (pointer && module) {
51829 - PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
51830 - } else {
51831 - Py_XDECREF(pointer);
51832 - }
51833 -#endif
51834 -}
51835 -
51836 -/* The python cached type query */
51837 -SWIGRUNTIME PyObject *
51838 -SWIG_Python_TypeCache(void) {
51839 - static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
51840 - return cache;
51841 -}
51842 -
51843 -SWIGRUNTIME swig_type_info *
51844 -SWIG_Python_TypeQuery(const char *type)
51845 -{
51846 - PyObject *cache = SWIG_Python_TypeCache();
51847 - PyObject *key = SWIG_Python_str_FromChar(type);
51848 - PyObject *obj = PyDict_GetItem(cache, key);
51849 - swig_type_info *descriptor;
51850 - if (obj) {
51851 -#ifdef SWIGPY_USE_CAPSULE
51852 - descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
51853 -#else
51854 - descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
51855 -#endif
51856 - } else {
51857 - swig_module_info *swig_module = SWIG_GetModule(0);
51858 - descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
51859 - if (descriptor) {
51860 -#ifdef SWIGPY_USE_CAPSULE
51861 - obj = PyCapsule_New((void*) descriptor, NULL, NULL);
51862 -#else
51863 - obj = PyCObject_FromVoidPtr(descriptor, NULL);
51864 -#endif
51865 - PyDict_SetItem(cache, key, obj);
51866 - Py_DECREF(obj);
51867 - }
51868 - }
51869 - Py_DECREF(key);
51870 - return descriptor;
51871 -}
51872 -
51873 -/*
51874 - For backward compatibility only
51875 -*/
51876 -#define SWIG_POINTER_EXCEPTION 0
51877 -#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
51878 -#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
51879 -
51880 -SWIGRUNTIME int
51881 -SWIG_Python_AddErrMesg(const char* mesg, int infront)
51882 -{
51883 - if (PyErr_Occurred()) {
51884 - PyObject *type = 0;
51885 - PyObject *value = 0;
51886 - PyObject *traceback = 0;
51887 - PyErr_Fetch(&type, &value, &traceback);
51888 - if (value) {
51889 - char *tmp;
51890 - PyObject *old_str = PyObject_Str(value);
51891 - Py_XINCREF(type);
51892 - PyErr_Clear();
51893 - if (infront) {
51894 - PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
51895 - } else {
51896 - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
51897 - }
51898 - SWIG_Python_str_DelForPy3(tmp);
51899 - Py_DECREF(old_str);
51900 - }
51901 - return 1;
51902 - } else {
51903 - return 0;
51904 - }
51905 -}
51906 -
51907 -SWIGRUNTIME int
51908 -SWIG_Python_ArgFail(int argnum)
51909 -{
51910 - if (PyErr_Occurred()) {
51911 - /* add information about failing argument */
51912 - char mesg[256];
51913 - PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
51914 - return SWIG_Python_AddErrMesg(mesg, 1);
51915 - } else {
51916 - return 0;
51917 - }
51918 -}
51919 -
51920 -SWIGRUNTIMEINLINE const char *
51921 -SwigPyObject_GetDesc(PyObject *self)
51922 -{
51923 - SwigPyObject *v = (SwigPyObject *)self;
51924 - swig_type_info *ty = v ? v->ty : 0;
51925 - return ty ? ty->str : "";
51926 -}
51927 -
51928 -SWIGRUNTIME void
51929 -SWIG_Python_TypeError(const char *type, PyObject *obj)
51930 -{
51931 - if (type) {
51932 -#if defined(SWIG_COBJECT_TYPES)
51933 - if (obj && SwigPyObject_Check(obj)) {
51934 - const char *otype = (const char *) SwigPyObject_GetDesc(obj);
51935 - if (otype) {
51936 - PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
51937 - type, otype);
51938 - return;
51939 - }
51940 - } else
51941 -#endif
51942 - {
51943 - const char *otype = (obj ? obj->ob_type->tp_name : 0);
51944 - if (otype) {
51945 - PyObject *str = PyObject_Str(obj);
51946 - const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
51947 - if (cstr) {
51948 - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
51949 - type, otype, cstr);
51950 - SWIG_Python_str_DelForPy3(cstr);
51951 - } else {
51952 - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
51953 - type, otype);
51954 - }
51955 - Py_XDECREF(str);
51956 - return;
51957 - }
51958 - }
51959 - PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
51960 - } else {
51961 - PyErr_Format(PyExc_TypeError, "unexpected type is received");
51962 - }
51963 -}
51964 -
51965 -
51966 -/* Convert a pointer value, signal an exception on a type mismatch */
51967 -SWIGRUNTIME void *
51968 -SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
51969 - void *result;
51970 - if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
51971 - PyErr_Clear();
51972 -#if SWIG_POINTER_EXCEPTION
51973 - if (flags) {
51974 - SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
51975 - SWIG_Python_ArgFail(argnum);
51976 - }
51977 -#endif
51978 - }
51979 - return result;
51980 -}
51981 -
51982 -#ifdef SWIGPYTHON_BUILTIN
51983 -SWIGRUNTIME int
51984 -SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
51985 - PyTypeObject *tp = obj->ob_type;
51986 - PyObject *descr;
51987 - PyObject *encoded_name;
51988 - descrsetfunc f;
51989 - int res;
51990 -
51991 -# ifdef Py_USING_UNICODE
51992 - if (PyString_Check(name)) {
51993 - name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
51994 - if (!name)
51995 - return -1;
51996 - } else if (!PyUnicode_Check(name))
51997 -# else
51998 - if (!PyString_Check(name))
51999 -# endif
52000 - {
52001 - PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
52002 - return -1;
52003 - } else {
52004 - Py_INCREF(name);
52005 - }
52006 -
52007 - if (!tp->tp_dict) {
52008 - if (PyType_Ready(tp) < 0)
52009 - goto done;
52010 - }
52011 -
52012 - res = -1;
52013 - descr = _PyType_Lookup(tp, name);
52014 - f = NULL;
52015 - if (descr != NULL)
52016 - f = descr->ob_type->tp_descr_set;
52017 - if (!f) {
52018 - if (PyString_Check(name)) {
52019 - encoded_name = name;
52020 - Py_INCREF(name);
52021 - } else {
52022 - encoded_name = PyUnicode_AsUTF8String(name);
52023 - }
52024 - PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
52025 - Py_DECREF(encoded_name);
52026 - } else {
52027 - res = f(descr, obj, value);
52028 - }
52029 -
52030 - done:
52031 - Py_DECREF(name);
52032 - return res;
52033 -}
52034 -#endif
52035 -
52036 -
52037 -#ifdef __cplusplus
52038 -}
52039 -#endif
52040 -
52041 -
52042 -
52043 -#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
52044 -
52045 -#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
52046 -
52047 -
52048 -
52049 - #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
52050 -
52051 -
52052 -/* -------- TYPES TABLE (BEGIN) -------- */
52053 -
52054 -#define SWIGTYPE_p_GType swig_types[0]
52055 -#define SWIGTYPE_p_VBuffer swig_types[1]
52056 -#define SWIGTYPE_p__VipsImage swig_types[2]
52057 -#define SWIGTYPE_p_allocator_type swig_types[3]
52058 -#define SWIGTYPE_p_char swig_types[4]
52059 -#define SWIGTYPE_p_difference_type swig_types[5]
52060 -#define SWIGTYPE_p_double swig_types[6]
52061 -#define SWIGTYPE_p_float swig_types[7]
52062 -#define SWIGTYPE_p_gboolean swig_types[8]
52063 -#define SWIGTYPE_p_int swig_types[9]
52064 -#define SWIGTYPE_p_matrix swig_types[10]
52065 -#define SWIGTYPE_p_p_PyObject swig_types[11]
52066 -#define SWIGTYPE_p_p_char swig_types[12]
52067 -#define SWIGTYPE_p_size_t swig_types[13]
52068 -#define SWIGTYPE_p_size_type swig_types[14]
52069 -#define SWIGTYPE_p_std__allocatorT_double_t swig_types[15]
52070 -#define SWIGTYPE_p_std__allocatorT_int_t swig_types[16]
52071 -#define SWIGTYPE_p_std__allocatorT_vips__VImage_t swig_types[17]
52072 -#define SWIGTYPE_p_std__invalid_argument swig_types[18]
52073 -#define SWIGTYPE_p_std__vectorT__Tp__Alloc_t swig_types[19]
52074 -#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[20]
52075 -#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[21]
52076 -#define SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t swig_types[22]
52077 -#define SWIGTYPE_p_swig__SwigPyIterator swig_types[23]
52078 -#define SWIGTYPE_p_value_type swig_types[24]
52079 -#define SWIGTYPE_p_vips__VDMask swig_types[25]
52080 -#define SWIGTYPE_p_vips__VDisplay swig_types[26]
52081 -#define SWIGTYPE_p_vips__VError swig_types[27]
52082 -#define SWIGTYPE_p_vips__VIMask swig_types[28]
52083 -#define SWIGTYPE_p_vips__VImage swig_types[29]
52084 -#define SWIGTYPE_p_void swig_types[30]
52085 -static swig_type_info *swig_types[32];
52086 -static swig_module_info swig_module = {swig_types, 31, 0, 0, 0, 0};
52087 -#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
52088 -#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
52089 -
52090 -/* -------- TYPES TABLE (END) -------- */
52091 -
52092 -#if (PY_VERSION_HEX <= 0x02000000)
52093 -# if !defined(SWIG_PYTHON_CLASSIC)
52094 -# error "This python version requires swig to be run with the '-classic' option"
52095 -# endif
52096 -#endif
52097 -
52098 -/*-----------------------------------------------
52099 - @(target):= vimagemodule.so
52100 - ------------------------------------------------*/
52101 -#if PY_VERSION_HEX >= 0x03000000
52102 -# define SWIG_init PyInit_vimagemodule
52103 -
52104 -#else
52105 -# define SWIG_init initvimagemodule
52106 -
52107 -#endif
52108 -#define SWIG_name "vimagemodule"
52109 -
52110 -#define SWIGVERSION 0x020010
52111 -#define SWIG_VERSION SWIGVERSION
52112 -
52113 -
52114 -#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
52115 -#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
52116 -
52117 -
52118 -#include <stdexcept>
52119 -
52120 -
52121 -namespace swig {
52122 - class SwigPtr_PyObject {
52123 - protected:
52124 - PyObject *_obj;
52125 -
52126 - public:
52127 - SwigPtr_PyObject() :_obj(0)
52128 - {
52129 - }
52130 -
52131 - SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
52132 - {
52133 - Py_XINCREF(_obj);
52134 - }
52135 -
52136 - SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
52137 - {
52138 - if (initial_ref) {
52139 - Py_XINCREF(_obj);
52140 - }
52141 - }
52142 -
52143 - SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
52144 - {
52145 - Py_XINCREF(item._obj);
52146 - Py_XDECREF(_obj);
52147 - _obj = item._obj;
52148 - return *this;
52149 - }
52150 -
52151 - ~SwigPtr_PyObject()
52152 - {
52153 - Py_XDECREF(_obj);
52154 - }
52155 -
52156 - operator PyObject *() const
52157 - {
52158 - return _obj;
52159 - }
52160 -
52161 - PyObject *operator->() const
52162 - {
52163 - return _obj;
52164 - }
52165 - };
52166 -}
52167 -
52168 -
52169 -namespace swig {
52170 - struct SwigVar_PyObject : SwigPtr_PyObject {
52171 - SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
52172 -
52173 - SwigVar_PyObject & operator = (PyObject* obj)
52174 - {
52175 - Py_XDECREF(_obj);
52176 - _obj = obj;
52177 - return *this;
52178 - }
52179 - };
52180 -}
52181 -
52182 -
52183 -#include <vips/vipscpp.h>
52184 -
52185 -/* We need the C API too for the args init and some of the
52186 - * frombuffer/tobuffer stuff.
52187 - */
52188 -#include <vips/vips.h>
52189 -
52190 -
52191 -#include <iostream>
52192 -
52193 -#if PY_VERSION_HEX >= 0x03020000
52194 -# define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj))
52195 -#else
52196 -# define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj))
52197 -#endif
52198 -
52199 -
52200 -#include <stdexcept>
52201 -
52202 -
52203 -#if defined(__GNUC__)
52204 -# if __GNUC__ == 2 && __GNUC_MINOR <= 96
52205 -# define SWIG_STD_NOMODERN_STL
52206 -# endif
52207 -#endif
52208 -
52209 -
52210 -#include <string>
52211 -#include <stdexcept>
52212 -#include <stddef.h>
52213 -
52214 -
52215 - #include <stddef.h>
52216 -
52217 -
52218 -namespace swig {
52219 - struct stop_iteration {
52220 - };
52221 -
52222 - struct SwigPyIterator {
52223 - private:
52224 - SwigPtr_PyObject _seq;
52225 -
52226 - protected:
52227 - SwigPyIterator(PyObject *seq) : _seq(seq)
52228 - {
52229 - }
52230 -
52231 - public:
52232 - virtual ~SwigPyIterator() {}
52233 -
52234 - // Access iterator method, required by Python
52235 - virtual PyObject *value() const = 0;
52236 -
52237 - // Forward iterator method, required by Python
52238 - virtual SwigPyIterator *incr(size_t n = 1) = 0;
52239 -
52240 - // Backward iterator method, very common in C++, but not required in Python
52241 - virtual SwigPyIterator *decr(size_t /*n*/ = 1)
52242 - {
52243 - throw stop_iteration();
52244 - }
52245 -
52246 - // Random access iterator methods, but not required in Python
52247 - virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
52248 - {
52249 - throw std::invalid_argument("operation not supported");
52250 - }
52251 -
52252 - virtual bool equal (const SwigPyIterator &/*x*/) const
52253 - {
52254 - throw std::invalid_argument("operation not supported");
52255 - }
52256 -
52257 - // C++ common/needed methods
52258 - virtual SwigPyIterator *copy() const = 0;
52259 -
52260 - PyObject *next()
52261 - {
52262 - SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads
52263 - PyObject *obj = value();
52264 - incr();
52265 - SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
52266 - return obj;
52267 - }
52268 -
52269 - /* Make an alias for Python 3.x */
52270 - PyObject *__next__()
52271 - {
52272 - return next();
52273 - }
52274 -
52275 - PyObject *previous()
52276 - {
52277 - SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads
52278 - decr();
52279 - PyObject *obj = value();
52280 - SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
52281 - return obj;
52282 - }
52283 -
52284 - SwigPyIterator *advance(ptrdiff_t n)
52285 - {
52286 - return (n > 0) ? incr(n) : decr(-n);
52287 - }
52288 -
52289 - bool operator == (const SwigPyIterator& x) const
52290 - {
52291 - return equal(x);
52292 - }
52293 -
52294 - bool operator != (const SwigPyIterator& x) const
52295 - {
52296 - return ! operator==(x);
52297 - }
52298 -
52299 - SwigPyIterator& operator += (ptrdiff_t n)
52300 - {
52301 - return *advance(n);
52302 - }
52303 -
52304 - SwigPyIterator& operator -= (ptrdiff_t n)
52305 - {
52306 - return *advance(-n);
52307 - }
52308 -
52309 - SwigPyIterator* operator + (ptrdiff_t n) const
52310 - {
52311 - return copy()->advance(n);
52312 - }
52313 -
52314 - SwigPyIterator* operator - (ptrdiff_t n) const
52315 - {
52316 - return copy()->advance(-n);
52317 - }
52318 -
52319 - ptrdiff_t operator - (const SwigPyIterator& x) const
52320 - {
52321 - return x.distance(*this);
52322 - }
52323 -
52324 - static swig_type_info* descriptor() {
52325 - static int init = 0;
52326 - static swig_type_info* desc = 0;
52327 - if (!init) {
52328 - desc = SWIG_TypeQuery("swig::SwigPyIterator *");
52329 - init = 1;
52330 - }
52331 - return desc;
52332 - }
52333 - };
52334 -
52335 -#if defined(SWIGPYTHON_BUILTIN)
52336 - inline PyObject* make_output_iterator_builtin (PyObject *pyself)
52337 - {
52338 - Py_INCREF(pyself);
52339 - return pyself;
52340 - }
52341 -#endif
52342 -}
52343 -
52344 -
52345 -SWIGINTERN int
52346 -SWIG_AsVal_double (PyObject *obj, double *val)
52347 -{
52348 - int res = SWIG_TypeError;
52349 - if (PyFloat_Check(obj)) {
52350 - if (val) *val = PyFloat_AsDouble(obj);
52351 - return SWIG_OK;
52352 - } else if (PyInt_Check(obj)) {
52353 - if (val) *val = PyInt_AsLong(obj);
52354 - return SWIG_OK;
52355 - } else if (PyLong_Check(obj)) {
52356 - double v = PyLong_AsDouble(obj);
52357 - if (!PyErr_Occurred()) {
52358 - if (val) *val = v;
52359 - return SWIG_OK;
52360 - } else {
52361 - PyErr_Clear();
52362 - }
52363 - }
52364 -#ifdef SWIG_PYTHON_CAST_MODE
52365 - {
52366 - int dispatch = 0;
52367 - double d = PyFloat_AsDouble(obj);
52368 - if (!PyErr_Occurred()) {
52369 - if (val) *val = d;
52370 - return SWIG_AddCast(SWIG_OK);
52371 - } else {
52372 - PyErr_Clear();
52373 - }
52374 - if (!dispatch) {
52375 - long v = PyLong_AsLong(obj);
52376 - if (!PyErr_Occurred()) {
52377 - if (val) *val = v;
52378 - return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
52379 - } else {
52380 - PyErr_Clear();
52381 - }
52382 - }
52383 - }
52384 -#endif
52385 - return res;
52386 -}
52387 -
52388 -
52389 -#include <float.h>
52390 -
52391 -
52392 -#include <math.h>
52393 -
52394 -
52395 -SWIGINTERNINLINE int
52396 -SWIG_CanCastAsInteger(double *d, double min, double max) {
52397 - double x = *d;
52398 - if ((min <= x && x <= max)) {
52399 - double fx = floor(x);
52400 - double cx = ceil(x);
52401 - double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
52402 - if ((errno == EDOM) || (errno == ERANGE)) {
52403 - errno = 0;
52404 - } else {
52405 - double summ, reps, diff;
52406 - if (rd < x) {
52407 - diff = x - rd;
52408 - } else if (rd > x) {
52409 - diff = rd - x;
52410 - } else {
52411 - return 1;
52412 - }
52413 - summ = rd + x;
52414 - reps = diff/summ;
52415 - if (reps < 8*DBL_EPSILON) {
52416 - *d = rd;
52417 - return 1;
52418 - }
52419 - }
52420 - }
52421 - return 0;
52422 -}
52423 -
52424 -
52425 -SWIGINTERN int
52426 -SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
52427 -{
52428 -#if PY_VERSION_HEX < 0x03000000
52429 - if (PyInt_Check(obj)) {
52430 - long v = PyInt_AsLong(obj);
52431 - if (v >= 0) {
52432 - if (val) *val = v;
52433 - return SWIG_OK;
52434 - } else {
52435 - return SWIG_OverflowError;
52436 - }
52437 - } else
52438 -#endif
52439 - if (PyLong_Check(obj)) {
52440 - unsigned long v = PyLong_AsUnsignedLong(obj);
52441 - if (!PyErr_Occurred()) {
52442 - if (val) *val = v;
52443 - return SWIG_OK;
52444 - } else {
52445 - PyErr_Clear();
52446 -#if PY_VERSION_HEX >= 0x03000000
52447 - {
52448 - long v = PyLong_AsLong(obj);
52449 - if (!PyErr_Occurred()) {
52450 - if (v < 0) {
52451 - return SWIG_OverflowError;
52452 - }
52453 - } else {
52454 - PyErr_Clear();
52455 - }
52456 - }
52457 -#endif
52458 - }
52459 - }
52460 -#ifdef SWIG_PYTHON_CAST_MODE
52461 - {
52462 - int dispatch = 0;
52463 - unsigned long v = PyLong_AsUnsignedLong(obj);
52464 - if (!PyErr_Occurred()) {
52465 - if (val) *val = v;
52466 - return SWIG_AddCast(SWIG_OK);
52467 - } else {
52468 - PyErr_Clear();
52469 - }
52470 - if (!dispatch) {
52471 - double d;
52472 - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
52473 - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
52474 - if (val) *val = (unsigned long)(d);
52475 - return res;
52476 - }
52477 - }
52478 - }
52479 -#endif
52480 - return SWIG_TypeError;
52481 -}
52482 -
52483 -
52484 -SWIGINTERNINLINE int
52485 -SWIG_AsVal_size_t (PyObject * obj, size_t *val)
52486 -{
52487 - unsigned long v;
52488 - int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
52489 - if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
52490 - return res;
52491 -}
52492 -
52493 -
52494 - #define SWIG_From_long PyLong_FromLong
52495 -
52496 -
52497 -SWIGINTERNINLINE PyObject *
52498 -SWIG_From_ptrdiff_t (ptrdiff_t value)
52499 -{
52500 - return SWIG_From_long (static_cast< long >(value));
52501 -}
52502 -
52503 -
52504 -SWIGINTERNINLINE PyObject*
52505 - SWIG_From_bool (bool value)
52506 -{
52507 - return PyBool_FromLong(value ? 1 : 0);
52508 -}
52509 -
52510 -
52511 -SWIGINTERN int
52512 -SWIG_AsVal_long (PyObject *obj, long* val)
52513 -{
52514 - if (PyInt_Check(obj)) {
52515 - if (val) *val = PyInt_AsLong(obj);
52516 - return SWIG_OK;
52517 - } else if (PyLong_Check(obj)) {
52518 - long v = PyLong_AsLong(obj);
52519 - if (!PyErr_Occurred()) {
52520 - if (val) *val = v;
52521 - return SWIG_OK;
52522 - } else {
52523 - PyErr_Clear();
52524 - }
52525 - }
52526 -#ifdef SWIG_PYTHON_CAST_MODE
52527 - {
52528 - int dispatch = 0;
52529 - long v = PyInt_AsLong(obj);
52530 - if (!PyErr_Occurred()) {
52531 - if (val) *val = v;
52532 - return SWIG_AddCast(SWIG_OK);
52533 - } else {
52534 - PyErr_Clear();
52535 - }
52536 - if (!dispatch) {
52537 - double d;
52538 - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
52539 - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
52540 - if (val) *val = (long)(d);
52541 - return res;
52542 - }
52543 - }
52544 - }
52545 -#endif
52546 - return SWIG_TypeError;
52547 -}
52548 -
52549 -
52550 -SWIGINTERNINLINE int
52551 -SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val)
52552 -{
52553 - long v;
52554 - int res = SWIG_AsVal_long (obj, val ? &v : 0);
52555 - if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v);
52556 - return res;
52557 -}
52558 -
52559 -
52560 -#include <stdexcept>
52561 -
52562 -
52563 -#include <algorithm>
52564 -
52565 -
52566 -#include <list>
52567 -
52568 -
52569 -#include <complex>
52570 -
52571 -
52572 -#include <vector>
52573 -
52574 -
52575 -#include <string>
52576 -
52577 -
52578 -namespace swig {
52579 - template <class Type>
52580 - struct noconst_traits {
52581 - typedef Type noconst_type;
52582 - };
52583 -
52584 - template <class Type>
52585 - struct noconst_traits<const Type> {
52586 - typedef Type noconst_type;
52587 - };
52588 -
52589 - /*
52590 - type categories
52591 - */
52592 - struct pointer_category { };
52593 - struct value_category { };
52594 -
52595 - /*
52596 - General traits that provides type_name and type_info
52597 - */
52598 - template <class Type> struct traits { };
52599 -
52600 - template <class Type>
52601 - inline const char* type_name() {
52602 - return traits<typename noconst_traits<Type >::noconst_type >::type_name();
52603 - }
52604 -
52605 - template <class Type>
52606 - struct traits_info {
52607 - static swig_type_info *type_query(std::string name) {
52608 - name += " *";
52609 - return SWIG_TypeQuery(name.c_str());
52610 - }
52611 - static swig_type_info *type_info() {
52612 - static swig_type_info *info = type_query(type_name<Type>());
52613 - return info;
52614 - }
52615 - };
52616 -
52617 - template <class Type>
52618 - inline swig_type_info *type_info() {
52619 - return traits_info<Type>::type_info();
52620 - }
52621 -
52622 - /*
52623 - Partial specialization for pointers
52624 - */
52625 - template <class Type> struct traits <Type *> {
52626 - typedef pointer_category category;
52627 - static std::string make_ptr_name(const char* name) {
52628 - std::string ptrname = name;
52629 - ptrname += " *";
52630 - return ptrname;
52631 - }
52632 - static const char* type_name() {
52633 - static std::string name = make_ptr_name(swig::type_name<Type>());
52634 - return name.c_str();
52635 - }
52636 - };
52637 -
52638 - template <class Type, class Category>
52639 - struct traits_as { };
52640 -
52641 - template <class Type, class Category>
52642 - struct traits_check { };
52643 -
52644 -}
52645 -
52646 -
52647 -namespace swig {
52648 - /*
52649 - Traits that provides the from method
52650 - */
52651 - template <class Type> struct traits_from_ptr {
52652 - static PyObject *from(Type *val, int owner = 0) {
52653 - return SWIG_InternalNewPointerObj(val, type_info<Type>(), owner);
52654 - }
52655 - };
52656 -
52657 - template <class Type> struct traits_from {
52658 - static PyObject *from(const Type& val) {
52659 - return traits_from_ptr<Type>::from(new Type(val), 1);
52660 - }
52661 - };
52662 -
52663 - template <class Type> struct traits_from<Type *> {
52664 - static PyObject *from(Type* val) {
52665 - return traits_from_ptr<Type>::from(val, 0);
52666 - }
52667 - };
52668 -
52669 - template <class Type> struct traits_from<const Type *> {
52670 - static PyObject *from(const Type* val) {
52671 - return traits_from_ptr<Type>::from(const_cast<Type*>(val), 0);
52672 - }
52673 - };
52674 -
52675 -
52676 - template <class Type>
52677 - inline PyObject *from(const Type& val) {
52678 - return traits_from<Type>::from(val);
52679 - }
52680 -
52681 - template <class Type>
52682 - inline PyObject *from_ptr(Type* val, int owner) {
52683 - return traits_from_ptr<Type>::from(val, owner);
52684 - }
52685 -
52686 - /*
52687 - Traits that provides the asval/as/check method
52688 - */
52689 - template <class Type>
52690 - struct traits_asptr {
52691 - static int asptr(PyObject *obj, Type **val) {
52692 - Type *p;
52693 - int res = SWIG_ConvertPtr(obj, (void**)&p, type_info<Type>(), 0);
52694 - if (SWIG_IsOK(res)) {
52695 - if (val) *val = p;
52696 - }
52697 - return res;
52698 - }
52699 - };
52700 -
52701 - template <class Type>
52702 - inline int asptr(PyObject *obj, Type **vptr) {
52703 - return traits_asptr<Type>::asptr(obj, vptr);
52704 - }
52705 -
52706 - template <class Type>
52707 - struct traits_asval {
52708 - static int asval(PyObject *obj, Type *val) {
52709 - if (val) {
52710 - Type *p = 0;
52711 - int res = traits_asptr<Type>::asptr(obj, &p);
52712 - if (!SWIG_IsOK(res)) return res;
52713 - if (p) {
52714 - typedef typename noconst_traits<Type>::noconst_type noconst_type;
52715 - *(const_cast<noconst_type*>(val)) = *p;
52716 - if (SWIG_IsNewObj(res)){
52717 - delete p;
52718 - res = SWIG_DelNewMask(res);
52719 - }
52720 - return res;
52721 - } else {
52722 - return SWIG_ERROR;
52723 - }
52724 - } else {
52725 - return traits_asptr<Type>::asptr(obj, (Type **)(0));
52726 - }
52727 - }
52728 - };
52729 -
52730 - template <class Type> struct traits_asval<Type*> {
52731 - static int asval(PyObject *obj, Type **val) {
52732 - if (val) {
52733 - typedef typename noconst_traits<Type>::noconst_type noconst_type;
52734 - noconst_type *p = 0;
52735 - int res = traits_asptr<noconst_type>::asptr(obj, &p);
52736 - if (SWIG_IsOK(res)) {
52737 - *(const_cast<noconst_type**>(val)) = p;
52738 - }
52739 - return res;
52740 - } else {
52741 - return traits_asptr<Type>::asptr(obj, (Type **)(0));
52742 - }
52743 - }
52744 - };
52745 -
52746 - template <class Type>
52747 - inline int asval(PyObject *obj, Type *val) {
52748 - return traits_asval<Type>::asval(obj, val);
52749 - }
52750 -
52751 - template <class Type>
52752 - struct traits_as<Type, value_category> {
52753 - static Type as(PyObject *obj, bool throw_error) {
52754 - Type v;
52755 - int res = asval(obj, &v);
52756 - if (!obj || !SWIG_IsOK(res)) {
52757 - if (!PyErr_Occurred()) {
52758 - ::SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
52759 - }
52760 - if (throw_error) throw std::invalid_argument("bad type");
52761 - }
52762 - return v;
52763 - }
52764 - };
52765 -
52766 - template <class Type>
52767 - struct traits_as<Type, pointer_category> {
52768 - static Type as(PyObject *obj, bool throw_error) {
52769 - Type *v = 0;
52770 - int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
52771 - if (SWIG_IsOK(res) && v) {
52772 - if (SWIG_IsNewObj(res)) {
52773 - Type r(*v);
52774 - delete v;
52775 - return r;
52776 - } else {
52777 - return *v;
52778 - }
52779 - } else {
52780 - // Uninitialized return value, no Type() constructor required.
52781 - static Type *v_def = (Type*) malloc(sizeof(Type));
52782 - if (!PyErr_Occurred()) {
52783 - SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
52784 - }
52785 - if (throw_error) throw std::invalid_argument("bad type");
52786 - memset(v_def,0,sizeof(Type));
52787 - return *v_def;
52788 - }
52789 - }
52790 - };
52791 -
52792 - template <class Type>
52793 - struct traits_as<Type*, pointer_category> {
52794 - static Type* as(PyObject *obj, bool throw_error) {
52795 - Type *v = 0;
52796 - int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
52797 - if (SWIG_IsOK(res)) {
52798 - return v;
52799 - } else {
52800 - if (!PyErr_Occurred()) {
52801 - SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
52802 - }
52803 - if (throw_error) throw std::invalid_argument("bad type");
52804 - return 0;
52805 - }
52806 - }
52807 - };
52808 -
52809 - template <class Type>
52810 - inline Type as(PyObject *obj, bool te = false) {
52811 - return traits_as<Type, typename traits<Type>::category>::as(obj, te);
52812 - }
52813 -
52814 - template <class Type>
52815 - struct traits_check<Type, value_category> {
52816 - static bool check(PyObject *obj) {
52817 - int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR;
52818 - return SWIG_IsOK(res) ? true : false;
52819 - }
52820 - };
52821 -
52822 - template <class Type>
52823 - struct traits_check<Type, pointer_category> {
52824 - static bool check(PyObject *obj) {
52825 - int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR;
52826 - return SWIG_IsOK(res) ? true : false;
52827 - }
52828 - };
52829 -
52830 - template <class Type>
52831 - inline bool check(PyObject *obj) {
52832 - return traits_check<Type, typename traits<Type>::category>::check(obj);
52833 - }
52834 -}
52835 -
52836 -
52837 -#include <functional>
52838 -
52839 -namespace std {
52840 - template <>
52841 - struct less <PyObject *>: public binary_function<PyObject *, PyObject *, bool>
52842 - {
52843 - bool
52844 - operator()(PyObject * v, PyObject *w) const
52845 - {
52846 - bool res;
52847 - SWIG_PYTHON_THREAD_BEGIN_BLOCK;
52848 - res = PyObject_RichCompareBool(v, w, Py_LT) ? true : false;
52849 - /* This may fall into a case of inconsistent
52850 - eg. ObjA > ObjX > ObjB
52851 - but ObjA < ObjB
52852 - */
52853 - if( PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError) )
52854 - {
52855 - /* Objects can't be compared, this mostly occurred in Python 3.0 */
52856 - /* Compare their ptr directly for a workaround */
52857 - res = (v < w);
52858 - PyErr_Clear();
52859 - }
52860 - SWIG_PYTHON_THREAD_END_BLOCK;
52861 - return res;
52862 - }
52863 - };
52864 -
52865 - template <>
52866 - struct less <swig::SwigPtr_PyObject>: public binary_function<swig::SwigPtr_PyObject, swig::SwigPtr_PyObject, bool>
52867 - {
52868 - bool
52869 - operator()(const swig::SwigPtr_PyObject& v, const swig::SwigPtr_PyObject& w) const
52870 - {
52871 - return std::less<PyObject *>()(v, w);
52872 - }
52873 - };
52874 -
52875 - template <>
52876 - struct less <swig::SwigVar_PyObject>: public binary_function<swig::SwigVar_PyObject, swig::SwigVar_PyObject, bool>
52877 - {
52878 - bool
52879 - operator()(const swig::SwigVar_PyObject& v, const swig::SwigVar_PyObject& w) const
52880 - {
52881 - return std::less<PyObject *>()(v, w);
52882 - }
52883 - };
52884 -
52885 -}
52886 -
52887 -namespace swig {
52888 - template <> struct traits<PyObject *> {
52889 - typedef value_category category;
52890 - static const char* type_name() { return "PyObject *"; }
52891 - };
52892 -
52893 - template <> struct traits_asval<PyObject * > {
52894 - typedef PyObject * value_type;
52895 - static int asval(PyObject *obj, value_type *val) {
52896 - if (val) *val = obj;
52897 - return SWIG_OK;
52898 - }
52899 - };
52900 -
52901 - template <>
52902 - struct traits_check<PyObject *, value_category> {
52903 - static bool check(PyObject *) {
52904 - return true;
52905 - }
52906 - };
52907 -
52908 - template <> struct traits_from<PyObject *> {
52909 - typedef PyObject * value_type;
52910 - static PyObject *from(const value_type& val) {
52911 - Py_XINCREF(val);
52912 - return val;
52913 - }
52914 - };
52915 -
52916 -}
52917 -
52918 -namespace swig {
52919 - template <class Difference>
52920 - inline size_t
52921 - check_index(Difference i, size_t size, bool insert = false) {
52922 - if ( i < 0 ) {
52923 - if ((size_t) (-i) <= size)
52924 - return (size_t) (i + size);
52925 - } else if ( (size_t) i < size ) {
52926 - return (size_t) i;
52927 - } else if (insert && ((size_t) i == size)) {
52928 - return size;
52929 - }
52930 - throw std::out_of_range("index out of range");
52931 - }
52932 -
52933 - template <class Difference>
52934 - void
52935 - slice_adjust(Difference i, Difference j, Py_ssize_t step, size_t size, Difference &ii, Difference &jj, bool insert = false) {
52936 - if (step == 0) {
52937 - throw std::invalid_argument("slice step cannot be zero");
52938 - } else if (step > 0) {
52939 - // Required range: 0 <= i < size, 0 <= j < size
52940 - if (i < 0) {
52941 - ii = 0;
52942 - } else if (i < (Difference)size) {
52943 - ii = i;
52944 - } else if (insert && (i >= (Difference)size)) {
52945 - ii = (Difference)size;
52946 - }
52947 - if ( j < 0 ) {
52948 - jj = 0;
52949 - } else {
52950 - jj = (j < (Difference)size) ? j : (Difference)size;
52951 - }
52952 - } else {
52953 - // Required range: -1 <= i < size-1, -1 <= j < size-1
52954 - if (i < -1) {
52955 - ii = -1;
52956 - } else if (i < (Difference) size) {
52957 - ii = i;
52958 - } else if (i >= (Difference)(size-1)) {
52959 - ii = (Difference)(size-1);
52960 - }
52961 - if (j < -1) {
52962 - jj = -1;
52963 - } else {
52964 - jj = (j < (Difference)size ) ? j : (Difference)(size-1);
52965 - }
52966 - }
52967 - }
52968 -
52969 - template <class Sequence, class Difference>
52970 - inline typename Sequence::iterator
52971 - getpos(Sequence* self, Difference i) {
52972 - typename Sequence::iterator pos = self->begin();
52973 - std::advance(pos, check_index(i,self->size()));
52974 - return pos;
52975 - }
52976 -
52977 - template <class Sequence, class Difference>
52978 - inline typename Sequence::const_iterator
52979 - cgetpos(const Sequence* self, Difference i) {
52980 - typename Sequence::const_iterator pos = self->begin();
52981 - std::advance(pos, check_index(i,self->size()));
52982 - return pos;
52983 - }
52984 -
52985 - template <class Sequence, class Difference>
52986 - inline Sequence*
52987 - getslice(const Sequence* self, Difference i, Difference j, Py_ssize_t step) {
52988 - typename Sequence::size_type size = self->size();
52989 - Difference ii = 0;
52990 - Difference jj = 0;
52991 - swig::slice_adjust(i, j, step, size, ii, jj);
52992 -
52993 - if (step > 0) {
52994 - typename Sequence::const_iterator sb = self->begin();
52995 - typename Sequence::const_iterator se = self->begin();
52996 - std::advance(sb,ii);
52997 - std::advance(se,jj);
52998 - if (step == 1) {
52999 - return new Sequence(sb, se);
53000 - } else {
53001 - Sequence *sequence = new Sequence();
53002 - typename Sequence::const_iterator it = sb;
53003 - while (it!=se) {
53004 - sequence->push_back(*it);
53005 - for (Py_ssize_t c=0; c<step && it!=se; ++c)
53006 - it++;
53007 - }
53008 - return sequence;
53009 - }
53010 - } else {
53011 - Sequence *sequence = new Sequence();
53012 - if (ii > jj) {
53013 - typename Sequence::const_reverse_iterator sb = self->rbegin();
53014 - typename Sequence::const_reverse_iterator se = self->rbegin();
53015 - std::advance(sb,size-ii-1);
53016 - std::advance(se,size-jj-1);
53017 - typename Sequence::const_reverse_iterator it = sb;
53018 - while (it!=se) {
53019 - sequence->push_back(*it);
53020 - for (Py_ssize_t c=0; c<-step && it!=se; ++c)
53021 - it++;
53022 - }
53023 - }
53024 - return sequence;
53025 - }
53026 - }
53027 -
53028 - template <class Sequence, class Difference, class InputSeq>
53029 - inline void
53030 - setslice(Sequence* self, Difference i, Difference j, Py_ssize_t step, const InputSeq& is = InputSeq()) {
53031 - typename Sequence::size_type size = self->size();
53032 - Difference ii = 0;
53033 - Difference jj = 0;
53034 - swig::slice_adjust(i, j, step, size, ii, jj, true);
53035 - if (step > 0) {
53036 - if (jj < ii)
53037 - jj = ii;
53038 - if (step == 1) {
53039 - size_t ssize = jj - ii;
53040 - if (ssize <= is.size()) {
53041 - // expanding/staying the same size
53042 - typename Sequence::iterator sb = self->begin();
53043 - typename InputSeq::const_iterator isit = is.begin();
53044 - std::advance(sb,ii);
53045 - std::advance(isit, jj - ii);
53046 - self->insert(std::copy(is.begin(), isit, sb), isit, is.end());
53047 - } else {
53048 - // shrinking
53049 - typename Sequence::iterator sb = self->begin();
53050 - typename Sequence::iterator se = self->begin();
53051 - std::advance(sb,ii);
53052 - std::advance(se,jj);
53053 - self->erase(sb,se);
53054 - sb = self->begin();
53055 - std::advance(sb,ii);
53056 - self->insert(sb, is.begin(), is.end());
53057 - }
53058 - } else {
53059 - size_t replacecount = (jj - ii + step - 1) / step;
53060 - if (is.size() != replacecount) {
53061 - char msg[1024];
53062 - sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount);
53063 - throw std::invalid_argument(msg);
53064 - }
53065 - typename Sequence::const_iterator isit = is.begin();
53066 - typename Sequence::iterator it = self->begin();
53067 - std::advance(it,ii);
53068 - for (size_t rc=0; rc<replacecount; ++rc) {
53069 - *it++ = *isit++;
53070 - for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c)
53071 - it++;
53072 - }
53073 - }
53074 - } else {
53075 - if (jj > ii)
53076 - jj = ii;
53077 - size_t replacecount = (ii - jj - step - 1) / -step;
53078 - if (is.size() != replacecount) {
53079 - char msg[1024];
53080 - sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount);
53081 - throw std::invalid_argument(msg);
53082 - }
53083 - typename Sequence::const_iterator isit = is.begin();
53084 - typename Sequence::reverse_iterator it = self->rbegin();
53085 - std::advance(it,size-ii-1);
53086 - for (size_t rc=0; rc<replacecount; ++rc) {
53087 - *it++ = *isit++;
53088 - for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c)
53089 - it++;
53090 - }
53091 - }
53092 - }
53093 -
53094 - template <class Sequence, class Difference>
53095 - inline void
53096 - delslice(Sequence* self, Difference i, Difference j, Py_ssize_t step) {
53097 - typename Sequence::size_type size = self->size();
53098 - Difference ii = 0;
53099 - Difference jj = 0;
53100 - swig::slice_adjust(i, j, step, size, ii, jj, true);
53101 - if (step > 0) {
53102 - if (jj > ii) {
53103 - typename Sequence::iterator sb = self->begin();
53104 - std::advance(sb,ii);
53105 - if (step == 1) {
53106 - typename Sequence::iterator se = self->begin();
53107 - std::advance(se,jj);
53108 - self->erase(sb,se);
53109 - } else {
53110 - typename Sequence::iterator it = sb;
53111 - size_t delcount = (jj - ii + step - 1) / step;
53112 - while (delcount) {
53113 - it = self->erase(it);
53114 - for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c)
53115 - it++;
53116 - delcount--;
53117 - }
53118 - }
53119 - }
53120 - } else {
53121 - if (ii > jj) {
53122 - typename Sequence::reverse_iterator sb = self->rbegin();
53123 - std::advance(sb,size-ii-1);
53124 - typename Sequence::reverse_iterator it = sb;
53125 - size_t delcount = (ii - jj - step - 1) / -step;
53126 - while (delcount) {
53127 - it = typename Sequence::reverse_iterator(self->erase((++it).base()));
53128 - for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c)
53129 - it++;
53130 - delcount--;
53131 - }
53132 - }
53133 - }
53134 - }
53135 -}
53136 -
53137 -
53138 -#if defined(__SUNPRO_CC) && defined(_RWSTD_VER)
53139 -# if !defined(SWIG_NO_STD_NOITERATOR_TRAITS_STL)
53140 -# define SWIG_STD_NOITERATOR_TRAITS_STL
53141 -# endif
53142 -#endif
53143 -
53144 -#if !defined(SWIG_STD_NOITERATOR_TRAITS_STL)
53145 -#include <iterator>
53146 -#else
53147 -namespace std {
53148 - template <class Iterator>
53149 - struct iterator_traits {
53150 - typedef ptrdiff_t difference_type;
53151 - typedef typename Iterator::value_type value_type;
53152 - };
53153 -
53154 - template <class Iterator, class Category,class T, class Reference, class Pointer, class Distance>
53155 - struct iterator_traits<__reverse_bi_iterator<Iterator,Category,T,Reference,Pointer,Distance> > {
53156 - typedef Distance difference_type;
53157 - typedef T value_type;
53158 - };
53159 -
53160 - template <class T>
53161 - struct iterator_traits<T*> {
53162 - typedef T value_type;
53163 - typedef ptrdiff_t difference_type;
53164 - };
53165 -
53166 - template<typename _InputIterator>
53167 - inline typename iterator_traits<_InputIterator>::difference_type
53168 - distance(_InputIterator __first, _InputIterator __last)
53169 - {
53170 - typename iterator_traits<_InputIterator>::difference_type __n = 0;
53171 - while (__first != __last) {
53172 - ++__first; ++__n;
53173 - }
53174 - return __n;
53175 - }
53176 -}
53177 -#endif
53178 -
53179 -
53180 -namespace swig {
53181 - template<typename OutIterator>
53182 - class SwigPyIterator_T : public SwigPyIterator
53183 - {
53184 - public:
53185 - typedef OutIterator out_iterator;
53186 - typedef typename std::iterator_traits<out_iterator>::value_type value_type;
53187 - typedef SwigPyIterator_T<out_iterator> self_type;
53188 -
53189 - SwigPyIterator_T(out_iterator curr, PyObject *seq)
53190 - : SwigPyIterator(seq), current(curr)
53191 - {
53192 - }
53193 -
53194 - const out_iterator& get_current() const
53195 - {
53196 - return current;
53197 - }
53198 -
53199 -
53200 - bool equal (const SwigPyIterator &iter) const
53201 - {
53202 - const self_type *iters = dynamic_cast<const self_type *>(&iter);
53203 - if (iters) {
53204 - return (current == iters->get_current());
53205 - } else {
53206 - throw std::invalid_argument("bad iterator type");
53207 - }
53208 - }
53209 -
53210 - ptrdiff_t distance(const SwigPyIterator &iter) const
53211 - {
53212 - const self_type *iters = dynamic_cast<const self_type *>(&iter);
53213 - if (iters) {
53214 - return std::distance(current, iters->get_current());
53215 - } else {
53216 - throw std::invalid_argument("bad iterator type");
53217 - }
53218 - }
53219 -
53220 - protected:
53221 - out_iterator current;
53222 - };
53223 -
53224 - template <class ValueType>
53225 - struct from_oper
53226 - {
53227 - typedef const ValueType& argument_type;
53228 - typedef PyObject *result_type;
53229 - result_type operator()(argument_type v) const
53230 - {
53231 - return swig::from(v);
53232 - }
53233 - };
53234 -
53235 - template<typename OutIterator,
53236 - typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
53237 - typename FromOper = from_oper<ValueType> >
53238 - class SwigPyIteratorOpen_T : public SwigPyIterator_T<OutIterator>
53239 - {
53240 - public:
53241 - FromOper from;
53242 - typedef OutIterator out_iterator;
53243 - typedef ValueType value_type;
53244 - typedef SwigPyIterator_T<out_iterator> base;
53245 - typedef SwigPyIteratorOpen_T<OutIterator, ValueType, FromOper> self_type;
53246 -
53247 - SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
53248 - : SwigPyIterator_T<OutIterator>(curr, seq)
53249 - {
53250 - }
53251 -
53252 - PyObject *value() const {
53253 - return from(static_cast<const value_type&>(*(base::current)));
53254 - }
53255 -
53256 - SwigPyIterator *copy() const
53257 - {
53258 - return new self_type(*this);
53259 - }
53260 -
53261 - SwigPyIterator *incr(size_t n = 1)
53262 - {
53263 - while (n--) {
53264 - ++base::current;
53265 - }
53266 - return this;
53267 - }
53268 -
53269 - SwigPyIterator *decr(size_t n = 1)
53270 - {
53271 - while (n--) {
53272 - --base::current;
53273 - }
53274 - return this;
53275 - }
53276 - };
53277 -
53278 - template<typename OutIterator,
53279 - typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
53280 - typename FromOper = from_oper<ValueType> >
53281 - class SwigPyIteratorClosed_T : public SwigPyIterator_T<OutIterator>
53282 - {
53283 - public:
53284 - FromOper from;
53285 - typedef OutIterator out_iterator;
53286 - typedef ValueType value_type;
53287 - typedef SwigPyIterator_T<out_iterator> base;
53288 - typedef SwigPyIteratorClosed_T<OutIterator, ValueType, FromOper> self_type;
53289 -
53290 - SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq)
53291 - : SwigPyIterator_T<OutIterator>(curr, seq), begin(first), end(last)
53292 - {
53293 - }
53294 -
53295 - PyObject *value() const {
53296 - if (base::current == end) {
53297 - throw stop_iteration();
53298 - } else {
53299 - return from(static_cast<const value_type&>(*(base::current)));
53300 - }
53301 - }
53302 -
53303 - SwigPyIterator *copy() const
53304 - {
53305 - return new self_type(*this);
53306 - }
53307 -
53308 - SwigPyIterator *incr(size_t n = 1)
53309 - {
53310 - while (n--) {
53311 - if (base::current == end) {
53312 - throw stop_iteration();
53313 - } else {
53314 - ++base::current;
53315 - }
53316 - }
53317 - return this;
53318 - }
53319 -
53320 - SwigPyIterator *decr(size_t n = 1)
53321 - {
53322 - while (n--) {
53323 - if (base::current == begin) {
53324 - throw stop_iteration();
53325 - } else {
53326 - --base::current;
53327 - }
53328 - }
53329 - return this;
53330 - }
53331 -
53332 - private:
53333 - out_iterator begin;
53334 - out_iterator end;
53335 - };
53336 -
53337 - template<typename OutIter>
53338 - inline SwigPyIterator*
53339 - make_output_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0)
53340 - {
53341 - return new SwigPyIteratorClosed_T<OutIter>(current, begin, end, seq);
53342 - }
53343 -
53344 - template<typename OutIter>
53345 - inline SwigPyIterator*
53346 - make_output_iterator(const OutIter& current, PyObject *seq = 0)
53347 - {
53348 - return new SwigPyIteratorOpen_T<OutIter>(current, seq);
53349 - }
53350 -
53351 -}
53352 -
53353 -
53354 -namespace swig
53355 -{
53356 - template <class T>
53357 - struct SwigPySequence_Ref
53358 - {
53359 - SwigPySequence_Ref(PyObject* seq, int index)
53360 - : _seq(seq), _index(index)
53361 - {
53362 - }
53363 -
53364 - operator T () const
53365 - {
53366 - swig::SwigVar_PyObject item = PySequence_GetItem(_seq, _index);
53367 - try {
53368 - return swig::as<T>(item, true);
53369 - } catch (std::exception& e) {
53370 - char msg[1024];
53371 - sprintf(msg, "in sequence element %d ", _index);
53372 - if (!PyErr_Occurred()) {
53373 - ::SWIG_Error(SWIG_TypeError, swig::type_name<T>());
53374 - }
53375 - SWIG_Python_AddErrorMsg(msg);
53376 - SWIG_Python_AddErrorMsg(e.what());
53377 - throw;
53378 - }
53379 - }
53380 -
53381 - SwigPySequence_Ref& operator=(const T& v)
53382 - {
53383 - PySequence_SetItem(_seq, _index, swig::from<T>(v));
53384 - return *this;
53385 - }
53386 -
53387 - private:
53388 - PyObject* _seq;
53389 - int _index;
53390 - };
53391 -
53392 - template <class T>
53393 - struct SwigPySequence_ArrowProxy
53394 - {
53395 - SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
53396 - const T* operator->() const { return &m_value; }
53397 - operator const T*() const { return &m_value; }
53398 - T m_value;
53399 - };
53400 -
53401 - template <class T, class Reference >
53402 - struct SwigPySequence_InputIterator
53403 - {
53404 - typedef SwigPySequence_InputIterator<T, Reference > self;
53405 -
53406 - typedef std::random_access_iterator_tag iterator_category;
53407 - typedef Reference reference;
53408 - typedef T value_type;
53409 - typedef T* pointer;
53410 - typedef int difference_type;
53411 -
53412 - SwigPySequence_InputIterator()
53413 - {
53414 - }
53415 -
53416 - SwigPySequence_InputIterator(PyObject* seq, int index)
53417 - : _seq(seq), _index(index)
53418 - {
53419 - }
53420 -
53421 - reference operator*() const
53422 - {
53423 - return reference(_seq, _index);
53424 - }
53425 -
53426 - SwigPySequence_ArrowProxy<T>
53427 - operator->() const {
53428 - return SwigPySequence_ArrowProxy<T>(operator*());
53429 - }
53430 -
53431 - bool operator==(const self& ri) const
53432 - {
53433 - return (_index == ri._index) && (_seq == ri._seq);
53434 - }
53435 -
53436 - bool operator!=(const self& ri) const
53437 - {
53438 - return !(operator==(ri));
53439 - }
53440 -
53441 - self& operator ++ ()
53442 - {
53443 - ++_index;
53444 - return *this;
53445 - }
53446 -
53447 - self& operator -- ()
53448 - {
53449 - --_index;
53450 - return *this;
53451 - }
53452 -
53453 - self& operator += (difference_type n)
53454 - {
53455 - _index += n;
53456 - return *this;
53457 - }
53458 -
53459 - self operator +(difference_type n) const
53460 - {
53461 - return self(_seq, _index + n);
53462 - }
53463 -
53464 - self& operator -= (difference_type n)
53465 - {
53466 - _index -= n;
53467 - return *this;
53468 - }
53469 -
53470 - self operator -(difference_type n) const
53471 - {
53472 - return self(_seq, _index - n);
53473 - }
53474 -
53475 - difference_type operator - (const self& ri) const
53476 - {
53477 - return _index - ri._index;
53478 - }
53479 -
53480 - bool operator < (const self& ri) const
53481 - {
53482 - return _index < ri._index;
53483 - }
53484 -
53485 - reference
53486 - operator[](difference_type n) const
53487 - {
53488 - return reference(_seq, _index + n);
53489 - }
53490 -
53491 - private:
53492 - PyObject* _seq;
53493 - difference_type _index;
53494 - };
53495 -
53496 - template <class T>
53497 - struct SwigPySequence_Cont
53498 - {
53499 - typedef SwigPySequence_Ref<T> reference;
53500 - typedef const SwigPySequence_Ref<T> const_reference;
53501 - typedef T value_type;
53502 - typedef T* pointer;
53503 - typedef int difference_type;
53504 - typedef int size_type;
53505 - typedef const pointer const_pointer;
53506 - typedef SwigPySequence_InputIterator<T, reference> iterator;
53507 - typedef SwigPySequence_InputIterator<T, const_reference> const_iterator;
53508 -
53509 - SwigPySequence_Cont(PyObject* seq) : _seq(0)
53510 - {
53511 - if (!PySequence_Check(seq)) {
53512 - throw std::invalid_argument("a sequence is expected");
53513 - }
53514 - _seq = seq;
53515 - Py_INCREF(_seq);
53516 - }
53517 -
53518 - ~SwigPySequence_Cont()
53519 - {
53520 - Py_XDECREF(_seq);
53521 - }
53522 -
53523 - size_type size() const
53524 - {
53525 - return static_cast<size_type>(PySequence_Size(_seq));
53526 - }
53527 -
53528 - bool empty() const
53529 - {
53530 - return size() == 0;
53531 - }
53532 -
53533 - iterator begin()
53534 - {
53535 - return iterator(_seq, 0);
53536 - }
53537 -
53538 - const_iterator begin() const
53539 - {
53540 - return const_iterator(_seq, 0);
53541 - }
53542 -
53543 - iterator end()
53544 - {
53545 - return iterator(_seq, size());
53546 - }
53547 -
53548 - const_iterator end() const
53549 - {
53550 - return const_iterator(_seq, size());
53551 - }
53552 -
53553 - reference operator[](difference_type n)
53554 - {
53555 - return reference(_seq, n);
53556 - }
53557 -
53558 - const_reference operator[](difference_type n) const
53559 - {
53560 - return const_reference(_seq, n);
53561 - }
53562 -
53563 - bool check(bool set_err = true) const
53564 - {
53565 - int s = size();
53566 - for (int i = 0; i < s; ++i) {
53567 - swig::SwigVar_PyObject item = PySequence_GetItem(_seq, i);
53568 - if (!swig::check<value_type>(item)) {
53569 - if (set_err) {
53570 - char msg[1024];
53571 - sprintf(msg, "in sequence element %d", i);
53572 - SWIG_Error(SWIG_RuntimeError, msg);
53573 - }
53574 - return false;
53575 - }
53576 - }
53577 - return true;
53578 - }
53579 -
53580 - private:
53581 - PyObject* _seq;
53582 - };
53583 -
53584 -}
53585 -
53586 -
53587 -#include <limits.h>
53588 -#if !defined(SWIG_NO_LLONG_MAX)
53589 -# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
53590 -# define LLONG_MAX __LONG_LONG_MAX__
53591 -# define LLONG_MIN (-LLONG_MAX - 1LL)
53592 -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
53593 -# endif
53594 -#endif
53595 -
53596 -
53597 -SWIGINTERN int
53598 -SWIG_AsVal_int (PyObject * obj, int *val)
53599 -{
53600 - long v;
53601 - int res = SWIG_AsVal_long (obj, &v);
53602 - if (SWIG_IsOK(res)) {
53603 - if ((v < INT_MIN || v > INT_MAX)) {
53604 - return SWIG_OverflowError;
53605 - } else {
53606 - if (val) *val = static_cast< int >(v);
53607 - }
53608 - }
53609 - return res;
53610 -}
53611 -
53612 -
53613 -SWIGINTERNINLINE PyObject*
53614 - SWIG_From_int (int value)
53615 -{
53616 - return PyInt_FromLong((long) value);
53617 -}
53618 -
53619 -
53620 -namespace swig {
53621 - template <> struct traits<int > {
53622 - typedef value_category category;
53623 - static const char* type_name() { return"int"; }
53624 - };
53625 - template <> struct traits_asval<int > {
53626 - typedef int value_type;
53627 - static int asval(PyObject *obj, value_type *val) {
53628 - return SWIG_AsVal_int (obj, val);
53629 - }
53630 - };
53631 - template <> struct traits_from<int > {
53632 - typedef int value_type;
53633 - static PyObject *from(const value_type& val) {
53634 - return SWIG_From_int (val);
53635 - }
53636 - };
53637 -}
53638 -
53639 -
53640 -namespace swig {
53641 - template <class SwigPySeq, class Seq>
53642 - inline void
53643 - assign(const SwigPySeq& swigpyseq, Seq* seq) {
53644 - // seq->assign(swigpyseq.begin(), swigpyseq.end()); // not used as not always implemented
53645 - typedef typename SwigPySeq::value_type value_type;
53646 - typename SwigPySeq::const_iterator it = swigpyseq.begin();
53647 - for (;it != swigpyseq.end(); ++it) {
53648 - seq->insert(seq->end(),(value_type)(*it));
53649 - }
53650 - }
53651 -
53652 - template <class Seq, class T = typename Seq::value_type >
53653 - struct traits_asptr_stdseq {
53654 - typedef Seq sequence;
53655 - typedef T value_type;
53656 -
53657 - static int asptr(PyObject *obj, sequence **seq) {
53658 - if (obj == Py_None || SWIG_Python_GetSwigThis(obj)) {
53659 - sequence *p;
53660 - if (::SWIG_ConvertPtr(obj,(void**)&p,
53661 - swig::type_info<sequence>(),0) == SWIG_OK) {
53662 - if (seq) *seq = p;
53663 - return SWIG_OLDOBJ;
53664 - }
53665 - } else if (PySequence_Check(obj)) {
53666 - try {
53667 - SwigPySequence_Cont<value_type> swigpyseq(obj);
53668 - if (seq) {
53669 - sequence *pseq = new sequence();
53670 - assign(swigpyseq, pseq);
53671 - *seq = pseq;
53672 - return SWIG_NEWOBJ;
53673 - } else {
53674 - return swigpyseq.check() ? SWIG_OK : SWIG_ERROR;
53675 - }
53676 - } catch (std::exception& e) {
53677 - if (seq) {
53678 - if (!PyErr_Occurred()) {
53679 - PyErr_SetString(PyExc_TypeError, e.what());
53680 - }
53681 - }
53682 - return SWIG_ERROR;
53683 - }
53684 - }
53685 - return SWIG_ERROR;
53686 - }
53687 - };
53688 -
53689 - template <class Seq, class T = typename Seq::value_type >
53690 - struct traits_from_stdseq {
53691 - typedef Seq sequence;
53692 - typedef T value_type;
53693 - typedef typename Seq::size_type size_type;
53694 - typedef typename sequence::const_iterator const_iterator;
53695 -
53696 - static PyObject *from(const sequence& seq) {
53697 -#ifdef SWIG_PYTHON_EXTRA_NATIVE_CONTAINERS
53698 - swig_type_info *desc = swig::type_info<sequence>();
53699 - if (desc && desc->clientdata) {
53700 - return SWIG_NewPointerObj(new sequence(seq), desc, SWIG_POINTER_OWN);
53701 - }
53702 -#endif
53703 - size_type size = seq.size();
53704 - if (size <= (size_type)INT_MAX) {
53705 - PyObject *obj = PyTuple_New((int)size);
53706 - int i = 0;
53707 - for (const_iterator it = seq.begin();
53708 - it != seq.end(); ++it, ++i) {
53709 - PyTuple_SetItem(obj,i,swig::from<value_type>(*it));
53710 - }
53711 - return obj;
53712 - } else {
53713 - PyErr_SetString(PyExc_OverflowError,"sequence size not valid in python");
53714 - return NULL;
53715 - }
53716 - }
53717 - };
53718 -}
53719 -
53720 -
53721 - namespace swig {
53722 - template <class T>
53723 - struct traits_asptr<std::vector<T> > {
53724 - static int asptr(PyObject *obj, std::vector<T> **vec) {
53725 - return traits_asptr_stdseq<std::vector<T> >::asptr(obj, vec);
53726 - }
53727 - };
53728 -
53729 - template <class T>
53730 - struct traits_from<std::vector<T> > {
53731 - static PyObject *from(const std::vector<T>& vec) {
53732 - return traits_from_stdseq<std::vector<T> >::from(vec);
53733 - }
53734 - };
53735 - }
53736 -
53737 -
53738 - namespace swig {
53739 - template <> struct traits<std::vector<int, std::allocator< int > > > {
53740 - typedef pointer_category category;
53741 - static const char* type_name() {
53742 - return "std::vector<" "int" "," "std::allocator< int >" " >";
53743 - }
53744 - };
53745 - }
53746 -
53747 -SWIGINTERN swig::SwigPyIterator *std_vector_Sl_int_Sg__iterator(std::vector< int > *self,PyObject **PYTHON_SELF){
53748 - return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
53749 - }
53750 -SWIGINTERN bool std_vector_Sl_int_Sg____nonzero__(std::vector< int > const *self){
53751 - return !(self->empty());
53752 - }
53753 -SWIGINTERN bool std_vector_Sl_int_Sg____bool__(std::vector< int > const *self){
53754 - return !(self->empty());
53755 - }
53756 -SWIGINTERN std::vector< int >::size_type std_vector_Sl_int_Sg____len__(std::vector< int > const *self){
53757 - return self->size();
53758 - }
53759 -
53760 -SWIGINTERNINLINE PyObject*
53761 -SWIG_From_unsigned_SS_long (unsigned long value)
53762 -{
53763 - return (value > LONG_MAX) ?
53764 - PyLong_FromUnsignedLong(value) : PyLong_FromLong(static_cast< long >(value));
53765 -}
53766 -
53767 -
53768 -SWIGINTERNINLINE PyObject *
53769 -SWIG_From_size_t (size_t value)
53770 -{
53771 - return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value));
53772 -}
53773 -
53774 -SWIGINTERN std::vector< int >::value_type std_vector_Sl_int_Sg__pop(std::vector< int > *self){
53775 - if (self->size() == 0)
53776 - throw std::out_of_range("pop from empty container");
53777 - std::vector<int,std::allocator< int > >::value_type x = self->back();
53778 - self->pop_back();
53779 - return x;
53780 - }
53781 -SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){
53782 - return swig::getslice(self, i, j, 1);
53783 - }
53784 -SWIGINTERN void std_vector_Sl_int_Sg____setslice____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j,std::vector< int,std::allocator< int > > const &v=std::vector< int,std::allocator< int > >()){
53785 - swig::setslice(self, i, j, 1, v);
53786 - }
53787 -SWIGINTERN void std_vector_Sl_int_Sg____delslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){
53788 - swig::delslice(self, i, j, 1);
53789 - }
53790 -SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i){
53791 - self->erase(swig::getpos(self,i));
53792 - }
53793 -SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getitem____SWIG_0(std::vector< int > *self,PySliceObject *slice){
53794 - Py_ssize_t i, j, step;
53795 - if( !PySlice_Check(slice) ) {
53796 - SWIG_Error(SWIG_TypeError, "Slice object expected.");
53797 - return NULL;
53798 - }
53799 - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
53800 - std::vector<int,std::allocator< int > >::difference_type id = i;
53801 - std::vector<int,std::allocator< int > >::difference_type jd = j;
53802 - return swig::getslice(self, id, jd, step);
53803 - }
53804 -SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_0(std::vector< int > *self,PySliceObject *slice,std::vector< int,std::allocator< int > > const &v){
53805 - Py_ssize_t i, j, step;
53806 - if( !PySlice_Check(slice) ) {
53807 - SWIG_Error(SWIG_TypeError, "Slice object expected.");
53808 - return;
53809 - }
53810 - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
53811 - std::vector<int,std::allocator< int > >::difference_type id = i;
53812 - std::vector<int,std::allocator< int > >::difference_type jd = j;
53813 - swig::setslice(self, id, jd, step, v);
53814 - }
53815 -SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){
53816 - Py_ssize_t i, j, step;
53817 - if( !PySlice_Check(slice) ) {
53818 - SWIG_Error(SWIG_TypeError, "Slice object expected.");
53819 - return;
53820 - }
53821 - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
53822 - std::vector<int,std::allocator< int > >::difference_type id = i;
53823 - std::vector<int,std::allocator< int > >::difference_type jd = j;
53824 - swig::delslice(self, id, jd, step);
53825 - }
53826 -SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){
53827 - Py_ssize_t i, j, step;
53828 - if( !PySlice_Check(slice) ) {
53829 - SWIG_Error(SWIG_TypeError, "Slice object expected.");
53830 - return;
53831 - }
53832 - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
53833 - std::vector<int,std::allocator< int > >::difference_type id = i;
53834 - std::vector<int,std::allocator< int > >::difference_type jd = j;
53835 - swig::delslice(self, id, jd, step);
53836 - }
53837 -SWIGINTERN std::vector< int >::value_type const &std_vector_Sl_int_Sg____getitem____SWIG_1(std::vector< int > const *self,std::vector< int >::difference_type i){
53838 - return *(swig::cgetpos(self, i));
53839 - }
53840 -SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_2(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::value_type const &x){
53841 - *(swig::getpos(self,i)) = x;
53842 - }
53843 -SWIGINTERN void std_vector_Sl_int_Sg__append(std::vector< int > *self,std::vector< int >::value_type const &x){
53844 - self->push_back(x);
53845 - }
53846 -
53847 - #define SWIG_From_double PyFloat_FromDouble
53848 -
53849 -
53850 -namespace swig {
53851 - template <> struct traits<double > {
53852 - typedef value_category category;
53853 - static const char* type_name() { return"double"; }
53854 - };
53855 - template <> struct traits_asval<double > {
53856 - typedef double value_type;
53857 - static int asval(PyObject *obj, value_type *val) {
53858 - return SWIG_AsVal_double (obj, val);
53859 - }
53860 - };
53861 - template <> struct traits_from<double > {
53862 - typedef double value_type;
53863 - static PyObject *from(const value_type& val) {
53864 - return SWIG_From_double (val);
53865 - }
53866 - };
53867 -}
53868 -
53869 -
53870 - namespace swig {
53871 - template <> struct traits<std::vector<double, std::allocator< double > > > {
53872 - typedef pointer_category category;
53873 - static const char* type_name() {
53874 - return "std::vector<" "double" "," "std::allocator< double >" " >";
53875 - }
53876 - };
53877 - }
53878 -
53879 -SWIGINTERN swig::SwigPyIterator *std_vector_Sl_double_Sg__iterator(std::vector< double > *self,PyObject **PYTHON_SELF){
53880 - return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
53881 - }
53882 -SWIGINTERN bool std_vector_Sl_double_Sg____nonzero__(std::vector< double > const *self){
53883 - return !(self->empty());
53884 - }
53885 -SWIGINTERN bool std_vector_Sl_double_Sg____bool__(std::vector< double > const *self){
53886 - return !(self->empty());
53887 - }
53888 -SWIGINTERN std::vector< double >::size_type std_vector_Sl_double_Sg____len__(std::vector< double > const *self){
53889 - return self->size();
53890 - }
53891 -SWIGINTERN std::vector< double >::value_type std_vector_Sl_double_Sg__pop(std::vector< double > *self){
53892 - if (self->size() == 0)
53893 - throw std::out_of_range("pop from empty container");
53894 - std::vector<double,std::allocator< double > >::value_type x = self->back();
53895 - self->pop_back();
53896 - return x;
53897 - }
53898 -SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getslice__(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j){
53899 - return swig::getslice(self, i, j, 1);
53900 - }
53901 -SWIGINTERN void std_vector_Sl_double_Sg____setslice____SWIG_0(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j,std::vector< double,std::allocator< double > > const &v=std::vector< double,std::allocator< double > >()){
53902 - swig::setslice(self, i, j, 1, v);
53903 - }
53904 -SWIGINTERN void std_vector_Sl_double_Sg____delslice__(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j){
53905 - swig::delslice(self, i, j, 1);
53906 - }
53907 -SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_0(std::vector< double > *self,std::vector< double >::difference_type i){
53908 - self->erase(swig::getpos(self,i));
53909 - }
53910 -SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getitem____SWIG_0(std::vector< double > *self,PySliceObject *slice){
53911 - Py_ssize_t i, j, step;
53912 - if( !PySlice_Check(slice) ) {
53913 - SWIG_Error(SWIG_TypeError, "Slice object expected.");
53914 - return NULL;
53915 - }
53916 - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
53917 - std::vector<double,std::allocator< double > >::difference_type id = i;
53918 - std::vector<double,std::allocator< double > >::difference_type jd = j;
53919 - return swig::getslice(self, id, jd, step);
53920 - }
53921 -SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_0(std::vector< double > *self,PySliceObject *slice,std::vector< double,std::allocator< double > > const &v){
53922 - Py_ssize_t i, j, step;
53923 - if( !PySlice_Check(slice) ) {
53924 - SWIG_Error(SWIG_TypeError, "Slice object expected.");
53925 - return;
53926 - }
53927 - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
53928 - std::vector<double,std::allocator< double > >::difference_type id = i;
53929 - std::vector<double,std::allocator< double > >::difference_type jd = j;
53930 - swig::setslice(self, id, jd, step, v);
53931 - }
53932 -SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){
53933 - Py_ssize_t i, j, step;
53934 - if( !PySlice_Check(slice) ) {
53935 - SWIG_Error(SWIG_TypeError, "Slice object expected.");
53936 - return;
53937 - }
53938 - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
53939 - std::vector<double,std::allocator< double > >::difference_type id = i;
53940 - std::vector<double,std::allocator< double > >::difference_type jd = j;
53941 - swig::delslice(self, id, jd, step);
53942 - }
53943 -SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){
53944 - Py_ssize_t i, j, step;
53945 - if( !PySlice_Check(slice) ) {
53946 - SWIG_Error(SWIG_TypeError, "Slice object expected.");
53947 - return;
53948 - }
53949 - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
53950 - std::vector<double,std::allocator< double > >::difference_type id = i;
53951 - std::vector<double,std::allocator< double > >::difference_type jd = j;
53952 - swig::delslice(self, id, jd, step);
53953 - }
53954 -SWIGINTERN std::vector< double >::value_type const &std_vector_Sl_double_Sg____getitem____SWIG_1(std::vector< double > const *self,std::vector< double >::difference_type i){
53955 - return *(swig::cgetpos(self, i));
53956 - }
53957 -SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_2(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::value_type const &x){
53958 - *(swig::getpos(self,i)) = x;
53959 - }
53960 -SWIGINTERN void std_vector_Sl_double_Sg__append(std::vector< double > *self,std::vector< double >::value_type const &x){
53961 - self->push_back(x);
53962 - }
53963 -
53964 - namespace swig {
53965 - template <> struct traits<vips::VImage > {
53966 - typedef pointer_category category;
53967 - static const char* type_name() { return"vips::VImage"; }
53968 - };
53969 - }
53970 -
53971 -
53972 - namespace swig {
53973 - template <> struct traits<std::vector<vips::VImage, std::allocator< vips::VImage > > > {
53974 - typedef pointer_category category;
53975 - static const char* type_name() {
53976 - return "std::vector<" "vips::VImage" "," "std::allocator< vips::VImage >" " >";
53977 - }
53978 - };
53979 - }
53980 -
53981 -SWIGINTERN swig::SwigPyIterator *std_vector_Sl_vips_VImage_Sg__iterator(std::vector< vips::VImage > *self,PyObject **PYTHON_SELF){
53982 - return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
53983 - }
53984 -SWIGINTERN bool std_vector_Sl_vips_VImage_Sg____nonzero__(std::vector< vips::VImage > const *self){
53985 - return !(self->empty());
53986 - }
53987 -SWIGINTERN bool std_vector_Sl_vips_VImage_Sg____bool__(std::vector< vips::VImage > const *self){
53988 - return !(self->empty());
53989 - }
53990 -SWIGINTERN std::vector< vips::VImage >::size_type std_vector_Sl_vips_VImage_Sg____len__(std::vector< vips::VImage > const *self){
53991 - return self->size();
53992 - }
53993 -SWIGINTERN std::vector< vips::VImage >::value_type std_vector_Sl_vips_VImage_Sg__pop(std::vector< vips::VImage > *self){
53994 - if (self->size() == 0)
53995 - throw std::out_of_range("pop from empty container");
53996 - std::vector<vips::VImage,std::allocator< vips::VImage > >::value_type x = self->back();
53997 - self->pop_back();
53998 - return x;
53999 - }
54000 -SWIGINTERN std::vector< vips::VImage,std::allocator< vips::VImage > > *std_vector_Sl_vips_VImage_Sg____getslice__(std::vector< vips::VImage > *self,std::vector< vips::VImage >::difference_type i,std::vector< vips::VImage >::difference_type j){
54001 - return swig::getslice(self, i, j, 1);
54002 - }
54003 -SWIGINTERN void std_vector_Sl_vips_VImage_Sg____setslice____SWIG_0(std::vector< vips::VImage > *self,std::vector< vips::VImage >::difference_type i,std::vector< vips::VImage >::difference_type j,std::vector< vips::VImage,std::allocator< vips::VImage > > const &v=std::vector< vips::VImage,std::allocator< vips::VImage > >()){
54004 - swig::setslice(self, i, j, 1, v);
54005 - }
54006 -SWIGINTERN void std_vector_Sl_vips_VImage_Sg____delslice__(std::vector< vips::VImage > *self,std::vector< vips::VImage >::difference_type i,std::vector< vips::VImage >::difference_type j){
54007 - swig::delslice(self, i, j, 1);
54008 - }
54009 -SWIGINTERN void std_vector_Sl_vips_VImage_Sg____delitem____SWIG_0(std::vector< vips::VImage > *self,std::vector< vips::VImage >::difference_type i){
54010 - self->erase(swig::getpos(self,i));
54011 - }
54012 -SWIGINTERN std::vector< vips::VImage,std::allocator< vips::VImage > > *std_vector_Sl_vips_VImage_Sg____getitem____SWIG_0(std::vector< vips::VImage > *self,PySliceObject *slice){
54013 - Py_ssize_t i, j, step;
54014 - if( !PySlice_Check(slice) ) {
54015 - SWIG_Error(SWIG_TypeError, "Slice object expected.");
54016 - return NULL;
54017 - }
54018 - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
54019 - std::vector<vips::VImage,std::allocator< vips::VImage > >::difference_type id = i;
54020 - std::vector<vips::VImage,std::allocator< vips::VImage > >::difference_type jd = j;
54021 - return swig::getslice(self, id, jd, step);
54022 - }
54023 -SWIGINTERN void std_vector_Sl_vips_VImage_Sg____setitem____SWIG_0(std::vector< vips::VImage > *self,PySliceObject *slice,std::vector< vips::VImage,std::allocator< vips::VImage > > const &v){
54024 - Py_ssize_t i, j, step;
54025 - if( !PySlice_Check(slice) ) {
54026 - SWIG_Error(SWIG_TypeError, "Slice object expected.");
54027 - return;
54028 - }
54029 - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
54030 - std::vector<vips::VImage,std::allocator< vips::VImage > >::difference_type id = i;
54031 - std::vector<vips::VImage,std::allocator< vips::VImage > >::difference_type jd = j;
54032 - swig::setslice(self, id, jd, step, v);
54033 - }
54034 -SWIGINTERN void std_vector_Sl_vips_VImage_Sg____setitem____SWIG_1(std::vector< vips::VImage > *self,PySliceObject *slice){
54035 - Py_ssize_t i, j, step;
54036 - if( !PySlice_Check(slice) ) {
54037 - SWIG_Error(SWIG_TypeError, "Slice object expected.");
54038 - return;
54039 - }
54040 - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
54041 - std::vector<vips::VImage,std::allocator< vips::VImage > >::difference_type id = i;
54042 - std::vector<vips::VImage,std::allocator< vips::VImage > >::difference_type jd = j;
54043 - swig::delslice(self, id, jd, step);
54044 - }
54045 -SWIGINTERN void std_vector_Sl_vips_VImage_Sg____delitem____SWIG_1(std::vector< vips::VImage > *self,PySliceObject *slice){
54046 - Py_ssize_t i, j, step;
54047 - if( !PySlice_Check(slice) ) {
54048 - SWIG_Error(SWIG_TypeError, "Slice object expected.");
54049 - return;
54050 - }
54051 - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
54052 - std::vector<vips::VImage,std::allocator< vips::VImage > >::difference_type id = i;
54053 - std::vector<vips::VImage,std::allocator< vips::VImage > >::difference_type jd = j;
54054 - swig::delslice(self, id, jd, step);
54055 - }
54056 -SWIGINTERN std::vector< vips::VImage >::value_type const &std_vector_Sl_vips_VImage_Sg____getitem____SWIG_1(std::vector< vips::VImage > const *self,std::vector< vips::VImage >::difference_type i){
54057 - return *(swig::cgetpos(self, i));
54058 - }
54059 -SWIGINTERN void std_vector_Sl_vips_VImage_Sg____setitem____SWIG_2(std::vector< vips::VImage > *self,std::vector< vips::VImage >::difference_type i,std::vector< vips::VImage >::value_type const &x){
54060 - *(swig::getpos(self,i)) = x;
54061 - }
54062 -SWIGINTERN void std_vector_Sl_vips_VImage_Sg__append(std::vector< vips::VImage > *self,std::vector< vips::VImage >::value_type const &x){
54063 - self->push_back(x);
54064 - }
54065 -
54066 -struct VBuffer {
54067 - void *data;
54068 - size_t size;
54069 -};
54070 -
54071 -
54072 -SWIGINTERN swig_type_info*
54073 -SWIG_pchar_descriptor(void)
54074 -{
54075 - static int init = 0;
54076 - static swig_type_info* info = 0;
54077 - if (!init) {
54078 - info = SWIG_TypeQuery("_p_char");
54079 - init = 1;
54080 - }
54081 - return info;
54082 -}
54083 -
54084 -
54085 -SWIGINTERN int
54086 -SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
54087 -{
54088 -#if PY_VERSION_HEX>=0x03000000
54089 - if (PyUnicode_Check(obj))
54090 -#else
54091 - if (PyString_Check(obj))
54092 -#endif
54093 - {
54094 - char *cstr; Py_ssize_t len;
54095 -#if PY_VERSION_HEX>=0x03000000
54096 - if (!alloc && cptr) {
54097 - /* We can't allow converting without allocation, since the internal
54098 - representation of string in Python 3 is UCS-2/UCS-4 but we require
54099 - a UTF-8 representation.
54100 - TODO(bhy) More detailed explanation */
54101 - return SWIG_RuntimeError;
54102 - }
54103 - obj = PyUnicode_AsUTF8String(obj);
54104 - PyBytes_AsStringAndSize(obj, &cstr, &len);
54105 - if(alloc) *alloc = SWIG_NEWOBJ;
54106 -#else
54107 - PyString_AsStringAndSize(obj, &cstr, &len);
54108 -#endif
54109 - if (cptr) {
54110 - if (alloc) {
54111 - /*
54112 - In python the user should not be able to modify the inner
54113 - string representation. To warranty that, if you define
54114 - SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
54115 - buffer is always returned.
54116 -
54117 - The default behavior is just to return the pointer value,
54118 - so, be careful.
54119 - */
54120 -#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
54121 - if (*alloc != SWIG_OLDOBJ)
54122 -#else
54123 - if (*alloc == SWIG_NEWOBJ)
54124 -#endif
54125 - {
54126 - *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
54127 - *alloc = SWIG_NEWOBJ;
54128 - }
54129 - else {
54130 - *cptr = cstr;
54131 - *alloc = SWIG_OLDOBJ;
54132 - }
54133 - } else {
54134 - #if PY_VERSION_HEX>=0x03000000
54135 - assert(0); /* Should never reach here in Python 3 */
54136 - #endif
54137 - *cptr = SWIG_Python_str_AsChar(obj);
54138 - }
54139 - }
54140 - if (psize) *psize = len + 1;
54141 -#if PY_VERSION_HEX>=0x03000000
54142 - Py_XDECREF(obj);
54143 -#endif
54144 - return SWIG_OK;
54145 - } else {
54146 - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
54147 - if (pchar_descriptor) {
54148 - void* vptr = 0;
54149 - if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
54150 - if (cptr) *cptr = (char *) vptr;
54151 - if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
54152 - if (alloc) *alloc = SWIG_OLDOBJ;
54153 - return SWIG_OK;
54154 - }
54155 - }
54156 - }
54157 - return SWIG_TypeError;
54158 -}
54159 -
54160 -
54161 -
54162 -
54163 -
54164 -SWIGINTERNINLINE PyObject *
54165 -SWIG_From_float (float value)
54166 -{
54167 - return SWIG_From_double (value);
54168 -}
54169 -
54170 -
54171 -SWIGINTERNINLINE PyObject *
54172 -SWIG_From_short (short value)
54173 -{
54174 - return SWIG_From_long (value);
54175 -}
54176 -
54177 -
54178 -SWIGINTERNINLINE PyObject *
54179 -SWIG_FromCharPtrAndSize(const char* carray, size_t size)
54180 -{
54181 - if (carray) {
54182 - if (size > INT_MAX) {
54183 - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
54184 - return pchar_descriptor ?
54185 - SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
54186 - } else {
54187 -#if PY_VERSION_HEX >= 0x03000000
54188 - return PyUnicode_FromStringAndSize(carray, static_cast< int >(size));
54189 -#else
54190 - return PyString_FromStringAndSize(carray, static_cast< int >(size));
54191 -#endif
54192 - }
54193 - } else {
54194 - return SWIG_Py_Void();
54195 - }
54196 -}
54197 -
54198 -
54199 -SWIGINTERNINLINE PyObject *
54200 -SWIG_FromCharPtr(const char *cptr)
54201 -{
54202 - return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
54203 -}
54204 -
54205 -
54206 -SWIGINTERN int
54207 -SWIG_AsVal_float (PyObject * obj, float *val)
54208 -{
54209 - double v;
54210 - int res = SWIG_AsVal_double (obj, &v);
54211 - if (SWIG_IsOK(res)) {
54212 - if ((v < -FLT_MAX || v > FLT_MAX)) {
54213 - return SWIG_OverflowError;
54214 - } else {
54215 - if (val) *val = static_cast< float >(v);
54216 - }
54217 - }
54218 - return res;
54219 -}
54220 -
54221 -
54222 -SWIGINTERNINLINE PyObject*
54223 -SWIG_From_std_complex_Sl_double_Sg_ (/*@SWIG:/usr/share/swig2.0/typemaps/swigmacros.swg,104,%ifcplusplus@*/
54224 -
54225 -const std::complex<double>&
54226 -
54227 -
54228 -
54229 -/*@SWIG@*/ c)
54230 -{
54231 - return PyComplex_FromDoubles(std::real(c), std::imag(c));
54232 -}
54233 -
54234 -SWIGINTERN VBuffer vips_VImage_tobuffer(vips::VImage *self){
54235 - VBuffer buffer;
54236 -
54237 - buffer.data = self->data ();
54238 - buffer.size = (size_t) self->Xsize () * self->Ysize () *
54239 - IM_IMAGE_SIZEOF_PEL (self->image ());
54240 -
54241 - return buffer;
54242 - }
54243 -SWIGINTERN vips::VImage vips_VImage_frombuffer(VBuffer buffer,int width,int height,int bands,vips::VImage::TBandFmt format){
54244 - return VImage (buffer.data, width, height, bands, format);
54245 - }
54246 -SWIGINTERN void vips_VImage_tostring(vips::VImage *self,char **buffer,int *buffer_len){
54247 - void *vips_memory;
54248 -
54249 - /* Eval the vips image first. This may throw an exception and we want to
54250 - * make sure we do this before we try to malloc() space for the copy.
54251 - */
54252 - vips_memory = self->data ();
54253 -
54254 - /* We have to copy the image data to make a string that Python can
54255 - * manage. Use frombuffer() / tobuffer () if you want to avoid the copy
54256 - * and manage memory lifetime yourself.
54257 - */
54258 - *buffer_len = (size_t) self->Xsize () * self->Ysize () *
54259 - IM_IMAGE_SIZEOF_PEL (self->image ());
54260 - if (!(*buffer = (char *) im_malloc (NULL, *buffer_len)))
54261 - verror ("Unable to allocate memory for image copy.");
54262 - memcpy (*buffer, vips_memory, *buffer_len);
54263 - }
54264 -
54265 -SWIGINTERN int
54266 -SWIG_AsPtr_std_string (PyObject * obj, std::string **val)
54267 -{
54268 - char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
54269 - if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
54270 - if (buf) {
54271 - if (val) *val = new std::string(buf, size - 1);
54272 - if (alloc == SWIG_NEWOBJ) delete[] buf;
54273 - return SWIG_NEWOBJ;
54274 - } else {
54275 - if (val) *val = 0;
54276 - return SWIG_OLDOBJ;
54277 - }
54278 - } else {
54279 - static int init = 0;
54280 - static swig_type_info* descriptor = 0;
54281 - if (!init) {
54282 - descriptor = SWIG_TypeQuery("std::string" " *");
54283 - init = 1;
54284 - }
54285 - if (descriptor) {
54286 - std::string *vptr;
54287 - int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0);
54288 - if (SWIG_IsOK(res) && val) *val = vptr;
54289 - return res;
54290 - }
54291 - }
54292 - return SWIG_ERROR;
54293 -}
54294 -
54295 -SWIGINTERN vips::VImage vips_VImage_fromstring(std::string buffer,int width,int height,int bands,vips::VImage::TBandFmt format){
54296 - void *vips_memory;
54297 - VImage result;
54298 -
54299 - /* We have to copy the string, then add a callback to the VImage to free
54300 - * it when we free the VImage. Use frombuffer() / tobuffer () if you want
54301 - * to avoid the copy and manage memory lifetime yourself.
54302 - */
54303 - if (!(vips_memory = im_malloc (NULL, buffer.length ())))
54304 - verror ("Unable to allocate memory for image copy.");
54305 -
54306 - /* We have to use .c_str () since the string may not be contiguous.
54307 - */
54308 - memcpy (vips_memory, buffer.c_str (), buffer.length ());
54309 - result = VImage (vips_memory, width, height, bands, format);
54310 -
54311 - if (im_add_close_callback (result.image (),
54312 - (im_callback_fn) im_free, vips_memory, NULL))
54313 - verror ();
54314 -
54315 - return result;
54316 - }
54317 -
54318 -/* Turn on to print args.
54319 -#define DEBUG
54320 - */
54321 -
54322 -/* Command-line args during parse.
54323 - */
54324 -typedef struct _Args {
54325 - /* The n strings we alloc when we get from Python.
54326 - */
54327 - int n;
54328 - char **str;
54329 -
54330 - /* argc/argv as processed by us.
54331 - */
54332 - int argc;
54333 - char **argv;
54334 -} Args;
54335 -
54336 -#ifdef DEBUG
54337 -static void
54338 -args_print (Args *args)
54339 -{
54340 - int i;
54341 -
54342 - printf ("args_print: argc = %d\n", args->argc);
54343 - // +1 so we print the trailing NULL too
54344 - for (i = 0; i < args->argc + 1; i++)
54345 - printf ("\t%2d)\t%s\n", i, args->argv[i]);
54346 -}
54347 -#endif /*DEBUG*/
54348 -
54349 -static void
54350 -args_free (Args *args)
54351 -{
54352 - int i;
54353 -
54354 - for (i = 0; i < args->n; i++)
54355 - IM_FREE (args->str[i]);
54356 - args->n = 0;
54357 - args->argc = 0;
54358 - IM_FREE (args->str);
54359 - IM_FREE (args->argv);
54360 - IM_FREE (args);
54361 -}
54362 -
54363 -/* Get argv/argc from python.
54364 - */
54365 -static Args *
54366 -args_new (void)
54367 -{
54368 - Args *args;
54369 - PyObject *av;
54370 - int i;
54371 - int n;
54372 -
54373 - args = g_new (Args, 1);
54374 - args->n = 0;
54375 - args->str = NULL;
54376 - args->argc = 0;
54377 - args->argv = NULL;
54378 -
54379 - if (!(av = PySys_GetObject ((char *) "argv")))
54380 - return (args);
54381 - if (!PyList_Check (av)) {
54382 - PyErr_Warn (PyExc_Warning, "ignoring sys.argv: "
54383 - "it must be a list of strings");
54384 - return args;
54385 - }
54386 -
54387 - n = PyList_Size (av);
54388 - args->str = g_new (char *, n);
54389 - for (i = 0; i < n; i++)
54390 - args->str[i] = g_strdup (PyString_AsString (PyList_GetItem (av, i)));
54391 - args->n = n;
54392 -
54393 - /* +1 for NULL termination.
54394 - */
54395 - args->argc = n;
54396 - args->argv = g_new (char *, n + 1);
54397 - for (i = 0; i < n; i++)
54398 - args->argv[i] = args->str[i];
54399 - args->argv[i] = NULL;
54400 -
54401 - return args;
54402 -}
54403 -
54404 -static void
54405 -vips_fatal (const char *msg)
54406 -{
54407 - char buf[256];
54408 -
54409 - im_snprintf (buf, 256, "%s\n%s", msg, im_error_buffer());
54410 - im_error_clear ();
54411 - Py_FatalError (buf);
54412 -}
54413 -
54414 -
54415 -#ifdef __cplusplus
54416 -extern "C" {
54417 -#endif
54418 -SWIGINTERN PyObject *_wrap_delete_SwigPyIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54419 - PyObject *resultobj = 0;
54420 - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
54421 - void *argp1 = 0 ;
54422 - int res1 = 0 ;
54423 - PyObject * obj0 = 0 ;
54424 -
54425 - if (!PyArg_ParseTuple(args,(char *)"O:delete_SwigPyIterator",&obj0)) SWIG_fail;
54426 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 );
54427 - if (!SWIG_IsOK(res1)) {
54428 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwigPyIterator" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
54429 - }
54430 - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
54431 - delete arg1;
54432 - resultobj = SWIG_Py_Void();
54433 - return resultobj;
54434 -fail:
54435 - return NULL;
54436 -}
54437 -
54438 -
54439 -SWIGINTERN PyObject *_wrap_SwigPyIterator_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54440 - PyObject *resultobj = 0;
54441 - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
54442 - void *argp1 = 0 ;
54443 - int res1 = 0 ;
54444 - PyObject * obj0 = 0 ;
54445 - PyObject *result = 0 ;
54446 -
54447 - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_value",&obj0)) SWIG_fail;
54448 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
54449 - if (!SWIG_IsOK(res1)) {
54450 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_value" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
54451 - }
54452 - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
54453 - try {
54454 - result = (PyObject *)((swig::SwigPyIterator const *)arg1)->value();
54455 - }
54456 - catch(swig::stop_iteration &_e) {
54457 - {
54458 - (void)_e;
54459 - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
54460 - SWIG_fail;
54461 - }
54462 - }
54463 -
54464 - resultobj = result;
54465 - return resultobj;
54466 -fail:
54467 - return NULL;
54468 -}
54469 -
54470 -
54471 -SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54472 - PyObject *resultobj = 0;
54473 - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
54474 - size_t arg2 ;
54475 - void *argp1 = 0 ;
54476 - int res1 = 0 ;
54477 - size_t val2 ;
54478 - int ecode2 = 0 ;
54479 - PyObject * obj0 = 0 ;
54480 - PyObject * obj1 = 0 ;
54481 - swig::SwigPyIterator *result = 0 ;
54482 -
54483 - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_incr",&obj0,&obj1)) SWIG_fail;
54484 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
54485 - if (!SWIG_IsOK(res1)) {
54486 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
54487 - }
54488 - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
54489 - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
54490 - if (!SWIG_IsOK(ecode2)) {
54491 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_incr" "', argument " "2"" of type '" "size_t""'");
54492 - }
54493 - arg2 = static_cast< size_t >(val2);
54494 - try {
54495 - result = (swig::SwigPyIterator *)(arg1)->incr(arg2);
54496 - }
54497 - catch(swig::stop_iteration &_e) {
54498 - {
54499 - (void)_e;
54500 - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
54501 - SWIG_fail;
54502 - }
54503 - }
54504 -
54505 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
54506 - return resultobj;
54507 -fail:
54508 - return NULL;
54509 -}
54510 -
54511 -
54512 -SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54513 - PyObject *resultobj = 0;
54514 - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
54515 - void *argp1 = 0 ;
54516 - int res1 = 0 ;
54517 - PyObject * obj0 = 0 ;
54518 - swig::SwigPyIterator *result = 0 ;
54519 -
54520 - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_incr",&obj0)) SWIG_fail;
54521 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
54522 - if (!SWIG_IsOK(res1)) {
54523 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
54524 - }
54525 - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
54526 - try {
54527 - result = (swig::SwigPyIterator *)(arg1)->incr();
54528 - }
54529 - catch(swig::stop_iteration &_e) {
54530 - {
54531 - (void)_e;
54532 - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
54533 - SWIG_fail;
54534 - }
54535 - }
54536 -
54537 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
54538 - return resultobj;
54539 -fail:
54540 - return NULL;
54541 -}
54542 -
54543 -
54544 -SWIGINTERN PyObject *_wrap_SwigPyIterator_incr(PyObject *self, PyObject *args) {
54545 - int argc;
54546 - PyObject *argv[3];
54547 - int ii;
54548 -
54549 - if (!PyTuple_Check(args)) SWIG_fail;
54550 - argc = args ? (int)PyObject_Length(args) : 0;
54551 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
54552 - argv[ii] = PyTuple_GET_ITEM(args,ii);
54553 - }
54554 - if (argc == 1) {
54555 - int _v;
54556 - void *vptr = 0;
54557 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
54558 - _v = SWIG_CheckState(res);
54559 - if (_v) {
54560 - return _wrap_SwigPyIterator_incr__SWIG_1(self, args);
54561 - }
54562 - }
54563 - if (argc == 2) {
54564 - int _v;
54565 - void *vptr = 0;
54566 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
54567 - _v = SWIG_CheckState(res);
54568 - if (_v) {
54569 - {
54570 - int res = SWIG_AsVal_size_t(argv[1], NULL);
54571 - _v = SWIG_CheckState(res);
54572 - }
54573 - if (_v) {
54574 - return _wrap_SwigPyIterator_incr__SWIG_0(self, args);
54575 - }
54576 - }
54577 - }
54578 -
54579 -fail:
54580 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_incr'.\n"
54581 - " Possible C/C++ prototypes are:\n"
54582 - " swig::SwigPyIterator::incr(size_t)\n"
54583 - " swig::SwigPyIterator::incr()\n");
54584 - return 0;
54585 -}
54586 -
54587 -
54588 -SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54589 - PyObject *resultobj = 0;
54590 - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
54591 - size_t arg2 ;
54592 - void *argp1 = 0 ;
54593 - int res1 = 0 ;
54594 - size_t val2 ;
54595 - int ecode2 = 0 ;
54596 - PyObject * obj0 = 0 ;
54597 - PyObject * obj1 = 0 ;
54598 - swig::SwigPyIterator *result = 0 ;
54599 -
54600 - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_decr",&obj0,&obj1)) SWIG_fail;
54601 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
54602 - if (!SWIG_IsOK(res1)) {
54603 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
54604 - }
54605 - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
54606 - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
54607 - if (!SWIG_IsOK(ecode2)) {
54608 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_decr" "', argument " "2"" of type '" "size_t""'");
54609 - }
54610 - arg2 = static_cast< size_t >(val2);
54611 - try {
54612 - result = (swig::SwigPyIterator *)(arg1)->decr(arg2);
54613 - }
54614 - catch(swig::stop_iteration &_e) {
54615 - {
54616 - (void)_e;
54617 - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
54618 - SWIG_fail;
54619 - }
54620 - }
54621 -
54622 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
54623 - return resultobj;
54624 -fail:
54625 - return NULL;
54626 -}
54627 -
54628 -
54629 -SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54630 - PyObject *resultobj = 0;
54631 - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
54632 - void *argp1 = 0 ;
54633 - int res1 = 0 ;
54634 - PyObject * obj0 = 0 ;
54635 - swig::SwigPyIterator *result = 0 ;
54636 -
54637 - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_decr",&obj0)) SWIG_fail;
54638 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
54639 - if (!SWIG_IsOK(res1)) {
54640 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
54641 - }
54642 - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
54643 - try {
54644 - result = (swig::SwigPyIterator *)(arg1)->decr();
54645 - }
54646 - catch(swig::stop_iteration &_e) {
54647 - {
54648 - (void)_e;
54649 - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
54650 - SWIG_fail;
54651 - }
54652 - }
54653 -
54654 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
54655 - return resultobj;
54656 -fail:
54657 - return NULL;
54658 -}
54659 -
54660 -
54661 -SWIGINTERN PyObject *_wrap_SwigPyIterator_decr(PyObject *self, PyObject *args) {
54662 - int argc;
54663 - PyObject *argv[3];
54664 - int ii;
54665 -
54666 - if (!PyTuple_Check(args)) SWIG_fail;
54667 - argc = args ? (int)PyObject_Length(args) : 0;
54668 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
54669 - argv[ii] = PyTuple_GET_ITEM(args,ii);
54670 - }
54671 - if (argc == 1) {
54672 - int _v;
54673 - void *vptr = 0;
54674 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
54675 - _v = SWIG_CheckState(res);
54676 - if (_v) {
54677 - return _wrap_SwigPyIterator_decr__SWIG_1(self, args);
54678 - }
54679 - }
54680 - if (argc == 2) {
54681 - int _v;
54682 - void *vptr = 0;
54683 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
54684 - _v = SWIG_CheckState(res);
54685 - if (_v) {
54686 - {
54687 - int res = SWIG_AsVal_size_t(argv[1], NULL);
54688 - _v = SWIG_CheckState(res);
54689 - }
54690 - if (_v) {
54691 - return _wrap_SwigPyIterator_decr__SWIG_0(self, args);
54692 - }
54693 - }
54694 - }
54695 -
54696 -fail:
54697 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_decr'.\n"
54698 - " Possible C/C++ prototypes are:\n"
54699 - " swig::SwigPyIterator::decr(size_t)\n"
54700 - " swig::SwigPyIterator::decr()\n");
54701 - return 0;
54702 -}
54703 -
54704 -
54705 -SWIGINTERN PyObject *_wrap_SwigPyIterator_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54706 - PyObject *resultobj = 0;
54707 - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
54708 - swig::SwigPyIterator *arg2 = 0 ;
54709 - void *argp1 = 0 ;
54710 - int res1 = 0 ;
54711 - void *argp2 = 0 ;
54712 - int res2 = 0 ;
54713 - PyObject * obj0 = 0 ;
54714 - PyObject * obj1 = 0 ;
54715 - ptrdiff_t result;
54716 -
54717 - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_distance",&obj0,&obj1)) SWIG_fail;
54718 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
54719 - if (!SWIG_IsOK(res1)) {
54720 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_distance" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
54721 - }
54722 - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
54723 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0);
54724 - if (!SWIG_IsOK(res2)) {
54725 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
54726 - }
54727 - if (!argp2) {
54728 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
54729 - }
54730 - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
54731 - try {
54732 - result = ((swig::SwigPyIterator const *)arg1)->distance((swig::SwigPyIterator const &)*arg2);
54733 - }
54734 - catch(std::invalid_argument &_e) {
54735 - SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail;
54736 - }
54737 -
54738 - resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
54739 - return resultobj;
54740 -fail:
54741 - return NULL;
54742 -}
54743 -
54744 -
54745 -SWIGINTERN PyObject *_wrap_SwigPyIterator_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54746 - PyObject *resultobj = 0;
54747 - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
54748 - swig::SwigPyIterator *arg2 = 0 ;
54749 - void *argp1 = 0 ;
54750 - int res1 = 0 ;
54751 - void *argp2 = 0 ;
54752 - int res2 = 0 ;
54753 - PyObject * obj0 = 0 ;
54754 - PyObject * obj1 = 0 ;
54755 - bool result;
54756 -
54757 - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_equal",&obj0,&obj1)) SWIG_fail;
54758 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
54759 - if (!SWIG_IsOK(res1)) {
54760 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_equal" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
54761 - }
54762 - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
54763 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0);
54764 - if (!SWIG_IsOK(res2)) {
54765 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
54766 - }
54767 - if (!argp2) {
54768 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
54769 - }
54770 - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
54771 - try {
54772 - result = (bool)((swig::SwigPyIterator const *)arg1)->equal((swig::SwigPyIterator const &)*arg2);
54773 - }
54774 - catch(std::invalid_argument &_e) {
54775 - SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail;
54776 - }
54777 -
54778 - resultobj = SWIG_From_bool(static_cast< bool >(result));
54779 - return resultobj;
54780 -fail:
54781 - return NULL;
54782 -}
54783 -
54784 -
54785 -SWIGINTERN PyObject *_wrap_SwigPyIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54786 - PyObject *resultobj = 0;
54787 - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
54788 - void *argp1 = 0 ;
54789 - int res1 = 0 ;
54790 - PyObject * obj0 = 0 ;
54791 - swig::SwigPyIterator *result = 0 ;
54792 -
54793 - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_copy",&obj0)) SWIG_fail;
54794 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
54795 - if (!SWIG_IsOK(res1)) {
54796 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_copy" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
54797 - }
54798 - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
54799 - result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->copy();
54800 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
54801 - return resultobj;
54802 -fail:
54803 - return NULL;
54804 -}
54805 -
54806 -
54807 -SWIGINTERN PyObject *_wrap_SwigPyIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54808 - PyObject *resultobj = 0;
54809 - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
54810 - void *argp1 = 0 ;
54811 - int res1 = 0 ;
54812 - PyObject * obj0 = 0 ;
54813 - PyObject *result = 0 ;
54814 -
54815 - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_next",&obj0)) SWIG_fail;
54816 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
54817 - if (!SWIG_IsOK(res1)) {
54818 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_next" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
54819 - }
54820 - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
54821 - try {
54822 - result = (PyObject *)(arg1)->next();
54823 - }
54824 - catch(swig::stop_iteration &_e) {
54825 - {
54826 - (void)_e;
54827 - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
54828 - SWIG_fail;
54829 - }
54830 - }
54831 -
54832 - resultobj = result;
54833 - return resultobj;
54834 -fail:
54835 - return NULL;
54836 -}
54837 -
54838 -
54839 -SWIGINTERN PyObject *_wrap_SwigPyIterator___next__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54840 - PyObject *resultobj = 0;
54841 - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
54842 - void *argp1 = 0 ;
54843 - int res1 = 0 ;
54844 - PyObject * obj0 = 0 ;
54845 - PyObject *result = 0 ;
54846 -
54847 - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator___next__",&obj0)) SWIG_fail;
54848 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
54849 - if (!SWIG_IsOK(res1)) {
54850 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___next__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
54851 - }
54852 - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
54853 - try {
54854 - result = (PyObject *)(arg1)->__next__();
54855 - }
54856 - catch(swig::stop_iteration &_e) {
54857 - {
54858 - (void)_e;
54859 - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
54860 - SWIG_fail;
54861 - }
54862 - }
54863 -
54864 - resultobj = result;
54865 - return resultobj;
54866 -fail:
54867 - return NULL;
54868 -}
54869 -
54870 -
54871 -SWIGINTERN PyObject *_wrap_SwigPyIterator_previous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54872 - PyObject *resultobj = 0;
54873 - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
54874 - void *argp1 = 0 ;
54875 - int res1 = 0 ;
54876 - PyObject * obj0 = 0 ;
54877 - PyObject *result = 0 ;
54878 -
54879 - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_previous",&obj0)) SWIG_fail;
54880 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
54881 - if (!SWIG_IsOK(res1)) {
54882 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_previous" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
54883 - }
54884 - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
54885 - try {
54886 - result = (PyObject *)(arg1)->previous();
54887 - }
54888 - catch(swig::stop_iteration &_e) {
54889 - {
54890 - (void)_e;
54891 - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
54892 - SWIG_fail;
54893 - }
54894 - }
54895 -
54896 - resultobj = result;
54897 - return resultobj;
54898 -fail:
54899 - return NULL;
54900 -}
54901 -
54902 -
54903 -SWIGINTERN PyObject *_wrap_SwigPyIterator_advance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54904 - PyObject *resultobj = 0;
54905 - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
54906 - ptrdiff_t arg2 ;
54907 - void *argp1 = 0 ;
54908 - int res1 = 0 ;
54909 - ptrdiff_t val2 ;
54910 - int ecode2 = 0 ;
54911 - PyObject * obj0 = 0 ;
54912 - PyObject * obj1 = 0 ;
54913 - swig::SwigPyIterator *result = 0 ;
54914 -
54915 - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_advance",&obj0,&obj1)) SWIG_fail;
54916 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
54917 - if (!SWIG_IsOK(res1)) {
54918 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_advance" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
54919 - }
54920 - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
54921 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
54922 - if (!SWIG_IsOK(ecode2)) {
54923 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_advance" "', argument " "2"" of type '" "ptrdiff_t""'");
54924 - }
54925 - arg2 = static_cast< ptrdiff_t >(val2);
54926 - try {
54927 - result = (swig::SwigPyIterator *)(arg1)->advance(arg2);
54928 - }
54929 - catch(swig::stop_iteration &_e) {
54930 - {
54931 - (void)_e;
54932 - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
54933 - SWIG_fail;
54934 - }
54935 - }
54936 -
54937 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
54938 - return resultobj;
54939 -fail:
54940 - return NULL;
54941 -}
54942 -
54943 -
54944 -SWIGINTERN PyObject *_wrap_SwigPyIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54945 - PyObject *resultobj = 0;
54946 - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
54947 - swig::SwigPyIterator *arg2 = 0 ;
54948 - void *argp1 = 0 ;
54949 - int res1 = 0 ;
54950 - void *argp2 = 0 ;
54951 - int res2 = 0 ;
54952 - PyObject * obj0 = 0 ;
54953 - PyObject * obj1 = 0 ;
54954 - bool result;
54955 -
54956 - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___eq__",&obj0,&obj1)) SWIG_fail;
54957 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
54958 - if (!SWIG_IsOK(res1)) {
54959 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___eq__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
54960 - }
54961 - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
54962 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0);
54963 - if (!SWIG_IsOK(res2)) {
54964 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
54965 - }
54966 - if (!argp2) {
54967 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
54968 - }
54969 - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
54970 - result = (bool)((swig::SwigPyIterator const *)arg1)->operator ==((swig::SwigPyIterator const &)*arg2);
54971 - resultobj = SWIG_From_bool(static_cast< bool >(result));
54972 - return resultobj;
54973 -fail:
54974 - return NULL;
54975 -}
54976 -
54977 -
54978 -SWIGINTERN PyObject *_wrap_SwigPyIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54979 - PyObject *resultobj = 0;
54980 - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
54981 - swig::SwigPyIterator *arg2 = 0 ;
54982 - void *argp1 = 0 ;
54983 - int res1 = 0 ;
54984 - void *argp2 = 0 ;
54985 - int res2 = 0 ;
54986 - PyObject * obj0 = 0 ;
54987 - PyObject * obj1 = 0 ;
54988 - bool result;
54989 -
54990 - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___ne__",&obj0,&obj1)) SWIG_fail;
54991 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
54992 - if (!SWIG_IsOK(res1)) {
54993 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___ne__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
54994 - }
54995 - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
54996 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0);
54997 - if (!SWIG_IsOK(res2)) {
54998 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
54999 - }
55000 - if (!argp2) {
55001 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
55002 - }
55003 - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
55004 - result = (bool)((swig::SwigPyIterator const *)arg1)->operator !=((swig::SwigPyIterator const &)*arg2);
55005 - resultobj = SWIG_From_bool(static_cast< bool >(result));
55006 - return resultobj;
55007 -fail:
55008 - return NULL;
55009 -}
55010 -
55011 -
55012 -SWIGINTERN PyObject *_wrap_SwigPyIterator___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55013 - PyObject *resultobj = 0;
55014 - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
55015 - ptrdiff_t arg2 ;
55016 - void *argp1 = 0 ;
55017 - int res1 = 0 ;
55018 - ptrdiff_t val2 ;
55019 - int ecode2 = 0 ;
55020 - PyObject * obj0 = 0 ;
55021 - PyObject * obj1 = 0 ;
55022 - swig::SwigPyIterator *result = 0 ;
55023 -
55024 - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___iadd__",&obj0,&obj1)) SWIG_fail;
55025 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 );
55026 - if (!SWIG_IsOK(res1)) {
55027 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___iadd__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
55028 - }
55029 - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
55030 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
55031 - if (!SWIG_IsOK(ecode2)) {
55032 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___iadd__" "', argument " "2"" of type '" "ptrdiff_t""'");
55033 - }
55034 - arg2 = static_cast< ptrdiff_t >(val2);
55035 - try {
55036 - result = (swig::SwigPyIterator *) &(arg1)->operator +=(arg2);
55037 - }
55038 - catch(swig::stop_iteration &_e) {
55039 - {
55040 - (void)_e;
55041 - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
55042 - SWIG_fail;
55043 - }
55044 - }
55045 -
55046 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
55047 - return resultobj;
55048 -fail:
55049 - return NULL;
55050 -}
55051 -
55052 -
55053 -SWIGINTERN PyObject *_wrap_SwigPyIterator___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55054 - PyObject *resultobj = 0;
55055 - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
55056 - ptrdiff_t arg2 ;
55057 - void *argp1 = 0 ;
55058 - int res1 = 0 ;
55059 - ptrdiff_t val2 ;
55060 - int ecode2 = 0 ;
55061 - PyObject * obj0 = 0 ;
55062 - PyObject * obj1 = 0 ;
55063 - swig::SwigPyIterator *result = 0 ;
55064 -
55065 - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___isub__",&obj0,&obj1)) SWIG_fail;
55066 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 );
55067 - if (!SWIG_IsOK(res1)) {
55068 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___isub__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
55069 - }
55070 - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
55071 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
55072 - if (!SWIG_IsOK(ecode2)) {
55073 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___isub__" "', argument " "2"" of type '" "ptrdiff_t""'");
55074 - }
55075 - arg2 = static_cast< ptrdiff_t >(val2);
55076 - try {
55077 - result = (swig::SwigPyIterator *) &(arg1)->operator -=(arg2);
55078 - }
55079 - catch(swig::stop_iteration &_e) {
55080 - {
55081 - (void)_e;
55082 - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
55083 - SWIG_fail;
55084 - }
55085 - }
55086 -
55087 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
55088 - return resultobj;
55089 -fail:
55090 - return NULL;
55091 -}
55092 -
55093 -
55094 -SWIGINTERN PyObject *_wrap_SwigPyIterator___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55095 - PyObject *resultobj = 0;
55096 - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
55097 - ptrdiff_t arg2 ;
55098 - void *argp1 = 0 ;
55099 - int res1 = 0 ;
55100 - ptrdiff_t val2 ;
55101 - int ecode2 = 0 ;
55102 - PyObject * obj0 = 0 ;
55103 - PyObject * obj1 = 0 ;
55104 - swig::SwigPyIterator *result = 0 ;
55105 -
55106 - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___add__",&obj0,&obj1)) SWIG_fail;
55107 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
55108 - if (!SWIG_IsOK(res1)) {
55109 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___add__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
55110 - }
55111 - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
55112 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
55113 - if (!SWIG_IsOK(ecode2)) {
55114 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___add__" "', argument " "2"" of type '" "ptrdiff_t""'");
55115 - }
55116 - arg2 = static_cast< ptrdiff_t >(val2);
55117 - try {
55118 - result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator +(arg2);
55119 - }
55120 - catch(swig::stop_iteration &_e) {
55121 - {
55122 - (void)_e;
55123 - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
55124 - SWIG_fail;
55125 - }
55126 - }
55127 -
55128 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
55129 - return resultobj;
55130 -fail:
55131 - return NULL;
55132 -}
55133 -
55134 -
55135 -SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55136 - PyObject *resultobj = 0;
55137 - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
55138 - ptrdiff_t arg2 ;
55139 - void *argp1 = 0 ;
55140 - int res1 = 0 ;
55141 - ptrdiff_t val2 ;
55142 - int ecode2 = 0 ;
55143 - PyObject * obj0 = 0 ;
55144 - PyObject * obj1 = 0 ;
55145 - swig::SwigPyIterator *result = 0 ;
55146 -
55147 - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___sub__",&obj0,&obj1)) SWIG_fail;
55148 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
55149 - if (!SWIG_IsOK(res1)) {
55150 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
55151 - }
55152 - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
55153 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
55154 - if (!SWIG_IsOK(ecode2)) {
55155 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "ptrdiff_t""'");
55156 - }
55157 - arg2 = static_cast< ptrdiff_t >(val2);
55158 - try {
55159 - result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator -(arg2);
55160 - }
55161 - catch(swig::stop_iteration &_e) {
55162 - {
55163 - (void)_e;
55164 - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
55165 - SWIG_fail;
55166 - }
55167 - }
55168 -
55169 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
55170 - return resultobj;
55171 -fail:
55172 - return NULL;
55173 -}
55174 -
55175 -
55176 -SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55177 - PyObject *resultobj = 0;
55178 - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
55179 - swig::SwigPyIterator *arg2 = 0 ;
55180 - void *argp1 = 0 ;
55181 - int res1 = 0 ;
55182 - void *argp2 = 0 ;
55183 - int res2 = 0 ;
55184 - PyObject * obj0 = 0 ;
55185 - PyObject * obj1 = 0 ;
55186 - ptrdiff_t result;
55187 -
55188 - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___sub__",&obj0,&obj1)) SWIG_fail;
55189 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
55190 - if (!SWIG_IsOK(res1)) {
55191 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
55192 - }
55193 - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
55194 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0);
55195 - if (!SWIG_IsOK(res2)) {
55196 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
55197 - }
55198 - if (!argp2) {
55199 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
55200 - }
55201 - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
55202 - result = ((swig::SwigPyIterator const *)arg1)->operator -((swig::SwigPyIterator const &)*arg2);
55203 - resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
55204 - return resultobj;
55205 -fail:
55206 - return NULL;
55207 -}
55208 -
55209 -
55210 -SWIGINTERN PyObject *_wrap_SwigPyIterator___sub__(PyObject *self, PyObject *args) {
55211 - int argc;
55212 - PyObject *argv[3];
55213 - int ii;
55214 -
55215 - if (!PyTuple_Check(args)) SWIG_fail;
55216 - argc = args ? (int)PyObject_Length(args) : 0;
55217 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
55218 - argv[ii] = PyTuple_GET_ITEM(args,ii);
55219 - }
55220 - if (argc == 2) {
55221 - int _v;
55222 - void *vptr = 0;
55223 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
55224 - _v = SWIG_CheckState(res);
55225 - if (_v) {
55226 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_swig__SwigPyIterator, 0);
55227 - _v = SWIG_CheckState(res);
55228 - if (_v) {
55229 - return _wrap_SwigPyIterator___sub____SWIG_1(self, args);
55230 - }
55231 - }
55232 - }
55233 - if (argc == 2) {
55234 - int _v;
55235 - void *vptr = 0;
55236 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
55237 - _v = SWIG_CheckState(res);
55238 - if (_v) {
55239 - {
55240 - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
55241 - _v = SWIG_CheckState(res);
55242 - }
55243 - if (_v) {
55244 - return _wrap_SwigPyIterator___sub____SWIG_0(self, args);
55245 - }
55246 - }
55247 - }
55248 -
55249 -fail:
55250 - Py_INCREF(Py_NotImplemented);
55251 - return Py_NotImplemented;
55252 -}
55253 -
55254 -
55255 -SWIGINTERN PyObject *SwigPyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55256 - PyObject *obj;
55257 - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
55258 - SWIG_TypeNewClientData(SWIGTYPE_p_swig__SwigPyIterator, SWIG_NewClientData(obj));
55259 - return SWIG_Py_Void();
55260 -}
55261 -
55262 -SWIGINTERN PyObject *_wrap_IntVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55263 - PyObject *resultobj = 0;
55264 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
55265 - PyObject **arg2 = (PyObject **) 0 ;
55266 - void *argp1 = 0 ;
55267 - int res1 = 0 ;
55268 - PyObject * obj0 = 0 ;
55269 - swig::SwigPyIterator *result = 0 ;
55270 -
55271 - arg2 = &obj0;
55272 - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_iterator",&obj0)) SWIG_fail;
55273 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
55274 - if (!SWIG_IsOK(res1)) {
55275 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_iterator" "', argument " "1"" of type '" "std::vector< int > *""'");
55276 - }
55277 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
55278 - result = (swig::SwigPyIterator *)std_vector_Sl_int_Sg__iterator(arg1,arg2);
55279 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
55280 - return resultobj;
55281 -fail:
55282 - return NULL;
55283 -}
55284 -
55285 -
55286 -SWIGINTERN PyObject *_wrap_IntVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55287 - PyObject *resultobj = 0;
55288 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
55289 - void *argp1 = 0 ;
55290 - int res1 = 0 ;
55291 - PyObject * obj0 = 0 ;
55292 - bool result;
55293 -
55294 - if (!PyArg_ParseTuple(args,(char *)"O:IntVector___nonzero__",&obj0)) SWIG_fail;
55295 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
55296 - if (!SWIG_IsOK(res1)) {
55297 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___nonzero__" "', argument " "1"" of type '" "std::vector< int > const *""'");
55298 - }
55299 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
55300 - result = (bool)std_vector_Sl_int_Sg____nonzero__((std::vector< int > const *)arg1);
55301 - resultobj = SWIG_From_bool(static_cast< bool >(result));
55302 - return resultobj;
55303 -fail:
55304 - return NULL;
55305 -}
55306 -
55307 -
55308 -SWIGINTERN PyObject *_wrap_IntVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55309 - PyObject *resultobj = 0;
55310 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
55311 - void *argp1 = 0 ;
55312 - int res1 = 0 ;
55313 - PyObject * obj0 = 0 ;
55314 - bool result;
55315 -
55316 - if (!PyArg_ParseTuple(args,(char *)"O:IntVector___bool__",&obj0)) SWIG_fail;
55317 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
55318 - if (!SWIG_IsOK(res1)) {
55319 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___bool__" "', argument " "1"" of type '" "std::vector< int > const *""'");
55320 - }
55321 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
55322 - result = (bool)std_vector_Sl_int_Sg____bool__((std::vector< int > const *)arg1);
55323 - resultobj = SWIG_From_bool(static_cast< bool >(result));
55324 - return resultobj;
55325 -fail:
55326 - return NULL;
55327 -}
55328 -
55329 -
55330 -SWIGINTERN PyObject *_wrap_IntVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55331 - PyObject *resultobj = 0;
55332 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
55333 - void *argp1 = 0 ;
55334 - int res1 = 0 ;
55335 - PyObject * obj0 = 0 ;
55336 - std::vector< int >::size_type result;
55337 -
55338 - if (!PyArg_ParseTuple(args,(char *)"O:IntVector___len__",&obj0)) SWIG_fail;
55339 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
55340 - if (!SWIG_IsOK(res1)) {
55341 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___len__" "', argument " "1"" of type '" "std::vector< int > const *""'");
55342 - }
55343 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
55344 - result = std_vector_Sl_int_Sg____len__((std::vector< int > const *)arg1);
55345 - resultobj = SWIG_From_size_t(static_cast< size_t >(result));
55346 - return resultobj;
55347 -fail:
55348 - return NULL;
55349 -}
55350 -
55351 -
55352 -SWIGINTERN PyObject *_wrap_IntVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55353 - PyObject *resultobj = 0;
55354 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
55355 - void *argp1 = 0 ;
55356 - int res1 = 0 ;
55357 - PyObject * obj0 = 0 ;
55358 - std::vector< int >::value_type result;
55359 -
55360 - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_pop",&obj0)) SWIG_fail;
55361 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
55362 - if (!SWIG_IsOK(res1)) {
55363 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_pop" "', argument " "1"" of type '" "std::vector< int > *""'");
55364 - }
55365 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
55366 - try {
55367 - result = (std::vector< int >::value_type)std_vector_Sl_int_Sg__pop(arg1);
55368 - }
55369 - catch(std::out_of_range &_e) {
55370 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
55371 - }
55372 -
55373 - resultobj = SWIG_From_int(static_cast< int >(result));
55374 - return resultobj;
55375 -fail:
55376 - return NULL;
55377 -}
55378 -
55379 -
55380 -SWIGINTERN PyObject *_wrap_IntVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55381 - PyObject *resultobj = 0;
55382 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
55383 - std::vector< int >::difference_type arg2 ;
55384 - std::vector< int >::difference_type arg3 ;
55385 - void *argp1 = 0 ;
55386 - int res1 = 0 ;
55387 - ptrdiff_t val2 ;
55388 - int ecode2 = 0 ;
55389 - ptrdiff_t val3 ;
55390 - int ecode3 = 0 ;
55391 - PyObject * obj0 = 0 ;
55392 - PyObject * obj1 = 0 ;
55393 - PyObject * obj2 = 0 ;
55394 - std::vector< int,std::allocator< int > > *result = 0 ;
55395 -
55396 - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector___getslice__",&obj0,&obj1,&obj2)) SWIG_fail;
55397 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
55398 - if (!SWIG_IsOK(res1)) {
55399 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___getslice__" "', argument " "1"" of type '" "std::vector< int > *""'");
55400 - }
55401 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
55402 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
55403 - if (!SWIG_IsOK(ecode2)) {
55404 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___getslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
55405 - }
55406 - arg2 = static_cast< std::vector< int >::difference_type >(val2);
55407 - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
55408 - if (!SWIG_IsOK(ecode3)) {
55409 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___getslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'");
55410 - }
55411 - arg3 = static_cast< std::vector< int >::difference_type >(val3);
55412 - try {
55413 - result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getslice__(arg1,arg2,arg3);
55414 - }
55415 - catch(std::out_of_range &_e) {
55416 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
55417 - }
55418 - catch(std::invalid_argument &_e) {
55419 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
55420 - }
55421 -
55422 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_OWN | 0 );
55423 - return resultobj;
55424 -fail:
55425 - return NULL;
55426 -}
55427 -
55428 -
55429 -SWIGINTERN PyObject *_wrap_IntVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55430 - PyObject *resultobj = 0;
55431 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
55432 - std::vector< int >::difference_type arg2 ;
55433 - std::vector< int >::difference_type arg3 ;
55434 - std::vector< int,std::allocator< int > > *arg4 = 0 ;
55435 - void *argp1 = 0 ;
55436 - int res1 = 0 ;
55437 - ptrdiff_t val2 ;
55438 - int ecode2 = 0 ;
55439 - ptrdiff_t val3 ;
55440 - int ecode3 = 0 ;
55441 - int res4 = SWIG_OLDOBJ ;
55442 - PyObject * obj0 = 0 ;
55443 - PyObject * obj1 = 0 ;
55444 - PyObject * obj2 = 0 ;
55445 - PyObject * obj3 = 0 ;
55446 -
55447 - if (!PyArg_ParseTuple(args,(char *)"OOOO:IntVector___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
55448 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
55449 - if (!SWIG_IsOK(res1)) {
55450 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setslice__" "', argument " "1"" of type '" "std::vector< int > *""'");
55451 - }
55452 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
55453 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
55454 - if (!SWIG_IsOK(ecode2)) {
55455 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___setslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
55456 - }
55457 - arg2 = static_cast< std::vector< int >::difference_type >(val2);
55458 - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
55459 - if (!SWIG_IsOK(ecode3)) {
55460 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___setslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'");
55461 - }
55462 - arg3 = static_cast< std::vector< int >::difference_type >(val3);
55463 - {
55464 - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
55465 - res4 = swig::asptr(obj3, &ptr);
55466 - if (!SWIG_IsOK(res4)) {
55467 - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IntVector___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'");
55468 - }
55469 - if (!ptr) {
55470 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntVector___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'");
55471 - }
55472 - arg4 = ptr;
55473 - }
55474 - try {
55475 - std_vector_Sl_int_Sg____setslice____SWIG_0(arg1,arg2,arg3,(std::vector< int,std::allocator< int > > const &)*arg4);
55476 - }
55477 - catch(std::out_of_range &_e) {
55478 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
55479 - }
55480 - catch(std::invalid_argument &_e) {
55481 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
55482 - }
55483 -
55484 - resultobj = SWIG_Py_Void();
55485 - if (SWIG_IsNewObj(res4)) delete arg4;
55486 - return resultobj;
55487 -fail:
55488 - if (SWIG_IsNewObj(res4)) delete arg4;
55489 - return NULL;
55490 -}
55491 -
55492 -
55493 -SWIGINTERN PyObject *_wrap_IntVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55494 - PyObject *resultobj = 0;
55495 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
55496 - std::vector< int >::difference_type arg2 ;
55497 - std::vector< int >::difference_type arg3 ;
55498 - void *argp1 = 0 ;
55499 - int res1 = 0 ;
55500 - ptrdiff_t val2 ;
55501 - int ecode2 = 0 ;
55502 - ptrdiff_t val3 ;
55503 - int ecode3 = 0 ;
55504 - PyObject * obj0 = 0 ;
55505 - PyObject * obj1 = 0 ;
55506 - PyObject * obj2 = 0 ;
55507 -
55508 - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector___setslice__",&obj0,&obj1,&obj2)) SWIG_fail;
55509 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
55510 - if (!SWIG_IsOK(res1)) {
55511 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setslice__" "', argument " "1"" of type '" "std::vector< int > *""'");
55512 - }
55513 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
55514 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
55515 - if (!SWIG_IsOK(ecode2)) {
55516 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___setslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
55517 - }
55518 - arg2 = static_cast< std::vector< int >::difference_type >(val2);
55519 - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
55520 - if (!SWIG_IsOK(ecode3)) {
55521 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___setslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'");
55522 - }
55523 - arg3 = static_cast< std::vector< int >::difference_type >(val3);
55524 - try {
55525 - std_vector_Sl_int_Sg____setslice____SWIG_0(arg1,arg2,arg3);
55526 - }
55527 - catch(std::out_of_range &_e) {
55528 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
55529 - }
55530 - catch(std::invalid_argument &_e) {
55531 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
55532 - }
55533 -
55534 - resultobj = SWIG_Py_Void();
55535 - return resultobj;
55536 -fail:
55537 - return NULL;
55538 -}
55539 -
55540 -
55541 -SWIGINTERN PyObject *_wrap_IntVector___setslice__(PyObject *self, PyObject *args) {
55542 - int argc;
55543 - PyObject *argv[5];
55544 - int ii;
55545 -
55546 - if (!PyTuple_Check(args)) SWIG_fail;
55547 - argc = args ? (int)PyObject_Length(args) : 0;
55548 - for (ii = 0; (ii < 4) && (ii < argc); ii++) {
55549 - argv[ii] = PyTuple_GET_ITEM(args,ii);
55550 - }
55551 - if (argc == 3) {
55552 - int _v;
55553 - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
55554 - _v = SWIG_CheckState(res);
55555 - if (_v) {
55556 - {
55557 - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
55558 - _v = SWIG_CheckState(res);
55559 - }
55560 - if (_v) {
55561 - {
55562 - int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
55563 - _v = SWIG_CheckState(res);
55564 - }
55565 - if (_v) {
55566 - return _wrap_IntVector___setslice____SWIG_1(self, args);
55567 - }
55568 - }
55569 - }
55570 - }
55571 - if (argc == 4) {
55572 - int _v;
55573 - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
55574 - _v = SWIG_CheckState(res);
55575 - if (_v) {
55576 - {
55577 - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
55578 - _v = SWIG_CheckState(res);
55579 - }
55580 - if (_v) {
55581 - {
55582 - int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
55583 - _v = SWIG_CheckState(res);
55584 - }
55585 - if (_v) {
55586 - int res = swig::asptr(argv[3], (std::vector<int,std::allocator< int > >**)(0));
55587 - _v = SWIG_CheckState(res);
55588 - if (_v) {
55589 - return _wrap_IntVector___setslice____SWIG_0(self, args);
55590 - }
55591 - }
55592 - }
55593 - }
55594 - }
55595 -
55596 -fail:
55597 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IntVector___setslice__'.\n"
55598 - " Possible C/C++ prototypes are:\n"
55599 - " std::vector< int >::__setslice__(std::vector< int >::difference_type,std::vector< int >::difference_type,std::vector< int,std::allocator< int > > const &)\n"
55600 - " std::vector< int >::__setslice__(std::vector< int >::difference_type,std::vector< int >::difference_type)\n");
55601 - return 0;
55602 -}
55603 -
55604 -
55605 -SWIGINTERN PyObject *_wrap_IntVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55606 - PyObject *resultobj = 0;
55607 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
55608 - std::vector< int >::difference_type arg2 ;
55609 - std::vector< int >::difference_type arg3 ;
55610 - void *argp1 = 0 ;
55611 - int res1 = 0 ;
55612 - ptrdiff_t val2 ;
55613 - int ecode2 = 0 ;
55614 - ptrdiff_t val3 ;
55615 - int ecode3 = 0 ;
55616 - PyObject * obj0 = 0 ;
55617 - PyObject * obj1 = 0 ;
55618 - PyObject * obj2 = 0 ;
55619 -
55620 - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector___delslice__",&obj0,&obj1,&obj2)) SWIG_fail;
55621 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
55622 - if (!SWIG_IsOK(res1)) {
55623 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___delslice__" "', argument " "1"" of type '" "std::vector< int > *""'");
55624 - }
55625 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
55626 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
55627 - if (!SWIG_IsOK(ecode2)) {
55628 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___delslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
55629 - }
55630 - arg2 = static_cast< std::vector< int >::difference_type >(val2);
55631 - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
55632 - if (!SWIG_IsOK(ecode3)) {
55633 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___delslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'");
55634 - }
55635 - arg3 = static_cast< std::vector< int >::difference_type >(val3);
55636 - try {
55637 - std_vector_Sl_int_Sg____delslice__(arg1,arg2,arg3);
55638 - }
55639 - catch(std::out_of_range &_e) {
55640 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
55641 - }
55642 - catch(std::invalid_argument &_e) {
55643 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
55644 - }
55645 -
55646 - resultobj = SWIG_Py_Void();
55647 - return resultobj;
55648 -fail:
55649 - return NULL;
55650 -}
55651 -
55652 -
55653 -SWIGINTERN PyObject *_wrap_IntVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55654 - PyObject *resultobj = 0;
55655 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
55656 - std::vector< int >::difference_type arg2 ;
55657 - void *argp1 = 0 ;
55658 - int res1 = 0 ;
55659 - ptrdiff_t val2 ;
55660 - int ecode2 = 0 ;
55661 - PyObject * obj0 = 0 ;
55662 - PyObject * obj1 = 0 ;
55663 -
55664 - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector___delitem__",&obj0,&obj1)) SWIG_fail;
55665 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
55666 - if (!SWIG_IsOK(res1)) {
55667 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___delitem__" "', argument " "1"" of type '" "std::vector< int > *""'");
55668 - }
55669 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
55670 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
55671 - if (!SWIG_IsOK(ecode2)) {
55672 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___delitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
55673 - }
55674 - arg2 = static_cast< std::vector< int >::difference_type >(val2);
55675 - try {
55676 - std_vector_Sl_int_Sg____delitem____SWIG_0(arg1,arg2);
55677 - }
55678 - catch(std::out_of_range &_e) {
55679 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
55680 - }
55681 -
55682 - resultobj = SWIG_Py_Void();
55683 - return resultobj;
55684 -fail:
55685 - return NULL;
55686 -}
55687 -
55688 -
55689 -SWIGINTERN PyObject *_wrap_IntVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55690 - PyObject *resultobj = 0;
55691 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
55692 - PySliceObject *arg2 = (PySliceObject *) 0 ;
55693 - void *argp1 = 0 ;
55694 - int res1 = 0 ;
55695 - PyObject * obj0 = 0 ;
55696 - PyObject * obj1 = 0 ;
55697 - std::vector< int,std::allocator< int > > *result = 0 ;
55698 -
55699 - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector___getitem__",&obj0,&obj1)) SWIG_fail;
55700 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
55701 - if (!SWIG_IsOK(res1)) {
55702 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___getitem__" "', argument " "1"" of type '" "std::vector< int > *""'");
55703 - }
55704 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
55705 - {
55706 - if (!PySlice_Check(obj1)) {
55707 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'");
55708 - }
55709 - arg2 = (PySliceObject *) obj1;
55710 - }
55711 - try {
55712 - result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getitem____SWIG_0(arg1,arg2);
55713 - }
55714 - catch(std::out_of_range &_e) {
55715 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
55716 - }
55717 - catch(std::invalid_argument &_e) {
55718 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
55719 - }
55720 -
55721 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_OWN | 0 );
55722 - return resultobj;
55723 -fail:
55724 - return NULL;
55725 -}
55726 -
55727 -
55728 -SWIGINTERN PyObject *_wrap_IntVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55729 - PyObject *resultobj = 0;
55730 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
55731 - PySliceObject *arg2 = (PySliceObject *) 0 ;
55732 - std::vector< int,std::allocator< int > > *arg3 = 0 ;
55733 - void *argp1 = 0 ;
55734 - int res1 = 0 ;
55735 - int res3 = SWIG_OLDOBJ ;
55736 - PyObject * obj0 = 0 ;
55737 - PyObject * obj1 = 0 ;
55738 - PyObject * obj2 = 0 ;
55739 -
55740 - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
55741 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
55742 - if (!SWIG_IsOK(res1)) {
55743 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'");
55744 - }
55745 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
55746 - {
55747 - if (!PySlice_Check(obj1)) {
55748 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
55749 - }
55750 - arg2 = (PySliceObject *) obj1;
55751 - }
55752 - {
55753 - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
55754 - res3 = swig::asptr(obj2, &ptr);
55755 - if (!SWIG_IsOK(res3)) {
55756 - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IntVector___setitem__" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > > const &""'");
55757 - }
55758 - if (!ptr) {
55759 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntVector___setitem__" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > > const &""'");
55760 - }
55761 - arg3 = ptr;
55762 - }
55763 - try {
55764 - std_vector_Sl_int_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< int,std::allocator< int > > const &)*arg3);
55765 - }
55766 - catch(std::out_of_range &_e) {
55767 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
55768 - }
55769 - catch(std::invalid_argument &_e) {
55770 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
55771 - }
55772 -
55773 - resultobj = SWIG_Py_Void();
55774 - if (SWIG_IsNewObj(res3)) delete arg3;
55775 - return resultobj;
55776 -fail:
55777 - if (SWIG_IsNewObj(res3)) delete arg3;
55778 - return NULL;
55779 -}
55780 -
55781 -
55782 -SWIGINTERN PyObject *_wrap_IntVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55783 - PyObject *resultobj = 0;
55784 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
55785 - PySliceObject *arg2 = (PySliceObject *) 0 ;
55786 - void *argp1 = 0 ;
55787 - int res1 = 0 ;
55788 - PyObject * obj0 = 0 ;
55789 - PyObject * obj1 = 0 ;
55790 -
55791 - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector___setitem__",&obj0,&obj1)) SWIG_fail;
55792 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
55793 - if (!SWIG_IsOK(res1)) {
55794 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'");
55795 - }
55796 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
55797 - {
55798 - if (!PySlice_Check(obj1)) {
55799 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
55800 - }
55801 - arg2 = (PySliceObject *) obj1;
55802 - }
55803 - try {
55804 - std_vector_Sl_int_Sg____setitem____SWIG_1(arg1,arg2);
55805 - }
55806 - catch(std::out_of_range &_e) {
55807 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
55808 - }
55809 - catch(std::invalid_argument &_e) {
55810 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
55811 - }
55812 -
55813 - resultobj = SWIG_Py_Void();
55814 - return resultobj;
55815 -fail:
55816 - return NULL;
55817 -}
55818 -
55819 -
55820 -SWIGINTERN PyObject *_wrap_IntVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55821 - PyObject *resultobj = 0;
55822 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
55823 - PySliceObject *arg2 = (PySliceObject *) 0 ;
55824 - void *argp1 = 0 ;
55825 - int res1 = 0 ;
55826 - PyObject * obj0 = 0 ;
55827 - PyObject * obj1 = 0 ;
55828 -
55829 - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector___delitem__",&obj0,&obj1)) SWIG_fail;
55830 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
55831 - if (!SWIG_IsOK(res1)) {
55832 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___delitem__" "', argument " "1"" of type '" "std::vector< int > *""'");
55833 - }
55834 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
55835 - {
55836 - if (!PySlice_Check(obj1)) {
55837 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'");
55838 - }
55839 - arg2 = (PySliceObject *) obj1;
55840 - }
55841 - try {
55842 - std_vector_Sl_int_Sg____delitem____SWIG_1(arg1,arg2);
55843 - }
55844 - catch(std::out_of_range &_e) {
55845 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
55846 - }
55847 - catch(std::invalid_argument &_e) {
55848 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
55849 - }
55850 -
55851 - resultobj = SWIG_Py_Void();
55852 - return resultobj;
55853 -fail:
55854 - return NULL;
55855 -}
55856 -
55857 -
55858 -SWIGINTERN PyObject *_wrap_IntVector___delitem__(PyObject *self, PyObject *args) {
55859 - int argc;
55860 - PyObject *argv[3];
55861 - int ii;
55862 -
55863 - if (!PyTuple_Check(args)) SWIG_fail;
55864 - argc = args ? (int)PyObject_Length(args) : 0;
55865 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
55866 - argv[ii] = PyTuple_GET_ITEM(args,ii);
55867 - }
55868 - if (argc == 2) {
55869 - int _v;
55870 - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
55871 - _v = SWIG_CheckState(res);
55872 - if (_v) {
55873 - {
55874 - _v = PySlice_Check(argv[1]);
55875 - }
55876 - if (_v) {
55877 - return _wrap_IntVector___delitem____SWIG_1(self, args);
55878 - }
55879 - }
55880 - }
55881 - if (argc == 2) {
55882 - int _v;
55883 - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
55884 - _v = SWIG_CheckState(res);
55885 - if (_v) {
55886 - {
55887 - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
55888 - _v = SWIG_CheckState(res);
55889 - }
55890 - if (_v) {
55891 - return _wrap_IntVector___delitem____SWIG_0(self, args);
55892 - }
55893 - }
55894 - }
55895 -
55896 -fail:
55897 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IntVector___delitem__'.\n"
55898 - " Possible C/C++ prototypes are:\n"
55899 - " std::vector< int >::__delitem__(std::vector< int >::difference_type)\n"
55900 - " std::vector< int >::__delitem__(PySliceObject *)\n");
55901 - return 0;
55902 -}
55903 -
55904 -
55905 -SWIGINTERN PyObject *_wrap_IntVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55906 - PyObject *resultobj = 0;
55907 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
55908 - std::vector< int >::difference_type arg2 ;
55909 - void *argp1 = 0 ;
55910 - int res1 = 0 ;
55911 - ptrdiff_t val2 ;
55912 - int ecode2 = 0 ;
55913 - PyObject * obj0 = 0 ;
55914 - PyObject * obj1 = 0 ;
55915 - std::vector< int >::value_type *result = 0 ;
55916 -
55917 - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector___getitem__",&obj0,&obj1)) SWIG_fail;
55918 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
55919 - if (!SWIG_IsOK(res1)) {
55920 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___getitem__" "', argument " "1"" of type '" "std::vector< int > const *""'");
55921 - }
55922 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
55923 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
55924 - if (!SWIG_IsOK(ecode2)) {
55925 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___getitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
55926 - }
55927 - arg2 = static_cast< std::vector< int >::difference_type >(val2);
55928 - try {
55929 - result = (std::vector< int >::value_type *) &std_vector_Sl_int_Sg____getitem____SWIG_1((std::vector< int > const *)arg1,arg2);
55930 - }
55931 - catch(std::out_of_range &_e) {
55932 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
55933 - }
55934 -
55935 - resultobj = SWIG_From_int(static_cast< int >(*result));
55936 - return resultobj;
55937 -fail:
55938 - return NULL;
55939 -}
55940 -
55941 -
55942 -SWIGINTERN PyObject *_wrap_IntVector___getitem__(PyObject *self, PyObject *args) {
55943 - int argc;
55944 - PyObject *argv[3];
55945 - int ii;
55946 -
55947 - if (!PyTuple_Check(args)) SWIG_fail;
55948 - argc = args ? (int)PyObject_Length(args) : 0;
55949 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
55950 - argv[ii] = PyTuple_GET_ITEM(args,ii);
55951 - }
55952 - if (argc == 2) {
55953 - int _v;
55954 - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
55955 - _v = SWIG_CheckState(res);
55956 - if (_v) {
55957 - {
55958 - _v = PySlice_Check(argv[1]);
55959 - }
55960 - if (_v) {
55961 - return _wrap_IntVector___getitem____SWIG_0(self, args);
55962 - }
55963 - }
55964 - }
55965 - if (argc == 2) {
55966 - int _v;
55967 - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
55968 - _v = SWIG_CheckState(res);
55969 - if (_v) {
55970 - {
55971 - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
55972 - _v = SWIG_CheckState(res);
55973 - }
55974 - if (_v) {
55975 - return _wrap_IntVector___getitem____SWIG_1(self, args);
55976 - }
55977 - }
55978 - }
55979 -
55980 -fail:
55981 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IntVector___getitem__'.\n"
55982 - " Possible C/C++ prototypes are:\n"
55983 - " std::vector< int >::__getitem__(PySliceObject *)\n"
55984 - " std::vector< int >::__getitem__(std::vector< int >::difference_type) const\n");
55985 - return 0;
55986 -}
55987 -
55988 -
55989 -SWIGINTERN PyObject *_wrap_IntVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55990 - PyObject *resultobj = 0;
55991 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
55992 - std::vector< int >::difference_type arg2 ;
55993 - std::vector< int >::value_type *arg3 = 0 ;
55994 - void *argp1 = 0 ;
55995 - int res1 = 0 ;
55996 - ptrdiff_t val2 ;
55997 - int ecode2 = 0 ;
55998 - std::vector< int >::value_type temp3 ;
55999 - int val3 ;
56000 - int ecode3 = 0 ;
56001 - PyObject * obj0 = 0 ;
56002 - PyObject * obj1 = 0 ;
56003 - PyObject * obj2 = 0 ;
56004 -
56005 - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
56006 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56007 - if (!SWIG_IsOK(res1)) {
56008 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'");
56009 - }
56010 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56011 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
56012 - if (!SWIG_IsOK(ecode2)) {
56013 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___setitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
56014 - }
56015 - arg2 = static_cast< std::vector< int >::difference_type >(val2);
56016 - ecode3 = SWIG_AsVal_int(obj2, &val3);
56017 - if (!SWIG_IsOK(ecode3)) {
56018 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___setitem__" "', argument " "3"" of type '" "std::vector< int >::value_type""'");
56019 - }
56020 - temp3 = static_cast< std::vector< int >::value_type >(val3);
56021 - arg3 = &temp3;
56022 - try {
56023 - std_vector_Sl_int_Sg____setitem____SWIG_2(arg1,arg2,(int const &)*arg3);
56024 - }
56025 - catch(std::out_of_range &_e) {
56026 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
56027 - }
56028 -
56029 - resultobj = SWIG_Py_Void();
56030 - return resultobj;
56031 -fail:
56032 - return NULL;
56033 -}
56034 -
56035 -
56036 -SWIGINTERN PyObject *_wrap_IntVector___setitem__(PyObject *self, PyObject *args) {
56037 - int argc;
56038 - PyObject *argv[4];
56039 - int ii;
56040 -
56041 - if (!PyTuple_Check(args)) SWIG_fail;
56042 - argc = args ? (int)PyObject_Length(args) : 0;
56043 - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
56044 - argv[ii] = PyTuple_GET_ITEM(args,ii);
56045 - }
56046 - if (argc == 2) {
56047 - int _v;
56048 - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
56049 - _v = SWIG_CheckState(res);
56050 - if (_v) {
56051 - {
56052 - _v = PySlice_Check(argv[1]);
56053 - }
56054 - if (_v) {
56055 - return _wrap_IntVector___setitem____SWIG_1(self, args);
56056 - }
56057 - }
56058 - }
56059 - if (argc == 3) {
56060 - int _v;
56061 - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
56062 - _v = SWIG_CheckState(res);
56063 - if (_v) {
56064 - {
56065 - _v = PySlice_Check(argv[1]);
56066 - }
56067 - if (_v) {
56068 - int res = swig::asptr(argv[2], (std::vector<int,std::allocator< int > >**)(0));
56069 - _v = SWIG_CheckState(res);
56070 - if (_v) {
56071 - return _wrap_IntVector___setitem____SWIG_0(self, args);
56072 - }
56073 - }
56074 - }
56075 - }
56076 - if (argc == 3) {
56077 - int _v;
56078 - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
56079 - _v = SWIG_CheckState(res);
56080 - if (_v) {
56081 - {
56082 - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
56083 - _v = SWIG_CheckState(res);
56084 - }
56085 - if (_v) {
56086 - {
56087 - int res = SWIG_AsVal_int(argv[2], NULL);
56088 - _v = SWIG_CheckState(res);
56089 - }
56090 - if (_v) {
56091 - return _wrap_IntVector___setitem____SWIG_2(self, args);
56092 - }
56093 - }
56094 - }
56095 - }
56096 -
56097 -fail:
56098 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IntVector___setitem__'.\n"
56099 - " Possible C/C++ prototypes are:\n"
56100 - " std::vector< int >::__setitem__(PySliceObject *,std::vector< int,std::allocator< int > > const &)\n"
56101 - " std::vector< int >::__setitem__(PySliceObject *)\n"
56102 - " std::vector< int >::__setitem__(std::vector< int >::difference_type,std::vector< int >::value_type const &)\n");
56103 - return 0;
56104 -}
56105 -
56106 -
56107 -SWIGINTERN PyObject *_wrap_IntVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56108 - PyObject *resultobj = 0;
56109 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
56110 - std::vector< int >::value_type *arg2 = 0 ;
56111 - void *argp1 = 0 ;
56112 - int res1 = 0 ;
56113 - std::vector< int >::value_type temp2 ;
56114 - int val2 ;
56115 - int ecode2 = 0 ;
56116 - PyObject * obj0 = 0 ;
56117 - PyObject * obj1 = 0 ;
56118 -
56119 - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_append",&obj0,&obj1)) SWIG_fail;
56120 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56121 - if (!SWIG_IsOK(res1)) {
56122 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_append" "', argument " "1"" of type '" "std::vector< int > *""'");
56123 - }
56124 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56125 - ecode2 = SWIG_AsVal_int(obj1, &val2);
56126 - if (!SWIG_IsOK(ecode2)) {
56127 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_append" "', argument " "2"" of type '" "std::vector< int >::value_type""'");
56128 - }
56129 - temp2 = static_cast< std::vector< int >::value_type >(val2);
56130 - arg2 = &temp2;
56131 - std_vector_Sl_int_Sg__append(arg1,(int const &)*arg2);
56132 - resultobj = SWIG_Py_Void();
56133 - return resultobj;
56134 -fail:
56135 - return NULL;
56136 -}
56137 -
56138 -
56139 -SWIGINTERN PyObject *_wrap_new_IntVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56140 - PyObject *resultobj = 0;
56141 - std::vector< int > *result = 0 ;
56142 -
56143 - if (!PyArg_ParseTuple(args,(char *)":new_IntVector")) SWIG_fail;
56144 - result = (std::vector< int > *)new std::vector< int >();
56145 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 );
56146 - return resultobj;
56147 -fail:
56148 - return NULL;
56149 -}
56150 -
56151 -
56152 -SWIGINTERN PyObject *_wrap_new_IntVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56153 - PyObject *resultobj = 0;
56154 - std::vector< int > *arg1 = 0 ;
56155 - int res1 = SWIG_OLDOBJ ;
56156 - PyObject * obj0 = 0 ;
56157 - std::vector< int > *result = 0 ;
56158 -
56159 - if (!PyArg_ParseTuple(args,(char *)"O:new_IntVector",&obj0)) SWIG_fail;
56160 - {
56161 - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
56162 - res1 = swig::asptr(obj0, &ptr);
56163 - if (!SWIG_IsOK(res1)) {
56164 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IntVector" "', argument " "1"" of type '" "std::vector< int > const &""'");
56165 - }
56166 - if (!ptr) {
56167 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IntVector" "', argument " "1"" of type '" "std::vector< int > const &""'");
56168 - }
56169 - arg1 = ptr;
56170 - }
56171 - result = (std::vector< int > *)new std::vector< int >((std::vector< int > const &)*arg1);
56172 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 );
56173 - if (SWIG_IsNewObj(res1)) delete arg1;
56174 - return resultobj;
56175 -fail:
56176 - if (SWIG_IsNewObj(res1)) delete arg1;
56177 - return NULL;
56178 -}
56179 -
56180 -
56181 -SWIGINTERN PyObject *_wrap_IntVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56182 - PyObject *resultobj = 0;
56183 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
56184 - void *argp1 = 0 ;
56185 - int res1 = 0 ;
56186 - PyObject * obj0 = 0 ;
56187 - bool result;
56188 -
56189 - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_empty",&obj0)) SWIG_fail;
56190 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56191 - if (!SWIG_IsOK(res1)) {
56192 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_empty" "', argument " "1"" of type '" "std::vector< int > const *""'");
56193 - }
56194 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56195 - result = (bool)((std::vector< int > const *)arg1)->empty();
56196 - resultobj = SWIG_From_bool(static_cast< bool >(result));
56197 - return resultobj;
56198 -fail:
56199 - return NULL;
56200 -}
56201 -
56202 -
56203 -SWIGINTERN PyObject *_wrap_IntVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56204 - PyObject *resultobj = 0;
56205 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
56206 - void *argp1 = 0 ;
56207 - int res1 = 0 ;
56208 - PyObject * obj0 = 0 ;
56209 - std::vector< int >::size_type result;
56210 -
56211 - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_size",&obj0)) SWIG_fail;
56212 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56213 - if (!SWIG_IsOK(res1)) {
56214 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_size" "', argument " "1"" of type '" "std::vector< int > const *""'");
56215 - }
56216 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56217 - result = ((std::vector< int > const *)arg1)->size();
56218 - resultobj = SWIG_From_size_t(static_cast< size_t >(result));
56219 - return resultobj;
56220 -fail:
56221 - return NULL;
56222 -}
56223 -
56224 -
56225 -SWIGINTERN PyObject *_wrap_IntVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56226 - PyObject *resultobj = 0;
56227 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
56228 - void *argp1 = 0 ;
56229 - int res1 = 0 ;
56230 - PyObject * obj0 = 0 ;
56231 -
56232 - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_clear",&obj0)) SWIG_fail;
56233 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56234 - if (!SWIG_IsOK(res1)) {
56235 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_clear" "', argument " "1"" of type '" "std::vector< int > *""'");
56236 - }
56237 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56238 - (arg1)->clear();
56239 - resultobj = SWIG_Py_Void();
56240 - return resultobj;
56241 -fail:
56242 - return NULL;
56243 -}
56244 -
56245 -
56246 -SWIGINTERN PyObject *_wrap_IntVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56247 - PyObject *resultobj = 0;
56248 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
56249 - std::vector< int > *arg2 = 0 ;
56250 - void *argp1 = 0 ;
56251 - int res1 = 0 ;
56252 - void *argp2 = 0 ;
56253 - int res2 = 0 ;
56254 - PyObject * obj0 = 0 ;
56255 - PyObject * obj1 = 0 ;
56256 -
56257 - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_swap",&obj0,&obj1)) SWIG_fail;
56258 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56259 - if (!SWIG_IsOK(res1)) {
56260 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_swap" "', argument " "1"" of type '" "std::vector< int > *""'");
56261 - }
56262 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56263 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 );
56264 - if (!SWIG_IsOK(res2)) {
56265 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntVector_swap" "', argument " "2"" of type '" "std::vector< int > &""'");
56266 - }
56267 - if (!argp2) {
56268 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntVector_swap" "', argument " "2"" of type '" "std::vector< int > &""'");
56269 - }
56270 - arg2 = reinterpret_cast< std::vector< int > * >(argp2);
56271 - (arg1)->swap(*arg2);
56272 - resultobj = SWIG_Py_Void();
56273 - return resultobj;
56274 -fail:
56275 - return NULL;
56276 -}
56277 -
56278 -
56279 -SWIGINTERN PyObject *_wrap_IntVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56280 - PyObject *resultobj = 0;
56281 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
56282 - void *argp1 = 0 ;
56283 - int res1 = 0 ;
56284 - PyObject * obj0 = 0 ;
56285 - SwigValueWrapper< std::allocator< int > > result;
56286 -
56287 - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_get_allocator",&obj0)) SWIG_fail;
56288 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56289 - if (!SWIG_IsOK(res1)) {
56290 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_get_allocator" "', argument " "1"" of type '" "std::vector< int > const *""'");
56291 - }
56292 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56293 - result = ((std::vector< int > const *)arg1)->get_allocator();
56294 - resultobj = SWIG_NewPointerObj((new std::vector< int >::allocator_type(static_cast< const std::vector< int >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_int_t, SWIG_POINTER_OWN | 0 );
56295 - return resultobj;
56296 -fail:
56297 - return NULL;
56298 -}
56299 -
56300 -
56301 -SWIGINTERN PyObject *_wrap_IntVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56302 - PyObject *resultobj = 0;
56303 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
56304 - void *argp1 = 0 ;
56305 - int res1 = 0 ;
56306 - PyObject * obj0 = 0 ;
56307 - std::vector< int >::iterator result;
56308 -
56309 - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_begin",&obj0)) SWIG_fail;
56310 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56311 - if (!SWIG_IsOK(res1)) {
56312 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_begin" "', argument " "1"" of type '" "std::vector< int > *""'");
56313 - }
56314 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56315 - result = (arg1)->begin();
56316 - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)),
56317 - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
56318 - return resultobj;
56319 -fail:
56320 - return NULL;
56321 -}
56322 -
56323 -
56324 -SWIGINTERN PyObject *_wrap_IntVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56325 - PyObject *resultobj = 0;
56326 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
56327 - void *argp1 = 0 ;
56328 - int res1 = 0 ;
56329 - PyObject * obj0 = 0 ;
56330 - std::vector< int >::iterator result;
56331 -
56332 - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_end",&obj0)) SWIG_fail;
56333 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56334 - if (!SWIG_IsOK(res1)) {
56335 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_end" "', argument " "1"" of type '" "std::vector< int > *""'");
56336 - }
56337 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56338 - result = (arg1)->end();
56339 - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)),
56340 - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
56341 - return resultobj;
56342 -fail:
56343 - return NULL;
56344 -}
56345 -
56346 -
56347 -SWIGINTERN PyObject *_wrap_IntVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56348 - PyObject *resultobj = 0;
56349 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
56350 - void *argp1 = 0 ;
56351 - int res1 = 0 ;
56352 - PyObject * obj0 = 0 ;
56353 - std::vector< int >::reverse_iterator result;
56354 -
56355 - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_rbegin",&obj0)) SWIG_fail;
56356 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56357 - if (!SWIG_IsOK(res1)) {
56358 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_rbegin" "', argument " "1"" of type '" "std::vector< int > *""'");
56359 - }
56360 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56361 - result = (arg1)->rbegin();
56362 - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::reverse_iterator & >(result)),
56363 - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
56364 - return resultobj;
56365 -fail:
56366 - return NULL;
56367 -}
56368 -
56369 -
56370 -SWIGINTERN PyObject *_wrap_IntVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56371 - PyObject *resultobj = 0;
56372 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
56373 - void *argp1 = 0 ;
56374 - int res1 = 0 ;
56375 - PyObject * obj0 = 0 ;
56376 - std::vector< int >::reverse_iterator result;
56377 -
56378 - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_rend",&obj0)) SWIG_fail;
56379 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56380 - if (!SWIG_IsOK(res1)) {
56381 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_rend" "', argument " "1"" of type '" "std::vector< int > *""'");
56382 - }
56383 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56384 - result = (arg1)->rend();
56385 - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::reverse_iterator & >(result)),
56386 - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
56387 - return resultobj;
56388 -fail:
56389 - return NULL;
56390 -}
56391 -
56392 -
56393 -SWIGINTERN PyObject *_wrap_new_IntVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56394 - PyObject *resultobj = 0;
56395 - std::vector< int >::size_type arg1 ;
56396 - size_t val1 ;
56397 - int ecode1 = 0 ;
56398 - PyObject * obj0 = 0 ;
56399 - std::vector< int > *result = 0 ;
56400 -
56401 - if (!PyArg_ParseTuple(args,(char *)"O:new_IntVector",&obj0)) SWIG_fail;
56402 - ecode1 = SWIG_AsVal_size_t(obj0, &val1);
56403 - if (!SWIG_IsOK(ecode1)) {
56404 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntVector" "', argument " "1"" of type '" "std::vector< int >::size_type""'");
56405 - }
56406 - arg1 = static_cast< std::vector< int >::size_type >(val1);
56407 - result = (std::vector< int > *)new std::vector< int >(arg1);
56408 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 );
56409 - return resultobj;
56410 -fail:
56411 - return NULL;
56412 -}
56413 -
56414 -
56415 -SWIGINTERN PyObject *_wrap_IntVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56416 - PyObject *resultobj = 0;
56417 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
56418 - void *argp1 = 0 ;
56419 - int res1 = 0 ;
56420 - PyObject * obj0 = 0 ;
56421 -
56422 - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_pop_back",&obj0)) SWIG_fail;
56423 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56424 - if (!SWIG_IsOK(res1)) {
56425 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_pop_back" "', argument " "1"" of type '" "std::vector< int > *""'");
56426 - }
56427 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56428 - (arg1)->pop_back();
56429 - resultobj = SWIG_Py_Void();
56430 - return resultobj;
56431 -fail:
56432 - return NULL;
56433 -}
56434 -
56435 -
56436 -SWIGINTERN PyObject *_wrap_IntVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56437 - PyObject *resultobj = 0;
56438 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
56439 - std::vector< int >::size_type arg2 ;
56440 - void *argp1 = 0 ;
56441 - int res1 = 0 ;
56442 - size_t val2 ;
56443 - int ecode2 = 0 ;
56444 - PyObject * obj0 = 0 ;
56445 - PyObject * obj1 = 0 ;
56446 -
56447 - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_resize",&obj0,&obj1)) SWIG_fail;
56448 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56449 - if (!SWIG_IsOK(res1)) {
56450 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_resize" "', argument " "1"" of type '" "std::vector< int > *""'");
56451 - }
56452 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56453 - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
56454 - if (!SWIG_IsOK(ecode2)) {
56455 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'");
56456 - }
56457 - arg2 = static_cast< std::vector< int >::size_type >(val2);
56458 - (arg1)->resize(arg2);
56459 - resultobj = SWIG_Py_Void();
56460 - return resultobj;
56461 -fail:
56462 - return NULL;
56463 -}
56464 -
56465 -
56466 -SWIGINTERN PyObject *_wrap_IntVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56467 - PyObject *resultobj = 0;
56468 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
56469 - std::vector< int >::iterator arg2 ;
56470 - void *argp1 = 0 ;
56471 - int res1 = 0 ;
56472 - swig::SwigPyIterator *iter2 = 0 ;
56473 - int res2 ;
56474 - PyObject * obj0 = 0 ;
56475 - PyObject * obj1 = 0 ;
56476 - std::vector< int >::iterator result;
56477 -
56478 - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_erase",&obj0,&obj1)) SWIG_fail;
56479 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56480 - if (!SWIG_IsOK(res1)) {
56481 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_erase" "', argument " "1"" of type '" "std::vector< int > *""'");
56482 - }
56483 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56484 - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
56485 - if (!SWIG_IsOK(res2) || !iter2) {
56486 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
56487 - } else {
56488 - swig::SwigPyIterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter2);
56489 - if (iter_t) {
56490 - arg2 = iter_t->get_current();
56491 - } else {
56492 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
56493 - }
56494 - }
56495 - result = (arg1)->erase(arg2);
56496 - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)),
56497 - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
56498 - return resultobj;
56499 -fail:
56500 - return NULL;
56501 -}
56502 -
56503 -
56504 -SWIGINTERN PyObject *_wrap_IntVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56505 - PyObject *resultobj = 0;
56506 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
56507 - std::vector< int >::iterator arg2 ;
56508 - std::vector< int >::iterator arg3 ;
56509 - void *argp1 = 0 ;
56510 - int res1 = 0 ;
56511 - swig::SwigPyIterator *iter2 = 0 ;
56512 - int res2 ;
56513 - swig::SwigPyIterator *iter3 = 0 ;
56514 - int res3 ;
56515 - PyObject * obj0 = 0 ;
56516 - PyObject * obj1 = 0 ;
56517 - PyObject * obj2 = 0 ;
56518 - std::vector< int >::iterator result;
56519 -
56520 - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector_erase",&obj0,&obj1,&obj2)) SWIG_fail;
56521 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56522 - if (!SWIG_IsOK(res1)) {
56523 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_erase" "', argument " "1"" of type '" "std::vector< int > *""'");
56524 - }
56525 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56526 - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
56527 - if (!SWIG_IsOK(res2) || !iter2) {
56528 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
56529 - } else {
56530 - swig::SwigPyIterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter2);
56531 - if (iter_t) {
56532 - arg2 = iter_t->get_current();
56533 - } else {
56534 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
56535 - }
56536 - }
56537 - res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0);
56538 - if (!SWIG_IsOK(res3) || !iter3) {
56539 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'");
56540 - } else {
56541 - swig::SwigPyIterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter3);
56542 - if (iter_t) {
56543 - arg3 = iter_t->get_current();
56544 - } else {
56545 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'");
56546 - }
56547 - }
56548 - result = (arg1)->erase(arg2,arg3);
56549 - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)),
56550 - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
56551 - return resultobj;
56552 -fail:
56553 - return NULL;
56554 -}
56555 -
56556 -
56557 -SWIGINTERN PyObject *_wrap_IntVector_erase(PyObject *self, PyObject *args) {
56558 - int argc;
56559 - PyObject *argv[4];
56560 - int ii;
56561 -
56562 - if (!PyTuple_Check(args)) SWIG_fail;
56563 - argc = args ? (int)PyObject_Length(args) : 0;
56564 - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
56565 - argv[ii] = PyTuple_GET_ITEM(args,ii);
56566 - }
56567 - if (argc == 2) {
56568 - int _v;
56569 - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
56570 - _v = SWIG_CheckState(res);
56571 - if (_v) {
56572 - swig::SwigPyIterator *iter = 0;
56573 - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
56574 - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter) != 0));
56575 - if (_v) {
56576 - return _wrap_IntVector_erase__SWIG_0(self, args);
56577 - }
56578 - }
56579 - }
56580 - if (argc == 3) {
56581 - int _v;
56582 - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
56583 - _v = SWIG_CheckState(res);
56584 - if (_v) {
56585 - swig::SwigPyIterator *iter = 0;
56586 - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
56587 - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter) != 0));
56588 - if (_v) {
56589 - swig::SwigPyIterator *iter = 0;
56590 - int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
56591 - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter) != 0));
56592 - if (_v) {
56593 - return _wrap_IntVector_erase__SWIG_1(self, args);
56594 - }
56595 - }
56596 - }
56597 - }
56598 -
56599 -fail:
56600 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IntVector_erase'.\n"
56601 - " Possible C/C++ prototypes are:\n"
56602 - " std::vector< int >::erase(std::vector< int >::iterator)\n"
56603 - " std::vector< int >::erase(std::vector< int >::iterator,std::vector< int >::iterator)\n");
56604 - return 0;
56605 -}
56606 -
56607 -
56608 -SWIGINTERN PyObject *_wrap_new_IntVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56609 - PyObject *resultobj = 0;
56610 - std::vector< int >::size_type arg1 ;
56611 - std::vector< int >::value_type *arg2 = 0 ;
56612 - size_t val1 ;
56613 - int ecode1 = 0 ;
56614 - std::vector< int >::value_type temp2 ;
56615 - int val2 ;
56616 - int ecode2 = 0 ;
56617 - PyObject * obj0 = 0 ;
56618 - PyObject * obj1 = 0 ;
56619 - std::vector< int > *result = 0 ;
56620 -
56621 - if (!PyArg_ParseTuple(args,(char *)"OO:new_IntVector",&obj0,&obj1)) SWIG_fail;
56622 - ecode1 = SWIG_AsVal_size_t(obj0, &val1);
56623 - if (!SWIG_IsOK(ecode1)) {
56624 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntVector" "', argument " "1"" of type '" "std::vector< int >::size_type""'");
56625 - }
56626 - arg1 = static_cast< std::vector< int >::size_type >(val1);
56627 - ecode2 = SWIG_AsVal_int(obj1, &val2);
56628 - if (!SWIG_IsOK(ecode2)) {
56629 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IntVector" "', argument " "2"" of type '" "std::vector< int >::value_type""'");
56630 - }
56631 - temp2 = static_cast< std::vector< int >::value_type >(val2);
56632 - arg2 = &temp2;
56633 - result = (std::vector< int > *)new std::vector< int >(arg1,(std::vector< int >::value_type const &)*arg2);
56634 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 );
56635 - return resultobj;
56636 -fail:
56637 - return NULL;
56638 -}
56639 -
56640 -
56641 -SWIGINTERN PyObject *_wrap_new_IntVector(PyObject *self, PyObject *args) {
56642 - int argc;
56643 - PyObject *argv[3];
56644 - int ii;
56645 -
56646 - if (!PyTuple_Check(args)) SWIG_fail;
56647 - argc = args ? (int)PyObject_Length(args) : 0;
56648 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
56649 - argv[ii] = PyTuple_GET_ITEM(args,ii);
56650 - }
56651 - if (argc == 0) {
56652 - return _wrap_new_IntVector__SWIG_0(self, args);
56653 - }
56654 - if (argc == 1) {
56655 - int _v;
56656 - {
56657 - int res = SWIG_AsVal_size_t(argv[0], NULL);
56658 - _v = SWIG_CheckState(res);
56659 - }
56660 - if (_v) {
56661 - return _wrap_new_IntVector__SWIG_2(self, args);
56662 - }
56663 - }
56664 - if (argc == 1) {
56665 - int _v;
56666 - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
56667 - _v = SWIG_CheckState(res);
56668 - if (_v) {
56669 - return _wrap_new_IntVector__SWIG_1(self, args);
56670 - }
56671 - }
56672 - if (argc == 2) {
56673 - int _v;
56674 - {
56675 - int res = SWIG_AsVal_size_t(argv[0], NULL);
56676 - _v = SWIG_CheckState(res);
56677 - }
56678 - if (_v) {
56679 - {
56680 - int res = SWIG_AsVal_int(argv[1], NULL);
56681 - _v = SWIG_CheckState(res);
56682 - }
56683 - if (_v) {
56684 - return _wrap_new_IntVector__SWIG_3(self, args);
56685 - }
56686 - }
56687 - }
56688 -
56689 -fail:
56690 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IntVector'.\n"
56691 - " Possible C/C++ prototypes are:\n"
56692 - " std::vector< int >::vector()\n"
56693 - " std::vector< int >::vector(std::vector< int > const &)\n"
56694 - " std::vector< int >::vector(std::vector< int >::size_type)\n"
56695 - " std::vector< int >::vector(std::vector< int >::size_type,std::vector< int >::value_type const &)\n");
56696 - return 0;
56697 -}
56698 -
56699 -
56700 -SWIGINTERN PyObject *_wrap_IntVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56701 - PyObject *resultobj = 0;
56702 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
56703 - std::vector< int >::value_type *arg2 = 0 ;
56704 - void *argp1 = 0 ;
56705 - int res1 = 0 ;
56706 - std::vector< int >::value_type temp2 ;
56707 - int val2 ;
56708 - int ecode2 = 0 ;
56709 - PyObject * obj0 = 0 ;
56710 - PyObject * obj1 = 0 ;
56711 -
56712 - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_push_back",&obj0,&obj1)) SWIG_fail;
56713 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56714 - if (!SWIG_IsOK(res1)) {
56715 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_push_back" "', argument " "1"" of type '" "std::vector< int > *""'");
56716 - }
56717 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56718 - ecode2 = SWIG_AsVal_int(obj1, &val2);
56719 - if (!SWIG_IsOK(ecode2)) {
56720 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_push_back" "', argument " "2"" of type '" "std::vector< int >::value_type""'");
56721 - }
56722 - temp2 = static_cast< std::vector< int >::value_type >(val2);
56723 - arg2 = &temp2;
56724 - (arg1)->push_back((std::vector< int >::value_type const &)*arg2);
56725 - resultobj = SWIG_Py_Void();
56726 - return resultobj;
56727 -fail:
56728 - return NULL;
56729 -}
56730 -
56731 -
56732 -SWIGINTERN PyObject *_wrap_IntVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56733 - PyObject *resultobj = 0;
56734 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
56735 - void *argp1 = 0 ;
56736 - int res1 = 0 ;
56737 - PyObject * obj0 = 0 ;
56738 - std::vector< int >::value_type *result = 0 ;
56739 -
56740 - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_front",&obj0)) SWIG_fail;
56741 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56742 - if (!SWIG_IsOK(res1)) {
56743 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_front" "', argument " "1"" of type '" "std::vector< int > const *""'");
56744 - }
56745 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56746 - result = (std::vector< int >::value_type *) &((std::vector< int > const *)arg1)->front();
56747 - resultobj = SWIG_From_int(static_cast< int >(*result));
56748 - return resultobj;
56749 -fail:
56750 - return NULL;
56751 -}
56752 -
56753 -
56754 -SWIGINTERN PyObject *_wrap_IntVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56755 - PyObject *resultobj = 0;
56756 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
56757 - void *argp1 = 0 ;
56758 - int res1 = 0 ;
56759 - PyObject * obj0 = 0 ;
56760 - std::vector< int >::value_type *result = 0 ;
56761 -
56762 - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_back",&obj0)) SWIG_fail;
56763 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56764 - if (!SWIG_IsOK(res1)) {
56765 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_back" "', argument " "1"" of type '" "std::vector< int > const *""'");
56766 - }
56767 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56768 - result = (std::vector< int >::value_type *) &((std::vector< int > const *)arg1)->back();
56769 - resultobj = SWIG_From_int(static_cast< int >(*result));
56770 - return resultobj;
56771 -fail:
56772 - return NULL;
56773 -}
56774 -
56775 -
56776 -SWIGINTERN PyObject *_wrap_IntVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56777 - PyObject *resultobj = 0;
56778 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
56779 - std::vector< int >::size_type arg2 ;
56780 - std::vector< int >::value_type *arg3 = 0 ;
56781 - void *argp1 = 0 ;
56782 - int res1 = 0 ;
56783 - size_t val2 ;
56784 - int ecode2 = 0 ;
56785 - std::vector< int >::value_type temp3 ;
56786 - int val3 ;
56787 - int ecode3 = 0 ;
56788 - PyObject * obj0 = 0 ;
56789 - PyObject * obj1 = 0 ;
56790 - PyObject * obj2 = 0 ;
56791 -
56792 - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector_assign",&obj0,&obj1,&obj2)) SWIG_fail;
56793 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56794 - if (!SWIG_IsOK(res1)) {
56795 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_assign" "', argument " "1"" of type '" "std::vector< int > *""'");
56796 - }
56797 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56798 - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
56799 - if (!SWIG_IsOK(ecode2)) {
56800 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_assign" "', argument " "2"" of type '" "std::vector< int >::size_type""'");
56801 - }
56802 - arg2 = static_cast< std::vector< int >::size_type >(val2);
56803 - ecode3 = SWIG_AsVal_int(obj2, &val3);
56804 - if (!SWIG_IsOK(ecode3)) {
56805 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_assign" "', argument " "3"" of type '" "std::vector< int >::value_type""'");
56806 - }
56807 - temp3 = static_cast< std::vector< int >::value_type >(val3);
56808 - arg3 = &temp3;
56809 - (arg1)->assign(arg2,(std::vector< int >::value_type const &)*arg3);
56810 - resultobj = SWIG_Py_Void();
56811 - return resultobj;
56812 -fail:
56813 - return NULL;
56814 -}
56815 -
56816 -
56817 -SWIGINTERN PyObject *_wrap_IntVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56818 - PyObject *resultobj = 0;
56819 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
56820 - std::vector< int >::size_type arg2 ;
56821 - std::vector< int >::value_type *arg3 = 0 ;
56822 - void *argp1 = 0 ;
56823 - int res1 = 0 ;
56824 - size_t val2 ;
56825 - int ecode2 = 0 ;
56826 - std::vector< int >::value_type temp3 ;
56827 - int val3 ;
56828 - int ecode3 = 0 ;
56829 - PyObject * obj0 = 0 ;
56830 - PyObject * obj1 = 0 ;
56831 - PyObject * obj2 = 0 ;
56832 -
56833 - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector_resize",&obj0,&obj1,&obj2)) SWIG_fail;
56834 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56835 - if (!SWIG_IsOK(res1)) {
56836 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_resize" "', argument " "1"" of type '" "std::vector< int > *""'");
56837 - }
56838 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56839 - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
56840 - if (!SWIG_IsOK(ecode2)) {
56841 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'");
56842 - }
56843 - arg2 = static_cast< std::vector< int >::size_type >(val2);
56844 - ecode3 = SWIG_AsVal_int(obj2, &val3);
56845 - if (!SWIG_IsOK(ecode3)) {
56846 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_resize" "', argument " "3"" of type '" "std::vector< int >::value_type""'");
56847 - }
56848 - temp3 = static_cast< std::vector< int >::value_type >(val3);
56849 - arg3 = &temp3;
56850 - (arg1)->resize(arg2,(std::vector< int >::value_type const &)*arg3);
56851 - resultobj = SWIG_Py_Void();
56852 - return resultobj;
56853 -fail:
56854 - return NULL;
56855 -}
56856 -
56857 -
56858 -SWIGINTERN PyObject *_wrap_IntVector_resize(PyObject *self, PyObject *args) {
56859 - int argc;
56860 - PyObject *argv[4];
56861 - int ii;
56862 -
56863 - if (!PyTuple_Check(args)) SWIG_fail;
56864 - argc = args ? (int)PyObject_Length(args) : 0;
56865 - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
56866 - argv[ii] = PyTuple_GET_ITEM(args,ii);
56867 - }
56868 - if (argc == 2) {
56869 - int _v;
56870 - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
56871 - _v = SWIG_CheckState(res);
56872 - if (_v) {
56873 - {
56874 - int res = SWIG_AsVal_size_t(argv[1], NULL);
56875 - _v = SWIG_CheckState(res);
56876 - }
56877 - if (_v) {
56878 - return _wrap_IntVector_resize__SWIG_0(self, args);
56879 - }
56880 - }
56881 - }
56882 - if (argc == 3) {
56883 - int _v;
56884 - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
56885 - _v = SWIG_CheckState(res);
56886 - if (_v) {
56887 - {
56888 - int res = SWIG_AsVal_size_t(argv[1], NULL);
56889 - _v = SWIG_CheckState(res);
56890 - }
56891 - if (_v) {
56892 - {
56893 - int res = SWIG_AsVal_int(argv[2], NULL);
56894 - _v = SWIG_CheckState(res);
56895 - }
56896 - if (_v) {
56897 - return _wrap_IntVector_resize__SWIG_1(self, args);
56898 - }
56899 - }
56900 - }
56901 - }
56902 -
56903 -fail:
56904 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IntVector_resize'.\n"
56905 - " Possible C/C++ prototypes are:\n"
56906 - " std::vector< int >::resize(std::vector< int >::size_type)\n"
56907 - " std::vector< int >::resize(std::vector< int >::size_type,std::vector< int >::value_type const &)\n");
56908 - return 0;
56909 -}
56910 -
56911 -
56912 -SWIGINTERN PyObject *_wrap_IntVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56913 - PyObject *resultobj = 0;
56914 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
56915 - std::vector< int >::iterator arg2 ;
56916 - std::vector< int >::value_type *arg3 = 0 ;
56917 - void *argp1 = 0 ;
56918 - int res1 = 0 ;
56919 - swig::SwigPyIterator *iter2 = 0 ;
56920 - int res2 ;
56921 - std::vector< int >::value_type temp3 ;
56922 - int val3 ;
56923 - int ecode3 = 0 ;
56924 - PyObject * obj0 = 0 ;
56925 - PyObject * obj1 = 0 ;
56926 - PyObject * obj2 = 0 ;
56927 - std::vector< int >::iterator result;
56928 -
56929 - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector_insert",&obj0,&obj1,&obj2)) SWIG_fail;
56930 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56931 - if (!SWIG_IsOK(res1)) {
56932 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_insert" "', argument " "1"" of type '" "std::vector< int > *""'");
56933 - }
56934 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56935 - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
56936 - if (!SWIG_IsOK(res2) || !iter2) {
56937 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
56938 - } else {
56939 - swig::SwigPyIterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter2);
56940 - if (iter_t) {
56941 - arg2 = iter_t->get_current();
56942 - } else {
56943 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
56944 - }
56945 - }
56946 - ecode3 = SWIG_AsVal_int(obj2, &val3);
56947 - if (!SWIG_IsOK(ecode3)) {
56948 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_insert" "', argument " "3"" of type '" "std::vector< int >::value_type""'");
56949 - }
56950 - temp3 = static_cast< std::vector< int >::value_type >(val3);
56951 - arg3 = &temp3;
56952 - result = (arg1)->insert(arg2,(std::vector< int >::value_type const &)*arg3);
56953 - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)),
56954 - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
56955 - return resultobj;
56956 -fail:
56957 - return NULL;
56958 -}
56959 -
56960 -
56961 -SWIGINTERN PyObject *_wrap_IntVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56962 - PyObject *resultobj = 0;
56963 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
56964 - std::vector< int >::iterator arg2 ;
56965 - std::vector< int >::size_type arg3 ;
56966 - std::vector< int >::value_type *arg4 = 0 ;
56967 - void *argp1 = 0 ;
56968 - int res1 = 0 ;
56969 - swig::SwigPyIterator *iter2 = 0 ;
56970 - int res2 ;
56971 - size_t val3 ;
56972 - int ecode3 = 0 ;
56973 - std::vector< int >::value_type temp4 ;
56974 - int val4 ;
56975 - int ecode4 = 0 ;
56976 - PyObject * obj0 = 0 ;
56977 - PyObject * obj1 = 0 ;
56978 - PyObject * obj2 = 0 ;
56979 - PyObject * obj3 = 0 ;
56980 -
56981 - if (!PyArg_ParseTuple(args,(char *)"OOOO:IntVector_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
56982 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
56983 - if (!SWIG_IsOK(res1)) {
56984 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_insert" "', argument " "1"" of type '" "std::vector< int > *""'");
56985 - }
56986 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
56987 - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
56988 - if (!SWIG_IsOK(res2) || !iter2) {
56989 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
56990 - } else {
56991 - swig::SwigPyIterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter2);
56992 - if (iter_t) {
56993 - arg2 = iter_t->get_current();
56994 - } else {
56995 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
56996 - }
56997 - }
56998 - ecode3 = SWIG_AsVal_size_t(obj2, &val3);
56999 - if (!SWIG_IsOK(ecode3)) {
57000 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_insert" "', argument " "3"" of type '" "std::vector< int >::size_type""'");
57001 - }
57002 - arg3 = static_cast< std::vector< int >::size_type >(val3);
57003 - ecode4 = SWIG_AsVal_int(obj3, &val4);
57004 - if (!SWIG_IsOK(ecode4)) {
57005 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IntVector_insert" "', argument " "4"" of type '" "std::vector< int >::value_type""'");
57006 - }
57007 - temp4 = static_cast< std::vector< int >::value_type >(val4);
57008 - arg4 = &temp4;
57009 - (arg1)->insert(arg2,arg3,(std::vector< int >::value_type const &)*arg4);
57010 - resultobj = SWIG_Py_Void();
57011 - return resultobj;
57012 -fail:
57013 - return NULL;
57014 -}
57015 -
57016 -
57017 -SWIGINTERN PyObject *_wrap_IntVector_insert(PyObject *self, PyObject *args) {
57018 - int argc;
57019 - PyObject *argv[5];
57020 - int ii;
57021 -
57022 - if (!PyTuple_Check(args)) SWIG_fail;
57023 - argc = args ? (int)PyObject_Length(args) : 0;
57024 - for (ii = 0; (ii < 4) && (ii < argc); ii++) {
57025 - argv[ii] = PyTuple_GET_ITEM(args,ii);
57026 - }
57027 - if (argc == 3) {
57028 - int _v;
57029 - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
57030 - _v = SWIG_CheckState(res);
57031 - if (_v) {
57032 - swig::SwigPyIterator *iter = 0;
57033 - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
57034 - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter) != 0));
57035 - if (_v) {
57036 - {
57037 - int res = SWIG_AsVal_int(argv[2], NULL);
57038 - _v = SWIG_CheckState(res);
57039 - }
57040 - if (_v) {
57041 - return _wrap_IntVector_insert__SWIG_0(self, args);
57042 - }
57043 - }
57044 - }
57045 - }
57046 - if (argc == 4) {
57047 - int _v;
57048 - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
57049 - _v = SWIG_CheckState(res);
57050 - if (_v) {
57051 - swig::SwigPyIterator *iter = 0;
57052 - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
57053 - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter) != 0));
57054 - if (_v) {
57055 - {
57056 - int res = SWIG_AsVal_size_t(argv[2], NULL);
57057 - _v = SWIG_CheckState(res);
57058 - }
57059 - if (_v) {
57060 - {
57061 - int res = SWIG_AsVal_int(argv[3], NULL);
57062 - _v = SWIG_CheckState(res);
57063 - }
57064 - if (_v) {
57065 - return _wrap_IntVector_insert__SWIG_1(self, args);
57066 - }
57067 - }
57068 - }
57069 - }
57070 - }
57071 -
57072 -fail:
57073 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IntVector_insert'.\n"
57074 - " Possible C/C++ prototypes are:\n"
57075 - " std::vector< int >::insert(std::vector< int >::iterator,std::vector< int >::value_type const &)\n"
57076 - " std::vector< int >::insert(std::vector< int >::iterator,std::vector< int >::size_type,std::vector< int >::value_type const &)\n");
57077 - return 0;
57078 -}
57079 -
57080 -
57081 -SWIGINTERN PyObject *_wrap_IntVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57082 - PyObject *resultobj = 0;
57083 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
57084 - std::vector< int >::size_type arg2 ;
57085 - void *argp1 = 0 ;
57086 - int res1 = 0 ;
57087 - size_t val2 ;
57088 - int ecode2 = 0 ;
57089 - PyObject * obj0 = 0 ;
57090 - PyObject * obj1 = 0 ;
57091 -
57092 - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_reserve",&obj0,&obj1)) SWIG_fail;
57093 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
57094 - if (!SWIG_IsOK(res1)) {
57095 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_reserve" "', argument " "1"" of type '" "std::vector< int > *""'");
57096 - }
57097 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
57098 - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
57099 - if (!SWIG_IsOK(ecode2)) {
57100 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_reserve" "', argument " "2"" of type '" "std::vector< int >::size_type""'");
57101 - }
57102 - arg2 = static_cast< std::vector< int >::size_type >(val2);
57103 - (arg1)->reserve(arg2);
57104 - resultobj = SWIG_Py_Void();
57105 - return resultobj;
57106 -fail:
57107 - return NULL;
57108 -}
57109 -
57110 -
57111 -SWIGINTERN PyObject *_wrap_IntVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57112 - PyObject *resultobj = 0;
57113 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
57114 - void *argp1 = 0 ;
57115 - int res1 = 0 ;
57116 - PyObject * obj0 = 0 ;
57117 - std::vector< int >::size_type result;
57118 -
57119 - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_capacity",&obj0)) SWIG_fail;
57120 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
57121 - if (!SWIG_IsOK(res1)) {
57122 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_capacity" "', argument " "1"" of type '" "std::vector< int > const *""'");
57123 - }
57124 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
57125 - result = ((std::vector< int > const *)arg1)->capacity();
57126 - resultobj = SWIG_From_size_t(static_cast< size_t >(result));
57127 - return resultobj;
57128 -fail:
57129 - return NULL;
57130 -}
57131 -
57132 -
57133 -SWIGINTERN PyObject *_wrap_delete_IntVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57134 - PyObject *resultobj = 0;
57135 - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
57136 - void *argp1 = 0 ;
57137 - int res1 = 0 ;
57138 - PyObject * obj0 = 0 ;
57139 -
57140 - if (!PyArg_ParseTuple(args,(char *)"O:delete_IntVector",&obj0)) SWIG_fail;
57141 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_DISOWN | 0 );
57142 - if (!SWIG_IsOK(res1)) {
57143 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntVector" "', argument " "1"" of type '" "std::vector< int > *""'");
57144 - }
57145 - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
57146 - delete arg1;
57147 - resultobj = SWIG_Py_Void();
57148 - return resultobj;
57149 -fail:
57150 - return NULL;
57151 -}
57152 -
57153 -
57154 -SWIGINTERN PyObject *IntVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57155 - PyObject *obj;
57156 - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
57157 - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_NewClientData(obj));
57158 - return SWIG_Py_Void();
57159 -}
57160 -
57161 -SWIGINTERN PyObject *_wrap_DoubleVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57162 - PyObject *resultobj = 0;
57163 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
57164 - PyObject **arg2 = (PyObject **) 0 ;
57165 - void *argp1 = 0 ;
57166 - int res1 = 0 ;
57167 - PyObject * obj0 = 0 ;
57168 - swig::SwigPyIterator *result = 0 ;
57169 -
57170 - arg2 = &obj0;
57171 - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_iterator",&obj0)) SWIG_fail;
57172 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
57173 - if (!SWIG_IsOK(res1)) {
57174 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_iterator" "', argument " "1"" of type '" "std::vector< double > *""'");
57175 - }
57176 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
57177 - result = (swig::SwigPyIterator *)std_vector_Sl_double_Sg__iterator(arg1,arg2);
57178 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
57179 - return resultobj;
57180 -fail:
57181 - return NULL;
57182 -}
57183 -
57184 -
57185 -SWIGINTERN PyObject *_wrap_DoubleVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57186 - PyObject *resultobj = 0;
57187 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
57188 - void *argp1 = 0 ;
57189 - int res1 = 0 ;
57190 - PyObject * obj0 = 0 ;
57191 - bool result;
57192 -
57193 - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector___nonzero__",&obj0)) SWIG_fail;
57194 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
57195 - if (!SWIG_IsOK(res1)) {
57196 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___nonzero__" "', argument " "1"" of type '" "std::vector< double > const *""'");
57197 - }
57198 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
57199 - result = (bool)std_vector_Sl_double_Sg____nonzero__((std::vector< double > const *)arg1);
57200 - resultobj = SWIG_From_bool(static_cast< bool >(result));
57201 - return resultobj;
57202 -fail:
57203 - return NULL;
57204 -}
57205 -
57206 -
57207 -SWIGINTERN PyObject *_wrap_DoubleVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57208 - PyObject *resultobj = 0;
57209 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
57210 - void *argp1 = 0 ;
57211 - int res1 = 0 ;
57212 - PyObject * obj0 = 0 ;
57213 - bool result;
57214 -
57215 - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector___bool__",&obj0)) SWIG_fail;
57216 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
57217 - if (!SWIG_IsOK(res1)) {
57218 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___bool__" "', argument " "1"" of type '" "std::vector< double > const *""'");
57219 - }
57220 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
57221 - result = (bool)std_vector_Sl_double_Sg____bool__((std::vector< double > const *)arg1);
57222 - resultobj = SWIG_From_bool(static_cast< bool >(result));
57223 - return resultobj;
57224 -fail:
57225 - return NULL;
57226 -}
57227 -
57228 -
57229 -SWIGINTERN PyObject *_wrap_DoubleVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57230 - PyObject *resultobj = 0;
57231 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
57232 - void *argp1 = 0 ;
57233 - int res1 = 0 ;
57234 - PyObject * obj0 = 0 ;
57235 - std::vector< double >::size_type result;
57236 -
57237 - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector___len__",&obj0)) SWIG_fail;
57238 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
57239 - if (!SWIG_IsOK(res1)) {
57240 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___len__" "', argument " "1"" of type '" "std::vector< double > const *""'");
57241 - }
57242 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
57243 - result = std_vector_Sl_double_Sg____len__((std::vector< double > const *)arg1);
57244 - resultobj = SWIG_From_size_t(static_cast< size_t >(result));
57245 - return resultobj;
57246 -fail:
57247 - return NULL;
57248 -}
57249 -
57250 -
57251 -SWIGINTERN PyObject *_wrap_DoubleVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57252 - PyObject *resultobj = 0;
57253 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
57254 - void *argp1 = 0 ;
57255 - int res1 = 0 ;
57256 - PyObject * obj0 = 0 ;
57257 - std::vector< double >::value_type result;
57258 -
57259 - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_pop",&obj0)) SWIG_fail;
57260 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
57261 - if (!SWIG_IsOK(res1)) {
57262 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_pop" "', argument " "1"" of type '" "std::vector< double > *""'");
57263 - }
57264 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
57265 - try {
57266 - result = (std::vector< double >::value_type)std_vector_Sl_double_Sg__pop(arg1);
57267 - }
57268 - catch(std::out_of_range &_e) {
57269 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
57270 - }
57271 -
57272 - resultobj = SWIG_From_double(static_cast< double >(result));
57273 - return resultobj;
57274 -fail:
57275 - return NULL;
57276 -}
57277 -
57278 -
57279 -SWIGINTERN PyObject *_wrap_DoubleVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57280 - PyObject *resultobj = 0;
57281 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
57282 - std::vector< double >::difference_type arg2 ;
57283 - std::vector< double >::difference_type arg3 ;
57284 - void *argp1 = 0 ;
57285 - int res1 = 0 ;
57286 - ptrdiff_t val2 ;
57287 - int ecode2 = 0 ;
57288 - ptrdiff_t val3 ;
57289 - int ecode3 = 0 ;
57290 - PyObject * obj0 = 0 ;
57291 - PyObject * obj1 = 0 ;
57292 - PyObject * obj2 = 0 ;
57293 - std::vector< double,std::allocator< double > > *result = 0 ;
57294 -
57295 - if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector___getslice__",&obj0,&obj1,&obj2)) SWIG_fail;
57296 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
57297 - if (!SWIG_IsOK(res1)) {
57298 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___getslice__" "', argument " "1"" of type '" "std::vector< double > *""'");
57299 - }
57300 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
57301 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
57302 - if (!SWIG_IsOK(ecode2)) {
57303 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___getslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'");
57304 - }
57305 - arg2 = static_cast< std::vector< double >::difference_type >(val2);
57306 - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
57307 - if (!SWIG_IsOK(ecode3)) {
57308 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___getslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'");
57309 - }
57310 - arg3 = static_cast< std::vector< double >::difference_type >(val3);
57311 - try {
57312 - result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg____getslice__(arg1,arg2,arg3);
57313 - }
57314 - catch(std::out_of_range &_e) {
57315 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
57316 - }
57317 - catch(std::invalid_argument &_e) {
57318 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
57319 - }
57320 -
57321 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_OWN | 0 );
57322 - return resultobj;
57323 -fail:
57324 - return NULL;
57325 -}
57326 -
57327 -
57328 -SWIGINTERN PyObject *_wrap_DoubleVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57329 - PyObject *resultobj = 0;
57330 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
57331 - std::vector< double >::difference_type arg2 ;
57332 - std::vector< double >::difference_type arg3 ;
57333 - std::vector< double,std::allocator< double > > *arg4 = 0 ;
57334 - void *argp1 = 0 ;
57335 - int res1 = 0 ;
57336 - ptrdiff_t val2 ;
57337 - int ecode2 = 0 ;
57338 - ptrdiff_t val3 ;
57339 - int ecode3 = 0 ;
57340 - int res4 = SWIG_OLDOBJ ;
57341 - PyObject * obj0 = 0 ;
57342 - PyObject * obj1 = 0 ;
57343 - PyObject * obj2 = 0 ;
57344 - PyObject * obj3 = 0 ;
57345 -
57346 - if (!PyArg_ParseTuple(args,(char *)"OOOO:DoubleVector___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
57347 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
57348 - if (!SWIG_IsOK(res1)) {
57349 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setslice__" "', argument " "1"" of type '" "std::vector< double > *""'");
57350 - }
57351 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
57352 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
57353 - if (!SWIG_IsOK(ecode2)) {
57354 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___setslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'");
57355 - }
57356 - arg2 = static_cast< std::vector< double >::difference_type >(val2);
57357 - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
57358 - if (!SWIG_IsOK(ecode3)) {
57359 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___setslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'");
57360 - }
57361 - arg3 = static_cast< std::vector< double >::difference_type >(val3);
57362 - {
57363 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
57364 - res4 = swig::asptr(obj3, &ptr);
57365 - if (!SWIG_IsOK(res4)) {
57366 - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DoubleVector___setslice__" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'");
57367 - }
57368 - if (!ptr) {
57369 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleVector___setslice__" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'");
57370 - }
57371 - arg4 = ptr;
57372 - }
57373 - try {
57374 - std_vector_Sl_double_Sg____setslice____SWIG_0(arg1,arg2,arg3,(std::vector< double,std::allocator< double > > const &)*arg4);
57375 - }
57376 - catch(std::out_of_range &_e) {
57377 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
57378 - }
57379 - catch(std::invalid_argument &_e) {
57380 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
57381 - }
57382 -
57383 - resultobj = SWIG_Py_Void();
57384 - if (SWIG_IsNewObj(res4)) delete arg4;
57385 - return resultobj;
57386 -fail:
57387 - if (SWIG_IsNewObj(res4)) delete arg4;
57388 - return NULL;
57389 -}
57390 -
57391 -
57392 -SWIGINTERN PyObject *_wrap_DoubleVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57393 - PyObject *resultobj = 0;
57394 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
57395 - std::vector< double >::difference_type arg2 ;
57396 - std::vector< double >::difference_type arg3 ;
57397 - void *argp1 = 0 ;
57398 - int res1 = 0 ;
57399 - ptrdiff_t val2 ;
57400 - int ecode2 = 0 ;
57401 - ptrdiff_t val3 ;
57402 - int ecode3 = 0 ;
57403 - PyObject * obj0 = 0 ;
57404 - PyObject * obj1 = 0 ;
57405 - PyObject * obj2 = 0 ;
57406 -
57407 - if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector___setslice__",&obj0,&obj1,&obj2)) SWIG_fail;
57408 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
57409 - if (!SWIG_IsOK(res1)) {
57410 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setslice__" "', argument " "1"" of type '" "std::vector< double > *""'");
57411 - }
57412 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
57413 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
57414 - if (!SWIG_IsOK(ecode2)) {
57415 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___setslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'");
57416 - }
57417 - arg2 = static_cast< std::vector< double >::difference_type >(val2);
57418 - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
57419 - if (!SWIG_IsOK(ecode3)) {
57420 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___setslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'");
57421 - }
57422 - arg3 = static_cast< std::vector< double >::difference_type >(val3);
57423 - try {
57424 - std_vector_Sl_double_Sg____setslice____SWIG_0(arg1,arg2,arg3);
57425 - }
57426 - catch(std::out_of_range &_e) {
57427 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
57428 - }
57429 - catch(std::invalid_argument &_e) {
57430 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
57431 - }
57432 -
57433 - resultobj = SWIG_Py_Void();
57434 - return resultobj;
57435 -fail:
57436 - return NULL;
57437 -}
57438 -
57439 -
57440 -SWIGINTERN PyObject *_wrap_DoubleVector___setslice__(PyObject *self, PyObject *args) {
57441 - int argc;
57442 - PyObject *argv[5];
57443 - int ii;
57444 -
57445 - if (!PyTuple_Check(args)) SWIG_fail;
57446 - argc = args ? (int)PyObject_Length(args) : 0;
57447 - for (ii = 0; (ii < 4) && (ii < argc); ii++) {
57448 - argv[ii] = PyTuple_GET_ITEM(args,ii);
57449 - }
57450 - if (argc == 3) {
57451 - int _v;
57452 - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
57453 - _v = SWIG_CheckState(res);
57454 - if (_v) {
57455 - {
57456 - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
57457 - _v = SWIG_CheckState(res);
57458 - }
57459 - if (_v) {
57460 - {
57461 - int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
57462 - _v = SWIG_CheckState(res);
57463 - }
57464 - if (_v) {
57465 - return _wrap_DoubleVector___setslice____SWIG_1(self, args);
57466 - }
57467 - }
57468 - }
57469 - }
57470 - if (argc == 4) {
57471 - int _v;
57472 - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
57473 - _v = SWIG_CheckState(res);
57474 - if (_v) {
57475 - {
57476 - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
57477 - _v = SWIG_CheckState(res);
57478 - }
57479 - if (_v) {
57480 - {
57481 - int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
57482 - _v = SWIG_CheckState(res);
57483 - }
57484 - if (_v) {
57485 - int res = swig::asptr(argv[3], (std::vector<double,std::allocator< double > >**)(0));
57486 - _v = SWIG_CheckState(res);
57487 - if (_v) {
57488 - return _wrap_DoubleVector___setslice____SWIG_0(self, args);
57489 - }
57490 - }
57491 - }
57492 - }
57493 - }
57494 -
57495 -fail:
57496 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'DoubleVector___setslice__'.\n"
57497 - " Possible C/C++ prototypes are:\n"
57498 - " std::vector< double >::__setslice__(std::vector< double >::difference_type,std::vector< double >::difference_type,std::vector< double,std::allocator< double > > const &)\n"
57499 - " std::vector< double >::__setslice__(std::vector< double >::difference_type,std::vector< double >::difference_type)\n");
57500 - return 0;
57501 -}
57502 -
57503 -
57504 -SWIGINTERN PyObject *_wrap_DoubleVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57505 - PyObject *resultobj = 0;
57506 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
57507 - std::vector< double >::difference_type arg2 ;
57508 - std::vector< double >::difference_type arg3 ;
57509 - void *argp1 = 0 ;
57510 - int res1 = 0 ;
57511 - ptrdiff_t val2 ;
57512 - int ecode2 = 0 ;
57513 - ptrdiff_t val3 ;
57514 - int ecode3 = 0 ;
57515 - PyObject * obj0 = 0 ;
57516 - PyObject * obj1 = 0 ;
57517 - PyObject * obj2 = 0 ;
57518 -
57519 - if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector___delslice__",&obj0,&obj1,&obj2)) SWIG_fail;
57520 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
57521 - if (!SWIG_IsOK(res1)) {
57522 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___delslice__" "', argument " "1"" of type '" "std::vector< double > *""'");
57523 - }
57524 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
57525 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
57526 - if (!SWIG_IsOK(ecode2)) {
57527 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___delslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'");
57528 - }
57529 - arg2 = static_cast< std::vector< double >::difference_type >(val2);
57530 - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
57531 - if (!SWIG_IsOK(ecode3)) {
57532 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___delslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'");
57533 - }
57534 - arg3 = static_cast< std::vector< double >::difference_type >(val3);
57535 - try {
57536 - std_vector_Sl_double_Sg____delslice__(arg1,arg2,arg3);
57537 - }
57538 - catch(std::out_of_range &_e) {
57539 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
57540 - }
57541 - catch(std::invalid_argument &_e) {
57542 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
57543 - }
57544 -
57545 - resultobj = SWIG_Py_Void();
57546 - return resultobj;
57547 -fail:
57548 - return NULL;
57549 -}
57550 -
57551 -
57552 -SWIGINTERN PyObject *_wrap_DoubleVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57553 - PyObject *resultobj = 0;
57554 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
57555 - std::vector< double >::difference_type arg2 ;
57556 - void *argp1 = 0 ;
57557 - int res1 = 0 ;
57558 - ptrdiff_t val2 ;
57559 - int ecode2 = 0 ;
57560 - PyObject * obj0 = 0 ;
57561 - PyObject * obj1 = 0 ;
57562 -
57563 - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector___delitem__",&obj0,&obj1)) SWIG_fail;
57564 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
57565 - if (!SWIG_IsOK(res1)) {
57566 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___delitem__" "', argument " "1"" of type '" "std::vector< double > *""'");
57567 - }
57568 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
57569 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
57570 - if (!SWIG_IsOK(ecode2)) {
57571 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___delitem__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'");
57572 - }
57573 - arg2 = static_cast< std::vector< double >::difference_type >(val2);
57574 - try {
57575 - std_vector_Sl_double_Sg____delitem____SWIG_0(arg1,arg2);
57576 - }
57577 - catch(std::out_of_range &_e) {
57578 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
57579 - }
57580 -
57581 - resultobj = SWIG_Py_Void();
57582 - return resultobj;
57583 -fail:
57584 - return NULL;
57585 -}
57586 -
57587 -
57588 -SWIGINTERN PyObject *_wrap_DoubleVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57589 - PyObject *resultobj = 0;
57590 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
57591 - PySliceObject *arg2 = (PySliceObject *) 0 ;
57592 - void *argp1 = 0 ;
57593 - int res1 = 0 ;
57594 - PyObject * obj0 = 0 ;
57595 - PyObject * obj1 = 0 ;
57596 - std::vector< double,std::allocator< double > > *result = 0 ;
57597 -
57598 - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector___getitem__",&obj0,&obj1)) SWIG_fail;
57599 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
57600 - if (!SWIG_IsOK(res1)) {
57601 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___getitem__" "', argument " "1"" of type '" "std::vector< double > *""'");
57602 - }
57603 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
57604 - {
57605 - if (!PySlice_Check(obj1)) {
57606 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'");
57607 - }
57608 - arg2 = (PySliceObject *) obj1;
57609 - }
57610 - try {
57611 - result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg____getitem____SWIG_0(arg1,arg2);
57612 - }
57613 - catch(std::out_of_range &_e) {
57614 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
57615 - }
57616 - catch(std::invalid_argument &_e) {
57617 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
57618 - }
57619 -
57620 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_OWN | 0 );
57621 - return resultobj;
57622 -fail:
57623 - return NULL;
57624 -}
57625 -
57626 -
57627 -SWIGINTERN PyObject *_wrap_DoubleVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57628 - PyObject *resultobj = 0;
57629 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
57630 - PySliceObject *arg2 = (PySliceObject *) 0 ;
57631 - std::vector< double,std::allocator< double > > *arg3 = 0 ;
57632 - void *argp1 = 0 ;
57633 - int res1 = 0 ;
57634 - int res3 = SWIG_OLDOBJ ;
57635 - PyObject * obj0 = 0 ;
57636 - PyObject * obj1 = 0 ;
57637 - PyObject * obj2 = 0 ;
57638 -
57639 - if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
57640 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
57641 - if (!SWIG_IsOK(res1)) {
57642 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setitem__" "', argument " "1"" of type '" "std::vector< double > *""'");
57643 - }
57644 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
57645 - {
57646 - if (!PySlice_Check(obj1)) {
57647 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
57648 - }
57649 - arg2 = (PySliceObject *) obj1;
57650 - }
57651 - {
57652 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
57653 - res3 = swig::asptr(obj2, &ptr);
57654 - if (!SWIG_IsOK(res3)) {
57655 - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DoubleVector___setitem__" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'");
57656 - }
57657 - if (!ptr) {
57658 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleVector___setitem__" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'");
57659 - }
57660 - arg3 = ptr;
57661 - }
57662 - try {
57663 - std_vector_Sl_double_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< double,std::allocator< double > > const &)*arg3);
57664 - }
57665 - catch(std::out_of_range &_e) {
57666 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
57667 - }
57668 - catch(std::invalid_argument &_e) {
57669 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
57670 - }
57671 -
57672 - resultobj = SWIG_Py_Void();
57673 - if (SWIG_IsNewObj(res3)) delete arg3;
57674 - return resultobj;
57675 -fail:
57676 - if (SWIG_IsNewObj(res3)) delete arg3;
57677 - return NULL;
57678 -}
57679 -
57680 -
57681 -SWIGINTERN PyObject *_wrap_DoubleVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57682 - PyObject *resultobj = 0;
57683 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
57684 - PySliceObject *arg2 = (PySliceObject *) 0 ;
57685 - void *argp1 = 0 ;
57686 - int res1 = 0 ;
57687 - PyObject * obj0 = 0 ;
57688 - PyObject * obj1 = 0 ;
57689 -
57690 - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector___setitem__",&obj0,&obj1)) SWIG_fail;
57691 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
57692 - if (!SWIG_IsOK(res1)) {
57693 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setitem__" "', argument " "1"" of type '" "std::vector< double > *""'");
57694 - }
57695 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
57696 - {
57697 - if (!PySlice_Check(obj1)) {
57698 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
57699 - }
57700 - arg2 = (PySliceObject *) obj1;
57701 - }
57702 - try {
57703 - std_vector_Sl_double_Sg____setitem____SWIG_1(arg1,arg2);
57704 - }
57705 - catch(std::out_of_range &_e) {
57706 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
57707 - }
57708 - catch(std::invalid_argument &_e) {
57709 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
57710 - }
57711 -
57712 - resultobj = SWIG_Py_Void();
57713 - return resultobj;
57714 -fail:
57715 - return NULL;
57716 -}
57717 -
57718 -
57719 -SWIGINTERN PyObject *_wrap_DoubleVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57720 - PyObject *resultobj = 0;
57721 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
57722 - PySliceObject *arg2 = (PySliceObject *) 0 ;
57723 - void *argp1 = 0 ;
57724 - int res1 = 0 ;
57725 - PyObject * obj0 = 0 ;
57726 - PyObject * obj1 = 0 ;
57727 -
57728 - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector___delitem__",&obj0,&obj1)) SWIG_fail;
57729 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
57730 - if (!SWIG_IsOK(res1)) {
57731 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___delitem__" "', argument " "1"" of type '" "std::vector< double > *""'");
57732 - }
57733 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
57734 - {
57735 - if (!PySlice_Check(obj1)) {
57736 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'");
57737 - }
57738 - arg2 = (PySliceObject *) obj1;
57739 - }
57740 - try {
57741 - std_vector_Sl_double_Sg____delitem____SWIG_1(arg1,arg2);
57742 - }
57743 - catch(std::out_of_range &_e) {
57744 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
57745 - }
57746 - catch(std::invalid_argument &_e) {
57747 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
57748 - }
57749 -
57750 - resultobj = SWIG_Py_Void();
57751 - return resultobj;
57752 -fail:
57753 - return NULL;
57754 -}
57755 -
57756 -
57757 -SWIGINTERN PyObject *_wrap_DoubleVector___delitem__(PyObject *self, PyObject *args) {
57758 - int argc;
57759 - PyObject *argv[3];
57760 - int ii;
57761 -
57762 - if (!PyTuple_Check(args)) SWIG_fail;
57763 - argc = args ? (int)PyObject_Length(args) : 0;
57764 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
57765 - argv[ii] = PyTuple_GET_ITEM(args,ii);
57766 - }
57767 - if (argc == 2) {
57768 - int _v;
57769 - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
57770 - _v = SWIG_CheckState(res);
57771 - if (_v) {
57772 - {
57773 - _v = PySlice_Check(argv[1]);
57774 - }
57775 - if (_v) {
57776 - return _wrap_DoubleVector___delitem____SWIG_1(self, args);
57777 - }
57778 - }
57779 - }
57780 - if (argc == 2) {
57781 - int _v;
57782 - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
57783 - _v = SWIG_CheckState(res);
57784 - if (_v) {
57785 - {
57786 - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
57787 - _v = SWIG_CheckState(res);
57788 - }
57789 - if (_v) {
57790 - return _wrap_DoubleVector___delitem____SWIG_0(self, args);
57791 - }
57792 - }
57793 - }
57794 -
57795 -fail:
57796 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'DoubleVector___delitem__'.\n"
57797 - " Possible C/C++ prototypes are:\n"
57798 - " std::vector< double >::__delitem__(std::vector< double >::difference_type)\n"
57799 - " std::vector< double >::__delitem__(PySliceObject *)\n");
57800 - return 0;
57801 -}
57802 -
57803 -
57804 -SWIGINTERN PyObject *_wrap_DoubleVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57805 - PyObject *resultobj = 0;
57806 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
57807 - std::vector< double >::difference_type arg2 ;
57808 - void *argp1 = 0 ;
57809 - int res1 = 0 ;
57810 - ptrdiff_t val2 ;
57811 - int ecode2 = 0 ;
57812 - PyObject * obj0 = 0 ;
57813 - PyObject * obj1 = 0 ;
57814 - std::vector< double >::value_type *result = 0 ;
57815 -
57816 - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector___getitem__",&obj0,&obj1)) SWIG_fail;
57817 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
57818 - if (!SWIG_IsOK(res1)) {
57819 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___getitem__" "', argument " "1"" of type '" "std::vector< double > const *""'");
57820 - }
57821 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
57822 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
57823 - if (!SWIG_IsOK(ecode2)) {
57824 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___getitem__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'");
57825 - }
57826 - arg2 = static_cast< std::vector< double >::difference_type >(val2);
57827 - try {
57828 - result = (std::vector< double >::value_type *) &std_vector_Sl_double_Sg____getitem____SWIG_1((std::vector< double > const *)arg1,arg2);
57829 - }
57830 - catch(std::out_of_range &_e) {
57831 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
57832 - }
57833 -
57834 - resultobj = SWIG_From_double(static_cast< double >(*result));
57835 - return resultobj;
57836 -fail:
57837 - return NULL;
57838 -}
57839 -
57840 -
57841 -SWIGINTERN PyObject *_wrap_DoubleVector___getitem__(PyObject *self, PyObject *args) {
57842 - int argc;
57843 - PyObject *argv[3];
57844 - int ii;
57845 -
57846 - if (!PyTuple_Check(args)) SWIG_fail;
57847 - argc = args ? (int)PyObject_Length(args) : 0;
57848 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
57849 - argv[ii] = PyTuple_GET_ITEM(args,ii);
57850 - }
57851 - if (argc == 2) {
57852 - int _v;
57853 - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
57854 - _v = SWIG_CheckState(res);
57855 - if (_v) {
57856 - {
57857 - _v = PySlice_Check(argv[1]);
57858 - }
57859 - if (_v) {
57860 - return _wrap_DoubleVector___getitem____SWIG_0(self, args);
57861 - }
57862 - }
57863 - }
57864 - if (argc == 2) {
57865 - int _v;
57866 - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
57867 - _v = SWIG_CheckState(res);
57868 - if (_v) {
57869 - {
57870 - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
57871 - _v = SWIG_CheckState(res);
57872 - }
57873 - if (_v) {
57874 - return _wrap_DoubleVector___getitem____SWIG_1(self, args);
57875 - }
57876 - }
57877 - }
57878 -
57879 -fail:
57880 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'DoubleVector___getitem__'.\n"
57881 - " Possible C/C++ prototypes are:\n"
57882 - " std::vector< double >::__getitem__(PySliceObject *)\n"
57883 - " std::vector< double >::__getitem__(std::vector< double >::difference_type) const\n");
57884 - return 0;
57885 -}
57886 -
57887 -
57888 -SWIGINTERN PyObject *_wrap_DoubleVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57889 - PyObject *resultobj = 0;
57890 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
57891 - std::vector< double >::difference_type arg2 ;
57892 - std::vector< double >::value_type *arg3 = 0 ;
57893 - void *argp1 = 0 ;
57894 - int res1 = 0 ;
57895 - ptrdiff_t val2 ;
57896 - int ecode2 = 0 ;
57897 - std::vector< double >::value_type temp3 ;
57898 - double val3 ;
57899 - int ecode3 = 0 ;
57900 - PyObject * obj0 = 0 ;
57901 - PyObject * obj1 = 0 ;
57902 - PyObject * obj2 = 0 ;
57903 -
57904 - if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
57905 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
57906 - if (!SWIG_IsOK(res1)) {
57907 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setitem__" "', argument " "1"" of type '" "std::vector< double > *""'");
57908 - }
57909 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
57910 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
57911 - if (!SWIG_IsOK(ecode2)) {
57912 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___setitem__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'");
57913 - }
57914 - arg2 = static_cast< std::vector< double >::difference_type >(val2);
57915 - ecode3 = SWIG_AsVal_double(obj2, &val3);
57916 - if (!SWIG_IsOK(ecode3)) {
57917 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___setitem__" "', argument " "3"" of type '" "std::vector< double >::value_type""'");
57918 - }
57919 - temp3 = static_cast< std::vector< double >::value_type >(val3);
57920 - arg3 = &temp3;
57921 - try {
57922 - std_vector_Sl_double_Sg____setitem____SWIG_2(arg1,arg2,(double const &)*arg3);
57923 - }
57924 - catch(std::out_of_range &_e) {
57925 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
57926 - }
57927 -
57928 - resultobj = SWIG_Py_Void();
57929 - return resultobj;
57930 -fail:
57931 - return NULL;
57932 -}
57933 -
57934 -
57935 -SWIGINTERN PyObject *_wrap_DoubleVector___setitem__(PyObject *self, PyObject *args) {
57936 - int argc;
57937 - PyObject *argv[4];
57938 - int ii;
57939 -
57940 - if (!PyTuple_Check(args)) SWIG_fail;
57941 - argc = args ? (int)PyObject_Length(args) : 0;
57942 - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
57943 - argv[ii] = PyTuple_GET_ITEM(args,ii);
57944 - }
57945 - if (argc == 2) {
57946 - int _v;
57947 - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
57948 - _v = SWIG_CheckState(res);
57949 - if (_v) {
57950 - {
57951 - _v = PySlice_Check(argv[1]);
57952 - }
57953 - if (_v) {
57954 - return _wrap_DoubleVector___setitem____SWIG_1(self, args);
57955 - }
57956 - }
57957 - }
57958 - if (argc == 3) {
57959 - int _v;
57960 - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
57961 - _v = SWIG_CheckState(res);
57962 - if (_v) {
57963 - {
57964 - _v = PySlice_Check(argv[1]);
57965 - }
57966 - if (_v) {
57967 - int res = swig::asptr(argv[2], (std::vector<double,std::allocator< double > >**)(0));
57968 - _v = SWIG_CheckState(res);
57969 - if (_v) {
57970 - return _wrap_DoubleVector___setitem____SWIG_0(self, args);
57971 - }
57972 - }
57973 - }
57974 - }
57975 - if (argc == 3) {
57976 - int _v;
57977 - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
57978 - _v = SWIG_CheckState(res);
57979 - if (_v) {
57980 - {
57981 - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
57982 - _v = SWIG_CheckState(res);
57983 - }
57984 - if (_v) {
57985 - {
57986 - int res = SWIG_AsVal_double(argv[2], NULL);
57987 - _v = SWIG_CheckState(res);
57988 - }
57989 - if (_v) {
57990 - return _wrap_DoubleVector___setitem____SWIG_2(self, args);
57991 - }
57992 - }
57993 - }
57994 - }
57995 -
57996 -fail:
57997 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'DoubleVector___setitem__'.\n"
57998 - " Possible C/C++ prototypes are:\n"
57999 - " std::vector< double >::__setitem__(PySliceObject *,std::vector< double,std::allocator< double > > const &)\n"
58000 - " std::vector< double >::__setitem__(PySliceObject *)\n"
58001 - " std::vector< double >::__setitem__(std::vector< double >::difference_type,std::vector< double >::value_type const &)\n");
58002 - return 0;
58003 -}
58004 -
58005 -
58006 -SWIGINTERN PyObject *_wrap_DoubleVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58007 - PyObject *resultobj = 0;
58008 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58009 - std::vector< double >::value_type *arg2 = 0 ;
58010 - void *argp1 = 0 ;
58011 - int res1 = 0 ;
58012 - std::vector< double >::value_type temp2 ;
58013 - double val2 ;
58014 - int ecode2 = 0 ;
58015 - PyObject * obj0 = 0 ;
58016 - PyObject * obj1 = 0 ;
58017 -
58018 - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_append",&obj0,&obj1)) SWIG_fail;
58019 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58020 - if (!SWIG_IsOK(res1)) {
58021 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_append" "', argument " "1"" of type '" "std::vector< double > *""'");
58022 - }
58023 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58024 - ecode2 = SWIG_AsVal_double(obj1, &val2);
58025 - if (!SWIG_IsOK(ecode2)) {
58026 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_append" "', argument " "2"" of type '" "std::vector< double >::value_type""'");
58027 - }
58028 - temp2 = static_cast< std::vector< double >::value_type >(val2);
58029 - arg2 = &temp2;
58030 - std_vector_Sl_double_Sg__append(arg1,(double const &)*arg2);
58031 - resultobj = SWIG_Py_Void();
58032 - return resultobj;
58033 -fail:
58034 - return NULL;
58035 -}
58036 -
58037 -
58038 -SWIGINTERN PyObject *_wrap_new_DoubleVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58039 - PyObject *resultobj = 0;
58040 - std::vector< double > *result = 0 ;
58041 -
58042 - if (!PyArg_ParseTuple(args,(char *)":new_DoubleVector")) SWIG_fail;
58043 - result = (std::vector< double > *)new std::vector< double >();
58044 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW | 0 );
58045 - return resultobj;
58046 -fail:
58047 - return NULL;
58048 -}
58049 -
58050 -
58051 -SWIGINTERN PyObject *_wrap_new_DoubleVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58052 - PyObject *resultobj = 0;
58053 - std::vector< double > *arg1 = 0 ;
58054 - int res1 = SWIG_OLDOBJ ;
58055 - PyObject * obj0 = 0 ;
58056 - std::vector< double > *result = 0 ;
58057 -
58058 - if (!PyArg_ParseTuple(args,(char *)"O:new_DoubleVector",&obj0)) SWIG_fail;
58059 - {
58060 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
58061 - res1 = swig::asptr(obj0, &ptr);
58062 - if (!SWIG_IsOK(res1)) {
58063 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DoubleVector" "', argument " "1"" of type '" "std::vector< double > const &""'");
58064 - }
58065 - if (!ptr) {
58066 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DoubleVector" "', argument " "1"" of type '" "std::vector< double > const &""'");
58067 - }
58068 - arg1 = ptr;
58069 - }
58070 - result = (std::vector< double > *)new std::vector< double >((std::vector< double > const &)*arg1);
58071 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW | 0 );
58072 - if (SWIG_IsNewObj(res1)) delete arg1;
58073 - return resultobj;
58074 -fail:
58075 - if (SWIG_IsNewObj(res1)) delete arg1;
58076 - return NULL;
58077 -}
58078 -
58079 -
58080 -SWIGINTERN PyObject *_wrap_DoubleVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58081 - PyObject *resultobj = 0;
58082 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58083 - void *argp1 = 0 ;
58084 - int res1 = 0 ;
58085 - PyObject * obj0 = 0 ;
58086 - bool result;
58087 -
58088 - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_empty",&obj0)) SWIG_fail;
58089 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58090 - if (!SWIG_IsOK(res1)) {
58091 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_empty" "', argument " "1"" of type '" "std::vector< double > const *""'");
58092 - }
58093 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58094 - result = (bool)((std::vector< double > const *)arg1)->empty();
58095 - resultobj = SWIG_From_bool(static_cast< bool >(result));
58096 - return resultobj;
58097 -fail:
58098 - return NULL;
58099 -}
58100 -
58101 -
58102 -SWIGINTERN PyObject *_wrap_DoubleVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58103 - PyObject *resultobj = 0;
58104 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58105 - void *argp1 = 0 ;
58106 - int res1 = 0 ;
58107 - PyObject * obj0 = 0 ;
58108 - std::vector< double >::size_type result;
58109 -
58110 - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_size",&obj0)) SWIG_fail;
58111 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58112 - if (!SWIG_IsOK(res1)) {
58113 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_size" "', argument " "1"" of type '" "std::vector< double > const *""'");
58114 - }
58115 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58116 - result = ((std::vector< double > const *)arg1)->size();
58117 - resultobj = SWIG_From_size_t(static_cast< size_t >(result));
58118 - return resultobj;
58119 -fail:
58120 - return NULL;
58121 -}
58122 -
58123 -
58124 -SWIGINTERN PyObject *_wrap_DoubleVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58125 - PyObject *resultobj = 0;
58126 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58127 - void *argp1 = 0 ;
58128 - int res1 = 0 ;
58129 - PyObject * obj0 = 0 ;
58130 -
58131 - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_clear",&obj0)) SWIG_fail;
58132 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58133 - if (!SWIG_IsOK(res1)) {
58134 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_clear" "', argument " "1"" of type '" "std::vector< double > *""'");
58135 - }
58136 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58137 - (arg1)->clear();
58138 - resultobj = SWIG_Py_Void();
58139 - return resultobj;
58140 -fail:
58141 - return NULL;
58142 -}
58143 -
58144 -
58145 -SWIGINTERN PyObject *_wrap_DoubleVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58146 - PyObject *resultobj = 0;
58147 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58148 - std::vector< double > *arg2 = 0 ;
58149 - void *argp1 = 0 ;
58150 - int res1 = 0 ;
58151 - void *argp2 = 0 ;
58152 - int res2 = 0 ;
58153 - PyObject * obj0 = 0 ;
58154 - PyObject * obj1 = 0 ;
58155 -
58156 - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_swap",&obj0,&obj1)) SWIG_fail;
58157 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58158 - if (!SWIG_IsOK(res1)) {
58159 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_swap" "', argument " "1"" of type '" "std::vector< double > *""'");
58160 - }
58161 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58162 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 );
58163 - if (!SWIG_IsOK(res2)) {
58164 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DoubleVector_swap" "', argument " "2"" of type '" "std::vector< double > &""'");
58165 - }
58166 - if (!argp2) {
58167 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleVector_swap" "', argument " "2"" of type '" "std::vector< double > &""'");
58168 - }
58169 - arg2 = reinterpret_cast< std::vector< double > * >(argp2);
58170 - (arg1)->swap(*arg2);
58171 - resultobj = SWIG_Py_Void();
58172 - return resultobj;
58173 -fail:
58174 - return NULL;
58175 -}
58176 -
58177 -
58178 -SWIGINTERN PyObject *_wrap_DoubleVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58179 - PyObject *resultobj = 0;
58180 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58181 - void *argp1 = 0 ;
58182 - int res1 = 0 ;
58183 - PyObject * obj0 = 0 ;
58184 - SwigValueWrapper< std::allocator< double > > result;
58185 -
58186 - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_get_allocator",&obj0)) SWIG_fail;
58187 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58188 - if (!SWIG_IsOK(res1)) {
58189 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_get_allocator" "', argument " "1"" of type '" "std::vector< double > const *""'");
58190 - }
58191 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58192 - result = ((std::vector< double > const *)arg1)->get_allocator();
58193 - resultobj = SWIG_NewPointerObj((new std::vector< double >::allocator_type(static_cast< const std::vector< double >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_double_t, SWIG_POINTER_OWN | 0 );
58194 - return resultobj;
58195 -fail:
58196 - return NULL;
58197 -}
58198 -
58199 -
58200 -SWIGINTERN PyObject *_wrap_DoubleVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58201 - PyObject *resultobj = 0;
58202 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58203 - void *argp1 = 0 ;
58204 - int res1 = 0 ;
58205 - PyObject * obj0 = 0 ;
58206 - std::vector< double >::iterator result;
58207 -
58208 - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_begin",&obj0)) SWIG_fail;
58209 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58210 - if (!SWIG_IsOK(res1)) {
58211 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_begin" "', argument " "1"" of type '" "std::vector< double > *""'");
58212 - }
58213 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58214 - result = (arg1)->begin();
58215 - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)),
58216 - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
58217 - return resultobj;
58218 -fail:
58219 - return NULL;
58220 -}
58221 -
58222 -
58223 -SWIGINTERN PyObject *_wrap_DoubleVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58224 - PyObject *resultobj = 0;
58225 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58226 - void *argp1 = 0 ;
58227 - int res1 = 0 ;
58228 - PyObject * obj0 = 0 ;
58229 - std::vector< double >::iterator result;
58230 -
58231 - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_end",&obj0)) SWIG_fail;
58232 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58233 - if (!SWIG_IsOK(res1)) {
58234 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_end" "', argument " "1"" of type '" "std::vector< double > *""'");
58235 - }
58236 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58237 - result = (arg1)->end();
58238 - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)),
58239 - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
58240 - return resultobj;
58241 -fail:
58242 - return NULL;
58243 -}
58244 -
58245 -
58246 -SWIGINTERN PyObject *_wrap_DoubleVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58247 - PyObject *resultobj = 0;
58248 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58249 - void *argp1 = 0 ;
58250 - int res1 = 0 ;
58251 - PyObject * obj0 = 0 ;
58252 - std::vector< double >::reverse_iterator result;
58253 -
58254 - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_rbegin",&obj0)) SWIG_fail;
58255 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58256 - if (!SWIG_IsOK(res1)) {
58257 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_rbegin" "', argument " "1"" of type '" "std::vector< double > *""'");
58258 - }
58259 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58260 - result = (arg1)->rbegin();
58261 - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::reverse_iterator & >(result)),
58262 - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
58263 - return resultobj;
58264 -fail:
58265 - return NULL;
58266 -}
58267 -
58268 -
58269 -SWIGINTERN PyObject *_wrap_DoubleVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58270 - PyObject *resultobj = 0;
58271 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58272 - void *argp1 = 0 ;
58273 - int res1 = 0 ;
58274 - PyObject * obj0 = 0 ;
58275 - std::vector< double >::reverse_iterator result;
58276 -
58277 - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_rend",&obj0)) SWIG_fail;
58278 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58279 - if (!SWIG_IsOK(res1)) {
58280 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_rend" "', argument " "1"" of type '" "std::vector< double > *""'");
58281 - }
58282 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58283 - result = (arg1)->rend();
58284 - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::reverse_iterator & >(result)),
58285 - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
58286 - return resultobj;
58287 -fail:
58288 - return NULL;
58289 -}
58290 -
58291 -
58292 -SWIGINTERN PyObject *_wrap_new_DoubleVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58293 - PyObject *resultobj = 0;
58294 - std::vector< double >::size_type arg1 ;
58295 - size_t val1 ;
58296 - int ecode1 = 0 ;
58297 - PyObject * obj0 = 0 ;
58298 - std::vector< double > *result = 0 ;
58299 -
58300 - if (!PyArg_ParseTuple(args,(char *)"O:new_DoubleVector",&obj0)) SWIG_fail;
58301 - ecode1 = SWIG_AsVal_size_t(obj0, &val1);
58302 - if (!SWIG_IsOK(ecode1)) {
58303 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DoubleVector" "', argument " "1"" of type '" "std::vector< double >::size_type""'");
58304 - }
58305 - arg1 = static_cast< std::vector< double >::size_type >(val1);
58306 - result = (std::vector< double > *)new std::vector< double >(arg1);
58307 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW | 0 );
58308 - return resultobj;
58309 -fail:
58310 - return NULL;
58311 -}
58312 -
58313 -
58314 -SWIGINTERN PyObject *_wrap_DoubleVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58315 - PyObject *resultobj = 0;
58316 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58317 - void *argp1 = 0 ;
58318 - int res1 = 0 ;
58319 - PyObject * obj0 = 0 ;
58320 -
58321 - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_pop_back",&obj0)) SWIG_fail;
58322 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58323 - if (!SWIG_IsOK(res1)) {
58324 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_pop_back" "', argument " "1"" of type '" "std::vector< double > *""'");
58325 - }
58326 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58327 - (arg1)->pop_back();
58328 - resultobj = SWIG_Py_Void();
58329 - return resultobj;
58330 -fail:
58331 - return NULL;
58332 -}
58333 -
58334 -
58335 -SWIGINTERN PyObject *_wrap_DoubleVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58336 - PyObject *resultobj = 0;
58337 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58338 - std::vector< double >::size_type arg2 ;
58339 - void *argp1 = 0 ;
58340 - int res1 = 0 ;
58341 - size_t val2 ;
58342 - int ecode2 = 0 ;
58343 - PyObject * obj0 = 0 ;
58344 - PyObject * obj1 = 0 ;
58345 -
58346 - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_resize",&obj0,&obj1)) SWIG_fail;
58347 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58348 - if (!SWIG_IsOK(res1)) {
58349 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_resize" "', argument " "1"" of type '" "std::vector< double > *""'");
58350 - }
58351 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58352 - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
58353 - if (!SWIG_IsOK(ecode2)) {
58354 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_resize" "', argument " "2"" of type '" "std::vector< double >::size_type""'");
58355 - }
58356 - arg2 = static_cast< std::vector< double >::size_type >(val2);
58357 - (arg1)->resize(arg2);
58358 - resultobj = SWIG_Py_Void();
58359 - return resultobj;
58360 -fail:
58361 - return NULL;
58362 -}
58363 -
58364 -
58365 -SWIGINTERN PyObject *_wrap_DoubleVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58366 - PyObject *resultobj = 0;
58367 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58368 - std::vector< double >::iterator arg2 ;
58369 - void *argp1 = 0 ;
58370 - int res1 = 0 ;
58371 - swig::SwigPyIterator *iter2 = 0 ;
58372 - int res2 ;
58373 - PyObject * obj0 = 0 ;
58374 - PyObject * obj1 = 0 ;
58375 - std::vector< double >::iterator result;
58376 -
58377 - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_erase",&obj0,&obj1)) SWIG_fail;
58378 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58379 - if (!SWIG_IsOK(res1)) {
58380 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_erase" "', argument " "1"" of type '" "std::vector< double > *""'");
58381 - }
58382 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58383 - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
58384 - if (!SWIG_IsOK(res2) || !iter2) {
58385 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
58386 - } else {
58387 - swig::SwigPyIterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter2);
58388 - if (iter_t) {
58389 - arg2 = iter_t->get_current();
58390 - } else {
58391 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
58392 - }
58393 - }
58394 - result = (arg1)->erase(arg2);
58395 - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)),
58396 - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
58397 - return resultobj;
58398 -fail:
58399 - return NULL;
58400 -}
58401 -
58402 -
58403 -SWIGINTERN PyObject *_wrap_DoubleVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58404 - PyObject *resultobj = 0;
58405 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58406 - std::vector< double >::iterator arg2 ;
58407 - std::vector< double >::iterator arg3 ;
58408 - void *argp1 = 0 ;
58409 - int res1 = 0 ;
58410 - swig::SwigPyIterator *iter2 = 0 ;
58411 - int res2 ;
58412 - swig::SwigPyIterator *iter3 = 0 ;
58413 - int res3 ;
58414 - PyObject * obj0 = 0 ;
58415 - PyObject * obj1 = 0 ;
58416 - PyObject * obj2 = 0 ;
58417 - std::vector< double >::iterator result;
58418 -
58419 - if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector_erase",&obj0,&obj1,&obj2)) SWIG_fail;
58420 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58421 - if (!SWIG_IsOK(res1)) {
58422 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_erase" "', argument " "1"" of type '" "std::vector< double > *""'");
58423 - }
58424 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58425 - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
58426 - if (!SWIG_IsOK(res2) || !iter2) {
58427 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
58428 - } else {
58429 - swig::SwigPyIterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter2);
58430 - if (iter_t) {
58431 - arg2 = iter_t->get_current();
58432 - } else {
58433 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
58434 - }
58435 - }
58436 - res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0);
58437 - if (!SWIG_IsOK(res3) || !iter3) {
58438 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "3"" of type '" "std::vector< double >::iterator""'");
58439 - } else {
58440 - swig::SwigPyIterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter3);
58441 - if (iter_t) {
58442 - arg3 = iter_t->get_current();
58443 - } else {
58444 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "3"" of type '" "std::vector< double >::iterator""'");
58445 - }
58446 - }
58447 - result = (arg1)->erase(arg2,arg3);
58448 - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)),
58449 - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
58450 - return resultobj;
58451 -fail:
58452 - return NULL;
58453 -}
58454 -
58455 -
58456 -SWIGINTERN PyObject *_wrap_DoubleVector_erase(PyObject *self, PyObject *args) {
58457 - int argc;
58458 - PyObject *argv[4];
58459 - int ii;
58460 -
58461 - if (!PyTuple_Check(args)) SWIG_fail;
58462 - argc = args ? (int)PyObject_Length(args) : 0;
58463 - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
58464 - argv[ii] = PyTuple_GET_ITEM(args,ii);
58465 - }
58466 - if (argc == 2) {
58467 - int _v;
58468 - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
58469 - _v = SWIG_CheckState(res);
58470 - if (_v) {
58471 - swig::SwigPyIterator *iter = 0;
58472 - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
58473 - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter) != 0));
58474 - if (_v) {
58475 - return _wrap_DoubleVector_erase__SWIG_0(self, args);
58476 - }
58477 - }
58478 - }
58479 - if (argc == 3) {
58480 - int _v;
58481 - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
58482 - _v = SWIG_CheckState(res);
58483 - if (_v) {
58484 - swig::SwigPyIterator *iter = 0;
58485 - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
58486 - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter) != 0));
58487 - if (_v) {
58488 - swig::SwigPyIterator *iter = 0;
58489 - int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
58490 - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter) != 0));
58491 - if (_v) {
58492 - return _wrap_DoubleVector_erase__SWIG_1(self, args);
58493 - }
58494 - }
58495 - }
58496 - }
58497 -
58498 -fail:
58499 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'DoubleVector_erase'.\n"
58500 - " Possible C/C++ prototypes are:\n"
58501 - " std::vector< double >::erase(std::vector< double >::iterator)\n"
58502 - " std::vector< double >::erase(std::vector< double >::iterator,std::vector< double >::iterator)\n");
58503 - return 0;
58504 -}
58505 -
58506 -
58507 -SWIGINTERN PyObject *_wrap_new_DoubleVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58508 - PyObject *resultobj = 0;
58509 - std::vector< double >::size_type arg1 ;
58510 - std::vector< double >::value_type *arg2 = 0 ;
58511 - size_t val1 ;
58512 - int ecode1 = 0 ;
58513 - std::vector< double >::value_type temp2 ;
58514 - double val2 ;
58515 - int ecode2 = 0 ;
58516 - PyObject * obj0 = 0 ;
58517 - PyObject * obj1 = 0 ;
58518 - std::vector< double > *result = 0 ;
58519 -
58520 - if (!PyArg_ParseTuple(args,(char *)"OO:new_DoubleVector",&obj0,&obj1)) SWIG_fail;
58521 - ecode1 = SWIG_AsVal_size_t(obj0, &val1);
58522 - if (!SWIG_IsOK(ecode1)) {
58523 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DoubleVector" "', argument " "1"" of type '" "std::vector< double >::size_type""'");
58524 - }
58525 - arg1 = static_cast< std::vector< double >::size_type >(val1);
58526 - ecode2 = SWIG_AsVal_double(obj1, &val2);
58527 - if (!SWIG_IsOK(ecode2)) {
58528 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DoubleVector" "', argument " "2"" of type '" "std::vector< double >::value_type""'");
58529 - }
58530 - temp2 = static_cast< std::vector< double >::value_type >(val2);
58531 - arg2 = &temp2;
58532 - result = (std::vector< double > *)new std::vector< double >(arg1,(std::vector< double >::value_type const &)*arg2);
58533 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW | 0 );
58534 - return resultobj;
58535 -fail:
58536 - return NULL;
58537 -}
58538 -
58539 -
58540 -SWIGINTERN PyObject *_wrap_new_DoubleVector(PyObject *self, PyObject *args) {
58541 - int argc;
58542 - PyObject *argv[3];
58543 - int ii;
58544 -
58545 - if (!PyTuple_Check(args)) SWIG_fail;
58546 - argc = args ? (int)PyObject_Length(args) : 0;
58547 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
58548 - argv[ii] = PyTuple_GET_ITEM(args,ii);
58549 - }
58550 - if (argc == 0) {
58551 - return _wrap_new_DoubleVector__SWIG_0(self, args);
58552 - }
58553 - if (argc == 1) {
58554 - int _v;
58555 - {
58556 - int res = SWIG_AsVal_size_t(argv[0], NULL);
58557 - _v = SWIG_CheckState(res);
58558 - }
58559 - if (_v) {
58560 - return _wrap_new_DoubleVector__SWIG_2(self, args);
58561 - }
58562 - }
58563 - if (argc == 1) {
58564 - int _v;
58565 - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
58566 - _v = SWIG_CheckState(res);
58567 - if (_v) {
58568 - return _wrap_new_DoubleVector__SWIG_1(self, args);
58569 - }
58570 - }
58571 - if (argc == 2) {
58572 - int _v;
58573 - {
58574 - int res = SWIG_AsVal_size_t(argv[0], NULL);
58575 - _v = SWIG_CheckState(res);
58576 - }
58577 - if (_v) {
58578 - {
58579 - int res = SWIG_AsVal_double(argv[1], NULL);
58580 - _v = SWIG_CheckState(res);
58581 - }
58582 - if (_v) {
58583 - return _wrap_new_DoubleVector__SWIG_3(self, args);
58584 - }
58585 - }
58586 - }
58587 -
58588 -fail:
58589 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_DoubleVector'.\n"
58590 - " Possible C/C++ prototypes are:\n"
58591 - " std::vector< double >::vector()\n"
58592 - " std::vector< double >::vector(std::vector< double > const &)\n"
58593 - " std::vector< double >::vector(std::vector< double >::size_type)\n"
58594 - " std::vector< double >::vector(std::vector< double >::size_type,std::vector< double >::value_type const &)\n");
58595 - return 0;
58596 -}
58597 -
58598 -
58599 -SWIGINTERN PyObject *_wrap_DoubleVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58600 - PyObject *resultobj = 0;
58601 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58602 - std::vector< double >::value_type *arg2 = 0 ;
58603 - void *argp1 = 0 ;
58604 - int res1 = 0 ;
58605 - std::vector< double >::value_type temp2 ;
58606 - double val2 ;
58607 - int ecode2 = 0 ;
58608 - PyObject * obj0 = 0 ;
58609 - PyObject * obj1 = 0 ;
58610 -
58611 - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_push_back",&obj0,&obj1)) SWIG_fail;
58612 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58613 - if (!SWIG_IsOK(res1)) {
58614 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_push_back" "', argument " "1"" of type '" "std::vector< double > *""'");
58615 - }
58616 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58617 - ecode2 = SWIG_AsVal_double(obj1, &val2);
58618 - if (!SWIG_IsOK(ecode2)) {
58619 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_push_back" "', argument " "2"" of type '" "std::vector< double >::value_type""'");
58620 - }
58621 - temp2 = static_cast< std::vector< double >::value_type >(val2);
58622 - arg2 = &temp2;
58623 - (arg1)->push_back((std::vector< double >::value_type const &)*arg2);
58624 - resultobj = SWIG_Py_Void();
58625 - return resultobj;
58626 -fail:
58627 - return NULL;
58628 -}
58629 -
58630 -
58631 -SWIGINTERN PyObject *_wrap_DoubleVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58632 - PyObject *resultobj = 0;
58633 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58634 - void *argp1 = 0 ;
58635 - int res1 = 0 ;
58636 - PyObject * obj0 = 0 ;
58637 - std::vector< double >::value_type *result = 0 ;
58638 -
58639 - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_front",&obj0)) SWIG_fail;
58640 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58641 - if (!SWIG_IsOK(res1)) {
58642 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_front" "', argument " "1"" of type '" "std::vector< double > const *""'");
58643 - }
58644 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58645 - result = (std::vector< double >::value_type *) &((std::vector< double > const *)arg1)->front();
58646 - resultobj = SWIG_From_double(static_cast< double >(*result));
58647 - return resultobj;
58648 -fail:
58649 - return NULL;
58650 -}
58651 -
58652 -
58653 -SWIGINTERN PyObject *_wrap_DoubleVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58654 - PyObject *resultobj = 0;
58655 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58656 - void *argp1 = 0 ;
58657 - int res1 = 0 ;
58658 - PyObject * obj0 = 0 ;
58659 - std::vector< double >::value_type *result = 0 ;
58660 -
58661 - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_back",&obj0)) SWIG_fail;
58662 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58663 - if (!SWIG_IsOK(res1)) {
58664 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_back" "', argument " "1"" of type '" "std::vector< double > const *""'");
58665 - }
58666 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58667 - result = (std::vector< double >::value_type *) &((std::vector< double > const *)arg1)->back();
58668 - resultobj = SWIG_From_double(static_cast< double >(*result));
58669 - return resultobj;
58670 -fail:
58671 - return NULL;
58672 -}
58673 -
58674 -
58675 -SWIGINTERN PyObject *_wrap_DoubleVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58676 - PyObject *resultobj = 0;
58677 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58678 - std::vector< double >::size_type arg2 ;
58679 - std::vector< double >::value_type *arg3 = 0 ;
58680 - void *argp1 = 0 ;
58681 - int res1 = 0 ;
58682 - size_t val2 ;
58683 - int ecode2 = 0 ;
58684 - std::vector< double >::value_type temp3 ;
58685 - double val3 ;
58686 - int ecode3 = 0 ;
58687 - PyObject * obj0 = 0 ;
58688 - PyObject * obj1 = 0 ;
58689 - PyObject * obj2 = 0 ;
58690 -
58691 - if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector_assign",&obj0,&obj1,&obj2)) SWIG_fail;
58692 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58693 - if (!SWIG_IsOK(res1)) {
58694 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_assign" "', argument " "1"" of type '" "std::vector< double > *""'");
58695 - }
58696 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58697 - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
58698 - if (!SWIG_IsOK(ecode2)) {
58699 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_assign" "', argument " "2"" of type '" "std::vector< double >::size_type""'");
58700 - }
58701 - arg2 = static_cast< std::vector< double >::size_type >(val2);
58702 - ecode3 = SWIG_AsVal_double(obj2, &val3);
58703 - if (!SWIG_IsOK(ecode3)) {
58704 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector_assign" "', argument " "3"" of type '" "std::vector< double >::value_type""'");
58705 - }
58706 - temp3 = static_cast< std::vector< double >::value_type >(val3);
58707 - arg3 = &temp3;
58708 - (arg1)->assign(arg2,(std::vector< double >::value_type const &)*arg3);
58709 - resultobj = SWIG_Py_Void();
58710 - return resultobj;
58711 -fail:
58712 - return NULL;
58713 -}
58714 -
58715 -
58716 -SWIGINTERN PyObject *_wrap_DoubleVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58717 - PyObject *resultobj = 0;
58718 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58719 - std::vector< double >::size_type arg2 ;
58720 - std::vector< double >::value_type *arg3 = 0 ;
58721 - void *argp1 = 0 ;
58722 - int res1 = 0 ;
58723 - size_t val2 ;
58724 - int ecode2 = 0 ;
58725 - std::vector< double >::value_type temp3 ;
58726 - double val3 ;
58727 - int ecode3 = 0 ;
58728 - PyObject * obj0 = 0 ;
58729 - PyObject * obj1 = 0 ;
58730 - PyObject * obj2 = 0 ;
58731 -
58732 - if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector_resize",&obj0,&obj1,&obj2)) SWIG_fail;
58733 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58734 - if (!SWIG_IsOK(res1)) {
58735 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_resize" "', argument " "1"" of type '" "std::vector< double > *""'");
58736 - }
58737 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58738 - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
58739 - if (!SWIG_IsOK(ecode2)) {
58740 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_resize" "', argument " "2"" of type '" "std::vector< double >::size_type""'");
58741 - }
58742 - arg2 = static_cast< std::vector< double >::size_type >(val2);
58743 - ecode3 = SWIG_AsVal_double(obj2, &val3);
58744 - if (!SWIG_IsOK(ecode3)) {
58745 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector_resize" "', argument " "3"" of type '" "std::vector< double >::value_type""'");
58746 - }
58747 - temp3 = static_cast< std::vector< double >::value_type >(val3);
58748 - arg3 = &temp3;
58749 - (arg1)->resize(arg2,(std::vector< double >::value_type const &)*arg3);
58750 - resultobj = SWIG_Py_Void();
58751 - return resultobj;
58752 -fail:
58753 - return NULL;
58754 -}
58755 -
58756 -
58757 -SWIGINTERN PyObject *_wrap_DoubleVector_resize(PyObject *self, PyObject *args) {
58758 - int argc;
58759 - PyObject *argv[4];
58760 - int ii;
58761 -
58762 - if (!PyTuple_Check(args)) SWIG_fail;
58763 - argc = args ? (int)PyObject_Length(args) : 0;
58764 - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
58765 - argv[ii] = PyTuple_GET_ITEM(args,ii);
58766 - }
58767 - if (argc == 2) {
58768 - int _v;
58769 - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
58770 - _v = SWIG_CheckState(res);
58771 - if (_v) {
58772 - {
58773 - int res = SWIG_AsVal_size_t(argv[1], NULL);
58774 - _v = SWIG_CheckState(res);
58775 - }
58776 - if (_v) {
58777 - return _wrap_DoubleVector_resize__SWIG_0(self, args);
58778 - }
58779 - }
58780 - }
58781 - if (argc == 3) {
58782 - int _v;
58783 - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
58784 - _v = SWIG_CheckState(res);
58785 - if (_v) {
58786 - {
58787 - int res = SWIG_AsVal_size_t(argv[1], NULL);
58788 - _v = SWIG_CheckState(res);
58789 - }
58790 - if (_v) {
58791 - {
58792 - int res = SWIG_AsVal_double(argv[2], NULL);
58793 - _v = SWIG_CheckState(res);
58794 - }
58795 - if (_v) {
58796 - return _wrap_DoubleVector_resize__SWIG_1(self, args);
58797 - }
58798 - }
58799 - }
58800 - }
58801 -
58802 -fail:
58803 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'DoubleVector_resize'.\n"
58804 - " Possible C/C++ prototypes are:\n"
58805 - " std::vector< double >::resize(std::vector< double >::size_type)\n"
58806 - " std::vector< double >::resize(std::vector< double >::size_type,std::vector< double >::value_type const &)\n");
58807 - return 0;
58808 -}
58809 -
58810 -
58811 -SWIGINTERN PyObject *_wrap_DoubleVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58812 - PyObject *resultobj = 0;
58813 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58814 - std::vector< double >::iterator arg2 ;
58815 - std::vector< double >::value_type *arg3 = 0 ;
58816 - void *argp1 = 0 ;
58817 - int res1 = 0 ;
58818 - swig::SwigPyIterator *iter2 = 0 ;
58819 - int res2 ;
58820 - std::vector< double >::value_type temp3 ;
58821 - double val3 ;
58822 - int ecode3 = 0 ;
58823 - PyObject * obj0 = 0 ;
58824 - PyObject * obj1 = 0 ;
58825 - PyObject * obj2 = 0 ;
58826 - std::vector< double >::iterator result;
58827 -
58828 - if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector_insert",&obj0,&obj1,&obj2)) SWIG_fail;
58829 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58830 - if (!SWIG_IsOK(res1)) {
58831 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_insert" "', argument " "1"" of type '" "std::vector< double > *""'");
58832 - }
58833 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58834 - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
58835 - if (!SWIG_IsOK(res2) || !iter2) {
58836 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
58837 - } else {
58838 - swig::SwigPyIterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter2);
58839 - if (iter_t) {
58840 - arg2 = iter_t->get_current();
58841 - } else {
58842 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
58843 - }
58844 - }
58845 - ecode3 = SWIG_AsVal_double(obj2, &val3);
58846 - if (!SWIG_IsOK(ecode3)) {
58847 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector_insert" "', argument " "3"" of type '" "std::vector< double >::value_type""'");
58848 - }
58849 - temp3 = static_cast< std::vector< double >::value_type >(val3);
58850 - arg3 = &temp3;
58851 - result = (arg1)->insert(arg2,(std::vector< double >::value_type const &)*arg3);
58852 - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)),
58853 - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
58854 - return resultobj;
58855 -fail:
58856 - return NULL;
58857 -}
58858 -
58859 -
58860 -SWIGINTERN PyObject *_wrap_DoubleVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58861 - PyObject *resultobj = 0;
58862 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58863 - std::vector< double >::iterator arg2 ;
58864 - std::vector< double >::size_type arg3 ;
58865 - std::vector< double >::value_type *arg4 = 0 ;
58866 - void *argp1 = 0 ;
58867 - int res1 = 0 ;
58868 - swig::SwigPyIterator *iter2 = 0 ;
58869 - int res2 ;
58870 - size_t val3 ;
58871 - int ecode3 = 0 ;
58872 - std::vector< double >::value_type temp4 ;
58873 - double val4 ;
58874 - int ecode4 = 0 ;
58875 - PyObject * obj0 = 0 ;
58876 - PyObject * obj1 = 0 ;
58877 - PyObject * obj2 = 0 ;
58878 - PyObject * obj3 = 0 ;
58879 -
58880 - if (!PyArg_ParseTuple(args,(char *)"OOOO:DoubleVector_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
58881 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58882 - if (!SWIG_IsOK(res1)) {
58883 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_insert" "', argument " "1"" of type '" "std::vector< double > *""'");
58884 - }
58885 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58886 - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
58887 - if (!SWIG_IsOK(res2) || !iter2) {
58888 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
58889 - } else {
58890 - swig::SwigPyIterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter2);
58891 - if (iter_t) {
58892 - arg2 = iter_t->get_current();
58893 - } else {
58894 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
58895 - }
58896 - }
58897 - ecode3 = SWIG_AsVal_size_t(obj2, &val3);
58898 - if (!SWIG_IsOK(ecode3)) {
58899 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector_insert" "', argument " "3"" of type '" "std::vector< double >::size_type""'");
58900 - }
58901 - arg3 = static_cast< std::vector< double >::size_type >(val3);
58902 - ecode4 = SWIG_AsVal_double(obj3, &val4);
58903 - if (!SWIG_IsOK(ecode4)) {
58904 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DoubleVector_insert" "', argument " "4"" of type '" "std::vector< double >::value_type""'");
58905 - }
58906 - temp4 = static_cast< std::vector< double >::value_type >(val4);
58907 - arg4 = &temp4;
58908 - (arg1)->insert(arg2,arg3,(std::vector< double >::value_type const &)*arg4);
58909 - resultobj = SWIG_Py_Void();
58910 - return resultobj;
58911 -fail:
58912 - return NULL;
58913 -}
58914 -
58915 -
58916 -SWIGINTERN PyObject *_wrap_DoubleVector_insert(PyObject *self, PyObject *args) {
58917 - int argc;
58918 - PyObject *argv[5];
58919 - int ii;
58920 -
58921 - if (!PyTuple_Check(args)) SWIG_fail;
58922 - argc = args ? (int)PyObject_Length(args) : 0;
58923 - for (ii = 0; (ii < 4) && (ii < argc); ii++) {
58924 - argv[ii] = PyTuple_GET_ITEM(args,ii);
58925 - }
58926 - if (argc == 3) {
58927 - int _v;
58928 - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
58929 - _v = SWIG_CheckState(res);
58930 - if (_v) {
58931 - swig::SwigPyIterator *iter = 0;
58932 - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
58933 - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter) != 0));
58934 - if (_v) {
58935 - {
58936 - int res = SWIG_AsVal_double(argv[2], NULL);
58937 - _v = SWIG_CheckState(res);
58938 - }
58939 - if (_v) {
58940 - return _wrap_DoubleVector_insert__SWIG_0(self, args);
58941 - }
58942 - }
58943 - }
58944 - }
58945 - if (argc == 4) {
58946 - int _v;
58947 - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
58948 - _v = SWIG_CheckState(res);
58949 - if (_v) {
58950 - swig::SwigPyIterator *iter = 0;
58951 - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
58952 - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter) != 0));
58953 - if (_v) {
58954 - {
58955 - int res = SWIG_AsVal_size_t(argv[2], NULL);
58956 - _v = SWIG_CheckState(res);
58957 - }
58958 - if (_v) {
58959 - {
58960 - int res = SWIG_AsVal_double(argv[3], NULL);
58961 - _v = SWIG_CheckState(res);
58962 - }
58963 - if (_v) {
58964 - return _wrap_DoubleVector_insert__SWIG_1(self, args);
58965 - }
58966 - }
58967 - }
58968 - }
58969 - }
58970 -
58971 -fail:
58972 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'DoubleVector_insert'.\n"
58973 - " Possible C/C++ prototypes are:\n"
58974 - " std::vector< double >::insert(std::vector< double >::iterator,std::vector< double >::value_type const &)\n"
58975 - " std::vector< double >::insert(std::vector< double >::iterator,std::vector< double >::size_type,std::vector< double >::value_type const &)\n");
58976 - return 0;
58977 -}
58978 -
58979 -
58980 -SWIGINTERN PyObject *_wrap_DoubleVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58981 - PyObject *resultobj = 0;
58982 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
58983 - std::vector< double >::size_type arg2 ;
58984 - void *argp1 = 0 ;
58985 - int res1 = 0 ;
58986 - size_t val2 ;
58987 - int ecode2 = 0 ;
58988 - PyObject * obj0 = 0 ;
58989 - PyObject * obj1 = 0 ;
58990 -
58991 - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_reserve",&obj0,&obj1)) SWIG_fail;
58992 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
58993 - if (!SWIG_IsOK(res1)) {
58994 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_reserve" "', argument " "1"" of type '" "std::vector< double > *""'");
58995 - }
58996 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
58997 - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
58998 - if (!SWIG_IsOK(ecode2)) {
58999 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_reserve" "', argument " "2"" of type '" "std::vector< double >::size_type""'");
59000 - }
59001 - arg2 = static_cast< std::vector< double >::size_type >(val2);
59002 - (arg1)->reserve(arg2);
59003 - resultobj = SWIG_Py_Void();
59004 - return resultobj;
59005 -fail:
59006 - return NULL;
59007 -}
59008 -
59009 -
59010 -SWIGINTERN PyObject *_wrap_DoubleVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59011 - PyObject *resultobj = 0;
59012 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
59013 - void *argp1 = 0 ;
59014 - int res1 = 0 ;
59015 - PyObject * obj0 = 0 ;
59016 - std::vector< double >::size_type result;
59017 -
59018 - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_capacity",&obj0)) SWIG_fail;
59019 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
59020 - if (!SWIG_IsOK(res1)) {
59021 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_capacity" "', argument " "1"" of type '" "std::vector< double > const *""'");
59022 - }
59023 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
59024 - result = ((std::vector< double > const *)arg1)->capacity();
59025 - resultobj = SWIG_From_size_t(static_cast< size_t >(result));
59026 - return resultobj;
59027 -fail:
59028 - return NULL;
59029 -}
59030 -
59031 -
59032 -SWIGINTERN PyObject *_wrap_delete_DoubleVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59033 - PyObject *resultobj = 0;
59034 - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
59035 - void *argp1 = 0 ;
59036 - int res1 = 0 ;
59037 - PyObject * obj0 = 0 ;
59038 -
59039 - if (!PyArg_ParseTuple(args,(char *)"O:delete_DoubleVector",&obj0)) SWIG_fail;
59040 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_DISOWN | 0 );
59041 - if (!SWIG_IsOK(res1)) {
59042 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DoubleVector" "', argument " "1"" of type '" "std::vector< double > *""'");
59043 - }
59044 - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
59045 - delete arg1;
59046 - resultobj = SWIG_Py_Void();
59047 - return resultobj;
59048 -fail:
59049 - return NULL;
59050 -}
59051 -
59052 -
59053 -SWIGINTERN PyObject *DoubleVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59054 - PyObject *obj;
59055 - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
59056 - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_NewClientData(obj));
59057 - return SWIG_Py_Void();
59058 -}
59059 -
59060 -SWIGINTERN PyObject *_wrap_ImageVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59061 - PyObject *resultobj = 0;
59062 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
59063 - PyObject **arg2 = (PyObject **) 0 ;
59064 - void *argp1 = 0 ;
59065 - int res1 = 0 ;
59066 - PyObject * obj0 = 0 ;
59067 - swig::SwigPyIterator *result = 0 ;
59068 -
59069 - arg2 = &obj0;
59070 - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_iterator",&obj0)) SWIG_fail;
59071 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
59072 - if (!SWIG_IsOK(res1)) {
59073 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_iterator" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
59074 - }
59075 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
59076 - result = (swig::SwigPyIterator *)std_vector_Sl_vips_VImage_Sg__iterator(arg1,arg2);
59077 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
59078 - return resultobj;
59079 -fail:
59080 - return NULL;
59081 -}
59082 -
59083 -
59084 -SWIGINTERN PyObject *_wrap_ImageVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59085 - PyObject *resultobj = 0;
59086 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
59087 - void *argp1 = 0 ;
59088 - int res1 = 0 ;
59089 - PyObject * obj0 = 0 ;
59090 - bool result;
59091 -
59092 - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector___nonzero__",&obj0)) SWIG_fail;
59093 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
59094 - if (!SWIG_IsOK(res1)) {
59095 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___nonzero__" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'");
59096 - }
59097 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
59098 - result = (bool)std_vector_Sl_vips_VImage_Sg____nonzero__((std::vector< vips::VImage > const *)arg1);
59099 - resultobj = SWIG_From_bool(static_cast< bool >(result));
59100 - return resultobj;
59101 -fail:
59102 - return NULL;
59103 -}
59104 -
59105 -
59106 -SWIGINTERN PyObject *_wrap_ImageVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59107 - PyObject *resultobj = 0;
59108 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
59109 - void *argp1 = 0 ;
59110 - int res1 = 0 ;
59111 - PyObject * obj0 = 0 ;
59112 - bool result;
59113 -
59114 - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector___bool__",&obj0)) SWIG_fail;
59115 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
59116 - if (!SWIG_IsOK(res1)) {
59117 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___bool__" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'");
59118 - }
59119 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
59120 - result = (bool)std_vector_Sl_vips_VImage_Sg____bool__((std::vector< vips::VImage > const *)arg1);
59121 - resultobj = SWIG_From_bool(static_cast< bool >(result));
59122 - return resultobj;
59123 -fail:
59124 - return NULL;
59125 -}
59126 -
59127 -
59128 -SWIGINTERN PyObject *_wrap_ImageVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59129 - PyObject *resultobj = 0;
59130 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
59131 - void *argp1 = 0 ;
59132 - int res1 = 0 ;
59133 - PyObject * obj0 = 0 ;
59134 - std::vector< vips::VImage >::size_type result;
59135 -
59136 - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector___len__",&obj0)) SWIG_fail;
59137 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
59138 - if (!SWIG_IsOK(res1)) {
59139 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___len__" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'");
59140 - }
59141 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
59142 - result = std_vector_Sl_vips_VImage_Sg____len__((std::vector< vips::VImage > const *)arg1);
59143 - resultobj = SWIG_From_size_t(static_cast< size_t >(result));
59144 - return resultobj;
59145 -fail:
59146 - return NULL;
59147 -}
59148 -
59149 -
59150 -SWIGINTERN PyObject *_wrap_ImageVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59151 - PyObject *resultobj = 0;
59152 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
59153 - void *argp1 = 0 ;
59154 - int res1 = 0 ;
59155 - PyObject * obj0 = 0 ;
59156 - std::vector< vips::VImage >::value_type result;
59157 -
59158 - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_pop",&obj0)) SWIG_fail;
59159 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
59160 - if (!SWIG_IsOK(res1)) {
59161 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_pop" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
59162 - }
59163 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
59164 - try {
59165 - result = std_vector_Sl_vips_VImage_Sg__pop(arg1);
59166 - }
59167 - catch(std::out_of_range &_e) {
59168 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
59169 - }
59170 -
59171 - resultobj = SWIG_NewPointerObj((new std::vector< vips::VImage >::value_type(static_cast< const std::vector< vips::VImage >::value_type& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
59172 - return resultobj;
59173 -fail:
59174 - return NULL;
59175 -}
59176 -
59177 -
59178 -SWIGINTERN PyObject *_wrap_ImageVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59179 - PyObject *resultobj = 0;
59180 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
59181 - std::vector< vips::VImage >::difference_type arg2 ;
59182 - std::vector< vips::VImage >::difference_type arg3 ;
59183 - void *argp1 = 0 ;
59184 - int res1 = 0 ;
59185 - ptrdiff_t val2 ;
59186 - int ecode2 = 0 ;
59187 - ptrdiff_t val3 ;
59188 - int ecode3 = 0 ;
59189 - PyObject * obj0 = 0 ;
59190 - PyObject * obj1 = 0 ;
59191 - PyObject * obj2 = 0 ;
59192 - std::vector< vips::VImage,std::allocator< vips::VImage > > *result = 0 ;
59193 -
59194 - if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector___getslice__",&obj0,&obj1,&obj2)) SWIG_fail;
59195 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
59196 - if (!SWIG_IsOK(res1)) {
59197 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___getslice__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
59198 - }
59199 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
59200 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
59201 - if (!SWIG_IsOK(ecode2)) {
59202 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector___getslice__" "', argument " "2"" of type '" "std::vector< vips::VImage >::difference_type""'");
59203 - }
59204 - arg2 = static_cast< std::vector< vips::VImage >::difference_type >(val2);
59205 - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
59206 - if (!SWIG_IsOK(ecode3)) {
59207 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ImageVector___getslice__" "', argument " "3"" of type '" "std::vector< vips::VImage >::difference_type""'");
59208 - }
59209 - arg3 = static_cast< std::vector< vips::VImage >::difference_type >(val3);
59210 - try {
59211 - result = (std::vector< vips::VImage,std::allocator< vips::VImage > > *)std_vector_Sl_vips_VImage_Sg____getslice__(arg1,arg2,arg3);
59212 - }
59213 - catch(std::out_of_range &_e) {
59214 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
59215 - }
59216 - catch(std::invalid_argument &_e) {
59217 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
59218 - }
59219 -
59220 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_POINTER_OWN | 0 );
59221 - return resultobj;
59222 -fail:
59223 - return NULL;
59224 -}
59225 -
59226 -
59227 -SWIGINTERN PyObject *_wrap_ImageVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59228 - PyObject *resultobj = 0;
59229 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
59230 - std::vector< vips::VImage >::difference_type arg2 ;
59231 - std::vector< vips::VImage >::difference_type arg3 ;
59232 - std::vector< vips::VImage,std::allocator< vips::VImage > > *arg4 = 0 ;
59233 - void *argp1 = 0 ;
59234 - int res1 = 0 ;
59235 - ptrdiff_t val2 ;
59236 - int ecode2 = 0 ;
59237 - ptrdiff_t val3 ;
59238 - int ecode3 = 0 ;
59239 - int res4 = SWIG_OLDOBJ ;
59240 - PyObject * obj0 = 0 ;
59241 - PyObject * obj1 = 0 ;
59242 - PyObject * obj2 = 0 ;
59243 - PyObject * obj3 = 0 ;
59244 -
59245 - if (!PyArg_ParseTuple(args,(char *)"OOOO:ImageVector___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
59246 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
59247 - if (!SWIG_IsOK(res1)) {
59248 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___setslice__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
59249 - }
59250 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
59251 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
59252 - if (!SWIG_IsOK(ecode2)) {
59253 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector___setslice__" "', argument " "2"" of type '" "std::vector< vips::VImage >::difference_type""'");
59254 - }
59255 - arg2 = static_cast< std::vector< vips::VImage >::difference_type >(val2);
59256 - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
59257 - if (!SWIG_IsOK(ecode3)) {
59258 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ImageVector___setslice__" "', argument " "3"" of type '" "std::vector< vips::VImage >::difference_type""'");
59259 - }
59260 - arg3 = static_cast< std::vector< vips::VImage >::difference_type >(val3);
59261 - {
59262 - std::vector<vips::VImage,std::allocator< vips::VImage > > *ptr = (std::vector<vips::VImage,std::allocator< vips::VImage > > *)0;
59263 - res4 = swig::asptr(obj3, &ptr);
59264 - if (!SWIG_IsOK(res4)) {
59265 - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ImageVector___setslice__" "', argument " "4"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > > const &""'");
59266 - }
59267 - if (!ptr) {
59268 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector___setslice__" "', argument " "4"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > > const &""'");
59269 - }
59270 - arg4 = ptr;
59271 - }
59272 - try {
59273 - std_vector_Sl_vips_VImage_Sg____setslice____SWIG_0(arg1,arg2,arg3,(std::vector< vips::VImage,std::allocator< vips::VImage > > const &)*arg4);
59274 - }
59275 - catch(std::out_of_range &_e) {
59276 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
59277 - }
59278 - catch(std::invalid_argument &_e) {
59279 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
59280 - }
59281 -
59282 - resultobj = SWIG_Py_Void();
59283 - if (SWIG_IsNewObj(res4)) delete arg4;
59284 - return resultobj;
59285 -fail:
59286 - if (SWIG_IsNewObj(res4)) delete arg4;
59287 - return NULL;
59288 -}
59289 -
59290 -
59291 -SWIGINTERN PyObject *_wrap_ImageVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59292 - PyObject *resultobj = 0;
59293 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
59294 - std::vector< vips::VImage >::difference_type arg2 ;
59295 - std::vector< vips::VImage >::difference_type arg3 ;
59296 - void *argp1 = 0 ;
59297 - int res1 = 0 ;
59298 - ptrdiff_t val2 ;
59299 - int ecode2 = 0 ;
59300 - ptrdiff_t val3 ;
59301 - int ecode3 = 0 ;
59302 - PyObject * obj0 = 0 ;
59303 - PyObject * obj1 = 0 ;
59304 - PyObject * obj2 = 0 ;
59305 -
59306 - if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector___setslice__",&obj0,&obj1,&obj2)) SWIG_fail;
59307 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
59308 - if (!SWIG_IsOK(res1)) {
59309 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___setslice__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
59310 - }
59311 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
59312 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
59313 - if (!SWIG_IsOK(ecode2)) {
59314 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector___setslice__" "', argument " "2"" of type '" "std::vector< vips::VImage >::difference_type""'");
59315 - }
59316 - arg2 = static_cast< std::vector< vips::VImage >::difference_type >(val2);
59317 - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
59318 - if (!SWIG_IsOK(ecode3)) {
59319 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ImageVector___setslice__" "', argument " "3"" of type '" "std::vector< vips::VImage >::difference_type""'");
59320 - }
59321 - arg3 = static_cast< std::vector< vips::VImage >::difference_type >(val3);
59322 - try {
59323 - std_vector_Sl_vips_VImage_Sg____setslice____SWIG_0(arg1,arg2,arg3);
59324 - }
59325 - catch(std::out_of_range &_e) {
59326 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
59327 - }
59328 - catch(std::invalid_argument &_e) {
59329 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
59330 - }
59331 -
59332 - resultobj = SWIG_Py_Void();
59333 - return resultobj;
59334 -fail:
59335 - return NULL;
59336 -}
59337 -
59338 -
59339 -SWIGINTERN PyObject *_wrap_ImageVector___setslice__(PyObject *self, PyObject *args) {
59340 - int argc;
59341 - PyObject *argv[5];
59342 - int ii;
59343 -
59344 - if (!PyTuple_Check(args)) SWIG_fail;
59345 - argc = args ? (int)PyObject_Length(args) : 0;
59346 - for (ii = 0; (ii < 4) && (ii < argc); ii++) {
59347 - argv[ii] = PyTuple_GET_ITEM(args,ii);
59348 - }
59349 - if (argc == 3) {
59350 - int _v;
59351 - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
59352 - _v = SWIG_CheckState(res);
59353 - if (_v) {
59354 - {
59355 - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
59356 - _v = SWIG_CheckState(res);
59357 - }
59358 - if (_v) {
59359 - {
59360 - int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
59361 - _v = SWIG_CheckState(res);
59362 - }
59363 - if (_v) {
59364 - return _wrap_ImageVector___setslice____SWIG_1(self, args);
59365 - }
59366 - }
59367 - }
59368 - }
59369 - if (argc == 4) {
59370 - int _v;
59371 - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
59372 - _v = SWIG_CheckState(res);
59373 - if (_v) {
59374 - {
59375 - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
59376 - _v = SWIG_CheckState(res);
59377 - }
59378 - if (_v) {
59379 - {
59380 - int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
59381 - _v = SWIG_CheckState(res);
59382 - }
59383 - if (_v) {
59384 - int res = swig::asptr(argv[3], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
59385 - _v = SWIG_CheckState(res);
59386 - if (_v) {
59387 - return _wrap_ImageVector___setslice____SWIG_0(self, args);
59388 - }
59389 - }
59390 - }
59391 - }
59392 - }
59393 -
59394 -fail:
59395 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ImageVector___setslice__'.\n"
59396 - " Possible C/C++ prototypes are:\n"
59397 - " std::vector< vips::VImage >::__setslice__(std::vector< vips::VImage >::difference_type,std::vector< vips::VImage >::difference_type,std::vector< vips::VImage,std::allocator< vips::VImage > > const &)\n"
59398 - " std::vector< vips::VImage >::__setslice__(std::vector< vips::VImage >::difference_type,std::vector< vips::VImage >::difference_type)\n");
59399 - return 0;
59400 -}
59401 -
59402 -
59403 -SWIGINTERN PyObject *_wrap_ImageVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59404 - PyObject *resultobj = 0;
59405 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
59406 - std::vector< vips::VImage >::difference_type arg2 ;
59407 - std::vector< vips::VImage >::difference_type arg3 ;
59408 - void *argp1 = 0 ;
59409 - int res1 = 0 ;
59410 - ptrdiff_t val2 ;
59411 - int ecode2 = 0 ;
59412 - ptrdiff_t val3 ;
59413 - int ecode3 = 0 ;
59414 - PyObject * obj0 = 0 ;
59415 - PyObject * obj1 = 0 ;
59416 - PyObject * obj2 = 0 ;
59417 -
59418 - if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector___delslice__",&obj0,&obj1,&obj2)) SWIG_fail;
59419 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
59420 - if (!SWIG_IsOK(res1)) {
59421 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___delslice__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
59422 - }
59423 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
59424 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
59425 - if (!SWIG_IsOK(ecode2)) {
59426 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector___delslice__" "', argument " "2"" of type '" "std::vector< vips::VImage >::difference_type""'");
59427 - }
59428 - arg2 = static_cast< std::vector< vips::VImage >::difference_type >(val2);
59429 - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
59430 - if (!SWIG_IsOK(ecode3)) {
59431 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ImageVector___delslice__" "', argument " "3"" of type '" "std::vector< vips::VImage >::difference_type""'");
59432 - }
59433 - arg3 = static_cast< std::vector< vips::VImage >::difference_type >(val3);
59434 - try {
59435 - std_vector_Sl_vips_VImage_Sg____delslice__(arg1,arg2,arg3);
59436 - }
59437 - catch(std::out_of_range &_e) {
59438 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
59439 - }
59440 - catch(std::invalid_argument &_e) {
59441 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
59442 - }
59443 -
59444 - resultobj = SWIG_Py_Void();
59445 - return resultobj;
59446 -fail:
59447 - return NULL;
59448 -}
59449 -
59450 -
59451 -SWIGINTERN PyObject *_wrap_ImageVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59452 - PyObject *resultobj = 0;
59453 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
59454 - std::vector< vips::VImage >::difference_type arg2 ;
59455 - void *argp1 = 0 ;
59456 - int res1 = 0 ;
59457 - ptrdiff_t val2 ;
59458 - int ecode2 = 0 ;
59459 - PyObject * obj0 = 0 ;
59460 - PyObject * obj1 = 0 ;
59461 -
59462 - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector___delitem__",&obj0,&obj1)) SWIG_fail;
59463 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
59464 - if (!SWIG_IsOK(res1)) {
59465 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___delitem__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
59466 - }
59467 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
59468 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
59469 - if (!SWIG_IsOK(ecode2)) {
59470 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector___delitem__" "', argument " "2"" of type '" "std::vector< vips::VImage >::difference_type""'");
59471 - }
59472 - arg2 = static_cast< std::vector< vips::VImage >::difference_type >(val2);
59473 - try {
59474 - std_vector_Sl_vips_VImage_Sg____delitem____SWIG_0(arg1,arg2);
59475 - }
59476 - catch(std::out_of_range &_e) {
59477 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
59478 - }
59479 -
59480 - resultobj = SWIG_Py_Void();
59481 - return resultobj;
59482 -fail:
59483 - return NULL;
59484 -}
59485 -
59486 -
59487 -SWIGINTERN PyObject *_wrap_ImageVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59488 - PyObject *resultobj = 0;
59489 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
59490 - PySliceObject *arg2 = (PySliceObject *) 0 ;
59491 - void *argp1 = 0 ;
59492 - int res1 = 0 ;
59493 - PyObject * obj0 = 0 ;
59494 - PyObject * obj1 = 0 ;
59495 - std::vector< vips::VImage,std::allocator< vips::VImage > > *result = 0 ;
59496 -
59497 - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector___getitem__",&obj0,&obj1)) SWIG_fail;
59498 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
59499 - if (!SWIG_IsOK(res1)) {
59500 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___getitem__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
59501 - }
59502 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
59503 - {
59504 - if (!PySlice_Check(obj1)) {
59505 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'");
59506 - }
59507 - arg2 = (PySliceObject *) obj1;
59508 - }
59509 - try {
59510 - result = (std::vector< vips::VImage,std::allocator< vips::VImage > > *)std_vector_Sl_vips_VImage_Sg____getitem____SWIG_0(arg1,arg2);
59511 - }
59512 - catch(std::out_of_range &_e) {
59513 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
59514 - }
59515 - catch(std::invalid_argument &_e) {
59516 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
59517 - }
59518 -
59519 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_POINTER_OWN | 0 );
59520 - return resultobj;
59521 -fail:
59522 - return NULL;
59523 -}
59524 -
59525 -
59526 -SWIGINTERN PyObject *_wrap_ImageVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59527 - PyObject *resultobj = 0;
59528 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
59529 - PySliceObject *arg2 = (PySliceObject *) 0 ;
59530 - std::vector< vips::VImage,std::allocator< vips::VImage > > *arg3 = 0 ;
59531 - void *argp1 = 0 ;
59532 - int res1 = 0 ;
59533 - int res3 = SWIG_OLDOBJ ;
59534 - PyObject * obj0 = 0 ;
59535 - PyObject * obj1 = 0 ;
59536 - PyObject * obj2 = 0 ;
59537 -
59538 - if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
59539 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
59540 - if (!SWIG_IsOK(res1)) {
59541 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___setitem__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
59542 - }
59543 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
59544 - {
59545 - if (!PySlice_Check(obj1)) {
59546 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
59547 - }
59548 - arg2 = (PySliceObject *) obj1;
59549 - }
59550 - {
59551 - std::vector<vips::VImage,std::allocator< vips::VImage > > *ptr = (std::vector<vips::VImage,std::allocator< vips::VImage > > *)0;
59552 - res3 = swig::asptr(obj2, &ptr);
59553 - if (!SWIG_IsOK(res3)) {
59554 - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ImageVector___setitem__" "', argument " "3"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > > const &""'");
59555 - }
59556 - if (!ptr) {
59557 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector___setitem__" "', argument " "3"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > > const &""'");
59558 - }
59559 - arg3 = ptr;
59560 - }
59561 - try {
59562 - std_vector_Sl_vips_VImage_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< vips::VImage,std::allocator< vips::VImage > > const &)*arg3);
59563 - }
59564 - catch(std::out_of_range &_e) {
59565 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
59566 - }
59567 - catch(std::invalid_argument &_e) {
59568 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
59569 - }
59570 -
59571 - resultobj = SWIG_Py_Void();
59572 - if (SWIG_IsNewObj(res3)) delete arg3;
59573 - return resultobj;
59574 -fail:
59575 - if (SWIG_IsNewObj(res3)) delete arg3;
59576 - return NULL;
59577 -}
59578 -
59579 -
59580 -SWIGINTERN PyObject *_wrap_ImageVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59581 - PyObject *resultobj = 0;
59582 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
59583 - PySliceObject *arg2 = (PySliceObject *) 0 ;
59584 - void *argp1 = 0 ;
59585 - int res1 = 0 ;
59586 - PyObject * obj0 = 0 ;
59587 - PyObject * obj1 = 0 ;
59588 -
59589 - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector___setitem__",&obj0,&obj1)) SWIG_fail;
59590 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
59591 - if (!SWIG_IsOK(res1)) {
59592 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___setitem__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
59593 - }
59594 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
59595 - {
59596 - if (!PySlice_Check(obj1)) {
59597 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
59598 - }
59599 - arg2 = (PySliceObject *) obj1;
59600 - }
59601 - try {
59602 - std_vector_Sl_vips_VImage_Sg____setitem____SWIG_1(arg1,arg2);
59603 - }
59604 - catch(std::out_of_range &_e) {
59605 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
59606 - }
59607 - catch(std::invalid_argument &_e) {
59608 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
59609 - }
59610 -
59611 - resultobj = SWIG_Py_Void();
59612 - return resultobj;
59613 -fail:
59614 - return NULL;
59615 -}
59616 -
59617 -
59618 -SWIGINTERN PyObject *_wrap_ImageVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59619 - PyObject *resultobj = 0;
59620 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
59621 - PySliceObject *arg2 = (PySliceObject *) 0 ;
59622 - void *argp1 = 0 ;
59623 - int res1 = 0 ;
59624 - PyObject * obj0 = 0 ;
59625 - PyObject * obj1 = 0 ;
59626 -
59627 - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector___delitem__",&obj0,&obj1)) SWIG_fail;
59628 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
59629 - if (!SWIG_IsOK(res1)) {
59630 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___delitem__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
59631 - }
59632 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
59633 - {
59634 - if (!PySlice_Check(obj1)) {
59635 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'");
59636 - }
59637 - arg2 = (PySliceObject *) obj1;
59638 - }
59639 - try {
59640 - std_vector_Sl_vips_VImage_Sg____delitem____SWIG_1(arg1,arg2);
59641 - }
59642 - catch(std::out_of_range &_e) {
59643 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
59644 - }
59645 - catch(std::invalid_argument &_e) {
59646 - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
59647 - }
59648 -
59649 - resultobj = SWIG_Py_Void();
59650 - return resultobj;
59651 -fail:
59652 - return NULL;
59653 -}
59654 -
59655 -
59656 -SWIGINTERN PyObject *_wrap_ImageVector___delitem__(PyObject *self, PyObject *args) {
59657 - int argc;
59658 - PyObject *argv[3];
59659 - int ii;
59660 -
59661 - if (!PyTuple_Check(args)) SWIG_fail;
59662 - argc = args ? (int)PyObject_Length(args) : 0;
59663 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
59664 - argv[ii] = PyTuple_GET_ITEM(args,ii);
59665 - }
59666 - if (argc == 2) {
59667 - int _v;
59668 - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
59669 - _v = SWIG_CheckState(res);
59670 - if (_v) {
59671 - {
59672 - _v = PySlice_Check(argv[1]);
59673 - }
59674 - if (_v) {
59675 - return _wrap_ImageVector___delitem____SWIG_1(self, args);
59676 - }
59677 - }
59678 - }
59679 - if (argc == 2) {
59680 - int _v;
59681 - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
59682 - _v = SWIG_CheckState(res);
59683 - if (_v) {
59684 - {
59685 - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
59686 - _v = SWIG_CheckState(res);
59687 - }
59688 - if (_v) {
59689 - return _wrap_ImageVector___delitem____SWIG_0(self, args);
59690 - }
59691 - }
59692 - }
59693 -
59694 -fail:
59695 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ImageVector___delitem__'.\n"
59696 - " Possible C/C++ prototypes are:\n"
59697 - " std::vector< vips::VImage >::__delitem__(std::vector< vips::VImage >::difference_type)\n"
59698 - " std::vector< vips::VImage >::__delitem__(PySliceObject *)\n");
59699 - return 0;
59700 -}
59701 -
59702 -
59703 -SWIGINTERN PyObject *_wrap_ImageVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59704 - PyObject *resultobj = 0;
59705 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
59706 - std::vector< vips::VImage >::difference_type arg2 ;
59707 - void *argp1 = 0 ;
59708 - int res1 = 0 ;
59709 - ptrdiff_t val2 ;
59710 - int ecode2 = 0 ;
59711 - PyObject * obj0 = 0 ;
59712 - PyObject * obj1 = 0 ;
59713 - std::vector< vips::VImage >::value_type *result = 0 ;
59714 -
59715 - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector___getitem__",&obj0,&obj1)) SWIG_fail;
59716 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
59717 - if (!SWIG_IsOK(res1)) {
59718 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___getitem__" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'");
59719 - }
59720 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
59721 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
59722 - if (!SWIG_IsOK(ecode2)) {
59723 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector___getitem__" "', argument " "2"" of type '" "std::vector< vips::VImage >::difference_type""'");
59724 - }
59725 - arg2 = static_cast< std::vector< vips::VImage >::difference_type >(val2);
59726 - try {
59727 - result = (std::vector< vips::VImage >::value_type *) &std_vector_Sl_vips_VImage_Sg____getitem____SWIG_1((std::vector< vips::VImage > const *)arg1,arg2);
59728 - }
59729 - catch(std::out_of_range &_e) {
59730 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
59731 - }
59732 -
59733 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, 0 | 0 );
59734 - return resultobj;
59735 -fail:
59736 - return NULL;
59737 -}
59738 -
59739 -
59740 -SWIGINTERN PyObject *_wrap_ImageVector___getitem__(PyObject *self, PyObject *args) {
59741 - int argc;
59742 - PyObject *argv[3];
59743 - int ii;
59744 -
59745 - if (!PyTuple_Check(args)) SWIG_fail;
59746 - argc = args ? (int)PyObject_Length(args) : 0;
59747 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
59748 - argv[ii] = PyTuple_GET_ITEM(args,ii);
59749 - }
59750 - if (argc == 2) {
59751 - int _v;
59752 - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
59753 - _v = SWIG_CheckState(res);
59754 - if (_v) {
59755 - {
59756 - _v = PySlice_Check(argv[1]);
59757 - }
59758 - if (_v) {
59759 - return _wrap_ImageVector___getitem____SWIG_0(self, args);
59760 - }
59761 - }
59762 - }
59763 - if (argc == 2) {
59764 - int _v;
59765 - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
59766 - _v = SWIG_CheckState(res);
59767 - if (_v) {
59768 - {
59769 - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
59770 - _v = SWIG_CheckState(res);
59771 - }
59772 - if (_v) {
59773 - return _wrap_ImageVector___getitem____SWIG_1(self, args);
59774 - }
59775 - }
59776 - }
59777 -
59778 -fail:
59779 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ImageVector___getitem__'.\n"
59780 - " Possible C/C++ prototypes are:\n"
59781 - " std::vector< vips::VImage >::__getitem__(PySliceObject *)\n"
59782 - " std::vector< vips::VImage >::__getitem__(std::vector< vips::VImage >::difference_type) const\n");
59783 - return 0;
59784 -}
59785 -
59786 -
59787 -SWIGINTERN PyObject *_wrap_ImageVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59788 - PyObject *resultobj = 0;
59789 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
59790 - std::vector< vips::VImage >::difference_type arg2 ;
59791 - std::vector< vips::VImage >::value_type *arg3 = 0 ;
59792 - void *argp1 = 0 ;
59793 - int res1 = 0 ;
59794 - ptrdiff_t val2 ;
59795 - int ecode2 = 0 ;
59796 - void *argp3 = 0 ;
59797 - int res3 = 0 ;
59798 - PyObject * obj0 = 0 ;
59799 - PyObject * obj1 = 0 ;
59800 - PyObject * obj2 = 0 ;
59801 -
59802 - if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
59803 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
59804 - if (!SWIG_IsOK(res1)) {
59805 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___setitem__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
59806 - }
59807 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
59808 - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
59809 - if (!SWIG_IsOK(ecode2)) {
59810 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector___setitem__" "', argument " "2"" of type '" "std::vector< vips::VImage >::difference_type""'");
59811 - }
59812 - arg2 = static_cast< std::vector< vips::VImage >::difference_type >(val2);
59813 - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0);
59814 - if (!SWIG_IsOK(res3)) {
59815 - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ImageVector___setitem__" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'");
59816 - }
59817 - if (!argp3) {
59818 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector___setitem__" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'");
59819 - }
59820 - arg3 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp3);
59821 - try {
59822 - std_vector_Sl_vips_VImage_Sg____setitem____SWIG_2(arg1,arg2,(vips::VImage const &)*arg3);
59823 - }
59824 - catch(std::out_of_range &_e) {
59825 - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
59826 - }
59827 -
59828 - resultobj = SWIG_Py_Void();
59829 - return resultobj;
59830 -fail:
59831 - return NULL;
59832 -}
59833 -
59834 -
59835 -SWIGINTERN PyObject *_wrap_ImageVector___setitem__(PyObject *self, PyObject *args) {
59836 - int argc;
59837 - PyObject *argv[4];
59838 - int ii;
59839 -
59840 - if (!PyTuple_Check(args)) SWIG_fail;
59841 - argc = args ? (int)PyObject_Length(args) : 0;
59842 - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
59843 - argv[ii] = PyTuple_GET_ITEM(args,ii);
59844 - }
59845 - if (argc == 2) {
59846 - int _v;
59847 - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
59848 - _v = SWIG_CheckState(res);
59849 - if (_v) {
59850 - {
59851 - _v = PySlice_Check(argv[1]);
59852 - }
59853 - if (_v) {
59854 - return _wrap_ImageVector___setitem____SWIG_1(self, args);
59855 - }
59856 - }
59857 - }
59858 - if (argc == 3) {
59859 - int _v;
59860 - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
59861 - _v = SWIG_CheckState(res);
59862 - if (_v) {
59863 - {
59864 - _v = PySlice_Check(argv[1]);
59865 - }
59866 - if (_v) {
59867 - int res = swig::asptr(argv[2], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
59868 - _v = SWIG_CheckState(res);
59869 - if (_v) {
59870 - return _wrap_ImageVector___setitem____SWIG_0(self, args);
59871 - }
59872 - }
59873 - }
59874 - }
59875 - if (argc == 3) {
59876 - int _v;
59877 - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
59878 - _v = SWIG_CheckState(res);
59879 - if (_v) {
59880 - {
59881 - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
59882 - _v = SWIG_CheckState(res);
59883 - }
59884 - if (_v) {
59885 - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_vips__VImage, 0);
59886 - _v = SWIG_CheckState(res);
59887 - if (_v) {
59888 - return _wrap_ImageVector___setitem____SWIG_2(self, args);
59889 - }
59890 - }
59891 - }
59892 - }
59893 -
59894 -fail:
59895 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ImageVector___setitem__'.\n"
59896 - " Possible C/C++ prototypes are:\n"
59897 - " std::vector< vips::VImage >::__setitem__(PySliceObject *,std::vector< vips::VImage,std::allocator< vips::VImage > > const &)\n"
59898 - " std::vector< vips::VImage >::__setitem__(PySliceObject *)\n"
59899 - " std::vector< vips::VImage >::__setitem__(std::vector< vips::VImage >::difference_type,std::vector< vips::VImage >::value_type const &)\n");
59900 - return 0;
59901 -}
59902 -
59903 -
59904 -SWIGINTERN PyObject *_wrap_ImageVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59905 - PyObject *resultobj = 0;
59906 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
59907 - std::vector< vips::VImage >::value_type *arg2 = 0 ;
59908 - void *argp1 = 0 ;
59909 - int res1 = 0 ;
59910 - void *argp2 = 0 ;
59911 - int res2 = 0 ;
59912 - PyObject * obj0 = 0 ;
59913 - PyObject * obj1 = 0 ;
59914 -
59915 - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector_append",&obj0,&obj1)) SWIG_fail;
59916 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
59917 - if (!SWIG_IsOK(res1)) {
59918 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_append" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
59919 - }
59920 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
59921 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
59922 - if (!SWIG_IsOK(res2)) {
59923 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ImageVector_append" "', argument " "2"" of type '" "std::vector< vips::VImage >::value_type const &""'");
59924 - }
59925 - if (!argp2) {
59926 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector_append" "', argument " "2"" of type '" "std::vector< vips::VImage >::value_type const &""'");
59927 - }
59928 - arg2 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp2);
59929 - std_vector_Sl_vips_VImage_Sg__append(arg1,(vips::VImage const &)*arg2);
59930 - resultobj = SWIG_Py_Void();
59931 - return resultobj;
59932 -fail:
59933 - return NULL;
59934 -}
59935 -
59936 -
59937 -SWIGINTERN PyObject *_wrap_new_ImageVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59938 - PyObject *resultobj = 0;
59939 - std::vector< vips::VImage > *result = 0 ;
59940 -
59941 - if (!PyArg_ParseTuple(args,(char *)":new_ImageVector")) SWIG_fail;
59942 - result = (std::vector< vips::VImage > *)new std::vector< vips::VImage >();
59943 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_POINTER_NEW | 0 );
59944 - return resultobj;
59945 -fail:
59946 - return NULL;
59947 -}
59948 -
59949 -
59950 -SWIGINTERN PyObject *_wrap_new_ImageVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59951 - PyObject *resultobj = 0;
59952 - std::vector< vips::VImage > *arg1 = 0 ;
59953 - int res1 = SWIG_OLDOBJ ;
59954 - PyObject * obj0 = 0 ;
59955 - std::vector< vips::VImage > *result = 0 ;
59956 -
59957 - if (!PyArg_ParseTuple(args,(char *)"O:new_ImageVector",&obj0)) SWIG_fail;
59958 - {
59959 - std::vector<vips::VImage,std::allocator< vips::VImage > > *ptr = (std::vector<vips::VImage,std::allocator< vips::VImage > > *)0;
59960 - res1 = swig::asptr(obj0, &ptr);
59961 - if (!SWIG_IsOK(res1)) {
59962 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ImageVector" "', argument " "1"" of type '" "std::vector< vips::VImage > const &""'");
59963 - }
59964 - if (!ptr) {
59965 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ImageVector" "', argument " "1"" of type '" "std::vector< vips::VImage > const &""'");
59966 - }
59967 - arg1 = ptr;
59968 - }
59969 - result = (std::vector< vips::VImage > *)new std::vector< vips::VImage >((std::vector< vips::VImage > const &)*arg1);
59970 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_POINTER_NEW | 0 );
59971 - if (SWIG_IsNewObj(res1)) delete arg1;
59972 - return resultobj;
59973 -fail:
59974 - if (SWIG_IsNewObj(res1)) delete arg1;
59975 - return NULL;
59976 -}
59977 -
59978 -
59979 -SWIGINTERN PyObject *_wrap_ImageVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59980 - PyObject *resultobj = 0;
59981 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
59982 - void *argp1 = 0 ;
59983 - int res1 = 0 ;
59984 - PyObject * obj0 = 0 ;
59985 - bool result;
59986 -
59987 - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_empty",&obj0)) SWIG_fail;
59988 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
59989 - if (!SWIG_IsOK(res1)) {
59990 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_empty" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'");
59991 - }
59992 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
59993 - result = (bool)((std::vector< vips::VImage > const *)arg1)->empty();
59994 - resultobj = SWIG_From_bool(static_cast< bool >(result));
59995 - return resultobj;
59996 -fail:
59997 - return NULL;
59998 -}
59999 -
60000 -
60001 -SWIGINTERN PyObject *_wrap_ImageVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60002 - PyObject *resultobj = 0;
60003 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60004 - void *argp1 = 0 ;
60005 - int res1 = 0 ;
60006 - PyObject * obj0 = 0 ;
60007 - std::vector< vips::VImage >::size_type result;
60008 -
60009 - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_size",&obj0)) SWIG_fail;
60010 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
60011 - if (!SWIG_IsOK(res1)) {
60012 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_size" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'");
60013 - }
60014 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60015 - result = ((std::vector< vips::VImage > const *)arg1)->size();
60016 - resultobj = SWIG_From_size_t(static_cast< size_t >(result));
60017 - return resultobj;
60018 -fail:
60019 - return NULL;
60020 -}
60021 -
60022 -
60023 -SWIGINTERN PyObject *_wrap_ImageVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60024 - PyObject *resultobj = 0;
60025 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60026 - void *argp1 = 0 ;
60027 - int res1 = 0 ;
60028 - PyObject * obj0 = 0 ;
60029 -
60030 - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_clear",&obj0)) SWIG_fail;
60031 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
60032 - if (!SWIG_IsOK(res1)) {
60033 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_clear" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
60034 - }
60035 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60036 - (arg1)->clear();
60037 - resultobj = SWIG_Py_Void();
60038 - return resultobj;
60039 -fail:
60040 - return NULL;
60041 -}
60042 -
60043 -
60044 -SWIGINTERN PyObject *_wrap_ImageVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60045 - PyObject *resultobj = 0;
60046 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60047 - std::vector< vips::VImage > *arg2 = 0 ;
60048 - void *argp1 = 0 ;
60049 - int res1 = 0 ;
60050 - void *argp2 = 0 ;
60051 - int res2 = 0 ;
60052 - PyObject * obj0 = 0 ;
60053 - PyObject * obj1 = 0 ;
60054 -
60055 - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector_swap",&obj0,&obj1)) SWIG_fail;
60056 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
60057 - if (!SWIG_IsOK(res1)) {
60058 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_swap" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
60059 - }
60060 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60061 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 );
60062 - if (!SWIG_IsOK(res2)) {
60063 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ImageVector_swap" "', argument " "2"" of type '" "std::vector< vips::VImage > &""'");
60064 - }
60065 - if (!argp2) {
60066 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector_swap" "', argument " "2"" of type '" "std::vector< vips::VImage > &""'");
60067 - }
60068 - arg2 = reinterpret_cast< std::vector< vips::VImage > * >(argp2);
60069 - (arg1)->swap(*arg2);
60070 - resultobj = SWIG_Py_Void();
60071 - return resultobj;
60072 -fail:
60073 - return NULL;
60074 -}
60075 -
60076 -
60077 -SWIGINTERN PyObject *_wrap_ImageVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60078 - PyObject *resultobj = 0;
60079 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60080 - void *argp1 = 0 ;
60081 - int res1 = 0 ;
60082 - PyObject * obj0 = 0 ;
60083 - SwigValueWrapper< std::allocator< vips::VImage > > result;
60084 -
60085 - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_get_allocator",&obj0)) SWIG_fail;
60086 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
60087 - if (!SWIG_IsOK(res1)) {
60088 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_get_allocator" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'");
60089 - }
60090 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60091 - result = ((std::vector< vips::VImage > const *)arg1)->get_allocator();
60092 - resultobj = SWIG_NewPointerObj((new std::vector< vips::VImage >::allocator_type(static_cast< const std::vector< vips::VImage >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_vips__VImage_t, SWIG_POINTER_OWN | 0 );
60093 - return resultobj;
60094 -fail:
60095 - return NULL;
60096 -}
60097 -
60098 -
60099 -SWIGINTERN PyObject *_wrap_ImageVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60100 - PyObject *resultobj = 0;
60101 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60102 - void *argp1 = 0 ;
60103 - int res1 = 0 ;
60104 - PyObject * obj0 = 0 ;
60105 - std::vector< vips::VImage >::iterator result;
60106 -
60107 - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_begin",&obj0)) SWIG_fail;
60108 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
60109 - if (!SWIG_IsOK(res1)) {
60110 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_begin" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
60111 - }
60112 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60113 - result = (arg1)->begin();
60114 - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< vips::VImage >::iterator & >(result)),
60115 - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
60116 - return resultobj;
60117 -fail:
60118 - return NULL;
60119 -}
60120 -
60121 -
60122 -SWIGINTERN PyObject *_wrap_ImageVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60123 - PyObject *resultobj = 0;
60124 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60125 - void *argp1 = 0 ;
60126 - int res1 = 0 ;
60127 - PyObject * obj0 = 0 ;
60128 - std::vector< vips::VImage >::iterator result;
60129 -
60130 - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_end",&obj0)) SWIG_fail;
60131 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
60132 - if (!SWIG_IsOK(res1)) {
60133 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_end" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
60134 - }
60135 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60136 - result = (arg1)->end();
60137 - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< vips::VImage >::iterator & >(result)),
60138 - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
60139 - return resultobj;
60140 -fail:
60141 - return NULL;
60142 -}
60143 -
60144 -
60145 -SWIGINTERN PyObject *_wrap_ImageVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60146 - PyObject *resultobj = 0;
60147 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60148 - void *argp1 = 0 ;
60149 - int res1 = 0 ;
60150 - PyObject * obj0 = 0 ;
60151 - std::vector< vips::VImage >::reverse_iterator result;
60152 -
60153 - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_rbegin",&obj0)) SWIG_fail;
60154 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
60155 - if (!SWIG_IsOK(res1)) {
60156 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_rbegin" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
60157 - }
60158 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60159 - result = (arg1)->rbegin();
60160 - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< vips::VImage >::reverse_iterator & >(result)),
60161 - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
60162 - return resultobj;
60163 -fail:
60164 - return NULL;
60165 -}
60166 -
60167 -
60168 -SWIGINTERN PyObject *_wrap_ImageVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60169 - PyObject *resultobj = 0;
60170 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60171 - void *argp1 = 0 ;
60172 - int res1 = 0 ;
60173 - PyObject * obj0 = 0 ;
60174 - std::vector< vips::VImage >::reverse_iterator result;
60175 -
60176 - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_rend",&obj0)) SWIG_fail;
60177 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
60178 - if (!SWIG_IsOK(res1)) {
60179 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_rend" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
60180 - }
60181 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60182 - result = (arg1)->rend();
60183 - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< vips::VImage >::reverse_iterator & >(result)),
60184 - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
60185 - return resultobj;
60186 -fail:
60187 - return NULL;
60188 -}
60189 -
60190 -
60191 -SWIGINTERN PyObject *_wrap_new_ImageVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60192 - PyObject *resultobj = 0;
60193 - std::vector< vips::VImage >::size_type arg1 ;
60194 - size_t val1 ;
60195 - int ecode1 = 0 ;
60196 - PyObject * obj0 = 0 ;
60197 - std::vector< vips::VImage > *result = 0 ;
60198 -
60199 - if (!PyArg_ParseTuple(args,(char *)"O:new_ImageVector",&obj0)) SWIG_fail;
60200 - ecode1 = SWIG_AsVal_size_t(obj0, &val1);
60201 - if (!SWIG_IsOK(ecode1)) {
60202 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ImageVector" "', argument " "1"" of type '" "std::vector< vips::VImage >::size_type""'");
60203 - }
60204 - arg1 = static_cast< std::vector< vips::VImage >::size_type >(val1);
60205 - result = (std::vector< vips::VImage > *)new std::vector< vips::VImage >(arg1);
60206 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_POINTER_NEW | 0 );
60207 - return resultobj;
60208 -fail:
60209 - return NULL;
60210 -}
60211 -
60212 -
60213 -SWIGINTERN PyObject *_wrap_ImageVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60214 - PyObject *resultobj = 0;
60215 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60216 - void *argp1 = 0 ;
60217 - int res1 = 0 ;
60218 - PyObject * obj0 = 0 ;
60219 -
60220 - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_pop_back",&obj0)) SWIG_fail;
60221 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
60222 - if (!SWIG_IsOK(res1)) {
60223 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_pop_back" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
60224 - }
60225 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60226 - (arg1)->pop_back();
60227 - resultobj = SWIG_Py_Void();
60228 - return resultobj;
60229 -fail:
60230 - return NULL;
60231 -}
60232 -
60233 -
60234 -SWIGINTERN PyObject *_wrap_ImageVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60235 - PyObject *resultobj = 0;
60236 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60237 - std::vector< vips::VImage >::size_type arg2 ;
60238 - void *argp1 = 0 ;
60239 - int res1 = 0 ;
60240 - size_t val2 ;
60241 - int ecode2 = 0 ;
60242 - PyObject * obj0 = 0 ;
60243 - PyObject * obj1 = 0 ;
60244 -
60245 - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector_resize",&obj0,&obj1)) SWIG_fail;
60246 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
60247 - if (!SWIG_IsOK(res1)) {
60248 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_resize" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
60249 - }
60250 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60251 - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
60252 - if (!SWIG_IsOK(ecode2)) {
60253 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector_resize" "', argument " "2"" of type '" "std::vector< vips::VImage >::size_type""'");
60254 - }
60255 - arg2 = static_cast< std::vector< vips::VImage >::size_type >(val2);
60256 - (arg1)->resize(arg2);
60257 - resultobj = SWIG_Py_Void();
60258 - return resultobj;
60259 -fail:
60260 - return NULL;
60261 -}
60262 -
60263 -
60264 -SWIGINTERN PyObject *_wrap_ImageVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60265 - PyObject *resultobj = 0;
60266 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60267 - std::vector< vips::VImage >::iterator arg2 ;
60268 - void *argp1 = 0 ;
60269 - int res1 = 0 ;
60270 - swig::SwigPyIterator *iter2 = 0 ;
60271 - int res2 ;
60272 - PyObject * obj0 = 0 ;
60273 - PyObject * obj1 = 0 ;
60274 - std::vector< vips::VImage >::iterator result;
60275 -
60276 - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector_erase",&obj0,&obj1)) SWIG_fail;
60277 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
60278 - if (!SWIG_IsOK(res1)) {
60279 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_erase" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
60280 - }
60281 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60282 - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
60283 - if (!SWIG_IsOK(res2) || !iter2) {
60284 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_erase" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'");
60285 - } else {
60286 - swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *>(iter2);
60287 - if (iter_t) {
60288 - arg2 = iter_t->get_current();
60289 - } else {
60290 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_erase" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'");
60291 - }
60292 - }
60293 - result = (arg1)->erase(arg2);
60294 - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< vips::VImage >::iterator & >(result)),
60295 - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
60296 - return resultobj;
60297 -fail:
60298 - return NULL;
60299 -}
60300 -
60301 -
60302 -SWIGINTERN PyObject *_wrap_ImageVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60303 - PyObject *resultobj = 0;
60304 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60305 - std::vector< vips::VImage >::iterator arg2 ;
60306 - std::vector< vips::VImage >::iterator arg3 ;
60307 - void *argp1 = 0 ;
60308 - int res1 = 0 ;
60309 - swig::SwigPyIterator *iter2 = 0 ;
60310 - int res2 ;
60311 - swig::SwigPyIterator *iter3 = 0 ;
60312 - int res3 ;
60313 - PyObject * obj0 = 0 ;
60314 - PyObject * obj1 = 0 ;
60315 - PyObject * obj2 = 0 ;
60316 - std::vector< vips::VImage >::iterator result;
60317 -
60318 - if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector_erase",&obj0,&obj1,&obj2)) SWIG_fail;
60319 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
60320 - if (!SWIG_IsOK(res1)) {
60321 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_erase" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
60322 - }
60323 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60324 - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
60325 - if (!SWIG_IsOK(res2) || !iter2) {
60326 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_erase" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'");
60327 - } else {
60328 - swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *>(iter2);
60329 - if (iter_t) {
60330 - arg2 = iter_t->get_current();
60331 - } else {
60332 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_erase" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'");
60333 - }
60334 - }
60335 - res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0);
60336 - if (!SWIG_IsOK(res3) || !iter3) {
60337 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_erase" "', argument " "3"" of type '" "std::vector< vips::VImage >::iterator""'");
60338 - } else {
60339 - swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *>(iter3);
60340 - if (iter_t) {
60341 - arg3 = iter_t->get_current();
60342 - } else {
60343 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_erase" "', argument " "3"" of type '" "std::vector< vips::VImage >::iterator""'");
60344 - }
60345 - }
60346 - result = (arg1)->erase(arg2,arg3);
60347 - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< vips::VImage >::iterator & >(result)),
60348 - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
60349 - return resultobj;
60350 -fail:
60351 - return NULL;
60352 -}
60353 -
60354 -
60355 -SWIGINTERN PyObject *_wrap_ImageVector_erase(PyObject *self, PyObject *args) {
60356 - int argc;
60357 - PyObject *argv[4];
60358 - int ii;
60359 -
60360 - if (!PyTuple_Check(args)) SWIG_fail;
60361 - argc = args ? (int)PyObject_Length(args) : 0;
60362 - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
60363 - argv[ii] = PyTuple_GET_ITEM(args,ii);
60364 - }
60365 - if (argc == 2) {
60366 - int _v;
60367 - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
60368 - _v = SWIG_CheckState(res);
60369 - if (_v) {
60370 - swig::SwigPyIterator *iter = 0;
60371 - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
60372 - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *>(iter) != 0));
60373 - if (_v) {
60374 - return _wrap_ImageVector_erase__SWIG_0(self, args);
60375 - }
60376 - }
60377 - }
60378 - if (argc == 3) {
60379 - int _v;
60380 - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
60381 - _v = SWIG_CheckState(res);
60382 - if (_v) {
60383 - swig::SwigPyIterator *iter = 0;
60384 - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
60385 - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *>(iter) != 0));
60386 - if (_v) {
60387 - swig::SwigPyIterator *iter = 0;
60388 - int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
60389 - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *>(iter) != 0));
60390 - if (_v) {
60391 - return _wrap_ImageVector_erase__SWIG_1(self, args);
60392 - }
60393 - }
60394 - }
60395 - }
60396 -
60397 -fail:
60398 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ImageVector_erase'.\n"
60399 - " Possible C/C++ prototypes are:\n"
60400 - " std::vector< vips::VImage >::erase(std::vector< vips::VImage >::iterator)\n"
60401 - " std::vector< vips::VImage >::erase(std::vector< vips::VImage >::iterator,std::vector< vips::VImage >::iterator)\n");
60402 - return 0;
60403 -}
60404 -
60405 -
60406 -SWIGINTERN PyObject *_wrap_new_ImageVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60407 - PyObject *resultobj = 0;
60408 - std::vector< vips::VImage >::size_type arg1 ;
60409 - std::vector< vips::VImage >::value_type *arg2 = 0 ;
60410 - size_t val1 ;
60411 - int ecode1 = 0 ;
60412 - void *argp2 = 0 ;
60413 - int res2 = 0 ;
60414 - PyObject * obj0 = 0 ;
60415 - PyObject * obj1 = 0 ;
60416 - std::vector< vips::VImage > *result = 0 ;
60417 -
60418 - if (!PyArg_ParseTuple(args,(char *)"OO:new_ImageVector",&obj0,&obj1)) SWIG_fail;
60419 - ecode1 = SWIG_AsVal_size_t(obj0, &val1);
60420 - if (!SWIG_IsOK(ecode1)) {
60421 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ImageVector" "', argument " "1"" of type '" "std::vector< vips::VImage >::size_type""'");
60422 - }
60423 - arg1 = static_cast< std::vector< vips::VImage >::size_type >(val1);
60424 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
60425 - if (!SWIG_IsOK(res2)) {
60426 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ImageVector" "', argument " "2"" of type '" "std::vector< vips::VImage >::value_type const &""'");
60427 - }
60428 - if (!argp2) {
60429 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ImageVector" "', argument " "2"" of type '" "std::vector< vips::VImage >::value_type const &""'");
60430 - }
60431 - arg2 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp2);
60432 - result = (std::vector< vips::VImage > *)new std::vector< vips::VImage >(arg1,(std::vector< vips::VImage >::value_type const &)*arg2);
60433 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_POINTER_NEW | 0 );
60434 - return resultobj;
60435 -fail:
60436 - return NULL;
60437 -}
60438 -
60439 -
60440 -SWIGINTERN PyObject *_wrap_new_ImageVector(PyObject *self, PyObject *args) {
60441 - int argc;
60442 - PyObject *argv[3];
60443 - int ii;
60444 -
60445 - if (!PyTuple_Check(args)) SWIG_fail;
60446 - argc = args ? (int)PyObject_Length(args) : 0;
60447 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
60448 - argv[ii] = PyTuple_GET_ITEM(args,ii);
60449 - }
60450 - if (argc == 0) {
60451 - return _wrap_new_ImageVector__SWIG_0(self, args);
60452 - }
60453 - if (argc == 1) {
60454 - int _v;
60455 - {
60456 - int res = SWIG_AsVal_size_t(argv[0], NULL);
60457 - _v = SWIG_CheckState(res);
60458 - }
60459 - if (_v) {
60460 - return _wrap_new_ImageVector__SWIG_2(self, args);
60461 - }
60462 - }
60463 - if (argc == 1) {
60464 - int _v;
60465 - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
60466 - _v = SWIG_CheckState(res);
60467 - if (_v) {
60468 - return _wrap_new_ImageVector__SWIG_1(self, args);
60469 - }
60470 - }
60471 - if (argc == 2) {
60472 - int _v;
60473 - {
60474 - int res = SWIG_AsVal_size_t(argv[0], NULL);
60475 - _v = SWIG_CheckState(res);
60476 - }
60477 - if (_v) {
60478 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
60479 - _v = SWIG_CheckState(res);
60480 - if (_v) {
60481 - return _wrap_new_ImageVector__SWIG_3(self, args);
60482 - }
60483 - }
60484 - }
60485 -
60486 -fail:
60487 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ImageVector'.\n"
60488 - " Possible C/C++ prototypes are:\n"
60489 - " std::vector< vips::VImage >::vector()\n"
60490 - " std::vector< vips::VImage >::vector(std::vector< vips::VImage > const &)\n"
60491 - " std::vector< vips::VImage >::vector(std::vector< vips::VImage >::size_type)\n"
60492 - " std::vector< vips::VImage >::vector(std::vector< vips::VImage >::size_type,std::vector< vips::VImage >::value_type const &)\n");
60493 - return 0;
60494 -}
60495 -
60496 -
60497 -SWIGINTERN PyObject *_wrap_ImageVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60498 - PyObject *resultobj = 0;
60499 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60500 - std::vector< vips::VImage >::value_type *arg2 = 0 ;
60501 - void *argp1 = 0 ;
60502 - int res1 = 0 ;
60503 - void *argp2 = 0 ;
60504 - int res2 = 0 ;
60505 - PyObject * obj0 = 0 ;
60506 - PyObject * obj1 = 0 ;
60507 -
60508 - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector_push_back",&obj0,&obj1)) SWIG_fail;
60509 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
60510 - if (!SWIG_IsOK(res1)) {
60511 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_push_back" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
60512 - }
60513 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60514 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
60515 - if (!SWIG_IsOK(res2)) {
60516 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ImageVector_push_back" "', argument " "2"" of type '" "std::vector< vips::VImage >::value_type const &""'");
60517 - }
60518 - if (!argp2) {
60519 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector_push_back" "', argument " "2"" of type '" "std::vector< vips::VImage >::value_type const &""'");
60520 - }
60521 - arg2 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp2);
60522 - (arg1)->push_back((std::vector< vips::VImage >::value_type const &)*arg2);
60523 - resultobj = SWIG_Py_Void();
60524 - return resultobj;
60525 -fail:
60526 - return NULL;
60527 -}
60528 -
60529 -
60530 -SWIGINTERN PyObject *_wrap_ImageVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60531 - PyObject *resultobj = 0;
60532 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60533 - void *argp1 = 0 ;
60534 - int res1 = 0 ;
60535 - PyObject * obj0 = 0 ;
60536 - std::vector< vips::VImage >::value_type *result = 0 ;
60537 -
60538 - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_front",&obj0)) SWIG_fail;
60539 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
60540 - if (!SWIG_IsOK(res1)) {
60541 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_front" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'");
60542 - }
60543 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60544 - result = (std::vector< vips::VImage >::value_type *) &((std::vector< vips::VImage > const *)arg1)->front();
60545 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, 0 | 0 );
60546 - return resultobj;
60547 -fail:
60548 - return NULL;
60549 -}
60550 -
60551 -
60552 -SWIGINTERN PyObject *_wrap_ImageVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60553 - PyObject *resultobj = 0;
60554 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60555 - void *argp1 = 0 ;
60556 - int res1 = 0 ;
60557 - PyObject * obj0 = 0 ;
60558 - std::vector< vips::VImage >::value_type *result = 0 ;
60559 -
60560 - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_back",&obj0)) SWIG_fail;
60561 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
60562 - if (!SWIG_IsOK(res1)) {
60563 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_back" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'");
60564 - }
60565 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60566 - result = (std::vector< vips::VImage >::value_type *) &((std::vector< vips::VImage > const *)arg1)->back();
60567 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, 0 | 0 );
60568 - return resultobj;
60569 -fail:
60570 - return NULL;
60571 -}
60572 -
60573 -
60574 -SWIGINTERN PyObject *_wrap_ImageVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60575 - PyObject *resultobj = 0;
60576 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60577 - std::vector< vips::VImage >::size_type arg2 ;
60578 - std::vector< vips::VImage >::value_type *arg3 = 0 ;
60579 - void *argp1 = 0 ;
60580 - int res1 = 0 ;
60581 - size_t val2 ;
60582 - int ecode2 = 0 ;
60583 - void *argp3 = 0 ;
60584 - int res3 = 0 ;
60585 - PyObject * obj0 = 0 ;
60586 - PyObject * obj1 = 0 ;
60587 - PyObject * obj2 = 0 ;
60588 -
60589 - if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector_assign",&obj0,&obj1,&obj2)) SWIG_fail;
60590 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
60591 - if (!SWIG_IsOK(res1)) {
60592 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_assign" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
60593 - }
60594 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60595 - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
60596 - if (!SWIG_IsOK(ecode2)) {
60597 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector_assign" "', argument " "2"" of type '" "std::vector< vips::VImage >::size_type""'");
60598 - }
60599 - arg2 = static_cast< std::vector< vips::VImage >::size_type >(val2);
60600 - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0);
60601 - if (!SWIG_IsOK(res3)) {
60602 - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ImageVector_assign" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'");
60603 - }
60604 - if (!argp3) {
60605 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector_assign" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'");
60606 - }
60607 - arg3 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp3);
60608 - (arg1)->assign(arg2,(std::vector< vips::VImage >::value_type const &)*arg3);
60609 - resultobj = SWIG_Py_Void();
60610 - return resultobj;
60611 -fail:
60612 - return NULL;
60613 -}
60614 -
60615 -
60616 -SWIGINTERN PyObject *_wrap_ImageVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60617 - PyObject *resultobj = 0;
60618 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60619 - std::vector< vips::VImage >::size_type arg2 ;
60620 - std::vector< vips::VImage >::value_type *arg3 = 0 ;
60621 - void *argp1 = 0 ;
60622 - int res1 = 0 ;
60623 - size_t val2 ;
60624 - int ecode2 = 0 ;
60625 - void *argp3 = 0 ;
60626 - int res3 = 0 ;
60627 - PyObject * obj0 = 0 ;
60628 - PyObject * obj1 = 0 ;
60629 - PyObject * obj2 = 0 ;
60630 -
60631 - if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector_resize",&obj0,&obj1,&obj2)) SWIG_fail;
60632 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
60633 - if (!SWIG_IsOK(res1)) {
60634 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_resize" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
60635 - }
60636 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60637 - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
60638 - if (!SWIG_IsOK(ecode2)) {
60639 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector_resize" "', argument " "2"" of type '" "std::vector< vips::VImage >::size_type""'");
60640 - }
60641 - arg2 = static_cast< std::vector< vips::VImage >::size_type >(val2);
60642 - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0);
60643 - if (!SWIG_IsOK(res3)) {
60644 - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ImageVector_resize" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'");
60645 - }
60646 - if (!argp3) {
60647 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector_resize" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'");
60648 - }
60649 - arg3 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp3);
60650 - (arg1)->resize(arg2,(std::vector< vips::VImage >::value_type const &)*arg3);
60651 - resultobj = SWIG_Py_Void();
60652 - return resultobj;
60653 -fail:
60654 - return NULL;
60655 -}
60656 -
60657 -
60658 -SWIGINTERN PyObject *_wrap_ImageVector_resize(PyObject *self, PyObject *args) {
60659 - int argc;
60660 - PyObject *argv[4];
60661 - int ii;
60662 -
60663 - if (!PyTuple_Check(args)) SWIG_fail;
60664 - argc = args ? (int)PyObject_Length(args) : 0;
60665 - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
60666 - argv[ii] = PyTuple_GET_ITEM(args,ii);
60667 - }
60668 - if (argc == 2) {
60669 - int _v;
60670 - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
60671 - _v = SWIG_CheckState(res);
60672 - if (_v) {
60673 - {
60674 - int res = SWIG_AsVal_size_t(argv[1], NULL);
60675 - _v = SWIG_CheckState(res);
60676 - }
60677 - if (_v) {
60678 - return _wrap_ImageVector_resize__SWIG_0(self, args);
60679 - }
60680 - }
60681 - }
60682 - if (argc == 3) {
60683 - int _v;
60684 - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
60685 - _v = SWIG_CheckState(res);
60686 - if (_v) {
60687 - {
60688 - int res = SWIG_AsVal_size_t(argv[1], NULL);
60689 - _v = SWIG_CheckState(res);
60690 - }
60691 - if (_v) {
60692 - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_vips__VImage, 0);
60693 - _v = SWIG_CheckState(res);
60694 - if (_v) {
60695 - return _wrap_ImageVector_resize__SWIG_1(self, args);
60696 - }
60697 - }
60698 - }
60699 - }
60700 -
60701 -fail:
60702 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ImageVector_resize'.\n"
60703 - " Possible C/C++ prototypes are:\n"
60704 - " std::vector< vips::VImage >::resize(std::vector< vips::VImage >::size_type)\n"
60705 - " std::vector< vips::VImage >::resize(std::vector< vips::VImage >::size_type,std::vector< vips::VImage >::value_type const &)\n");
60706 - return 0;
60707 -}
60708 -
60709 -
60710 -SWIGINTERN PyObject *_wrap_ImageVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60711 - PyObject *resultobj = 0;
60712 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60713 - std::vector< vips::VImage >::iterator arg2 ;
60714 - std::vector< vips::VImage >::value_type *arg3 = 0 ;
60715 - void *argp1 = 0 ;
60716 - int res1 = 0 ;
60717 - swig::SwigPyIterator *iter2 = 0 ;
60718 - int res2 ;
60719 - void *argp3 = 0 ;
60720 - int res3 = 0 ;
60721 - PyObject * obj0 = 0 ;
60722 - PyObject * obj1 = 0 ;
60723 - PyObject * obj2 = 0 ;
60724 - std::vector< vips::VImage >::iterator result;
60725 -
60726 - if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector_insert",&obj0,&obj1,&obj2)) SWIG_fail;
60727 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
60728 - if (!SWIG_IsOK(res1)) {
60729 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_insert" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
60730 - }
60731 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60732 - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
60733 - if (!SWIG_IsOK(res2) || !iter2) {
60734 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_insert" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'");
60735 - } else {
60736 - swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *>(iter2);
60737 - if (iter_t) {
60738 - arg2 = iter_t->get_current();
60739 - } else {
60740 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_insert" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'");
60741 - }
60742 - }
60743 - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0);
60744 - if (!SWIG_IsOK(res3)) {
60745 - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ImageVector_insert" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'");
60746 - }
60747 - if (!argp3) {
60748 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector_insert" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'");
60749 - }
60750 - arg3 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp3);
60751 - result = (arg1)->insert(arg2,(std::vector< vips::VImage >::value_type const &)*arg3);
60752 - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< vips::VImage >::iterator & >(result)),
60753 - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
60754 - return resultobj;
60755 -fail:
60756 - return NULL;
60757 -}
60758 -
60759 -
60760 -SWIGINTERN PyObject *_wrap_ImageVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60761 - PyObject *resultobj = 0;
60762 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60763 - std::vector< vips::VImage >::iterator arg2 ;
60764 - std::vector< vips::VImage >::size_type arg3 ;
60765 - std::vector< vips::VImage >::value_type *arg4 = 0 ;
60766 - void *argp1 = 0 ;
60767 - int res1 = 0 ;
60768 - swig::SwigPyIterator *iter2 = 0 ;
60769 - int res2 ;
60770 - size_t val3 ;
60771 - int ecode3 = 0 ;
60772 - void *argp4 = 0 ;
60773 - int res4 = 0 ;
60774 - PyObject * obj0 = 0 ;
60775 - PyObject * obj1 = 0 ;
60776 - PyObject * obj2 = 0 ;
60777 - PyObject * obj3 = 0 ;
60778 -
60779 - if (!PyArg_ParseTuple(args,(char *)"OOOO:ImageVector_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
60780 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
60781 - if (!SWIG_IsOK(res1)) {
60782 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_insert" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
60783 - }
60784 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60785 - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
60786 - if (!SWIG_IsOK(res2) || !iter2) {
60787 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_insert" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'");
60788 - } else {
60789 - swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *>(iter2);
60790 - if (iter_t) {
60791 - arg2 = iter_t->get_current();
60792 - } else {
60793 - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_insert" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'");
60794 - }
60795 - }
60796 - ecode3 = SWIG_AsVal_size_t(obj2, &val3);
60797 - if (!SWIG_IsOK(ecode3)) {
60798 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ImageVector_insert" "', argument " "3"" of type '" "std::vector< vips::VImage >::size_type""'");
60799 - }
60800 - arg3 = static_cast< std::vector< vips::VImage >::size_type >(val3);
60801 - res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_vips__VImage, 0 | 0);
60802 - if (!SWIG_IsOK(res4)) {
60803 - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ImageVector_insert" "', argument " "4"" of type '" "std::vector< vips::VImage >::value_type const &""'");
60804 - }
60805 - if (!argp4) {
60806 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector_insert" "', argument " "4"" of type '" "std::vector< vips::VImage >::value_type const &""'");
60807 - }
60808 - arg4 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp4);
60809 - (arg1)->insert(arg2,arg3,(std::vector< vips::VImage >::value_type const &)*arg4);
60810 - resultobj = SWIG_Py_Void();
60811 - return resultobj;
60812 -fail:
60813 - return NULL;
60814 -}
60815 -
60816 -
60817 -SWIGINTERN PyObject *_wrap_ImageVector_insert(PyObject *self, PyObject *args) {
60818 - int argc;
60819 - PyObject *argv[5];
60820 - int ii;
60821 -
60822 - if (!PyTuple_Check(args)) SWIG_fail;
60823 - argc = args ? (int)PyObject_Length(args) : 0;
60824 - for (ii = 0; (ii < 4) && (ii < argc); ii++) {
60825 - argv[ii] = PyTuple_GET_ITEM(args,ii);
60826 - }
60827 - if (argc == 3) {
60828 - int _v;
60829 - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
60830 - _v = SWIG_CheckState(res);
60831 - if (_v) {
60832 - swig::SwigPyIterator *iter = 0;
60833 - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
60834 - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *>(iter) != 0));
60835 - if (_v) {
60836 - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_vips__VImage, 0);
60837 - _v = SWIG_CheckState(res);
60838 - if (_v) {
60839 - return _wrap_ImageVector_insert__SWIG_0(self, args);
60840 - }
60841 - }
60842 - }
60843 - }
60844 - if (argc == 4) {
60845 - int _v;
60846 - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
60847 - _v = SWIG_CheckState(res);
60848 - if (_v) {
60849 - swig::SwigPyIterator *iter = 0;
60850 - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
60851 - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *>(iter) != 0));
60852 - if (_v) {
60853 - {
60854 - int res = SWIG_AsVal_size_t(argv[2], NULL);
60855 - _v = SWIG_CheckState(res);
60856 - }
60857 - if (_v) {
60858 - int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_vips__VImage, 0);
60859 - _v = SWIG_CheckState(res);
60860 - if (_v) {
60861 - return _wrap_ImageVector_insert__SWIG_1(self, args);
60862 - }
60863 - }
60864 - }
60865 - }
60866 - }
60867 -
60868 -fail:
60869 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ImageVector_insert'.\n"
60870 - " Possible C/C++ prototypes are:\n"
60871 - " std::vector< vips::VImage >::insert(std::vector< vips::VImage >::iterator,std::vector< vips::VImage >::value_type const &)\n"
60872 - " std::vector< vips::VImage >::insert(std::vector< vips::VImage >::iterator,std::vector< vips::VImage >::size_type,std::vector< vips::VImage >::value_type const &)\n");
60873 - return 0;
60874 -}
60875 -
60876 -
60877 -SWIGINTERN PyObject *_wrap_ImageVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60878 - PyObject *resultobj = 0;
60879 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60880 - std::vector< vips::VImage >::size_type arg2 ;
60881 - void *argp1 = 0 ;
60882 - int res1 = 0 ;
60883 - size_t val2 ;
60884 - int ecode2 = 0 ;
60885 - PyObject * obj0 = 0 ;
60886 - PyObject * obj1 = 0 ;
60887 -
60888 - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector_reserve",&obj0,&obj1)) SWIG_fail;
60889 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
60890 - if (!SWIG_IsOK(res1)) {
60891 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_reserve" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
60892 - }
60893 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60894 - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
60895 - if (!SWIG_IsOK(ecode2)) {
60896 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector_reserve" "', argument " "2"" of type '" "std::vector< vips::VImage >::size_type""'");
60897 - }
60898 - arg2 = static_cast< std::vector< vips::VImage >::size_type >(val2);
60899 - (arg1)->reserve(arg2);
60900 - resultobj = SWIG_Py_Void();
60901 - return resultobj;
60902 -fail:
60903 - return NULL;
60904 -}
60905 -
60906 -
60907 -SWIGINTERN PyObject *_wrap_ImageVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60908 - PyObject *resultobj = 0;
60909 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60910 - void *argp1 = 0 ;
60911 - int res1 = 0 ;
60912 - PyObject * obj0 = 0 ;
60913 - std::vector< vips::VImage >::size_type result;
60914 -
60915 - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_capacity",&obj0)) SWIG_fail;
60916 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
60917 - if (!SWIG_IsOK(res1)) {
60918 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_capacity" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'");
60919 - }
60920 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60921 - result = ((std::vector< vips::VImage > const *)arg1)->capacity();
60922 - resultobj = SWIG_From_size_t(static_cast< size_t >(result));
60923 - return resultobj;
60924 -fail:
60925 - return NULL;
60926 -}
60927 -
60928 -
60929 -SWIGINTERN PyObject *_wrap_delete_ImageVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60930 - PyObject *resultobj = 0;
60931 - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
60932 - void *argp1 = 0 ;
60933 - int res1 = 0 ;
60934 - PyObject * obj0 = 0 ;
60935 -
60936 - if (!PyArg_ParseTuple(args,(char *)"O:delete_ImageVector",&obj0)) SWIG_fail;
60937 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_POINTER_DISOWN | 0 );
60938 - if (!SWIG_IsOK(res1)) {
60939 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ImageVector" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
60940 - }
60941 - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
60942 - delete arg1;
60943 - resultobj = SWIG_Py_Void();
60944 - return resultobj;
60945 -fail:
60946 - return NULL;
60947 -}
60948 -
60949 -
60950 -SWIGINTERN PyObject *ImageVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60951 - PyObject *obj;
60952 - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
60953 - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_NewClientData(obj));
60954 - return SWIG_Py_Void();
60955 -}
60956 -
60957 -SWIGINTERN PyObject *_wrap_init__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60958 - PyObject *resultobj = 0;
60959 - char *arg1 = (char *) 0 ;
60960 - int res1 ;
60961 - char *buf1 = 0 ;
60962 - int alloc1 = 0 ;
60963 - PyObject * obj0 = 0 ;
60964 - bool result;
60965 -
60966 - if (!PyArg_ParseTuple(args,(char *)"O:init",&obj0)) SWIG_fail;
60967 - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
60968 - if (!SWIG_IsOK(res1)) {
60969 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "init" "', argument " "1"" of type '" "char const *""'");
60970 - }
60971 - arg1 = reinterpret_cast< char * >(buf1);
60972 - result = (bool)vips::init((char const *)arg1);
60973 - resultobj = SWIG_From_bool(static_cast< bool >(result));
60974 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
60975 - return resultobj;
60976 -fail:
60977 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
60978 - return NULL;
60979 -}
60980 -
60981 -
60982 -SWIGINTERN PyObject *_wrap_init__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60983 - PyObject *resultobj = 0;
60984 - bool result;
60985 -
60986 - if (!PyArg_ParseTuple(args,(char *)":init")) SWIG_fail;
60987 - result = (bool)vips::init();
60988 - resultobj = SWIG_From_bool(static_cast< bool >(result));
60989 - return resultobj;
60990 -fail:
60991 - return NULL;
60992 -}
60993 -
60994 -
60995 -SWIGINTERN PyObject *_wrap_init(PyObject *self, PyObject *args) {
60996 - int argc;
60997 - PyObject *argv[2];
60998 - int ii;
60999 -
61000 - if (!PyTuple_Check(args)) SWIG_fail;
61001 - argc = args ? (int)PyObject_Length(args) : 0;
61002 - for (ii = 0; (ii < 1) && (ii < argc); ii++) {
61003 - argv[ii] = PyTuple_GET_ITEM(args,ii);
61004 - }
61005 - if (argc == 0) {
61006 - return _wrap_init__SWIG_1(self, args);
61007 - }
61008 - if (argc == 1) {
61009 - int _v;
61010 - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
61011 - _v = SWIG_CheckState(res);
61012 - if (_v) {
61013 - return _wrap_init__SWIG_0(self, args);
61014 - }
61015 - }
61016 -
61017 -fail:
61018 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'init'.\n"
61019 - " Possible C/C++ prototypes are:\n"
61020 - " vips::init(char const *)\n"
61021 - " vips::init()\n");
61022 - return 0;
61023 -}
61024 -
61025 -
61026 -SWIGINTERN PyObject *_wrap_shutdown(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61027 - PyObject *resultobj = 0;
61028 -
61029 - if (!PyArg_ParseTuple(args,(char *)":shutdown")) SWIG_fail;
61030 - vips::shutdown();
61031 - resultobj = SWIG_Py_Void();
61032 - return resultobj;
61033 -fail:
61034 - return NULL;
61035 -}
61036 -
61037 -
61038 -SWIGINTERN PyObject *_wrap_VImage_print_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61039 - PyObject *resultobj = 0;
61040 -
61041 - if (!PyArg_ParseTuple(args,(char *)":VImage_print_all")) SWIG_fail;
61042 - vips::VImage::print_all();
61043 - resultobj = SWIG_Py_Void();
61044 - return resultobj;
61045 -fail:
61046 - return NULL;
61047 -}
61048 -
61049 -
61050 -SWIGINTERN PyObject *_wrap_new_VImage__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61051 - PyObject *resultobj = 0;
61052 - char *arg1 = (char *) 0 ;
61053 - char *arg2 = (char *) 0 ;
61054 - int res1 ;
61055 - char *buf1 = 0 ;
61056 - int alloc1 = 0 ;
61057 - int res2 ;
61058 - char *buf2 = 0 ;
61059 - int alloc2 = 0 ;
61060 - PyObject * obj0 = 0 ;
61061 - PyObject * obj1 = 0 ;
61062 - vips::VImage *result = 0 ;
61063 -
61064 - if (!PyArg_ParseTuple(args,(char *)"OO:new_VImage",&obj0,&obj1)) SWIG_fail;
61065 - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
61066 - if (!SWIG_IsOK(res1)) {
61067 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VImage" "', argument " "1"" of type '" "char const *""'");
61068 - }
61069 - arg1 = reinterpret_cast< char * >(buf1);
61070 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
61071 - if (!SWIG_IsOK(res2)) {
61072 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_VImage" "', argument " "2"" of type '" "char const *""'");
61073 - }
61074 - arg2 = reinterpret_cast< char * >(buf2);
61075 - try {
61076 - result = (vips::VImage *)new vips::VImage((char const *)arg1,(char const *)arg2);
61077 - }
61078 - catch(vips::VError &_e) {
61079 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
61080 - }
61081 -
61082 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, SWIG_POINTER_NEW | 0 );
61083 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
61084 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
61085 - return resultobj;
61086 -fail:
61087 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
61088 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
61089 - return NULL;
61090 -}
61091 -
61092 -
61093 -SWIGINTERN PyObject *_wrap_new_VImage__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61094 - PyObject *resultobj = 0;
61095 - char *arg1 = (char *) 0 ;
61096 - int res1 ;
61097 - char *buf1 = 0 ;
61098 - int alloc1 = 0 ;
61099 - PyObject * obj0 = 0 ;
61100 - vips::VImage *result = 0 ;
61101 -
61102 - if (!PyArg_ParseTuple(args,(char *)"O:new_VImage",&obj0)) SWIG_fail;
61103 - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
61104 - if (!SWIG_IsOK(res1)) {
61105 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VImage" "', argument " "1"" of type '" "char const *""'");
61106 - }
61107 - arg1 = reinterpret_cast< char * >(buf1);
61108 - try {
61109 - result = (vips::VImage *)new vips::VImage((char const *)arg1);
61110 - }
61111 - catch(vips::VError &_e) {
61112 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
61113 - }
61114 -
61115 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, SWIG_POINTER_NEW | 0 );
61116 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
61117 - return resultobj;
61118 -fail:
61119 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
61120 - return NULL;
61121 -}
61122 -
61123 -
61124 -SWIGINTERN PyObject *_wrap_new_VImage__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61125 - PyObject *resultobj = 0;
61126 - void *arg1 = (void *) 0 ;
61127 - int arg2 ;
61128 - int arg3 ;
61129 - int arg4 ;
61130 - vips::VImage::TBandFmt arg5 ;
61131 - int res1 ;
61132 - int val2 ;
61133 - int ecode2 = 0 ;
61134 - int val3 ;
61135 - int ecode3 = 0 ;
61136 - int val4 ;
61137 - int ecode4 = 0 ;
61138 - int val5 ;
61139 - int ecode5 = 0 ;
61140 - PyObject * obj0 = 0 ;
61141 - PyObject * obj1 = 0 ;
61142 - PyObject * obj2 = 0 ;
61143 - PyObject * obj3 = 0 ;
61144 - PyObject * obj4 = 0 ;
61145 - vips::VImage *result = 0 ;
61146 -
61147 - if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_VImage",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
61148 - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
61149 - if (!SWIG_IsOK(res1)) {
61150 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VImage" "', argument " "1"" of type '" "void *""'");
61151 - }
61152 - ecode2 = SWIG_AsVal_int(obj1, &val2);
61153 - if (!SWIG_IsOK(ecode2)) {
61154 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_VImage" "', argument " "2"" of type '" "int""'");
61155 - }
61156 - arg2 = static_cast< int >(val2);
61157 - ecode3 = SWIG_AsVal_int(obj2, &val3);
61158 - if (!SWIG_IsOK(ecode3)) {
61159 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_VImage" "', argument " "3"" of type '" "int""'");
61160 - }
61161 - arg3 = static_cast< int >(val3);
61162 - ecode4 = SWIG_AsVal_int(obj3, &val4);
61163 - if (!SWIG_IsOK(ecode4)) {
61164 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_VImage" "', argument " "4"" of type '" "int""'");
61165 - }
61166 - arg4 = static_cast< int >(val4);
61167 - ecode5 = SWIG_AsVal_int(obj4, &val5);
61168 - if (!SWIG_IsOK(ecode5)) {
61169 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_VImage" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'");
61170 - }
61171 - arg5 = static_cast< vips::VImage::TBandFmt >(val5);
61172 - try {
61173 - result = (vips::VImage *)new vips::VImage(arg1,arg2,arg3,arg4,arg5);
61174 - }
61175 - catch(vips::VError &_e) {
61176 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
61177 - }
61178 -
61179 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, SWIG_POINTER_NEW | 0 );
61180 - return resultobj;
61181 -fail:
61182 - return NULL;
61183 -}
61184 -
61185 -
61186 -SWIGINTERN PyObject *_wrap_new_VImage__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61187 - PyObject *resultobj = 0;
61188 - _VipsImage *arg1 = (_VipsImage *) 0 ;
61189 - void *argp1 = 0 ;
61190 - int res1 = 0 ;
61191 - PyObject * obj0 = 0 ;
61192 - vips::VImage *result = 0 ;
61193 -
61194 - if (!PyArg_ParseTuple(args,(char *)"O:new_VImage",&obj0)) SWIG_fail;
61195 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__VipsImage, 0 | 0 );
61196 - if (!SWIG_IsOK(res1)) {
61197 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VImage" "', argument " "1"" of type '" "_VipsImage *""'");
61198 - }
61199 - arg1 = reinterpret_cast< _VipsImage * >(argp1);
61200 - result = (vips::VImage *)new vips::VImage(arg1);
61201 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, SWIG_POINTER_NEW | 0 );
61202 - return resultobj;
61203 -fail:
61204 - return NULL;
61205 -}
61206 -
61207 -
61208 -SWIGINTERN PyObject *_wrap_new_VImage__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61209 - PyObject *resultobj = 0;
61210 - vips::VImage *result = 0 ;
61211 -
61212 - if (!PyArg_ParseTuple(args,(char *)":new_VImage")) SWIG_fail;
61213 - try {
61214 - result = (vips::VImage *)new vips::VImage();
61215 - }
61216 - catch(vips::VError &_e) {
61217 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
61218 - }
61219 -
61220 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, SWIG_POINTER_NEW | 0 );
61221 - return resultobj;
61222 -fail:
61223 - return NULL;
61224 -}
61225 -
61226 -
61227 -SWIGINTERN PyObject *_wrap_VImage_convert2disc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61228 - PyObject *resultobj = 0;
61229 - char *arg1 = (char *) 0 ;
61230 - char *arg2 = (char *) 0 ;
61231 - char *arg3 = (char *) 0 ;
61232 - int res1 ;
61233 - char *buf1 = 0 ;
61234 - int alloc1 = 0 ;
61235 - int res2 ;
61236 - char *buf2 = 0 ;
61237 - int alloc2 = 0 ;
61238 - int res3 ;
61239 - char *buf3 = 0 ;
61240 - int alloc3 = 0 ;
61241 - PyObject * obj0 = 0 ;
61242 - PyObject * obj1 = 0 ;
61243 - PyObject * obj2 = 0 ;
61244 - vips::VImage result;
61245 -
61246 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_convert2disc",&obj0,&obj1,&obj2)) SWIG_fail;
61247 - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
61248 - if (!SWIG_IsOK(res1)) {
61249 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convert2disc" "', argument " "1"" of type '" "char const *""'");
61250 - }
61251 - arg1 = reinterpret_cast< char * >(buf1);
61252 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
61253 - if (!SWIG_IsOK(res2)) {
61254 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convert2disc" "', argument " "2"" of type '" "char const *""'");
61255 - }
61256 - arg2 = reinterpret_cast< char * >(buf2);
61257 - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
61258 - if (!SWIG_IsOK(res3)) {
61259 - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_convert2disc" "', argument " "3"" of type '" "char const *""'");
61260 - }
61261 - arg3 = reinterpret_cast< char * >(buf3);
61262 - try {
61263 - result = vips::VImage::convert2disc((char const *)arg1,(char const *)arg2,(char const *)arg3);
61264 - }
61265 - catch(vips::VError &_e) {
61266 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
61267 - }
61268 -
61269 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
61270 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
61271 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
61272 - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
61273 - return resultobj;
61274 -fail:
61275 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
61276 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
61277 - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
61278 - return NULL;
61279 -}
61280 -
61281 -
61282 -SWIGINTERN PyObject *_wrap_new_VImage__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61283 - PyObject *resultobj = 0;
61284 - vips::VImage *arg1 = 0 ;
61285 - void *argp1 = 0 ;
61286 - int res1 = 0 ;
61287 - PyObject * obj0 = 0 ;
61288 - vips::VImage *result = 0 ;
61289 -
61290 - if (!PyArg_ParseTuple(args,(char *)"O:new_VImage",&obj0)) SWIG_fail;
61291 - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_vips__VImage, 0 | 0);
61292 - if (!SWIG_IsOK(res1)) {
61293 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VImage" "', argument " "1"" of type '" "vips::VImage const &""'");
61294 - }
61295 - if (!argp1) {
61296 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VImage" "', argument " "1"" of type '" "vips::VImage const &""'");
61297 - }
61298 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61299 - result = (vips::VImage *)new vips::VImage((vips::VImage const &)*arg1);
61300 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, SWIG_POINTER_NEW | 0 );
61301 - return resultobj;
61302 -fail:
61303 - return NULL;
61304 -}
61305 -
61306 -
61307 -SWIGINTERN PyObject *_wrap_new_VImage(PyObject *self, PyObject *args) {
61308 - int argc;
61309 - PyObject *argv[6];
61310 - int ii;
61311 -
61312 - if (!PyTuple_Check(args)) SWIG_fail;
61313 - argc = args ? (int)PyObject_Length(args) : 0;
61314 - for (ii = 0; (ii < 5) && (ii < argc); ii++) {
61315 - argv[ii] = PyTuple_GET_ITEM(args,ii);
61316 - }
61317 - if (argc == 0) {
61318 - return _wrap_new_VImage__SWIG_4(self, args);
61319 - }
61320 - if (argc == 1) {
61321 - int _v;
61322 - void *vptr = 0;
61323 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p__VipsImage, 0);
61324 - _v = SWIG_CheckState(res);
61325 - if (_v) {
61326 - return _wrap_new_VImage__SWIG_3(self, args);
61327 - }
61328 - }
61329 - if (argc == 1) {
61330 - int _v;
61331 - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_vips__VImage, 0);
61332 - _v = SWIG_CheckState(res);
61333 - if (_v) {
61334 - return _wrap_new_VImage__SWIG_5(self, args);
61335 - }
61336 - }
61337 - if (argc == 1) {
61338 - int _v;
61339 - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
61340 - _v = SWIG_CheckState(res);
61341 - if (_v) {
61342 - return _wrap_new_VImage__SWIG_1(self, args);
61343 - }
61344 - }
61345 - if (argc == 2) {
61346 - int _v;
61347 - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
61348 - _v = SWIG_CheckState(res);
61349 - if (_v) {
61350 - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
61351 - _v = SWIG_CheckState(res);
61352 - if (_v) {
61353 - return _wrap_new_VImage__SWIG_0(self, args);
61354 - }
61355 - }
61356 - }
61357 - if (argc == 5) {
61358 - int _v;
61359 - void *ptr = 0;
61360 - int res = SWIG_ConvertPtr(argv[0], &ptr, 0, 0);
61361 - _v = SWIG_CheckState(res);
61362 - if (_v) {
61363 - {
61364 - int res = SWIG_AsVal_int(argv[1], NULL);
61365 - _v = SWIG_CheckState(res);
61366 - }
61367 - if (_v) {
61368 - {
61369 - int res = SWIG_AsVal_int(argv[2], NULL);
61370 - _v = SWIG_CheckState(res);
61371 - }
61372 - if (_v) {
61373 - {
61374 - int res = SWIG_AsVal_int(argv[3], NULL);
61375 - _v = SWIG_CheckState(res);
61376 - }
61377 - if (_v) {
61378 - {
61379 - int res = SWIG_AsVal_int(argv[4], NULL);
61380 - _v = SWIG_CheckState(res);
61381 - }
61382 - if (_v) {
61383 - return _wrap_new_VImage__SWIG_2(self, args);
61384 - }
61385 - }
61386 - }
61387 - }
61388 - }
61389 - }
61390 -
61391 -fail:
61392 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VImage'.\n"
61393 - " Possible C/C++ prototypes are:\n"
61394 - " vips::VImage::VImage(char const *,char const *)\n"
61395 - " vips::VImage::VImage(char const *)\n"
61396 - " vips::VImage::VImage(void *,int,int,int,vips::VImage::TBandFmt)\n"
61397 - " vips::VImage::VImage(_VipsImage *)\n"
61398 - " vips::VImage::VImage()\n"
61399 - " vips::VImage::VImage(vips::VImage const &)\n");
61400 - return 0;
61401 -}
61402 -
61403 -
61404 -SWIGINTERN PyObject *_wrap_VImage___assign__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61405 - PyObject *resultobj = 0;
61406 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61407 - vips::VImage *arg2 = 0 ;
61408 - void *argp1 = 0 ;
61409 - int res1 = 0 ;
61410 - void *argp2 = 0 ;
61411 - int res2 = 0 ;
61412 - PyObject * obj0 = 0 ;
61413 - PyObject * obj1 = 0 ;
61414 - vips::VImage *result = 0 ;
61415 -
61416 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage___assign__",&obj0,&obj1)) SWIG_fail;
61417 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
61418 - if (!SWIG_IsOK(res1)) {
61419 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage___assign__" "', argument " "1"" of type '" "vips::VImage *""'");
61420 - }
61421 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61422 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
61423 - if (!SWIG_IsOK(res2)) {
61424 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage___assign__" "', argument " "2"" of type '" "vips::VImage const &""'");
61425 - }
61426 - if (!argp2) {
61427 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage___assign__" "', argument " "2"" of type '" "vips::VImage const &""'");
61428 - }
61429 - arg2 = reinterpret_cast< vips::VImage * >(argp2);
61430 - try {
61431 - result = (vips::VImage *) &(arg1)->operator =((vips::VImage const &)*arg2);
61432 - }
61433 - catch(vips::VError &_e) {
61434 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
61435 - }
61436 -
61437 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, 0 | 0 );
61438 - return resultobj;
61439 -fail:
61440 - return NULL;
61441 -}
61442 -
61443 -
61444 -SWIGINTERN PyObject *_wrap_delete_VImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61445 - PyObject *resultobj = 0;
61446 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61447 - void *argp1 = 0 ;
61448 - int res1 = 0 ;
61449 - PyObject * obj0 = 0 ;
61450 -
61451 - if (!PyArg_ParseTuple(args,(char *)"O:delete_VImage",&obj0)) SWIG_fail;
61452 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, SWIG_POINTER_DISOWN | 0 );
61453 - if (!SWIG_IsOK(res1)) {
61454 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VImage" "', argument " "1"" of type '" "vips::VImage *""'");
61455 - }
61456 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61457 - delete arg1;
61458 - resultobj = SWIG_Py_Void();
61459 - return resultobj;
61460 -fail:
61461 - return NULL;
61462 -}
61463 -
61464 -
61465 -SWIGINTERN PyObject *_wrap_VImage_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61466 - PyObject *resultobj = 0;
61467 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61468 - void *argp1 = 0 ;
61469 - int res1 = 0 ;
61470 - PyObject * obj0 = 0 ;
61471 - _VipsImage *result = 0 ;
61472 -
61473 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_image",&obj0)) SWIG_fail;
61474 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
61475 - if (!SWIG_IsOK(res1)) {
61476 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_image" "', argument " "1"" of type '" "vips::VImage const *""'");
61477 - }
61478 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61479 - result = (_VipsImage *)((vips::VImage const *)arg1)->image();
61480 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__VipsImage, 0 | 0 );
61481 - return resultobj;
61482 -fail:
61483 - return NULL;
61484 -}
61485 -
61486 -
61487 -SWIGINTERN PyObject *_wrap_VImage_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61488 - PyObject *resultobj = 0;
61489 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61490 - void *argp1 = 0 ;
61491 - int res1 = 0 ;
61492 - PyObject * obj0 = 0 ;
61493 - void *result = 0 ;
61494 -
61495 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_data",&obj0)) SWIG_fail;
61496 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
61497 - if (!SWIG_IsOK(res1)) {
61498 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_data" "', argument " "1"" of type '" "vips::VImage const *""'");
61499 - }
61500 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61501 - try {
61502 - result = (void *)((vips::VImage const *)arg1)->data();
61503 - }
61504 - catch(vips::VError &_e) {
61505 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
61506 - }
61507 -
61508 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 );
61509 - return resultobj;
61510 -fail:
61511 - return NULL;
61512 -}
61513 -
61514 -
61515 -SWIGINTERN PyObject *_wrap_VImage_write__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61516 - PyObject *resultobj = 0;
61517 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61518 - vips::VImage arg2 ;
61519 - void *argp1 = 0 ;
61520 - int res1 = 0 ;
61521 - void *argp2 ;
61522 - int res2 = 0 ;
61523 - PyObject * obj0 = 0 ;
61524 - PyObject * obj1 = 0 ;
61525 - vips::VImage result;
61526 -
61527 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_write",&obj0,&obj1)) SWIG_fail;
61528 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
61529 - if (!SWIG_IsOK(res1)) {
61530 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_write" "', argument " "1"" of type '" "vips::VImage *""'");
61531 - }
61532 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61533 - {
61534 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
61535 - if (!SWIG_IsOK(res2)) {
61536 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_write" "', argument " "2"" of type '" "vips::VImage""'");
61537 - }
61538 - if (!argp2) {
61539 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_write" "', argument " "2"" of type '" "vips::VImage""'");
61540 - } else {
61541 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
61542 - arg2 = *temp;
61543 - if (SWIG_IsNewObj(res2)) delete temp;
61544 - }
61545 - }
61546 - try {
61547 - result = (arg1)->write(arg2);
61548 - }
61549 - catch(vips::VError &_e) {
61550 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
61551 - }
61552 -
61553 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
61554 - return resultobj;
61555 -fail:
61556 - return NULL;
61557 -}
61558 -
61559 -
61560 -SWIGINTERN PyObject *_wrap_VImage_write__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61561 - PyObject *resultobj = 0;
61562 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61563 - char *arg2 = (char *) 0 ;
61564 - void *argp1 = 0 ;
61565 - int res1 = 0 ;
61566 - int res2 ;
61567 - char *buf2 = 0 ;
61568 - int alloc2 = 0 ;
61569 - PyObject * obj0 = 0 ;
61570 - PyObject * obj1 = 0 ;
61571 - vips::VImage result;
61572 -
61573 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_write",&obj0,&obj1)) SWIG_fail;
61574 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
61575 - if (!SWIG_IsOK(res1)) {
61576 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_write" "', argument " "1"" of type '" "vips::VImage *""'");
61577 - }
61578 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61579 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
61580 - if (!SWIG_IsOK(res2)) {
61581 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_write" "', argument " "2"" of type '" "char const *""'");
61582 - }
61583 - arg2 = reinterpret_cast< char * >(buf2);
61584 - try {
61585 - result = (arg1)->write((char const *)arg2);
61586 - }
61587 - catch(vips::VError &_e) {
61588 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
61589 - }
61590 -
61591 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
61592 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
61593 - return resultobj;
61594 -fail:
61595 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
61596 - return NULL;
61597 -}
61598 -
61599 -
61600 -SWIGINTERN PyObject *_wrap_VImage_write__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61601 - PyObject *resultobj = 0;
61602 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61603 - void *argp1 = 0 ;
61604 - int res1 = 0 ;
61605 - PyObject * obj0 = 0 ;
61606 - vips::VImage result;
61607 -
61608 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_write",&obj0)) SWIG_fail;
61609 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
61610 - if (!SWIG_IsOK(res1)) {
61611 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_write" "', argument " "1"" of type '" "vips::VImage *""'");
61612 - }
61613 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61614 - try {
61615 - result = (arg1)->write();
61616 - }
61617 - catch(vips::VError &_e) {
61618 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
61619 - }
61620 -
61621 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
61622 - return resultobj;
61623 -fail:
61624 - return NULL;
61625 -}
61626 -
61627 -
61628 -SWIGINTERN PyObject *_wrap_VImage_write(PyObject *self, PyObject *args) {
61629 - int argc;
61630 - PyObject *argv[3];
61631 - int ii;
61632 -
61633 - if (!PyTuple_Check(args)) SWIG_fail;
61634 - argc = args ? (int)PyObject_Length(args) : 0;
61635 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
61636 - argv[ii] = PyTuple_GET_ITEM(args,ii);
61637 - }
61638 - if (argc == 1) {
61639 - int _v;
61640 - void *vptr = 0;
61641 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
61642 - _v = SWIG_CheckState(res);
61643 - if (_v) {
61644 - return _wrap_VImage_write__SWIG_2(self, args);
61645 - }
61646 - }
61647 - if (argc == 2) {
61648 - int _v;
61649 - void *vptr = 0;
61650 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
61651 - _v = SWIG_CheckState(res);
61652 - if (_v) {
61653 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
61654 - _v = SWIG_CheckState(res);
61655 - if (_v) {
61656 - return _wrap_VImage_write__SWIG_0(self, args);
61657 - }
61658 - }
61659 - }
61660 - if (argc == 2) {
61661 - int _v;
61662 - void *vptr = 0;
61663 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
61664 - _v = SWIG_CheckState(res);
61665 - if (_v) {
61666 - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
61667 - _v = SWIG_CheckState(res);
61668 - if (_v) {
61669 - return _wrap_VImage_write__SWIG_1(self, args);
61670 - }
61671 - }
61672 - }
61673 -
61674 -fail:
61675 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_write'.\n"
61676 - " Possible C/C++ prototypes are:\n"
61677 - " vips::VImage::write(vips::VImage)\n"
61678 - " vips::VImage::write(char const *)\n"
61679 - " vips::VImage::write()\n");
61680 - return 0;
61681 -}
61682 -
61683 -
61684 -SWIGINTERN PyObject *_wrap_VImage_debug_print(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61685 - PyObject *resultobj = 0;
61686 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61687 - void *argp1 = 0 ;
61688 - int res1 = 0 ;
61689 - PyObject * obj0 = 0 ;
61690 -
61691 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_debug_print",&obj0)) SWIG_fail;
61692 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
61693 - if (!SWIG_IsOK(res1)) {
61694 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_debug_print" "', argument " "1"" of type '" "vips::VImage *""'");
61695 - }
61696 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61697 - (arg1)->debug_print();
61698 - resultobj = SWIG_Py_Void();
61699 - return resultobj;
61700 -fail:
61701 - return NULL;
61702 -}
61703 -
61704 -
61705 -SWIGINTERN PyObject *_wrap_VImage_Xsize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61706 - PyObject *resultobj = 0;
61707 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61708 - void *argp1 = 0 ;
61709 - int res1 = 0 ;
61710 - PyObject * obj0 = 0 ;
61711 - int result;
61712 -
61713 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Xsize",&obj0)) SWIG_fail;
61714 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
61715 - if (!SWIG_IsOK(res1)) {
61716 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Xsize" "', argument " "1"" of type '" "vips::VImage *""'");
61717 - }
61718 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61719 - result = (int)(arg1)->Xsize();
61720 - resultobj = SWIG_From_int(static_cast< int >(result));
61721 - return resultobj;
61722 -fail:
61723 - return NULL;
61724 -}
61725 -
61726 -
61727 -SWIGINTERN PyObject *_wrap_VImage_Ysize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61728 - PyObject *resultobj = 0;
61729 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61730 - void *argp1 = 0 ;
61731 - int res1 = 0 ;
61732 - PyObject * obj0 = 0 ;
61733 - int result;
61734 -
61735 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Ysize",&obj0)) SWIG_fail;
61736 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
61737 - if (!SWIG_IsOK(res1)) {
61738 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Ysize" "', argument " "1"" of type '" "vips::VImage *""'");
61739 - }
61740 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61741 - result = (int)(arg1)->Ysize();
61742 - resultobj = SWIG_From_int(static_cast< int >(result));
61743 - return resultobj;
61744 -fail:
61745 - return NULL;
61746 -}
61747 -
61748 -
61749 -SWIGINTERN PyObject *_wrap_VImage_Bands(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61750 - PyObject *resultobj = 0;
61751 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61752 - void *argp1 = 0 ;
61753 - int res1 = 0 ;
61754 - PyObject * obj0 = 0 ;
61755 - int result;
61756 -
61757 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Bands",&obj0)) SWIG_fail;
61758 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
61759 - if (!SWIG_IsOK(res1)) {
61760 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Bands" "', argument " "1"" of type '" "vips::VImage *""'");
61761 - }
61762 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61763 - result = (int)(arg1)->Bands();
61764 - resultobj = SWIG_From_int(static_cast< int >(result));
61765 - return resultobj;
61766 -fail:
61767 - return NULL;
61768 -}
61769 -
61770 -
61771 -SWIGINTERN PyObject *_wrap_VImage_BandFmt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61772 - PyObject *resultobj = 0;
61773 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61774 - void *argp1 = 0 ;
61775 - int res1 = 0 ;
61776 - PyObject * obj0 = 0 ;
61777 - vips::VImage::TBandFmt result;
61778 -
61779 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_BandFmt",&obj0)) SWIG_fail;
61780 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
61781 - if (!SWIG_IsOK(res1)) {
61782 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_BandFmt" "', argument " "1"" of type '" "vips::VImage *""'");
61783 - }
61784 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61785 - result = (vips::VImage::TBandFmt)(arg1)->BandFmt();
61786 - resultobj = SWIG_From_int(static_cast< int >(result));
61787 - return resultobj;
61788 -fail:
61789 - return NULL;
61790 -}
61791 -
61792 -
61793 -SWIGINTERN PyObject *_wrap_VImage_Coding(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61794 - PyObject *resultobj = 0;
61795 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61796 - void *argp1 = 0 ;
61797 - int res1 = 0 ;
61798 - PyObject * obj0 = 0 ;
61799 - vips::VImage::TCoding result;
61800 -
61801 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Coding",&obj0)) SWIG_fail;
61802 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
61803 - if (!SWIG_IsOK(res1)) {
61804 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Coding" "', argument " "1"" of type '" "vips::VImage *""'");
61805 - }
61806 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61807 - result = (vips::VImage::TCoding)(arg1)->Coding();
61808 - resultobj = SWIG_From_int(static_cast< int >(result));
61809 - return resultobj;
61810 -fail:
61811 - return NULL;
61812 -}
61813 -
61814 -
61815 -SWIGINTERN PyObject *_wrap_VImage_Type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61816 - PyObject *resultobj = 0;
61817 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61818 - void *argp1 = 0 ;
61819 - int res1 = 0 ;
61820 - PyObject * obj0 = 0 ;
61821 - vips::VImage::TType result;
61822 -
61823 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Type",&obj0)) SWIG_fail;
61824 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
61825 - if (!SWIG_IsOK(res1)) {
61826 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Type" "', argument " "1"" of type '" "vips::VImage *""'");
61827 - }
61828 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61829 - result = (vips::VImage::TType)(arg1)->Type();
61830 - resultobj = SWIG_From_int(static_cast< int >(result));
61831 - return resultobj;
61832 -fail:
61833 - return NULL;
61834 -}
61835 -
61836 -
61837 -SWIGINTERN PyObject *_wrap_VImage_Xres(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61838 - PyObject *resultobj = 0;
61839 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61840 - void *argp1 = 0 ;
61841 - int res1 = 0 ;
61842 - PyObject * obj0 = 0 ;
61843 - float result;
61844 -
61845 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Xres",&obj0)) SWIG_fail;
61846 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
61847 - if (!SWIG_IsOK(res1)) {
61848 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Xres" "', argument " "1"" of type '" "vips::VImage *""'");
61849 - }
61850 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61851 - result = (float)(arg1)->Xres();
61852 - resultobj = SWIG_From_float(static_cast< float >(result));
61853 - return resultobj;
61854 -fail:
61855 - return NULL;
61856 -}
61857 -
61858 -
61859 -SWIGINTERN PyObject *_wrap_VImage_Yres(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61860 - PyObject *resultobj = 0;
61861 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61862 - void *argp1 = 0 ;
61863 - int res1 = 0 ;
61864 - PyObject * obj0 = 0 ;
61865 - float result;
61866 -
61867 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Yres",&obj0)) SWIG_fail;
61868 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
61869 - if (!SWIG_IsOK(res1)) {
61870 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Yres" "', argument " "1"" of type '" "vips::VImage *""'");
61871 - }
61872 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61873 - result = (float)(arg1)->Yres();
61874 - resultobj = SWIG_From_float(static_cast< float >(result));
61875 - return resultobj;
61876 -fail:
61877 - return NULL;
61878 -}
61879 -
61880 -
61881 -SWIGINTERN PyObject *_wrap_VImage_Length(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61882 - PyObject *resultobj = 0;
61883 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61884 - void *argp1 = 0 ;
61885 - int res1 = 0 ;
61886 - PyObject * obj0 = 0 ;
61887 - int result;
61888 -
61889 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Length",&obj0)) SWIG_fail;
61890 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
61891 - if (!SWIG_IsOK(res1)) {
61892 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Length" "', argument " "1"" of type '" "vips::VImage *""'");
61893 - }
61894 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61895 - result = (int)(arg1)->Length();
61896 - resultobj = SWIG_From_int(static_cast< int >(result));
61897 - return resultobj;
61898 -fail:
61899 - return NULL;
61900 -}
61901 -
61902 -
61903 -SWIGINTERN PyObject *_wrap_VImage_Compression(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61904 - PyObject *resultobj = 0;
61905 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61906 - void *argp1 = 0 ;
61907 - int res1 = 0 ;
61908 - PyObject * obj0 = 0 ;
61909 - vips::VImage::TCompression result;
61910 -
61911 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Compression",&obj0)) SWIG_fail;
61912 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
61913 - if (!SWIG_IsOK(res1)) {
61914 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Compression" "', argument " "1"" of type '" "vips::VImage *""'");
61915 - }
61916 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61917 - result = (vips::VImage::TCompression)(arg1)->Compression();
61918 - resultobj = SWIG_From_int(static_cast< int >(result));
61919 - return resultobj;
61920 -fail:
61921 - return NULL;
61922 -}
61923 -
61924 -
61925 -SWIGINTERN PyObject *_wrap_VImage_Level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61926 - PyObject *resultobj = 0;
61927 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61928 - void *argp1 = 0 ;
61929 - int res1 = 0 ;
61930 - PyObject * obj0 = 0 ;
61931 - short result;
61932 -
61933 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Level",&obj0)) SWIG_fail;
61934 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
61935 - if (!SWIG_IsOK(res1)) {
61936 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Level" "', argument " "1"" of type '" "vips::VImage *""'");
61937 - }
61938 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61939 - result = (short)(arg1)->Level();
61940 - resultobj = SWIG_From_short(static_cast< short >(result));
61941 - return resultobj;
61942 -fail:
61943 - return NULL;
61944 -}
61945 -
61946 -
61947 -SWIGINTERN PyObject *_wrap_VImage_Xoffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61948 - PyObject *resultobj = 0;
61949 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61950 - void *argp1 = 0 ;
61951 - int res1 = 0 ;
61952 - PyObject * obj0 = 0 ;
61953 - int result;
61954 -
61955 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Xoffset",&obj0)) SWIG_fail;
61956 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
61957 - if (!SWIG_IsOK(res1)) {
61958 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Xoffset" "', argument " "1"" of type '" "vips::VImage *""'");
61959 - }
61960 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61961 - result = (int)(arg1)->Xoffset();
61962 - resultobj = SWIG_From_int(static_cast< int >(result));
61963 - return resultobj;
61964 -fail:
61965 - return NULL;
61966 -}
61967 -
61968 -
61969 -SWIGINTERN PyObject *_wrap_VImage_Yoffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61970 - PyObject *resultobj = 0;
61971 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61972 - void *argp1 = 0 ;
61973 - int res1 = 0 ;
61974 - PyObject * obj0 = 0 ;
61975 - int result;
61976 -
61977 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Yoffset",&obj0)) SWIG_fail;
61978 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
61979 - if (!SWIG_IsOK(res1)) {
61980 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Yoffset" "', argument " "1"" of type '" "vips::VImage *""'");
61981 - }
61982 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
61983 - result = (int)(arg1)->Yoffset();
61984 - resultobj = SWIG_From_int(static_cast< int >(result));
61985 - return resultobj;
61986 -fail:
61987 - return NULL;
61988 -}
61989 -
61990 -
61991 -SWIGINTERN PyObject *_wrap_VImage_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61992 - PyObject *resultobj = 0;
61993 - vips::VImage *arg1 = (vips::VImage *) 0 ;
61994 - void *argp1 = 0 ;
61995 - int res1 = 0 ;
61996 - PyObject * obj0 = 0 ;
61997 - char *result = 0 ;
61998 -
61999 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_filename",&obj0)) SWIG_fail;
62000 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
62001 - if (!SWIG_IsOK(res1)) {
62002 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_filename" "', argument " "1"" of type '" "vips::VImage *""'");
62003 - }
62004 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
62005 - result = (char *)(arg1)->filename();
62006 - resultobj = SWIG_FromCharPtr((const char *)result);
62007 - return resultobj;
62008 -fail:
62009 - return NULL;
62010 -}
62011 -
62012 -
62013 -SWIGINTERN PyObject *_wrap_VImage_Hist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62014 - PyObject *resultobj = 0;
62015 - vips::VImage *arg1 = (vips::VImage *) 0 ;
62016 - void *argp1 = 0 ;
62017 - int res1 = 0 ;
62018 - PyObject * obj0 = 0 ;
62019 - char *result = 0 ;
62020 -
62021 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Hist",&obj0)) SWIG_fail;
62022 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
62023 - if (!SWIG_IsOK(res1)) {
62024 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Hist" "', argument " "1"" of type '" "vips::VImage *""'");
62025 - }
62026 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
62027 - result = (char *)(arg1)->Hist();
62028 - resultobj = SWIG_FromCharPtr((const char *)result);
62029 - return resultobj;
62030 -fail:
62031 - return NULL;
62032 -}
62033 -
62034 -
62035 -SWIGINTERN PyObject *_wrap_VImage_meta_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62036 - PyObject *resultobj = 0;
62037 - vips::VImage *arg1 = (vips::VImage *) 0 ;
62038 - char *arg2 = (char *) 0 ;
62039 - void *argp1 = 0 ;
62040 - int res1 = 0 ;
62041 - int res2 ;
62042 - char *buf2 = 0 ;
62043 - int alloc2 = 0 ;
62044 - PyObject * obj0 = 0 ;
62045 - PyObject * obj1 = 0 ;
62046 - gboolean result;
62047 -
62048 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_meta_remove",&obj0,&obj1)) SWIG_fail;
62049 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
62050 - if (!SWIG_IsOK(res1)) {
62051 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_remove" "', argument " "1"" of type '" "vips::VImage *""'");
62052 - }
62053 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
62054 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
62055 - if (!SWIG_IsOK(res2)) {
62056 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_remove" "', argument " "2"" of type '" "char const *""'");
62057 - }
62058 - arg2 = reinterpret_cast< char * >(buf2);
62059 - result = (arg1)->meta_remove((char const *)arg2);
62060 - resultobj = SWIG_NewPointerObj((new gboolean(static_cast< const gboolean& >(result))), SWIGTYPE_p_gboolean, SWIG_POINTER_OWN | 0 );
62061 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62062 - return resultobj;
62063 -fail:
62064 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62065 - return NULL;
62066 -}
62067 -
62068 -
62069 -SWIGINTERN PyObject *_wrap_VImage_meta_get_typeof(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62070 - PyObject *resultobj = 0;
62071 - vips::VImage *arg1 = (vips::VImage *) 0 ;
62072 - char *arg2 = (char *) 0 ;
62073 - void *argp1 = 0 ;
62074 - int res1 = 0 ;
62075 - int res2 ;
62076 - char *buf2 = 0 ;
62077 - int alloc2 = 0 ;
62078 - PyObject * obj0 = 0 ;
62079 - PyObject * obj1 = 0 ;
62080 - GType result;
62081 -
62082 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_meta_get_typeof",&obj0,&obj1)) SWIG_fail;
62083 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
62084 - if (!SWIG_IsOK(res1)) {
62085 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_get_typeof" "', argument " "1"" of type '" "vips::VImage *""'");
62086 - }
62087 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
62088 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
62089 - if (!SWIG_IsOK(res2)) {
62090 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_get_typeof" "', argument " "2"" of type '" "char const *""'");
62091 - }
62092 - arg2 = reinterpret_cast< char * >(buf2);
62093 - result = (arg1)->meta_get_typeof((char const *)arg2);
62094 - resultobj = SWIG_NewPointerObj((new GType(static_cast< const GType& >(result))), SWIGTYPE_p_GType, SWIG_POINTER_OWN | 0 );
62095 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62096 - return resultobj;
62097 -fail:
62098 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62099 - return NULL;
62100 -}
62101 -
62102 -
62103 -SWIGINTERN PyObject *_wrap_VImage_meta_get_int(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62104 - PyObject *resultobj = 0;
62105 - vips::VImage *arg1 = (vips::VImage *) 0 ;
62106 - char *arg2 = (char *) 0 ;
62107 - void *argp1 = 0 ;
62108 - int res1 = 0 ;
62109 - int res2 ;
62110 - char *buf2 = 0 ;
62111 - int alloc2 = 0 ;
62112 - PyObject * obj0 = 0 ;
62113 - PyObject * obj1 = 0 ;
62114 - int result;
62115 -
62116 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_meta_get_int",&obj0,&obj1)) SWIG_fail;
62117 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
62118 - if (!SWIG_IsOK(res1)) {
62119 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_get_int" "', argument " "1"" of type '" "vips::VImage *""'");
62120 - }
62121 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
62122 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
62123 - if (!SWIG_IsOK(res2)) {
62124 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_get_int" "', argument " "2"" of type '" "char const *""'");
62125 - }
62126 - arg2 = reinterpret_cast< char * >(buf2);
62127 - try {
62128 - result = (int)(arg1)->meta_get_int((char const *)arg2);
62129 - }
62130 - catch(vips::VError &_e) {
62131 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
62132 - }
62133 -
62134 - resultobj = SWIG_From_int(static_cast< int >(result));
62135 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62136 - return resultobj;
62137 -fail:
62138 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62139 - return NULL;
62140 -}
62141 -
62142 -
62143 -SWIGINTERN PyObject *_wrap_VImage_meta_get_double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62144 - PyObject *resultobj = 0;
62145 - vips::VImage *arg1 = (vips::VImage *) 0 ;
62146 - char *arg2 = (char *) 0 ;
62147 - void *argp1 = 0 ;
62148 - int res1 = 0 ;
62149 - int res2 ;
62150 - char *buf2 = 0 ;
62151 - int alloc2 = 0 ;
62152 - PyObject * obj0 = 0 ;
62153 - PyObject * obj1 = 0 ;
62154 - double result;
62155 -
62156 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_meta_get_double",&obj0,&obj1)) SWIG_fail;
62157 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
62158 - if (!SWIG_IsOK(res1)) {
62159 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_get_double" "', argument " "1"" of type '" "vips::VImage *""'");
62160 - }
62161 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
62162 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
62163 - if (!SWIG_IsOK(res2)) {
62164 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_get_double" "', argument " "2"" of type '" "char const *""'");
62165 - }
62166 - arg2 = reinterpret_cast< char * >(buf2);
62167 - try {
62168 - result = (double)(arg1)->meta_get_double((char const *)arg2);
62169 - }
62170 - catch(vips::VError &_e) {
62171 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
62172 - }
62173 -
62174 - resultobj = SWIG_From_double(static_cast< double >(result));
62175 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62176 - return resultobj;
62177 -fail:
62178 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62179 - return NULL;
62180 -}
62181 -
62182 -
62183 -SWIGINTERN PyObject *_wrap_VImage_meta_get_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62184 - PyObject *resultobj = 0;
62185 - vips::VImage *arg1 = (vips::VImage *) 0 ;
62186 - char *arg2 = (char *) 0 ;
62187 - void *argp1 = 0 ;
62188 - int res1 = 0 ;
62189 - int res2 ;
62190 - char *buf2 = 0 ;
62191 - int alloc2 = 0 ;
62192 - PyObject * obj0 = 0 ;
62193 - PyObject * obj1 = 0 ;
62194 - char *result = 0 ;
62195 -
62196 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_meta_get_string",&obj0,&obj1)) SWIG_fail;
62197 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
62198 - if (!SWIG_IsOK(res1)) {
62199 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_get_string" "', argument " "1"" of type '" "vips::VImage *""'");
62200 - }
62201 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
62202 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
62203 - if (!SWIG_IsOK(res2)) {
62204 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_get_string" "', argument " "2"" of type '" "char const *""'");
62205 - }
62206 - arg2 = reinterpret_cast< char * >(buf2);
62207 - try {
62208 - result = (char *)(arg1)->meta_get_string((char const *)arg2);
62209 - }
62210 - catch(vips::VError &_e) {
62211 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
62212 - }
62213 -
62214 - resultobj = SWIG_FromCharPtr((const char *)result);
62215 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62216 - return resultobj;
62217 -fail:
62218 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62219 - return NULL;
62220 -}
62221 -
62222 -
62223 -SWIGINTERN PyObject *_wrap_VImage_meta_get_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62224 - PyObject *resultobj = 0;
62225 - vips::VImage *arg1 = (vips::VImage *) 0 ;
62226 - char *arg2 = (char *) 0 ;
62227 - void *argp1 = 0 ;
62228 - int res1 = 0 ;
62229 - int res2 ;
62230 - char *buf2 = 0 ;
62231 - int alloc2 = 0 ;
62232 - PyObject * obj0 = 0 ;
62233 - PyObject * obj1 = 0 ;
62234 - void *result = 0 ;
62235 -
62236 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_meta_get_area",&obj0,&obj1)) SWIG_fail;
62237 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
62238 - if (!SWIG_IsOK(res1)) {
62239 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_get_area" "', argument " "1"" of type '" "vips::VImage *""'");
62240 - }
62241 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
62242 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
62243 - if (!SWIG_IsOK(res2)) {
62244 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_get_area" "', argument " "2"" of type '" "char const *""'");
62245 - }
62246 - arg2 = reinterpret_cast< char * >(buf2);
62247 - try {
62248 - result = (void *)(arg1)->meta_get_area((char const *)arg2);
62249 - }
62250 - catch(vips::VError &_e) {
62251 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
62252 - }
62253 -
62254 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 );
62255 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62256 - return resultobj;
62257 -fail:
62258 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62259 - return NULL;
62260 -}
62261 -
62262 -
62263 -SWIGINTERN PyObject *_wrap_VImage_meta_get_blob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62264 - PyObject *resultobj = 0;
62265 - vips::VImage *arg1 = (vips::VImage *) 0 ;
62266 - char *arg2 = (char *) 0 ;
62267 - size_t *arg3 = (size_t *) 0 ;
62268 - void *argp1 = 0 ;
62269 - int res1 = 0 ;
62270 - int res2 ;
62271 - char *buf2 = 0 ;
62272 - int alloc2 = 0 ;
62273 - void *argp3 = 0 ;
62274 - int res3 = 0 ;
62275 - PyObject * obj0 = 0 ;
62276 - PyObject * obj1 = 0 ;
62277 - PyObject * obj2 = 0 ;
62278 - void *result = 0 ;
62279 -
62280 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_meta_get_blob",&obj0,&obj1,&obj2)) SWIG_fail;
62281 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
62282 - if (!SWIG_IsOK(res1)) {
62283 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_get_blob" "', argument " "1"" of type '" "vips::VImage *""'");
62284 - }
62285 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
62286 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
62287 - if (!SWIG_IsOK(res2)) {
62288 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_get_blob" "', argument " "2"" of type '" "char const *""'");
62289 - }
62290 - arg2 = reinterpret_cast< char * >(buf2);
62291 - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_size_t, 0 | 0 );
62292 - if (!SWIG_IsOK(res3)) {
62293 - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_meta_get_blob" "', argument " "3"" of type '" "size_t *""'");
62294 - }
62295 - arg3 = reinterpret_cast< size_t * >(argp3);
62296 - try {
62297 - result = (void *)(arg1)->meta_get_blob((char const *)arg2,arg3);
62298 - }
62299 - catch(vips::VError &_e) {
62300 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
62301 - }
62302 -
62303 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 );
62304 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62305 - return resultobj;
62306 -fail:
62307 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62308 - return NULL;
62309 -}
62310 -
62311 -
62312 -SWIGINTERN PyObject *_wrap_VImage_meta_set__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62313 - PyObject *resultobj = 0;
62314 - vips::VImage *arg1 = (vips::VImage *) 0 ;
62315 - char *arg2 = (char *) 0 ;
62316 - int arg3 ;
62317 - void *argp1 = 0 ;
62318 - int res1 = 0 ;
62319 - int res2 ;
62320 - char *buf2 = 0 ;
62321 - int alloc2 = 0 ;
62322 - int val3 ;
62323 - int ecode3 = 0 ;
62324 - PyObject * obj0 = 0 ;
62325 - PyObject * obj1 = 0 ;
62326 - PyObject * obj2 = 0 ;
62327 -
62328 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_meta_set",&obj0,&obj1,&obj2)) SWIG_fail;
62329 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
62330 - if (!SWIG_IsOK(res1)) {
62331 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_set" "', argument " "1"" of type '" "vips::VImage *""'");
62332 - }
62333 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
62334 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
62335 - if (!SWIG_IsOK(res2)) {
62336 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_set" "', argument " "2"" of type '" "char const *""'");
62337 - }
62338 - arg2 = reinterpret_cast< char * >(buf2);
62339 - ecode3 = SWIG_AsVal_int(obj2, &val3);
62340 - if (!SWIG_IsOK(ecode3)) {
62341 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_meta_set" "', argument " "3"" of type '" "int""'");
62342 - }
62343 - arg3 = static_cast< int >(val3);
62344 - try {
62345 - (arg1)->meta_set((char const *)arg2,arg3);
62346 - }
62347 - catch(vips::VError &_e) {
62348 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
62349 - }
62350 -
62351 - resultobj = SWIG_Py_Void();
62352 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62353 - return resultobj;
62354 -fail:
62355 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62356 - return NULL;
62357 -}
62358 -
62359 -
62360 -SWIGINTERN PyObject *_wrap_VImage_meta_set__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62361 - PyObject *resultobj = 0;
62362 - vips::VImage *arg1 = (vips::VImage *) 0 ;
62363 - char *arg2 = (char *) 0 ;
62364 - double arg3 ;
62365 - void *argp1 = 0 ;
62366 - int res1 = 0 ;
62367 - int res2 ;
62368 - char *buf2 = 0 ;
62369 - int alloc2 = 0 ;
62370 - double val3 ;
62371 - int ecode3 = 0 ;
62372 - PyObject * obj0 = 0 ;
62373 - PyObject * obj1 = 0 ;
62374 - PyObject * obj2 = 0 ;
62375 -
62376 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_meta_set",&obj0,&obj1,&obj2)) SWIG_fail;
62377 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
62378 - if (!SWIG_IsOK(res1)) {
62379 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_set" "', argument " "1"" of type '" "vips::VImage *""'");
62380 - }
62381 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
62382 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
62383 - if (!SWIG_IsOK(res2)) {
62384 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_set" "', argument " "2"" of type '" "char const *""'");
62385 - }
62386 - arg2 = reinterpret_cast< char * >(buf2);
62387 - ecode3 = SWIG_AsVal_double(obj2, &val3);
62388 - if (!SWIG_IsOK(ecode3)) {
62389 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_meta_set" "', argument " "3"" of type '" "double""'");
62390 - }
62391 - arg3 = static_cast< double >(val3);
62392 - try {
62393 - (arg1)->meta_set((char const *)arg2,arg3);
62394 - }
62395 - catch(vips::VError &_e) {
62396 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
62397 - }
62398 -
62399 - resultobj = SWIG_Py_Void();
62400 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62401 - return resultobj;
62402 -fail:
62403 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62404 - return NULL;
62405 -}
62406 -
62407 -
62408 -SWIGINTERN PyObject *_wrap_VImage_meta_set__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62409 - PyObject *resultobj = 0;
62410 - vips::VImage *arg1 = (vips::VImage *) 0 ;
62411 - char *arg2 = (char *) 0 ;
62412 - char *arg3 = (char *) 0 ;
62413 - void *argp1 = 0 ;
62414 - int res1 = 0 ;
62415 - int res2 ;
62416 - char *buf2 = 0 ;
62417 - int alloc2 = 0 ;
62418 - int res3 ;
62419 - char *buf3 = 0 ;
62420 - int alloc3 = 0 ;
62421 - PyObject * obj0 = 0 ;
62422 - PyObject * obj1 = 0 ;
62423 - PyObject * obj2 = 0 ;
62424 -
62425 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_meta_set",&obj0,&obj1,&obj2)) SWIG_fail;
62426 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
62427 - if (!SWIG_IsOK(res1)) {
62428 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_set" "', argument " "1"" of type '" "vips::VImage *""'");
62429 - }
62430 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
62431 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
62432 - if (!SWIG_IsOK(res2)) {
62433 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_set" "', argument " "2"" of type '" "char const *""'");
62434 - }
62435 - arg2 = reinterpret_cast< char * >(buf2);
62436 - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
62437 - if (!SWIG_IsOK(res3)) {
62438 - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_meta_set" "', argument " "3"" of type '" "char const *""'");
62439 - }
62440 - arg3 = reinterpret_cast< char * >(buf3);
62441 - try {
62442 - (arg1)->meta_set((char const *)arg2,(char const *)arg3);
62443 - }
62444 - catch(vips::VError &_e) {
62445 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
62446 - }
62447 -
62448 - resultobj = SWIG_Py_Void();
62449 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62450 - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
62451 - return resultobj;
62452 -fail:
62453 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62454 - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
62455 - return NULL;
62456 -}
62457 -
62458 -
62459 -SWIGINTERN PyObject *_wrap_VImage_meta_set(PyObject *self, PyObject *args) {
62460 - int argc;
62461 - PyObject *argv[4];
62462 - int ii;
62463 -
62464 - if (!PyTuple_Check(args)) SWIG_fail;
62465 - argc = args ? (int)PyObject_Length(args) : 0;
62466 - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
62467 - argv[ii] = PyTuple_GET_ITEM(args,ii);
62468 - }
62469 - if (argc == 3) {
62470 - int _v;
62471 - void *vptr = 0;
62472 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
62473 - _v = SWIG_CheckState(res);
62474 - if (_v) {
62475 - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
62476 - _v = SWIG_CheckState(res);
62477 - if (_v) {
62478 - {
62479 - int res = SWIG_AsVal_int(argv[2], NULL);
62480 - _v = SWIG_CheckState(res);
62481 - }
62482 - if (_v) {
62483 - return _wrap_VImage_meta_set__SWIG_0(self, args);
62484 - }
62485 - }
62486 - }
62487 - }
62488 - if (argc == 3) {
62489 - int _v;
62490 - void *vptr = 0;
62491 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
62492 - _v = SWIG_CheckState(res);
62493 - if (_v) {
62494 - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
62495 - _v = SWIG_CheckState(res);
62496 - if (_v) {
62497 - {
62498 - int res = SWIG_AsVal_double(argv[2], NULL);
62499 - _v = SWIG_CheckState(res);
62500 - }
62501 - if (_v) {
62502 - return _wrap_VImage_meta_set__SWIG_1(self, args);
62503 - }
62504 - }
62505 - }
62506 - }
62507 - if (argc == 3) {
62508 - int _v;
62509 - void *vptr = 0;
62510 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
62511 - _v = SWIG_CheckState(res);
62512 - if (_v) {
62513 - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
62514 - _v = SWIG_CheckState(res);
62515 - if (_v) {
62516 - int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
62517 - _v = SWIG_CheckState(res);
62518 - if (_v) {
62519 - return _wrap_VImage_meta_set__SWIG_2(self, args);
62520 - }
62521 - }
62522 - }
62523 - }
62524 -
62525 -fail:
62526 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_meta_set'.\n"
62527 - " Possible C/C++ prototypes are:\n"
62528 - " vips::VImage::meta_set(char const *,int)\n"
62529 - " vips::VImage::meta_set(char const *,double)\n"
62530 - " vips::VImage::meta_set(char const *,char const *)\n");
62531 - return 0;
62532 -}
62533 -
62534 -
62535 -SWIGINTERN PyObject *_wrap_VImage_initdesc__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62536 - PyObject *resultobj = 0;
62537 - vips::VImage *arg1 = (vips::VImage *) 0 ;
62538 - int arg2 ;
62539 - int arg3 ;
62540 - int arg4 ;
62541 - vips::VImage::TBandFmt arg5 ;
62542 - vips::VImage::TCoding arg6 ;
62543 - vips::VImage::TType arg7 ;
62544 - float arg8 ;
62545 - float arg9 ;
62546 - int arg10 ;
62547 - int arg11 ;
62548 - void *argp1 = 0 ;
62549 - int res1 = 0 ;
62550 - int val2 ;
62551 - int ecode2 = 0 ;
62552 - int val3 ;
62553 - int ecode3 = 0 ;
62554 - int val4 ;
62555 - int ecode4 = 0 ;
62556 - int val5 ;
62557 - int ecode5 = 0 ;
62558 - int val6 ;
62559 - int ecode6 = 0 ;
62560 - int val7 ;
62561 - int ecode7 = 0 ;
62562 - float val8 ;
62563 - int ecode8 = 0 ;
62564 - float val9 ;
62565 - int ecode9 = 0 ;
62566 - int val10 ;
62567 - int ecode10 = 0 ;
62568 - int val11 ;
62569 - int ecode11 = 0 ;
62570 - PyObject * obj0 = 0 ;
62571 - PyObject * obj1 = 0 ;
62572 - PyObject * obj2 = 0 ;
62573 - PyObject * obj3 = 0 ;
62574 - PyObject * obj4 = 0 ;
62575 - PyObject * obj5 = 0 ;
62576 - PyObject * obj6 = 0 ;
62577 - PyObject * obj7 = 0 ;
62578 - PyObject * obj8 = 0 ;
62579 - PyObject * obj9 = 0 ;
62580 - PyObject * obj10 = 0 ;
62581 -
62582 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:VImage_initdesc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
62583 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
62584 - if (!SWIG_IsOK(res1)) {
62585 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_initdesc" "', argument " "1"" of type '" "vips::VImage *""'");
62586 - }
62587 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
62588 - ecode2 = SWIG_AsVal_int(obj1, &val2);
62589 - if (!SWIG_IsOK(ecode2)) {
62590 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_initdesc" "', argument " "2"" of type '" "int""'");
62591 - }
62592 - arg2 = static_cast< int >(val2);
62593 - ecode3 = SWIG_AsVal_int(obj2, &val3);
62594 - if (!SWIG_IsOK(ecode3)) {
62595 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_initdesc" "', argument " "3"" of type '" "int""'");
62596 - }
62597 - arg3 = static_cast< int >(val3);
62598 - ecode4 = SWIG_AsVal_int(obj3, &val4);
62599 - if (!SWIG_IsOK(ecode4)) {
62600 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_initdesc" "', argument " "4"" of type '" "int""'");
62601 - }
62602 - arg4 = static_cast< int >(val4);
62603 - ecode5 = SWIG_AsVal_int(obj4, &val5);
62604 - if (!SWIG_IsOK(ecode5)) {
62605 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_initdesc" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'");
62606 - }
62607 - arg5 = static_cast< vips::VImage::TBandFmt >(val5);
62608 - ecode6 = SWIG_AsVal_int(obj5, &val6);
62609 - if (!SWIG_IsOK(ecode6)) {
62610 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_initdesc" "', argument " "6"" of type '" "vips::VImage::TCoding""'");
62611 - }
62612 - arg6 = static_cast< vips::VImage::TCoding >(val6);
62613 - ecode7 = SWIG_AsVal_int(obj6, &val7);
62614 - if (!SWIG_IsOK(ecode7)) {
62615 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_initdesc" "', argument " "7"" of type '" "vips::VImage::TType""'");
62616 - }
62617 - arg7 = static_cast< vips::VImage::TType >(val7);
62618 - ecode8 = SWIG_AsVal_float(obj7, &val8);
62619 - if (!SWIG_IsOK(ecode8)) {
62620 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_initdesc" "', argument " "8"" of type '" "float""'");
62621 - }
62622 - arg8 = static_cast< float >(val8);
62623 - ecode9 = SWIG_AsVal_float(obj8, &val9);
62624 - if (!SWIG_IsOK(ecode9)) {
62625 - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_initdesc" "', argument " "9"" of type '" "float""'");
62626 - }
62627 - arg9 = static_cast< float >(val9);
62628 - ecode10 = SWIG_AsVal_int(obj9, &val10);
62629 - if (!SWIG_IsOK(ecode10)) {
62630 - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_initdesc" "', argument " "10"" of type '" "int""'");
62631 - }
62632 - arg10 = static_cast< int >(val10);
62633 - ecode11 = SWIG_AsVal_int(obj10, &val11);
62634 - if (!SWIG_IsOK(ecode11)) {
62635 - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_initdesc" "', argument " "11"" of type '" "int""'");
62636 - }
62637 - arg11 = static_cast< int >(val11);
62638 - try {
62639 - (arg1)->initdesc(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
62640 - }
62641 - catch(vips::VError &_e) {
62642 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
62643 - }
62644 -
62645 - resultobj = SWIG_Py_Void();
62646 - return resultobj;
62647 -fail:
62648 - return NULL;
62649 -}
62650 -
62651 -
62652 -SWIGINTERN PyObject *_wrap_VImage_initdesc__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62653 - PyObject *resultobj = 0;
62654 - vips::VImage *arg1 = (vips::VImage *) 0 ;
62655 - int arg2 ;
62656 - int arg3 ;
62657 - int arg4 ;
62658 - vips::VImage::TBandFmt arg5 ;
62659 - vips::VImage::TCoding arg6 ;
62660 - vips::VImage::TType arg7 ;
62661 - float arg8 ;
62662 - float arg9 ;
62663 - int arg10 ;
62664 - void *argp1 = 0 ;
62665 - int res1 = 0 ;
62666 - int val2 ;
62667 - int ecode2 = 0 ;
62668 - int val3 ;
62669 - int ecode3 = 0 ;
62670 - int val4 ;
62671 - int ecode4 = 0 ;
62672 - int val5 ;
62673 - int ecode5 = 0 ;
62674 - int val6 ;
62675 - int ecode6 = 0 ;
62676 - int val7 ;
62677 - int ecode7 = 0 ;
62678 - float val8 ;
62679 - int ecode8 = 0 ;
62680 - float val9 ;
62681 - int ecode9 = 0 ;
62682 - int val10 ;
62683 - int ecode10 = 0 ;
62684 - PyObject * obj0 = 0 ;
62685 - PyObject * obj1 = 0 ;
62686 - PyObject * obj2 = 0 ;
62687 - PyObject * obj3 = 0 ;
62688 - PyObject * obj4 = 0 ;
62689 - PyObject * obj5 = 0 ;
62690 - PyObject * obj6 = 0 ;
62691 - PyObject * obj7 = 0 ;
62692 - PyObject * obj8 = 0 ;
62693 - PyObject * obj9 = 0 ;
62694 -
62695 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:VImage_initdesc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
62696 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
62697 - if (!SWIG_IsOK(res1)) {
62698 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_initdesc" "', argument " "1"" of type '" "vips::VImage *""'");
62699 - }
62700 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
62701 - ecode2 = SWIG_AsVal_int(obj1, &val2);
62702 - if (!SWIG_IsOK(ecode2)) {
62703 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_initdesc" "', argument " "2"" of type '" "int""'");
62704 - }
62705 - arg2 = static_cast< int >(val2);
62706 - ecode3 = SWIG_AsVal_int(obj2, &val3);
62707 - if (!SWIG_IsOK(ecode3)) {
62708 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_initdesc" "', argument " "3"" of type '" "int""'");
62709 - }
62710 - arg3 = static_cast< int >(val3);
62711 - ecode4 = SWIG_AsVal_int(obj3, &val4);
62712 - if (!SWIG_IsOK(ecode4)) {
62713 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_initdesc" "', argument " "4"" of type '" "int""'");
62714 - }
62715 - arg4 = static_cast< int >(val4);
62716 - ecode5 = SWIG_AsVal_int(obj4, &val5);
62717 - if (!SWIG_IsOK(ecode5)) {
62718 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_initdesc" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'");
62719 - }
62720 - arg5 = static_cast< vips::VImage::TBandFmt >(val5);
62721 - ecode6 = SWIG_AsVal_int(obj5, &val6);
62722 - if (!SWIG_IsOK(ecode6)) {
62723 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_initdesc" "', argument " "6"" of type '" "vips::VImage::TCoding""'");
62724 - }
62725 - arg6 = static_cast< vips::VImage::TCoding >(val6);
62726 - ecode7 = SWIG_AsVal_int(obj6, &val7);
62727 - if (!SWIG_IsOK(ecode7)) {
62728 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_initdesc" "', argument " "7"" of type '" "vips::VImage::TType""'");
62729 - }
62730 - arg7 = static_cast< vips::VImage::TType >(val7);
62731 - ecode8 = SWIG_AsVal_float(obj7, &val8);
62732 - if (!SWIG_IsOK(ecode8)) {
62733 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_initdesc" "', argument " "8"" of type '" "float""'");
62734 - }
62735 - arg8 = static_cast< float >(val8);
62736 - ecode9 = SWIG_AsVal_float(obj8, &val9);
62737 - if (!SWIG_IsOK(ecode9)) {
62738 - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_initdesc" "', argument " "9"" of type '" "float""'");
62739 - }
62740 - arg9 = static_cast< float >(val9);
62741 - ecode10 = SWIG_AsVal_int(obj9, &val10);
62742 - if (!SWIG_IsOK(ecode10)) {
62743 - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_initdesc" "', argument " "10"" of type '" "int""'");
62744 - }
62745 - arg10 = static_cast< int >(val10);
62746 - try {
62747 - (arg1)->initdesc(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
62748 - }
62749 - catch(vips::VError &_e) {
62750 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
62751 - }
62752 -
62753 - resultobj = SWIG_Py_Void();
62754 - return resultobj;
62755 -fail:
62756 - return NULL;
62757 -}
62758 -
62759 -
62760 -SWIGINTERN PyObject *_wrap_VImage_initdesc__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62761 - PyObject *resultobj = 0;
62762 - vips::VImage *arg1 = (vips::VImage *) 0 ;
62763 - int arg2 ;
62764 - int arg3 ;
62765 - int arg4 ;
62766 - vips::VImage::TBandFmt arg5 ;
62767 - vips::VImage::TCoding arg6 ;
62768 - vips::VImage::TType arg7 ;
62769 - float arg8 ;
62770 - float arg9 ;
62771 - void *argp1 = 0 ;
62772 - int res1 = 0 ;
62773 - int val2 ;
62774 - int ecode2 = 0 ;
62775 - int val3 ;
62776 - int ecode3 = 0 ;
62777 - int val4 ;
62778 - int ecode4 = 0 ;
62779 - int val5 ;
62780 - int ecode5 = 0 ;
62781 - int val6 ;
62782 - int ecode6 = 0 ;
62783 - int val7 ;
62784 - int ecode7 = 0 ;
62785 - float val8 ;
62786 - int ecode8 = 0 ;
62787 - float val9 ;
62788 - int ecode9 = 0 ;
62789 - PyObject * obj0 = 0 ;
62790 - PyObject * obj1 = 0 ;
62791 - PyObject * obj2 = 0 ;
62792 - PyObject * obj3 = 0 ;
62793 - PyObject * obj4 = 0 ;
62794 - PyObject * obj5 = 0 ;
62795 - PyObject * obj6 = 0 ;
62796 - PyObject * obj7 = 0 ;
62797 - PyObject * obj8 = 0 ;
62798 -
62799 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:VImage_initdesc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
62800 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
62801 - if (!SWIG_IsOK(res1)) {
62802 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_initdesc" "', argument " "1"" of type '" "vips::VImage *""'");
62803 - }
62804 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
62805 - ecode2 = SWIG_AsVal_int(obj1, &val2);
62806 - if (!SWIG_IsOK(ecode2)) {
62807 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_initdesc" "', argument " "2"" of type '" "int""'");
62808 - }
62809 - arg2 = static_cast< int >(val2);
62810 - ecode3 = SWIG_AsVal_int(obj2, &val3);
62811 - if (!SWIG_IsOK(ecode3)) {
62812 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_initdesc" "', argument " "3"" of type '" "int""'");
62813 - }
62814 - arg3 = static_cast< int >(val3);
62815 - ecode4 = SWIG_AsVal_int(obj3, &val4);
62816 - if (!SWIG_IsOK(ecode4)) {
62817 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_initdesc" "', argument " "4"" of type '" "int""'");
62818 - }
62819 - arg4 = static_cast< int >(val4);
62820 - ecode5 = SWIG_AsVal_int(obj4, &val5);
62821 - if (!SWIG_IsOK(ecode5)) {
62822 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_initdesc" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'");
62823 - }
62824 - arg5 = static_cast< vips::VImage::TBandFmt >(val5);
62825 - ecode6 = SWIG_AsVal_int(obj5, &val6);
62826 - if (!SWIG_IsOK(ecode6)) {
62827 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_initdesc" "', argument " "6"" of type '" "vips::VImage::TCoding""'");
62828 - }
62829 - arg6 = static_cast< vips::VImage::TCoding >(val6);
62830 - ecode7 = SWIG_AsVal_int(obj6, &val7);
62831 - if (!SWIG_IsOK(ecode7)) {
62832 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_initdesc" "', argument " "7"" of type '" "vips::VImage::TType""'");
62833 - }
62834 - arg7 = static_cast< vips::VImage::TType >(val7);
62835 - ecode8 = SWIG_AsVal_float(obj7, &val8);
62836 - if (!SWIG_IsOK(ecode8)) {
62837 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_initdesc" "', argument " "8"" of type '" "float""'");
62838 - }
62839 - arg8 = static_cast< float >(val8);
62840 - ecode9 = SWIG_AsVal_float(obj8, &val9);
62841 - if (!SWIG_IsOK(ecode9)) {
62842 - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_initdesc" "', argument " "9"" of type '" "float""'");
62843 - }
62844 - arg9 = static_cast< float >(val9);
62845 - try {
62846 - (arg1)->initdesc(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
62847 - }
62848 - catch(vips::VError &_e) {
62849 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
62850 - }
62851 -
62852 - resultobj = SWIG_Py_Void();
62853 - return resultobj;
62854 -fail:
62855 - return NULL;
62856 -}
62857 -
62858 -
62859 -SWIGINTERN PyObject *_wrap_VImage_initdesc__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62860 - PyObject *resultobj = 0;
62861 - vips::VImage *arg1 = (vips::VImage *) 0 ;
62862 - int arg2 ;
62863 - int arg3 ;
62864 - int arg4 ;
62865 - vips::VImage::TBandFmt arg5 ;
62866 - vips::VImage::TCoding arg6 ;
62867 - vips::VImage::TType arg7 ;
62868 - float arg8 ;
62869 - void *argp1 = 0 ;
62870 - int res1 = 0 ;
62871 - int val2 ;
62872 - int ecode2 = 0 ;
62873 - int val3 ;
62874 - int ecode3 = 0 ;
62875 - int val4 ;
62876 - int ecode4 = 0 ;
62877 - int val5 ;
62878 - int ecode5 = 0 ;
62879 - int val6 ;
62880 - int ecode6 = 0 ;
62881 - int val7 ;
62882 - int ecode7 = 0 ;
62883 - float val8 ;
62884 - int ecode8 = 0 ;
62885 - PyObject * obj0 = 0 ;
62886 - PyObject * obj1 = 0 ;
62887 - PyObject * obj2 = 0 ;
62888 - PyObject * obj3 = 0 ;
62889 - PyObject * obj4 = 0 ;
62890 - PyObject * obj5 = 0 ;
62891 - PyObject * obj6 = 0 ;
62892 - PyObject * obj7 = 0 ;
62893 -
62894 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:VImage_initdesc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
62895 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
62896 - if (!SWIG_IsOK(res1)) {
62897 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_initdesc" "', argument " "1"" of type '" "vips::VImage *""'");
62898 - }
62899 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
62900 - ecode2 = SWIG_AsVal_int(obj1, &val2);
62901 - if (!SWIG_IsOK(ecode2)) {
62902 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_initdesc" "', argument " "2"" of type '" "int""'");
62903 - }
62904 - arg2 = static_cast< int >(val2);
62905 - ecode3 = SWIG_AsVal_int(obj2, &val3);
62906 - if (!SWIG_IsOK(ecode3)) {
62907 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_initdesc" "', argument " "3"" of type '" "int""'");
62908 - }
62909 - arg3 = static_cast< int >(val3);
62910 - ecode4 = SWIG_AsVal_int(obj3, &val4);
62911 - if (!SWIG_IsOK(ecode4)) {
62912 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_initdesc" "', argument " "4"" of type '" "int""'");
62913 - }
62914 - arg4 = static_cast< int >(val4);
62915 - ecode5 = SWIG_AsVal_int(obj4, &val5);
62916 - if (!SWIG_IsOK(ecode5)) {
62917 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_initdesc" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'");
62918 - }
62919 - arg5 = static_cast< vips::VImage::TBandFmt >(val5);
62920 - ecode6 = SWIG_AsVal_int(obj5, &val6);
62921 - if (!SWIG_IsOK(ecode6)) {
62922 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_initdesc" "', argument " "6"" of type '" "vips::VImage::TCoding""'");
62923 - }
62924 - arg6 = static_cast< vips::VImage::TCoding >(val6);
62925 - ecode7 = SWIG_AsVal_int(obj6, &val7);
62926 - if (!SWIG_IsOK(ecode7)) {
62927 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_initdesc" "', argument " "7"" of type '" "vips::VImage::TType""'");
62928 - }
62929 - arg7 = static_cast< vips::VImage::TType >(val7);
62930 - ecode8 = SWIG_AsVal_float(obj7, &val8);
62931 - if (!SWIG_IsOK(ecode8)) {
62932 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_initdesc" "', argument " "8"" of type '" "float""'");
62933 - }
62934 - arg8 = static_cast< float >(val8);
62935 - try {
62936 - (arg1)->initdesc(arg2,arg3,arg4,arg5,arg6,arg7,arg8);
62937 - }
62938 - catch(vips::VError &_e) {
62939 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
62940 - }
62941 -
62942 - resultobj = SWIG_Py_Void();
62943 - return resultobj;
62944 -fail:
62945 - return NULL;
62946 -}
62947 -
62948 -
62949 -SWIGINTERN PyObject *_wrap_VImage_initdesc__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62950 - PyObject *resultobj = 0;
62951 - vips::VImage *arg1 = (vips::VImage *) 0 ;
62952 - int arg2 ;
62953 - int arg3 ;
62954 - int arg4 ;
62955 - vips::VImage::TBandFmt arg5 ;
62956 - vips::VImage::TCoding arg6 ;
62957 - vips::VImage::TType arg7 ;
62958 - void *argp1 = 0 ;
62959 - int res1 = 0 ;
62960 - int val2 ;
62961 - int ecode2 = 0 ;
62962 - int val3 ;
62963 - int ecode3 = 0 ;
62964 - int val4 ;
62965 - int ecode4 = 0 ;
62966 - int val5 ;
62967 - int ecode5 = 0 ;
62968 - int val6 ;
62969 - int ecode6 = 0 ;
62970 - int val7 ;
62971 - int ecode7 = 0 ;
62972 - PyObject * obj0 = 0 ;
62973 - PyObject * obj1 = 0 ;
62974 - PyObject * obj2 = 0 ;
62975 - PyObject * obj3 = 0 ;
62976 - PyObject * obj4 = 0 ;
62977 - PyObject * obj5 = 0 ;
62978 - PyObject * obj6 = 0 ;
62979 -
62980 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_initdesc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
62981 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
62982 - if (!SWIG_IsOK(res1)) {
62983 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_initdesc" "', argument " "1"" of type '" "vips::VImage *""'");
62984 - }
62985 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
62986 - ecode2 = SWIG_AsVal_int(obj1, &val2);
62987 - if (!SWIG_IsOK(ecode2)) {
62988 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_initdesc" "', argument " "2"" of type '" "int""'");
62989 - }
62990 - arg2 = static_cast< int >(val2);
62991 - ecode3 = SWIG_AsVal_int(obj2, &val3);
62992 - if (!SWIG_IsOK(ecode3)) {
62993 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_initdesc" "', argument " "3"" of type '" "int""'");
62994 - }
62995 - arg3 = static_cast< int >(val3);
62996 - ecode4 = SWIG_AsVal_int(obj3, &val4);
62997 - if (!SWIG_IsOK(ecode4)) {
62998 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_initdesc" "', argument " "4"" of type '" "int""'");
62999 - }
63000 - arg4 = static_cast< int >(val4);
63001 - ecode5 = SWIG_AsVal_int(obj4, &val5);
63002 - if (!SWIG_IsOK(ecode5)) {
63003 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_initdesc" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'");
63004 - }
63005 - arg5 = static_cast< vips::VImage::TBandFmt >(val5);
63006 - ecode6 = SWIG_AsVal_int(obj5, &val6);
63007 - if (!SWIG_IsOK(ecode6)) {
63008 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_initdesc" "', argument " "6"" of type '" "vips::VImage::TCoding""'");
63009 - }
63010 - arg6 = static_cast< vips::VImage::TCoding >(val6);
63011 - ecode7 = SWIG_AsVal_int(obj6, &val7);
63012 - if (!SWIG_IsOK(ecode7)) {
63013 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_initdesc" "', argument " "7"" of type '" "vips::VImage::TType""'");
63014 - }
63015 - arg7 = static_cast< vips::VImage::TType >(val7);
63016 - try {
63017 - (arg1)->initdesc(arg2,arg3,arg4,arg5,arg6,arg7);
63018 - }
63019 - catch(vips::VError &_e) {
63020 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
63021 - }
63022 -
63023 - resultobj = SWIG_Py_Void();
63024 - return resultobj;
63025 -fail:
63026 - return NULL;
63027 -}
63028 -
63029 -
63030 -SWIGINTERN PyObject *_wrap_VImage_initdesc(PyObject *self, PyObject *args) {
63031 - int argc;
63032 - PyObject *argv[12];
63033 - int ii;
63034 -
63035 - if (!PyTuple_Check(args)) SWIG_fail;
63036 - argc = args ? (int)PyObject_Length(args) : 0;
63037 - for (ii = 0; (ii < 11) && (ii < argc); ii++) {
63038 - argv[ii] = PyTuple_GET_ITEM(args,ii);
63039 - }
63040 - if (argc == 7) {
63041 - int _v;
63042 - void *vptr = 0;
63043 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
63044 - _v = SWIG_CheckState(res);
63045 - if (_v) {
63046 - {
63047 - int res = SWIG_AsVal_int(argv[1], NULL);
63048 - _v = SWIG_CheckState(res);
63049 - }
63050 - if (_v) {
63051 - {
63052 - int res = SWIG_AsVal_int(argv[2], NULL);
63053 - _v = SWIG_CheckState(res);
63054 - }
63055 - if (_v) {
63056 - {
63057 - int res = SWIG_AsVal_int(argv[3], NULL);
63058 - _v = SWIG_CheckState(res);
63059 - }
63060 - if (_v) {
63061 - {
63062 - int res = SWIG_AsVal_int(argv[4], NULL);
63063 - _v = SWIG_CheckState(res);
63064 - }
63065 - if (_v) {
63066 - {
63067 - int res = SWIG_AsVal_int(argv[5], NULL);
63068 - _v = SWIG_CheckState(res);
63069 - }
63070 - if (_v) {
63071 - {
63072 - int res = SWIG_AsVal_int(argv[6], NULL);
63073 - _v = SWIG_CheckState(res);
63074 - }
63075 - if (_v) {
63076 - return _wrap_VImage_initdesc__SWIG_4(self, args);
63077 - }
63078 - }
63079 - }
63080 - }
63081 - }
63082 - }
63083 - }
63084 - }
63085 - if (argc == 8) {
63086 - int _v;
63087 - void *vptr = 0;
63088 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
63089 - _v = SWIG_CheckState(res);
63090 - if (_v) {
63091 - {
63092 - int res = SWIG_AsVal_int(argv[1], NULL);
63093 - _v = SWIG_CheckState(res);
63094 - }
63095 - if (_v) {
63096 - {
63097 - int res = SWIG_AsVal_int(argv[2], NULL);
63098 - _v = SWIG_CheckState(res);
63099 - }
63100 - if (_v) {
63101 - {
63102 - int res = SWIG_AsVal_int(argv[3], NULL);
63103 - _v = SWIG_CheckState(res);
63104 - }
63105 - if (_v) {
63106 - {
63107 - int res = SWIG_AsVal_int(argv[4], NULL);
63108 - _v = SWIG_CheckState(res);
63109 - }
63110 - if (_v) {
63111 - {
63112 - int res = SWIG_AsVal_int(argv[5], NULL);
63113 - _v = SWIG_CheckState(res);
63114 - }
63115 - if (_v) {
63116 - {
63117 - int res = SWIG_AsVal_int(argv[6], NULL);
63118 - _v = SWIG_CheckState(res);
63119 - }
63120 - if (_v) {
63121 - {
63122 - int res = SWIG_AsVal_float(argv[7], NULL);
63123 - _v = SWIG_CheckState(res);
63124 - }
63125 - if (_v) {
63126 - return _wrap_VImage_initdesc__SWIG_3(self, args);
63127 - }
63128 - }
63129 - }
63130 - }
63131 - }
63132 - }
63133 - }
63134 - }
63135 - }
63136 - if (argc == 9) {
63137 - int _v;
63138 - void *vptr = 0;
63139 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
63140 - _v = SWIG_CheckState(res);
63141 - if (_v) {
63142 - {
63143 - int res = SWIG_AsVal_int(argv[1], NULL);
63144 - _v = SWIG_CheckState(res);
63145 - }
63146 - if (_v) {
63147 - {
63148 - int res = SWIG_AsVal_int(argv[2], NULL);
63149 - _v = SWIG_CheckState(res);
63150 - }
63151 - if (_v) {
63152 - {
63153 - int res = SWIG_AsVal_int(argv[3], NULL);
63154 - _v = SWIG_CheckState(res);
63155 - }
63156 - if (_v) {
63157 - {
63158 - int res = SWIG_AsVal_int(argv[4], NULL);
63159 - _v = SWIG_CheckState(res);
63160 - }
63161 - if (_v) {
63162 - {
63163 - int res = SWIG_AsVal_int(argv[5], NULL);
63164 - _v = SWIG_CheckState(res);
63165 - }
63166 - if (_v) {
63167 - {
63168 - int res = SWIG_AsVal_int(argv[6], NULL);
63169 - _v = SWIG_CheckState(res);
63170 - }
63171 - if (_v) {
63172 - {
63173 - int res = SWIG_AsVal_float(argv[7], NULL);
63174 - _v = SWIG_CheckState(res);
63175 - }
63176 - if (_v) {
63177 - {
63178 - int res = SWIG_AsVal_float(argv[8], NULL);
63179 - _v = SWIG_CheckState(res);
63180 - }
63181 - if (_v) {
63182 - return _wrap_VImage_initdesc__SWIG_2(self, args);
63183 - }
63184 - }
63185 - }
63186 - }
63187 - }
63188 - }
63189 - }
63190 - }
63191 - }
63192 - }
63193 - if (argc == 10) {
63194 - int _v;
63195 - void *vptr = 0;
63196 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
63197 - _v = SWIG_CheckState(res);
63198 - if (_v) {
63199 - {
63200 - int res = SWIG_AsVal_int(argv[1], NULL);
63201 - _v = SWIG_CheckState(res);
63202 - }
63203 - if (_v) {
63204 - {
63205 - int res = SWIG_AsVal_int(argv[2], NULL);
63206 - _v = SWIG_CheckState(res);
63207 - }
63208 - if (_v) {
63209 - {
63210 - int res = SWIG_AsVal_int(argv[3], NULL);
63211 - _v = SWIG_CheckState(res);
63212 - }
63213 - if (_v) {
63214 - {
63215 - int res = SWIG_AsVal_int(argv[4], NULL);
63216 - _v = SWIG_CheckState(res);
63217 - }
63218 - if (_v) {
63219 - {
63220 - int res = SWIG_AsVal_int(argv[5], NULL);
63221 - _v = SWIG_CheckState(res);
63222 - }
63223 - if (_v) {
63224 - {
63225 - int res = SWIG_AsVal_int(argv[6], NULL);
63226 - _v = SWIG_CheckState(res);
63227 - }
63228 - if (_v) {
63229 - {
63230 - int res = SWIG_AsVal_float(argv[7], NULL);
63231 - _v = SWIG_CheckState(res);
63232 - }
63233 - if (_v) {
63234 - {
63235 - int res = SWIG_AsVal_float(argv[8], NULL);
63236 - _v = SWIG_CheckState(res);
63237 - }
63238 - if (_v) {
63239 - {
63240 - int res = SWIG_AsVal_int(argv[9], NULL);
63241 - _v = SWIG_CheckState(res);
63242 - }
63243 - if (_v) {
63244 - return _wrap_VImage_initdesc__SWIG_1(self, args);
63245 - }
63246 - }
63247 - }
63248 - }
63249 - }
63250 - }
63251 - }
63252 - }
63253 - }
63254 - }
63255 - }
63256 - if (argc == 11) {
63257 - int _v;
63258 - void *vptr = 0;
63259 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
63260 - _v = SWIG_CheckState(res);
63261 - if (_v) {
63262 - {
63263 - int res = SWIG_AsVal_int(argv[1], NULL);
63264 - _v = SWIG_CheckState(res);
63265 - }
63266 - if (_v) {
63267 - {
63268 - int res = SWIG_AsVal_int(argv[2], NULL);
63269 - _v = SWIG_CheckState(res);
63270 - }
63271 - if (_v) {
63272 - {
63273 - int res = SWIG_AsVal_int(argv[3], NULL);
63274 - _v = SWIG_CheckState(res);
63275 - }
63276 - if (_v) {
63277 - {
63278 - int res = SWIG_AsVal_int(argv[4], NULL);
63279 - _v = SWIG_CheckState(res);
63280 - }
63281 - if (_v) {
63282 - {
63283 - int res = SWIG_AsVal_int(argv[5], NULL);
63284 - _v = SWIG_CheckState(res);
63285 - }
63286 - if (_v) {
63287 - {
63288 - int res = SWIG_AsVal_int(argv[6], NULL);
63289 - _v = SWIG_CheckState(res);
63290 - }
63291 - if (_v) {
63292 - {
63293 - int res = SWIG_AsVal_float(argv[7], NULL);
63294 - _v = SWIG_CheckState(res);
63295 - }
63296 - if (_v) {
63297 - {
63298 - int res = SWIG_AsVal_float(argv[8], NULL);
63299 - _v = SWIG_CheckState(res);
63300 - }
63301 - if (_v) {
63302 - {
63303 - int res = SWIG_AsVal_int(argv[9], NULL);
63304 - _v = SWIG_CheckState(res);
63305 - }
63306 - if (_v) {
63307 - {
63308 - int res = SWIG_AsVal_int(argv[10], NULL);
63309 - _v = SWIG_CheckState(res);
63310 - }
63311 - if (_v) {
63312 - return _wrap_VImage_initdesc__SWIG_0(self, args);
63313 - }
63314 - }
63315 - }
63316 - }
63317 - }
63318 - }
63319 - }
63320 - }
63321 - }
63322 - }
63323 - }
63324 - }
63325 -
63326 -fail:
63327 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_initdesc'.\n"
63328 - " Possible C/C++ prototypes are:\n"
63329 - " vips::VImage::initdesc(int,int,int,vips::VImage::TBandFmt,vips::VImage::TCoding,vips::VImage::TType,float,float,int,int)\n"
63330 - " vips::VImage::initdesc(int,int,int,vips::VImage::TBandFmt,vips::VImage::TCoding,vips::VImage::TType,float,float,int)\n"
63331 - " vips::VImage::initdesc(int,int,int,vips::VImage::TBandFmt,vips::VImage::TCoding,vips::VImage::TType,float,float)\n"
63332 - " vips::VImage::initdesc(int,int,int,vips::VImage::TBandFmt,vips::VImage::TCoding,vips::VImage::TType,float)\n"
63333 - " vips::VImage::initdesc(int,int,int,vips::VImage::TBandFmt,vips::VImage::TCoding,vips::VImage::TType)\n");
63334 - return 0;
63335 -}
63336 -
63337 -
63338 -SWIGINTERN PyObject *_wrap_VImage_abs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63339 - PyObject *resultobj = 0;
63340 - vips::VImage *arg1 = (vips::VImage *) 0 ;
63341 - void *argp1 = 0 ;
63342 - int res1 = 0 ;
63343 - PyObject * obj0 = 0 ;
63344 - vips::VImage result;
63345 -
63346 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_abs",&obj0)) SWIG_fail;
63347 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
63348 - if (!SWIG_IsOK(res1)) {
63349 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_abs" "', argument " "1"" of type '" "vips::VImage *""'");
63350 - }
63351 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
63352 - try {
63353 - result = (arg1)->abs();
63354 - }
63355 - catch(vips::VError &_e) {
63356 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
63357 - }
63358 -
63359 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
63360 - return resultobj;
63361 -fail:
63362 - return NULL;
63363 -}
63364 -
63365 -
63366 -SWIGINTERN PyObject *_wrap_VImage_acos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63367 - PyObject *resultobj = 0;
63368 - vips::VImage *arg1 = (vips::VImage *) 0 ;
63369 - void *argp1 = 0 ;
63370 - int res1 = 0 ;
63371 - PyObject * obj0 = 0 ;
63372 - vips::VImage result;
63373 -
63374 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_acos",&obj0)) SWIG_fail;
63375 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
63376 - if (!SWIG_IsOK(res1)) {
63377 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_acos" "', argument " "1"" of type '" "vips::VImage *""'");
63378 - }
63379 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
63380 - try {
63381 - result = (arg1)->acos();
63382 - }
63383 - catch(vips::VError &_e) {
63384 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
63385 - }
63386 -
63387 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
63388 - return resultobj;
63389 -fail:
63390 - return NULL;
63391 -}
63392 -
63393 -
63394 -SWIGINTERN PyObject *_wrap_VImage_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63395 - PyObject *resultobj = 0;
63396 - vips::VImage *arg1 = (vips::VImage *) 0 ;
63397 - vips::VImage arg2 ;
63398 - void *argp1 = 0 ;
63399 - int res1 = 0 ;
63400 - void *argp2 ;
63401 - int res2 = 0 ;
63402 - PyObject * obj0 = 0 ;
63403 - PyObject * obj1 = 0 ;
63404 - vips::VImage result;
63405 -
63406 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_add",&obj0,&obj1)) SWIG_fail;
63407 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
63408 - if (!SWIG_IsOK(res1)) {
63409 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_add" "', argument " "1"" of type '" "vips::VImage *""'");
63410 - }
63411 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
63412 - {
63413 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
63414 - if (!SWIG_IsOK(res2)) {
63415 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_add" "', argument " "2"" of type '" "vips::VImage""'");
63416 - }
63417 - if (!argp2) {
63418 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_add" "', argument " "2"" of type '" "vips::VImage""'");
63419 - } else {
63420 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
63421 - arg2 = *temp;
63422 - if (SWIG_IsNewObj(res2)) delete temp;
63423 - }
63424 - }
63425 - try {
63426 - result = (arg1)->add(arg2);
63427 - }
63428 - catch(vips::VError &_e) {
63429 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
63430 - }
63431 -
63432 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
63433 - return resultobj;
63434 -fail:
63435 - return NULL;
63436 -}
63437 -
63438 -
63439 -SWIGINTERN PyObject *_wrap_VImage_asin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63440 - PyObject *resultobj = 0;
63441 - vips::VImage *arg1 = (vips::VImage *) 0 ;
63442 - void *argp1 = 0 ;
63443 - int res1 = 0 ;
63444 - PyObject * obj0 = 0 ;
63445 - vips::VImage result;
63446 -
63447 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_asin",&obj0)) SWIG_fail;
63448 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
63449 - if (!SWIG_IsOK(res1)) {
63450 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_asin" "', argument " "1"" of type '" "vips::VImage *""'");
63451 - }
63452 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
63453 - try {
63454 - result = (arg1)->asin();
63455 - }
63456 - catch(vips::VError &_e) {
63457 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
63458 - }
63459 -
63460 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
63461 - return resultobj;
63462 -fail:
63463 - return NULL;
63464 -}
63465 -
63466 -
63467 -SWIGINTERN PyObject *_wrap_VImage_atan(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63468 - PyObject *resultobj = 0;
63469 - vips::VImage *arg1 = (vips::VImage *) 0 ;
63470 - void *argp1 = 0 ;
63471 - int res1 = 0 ;
63472 - PyObject * obj0 = 0 ;
63473 - vips::VImage result;
63474 -
63475 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_atan",&obj0)) SWIG_fail;
63476 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
63477 - if (!SWIG_IsOK(res1)) {
63478 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_atan" "', argument " "1"" of type '" "vips::VImage *""'");
63479 - }
63480 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
63481 - try {
63482 - result = (arg1)->atan();
63483 - }
63484 - catch(vips::VError &_e) {
63485 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
63486 - }
63487 -
63488 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
63489 - return resultobj;
63490 -fail:
63491 - return NULL;
63492 -}
63493 -
63494 -
63495 -SWIGINTERN PyObject *_wrap_VImage_avg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63496 - PyObject *resultobj = 0;
63497 - vips::VImage *arg1 = (vips::VImage *) 0 ;
63498 - void *argp1 = 0 ;
63499 - int res1 = 0 ;
63500 - PyObject * obj0 = 0 ;
63501 - double result;
63502 -
63503 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_avg",&obj0)) SWIG_fail;
63504 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
63505 - if (!SWIG_IsOK(res1)) {
63506 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_avg" "', argument " "1"" of type '" "vips::VImage *""'");
63507 - }
63508 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
63509 - try {
63510 - result = (double)(arg1)->avg();
63511 - }
63512 - catch(vips::VError &_e) {
63513 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
63514 - }
63515 -
63516 - resultobj = SWIG_From_double(static_cast< double >(result));
63517 - return resultobj;
63518 -fail:
63519 - return NULL;
63520 -}
63521 -
63522 -
63523 -SWIGINTERN PyObject *_wrap_VImage_point(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63524 - PyObject *resultobj = 0;
63525 - vips::VImage *arg1 = (vips::VImage *) 0 ;
63526 - char *arg2 = (char *) 0 ;
63527 - double arg3 ;
63528 - double arg4 ;
63529 - int arg5 ;
63530 - void *argp1 = 0 ;
63531 - int res1 = 0 ;
63532 - int res2 ;
63533 - char *buf2 = 0 ;
63534 - int alloc2 = 0 ;
63535 - double val3 ;
63536 - int ecode3 = 0 ;
63537 - double val4 ;
63538 - int ecode4 = 0 ;
63539 - int val5 ;
63540 - int ecode5 = 0 ;
63541 - PyObject * obj0 = 0 ;
63542 - PyObject * obj1 = 0 ;
63543 - PyObject * obj2 = 0 ;
63544 - PyObject * obj3 = 0 ;
63545 - PyObject * obj4 = 0 ;
63546 - double result;
63547 -
63548 - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_point",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
63549 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
63550 - if (!SWIG_IsOK(res1)) {
63551 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_point" "', argument " "1"" of type '" "vips::VImage *""'");
63552 - }
63553 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
63554 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
63555 - if (!SWIG_IsOK(res2)) {
63556 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_point" "', argument " "2"" of type '" "char *""'");
63557 - }
63558 - arg2 = reinterpret_cast< char * >(buf2);
63559 - ecode3 = SWIG_AsVal_double(obj2, &val3);
63560 - if (!SWIG_IsOK(ecode3)) {
63561 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_point" "', argument " "3"" of type '" "double""'");
63562 - }
63563 - arg3 = static_cast< double >(val3);
63564 - ecode4 = SWIG_AsVal_double(obj3, &val4);
63565 - if (!SWIG_IsOK(ecode4)) {
63566 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_point" "', argument " "4"" of type '" "double""'");
63567 - }
63568 - arg4 = static_cast< double >(val4);
63569 - ecode5 = SWIG_AsVal_int(obj4, &val5);
63570 - if (!SWIG_IsOK(ecode5)) {
63571 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_point" "', argument " "5"" of type '" "int""'");
63572 - }
63573 - arg5 = static_cast< int >(val5);
63574 - try {
63575 - result = (double)(arg1)->point(arg2,arg3,arg4,arg5);
63576 - }
63577 - catch(vips::VError &_e) {
63578 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
63579 - }
63580 -
63581 - resultobj = SWIG_From_double(static_cast< double >(result));
63582 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
63583 - return resultobj;
63584 -fail:
63585 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
63586 - return NULL;
63587 -}
63588 -
63589 -
63590 -SWIGINTERN PyObject *_wrap_VImage_point_bilinear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63591 - PyObject *resultobj = 0;
63592 - vips::VImage *arg1 = (vips::VImage *) 0 ;
63593 - double arg2 ;
63594 - double arg3 ;
63595 - int arg4 ;
63596 - void *argp1 = 0 ;
63597 - int res1 = 0 ;
63598 - double val2 ;
63599 - int ecode2 = 0 ;
63600 - double val3 ;
63601 - int ecode3 = 0 ;
63602 - int val4 ;
63603 - int ecode4 = 0 ;
63604 - PyObject * obj0 = 0 ;
63605 - PyObject * obj1 = 0 ;
63606 - PyObject * obj2 = 0 ;
63607 - PyObject * obj3 = 0 ;
63608 - double result;
63609 -
63610 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_point_bilinear",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
63611 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
63612 - if (!SWIG_IsOK(res1)) {
63613 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_point_bilinear" "', argument " "1"" of type '" "vips::VImage *""'");
63614 - }
63615 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
63616 - ecode2 = SWIG_AsVal_double(obj1, &val2);
63617 - if (!SWIG_IsOK(ecode2)) {
63618 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_point_bilinear" "', argument " "2"" of type '" "double""'");
63619 - }
63620 - arg2 = static_cast< double >(val2);
63621 - ecode3 = SWIG_AsVal_double(obj2, &val3);
63622 - if (!SWIG_IsOK(ecode3)) {
63623 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_point_bilinear" "', argument " "3"" of type '" "double""'");
63624 - }
63625 - arg3 = static_cast< double >(val3);
63626 - ecode4 = SWIG_AsVal_int(obj3, &val4);
63627 - if (!SWIG_IsOK(ecode4)) {
63628 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_point_bilinear" "', argument " "4"" of type '" "int""'");
63629 - }
63630 - arg4 = static_cast< int >(val4);
63631 - try {
63632 - result = (double)(arg1)->point_bilinear(arg2,arg3,arg4);
63633 - }
63634 - catch(vips::VError &_e) {
63635 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
63636 - }
63637 -
63638 - resultobj = SWIG_From_double(static_cast< double >(result));
63639 - return resultobj;
63640 -fail:
63641 - return NULL;
63642 -}
63643 -
63644 -
63645 -SWIGINTERN PyObject *_wrap_VImage_bandmean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63646 - PyObject *resultobj = 0;
63647 - vips::VImage *arg1 = (vips::VImage *) 0 ;
63648 - void *argp1 = 0 ;
63649 - int res1 = 0 ;
63650 - PyObject * obj0 = 0 ;
63651 - vips::VImage result;
63652 -
63653 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_bandmean",&obj0)) SWIG_fail;
63654 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
63655 - if (!SWIG_IsOK(res1)) {
63656 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_bandmean" "', argument " "1"" of type '" "vips::VImage *""'");
63657 - }
63658 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
63659 - try {
63660 - result = (arg1)->bandmean();
63661 - }
63662 - catch(vips::VError &_e) {
63663 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
63664 - }
63665 -
63666 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
63667 - return resultobj;
63668 -fail:
63669 - return NULL;
63670 -}
63671 -
63672 -
63673 -SWIGINTERN PyObject *_wrap_VImage_ceil(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63674 - PyObject *resultobj = 0;
63675 - vips::VImage *arg1 = (vips::VImage *) 0 ;
63676 - void *argp1 = 0 ;
63677 - int res1 = 0 ;
63678 - PyObject * obj0 = 0 ;
63679 - vips::VImage result;
63680 -
63681 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_ceil",&obj0)) SWIG_fail;
63682 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
63683 - if (!SWIG_IsOK(res1)) {
63684 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_ceil" "', argument " "1"" of type '" "vips::VImage *""'");
63685 - }
63686 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
63687 - try {
63688 - result = (arg1)->ceil();
63689 - }
63690 - catch(vips::VError &_e) {
63691 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
63692 - }
63693 -
63694 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
63695 - return resultobj;
63696 -fail:
63697 - return NULL;
63698 -}
63699 -
63700 -
63701 -SWIGINTERN PyObject *_wrap_VImage_cos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63702 - PyObject *resultobj = 0;
63703 - vips::VImage *arg1 = (vips::VImage *) 0 ;
63704 - void *argp1 = 0 ;
63705 - int res1 = 0 ;
63706 - PyObject * obj0 = 0 ;
63707 - vips::VImage result;
63708 -
63709 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_cos",&obj0)) SWIG_fail;
63710 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
63711 - if (!SWIG_IsOK(res1)) {
63712 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_cos" "', argument " "1"" of type '" "vips::VImage *""'");
63713 - }
63714 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
63715 - try {
63716 - result = (arg1)->cos();
63717 - }
63718 - catch(vips::VError &_e) {
63719 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
63720 - }
63721 -
63722 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
63723 - return resultobj;
63724 -fail:
63725 - return NULL;
63726 -}
63727 -
63728 -
63729 -SWIGINTERN PyObject *_wrap_VImage_cross_phase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63730 - PyObject *resultobj = 0;
63731 - vips::VImage *arg1 = (vips::VImage *) 0 ;
63732 - vips::VImage arg2 ;
63733 - void *argp1 = 0 ;
63734 - int res1 = 0 ;
63735 - void *argp2 ;
63736 - int res2 = 0 ;
63737 - PyObject * obj0 = 0 ;
63738 - PyObject * obj1 = 0 ;
63739 - vips::VImage result;
63740 -
63741 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_cross_phase",&obj0,&obj1)) SWIG_fail;
63742 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
63743 - if (!SWIG_IsOK(res1)) {
63744 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_cross_phase" "', argument " "1"" of type '" "vips::VImage *""'");
63745 - }
63746 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
63747 - {
63748 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
63749 - if (!SWIG_IsOK(res2)) {
63750 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_cross_phase" "', argument " "2"" of type '" "vips::VImage""'");
63751 - }
63752 - if (!argp2) {
63753 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_cross_phase" "', argument " "2"" of type '" "vips::VImage""'");
63754 - } else {
63755 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
63756 - arg2 = *temp;
63757 - if (SWIG_IsNewObj(res2)) delete temp;
63758 - }
63759 - }
63760 - try {
63761 - result = (arg1)->cross_phase(arg2);
63762 - }
63763 - catch(vips::VError &_e) {
63764 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
63765 - }
63766 -
63767 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
63768 - return resultobj;
63769 -fail:
63770 - return NULL;
63771 -}
63772 -
63773 -
63774 -SWIGINTERN PyObject *_wrap_VImage_deviate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63775 - PyObject *resultobj = 0;
63776 - vips::VImage *arg1 = (vips::VImage *) 0 ;
63777 - void *argp1 = 0 ;
63778 - int res1 = 0 ;
63779 - PyObject * obj0 = 0 ;
63780 - double result;
63781 -
63782 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_deviate",&obj0)) SWIG_fail;
63783 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
63784 - if (!SWIG_IsOK(res1)) {
63785 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_deviate" "', argument " "1"" of type '" "vips::VImage *""'");
63786 - }
63787 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
63788 - try {
63789 - result = (double)(arg1)->deviate();
63790 - }
63791 - catch(vips::VError &_e) {
63792 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
63793 - }
63794 -
63795 - resultobj = SWIG_From_double(static_cast< double >(result));
63796 - return resultobj;
63797 -fail:
63798 - return NULL;
63799 -}
63800 -
63801 -
63802 -SWIGINTERN PyObject *_wrap_VImage_divide(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63803 - PyObject *resultobj = 0;
63804 - vips::VImage *arg1 = (vips::VImage *) 0 ;
63805 - vips::VImage arg2 ;
63806 - void *argp1 = 0 ;
63807 - int res1 = 0 ;
63808 - void *argp2 ;
63809 - int res2 = 0 ;
63810 - PyObject * obj0 = 0 ;
63811 - PyObject * obj1 = 0 ;
63812 - vips::VImage result;
63813 -
63814 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_divide",&obj0,&obj1)) SWIG_fail;
63815 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
63816 - if (!SWIG_IsOK(res1)) {
63817 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_divide" "', argument " "1"" of type '" "vips::VImage *""'");
63818 - }
63819 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
63820 - {
63821 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
63822 - if (!SWIG_IsOK(res2)) {
63823 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_divide" "', argument " "2"" of type '" "vips::VImage""'");
63824 - }
63825 - if (!argp2) {
63826 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_divide" "', argument " "2"" of type '" "vips::VImage""'");
63827 - } else {
63828 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
63829 - arg2 = *temp;
63830 - if (SWIG_IsNewObj(res2)) delete temp;
63831 - }
63832 - }
63833 - try {
63834 - result = (arg1)->divide(arg2);
63835 - }
63836 - catch(vips::VError &_e) {
63837 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
63838 - }
63839 -
63840 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
63841 - return resultobj;
63842 -fail:
63843 - return NULL;
63844 -}
63845 -
63846 -
63847 -SWIGINTERN PyObject *_wrap_VImage_exp10(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63848 - PyObject *resultobj = 0;
63849 - vips::VImage *arg1 = (vips::VImage *) 0 ;
63850 - void *argp1 = 0 ;
63851 - int res1 = 0 ;
63852 - PyObject * obj0 = 0 ;
63853 - vips::VImage result;
63854 -
63855 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_exp10",&obj0)) SWIG_fail;
63856 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
63857 - if (!SWIG_IsOK(res1)) {
63858 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_exp10" "', argument " "1"" of type '" "vips::VImage *""'");
63859 - }
63860 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
63861 - try {
63862 - result = (arg1)->exp10();
63863 - }
63864 - catch(vips::VError &_e) {
63865 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
63866 - }
63867 -
63868 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
63869 - return resultobj;
63870 -fail:
63871 - return NULL;
63872 -}
63873 -
63874 -
63875 -SWIGINTERN PyObject *_wrap_VImage_expn__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63876 - PyObject *resultobj = 0;
63877 - vips::VImage *arg1 = (vips::VImage *) 0 ;
63878 - double arg2 ;
63879 - void *argp1 = 0 ;
63880 - int res1 = 0 ;
63881 - double val2 ;
63882 - int ecode2 = 0 ;
63883 - PyObject * obj0 = 0 ;
63884 - PyObject * obj1 = 0 ;
63885 - vips::VImage result;
63886 -
63887 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_expn",&obj0,&obj1)) SWIG_fail;
63888 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
63889 - if (!SWIG_IsOK(res1)) {
63890 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_expn" "', argument " "1"" of type '" "vips::VImage *""'");
63891 - }
63892 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
63893 - ecode2 = SWIG_AsVal_double(obj1, &val2);
63894 - if (!SWIG_IsOK(ecode2)) {
63895 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_expn" "', argument " "2"" of type '" "double""'");
63896 - }
63897 - arg2 = static_cast< double >(val2);
63898 - try {
63899 - result = (arg1)->expn(arg2);
63900 - }
63901 - catch(vips::VError &_e) {
63902 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
63903 - }
63904 -
63905 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
63906 - return resultobj;
63907 -fail:
63908 - return NULL;
63909 -}
63910 -
63911 -
63912 -SWIGINTERN PyObject *_wrap_VImage_expn__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63913 - PyObject *resultobj = 0;
63914 - vips::VImage *arg1 = (vips::VImage *) 0 ;
63915 - std::vector< double,std::allocator< double > > arg2 ;
63916 - void *argp1 = 0 ;
63917 - int res1 = 0 ;
63918 - PyObject * obj0 = 0 ;
63919 - PyObject * obj1 = 0 ;
63920 - vips::VImage result;
63921 -
63922 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_expn",&obj0,&obj1)) SWIG_fail;
63923 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
63924 - if (!SWIG_IsOK(res1)) {
63925 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_expn" "', argument " "1"" of type '" "vips::VImage *""'");
63926 - }
63927 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
63928 - {
63929 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
63930 - int res = swig::asptr(obj1, &ptr);
63931 - if (!SWIG_IsOK(res) || !ptr) {
63932 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_expn" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
63933 - }
63934 - arg2 = *ptr;
63935 - if (SWIG_IsNewObj(res)) delete ptr;
63936 - }
63937 - try {
63938 - result = (arg1)->expn(arg2);
63939 - }
63940 - catch(vips::VError &_e) {
63941 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
63942 - }
63943 -
63944 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
63945 - return resultobj;
63946 -fail:
63947 - return NULL;
63948 -}
63949 -
63950 -
63951 -SWIGINTERN PyObject *_wrap_VImage_expn(PyObject *self, PyObject *args) {
63952 - int argc;
63953 - PyObject *argv[3];
63954 - int ii;
63955 -
63956 - if (!PyTuple_Check(args)) SWIG_fail;
63957 - argc = args ? (int)PyObject_Length(args) : 0;
63958 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
63959 - argv[ii] = PyTuple_GET_ITEM(args,ii);
63960 - }
63961 - if (argc == 2) {
63962 - int _v;
63963 - void *vptr = 0;
63964 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
63965 - _v = SWIG_CheckState(res);
63966 - if (_v) {
63967 - {
63968 - int res = SWIG_AsVal_double(argv[1], NULL);
63969 - _v = SWIG_CheckState(res);
63970 - }
63971 - if (_v) {
63972 - return _wrap_VImage_expn__SWIG_0(self, args);
63973 - }
63974 - }
63975 - }
63976 - if (argc == 2) {
63977 - int _v;
63978 - void *vptr = 0;
63979 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
63980 - _v = SWIG_CheckState(res);
63981 - if (_v) {
63982 - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
63983 - _v = SWIG_CheckState(res);
63984 - if (_v) {
63985 - return _wrap_VImage_expn__SWIG_1(self, args);
63986 - }
63987 - }
63988 - }
63989 -
63990 -fail:
63991 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_expn'.\n"
63992 - " Possible C/C++ prototypes are:\n"
63993 - " vips::VImage::expn(double)\n"
63994 - " vips::VImage::expn(std::vector< double,std::allocator< double > >)\n");
63995 - return 0;
63996 -}
63997 -
63998 -
63999 -SWIGINTERN PyObject *_wrap_VImage_exp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64000 - PyObject *resultobj = 0;
64001 - vips::VImage *arg1 = (vips::VImage *) 0 ;
64002 - void *argp1 = 0 ;
64003 - int res1 = 0 ;
64004 - PyObject * obj0 = 0 ;
64005 - vips::VImage result;
64006 -
64007 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_exp",&obj0)) SWIG_fail;
64008 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
64009 - if (!SWIG_IsOK(res1)) {
64010 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_exp" "', argument " "1"" of type '" "vips::VImage *""'");
64011 - }
64012 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
64013 - try {
64014 - result = (arg1)->exp();
64015 - }
64016 - catch(vips::VError &_e) {
64017 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64018 - }
64019 -
64020 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
64021 - return resultobj;
64022 -fail:
64023 - return NULL;
64024 -}
64025 -
64026 -
64027 -SWIGINTERN PyObject *_wrap_VImage_floor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64028 - PyObject *resultobj = 0;
64029 - vips::VImage *arg1 = (vips::VImage *) 0 ;
64030 - void *argp1 = 0 ;
64031 - int res1 = 0 ;
64032 - PyObject * obj0 = 0 ;
64033 - vips::VImage result;
64034 -
64035 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_floor",&obj0)) SWIG_fail;
64036 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
64037 - if (!SWIG_IsOK(res1)) {
64038 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_floor" "', argument " "1"" of type '" "vips::VImage *""'");
64039 - }
64040 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
64041 - try {
64042 - result = (arg1)->floor();
64043 - }
64044 - catch(vips::VError &_e) {
64045 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64046 - }
64047 -
64048 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
64049 - return resultobj;
64050 -fail:
64051 - return NULL;
64052 -}
64053 -
64054 -
64055 -SWIGINTERN PyObject *_wrap_VImage_invert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64056 - PyObject *resultobj = 0;
64057 - vips::VImage *arg1 = (vips::VImage *) 0 ;
64058 - void *argp1 = 0 ;
64059 - int res1 = 0 ;
64060 - PyObject * obj0 = 0 ;
64061 - vips::VImage result;
64062 -
64063 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_invert",&obj0)) SWIG_fail;
64064 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
64065 - if (!SWIG_IsOK(res1)) {
64066 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_invert" "', argument " "1"" of type '" "vips::VImage *""'");
64067 - }
64068 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
64069 - try {
64070 - result = (arg1)->invert();
64071 - }
64072 - catch(vips::VError &_e) {
64073 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64074 - }
64075 -
64076 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
64077 - return resultobj;
64078 -fail:
64079 - return NULL;
64080 -}
64081 -
64082 -
64083 -SWIGINTERN PyObject *_wrap_VImage_lin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64084 - PyObject *resultobj = 0;
64085 - vips::VImage *arg1 = (vips::VImage *) 0 ;
64086 - double arg2 ;
64087 - double arg3 ;
64088 - void *argp1 = 0 ;
64089 - int res1 = 0 ;
64090 - double val2 ;
64091 - int ecode2 = 0 ;
64092 - double val3 ;
64093 - int ecode3 = 0 ;
64094 - PyObject * obj0 = 0 ;
64095 - PyObject * obj1 = 0 ;
64096 - PyObject * obj2 = 0 ;
64097 - vips::VImage result;
64098 -
64099 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_lin",&obj0,&obj1,&obj2)) SWIG_fail;
64100 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
64101 - if (!SWIG_IsOK(res1)) {
64102 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lin" "', argument " "1"" of type '" "vips::VImage *""'");
64103 - }
64104 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
64105 - ecode2 = SWIG_AsVal_double(obj1, &val2);
64106 - if (!SWIG_IsOK(ecode2)) {
64107 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_lin" "', argument " "2"" of type '" "double""'");
64108 - }
64109 - arg2 = static_cast< double >(val2);
64110 - ecode3 = SWIG_AsVal_double(obj2, &val3);
64111 - if (!SWIG_IsOK(ecode3)) {
64112 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lin" "', argument " "3"" of type '" "double""'");
64113 - }
64114 - arg3 = static_cast< double >(val3);
64115 - try {
64116 - result = (arg1)->lin(arg2,arg3);
64117 - }
64118 - catch(vips::VError &_e) {
64119 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64120 - }
64121 -
64122 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
64123 - return resultobj;
64124 -fail:
64125 - return NULL;
64126 -}
64127 -
64128 -
64129 -SWIGINTERN PyObject *_wrap_VImage_linreg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64130 - PyObject *resultobj = 0;
64131 - std::vector< vips::VImage,std::allocator< vips::VImage > > arg1 ;
64132 - std::vector< double,std::allocator< double > > arg2 ;
64133 - PyObject * obj0 = 0 ;
64134 - PyObject * obj1 = 0 ;
64135 - vips::VImage result;
64136 -
64137 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_linreg",&obj0,&obj1)) SWIG_fail;
64138 - {
64139 - std::vector<vips::VImage,std::allocator< vips::VImage > > *ptr = (std::vector<vips::VImage,std::allocator< vips::VImage > > *)0;
64140 - int res = swig::asptr(obj0, &ptr);
64141 - if (!SWIG_IsOK(res) || !ptr) {
64142 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_linreg" "', argument " "1"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > >""'");
64143 - }
64144 - arg1 = *ptr;
64145 - if (SWIG_IsNewObj(res)) delete ptr;
64146 - }
64147 - {
64148 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
64149 - int res = swig::asptr(obj1, &ptr);
64150 - if (!SWIG_IsOK(res) || !ptr) {
64151 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_linreg" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
64152 - }
64153 - arg2 = *ptr;
64154 - if (SWIG_IsNewObj(res)) delete ptr;
64155 - }
64156 - try {
64157 - result = vips::VImage::linreg(arg1,arg2);
64158 - }
64159 - catch(vips::VError &_e) {
64160 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64161 - }
64162 -
64163 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
64164 - return resultobj;
64165 -fail:
64166 - return NULL;
64167 -}
64168 -
64169 -
64170 -SWIGINTERN PyObject *_wrap_VImage_lin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64171 - PyObject *resultobj = 0;
64172 - vips::VImage *arg1 = (vips::VImage *) 0 ;
64173 - std::vector< double,std::allocator< double > > arg2 ;
64174 - std::vector< double,std::allocator< double > > arg3 ;
64175 - void *argp1 = 0 ;
64176 - int res1 = 0 ;
64177 - PyObject * obj0 = 0 ;
64178 - PyObject * obj1 = 0 ;
64179 - PyObject * obj2 = 0 ;
64180 - vips::VImage result;
64181 -
64182 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_lin",&obj0,&obj1,&obj2)) SWIG_fail;
64183 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
64184 - if (!SWIG_IsOK(res1)) {
64185 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lin" "', argument " "1"" of type '" "vips::VImage *""'");
64186 - }
64187 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
64188 - {
64189 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
64190 - int res = swig::asptr(obj1, &ptr);
64191 - if (!SWIG_IsOK(res) || !ptr) {
64192 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_lin" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
64193 - }
64194 - arg2 = *ptr;
64195 - if (SWIG_IsNewObj(res)) delete ptr;
64196 - }
64197 - {
64198 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
64199 - int res = swig::asptr(obj2, &ptr);
64200 - if (!SWIG_IsOK(res) || !ptr) {
64201 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_lin" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > >""'");
64202 - }
64203 - arg3 = *ptr;
64204 - if (SWIG_IsNewObj(res)) delete ptr;
64205 - }
64206 - try {
64207 - result = (arg1)->lin(arg2,arg3);
64208 - }
64209 - catch(vips::VError &_e) {
64210 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64211 - }
64212 -
64213 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
64214 - return resultobj;
64215 -fail:
64216 - return NULL;
64217 -}
64218 -
64219 -
64220 -SWIGINTERN PyObject *_wrap_VImage_lin(PyObject *self, PyObject *args) {
64221 - int argc;
64222 - PyObject *argv[4];
64223 - int ii;
64224 -
64225 - if (!PyTuple_Check(args)) SWIG_fail;
64226 - argc = args ? (int)PyObject_Length(args) : 0;
64227 - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
64228 - argv[ii] = PyTuple_GET_ITEM(args,ii);
64229 - }
64230 - if (argc == 3) {
64231 - int _v;
64232 - void *vptr = 0;
64233 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
64234 - _v = SWIG_CheckState(res);
64235 - if (_v) {
64236 - {
64237 - int res = SWIG_AsVal_double(argv[1], NULL);
64238 - _v = SWIG_CheckState(res);
64239 - }
64240 - if (_v) {
64241 - {
64242 - int res = SWIG_AsVal_double(argv[2], NULL);
64243 - _v = SWIG_CheckState(res);
64244 - }
64245 - if (_v) {
64246 - return _wrap_VImage_lin__SWIG_0(self, args);
64247 - }
64248 - }
64249 - }
64250 - }
64251 - if (argc == 3) {
64252 - int _v;
64253 - void *vptr = 0;
64254 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
64255 - _v = SWIG_CheckState(res);
64256 - if (_v) {
64257 - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
64258 - _v = SWIG_CheckState(res);
64259 - if (_v) {
64260 - int res = swig::asptr(argv[2], (std::vector<double,std::allocator< double > >**)(0));
64261 - _v = SWIG_CheckState(res);
64262 - if (_v) {
64263 - return _wrap_VImage_lin__SWIG_1(self, args);
64264 - }
64265 - }
64266 - }
64267 - }
64268 -
64269 -fail:
64270 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_lin'.\n"
64271 - " Possible C/C++ prototypes are:\n"
64272 - " vips::VImage::lin(double,double)\n"
64273 - " vips::VImage::lin(std::vector< double,std::allocator< double > >,std::vector< double,std::allocator< double > >)\n");
64274 - return 0;
64275 -}
64276 -
64277 -
64278 -SWIGINTERN PyObject *_wrap_VImage_log10(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64279 - PyObject *resultobj = 0;
64280 - vips::VImage *arg1 = (vips::VImage *) 0 ;
64281 - void *argp1 = 0 ;
64282 - int res1 = 0 ;
64283 - PyObject * obj0 = 0 ;
64284 - vips::VImage result;
64285 -
64286 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_log10",&obj0)) SWIG_fail;
64287 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
64288 - if (!SWIG_IsOK(res1)) {
64289 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_log10" "', argument " "1"" of type '" "vips::VImage *""'");
64290 - }
64291 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
64292 - try {
64293 - result = (arg1)->log10();
64294 - }
64295 - catch(vips::VError &_e) {
64296 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64297 - }
64298 -
64299 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
64300 - return resultobj;
64301 -fail:
64302 - return NULL;
64303 -}
64304 -
64305 -
64306 -SWIGINTERN PyObject *_wrap_VImage_log(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64307 - PyObject *resultobj = 0;
64308 - vips::VImage *arg1 = (vips::VImage *) 0 ;
64309 - void *argp1 = 0 ;
64310 - int res1 = 0 ;
64311 - PyObject * obj0 = 0 ;
64312 - vips::VImage result;
64313 -
64314 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_log",&obj0)) SWIG_fail;
64315 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
64316 - if (!SWIG_IsOK(res1)) {
64317 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_log" "', argument " "1"" of type '" "vips::VImage *""'");
64318 - }
64319 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
64320 - try {
64321 - result = (arg1)->log();
64322 - }
64323 - catch(vips::VError &_e) {
64324 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64325 - }
64326 -
64327 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
64328 - return resultobj;
64329 -fail:
64330 - return NULL;
64331 -}
64332 -
64333 -
64334 -SWIGINTERN PyObject *_wrap_VImage_max(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64335 - PyObject *resultobj = 0;
64336 - vips::VImage *arg1 = (vips::VImage *) 0 ;
64337 - void *argp1 = 0 ;
64338 - int res1 = 0 ;
64339 - PyObject * obj0 = 0 ;
64340 - double result;
64341 -
64342 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_max",&obj0)) SWIG_fail;
64343 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
64344 - if (!SWIG_IsOK(res1)) {
64345 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_max" "', argument " "1"" of type '" "vips::VImage *""'");
64346 - }
64347 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
64348 - try {
64349 - result = (double)(arg1)->max();
64350 - }
64351 - catch(vips::VError &_e) {
64352 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64353 - }
64354 -
64355 - resultobj = SWIG_From_double(static_cast< double >(result));
64356 - return resultobj;
64357 -fail:
64358 - return NULL;
64359 -}
64360 -
64361 -
64362 -SWIGINTERN PyObject *_wrap_VImage_maxpos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64363 - PyObject *resultobj = 0;
64364 - vips::VImage *arg1 = (vips::VImage *) 0 ;
64365 - void *argp1 = 0 ;
64366 - int res1 = 0 ;
64367 - PyObject * obj0 = 0 ;
64368 - std::complex< double > result;
64369 -
64370 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_maxpos",&obj0)) SWIG_fail;
64371 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
64372 - if (!SWIG_IsOK(res1)) {
64373 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_maxpos" "', argument " "1"" of type '" "vips::VImage *""'");
64374 - }
64375 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
64376 - try {
64377 - result = (arg1)->maxpos();
64378 - }
64379 - catch(vips::VError &_e) {
64380 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64381 - }
64382 -
64383 - resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
64384 - return resultobj;
64385 -fail:
64386 - return NULL;
64387 -}
64388 -
64389 -
64390 -SWIGINTERN PyObject *_wrap_VImage_maxpos_avg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64391 - PyObject *resultobj = 0;
64392 - vips::VImage *arg1 = (vips::VImage *) 0 ;
64393 - double *arg2 = 0 ;
64394 - double *arg3 = 0 ;
64395 - void *argp1 = 0 ;
64396 - int res1 = 0 ;
64397 - double temp2 ;
64398 - int res2 = SWIG_TMPOBJ ;
64399 - double temp3 ;
64400 - int res3 = SWIG_TMPOBJ ;
64401 - PyObject * obj0 = 0 ;
64402 - double result;
64403 -
64404 - arg2 = &temp2;
64405 - arg3 = &temp3;
64406 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_maxpos_avg",&obj0)) SWIG_fail;
64407 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
64408 - if (!SWIG_IsOK(res1)) {
64409 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_maxpos_avg" "', argument " "1"" of type '" "vips::VImage *""'");
64410 - }
64411 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
64412 - try {
64413 - result = (double)(arg1)->maxpos_avg(*arg2,*arg3);
64414 - }
64415 - catch(vips::VError &_e) {
64416 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64417 - }
64418 -
64419 - resultobj = SWIG_From_double(static_cast< double >(result));
64420 - if (SWIG_IsTmpObj(res2)) {
64421 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
64422 - } else {
64423 - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
64424 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
64425 - }
64426 - if (SWIG_IsTmpObj(res3)) {
64427 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
64428 - } else {
64429 - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
64430 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
64431 - }
64432 - return resultobj;
64433 -fail:
64434 - return NULL;
64435 -}
64436 -
64437 -
64438 -SWIGINTERN PyObject *_wrap_VImage_measure(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64439 - PyObject *resultobj = 0;
64440 - vips::VImage *arg1 = (vips::VImage *) 0 ;
64441 - int arg2 ;
64442 - int arg3 ;
64443 - int arg4 ;
64444 - int arg5 ;
64445 - int arg6 ;
64446 - int arg7 ;
64447 - void *argp1 = 0 ;
64448 - int res1 = 0 ;
64449 - int val2 ;
64450 - int ecode2 = 0 ;
64451 - int val3 ;
64452 - int ecode3 = 0 ;
64453 - int val4 ;
64454 - int ecode4 = 0 ;
64455 - int val5 ;
64456 - int ecode5 = 0 ;
64457 - int val6 ;
64458 - int ecode6 = 0 ;
64459 - int val7 ;
64460 - int ecode7 = 0 ;
64461 - PyObject * obj0 = 0 ;
64462 - PyObject * obj1 = 0 ;
64463 - PyObject * obj2 = 0 ;
64464 - PyObject * obj3 = 0 ;
64465 - PyObject * obj4 = 0 ;
64466 - PyObject * obj5 = 0 ;
64467 - PyObject * obj6 = 0 ;
64468 - vips::VDMask result;
64469 -
64470 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_measure",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
64471 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
64472 - if (!SWIG_IsOK(res1)) {
64473 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_measure" "', argument " "1"" of type '" "vips::VImage *""'");
64474 - }
64475 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
64476 - ecode2 = SWIG_AsVal_int(obj1, &val2);
64477 - if (!SWIG_IsOK(ecode2)) {
64478 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_measure" "', argument " "2"" of type '" "int""'");
64479 - }
64480 - arg2 = static_cast< int >(val2);
64481 - ecode3 = SWIG_AsVal_int(obj2, &val3);
64482 - if (!SWIG_IsOK(ecode3)) {
64483 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_measure" "', argument " "3"" of type '" "int""'");
64484 - }
64485 - arg3 = static_cast< int >(val3);
64486 - ecode4 = SWIG_AsVal_int(obj3, &val4);
64487 - if (!SWIG_IsOK(ecode4)) {
64488 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_measure" "', argument " "4"" of type '" "int""'");
64489 - }
64490 - arg4 = static_cast< int >(val4);
64491 - ecode5 = SWIG_AsVal_int(obj4, &val5);
64492 - if (!SWIG_IsOK(ecode5)) {
64493 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_measure" "', argument " "5"" of type '" "int""'");
64494 - }
64495 - arg5 = static_cast< int >(val5);
64496 - ecode6 = SWIG_AsVal_int(obj5, &val6);
64497 - if (!SWIG_IsOK(ecode6)) {
64498 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_measure" "', argument " "6"" of type '" "int""'");
64499 - }
64500 - arg6 = static_cast< int >(val6);
64501 - ecode7 = SWIG_AsVal_int(obj6, &val7);
64502 - if (!SWIG_IsOK(ecode7)) {
64503 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_measure" "', argument " "7"" of type '" "int""'");
64504 - }
64505 - arg7 = static_cast< int >(val7);
64506 - try {
64507 - result = (arg1)->measure(arg2,arg3,arg4,arg5,arg6,arg7);
64508 - }
64509 - catch(vips::VError &_e) {
64510 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64511 - }
64512 -
64513 - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
64514 - return resultobj;
64515 -fail:
64516 - return NULL;
64517 -}
64518 -
64519 -
64520 -SWIGINTERN PyObject *_wrap_VImage_min(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64521 - PyObject *resultobj = 0;
64522 - vips::VImage *arg1 = (vips::VImage *) 0 ;
64523 - void *argp1 = 0 ;
64524 - int res1 = 0 ;
64525 - PyObject * obj0 = 0 ;
64526 - double result;
64527 -
64528 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_min",&obj0)) SWIG_fail;
64529 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
64530 - if (!SWIG_IsOK(res1)) {
64531 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_min" "', argument " "1"" of type '" "vips::VImage *""'");
64532 - }
64533 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
64534 - try {
64535 - result = (double)(arg1)->min();
64536 - }
64537 - catch(vips::VError &_e) {
64538 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64539 - }
64540 -
64541 - resultobj = SWIG_From_double(static_cast< double >(result));
64542 - return resultobj;
64543 -fail:
64544 - return NULL;
64545 -}
64546 -
64547 -
64548 -SWIGINTERN PyObject *_wrap_VImage_minpos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64549 - PyObject *resultobj = 0;
64550 - vips::VImage *arg1 = (vips::VImage *) 0 ;
64551 - void *argp1 = 0 ;
64552 - int res1 = 0 ;
64553 - PyObject * obj0 = 0 ;
64554 - std::complex< double > result;
64555 -
64556 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_minpos",&obj0)) SWIG_fail;
64557 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
64558 - if (!SWIG_IsOK(res1)) {
64559 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_minpos" "', argument " "1"" of type '" "vips::VImage *""'");
64560 - }
64561 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
64562 - try {
64563 - result = (arg1)->minpos();
64564 - }
64565 - catch(vips::VError &_e) {
64566 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64567 - }
64568 -
64569 - resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
64570 - return resultobj;
64571 -fail:
64572 - return NULL;
64573 -}
64574 -
64575 -
64576 -SWIGINTERN PyObject *_wrap_VImage_multiply(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64577 - PyObject *resultobj = 0;
64578 - vips::VImage *arg1 = (vips::VImage *) 0 ;
64579 - vips::VImage arg2 ;
64580 - void *argp1 = 0 ;
64581 - int res1 = 0 ;
64582 - void *argp2 ;
64583 - int res2 = 0 ;
64584 - PyObject * obj0 = 0 ;
64585 - PyObject * obj1 = 0 ;
64586 - vips::VImage result;
64587 -
64588 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_multiply",&obj0,&obj1)) SWIG_fail;
64589 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
64590 - if (!SWIG_IsOK(res1)) {
64591 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_multiply" "', argument " "1"" of type '" "vips::VImage *""'");
64592 - }
64593 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
64594 - {
64595 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
64596 - if (!SWIG_IsOK(res2)) {
64597 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_multiply" "', argument " "2"" of type '" "vips::VImage""'");
64598 - }
64599 - if (!argp2) {
64600 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_multiply" "', argument " "2"" of type '" "vips::VImage""'");
64601 - } else {
64602 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
64603 - arg2 = *temp;
64604 - if (SWIG_IsNewObj(res2)) delete temp;
64605 - }
64606 - }
64607 - try {
64608 - result = (arg1)->multiply(arg2);
64609 - }
64610 - catch(vips::VError &_e) {
64611 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64612 - }
64613 -
64614 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
64615 - return resultobj;
64616 -fail:
64617 - return NULL;
64618 -}
64619 -
64620 -
64621 -SWIGINTERN PyObject *_wrap_VImage_pow__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64622 - PyObject *resultobj = 0;
64623 - vips::VImage *arg1 = (vips::VImage *) 0 ;
64624 - double arg2 ;
64625 - void *argp1 = 0 ;
64626 - int res1 = 0 ;
64627 - double val2 ;
64628 - int ecode2 = 0 ;
64629 - PyObject * obj0 = 0 ;
64630 - PyObject * obj1 = 0 ;
64631 - vips::VImage result;
64632 -
64633 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_pow",&obj0,&obj1)) SWIG_fail;
64634 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
64635 - if (!SWIG_IsOK(res1)) {
64636 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_pow" "', argument " "1"" of type '" "vips::VImage *""'");
64637 - }
64638 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
64639 - ecode2 = SWIG_AsVal_double(obj1, &val2);
64640 - if (!SWIG_IsOK(ecode2)) {
64641 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_pow" "', argument " "2"" of type '" "double""'");
64642 - }
64643 - arg2 = static_cast< double >(val2);
64644 - try {
64645 - result = (arg1)->pow(arg2);
64646 - }
64647 - catch(vips::VError &_e) {
64648 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64649 - }
64650 -
64651 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
64652 - return resultobj;
64653 -fail:
64654 - return NULL;
64655 -}
64656 -
64657 -
64658 -SWIGINTERN PyObject *_wrap_VImage_pow__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64659 - PyObject *resultobj = 0;
64660 - vips::VImage *arg1 = (vips::VImage *) 0 ;
64661 - std::vector< double,std::allocator< double > > arg2 ;
64662 - void *argp1 = 0 ;
64663 - int res1 = 0 ;
64664 - PyObject * obj0 = 0 ;
64665 - PyObject * obj1 = 0 ;
64666 - vips::VImage result;
64667 -
64668 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_pow",&obj0,&obj1)) SWIG_fail;
64669 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
64670 - if (!SWIG_IsOK(res1)) {
64671 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_pow" "', argument " "1"" of type '" "vips::VImage *""'");
64672 - }
64673 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
64674 - {
64675 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
64676 - int res = swig::asptr(obj1, &ptr);
64677 - if (!SWIG_IsOK(res) || !ptr) {
64678 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_pow" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
64679 - }
64680 - arg2 = *ptr;
64681 - if (SWIG_IsNewObj(res)) delete ptr;
64682 - }
64683 - try {
64684 - result = (arg1)->pow(arg2);
64685 - }
64686 - catch(vips::VError &_e) {
64687 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64688 - }
64689 -
64690 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
64691 - return resultobj;
64692 -fail:
64693 - return NULL;
64694 -}
64695 -
64696 -
64697 -SWIGINTERN PyObject *_wrap_VImage_pow(PyObject *self, PyObject *args) {
64698 - int argc;
64699 - PyObject *argv[3];
64700 - int ii;
64701 -
64702 - if (!PyTuple_Check(args)) SWIG_fail;
64703 - argc = args ? (int)PyObject_Length(args) : 0;
64704 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
64705 - argv[ii] = PyTuple_GET_ITEM(args,ii);
64706 - }
64707 - if (argc == 2) {
64708 - int _v;
64709 - void *vptr = 0;
64710 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
64711 - _v = SWIG_CheckState(res);
64712 - if (_v) {
64713 - {
64714 - int res = SWIG_AsVal_double(argv[1], NULL);
64715 - _v = SWIG_CheckState(res);
64716 - }
64717 - if (_v) {
64718 - return _wrap_VImage_pow__SWIG_0(self, args);
64719 - }
64720 - }
64721 - }
64722 - if (argc == 2) {
64723 - int _v;
64724 - void *vptr = 0;
64725 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
64726 - _v = SWIG_CheckState(res);
64727 - if (_v) {
64728 - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
64729 - _v = SWIG_CheckState(res);
64730 - if (_v) {
64731 - return _wrap_VImage_pow__SWIG_1(self, args);
64732 - }
64733 - }
64734 - }
64735 -
64736 -fail:
64737 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_pow'.\n"
64738 - " Possible C/C++ prototypes are:\n"
64739 - " vips::VImage::pow(double)\n"
64740 - " vips::VImage::pow(std::vector< double,std::allocator< double > >)\n");
64741 - return 0;
64742 -}
64743 -
64744 -
64745 -SWIGINTERN PyObject *_wrap_VImage_recomb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64746 - PyObject *resultobj = 0;
64747 - vips::VImage *arg1 = (vips::VImage *) 0 ;
64748 - vips::VDMask arg2 ;
64749 - void *argp1 = 0 ;
64750 - int res1 = 0 ;
64751 - void *argp2 ;
64752 - int res2 = 0 ;
64753 - PyObject * obj0 = 0 ;
64754 - PyObject * obj1 = 0 ;
64755 - vips::VImage result;
64756 -
64757 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_recomb",&obj0,&obj1)) SWIG_fail;
64758 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
64759 - if (!SWIG_IsOK(res1)) {
64760 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_recomb" "', argument " "1"" of type '" "vips::VImage *""'");
64761 - }
64762 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
64763 - {
64764 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
64765 - if (!SWIG_IsOK(res2)) {
64766 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_recomb" "', argument " "2"" of type '" "vips::VDMask""'");
64767 - }
64768 - if (!argp2) {
64769 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_recomb" "', argument " "2"" of type '" "vips::VDMask""'");
64770 - } else {
64771 - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
64772 - arg2 = *temp;
64773 - if (SWIG_IsNewObj(res2)) delete temp;
64774 - }
64775 - }
64776 - try {
64777 - result = (arg1)->recomb(arg2);
64778 - }
64779 - catch(vips::VError &_e) {
64780 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64781 - }
64782 -
64783 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
64784 - return resultobj;
64785 -fail:
64786 - return NULL;
64787 -}
64788 -
64789 -
64790 -SWIGINTERN PyObject *_wrap_VImage_remainder__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64791 - PyObject *resultobj = 0;
64792 - vips::VImage *arg1 = (vips::VImage *) 0 ;
64793 - vips::VImage arg2 ;
64794 - void *argp1 = 0 ;
64795 - int res1 = 0 ;
64796 - void *argp2 ;
64797 - int res2 = 0 ;
64798 - PyObject * obj0 = 0 ;
64799 - PyObject * obj1 = 0 ;
64800 - vips::VImage result;
64801 -
64802 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_remainder",&obj0,&obj1)) SWIG_fail;
64803 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
64804 - if (!SWIG_IsOK(res1)) {
64805 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_remainder" "', argument " "1"" of type '" "vips::VImage *""'");
64806 - }
64807 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
64808 - {
64809 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
64810 - if (!SWIG_IsOK(res2)) {
64811 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_remainder" "', argument " "2"" of type '" "vips::VImage""'");
64812 - }
64813 - if (!argp2) {
64814 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_remainder" "', argument " "2"" of type '" "vips::VImage""'");
64815 - } else {
64816 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
64817 - arg2 = *temp;
64818 - if (SWIG_IsNewObj(res2)) delete temp;
64819 - }
64820 - }
64821 - try {
64822 - result = (arg1)->remainder(arg2);
64823 - }
64824 - catch(vips::VError &_e) {
64825 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64826 - }
64827 -
64828 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
64829 - return resultobj;
64830 -fail:
64831 - return NULL;
64832 -}
64833 -
64834 -
64835 -SWIGINTERN PyObject *_wrap_VImage_remainder__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64836 - PyObject *resultobj = 0;
64837 - vips::VImage *arg1 = (vips::VImage *) 0 ;
64838 - double arg2 ;
64839 - void *argp1 = 0 ;
64840 - int res1 = 0 ;
64841 - double val2 ;
64842 - int ecode2 = 0 ;
64843 - PyObject * obj0 = 0 ;
64844 - PyObject * obj1 = 0 ;
64845 - vips::VImage result;
64846 -
64847 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_remainder",&obj0,&obj1)) SWIG_fail;
64848 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
64849 - if (!SWIG_IsOK(res1)) {
64850 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_remainder" "', argument " "1"" of type '" "vips::VImage *""'");
64851 - }
64852 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
64853 - ecode2 = SWIG_AsVal_double(obj1, &val2);
64854 - if (!SWIG_IsOK(ecode2)) {
64855 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_remainder" "', argument " "2"" of type '" "double""'");
64856 - }
64857 - arg2 = static_cast< double >(val2);
64858 - try {
64859 - result = (arg1)->remainder(arg2);
64860 - }
64861 - catch(vips::VError &_e) {
64862 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64863 - }
64864 -
64865 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
64866 - return resultobj;
64867 -fail:
64868 - return NULL;
64869 -}
64870 -
64871 -
64872 -SWIGINTERN PyObject *_wrap_VImage_remainder__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64873 - PyObject *resultobj = 0;
64874 - vips::VImage *arg1 = (vips::VImage *) 0 ;
64875 - std::vector< double,std::allocator< double > > arg2 ;
64876 - void *argp1 = 0 ;
64877 - int res1 = 0 ;
64878 - PyObject * obj0 = 0 ;
64879 - PyObject * obj1 = 0 ;
64880 - vips::VImage result;
64881 -
64882 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_remainder",&obj0,&obj1)) SWIG_fail;
64883 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
64884 - if (!SWIG_IsOK(res1)) {
64885 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_remainder" "', argument " "1"" of type '" "vips::VImage *""'");
64886 - }
64887 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
64888 - {
64889 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
64890 - int res = swig::asptr(obj1, &ptr);
64891 - if (!SWIG_IsOK(res) || !ptr) {
64892 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_remainder" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
64893 - }
64894 - arg2 = *ptr;
64895 - if (SWIG_IsNewObj(res)) delete ptr;
64896 - }
64897 - try {
64898 - result = (arg1)->remainder(arg2);
64899 - }
64900 - catch(vips::VError &_e) {
64901 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64902 - }
64903 -
64904 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
64905 - return resultobj;
64906 -fail:
64907 - return NULL;
64908 -}
64909 -
64910 -
64911 -SWIGINTERN PyObject *_wrap_VImage_remainder(PyObject *self, PyObject *args) {
64912 - int argc;
64913 - PyObject *argv[3];
64914 - int ii;
64915 -
64916 - if (!PyTuple_Check(args)) SWIG_fail;
64917 - argc = args ? (int)PyObject_Length(args) : 0;
64918 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
64919 - argv[ii] = PyTuple_GET_ITEM(args,ii);
64920 - }
64921 - if (argc == 2) {
64922 - int _v;
64923 - void *vptr = 0;
64924 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
64925 - _v = SWIG_CheckState(res);
64926 - if (_v) {
64927 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
64928 - _v = SWIG_CheckState(res);
64929 - if (_v) {
64930 - return _wrap_VImage_remainder__SWIG_0(self, args);
64931 - }
64932 - }
64933 - }
64934 - if (argc == 2) {
64935 - int _v;
64936 - void *vptr = 0;
64937 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
64938 - _v = SWIG_CheckState(res);
64939 - if (_v) {
64940 - {
64941 - int res = SWIG_AsVal_double(argv[1], NULL);
64942 - _v = SWIG_CheckState(res);
64943 - }
64944 - if (_v) {
64945 - return _wrap_VImage_remainder__SWIG_1(self, args);
64946 - }
64947 - }
64948 - }
64949 - if (argc == 2) {
64950 - int _v;
64951 - void *vptr = 0;
64952 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
64953 - _v = SWIG_CheckState(res);
64954 - if (_v) {
64955 - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
64956 - _v = SWIG_CheckState(res);
64957 - if (_v) {
64958 - return _wrap_VImage_remainder__SWIG_2(self, args);
64959 - }
64960 - }
64961 - }
64962 -
64963 -fail:
64964 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_remainder'.\n"
64965 - " Possible C/C++ prototypes are:\n"
64966 - " vips::VImage::remainder(vips::VImage)\n"
64967 - " vips::VImage::remainder(double)\n"
64968 - " vips::VImage::remainder(std::vector< double,std::allocator< double > >)\n");
64969 - return 0;
64970 -}
64971 -
64972 -
64973 -SWIGINTERN PyObject *_wrap_VImage_rint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64974 - PyObject *resultobj = 0;
64975 - vips::VImage *arg1 = (vips::VImage *) 0 ;
64976 - void *argp1 = 0 ;
64977 - int res1 = 0 ;
64978 - PyObject * obj0 = 0 ;
64979 - vips::VImage result;
64980 -
64981 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_rint",&obj0)) SWIG_fail;
64982 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
64983 - if (!SWIG_IsOK(res1)) {
64984 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rint" "', argument " "1"" of type '" "vips::VImage *""'");
64985 - }
64986 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
64987 - try {
64988 - result = (arg1)->rint();
64989 - }
64990 - catch(vips::VError &_e) {
64991 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
64992 - }
64993 -
64994 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
64995 - return resultobj;
64996 -fail:
64997 - return NULL;
64998 -}
64999 -
65000 -
65001 -SWIGINTERN PyObject *_wrap_VImage_sign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65002 - PyObject *resultobj = 0;
65003 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65004 - void *argp1 = 0 ;
65005 - int res1 = 0 ;
65006 - PyObject * obj0 = 0 ;
65007 - vips::VImage result;
65008 -
65009 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_sign",&obj0)) SWIG_fail;
65010 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65011 - if (!SWIG_IsOK(res1)) {
65012 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_sign" "', argument " "1"" of type '" "vips::VImage *""'");
65013 - }
65014 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65015 - try {
65016 - result = (arg1)->sign();
65017 - }
65018 - catch(vips::VError &_e) {
65019 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65020 - }
65021 -
65022 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65023 - return resultobj;
65024 -fail:
65025 - return NULL;
65026 -}
65027 -
65028 -
65029 -SWIGINTERN PyObject *_wrap_VImage_sin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65030 - PyObject *resultobj = 0;
65031 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65032 - void *argp1 = 0 ;
65033 - int res1 = 0 ;
65034 - PyObject * obj0 = 0 ;
65035 - vips::VImage result;
65036 -
65037 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_sin",&obj0)) SWIG_fail;
65038 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65039 - if (!SWIG_IsOK(res1)) {
65040 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_sin" "', argument " "1"" of type '" "vips::VImage *""'");
65041 - }
65042 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65043 - try {
65044 - result = (arg1)->sin();
65045 - }
65046 - catch(vips::VError &_e) {
65047 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65048 - }
65049 -
65050 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65051 - return resultobj;
65052 -fail:
65053 - return NULL;
65054 -}
65055 -
65056 -
65057 -SWIGINTERN PyObject *_wrap_VImage_stats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65058 - PyObject *resultobj = 0;
65059 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65060 - void *argp1 = 0 ;
65061 - int res1 = 0 ;
65062 - PyObject * obj0 = 0 ;
65063 - vips::VDMask result;
65064 -
65065 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_stats",&obj0)) SWIG_fail;
65066 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65067 - if (!SWIG_IsOK(res1)) {
65068 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_stats" "', argument " "1"" of type '" "vips::VImage *""'");
65069 - }
65070 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65071 - try {
65072 - result = (arg1)->stats();
65073 - }
65074 - catch(vips::VError &_e) {
65075 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65076 - }
65077 -
65078 - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
65079 - return resultobj;
65080 -fail:
65081 - return NULL;
65082 -}
65083 -
65084 -
65085 -SWIGINTERN PyObject *_wrap_VImage_subtract(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65086 - PyObject *resultobj = 0;
65087 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65088 - vips::VImage arg2 ;
65089 - void *argp1 = 0 ;
65090 - int res1 = 0 ;
65091 - void *argp2 ;
65092 - int res2 = 0 ;
65093 - PyObject * obj0 = 0 ;
65094 - PyObject * obj1 = 0 ;
65095 - vips::VImage result;
65096 -
65097 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_subtract",&obj0,&obj1)) SWIG_fail;
65098 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65099 - if (!SWIG_IsOK(res1)) {
65100 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_subtract" "', argument " "1"" of type '" "vips::VImage *""'");
65101 - }
65102 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65103 - {
65104 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
65105 - if (!SWIG_IsOK(res2)) {
65106 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_subtract" "', argument " "2"" of type '" "vips::VImage""'");
65107 - }
65108 - if (!argp2) {
65109 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_subtract" "', argument " "2"" of type '" "vips::VImage""'");
65110 - } else {
65111 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
65112 - arg2 = *temp;
65113 - if (SWIG_IsNewObj(res2)) delete temp;
65114 - }
65115 - }
65116 - try {
65117 - result = (arg1)->subtract(arg2);
65118 - }
65119 - catch(vips::VError &_e) {
65120 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65121 - }
65122 -
65123 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65124 - return resultobj;
65125 -fail:
65126 - return NULL;
65127 -}
65128 -
65129 -
65130 -SWIGINTERN PyObject *_wrap_VImage_tan(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65131 - PyObject *resultobj = 0;
65132 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65133 - void *argp1 = 0 ;
65134 - int res1 = 0 ;
65135 - PyObject * obj0 = 0 ;
65136 - vips::VImage result;
65137 -
65138 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_tan",&obj0)) SWIG_fail;
65139 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65140 - if (!SWIG_IsOK(res1)) {
65141 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tan" "', argument " "1"" of type '" "vips::VImage *""'");
65142 - }
65143 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65144 - try {
65145 - result = (arg1)->tan();
65146 - }
65147 - catch(vips::VError &_e) {
65148 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65149 - }
65150 -
65151 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65152 - return resultobj;
65153 -fail:
65154 - return NULL;
65155 -}
65156 -
65157 -
65158 -SWIGINTERN PyObject *_wrap_VImage_greyc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65159 - PyObject *resultobj = 0;
65160 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65161 - int arg2 ;
65162 - double arg3 ;
65163 - double arg4 ;
65164 - double arg5 ;
65165 - double arg6 ;
65166 - double arg7 ;
65167 - double arg8 ;
65168 - double arg9 ;
65169 - double arg10 ;
65170 - int arg11 ;
65171 - int arg12 ;
65172 - void *argp1 = 0 ;
65173 - int res1 = 0 ;
65174 - int val2 ;
65175 - int ecode2 = 0 ;
65176 - double val3 ;
65177 - int ecode3 = 0 ;
65178 - double val4 ;
65179 - int ecode4 = 0 ;
65180 - double val5 ;
65181 - int ecode5 = 0 ;
65182 - double val6 ;
65183 - int ecode6 = 0 ;
65184 - double val7 ;
65185 - int ecode7 = 0 ;
65186 - double val8 ;
65187 - int ecode8 = 0 ;
65188 - double val9 ;
65189 - int ecode9 = 0 ;
65190 - double val10 ;
65191 - int ecode10 = 0 ;
65192 - int val11 ;
65193 - int ecode11 = 0 ;
65194 - int val12 ;
65195 - int ecode12 = 0 ;
65196 - PyObject * obj0 = 0 ;
65197 - PyObject * obj1 = 0 ;
65198 - PyObject * obj2 = 0 ;
65199 - PyObject * obj3 = 0 ;
65200 - PyObject * obj4 = 0 ;
65201 - PyObject * obj5 = 0 ;
65202 - PyObject * obj6 = 0 ;
65203 - PyObject * obj7 = 0 ;
65204 - PyObject * obj8 = 0 ;
65205 - PyObject * obj9 = 0 ;
65206 - PyObject * obj10 = 0 ;
65207 - PyObject * obj11 = 0 ;
65208 - vips::VImage result;
65209 -
65210 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOO:VImage_greyc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11)) SWIG_fail;
65211 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65212 - if (!SWIG_IsOK(res1)) {
65213 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_greyc" "', argument " "1"" of type '" "vips::VImage *""'");
65214 - }
65215 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65216 - ecode2 = SWIG_AsVal_int(obj1, &val2);
65217 - if (!SWIG_IsOK(ecode2)) {
65218 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_greyc" "', argument " "2"" of type '" "int""'");
65219 - }
65220 - arg2 = static_cast< int >(val2);
65221 - ecode3 = SWIG_AsVal_double(obj2, &val3);
65222 - if (!SWIG_IsOK(ecode3)) {
65223 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_greyc" "', argument " "3"" of type '" "double""'");
65224 - }
65225 - arg3 = static_cast< double >(val3);
65226 - ecode4 = SWIG_AsVal_double(obj3, &val4);
65227 - if (!SWIG_IsOK(ecode4)) {
65228 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_greyc" "', argument " "4"" of type '" "double""'");
65229 - }
65230 - arg4 = static_cast< double >(val4);
65231 - ecode5 = SWIG_AsVal_double(obj4, &val5);
65232 - if (!SWIG_IsOK(ecode5)) {
65233 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_greyc" "', argument " "5"" of type '" "double""'");
65234 - }
65235 - arg5 = static_cast< double >(val5);
65236 - ecode6 = SWIG_AsVal_double(obj5, &val6);
65237 - if (!SWIG_IsOK(ecode6)) {
65238 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_greyc" "', argument " "6"" of type '" "double""'");
65239 - }
65240 - arg6 = static_cast< double >(val6);
65241 - ecode7 = SWIG_AsVal_double(obj6, &val7);
65242 - if (!SWIG_IsOK(ecode7)) {
65243 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_greyc" "', argument " "7"" of type '" "double""'");
65244 - }
65245 - arg7 = static_cast< double >(val7);
65246 - ecode8 = SWIG_AsVal_double(obj7, &val8);
65247 - if (!SWIG_IsOK(ecode8)) {
65248 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_greyc" "', argument " "8"" of type '" "double""'");
65249 - }
65250 - arg8 = static_cast< double >(val8);
65251 - ecode9 = SWIG_AsVal_double(obj8, &val9);
65252 - if (!SWIG_IsOK(ecode9)) {
65253 - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_greyc" "', argument " "9"" of type '" "double""'");
65254 - }
65255 - arg9 = static_cast< double >(val9);
65256 - ecode10 = SWIG_AsVal_double(obj9, &val10);
65257 - if (!SWIG_IsOK(ecode10)) {
65258 - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_greyc" "', argument " "10"" of type '" "double""'");
65259 - }
65260 - arg10 = static_cast< double >(val10);
65261 - ecode11 = SWIG_AsVal_int(obj10, &val11);
65262 - if (!SWIG_IsOK(ecode11)) {
65263 - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_greyc" "', argument " "11"" of type '" "int""'");
65264 - }
65265 - arg11 = static_cast< int >(val11);
65266 - ecode12 = SWIG_AsVal_int(obj11, &val12);
65267 - if (!SWIG_IsOK(ecode12)) {
65268 - SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "VImage_greyc" "', argument " "12"" of type '" "int""'");
65269 - }
65270 - arg12 = static_cast< int >(val12);
65271 - try {
65272 - result = (arg1)->greyc(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
65273 - }
65274 - catch(vips::VError &_e) {
65275 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65276 - }
65277 -
65278 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65279 - return resultobj;
65280 -fail:
65281 - return NULL;
65282 -}
65283 -
65284 -
65285 -SWIGINTERN PyObject *_wrap_VImage_greyc_mask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65286 - PyObject *resultobj = 0;
65287 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65288 - vips::VImage arg2 ;
65289 - int arg3 ;
65290 - double arg4 ;
65291 - double arg5 ;
65292 - double arg6 ;
65293 - double arg7 ;
65294 - double arg8 ;
65295 - double arg9 ;
65296 - double arg10 ;
65297 - double arg11 ;
65298 - int arg12 ;
65299 - int arg13 ;
65300 - void *argp1 = 0 ;
65301 - int res1 = 0 ;
65302 - void *argp2 ;
65303 - int res2 = 0 ;
65304 - int val3 ;
65305 - int ecode3 = 0 ;
65306 - double val4 ;
65307 - int ecode4 = 0 ;
65308 - double val5 ;
65309 - int ecode5 = 0 ;
65310 - double val6 ;
65311 - int ecode6 = 0 ;
65312 - double val7 ;
65313 - int ecode7 = 0 ;
65314 - double val8 ;
65315 - int ecode8 = 0 ;
65316 - double val9 ;
65317 - int ecode9 = 0 ;
65318 - double val10 ;
65319 - int ecode10 = 0 ;
65320 - double val11 ;
65321 - int ecode11 = 0 ;
65322 - int val12 ;
65323 - int ecode12 = 0 ;
65324 - int val13 ;
65325 - int ecode13 = 0 ;
65326 - PyObject * obj0 = 0 ;
65327 - PyObject * obj1 = 0 ;
65328 - PyObject * obj2 = 0 ;
65329 - PyObject * obj3 = 0 ;
65330 - PyObject * obj4 = 0 ;
65331 - PyObject * obj5 = 0 ;
65332 - PyObject * obj6 = 0 ;
65333 - PyObject * obj7 = 0 ;
65334 - PyObject * obj8 = 0 ;
65335 - PyObject * obj9 = 0 ;
65336 - PyObject * obj10 = 0 ;
65337 - PyObject * obj11 = 0 ;
65338 - PyObject * obj12 = 0 ;
65339 - vips::VImage result;
65340 -
65341 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOO:VImage_greyc_mask",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12)) SWIG_fail;
65342 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65343 - if (!SWIG_IsOK(res1)) {
65344 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_greyc_mask" "', argument " "1"" of type '" "vips::VImage *""'");
65345 - }
65346 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65347 - {
65348 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
65349 - if (!SWIG_IsOK(res2)) {
65350 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_greyc_mask" "', argument " "2"" of type '" "vips::VImage""'");
65351 - }
65352 - if (!argp2) {
65353 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_greyc_mask" "', argument " "2"" of type '" "vips::VImage""'");
65354 - } else {
65355 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
65356 - arg2 = *temp;
65357 - if (SWIG_IsNewObj(res2)) delete temp;
65358 - }
65359 - }
65360 - ecode3 = SWIG_AsVal_int(obj2, &val3);
65361 - if (!SWIG_IsOK(ecode3)) {
65362 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_greyc_mask" "', argument " "3"" of type '" "int""'");
65363 - }
65364 - arg3 = static_cast< int >(val3);
65365 - ecode4 = SWIG_AsVal_double(obj3, &val4);
65366 - if (!SWIG_IsOK(ecode4)) {
65367 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_greyc_mask" "', argument " "4"" of type '" "double""'");
65368 - }
65369 - arg4 = static_cast< double >(val4);
65370 - ecode5 = SWIG_AsVal_double(obj4, &val5);
65371 - if (!SWIG_IsOK(ecode5)) {
65372 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_greyc_mask" "', argument " "5"" of type '" "double""'");
65373 - }
65374 - arg5 = static_cast< double >(val5);
65375 - ecode6 = SWIG_AsVal_double(obj5, &val6);
65376 - if (!SWIG_IsOK(ecode6)) {
65377 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_greyc_mask" "', argument " "6"" of type '" "double""'");
65378 - }
65379 - arg6 = static_cast< double >(val6);
65380 - ecode7 = SWIG_AsVal_double(obj6, &val7);
65381 - if (!SWIG_IsOK(ecode7)) {
65382 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_greyc_mask" "', argument " "7"" of type '" "double""'");
65383 - }
65384 - arg7 = static_cast< double >(val7);
65385 - ecode8 = SWIG_AsVal_double(obj7, &val8);
65386 - if (!SWIG_IsOK(ecode8)) {
65387 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_greyc_mask" "', argument " "8"" of type '" "double""'");
65388 - }
65389 - arg8 = static_cast< double >(val8);
65390 - ecode9 = SWIG_AsVal_double(obj8, &val9);
65391 - if (!SWIG_IsOK(ecode9)) {
65392 - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_greyc_mask" "', argument " "9"" of type '" "double""'");
65393 - }
65394 - arg9 = static_cast< double >(val9);
65395 - ecode10 = SWIG_AsVal_double(obj9, &val10);
65396 - if (!SWIG_IsOK(ecode10)) {
65397 - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_greyc_mask" "', argument " "10"" of type '" "double""'");
65398 - }
65399 - arg10 = static_cast< double >(val10);
65400 - ecode11 = SWIG_AsVal_double(obj10, &val11);
65401 - if (!SWIG_IsOK(ecode11)) {
65402 - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_greyc_mask" "', argument " "11"" of type '" "double""'");
65403 - }
65404 - arg11 = static_cast< double >(val11);
65405 - ecode12 = SWIG_AsVal_int(obj11, &val12);
65406 - if (!SWIG_IsOK(ecode12)) {
65407 - SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "VImage_greyc_mask" "', argument " "12"" of type '" "int""'");
65408 - }
65409 - arg12 = static_cast< int >(val12);
65410 - ecode13 = SWIG_AsVal_int(obj12, &val13);
65411 - if (!SWIG_IsOK(ecode13)) {
65412 - SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "VImage_greyc_mask" "', argument " "13"" of type '" "int""'");
65413 - }
65414 - arg13 = static_cast< int >(val13);
65415 - try {
65416 - result = (arg1)->greyc_mask(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
65417 - }
65418 - catch(vips::VError &_e) {
65419 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65420 - }
65421 -
65422 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65423 - return resultobj;
65424 -fail:
65425 - return NULL;
65426 -}
65427 -
65428 -
65429 -SWIGINTERN PyObject *_wrap_VImage_LCh2Lab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65430 - PyObject *resultobj = 0;
65431 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65432 - void *argp1 = 0 ;
65433 - int res1 = 0 ;
65434 - PyObject * obj0 = 0 ;
65435 - vips::VImage result;
65436 -
65437 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_LCh2Lab",&obj0)) SWIG_fail;
65438 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65439 - if (!SWIG_IsOK(res1)) {
65440 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LCh2Lab" "', argument " "1"" of type '" "vips::VImage *""'");
65441 - }
65442 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65443 - try {
65444 - result = (arg1)->LCh2Lab();
65445 - }
65446 - catch(vips::VError &_e) {
65447 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65448 - }
65449 -
65450 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65451 - return resultobj;
65452 -fail:
65453 - return NULL;
65454 -}
65455 -
65456 -
65457 -SWIGINTERN PyObject *_wrap_VImage_LCh2UCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65458 - PyObject *resultobj = 0;
65459 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65460 - void *argp1 = 0 ;
65461 - int res1 = 0 ;
65462 - PyObject * obj0 = 0 ;
65463 - vips::VImage result;
65464 -
65465 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_LCh2UCS",&obj0)) SWIG_fail;
65466 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65467 - if (!SWIG_IsOK(res1)) {
65468 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LCh2UCS" "', argument " "1"" of type '" "vips::VImage *""'");
65469 - }
65470 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65471 - try {
65472 - result = (arg1)->LCh2UCS();
65473 - }
65474 - catch(vips::VError &_e) {
65475 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65476 - }
65477 -
65478 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65479 - return resultobj;
65480 -fail:
65481 - return NULL;
65482 -}
65483 -
65484 -
65485 -SWIGINTERN PyObject *_wrap_VImage_Lab2LCh(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65486 - PyObject *resultobj = 0;
65487 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65488 - void *argp1 = 0 ;
65489 - int res1 = 0 ;
65490 - PyObject * obj0 = 0 ;
65491 - vips::VImage result;
65492 -
65493 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Lab2LCh",&obj0)) SWIG_fail;
65494 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65495 - if (!SWIG_IsOK(res1)) {
65496 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Lab2LCh" "', argument " "1"" of type '" "vips::VImage *""'");
65497 - }
65498 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65499 - try {
65500 - result = (arg1)->Lab2LCh();
65501 - }
65502 - catch(vips::VError &_e) {
65503 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65504 - }
65505 -
65506 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65507 - return resultobj;
65508 -fail:
65509 - return NULL;
65510 -}
65511 -
65512 -
65513 -SWIGINTERN PyObject *_wrap_VImage_Lab2LabQ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65514 - PyObject *resultobj = 0;
65515 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65516 - void *argp1 = 0 ;
65517 - int res1 = 0 ;
65518 - PyObject * obj0 = 0 ;
65519 - vips::VImage result;
65520 -
65521 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Lab2LabQ",&obj0)) SWIG_fail;
65522 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65523 - if (!SWIG_IsOK(res1)) {
65524 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Lab2LabQ" "', argument " "1"" of type '" "vips::VImage *""'");
65525 - }
65526 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65527 - try {
65528 - result = (arg1)->Lab2LabQ();
65529 - }
65530 - catch(vips::VError &_e) {
65531 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65532 - }
65533 -
65534 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65535 - return resultobj;
65536 -fail:
65537 - return NULL;
65538 -}
65539 -
65540 -
65541 -SWIGINTERN PyObject *_wrap_VImage_Lab2LabS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65542 - PyObject *resultobj = 0;
65543 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65544 - void *argp1 = 0 ;
65545 - int res1 = 0 ;
65546 - PyObject * obj0 = 0 ;
65547 - vips::VImage result;
65548 -
65549 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Lab2LabS",&obj0)) SWIG_fail;
65550 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65551 - if (!SWIG_IsOK(res1)) {
65552 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Lab2LabS" "', argument " "1"" of type '" "vips::VImage *""'");
65553 - }
65554 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65555 - try {
65556 - result = (arg1)->Lab2LabS();
65557 - }
65558 - catch(vips::VError &_e) {
65559 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65560 - }
65561 -
65562 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65563 - return resultobj;
65564 -fail:
65565 - return NULL;
65566 -}
65567 -
65568 -
65569 -SWIGINTERN PyObject *_wrap_VImage_Lab2UCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65570 - PyObject *resultobj = 0;
65571 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65572 - void *argp1 = 0 ;
65573 - int res1 = 0 ;
65574 - PyObject * obj0 = 0 ;
65575 - vips::VImage result;
65576 -
65577 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Lab2UCS",&obj0)) SWIG_fail;
65578 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65579 - if (!SWIG_IsOK(res1)) {
65580 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Lab2UCS" "', argument " "1"" of type '" "vips::VImage *""'");
65581 - }
65582 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65583 - try {
65584 - result = (arg1)->Lab2UCS();
65585 - }
65586 - catch(vips::VError &_e) {
65587 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65588 - }
65589 -
65590 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65591 - return resultobj;
65592 -fail:
65593 - return NULL;
65594 -}
65595 -
65596 -
65597 -SWIGINTERN PyObject *_wrap_VImage_Lab2XYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65598 - PyObject *resultobj = 0;
65599 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65600 - void *argp1 = 0 ;
65601 - int res1 = 0 ;
65602 - PyObject * obj0 = 0 ;
65603 - vips::VImage result;
65604 -
65605 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Lab2XYZ",&obj0)) SWIG_fail;
65606 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65607 - if (!SWIG_IsOK(res1)) {
65608 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Lab2XYZ" "', argument " "1"" of type '" "vips::VImage *""'");
65609 - }
65610 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65611 - try {
65612 - result = (arg1)->Lab2XYZ();
65613 - }
65614 - catch(vips::VError &_e) {
65615 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65616 - }
65617 -
65618 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65619 - return resultobj;
65620 -fail:
65621 - return NULL;
65622 -}
65623 -
65624 -
65625 -SWIGINTERN PyObject *_wrap_VImage_Lab2XYZ_temp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65626 - PyObject *resultobj = 0;
65627 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65628 - double arg2 ;
65629 - double arg3 ;
65630 - double arg4 ;
65631 - void *argp1 = 0 ;
65632 - int res1 = 0 ;
65633 - double val2 ;
65634 - int ecode2 = 0 ;
65635 - double val3 ;
65636 - int ecode3 = 0 ;
65637 - double val4 ;
65638 - int ecode4 = 0 ;
65639 - PyObject * obj0 = 0 ;
65640 - PyObject * obj1 = 0 ;
65641 - PyObject * obj2 = 0 ;
65642 - PyObject * obj3 = 0 ;
65643 - vips::VImage result;
65644 -
65645 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_Lab2XYZ_temp",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
65646 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65647 - if (!SWIG_IsOK(res1)) {
65648 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Lab2XYZ_temp" "', argument " "1"" of type '" "vips::VImage *""'");
65649 - }
65650 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65651 - ecode2 = SWIG_AsVal_double(obj1, &val2);
65652 - if (!SWIG_IsOK(ecode2)) {
65653 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_Lab2XYZ_temp" "', argument " "2"" of type '" "double""'");
65654 - }
65655 - arg2 = static_cast< double >(val2);
65656 - ecode3 = SWIG_AsVal_double(obj2, &val3);
65657 - if (!SWIG_IsOK(ecode3)) {
65658 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_Lab2XYZ_temp" "', argument " "3"" of type '" "double""'");
65659 - }
65660 - arg3 = static_cast< double >(val3);
65661 - ecode4 = SWIG_AsVal_double(obj3, &val4);
65662 - if (!SWIG_IsOK(ecode4)) {
65663 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_Lab2XYZ_temp" "', argument " "4"" of type '" "double""'");
65664 - }
65665 - arg4 = static_cast< double >(val4);
65666 - try {
65667 - result = (arg1)->Lab2XYZ_temp(arg2,arg3,arg4);
65668 - }
65669 - catch(vips::VError &_e) {
65670 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65671 - }
65672 -
65673 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65674 - return resultobj;
65675 -fail:
65676 - return NULL;
65677 -}
65678 -
65679 -
65680 -SWIGINTERN PyObject *_wrap_VImage_Lab2disp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65681 - PyObject *resultobj = 0;
65682 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65683 - vips::VDisplay arg2 ;
65684 - void *argp1 = 0 ;
65685 - int res1 = 0 ;
65686 - void *argp2 ;
65687 - int res2 = 0 ;
65688 - PyObject * obj0 = 0 ;
65689 - PyObject * obj1 = 0 ;
65690 - vips::VImage result;
65691 -
65692 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_Lab2disp",&obj0,&obj1)) SWIG_fail;
65693 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65694 - if (!SWIG_IsOK(res1)) {
65695 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Lab2disp" "', argument " "1"" of type '" "vips::VImage *""'");
65696 - }
65697 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65698 - {
65699 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDisplay, 0 | 0);
65700 - if (!SWIG_IsOK(res2)) {
65701 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_Lab2disp" "', argument " "2"" of type '" "vips::VDisplay""'");
65702 - }
65703 - if (!argp2) {
65704 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_Lab2disp" "', argument " "2"" of type '" "vips::VDisplay""'");
65705 - } else {
65706 - vips::VDisplay * temp = reinterpret_cast< vips::VDisplay * >(argp2);
65707 - arg2 = *temp;
65708 - if (SWIG_IsNewObj(res2)) delete temp;
65709 - }
65710 - }
65711 - try {
65712 - result = (arg1)->Lab2disp(arg2);
65713 - }
65714 - catch(vips::VError &_e) {
65715 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65716 - }
65717 -
65718 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65719 - return resultobj;
65720 -fail:
65721 - return NULL;
65722 -}
65723 -
65724 -
65725 -SWIGINTERN PyObject *_wrap_VImage_LabQ2LabS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65726 - PyObject *resultobj = 0;
65727 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65728 - void *argp1 = 0 ;
65729 - int res1 = 0 ;
65730 - PyObject * obj0 = 0 ;
65731 - vips::VImage result;
65732 -
65733 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_LabQ2LabS",&obj0)) SWIG_fail;
65734 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65735 - if (!SWIG_IsOK(res1)) {
65736 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LabQ2LabS" "', argument " "1"" of type '" "vips::VImage *""'");
65737 - }
65738 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65739 - try {
65740 - result = (arg1)->LabQ2LabS();
65741 - }
65742 - catch(vips::VError &_e) {
65743 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65744 - }
65745 -
65746 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65747 - return resultobj;
65748 -fail:
65749 - return NULL;
65750 -}
65751 -
65752 -
65753 -SWIGINTERN PyObject *_wrap_VImage_LabQ2Lab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65754 - PyObject *resultobj = 0;
65755 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65756 - void *argp1 = 0 ;
65757 - int res1 = 0 ;
65758 - PyObject * obj0 = 0 ;
65759 - vips::VImage result;
65760 -
65761 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_LabQ2Lab",&obj0)) SWIG_fail;
65762 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65763 - if (!SWIG_IsOK(res1)) {
65764 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LabQ2Lab" "', argument " "1"" of type '" "vips::VImage *""'");
65765 - }
65766 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65767 - try {
65768 - result = (arg1)->LabQ2Lab();
65769 - }
65770 - catch(vips::VError &_e) {
65771 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65772 - }
65773 -
65774 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65775 - return resultobj;
65776 -fail:
65777 - return NULL;
65778 -}
65779 -
65780 -
65781 -SWIGINTERN PyObject *_wrap_VImage_LabQ2XYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65782 - PyObject *resultobj = 0;
65783 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65784 - void *argp1 = 0 ;
65785 - int res1 = 0 ;
65786 - PyObject * obj0 = 0 ;
65787 - vips::VImage result;
65788 -
65789 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_LabQ2XYZ",&obj0)) SWIG_fail;
65790 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65791 - if (!SWIG_IsOK(res1)) {
65792 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LabQ2XYZ" "', argument " "1"" of type '" "vips::VImage *""'");
65793 - }
65794 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65795 - try {
65796 - result = (arg1)->LabQ2XYZ();
65797 - }
65798 - catch(vips::VError &_e) {
65799 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65800 - }
65801 -
65802 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65803 - return resultobj;
65804 -fail:
65805 - return NULL;
65806 -}
65807 -
65808 -
65809 -SWIGINTERN PyObject *_wrap_VImage_LabQ2disp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65810 - PyObject *resultobj = 0;
65811 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65812 - vips::VDisplay arg2 ;
65813 - void *argp1 = 0 ;
65814 - int res1 = 0 ;
65815 - void *argp2 ;
65816 - int res2 = 0 ;
65817 - PyObject * obj0 = 0 ;
65818 - PyObject * obj1 = 0 ;
65819 - vips::VImage result;
65820 -
65821 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_LabQ2disp",&obj0,&obj1)) SWIG_fail;
65822 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65823 - if (!SWIG_IsOK(res1)) {
65824 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LabQ2disp" "', argument " "1"" of type '" "vips::VImage *""'");
65825 - }
65826 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65827 - {
65828 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDisplay, 0 | 0);
65829 - if (!SWIG_IsOK(res2)) {
65830 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_LabQ2disp" "', argument " "2"" of type '" "vips::VDisplay""'");
65831 - }
65832 - if (!argp2) {
65833 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_LabQ2disp" "', argument " "2"" of type '" "vips::VDisplay""'");
65834 - } else {
65835 - vips::VDisplay * temp = reinterpret_cast< vips::VDisplay * >(argp2);
65836 - arg2 = *temp;
65837 - if (SWIG_IsNewObj(res2)) delete temp;
65838 - }
65839 - }
65840 - try {
65841 - result = (arg1)->LabQ2disp(arg2);
65842 - }
65843 - catch(vips::VError &_e) {
65844 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65845 - }
65846 -
65847 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65848 - return resultobj;
65849 -fail:
65850 - return NULL;
65851 -}
65852 -
65853 -
65854 -SWIGINTERN PyObject *_wrap_VImage_LabS2LabQ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65855 - PyObject *resultobj = 0;
65856 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65857 - void *argp1 = 0 ;
65858 - int res1 = 0 ;
65859 - PyObject * obj0 = 0 ;
65860 - vips::VImage result;
65861 -
65862 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_LabS2LabQ",&obj0)) SWIG_fail;
65863 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65864 - if (!SWIG_IsOK(res1)) {
65865 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LabS2LabQ" "', argument " "1"" of type '" "vips::VImage *""'");
65866 - }
65867 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65868 - try {
65869 - result = (arg1)->LabS2LabQ();
65870 - }
65871 - catch(vips::VError &_e) {
65872 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65873 - }
65874 -
65875 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65876 - return resultobj;
65877 -fail:
65878 - return NULL;
65879 -}
65880 -
65881 -
65882 -SWIGINTERN PyObject *_wrap_VImage_LabS2Lab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65883 - PyObject *resultobj = 0;
65884 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65885 - void *argp1 = 0 ;
65886 - int res1 = 0 ;
65887 - PyObject * obj0 = 0 ;
65888 - vips::VImage result;
65889 -
65890 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_LabS2Lab",&obj0)) SWIG_fail;
65891 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65892 - if (!SWIG_IsOK(res1)) {
65893 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LabS2Lab" "', argument " "1"" of type '" "vips::VImage *""'");
65894 - }
65895 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65896 - try {
65897 - result = (arg1)->LabS2Lab();
65898 - }
65899 - catch(vips::VError &_e) {
65900 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65901 - }
65902 -
65903 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65904 - return resultobj;
65905 -fail:
65906 - return NULL;
65907 -}
65908 -
65909 -
65910 -SWIGINTERN PyObject *_wrap_VImage_UCS2LCh(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65911 - PyObject *resultobj = 0;
65912 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65913 - void *argp1 = 0 ;
65914 - int res1 = 0 ;
65915 - PyObject * obj0 = 0 ;
65916 - vips::VImage result;
65917 -
65918 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_UCS2LCh",&obj0)) SWIG_fail;
65919 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65920 - if (!SWIG_IsOK(res1)) {
65921 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_UCS2LCh" "', argument " "1"" of type '" "vips::VImage *""'");
65922 - }
65923 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65924 - try {
65925 - result = (arg1)->UCS2LCh();
65926 - }
65927 - catch(vips::VError &_e) {
65928 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65929 - }
65930 -
65931 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65932 - return resultobj;
65933 -fail:
65934 - return NULL;
65935 -}
65936 -
65937 -
65938 -SWIGINTERN PyObject *_wrap_VImage_UCS2Lab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65939 - PyObject *resultobj = 0;
65940 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65941 - void *argp1 = 0 ;
65942 - int res1 = 0 ;
65943 - PyObject * obj0 = 0 ;
65944 - vips::VImage result;
65945 -
65946 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_UCS2Lab",&obj0)) SWIG_fail;
65947 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65948 - if (!SWIG_IsOK(res1)) {
65949 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_UCS2Lab" "', argument " "1"" of type '" "vips::VImage *""'");
65950 - }
65951 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65952 - try {
65953 - result = (arg1)->UCS2Lab();
65954 - }
65955 - catch(vips::VError &_e) {
65956 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65957 - }
65958 -
65959 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65960 - return resultobj;
65961 -fail:
65962 - return NULL;
65963 -}
65964 -
65965 -
65966 -SWIGINTERN PyObject *_wrap_VImage_UCS2XYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65967 - PyObject *resultobj = 0;
65968 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65969 - void *argp1 = 0 ;
65970 - int res1 = 0 ;
65971 - PyObject * obj0 = 0 ;
65972 - vips::VImage result;
65973 -
65974 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_UCS2XYZ",&obj0)) SWIG_fail;
65975 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
65976 - if (!SWIG_IsOK(res1)) {
65977 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_UCS2XYZ" "', argument " "1"" of type '" "vips::VImage *""'");
65978 - }
65979 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
65980 - try {
65981 - result = (arg1)->UCS2XYZ();
65982 - }
65983 - catch(vips::VError &_e) {
65984 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
65985 - }
65986 -
65987 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
65988 - return resultobj;
65989 -fail:
65990 - return NULL;
65991 -}
65992 -
65993 -
65994 -SWIGINTERN PyObject *_wrap_VImage_XYZ2Lab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65995 - PyObject *resultobj = 0;
65996 - vips::VImage *arg1 = (vips::VImage *) 0 ;
65997 - void *argp1 = 0 ;
65998 - int res1 = 0 ;
65999 - PyObject * obj0 = 0 ;
66000 - vips::VImage result;
66001 -
66002 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_XYZ2Lab",&obj0)) SWIG_fail;
66003 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66004 - if (!SWIG_IsOK(res1)) {
66005 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_XYZ2Lab" "', argument " "1"" of type '" "vips::VImage *""'");
66006 - }
66007 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66008 - try {
66009 - result = (arg1)->XYZ2Lab();
66010 - }
66011 - catch(vips::VError &_e) {
66012 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66013 - }
66014 -
66015 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66016 - return resultobj;
66017 -fail:
66018 - return NULL;
66019 -}
66020 -
66021 -
66022 -SWIGINTERN PyObject *_wrap_VImage_XYZ2Lab_temp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66023 - PyObject *resultobj = 0;
66024 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66025 - double arg2 ;
66026 - double arg3 ;
66027 - double arg4 ;
66028 - void *argp1 = 0 ;
66029 - int res1 = 0 ;
66030 - double val2 ;
66031 - int ecode2 = 0 ;
66032 - double val3 ;
66033 - int ecode3 = 0 ;
66034 - double val4 ;
66035 - int ecode4 = 0 ;
66036 - PyObject * obj0 = 0 ;
66037 - PyObject * obj1 = 0 ;
66038 - PyObject * obj2 = 0 ;
66039 - PyObject * obj3 = 0 ;
66040 - vips::VImage result;
66041 -
66042 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_XYZ2Lab_temp",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
66043 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66044 - if (!SWIG_IsOK(res1)) {
66045 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_XYZ2Lab_temp" "', argument " "1"" of type '" "vips::VImage *""'");
66046 - }
66047 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66048 - ecode2 = SWIG_AsVal_double(obj1, &val2);
66049 - if (!SWIG_IsOK(ecode2)) {
66050 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_XYZ2Lab_temp" "', argument " "2"" of type '" "double""'");
66051 - }
66052 - arg2 = static_cast< double >(val2);
66053 - ecode3 = SWIG_AsVal_double(obj2, &val3);
66054 - if (!SWIG_IsOK(ecode3)) {
66055 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_XYZ2Lab_temp" "', argument " "3"" of type '" "double""'");
66056 - }
66057 - arg3 = static_cast< double >(val3);
66058 - ecode4 = SWIG_AsVal_double(obj3, &val4);
66059 - if (!SWIG_IsOK(ecode4)) {
66060 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_XYZ2Lab_temp" "', argument " "4"" of type '" "double""'");
66061 - }
66062 - arg4 = static_cast< double >(val4);
66063 - try {
66064 - result = (arg1)->XYZ2Lab_temp(arg2,arg3,arg4);
66065 - }
66066 - catch(vips::VError &_e) {
66067 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66068 - }
66069 -
66070 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66071 - return resultobj;
66072 -fail:
66073 - return NULL;
66074 -}
66075 -
66076 -
66077 -SWIGINTERN PyObject *_wrap_VImage_XYZ2UCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66078 - PyObject *resultobj = 0;
66079 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66080 - void *argp1 = 0 ;
66081 - int res1 = 0 ;
66082 - PyObject * obj0 = 0 ;
66083 - vips::VImage result;
66084 -
66085 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_XYZ2UCS",&obj0)) SWIG_fail;
66086 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66087 - if (!SWIG_IsOK(res1)) {
66088 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_XYZ2UCS" "', argument " "1"" of type '" "vips::VImage *""'");
66089 - }
66090 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66091 - try {
66092 - result = (arg1)->XYZ2UCS();
66093 - }
66094 - catch(vips::VError &_e) {
66095 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66096 - }
66097 -
66098 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66099 - return resultobj;
66100 -fail:
66101 - return NULL;
66102 -}
66103 -
66104 -
66105 -SWIGINTERN PyObject *_wrap_VImage_XYZ2Yxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66106 - PyObject *resultobj = 0;
66107 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66108 - void *argp1 = 0 ;
66109 - int res1 = 0 ;
66110 - PyObject * obj0 = 0 ;
66111 - vips::VImage result;
66112 -
66113 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_XYZ2Yxy",&obj0)) SWIG_fail;
66114 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66115 - if (!SWIG_IsOK(res1)) {
66116 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_XYZ2Yxy" "', argument " "1"" of type '" "vips::VImage *""'");
66117 - }
66118 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66119 - try {
66120 - result = (arg1)->XYZ2Yxy();
66121 - }
66122 - catch(vips::VError &_e) {
66123 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66124 - }
66125 -
66126 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66127 - return resultobj;
66128 -fail:
66129 - return NULL;
66130 -}
66131 -
66132 -
66133 -SWIGINTERN PyObject *_wrap_VImage_XYZ2disp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66134 - PyObject *resultobj = 0;
66135 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66136 - vips::VDisplay arg2 ;
66137 - void *argp1 = 0 ;
66138 - int res1 = 0 ;
66139 - void *argp2 ;
66140 - int res2 = 0 ;
66141 - PyObject * obj0 = 0 ;
66142 - PyObject * obj1 = 0 ;
66143 - vips::VImage result;
66144 -
66145 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_XYZ2disp",&obj0,&obj1)) SWIG_fail;
66146 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66147 - if (!SWIG_IsOK(res1)) {
66148 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_XYZ2disp" "', argument " "1"" of type '" "vips::VImage *""'");
66149 - }
66150 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66151 - {
66152 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDisplay, 0 | 0);
66153 - if (!SWIG_IsOK(res2)) {
66154 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_XYZ2disp" "', argument " "2"" of type '" "vips::VDisplay""'");
66155 - }
66156 - if (!argp2) {
66157 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_XYZ2disp" "', argument " "2"" of type '" "vips::VDisplay""'");
66158 - } else {
66159 - vips::VDisplay * temp = reinterpret_cast< vips::VDisplay * >(argp2);
66160 - arg2 = *temp;
66161 - if (SWIG_IsNewObj(res2)) delete temp;
66162 - }
66163 - }
66164 - try {
66165 - result = (arg1)->XYZ2disp(arg2);
66166 - }
66167 - catch(vips::VError &_e) {
66168 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66169 - }
66170 -
66171 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66172 - return resultobj;
66173 -fail:
66174 - return NULL;
66175 -}
66176 -
66177 -
66178 -SWIGINTERN PyObject *_wrap_VImage_XYZ2sRGB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66179 - PyObject *resultobj = 0;
66180 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66181 - void *argp1 = 0 ;
66182 - int res1 = 0 ;
66183 - PyObject * obj0 = 0 ;
66184 - vips::VImage result;
66185 -
66186 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_XYZ2sRGB",&obj0)) SWIG_fail;
66187 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66188 - if (!SWIG_IsOK(res1)) {
66189 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_XYZ2sRGB" "', argument " "1"" of type '" "vips::VImage *""'");
66190 - }
66191 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66192 - try {
66193 - result = (arg1)->XYZ2sRGB();
66194 - }
66195 - catch(vips::VError &_e) {
66196 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66197 - }
66198 -
66199 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66200 - return resultobj;
66201 -fail:
66202 - return NULL;
66203 -}
66204 -
66205 -
66206 -SWIGINTERN PyObject *_wrap_VImage_Yxy2XYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66207 - PyObject *resultobj = 0;
66208 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66209 - void *argp1 = 0 ;
66210 - int res1 = 0 ;
66211 - PyObject * obj0 = 0 ;
66212 - vips::VImage result;
66213 -
66214 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Yxy2XYZ",&obj0)) SWIG_fail;
66215 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66216 - if (!SWIG_IsOK(res1)) {
66217 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Yxy2XYZ" "', argument " "1"" of type '" "vips::VImage *""'");
66218 - }
66219 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66220 - try {
66221 - result = (arg1)->Yxy2XYZ();
66222 - }
66223 - catch(vips::VError &_e) {
66224 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66225 - }
66226 -
66227 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66228 - return resultobj;
66229 -fail:
66230 - return NULL;
66231 -}
66232 -
66233 -
66234 -SWIGINTERN PyObject *_wrap_VImage_dE00_fromLab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66235 - PyObject *resultobj = 0;
66236 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66237 - vips::VImage arg2 ;
66238 - void *argp1 = 0 ;
66239 - int res1 = 0 ;
66240 - void *argp2 ;
66241 - int res2 = 0 ;
66242 - PyObject * obj0 = 0 ;
66243 - PyObject * obj1 = 0 ;
66244 - vips::VImage result;
66245 -
66246 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_dE00_fromLab",&obj0,&obj1)) SWIG_fail;
66247 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66248 - if (!SWIG_IsOK(res1)) {
66249 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dE00_fromLab" "', argument " "1"" of type '" "vips::VImage *""'");
66250 - }
66251 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66252 - {
66253 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
66254 - if (!SWIG_IsOK(res2)) {
66255 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dE00_fromLab" "', argument " "2"" of type '" "vips::VImage""'");
66256 - }
66257 - if (!argp2) {
66258 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dE00_fromLab" "', argument " "2"" of type '" "vips::VImage""'");
66259 - } else {
66260 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
66261 - arg2 = *temp;
66262 - if (SWIG_IsNewObj(res2)) delete temp;
66263 - }
66264 - }
66265 - try {
66266 - result = (arg1)->dE00_fromLab(arg2);
66267 - }
66268 - catch(vips::VError &_e) {
66269 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66270 - }
66271 -
66272 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66273 - return resultobj;
66274 -fail:
66275 - return NULL;
66276 -}
66277 -
66278 -
66279 -SWIGINTERN PyObject *_wrap_VImage_dECMC_fromLab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66280 - PyObject *resultobj = 0;
66281 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66282 - vips::VImage arg2 ;
66283 - void *argp1 = 0 ;
66284 - int res1 = 0 ;
66285 - void *argp2 ;
66286 - int res2 = 0 ;
66287 - PyObject * obj0 = 0 ;
66288 - PyObject * obj1 = 0 ;
66289 - vips::VImage result;
66290 -
66291 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_dECMC_fromLab",&obj0,&obj1)) SWIG_fail;
66292 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66293 - if (!SWIG_IsOK(res1)) {
66294 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dECMC_fromLab" "', argument " "1"" of type '" "vips::VImage *""'");
66295 - }
66296 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66297 - {
66298 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
66299 - if (!SWIG_IsOK(res2)) {
66300 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dECMC_fromLab" "', argument " "2"" of type '" "vips::VImage""'");
66301 - }
66302 - if (!argp2) {
66303 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dECMC_fromLab" "', argument " "2"" of type '" "vips::VImage""'");
66304 - } else {
66305 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
66306 - arg2 = *temp;
66307 - if (SWIG_IsNewObj(res2)) delete temp;
66308 - }
66309 - }
66310 - try {
66311 - result = (arg1)->dECMC_fromLab(arg2);
66312 - }
66313 - catch(vips::VError &_e) {
66314 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66315 - }
66316 -
66317 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66318 - return resultobj;
66319 -fail:
66320 - return NULL;
66321 -}
66322 -
66323 -
66324 -SWIGINTERN PyObject *_wrap_VImage_dECMC_fromdisp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66325 - PyObject *resultobj = 0;
66326 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66327 - vips::VImage arg2 ;
66328 - vips::VDisplay arg3 ;
66329 - void *argp1 = 0 ;
66330 - int res1 = 0 ;
66331 - void *argp2 ;
66332 - int res2 = 0 ;
66333 - void *argp3 ;
66334 - int res3 = 0 ;
66335 - PyObject * obj0 = 0 ;
66336 - PyObject * obj1 = 0 ;
66337 - PyObject * obj2 = 0 ;
66338 - vips::VImage result;
66339 -
66340 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_dECMC_fromdisp",&obj0,&obj1,&obj2)) SWIG_fail;
66341 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66342 - if (!SWIG_IsOK(res1)) {
66343 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dECMC_fromdisp" "', argument " "1"" of type '" "vips::VImage *""'");
66344 - }
66345 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66346 - {
66347 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
66348 - if (!SWIG_IsOK(res2)) {
66349 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dECMC_fromdisp" "', argument " "2"" of type '" "vips::VImage""'");
66350 - }
66351 - if (!argp2) {
66352 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dECMC_fromdisp" "', argument " "2"" of type '" "vips::VImage""'");
66353 - } else {
66354 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
66355 - arg2 = *temp;
66356 - if (SWIG_IsNewObj(res2)) delete temp;
66357 - }
66358 - }
66359 - {
66360 - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VDisplay, 0 | 0);
66361 - if (!SWIG_IsOK(res3)) {
66362 - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_dECMC_fromdisp" "', argument " "3"" of type '" "vips::VDisplay""'");
66363 - }
66364 - if (!argp3) {
66365 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dECMC_fromdisp" "', argument " "3"" of type '" "vips::VDisplay""'");
66366 - } else {
66367 - vips::VDisplay * temp = reinterpret_cast< vips::VDisplay * >(argp3);
66368 - arg3 = *temp;
66369 - if (SWIG_IsNewObj(res3)) delete temp;
66370 - }
66371 - }
66372 - try {
66373 - result = (arg1)->dECMC_fromdisp(arg2,arg3);
66374 - }
66375 - catch(vips::VError &_e) {
66376 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66377 - }
66378 -
66379 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66380 - return resultobj;
66381 -fail:
66382 - return NULL;
66383 -}
66384 -
66385 -
66386 -SWIGINTERN PyObject *_wrap_VImage_dE_fromLab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66387 - PyObject *resultobj = 0;
66388 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66389 - vips::VImage arg2 ;
66390 - void *argp1 = 0 ;
66391 - int res1 = 0 ;
66392 - void *argp2 ;
66393 - int res2 = 0 ;
66394 - PyObject * obj0 = 0 ;
66395 - PyObject * obj1 = 0 ;
66396 - vips::VImage result;
66397 -
66398 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_dE_fromLab",&obj0,&obj1)) SWIG_fail;
66399 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66400 - if (!SWIG_IsOK(res1)) {
66401 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dE_fromLab" "', argument " "1"" of type '" "vips::VImage *""'");
66402 - }
66403 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66404 - {
66405 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
66406 - if (!SWIG_IsOK(res2)) {
66407 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dE_fromLab" "', argument " "2"" of type '" "vips::VImage""'");
66408 - }
66409 - if (!argp2) {
66410 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dE_fromLab" "', argument " "2"" of type '" "vips::VImage""'");
66411 - } else {
66412 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
66413 - arg2 = *temp;
66414 - if (SWIG_IsNewObj(res2)) delete temp;
66415 - }
66416 - }
66417 - try {
66418 - result = (arg1)->dE_fromLab(arg2);
66419 - }
66420 - catch(vips::VError &_e) {
66421 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66422 - }
66423 -
66424 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66425 - return resultobj;
66426 -fail:
66427 - return NULL;
66428 -}
66429 -
66430 -
66431 -SWIGINTERN PyObject *_wrap_VImage_dE_fromXYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66432 - PyObject *resultobj = 0;
66433 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66434 - vips::VImage arg2 ;
66435 - void *argp1 = 0 ;
66436 - int res1 = 0 ;
66437 - void *argp2 ;
66438 - int res2 = 0 ;
66439 - PyObject * obj0 = 0 ;
66440 - PyObject * obj1 = 0 ;
66441 - vips::VImage result;
66442 -
66443 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_dE_fromXYZ",&obj0,&obj1)) SWIG_fail;
66444 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66445 - if (!SWIG_IsOK(res1)) {
66446 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dE_fromXYZ" "', argument " "1"" of type '" "vips::VImage *""'");
66447 - }
66448 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66449 - {
66450 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
66451 - if (!SWIG_IsOK(res2)) {
66452 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dE_fromXYZ" "', argument " "2"" of type '" "vips::VImage""'");
66453 - }
66454 - if (!argp2) {
66455 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dE_fromXYZ" "', argument " "2"" of type '" "vips::VImage""'");
66456 - } else {
66457 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
66458 - arg2 = *temp;
66459 - if (SWIG_IsNewObj(res2)) delete temp;
66460 - }
66461 - }
66462 - try {
66463 - result = (arg1)->dE_fromXYZ(arg2);
66464 - }
66465 - catch(vips::VError &_e) {
66466 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66467 - }
66468 -
66469 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66470 - return resultobj;
66471 -fail:
66472 - return NULL;
66473 -}
66474 -
66475 -
66476 -SWIGINTERN PyObject *_wrap_VImage_dE_fromdisp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66477 - PyObject *resultobj = 0;
66478 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66479 - vips::VImage arg2 ;
66480 - vips::VDisplay arg3 ;
66481 - void *argp1 = 0 ;
66482 - int res1 = 0 ;
66483 - void *argp2 ;
66484 - int res2 = 0 ;
66485 - void *argp3 ;
66486 - int res3 = 0 ;
66487 - PyObject * obj0 = 0 ;
66488 - PyObject * obj1 = 0 ;
66489 - PyObject * obj2 = 0 ;
66490 - vips::VImage result;
66491 -
66492 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_dE_fromdisp",&obj0,&obj1,&obj2)) SWIG_fail;
66493 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66494 - if (!SWIG_IsOK(res1)) {
66495 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dE_fromdisp" "', argument " "1"" of type '" "vips::VImage *""'");
66496 - }
66497 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66498 - {
66499 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
66500 - if (!SWIG_IsOK(res2)) {
66501 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dE_fromdisp" "', argument " "2"" of type '" "vips::VImage""'");
66502 - }
66503 - if (!argp2) {
66504 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dE_fromdisp" "', argument " "2"" of type '" "vips::VImage""'");
66505 - } else {
66506 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
66507 - arg2 = *temp;
66508 - if (SWIG_IsNewObj(res2)) delete temp;
66509 - }
66510 - }
66511 - {
66512 - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VDisplay, 0 | 0);
66513 - if (!SWIG_IsOK(res3)) {
66514 - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_dE_fromdisp" "', argument " "3"" of type '" "vips::VDisplay""'");
66515 - }
66516 - if (!argp3) {
66517 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dE_fromdisp" "', argument " "3"" of type '" "vips::VDisplay""'");
66518 - } else {
66519 - vips::VDisplay * temp = reinterpret_cast< vips::VDisplay * >(argp3);
66520 - arg3 = *temp;
66521 - if (SWIG_IsNewObj(res3)) delete temp;
66522 - }
66523 - }
66524 - try {
66525 - result = (arg1)->dE_fromdisp(arg2,arg3);
66526 - }
66527 - catch(vips::VError &_e) {
66528 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66529 - }
66530 -
66531 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66532 - return resultobj;
66533 -fail:
66534 - return NULL;
66535 -}
66536 -
66537 -
66538 -SWIGINTERN PyObject *_wrap_VImage_disp2Lab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66539 - PyObject *resultobj = 0;
66540 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66541 - vips::VDisplay arg2 ;
66542 - void *argp1 = 0 ;
66543 - int res1 = 0 ;
66544 - void *argp2 ;
66545 - int res2 = 0 ;
66546 - PyObject * obj0 = 0 ;
66547 - PyObject * obj1 = 0 ;
66548 - vips::VImage result;
66549 -
66550 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_disp2Lab",&obj0,&obj1)) SWIG_fail;
66551 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66552 - if (!SWIG_IsOK(res1)) {
66553 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_disp2Lab" "', argument " "1"" of type '" "vips::VImage *""'");
66554 - }
66555 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66556 - {
66557 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDisplay, 0 | 0);
66558 - if (!SWIG_IsOK(res2)) {
66559 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_disp2Lab" "', argument " "2"" of type '" "vips::VDisplay""'");
66560 - }
66561 - if (!argp2) {
66562 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_disp2Lab" "', argument " "2"" of type '" "vips::VDisplay""'");
66563 - } else {
66564 - vips::VDisplay * temp = reinterpret_cast< vips::VDisplay * >(argp2);
66565 - arg2 = *temp;
66566 - if (SWIG_IsNewObj(res2)) delete temp;
66567 - }
66568 - }
66569 - try {
66570 - result = (arg1)->disp2Lab(arg2);
66571 - }
66572 - catch(vips::VError &_e) {
66573 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66574 - }
66575 -
66576 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66577 - return resultobj;
66578 -fail:
66579 - return NULL;
66580 -}
66581 -
66582 -
66583 -SWIGINTERN PyObject *_wrap_VImage_disp2XYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66584 - PyObject *resultobj = 0;
66585 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66586 - vips::VDisplay arg2 ;
66587 - void *argp1 = 0 ;
66588 - int res1 = 0 ;
66589 - void *argp2 ;
66590 - int res2 = 0 ;
66591 - PyObject * obj0 = 0 ;
66592 - PyObject * obj1 = 0 ;
66593 - vips::VImage result;
66594 -
66595 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_disp2XYZ",&obj0,&obj1)) SWIG_fail;
66596 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66597 - if (!SWIG_IsOK(res1)) {
66598 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_disp2XYZ" "', argument " "1"" of type '" "vips::VImage *""'");
66599 - }
66600 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66601 - {
66602 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDisplay, 0 | 0);
66603 - if (!SWIG_IsOK(res2)) {
66604 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_disp2XYZ" "', argument " "2"" of type '" "vips::VDisplay""'");
66605 - }
66606 - if (!argp2) {
66607 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_disp2XYZ" "', argument " "2"" of type '" "vips::VDisplay""'");
66608 - } else {
66609 - vips::VDisplay * temp = reinterpret_cast< vips::VDisplay * >(argp2);
66610 - arg2 = *temp;
66611 - if (SWIG_IsNewObj(res2)) delete temp;
66612 - }
66613 - }
66614 - try {
66615 - result = (arg1)->disp2XYZ(arg2);
66616 - }
66617 - catch(vips::VError &_e) {
66618 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66619 - }
66620 -
66621 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66622 - return resultobj;
66623 -fail:
66624 - return NULL;
66625 -}
66626 -
66627 -
66628 -SWIGINTERN PyObject *_wrap_VImage_float2rad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66629 - PyObject *resultobj = 0;
66630 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66631 - void *argp1 = 0 ;
66632 - int res1 = 0 ;
66633 - PyObject * obj0 = 0 ;
66634 - vips::VImage result;
66635 -
66636 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_float2rad",&obj0)) SWIG_fail;
66637 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66638 - if (!SWIG_IsOK(res1)) {
66639 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_float2rad" "', argument " "1"" of type '" "vips::VImage *""'");
66640 - }
66641 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66642 - try {
66643 - result = (arg1)->float2rad();
66644 - }
66645 - catch(vips::VError &_e) {
66646 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66647 - }
66648 -
66649 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66650 - return resultobj;
66651 -fail:
66652 - return NULL;
66653 -}
66654 -
66655 -
66656 -SWIGINTERN PyObject *_wrap_VImage_icc_ac2rc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66657 - PyObject *resultobj = 0;
66658 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66659 - char *arg2 = (char *) 0 ;
66660 - void *argp1 = 0 ;
66661 - int res1 = 0 ;
66662 - int res2 ;
66663 - char *buf2 = 0 ;
66664 - int alloc2 = 0 ;
66665 - PyObject * obj0 = 0 ;
66666 - PyObject * obj1 = 0 ;
66667 - vips::VImage result;
66668 -
66669 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_icc_ac2rc",&obj0,&obj1)) SWIG_fail;
66670 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66671 - if (!SWIG_IsOK(res1)) {
66672 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_icc_ac2rc" "', argument " "1"" of type '" "vips::VImage *""'");
66673 - }
66674 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66675 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
66676 - if (!SWIG_IsOK(res2)) {
66677 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_icc_ac2rc" "', argument " "2"" of type '" "char *""'");
66678 - }
66679 - arg2 = reinterpret_cast< char * >(buf2);
66680 - try {
66681 - result = (arg1)->icc_ac2rc(arg2);
66682 - }
66683 - catch(vips::VError &_e) {
66684 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66685 - }
66686 -
66687 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66688 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
66689 - return resultobj;
66690 -fail:
66691 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
66692 - return NULL;
66693 -}
66694 -
66695 -
66696 -SWIGINTERN PyObject *_wrap_VImage_icc_export_depth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66697 - PyObject *resultobj = 0;
66698 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66699 - int arg2 ;
66700 - char *arg3 = (char *) 0 ;
66701 - int arg4 ;
66702 - void *argp1 = 0 ;
66703 - int res1 = 0 ;
66704 - int val2 ;
66705 - int ecode2 = 0 ;
66706 - int res3 ;
66707 - char *buf3 = 0 ;
66708 - int alloc3 = 0 ;
66709 - int val4 ;
66710 - int ecode4 = 0 ;
66711 - PyObject * obj0 = 0 ;
66712 - PyObject * obj1 = 0 ;
66713 - PyObject * obj2 = 0 ;
66714 - PyObject * obj3 = 0 ;
66715 - vips::VImage result;
66716 -
66717 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_icc_export_depth",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
66718 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66719 - if (!SWIG_IsOK(res1)) {
66720 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_icc_export_depth" "', argument " "1"" of type '" "vips::VImage *""'");
66721 - }
66722 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66723 - ecode2 = SWIG_AsVal_int(obj1, &val2);
66724 - if (!SWIG_IsOK(ecode2)) {
66725 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_icc_export_depth" "', argument " "2"" of type '" "int""'");
66726 - }
66727 - arg2 = static_cast< int >(val2);
66728 - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
66729 - if (!SWIG_IsOK(res3)) {
66730 - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_icc_export_depth" "', argument " "3"" of type '" "char *""'");
66731 - }
66732 - arg3 = reinterpret_cast< char * >(buf3);
66733 - ecode4 = SWIG_AsVal_int(obj3, &val4);
66734 - if (!SWIG_IsOK(ecode4)) {
66735 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_icc_export_depth" "', argument " "4"" of type '" "int""'");
66736 - }
66737 - arg4 = static_cast< int >(val4);
66738 - try {
66739 - result = (arg1)->icc_export_depth(arg2,arg3,arg4);
66740 - }
66741 - catch(vips::VError &_e) {
66742 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66743 - }
66744 -
66745 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66746 - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
66747 - return resultobj;
66748 -fail:
66749 - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
66750 - return NULL;
66751 -}
66752 -
66753 -
66754 -SWIGINTERN PyObject *_wrap_VImage_icc_import(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66755 - PyObject *resultobj = 0;
66756 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66757 - char *arg2 = (char *) 0 ;
66758 - int arg3 ;
66759 - void *argp1 = 0 ;
66760 - int res1 = 0 ;
66761 - int res2 ;
66762 - char *buf2 = 0 ;
66763 - int alloc2 = 0 ;
66764 - int val3 ;
66765 - int ecode3 = 0 ;
66766 - PyObject * obj0 = 0 ;
66767 - PyObject * obj1 = 0 ;
66768 - PyObject * obj2 = 0 ;
66769 - vips::VImage result;
66770 -
66771 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_icc_import",&obj0,&obj1,&obj2)) SWIG_fail;
66772 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66773 - if (!SWIG_IsOK(res1)) {
66774 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_icc_import" "', argument " "1"" of type '" "vips::VImage *""'");
66775 - }
66776 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66777 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
66778 - if (!SWIG_IsOK(res2)) {
66779 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_icc_import" "', argument " "2"" of type '" "char *""'");
66780 - }
66781 - arg2 = reinterpret_cast< char * >(buf2);
66782 - ecode3 = SWIG_AsVal_int(obj2, &val3);
66783 - if (!SWIG_IsOK(ecode3)) {
66784 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_icc_import" "', argument " "3"" of type '" "int""'");
66785 - }
66786 - arg3 = static_cast< int >(val3);
66787 - try {
66788 - result = (arg1)->icc_import(arg2,arg3);
66789 - }
66790 - catch(vips::VError &_e) {
66791 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66792 - }
66793 -
66794 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66795 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
66796 - return resultobj;
66797 -fail:
66798 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
66799 - return NULL;
66800 -}
66801 -
66802 -
66803 -SWIGINTERN PyObject *_wrap_VImage_icc_import_embedded(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66804 - PyObject *resultobj = 0;
66805 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66806 - int arg2 ;
66807 - void *argp1 = 0 ;
66808 - int res1 = 0 ;
66809 - int val2 ;
66810 - int ecode2 = 0 ;
66811 - PyObject * obj0 = 0 ;
66812 - PyObject * obj1 = 0 ;
66813 - vips::VImage result;
66814 -
66815 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_icc_import_embedded",&obj0,&obj1)) SWIG_fail;
66816 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66817 - if (!SWIG_IsOK(res1)) {
66818 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_icc_import_embedded" "', argument " "1"" of type '" "vips::VImage *""'");
66819 - }
66820 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66821 - ecode2 = SWIG_AsVal_int(obj1, &val2);
66822 - if (!SWIG_IsOK(ecode2)) {
66823 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_icc_import_embedded" "', argument " "2"" of type '" "int""'");
66824 - }
66825 - arg2 = static_cast< int >(val2);
66826 - try {
66827 - result = (arg1)->icc_import_embedded(arg2);
66828 - }
66829 - catch(vips::VError &_e) {
66830 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66831 - }
66832 -
66833 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66834 - return resultobj;
66835 -fail:
66836 - return NULL;
66837 -}
66838 -
66839 -
66840 -SWIGINTERN PyObject *_wrap_VImage_icc_transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66841 - PyObject *resultobj = 0;
66842 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66843 - char *arg2 = (char *) 0 ;
66844 - char *arg3 = (char *) 0 ;
66845 - int arg4 ;
66846 - void *argp1 = 0 ;
66847 - int res1 = 0 ;
66848 - int res2 ;
66849 - char *buf2 = 0 ;
66850 - int alloc2 = 0 ;
66851 - int res3 ;
66852 - char *buf3 = 0 ;
66853 - int alloc3 = 0 ;
66854 - int val4 ;
66855 - int ecode4 = 0 ;
66856 - PyObject * obj0 = 0 ;
66857 - PyObject * obj1 = 0 ;
66858 - PyObject * obj2 = 0 ;
66859 - PyObject * obj3 = 0 ;
66860 - vips::VImage result;
66861 -
66862 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_icc_transform",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
66863 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66864 - if (!SWIG_IsOK(res1)) {
66865 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_icc_transform" "', argument " "1"" of type '" "vips::VImage *""'");
66866 - }
66867 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66868 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
66869 - if (!SWIG_IsOK(res2)) {
66870 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_icc_transform" "', argument " "2"" of type '" "char *""'");
66871 - }
66872 - arg2 = reinterpret_cast< char * >(buf2);
66873 - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
66874 - if (!SWIG_IsOK(res3)) {
66875 - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_icc_transform" "', argument " "3"" of type '" "char *""'");
66876 - }
66877 - arg3 = reinterpret_cast< char * >(buf3);
66878 - ecode4 = SWIG_AsVal_int(obj3, &val4);
66879 - if (!SWIG_IsOK(ecode4)) {
66880 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_icc_transform" "', argument " "4"" of type '" "int""'");
66881 - }
66882 - arg4 = static_cast< int >(val4);
66883 - try {
66884 - result = (arg1)->icc_transform(arg2,arg3,arg4);
66885 - }
66886 - catch(vips::VError &_e) {
66887 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66888 - }
66889 -
66890 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66891 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
66892 - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
66893 - return resultobj;
66894 -fail:
66895 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
66896 - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
66897 - return NULL;
66898 -}
66899 -
66900 -
66901 -SWIGINTERN PyObject *_wrap_VImage_lab_morph(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66902 - PyObject *resultobj = 0;
66903 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66904 - vips::VDMask arg2 ;
66905 - double arg3 ;
66906 - double arg4 ;
66907 - double arg5 ;
66908 - double arg6 ;
66909 - void *argp1 = 0 ;
66910 - int res1 = 0 ;
66911 - void *argp2 ;
66912 - int res2 = 0 ;
66913 - double val3 ;
66914 - int ecode3 = 0 ;
66915 - double val4 ;
66916 - int ecode4 = 0 ;
66917 - double val5 ;
66918 - int ecode5 = 0 ;
66919 - double val6 ;
66920 - int ecode6 = 0 ;
66921 - PyObject * obj0 = 0 ;
66922 - PyObject * obj1 = 0 ;
66923 - PyObject * obj2 = 0 ;
66924 - PyObject * obj3 = 0 ;
66925 - PyObject * obj4 = 0 ;
66926 - PyObject * obj5 = 0 ;
66927 - vips::VImage result;
66928 -
66929 - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:VImage_lab_morph",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
66930 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66931 - if (!SWIG_IsOK(res1)) {
66932 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lab_morph" "', argument " "1"" of type '" "vips::VImage *""'");
66933 - }
66934 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66935 - {
66936 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
66937 - if (!SWIG_IsOK(res2)) {
66938 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lab_morph" "', argument " "2"" of type '" "vips::VDMask""'");
66939 - }
66940 - if (!argp2) {
66941 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lab_morph" "', argument " "2"" of type '" "vips::VDMask""'");
66942 - } else {
66943 - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
66944 - arg2 = *temp;
66945 - if (SWIG_IsNewObj(res2)) delete temp;
66946 - }
66947 - }
66948 - ecode3 = SWIG_AsVal_double(obj2, &val3);
66949 - if (!SWIG_IsOK(ecode3)) {
66950 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lab_morph" "', argument " "3"" of type '" "double""'");
66951 - }
66952 - arg3 = static_cast< double >(val3);
66953 - ecode4 = SWIG_AsVal_double(obj3, &val4);
66954 - if (!SWIG_IsOK(ecode4)) {
66955 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_lab_morph" "', argument " "4"" of type '" "double""'");
66956 - }
66957 - arg4 = static_cast< double >(val4);
66958 - ecode5 = SWIG_AsVal_double(obj4, &val5);
66959 - if (!SWIG_IsOK(ecode5)) {
66960 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_lab_morph" "', argument " "5"" of type '" "double""'");
66961 - }
66962 - arg5 = static_cast< double >(val5);
66963 - ecode6 = SWIG_AsVal_double(obj5, &val6);
66964 - if (!SWIG_IsOK(ecode6)) {
66965 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_lab_morph" "', argument " "6"" of type '" "double""'");
66966 - }
66967 - arg6 = static_cast< double >(val6);
66968 - try {
66969 - result = (arg1)->lab_morph(arg2,arg3,arg4,arg5,arg6);
66970 - }
66971 - catch(vips::VError &_e) {
66972 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
66973 - }
66974 -
66975 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
66976 - return resultobj;
66977 -fail:
66978 - return NULL;
66979 -}
66980 -
66981 -
66982 -SWIGINTERN PyObject *_wrap_VImage_rad2float(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66983 - PyObject *resultobj = 0;
66984 - vips::VImage *arg1 = (vips::VImage *) 0 ;
66985 - void *argp1 = 0 ;
66986 - int res1 = 0 ;
66987 - PyObject * obj0 = 0 ;
66988 - vips::VImage result;
66989 -
66990 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_rad2float",&obj0)) SWIG_fail;
66991 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
66992 - if (!SWIG_IsOK(res1)) {
66993 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rad2float" "', argument " "1"" of type '" "vips::VImage *""'");
66994 - }
66995 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
66996 - try {
66997 - result = (arg1)->rad2float();
66998 - }
66999 - catch(vips::VError &_e) {
67000 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67001 - }
67002 -
67003 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67004 - return resultobj;
67005 -fail:
67006 - return NULL;
67007 -}
67008 -
67009 -
67010 -SWIGINTERN PyObject *_wrap_VImage_sRGB2XYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67011 - PyObject *resultobj = 0;
67012 - vips::VImage *arg1 = (vips::VImage *) 0 ;
67013 - void *argp1 = 0 ;
67014 - int res1 = 0 ;
67015 - PyObject * obj0 = 0 ;
67016 - vips::VImage result;
67017 -
67018 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_sRGB2XYZ",&obj0)) SWIG_fail;
67019 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
67020 - if (!SWIG_IsOK(res1)) {
67021 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_sRGB2XYZ" "', argument " "1"" of type '" "vips::VImage *""'");
67022 - }
67023 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
67024 - try {
67025 - result = (arg1)->sRGB2XYZ();
67026 - }
67027 - catch(vips::VError &_e) {
67028 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67029 - }
67030 -
67031 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67032 - return resultobj;
67033 -fail:
67034 - return NULL;
67035 -}
67036 -
67037 -
67038 -SWIGINTERN PyObject *_wrap_VImage_gaussnoise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67039 - PyObject *resultobj = 0;
67040 - int arg1 ;
67041 - int arg2 ;
67042 - double arg3 ;
67043 - double arg4 ;
67044 - int val1 ;
67045 - int ecode1 = 0 ;
67046 - int val2 ;
67047 - int ecode2 = 0 ;
67048 - double val3 ;
67049 - int ecode3 = 0 ;
67050 - double val4 ;
67051 - int ecode4 = 0 ;
67052 - PyObject * obj0 = 0 ;
67053 - PyObject * obj1 = 0 ;
67054 - PyObject * obj2 = 0 ;
67055 - PyObject * obj3 = 0 ;
67056 - vips::VImage result;
67057 -
67058 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_gaussnoise",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
67059 - ecode1 = SWIG_AsVal_int(obj0, &val1);
67060 - if (!SWIG_IsOK(ecode1)) {
67061 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_gaussnoise" "', argument " "1"" of type '" "int""'");
67062 - }
67063 - arg1 = static_cast< int >(val1);
67064 - ecode2 = SWIG_AsVal_int(obj1, &val2);
67065 - if (!SWIG_IsOK(ecode2)) {
67066 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_gaussnoise" "', argument " "2"" of type '" "int""'");
67067 - }
67068 - arg2 = static_cast< int >(val2);
67069 - ecode3 = SWIG_AsVal_double(obj2, &val3);
67070 - if (!SWIG_IsOK(ecode3)) {
67071 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_gaussnoise" "', argument " "3"" of type '" "double""'");
67072 - }
67073 - arg3 = static_cast< double >(val3);
67074 - ecode4 = SWIG_AsVal_double(obj3, &val4);
67075 - if (!SWIG_IsOK(ecode4)) {
67076 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_gaussnoise" "', argument " "4"" of type '" "double""'");
67077 - }
67078 - arg4 = static_cast< double >(val4);
67079 - try {
67080 - result = vips::VImage::gaussnoise(arg1,arg2,arg3,arg4);
67081 - }
67082 - catch(vips::VError &_e) {
67083 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67084 - }
67085 -
67086 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67087 - return resultobj;
67088 -fail:
67089 - return NULL;
67090 -}
67091 -
67092 -
67093 -SWIGINTERN PyObject *_wrap_VImage_bandjoin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67094 - PyObject *resultobj = 0;
67095 - vips::VImage *arg1 = (vips::VImage *) 0 ;
67096 - vips::VImage arg2 ;
67097 - void *argp1 = 0 ;
67098 - int res1 = 0 ;
67099 - void *argp2 ;
67100 - int res2 = 0 ;
67101 - PyObject * obj0 = 0 ;
67102 - PyObject * obj1 = 0 ;
67103 - vips::VImage result;
67104 -
67105 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_bandjoin",&obj0,&obj1)) SWIG_fail;
67106 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
67107 - if (!SWIG_IsOK(res1)) {
67108 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_bandjoin" "', argument " "1"" of type '" "vips::VImage *""'");
67109 - }
67110 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
67111 - {
67112 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
67113 - if (!SWIG_IsOK(res2)) {
67114 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_bandjoin" "', argument " "2"" of type '" "vips::VImage""'");
67115 - }
67116 - if (!argp2) {
67117 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_bandjoin" "', argument " "2"" of type '" "vips::VImage""'");
67118 - } else {
67119 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
67120 - arg2 = *temp;
67121 - if (SWIG_IsNewObj(res2)) delete temp;
67122 - }
67123 - }
67124 - try {
67125 - result = (arg1)->bandjoin(arg2);
67126 - }
67127 - catch(vips::VError &_e) {
67128 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67129 - }
67130 -
67131 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67132 - return resultobj;
67133 -fail:
67134 - return NULL;
67135 -}
67136 -
67137 -
67138 -SWIGINTERN PyObject *_wrap_VImage_black(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67139 - PyObject *resultobj = 0;
67140 - int arg1 ;
67141 - int arg2 ;
67142 - int arg3 ;
67143 - int val1 ;
67144 - int ecode1 = 0 ;
67145 - int val2 ;
67146 - int ecode2 = 0 ;
67147 - int val3 ;
67148 - int ecode3 = 0 ;
67149 - PyObject * obj0 = 0 ;
67150 - PyObject * obj1 = 0 ;
67151 - PyObject * obj2 = 0 ;
67152 - vips::VImage result;
67153 -
67154 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_black",&obj0,&obj1,&obj2)) SWIG_fail;
67155 - ecode1 = SWIG_AsVal_int(obj0, &val1);
67156 - if (!SWIG_IsOK(ecode1)) {
67157 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_black" "', argument " "1"" of type '" "int""'");
67158 - }
67159 - arg1 = static_cast< int >(val1);
67160 - ecode2 = SWIG_AsVal_int(obj1, &val2);
67161 - if (!SWIG_IsOK(ecode2)) {
67162 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_black" "', argument " "2"" of type '" "int""'");
67163 - }
67164 - arg2 = static_cast< int >(val2);
67165 - ecode3 = SWIG_AsVal_int(obj2, &val3);
67166 - if (!SWIG_IsOK(ecode3)) {
67167 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_black" "', argument " "3"" of type '" "int""'");
67168 - }
67169 - arg3 = static_cast< int >(val3);
67170 - try {
67171 - result = vips::VImage::black(arg1,arg2,arg3);
67172 - }
67173 - catch(vips::VError &_e) {
67174 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67175 - }
67176 -
67177 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67178 - return resultobj;
67179 -fail:
67180 - return NULL;
67181 -}
67182 -
67183 -
67184 -SWIGINTERN PyObject *_wrap_VImage_c2amph(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67185 - PyObject *resultobj = 0;
67186 - vips::VImage *arg1 = (vips::VImage *) 0 ;
67187 - void *argp1 = 0 ;
67188 - int res1 = 0 ;
67189 - PyObject * obj0 = 0 ;
67190 - vips::VImage result;
67191 -
67192 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_c2amph",&obj0)) SWIG_fail;
67193 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
67194 - if (!SWIG_IsOK(res1)) {
67195 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_c2amph" "', argument " "1"" of type '" "vips::VImage *""'");
67196 - }
67197 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
67198 - try {
67199 - result = (arg1)->c2amph();
67200 - }
67201 - catch(vips::VError &_e) {
67202 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67203 - }
67204 -
67205 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67206 - return resultobj;
67207 -fail:
67208 - return NULL;
67209 -}
67210 -
67211 -
67212 -SWIGINTERN PyObject *_wrap_VImage_c2imag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67213 - PyObject *resultobj = 0;
67214 - vips::VImage *arg1 = (vips::VImage *) 0 ;
67215 - void *argp1 = 0 ;
67216 - int res1 = 0 ;
67217 - PyObject * obj0 = 0 ;
67218 - vips::VImage result;
67219 -
67220 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_c2imag",&obj0)) SWIG_fail;
67221 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
67222 - if (!SWIG_IsOK(res1)) {
67223 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_c2imag" "', argument " "1"" of type '" "vips::VImage *""'");
67224 - }
67225 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
67226 - try {
67227 - result = (arg1)->c2imag();
67228 - }
67229 - catch(vips::VError &_e) {
67230 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67231 - }
67232 -
67233 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67234 - return resultobj;
67235 -fail:
67236 - return NULL;
67237 -}
67238 -
67239 -
67240 -SWIGINTERN PyObject *_wrap_VImage_c2real(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67241 - PyObject *resultobj = 0;
67242 - vips::VImage *arg1 = (vips::VImage *) 0 ;
67243 - void *argp1 = 0 ;
67244 - int res1 = 0 ;
67245 - PyObject * obj0 = 0 ;
67246 - vips::VImage result;
67247 -
67248 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_c2real",&obj0)) SWIG_fail;
67249 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
67250 - if (!SWIG_IsOK(res1)) {
67251 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_c2real" "', argument " "1"" of type '" "vips::VImage *""'");
67252 - }
67253 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
67254 - try {
67255 - result = (arg1)->c2real();
67256 - }
67257 - catch(vips::VError &_e) {
67258 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67259 - }
67260 -
67261 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67262 - return resultobj;
67263 -fail:
67264 - return NULL;
67265 -}
67266 -
67267 -
67268 -SWIGINTERN PyObject *_wrap_VImage_c2rect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67269 - PyObject *resultobj = 0;
67270 - vips::VImage *arg1 = (vips::VImage *) 0 ;
67271 - void *argp1 = 0 ;
67272 - int res1 = 0 ;
67273 - PyObject * obj0 = 0 ;
67274 - vips::VImage result;
67275 -
67276 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_c2rect",&obj0)) SWIG_fail;
67277 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
67278 - if (!SWIG_IsOK(res1)) {
67279 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_c2rect" "', argument " "1"" of type '" "vips::VImage *""'");
67280 - }
67281 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
67282 - try {
67283 - result = (arg1)->c2rect();
67284 - }
67285 - catch(vips::VError &_e) {
67286 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67287 - }
67288 -
67289 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67290 - return resultobj;
67291 -fail:
67292 - return NULL;
67293 -}
67294 -
67295 -
67296 -SWIGINTERN PyObject *_wrap_VImage_clip2fmt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67297 - PyObject *resultobj = 0;
67298 - vips::VImage *arg1 = (vips::VImage *) 0 ;
67299 - int arg2 ;
67300 - void *argp1 = 0 ;
67301 - int res1 = 0 ;
67302 - int val2 ;
67303 - int ecode2 = 0 ;
67304 - PyObject * obj0 = 0 ;
67305 - PyObject * obj1 = 0 ;
67306 - vips::VImage result;
67307 -
67308 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_clip2fmt",&obj0,&obj1)) SWIG_fail;
67309 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
67310 - if (!SWIG_IsOK(res1)) {
67311 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2fmt" "', argument " "1"" of type '" "vips::VImage *""'");
67312 - }
67313 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
67314 - ecode2 = SWIG_AsVal_int(obj1, &val2);
67315 - if (!SWIG_IsOK(ecode2)) {
67316 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_clip2fmt" "', argument " "2"" of type '" "int""'");
67317 - }
67318 - arg2 = static_cast< int >(val2);
67319 - try {
67320 - result = (arg1)->clip2fmt(arg2);
67321 - }
67322 - catch(vips::VError &_e) {
67323 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67324 - }
67325 -
67326 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67327 - return resultobj;
67328 -fail:
67329 - return NULL;
67330 -}
67331 -
67332 -
67333 -SWIGINTERN PyObject *_wrap_VImage_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67334 - PyObject *resultobj = 0;
67335 - vips::VImage *arg1 = (vips::VImage *) 0 ;
67336 - void *argp1 = 0 ;
67337 - int res1 = 0 ;
67338 - PyObject * obj0 = 0 ;
67339 - vips::VImage result;
67340 -
67341 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_copy",&obj0)) SWIG_fail;
67342 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
67343 - if (!SWIG_IsOK(res1)) {
67344 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_copy" "', argument " "1"" of type '" "vips::VImage *""'");
67345 - }
67346 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
67347 - try {
67348 - result = (arg1)->copy();
67349 - }
67350 - catch(vips::VError &_e) {
67351 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67352 - }
67353 -
67354 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67355 - return resultobj;
67356 -fail:
67357 - return NULL;
67358 -}
67359 -
67360 -
67361 -SWIGINTERN PyObject *_wrap_VImage_copy_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67362 - PyObject *resultobj = 0;
67363 - vips::VImage *arg1 = (vips::VImage *) 0 ;
67364 - void *argp1 = 0 ;
67365 - int res1 = 0 ;
67366 - PyObject * obj0 = 0 ;
67367 - vips::VImage result;
67368 -
67369 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_copy_file",&obj0)) SWIG_fail;
67370 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
67371 - if (!SWIG_IsOK(res1)) {
67372 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_copy_file" "', argument " "1"" of type '" "vips::VImage *""'");
67373 - }
67374 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
67375 - try {
67376 - result = (arg1)->copy_file();
67377 - }
67378 - catch(vips::VError &_e) {
67379 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67380 - }
67381 -
67382 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67383 - return resultobj;
67384 -fail:
67385 - return NULL;
67386 -}
67387 -
67388 -
67389 -SWIGINTERN PyObject *_wrap_VImage_copy_morph(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67390 - PyObject *resultobj = 0;
67391 - vips::VImage *arg1 = (vips::VImage *) 0 ;
67392 - int arg2 ;
67393 - int arg3 ;
67394 - int arg4 ;
67395 - void *argp1 = 0 ;
67396 - int res1 = 0 ;
67397 - int val2 ;
67398 - int ecode2 = 0 ;
67399 - int val3 ;
67400 - int ecode3 = 0 ;
67401 - int val4 ;
67402 - int ecode4 = 0 ;
67403 - PyObject * obj0 = 0 ;
67404 - PyObject * obj1 = 0 ;
67405 - PyObject * obj2 = 0 ;
67406 - PyObject * obj3 = 0 ;
67407 - vips::VImage result;
67408 -
67409 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_copy_morph",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
67410 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
67411 - if (!SWIG_IsOK(res1)) {
67412 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_copy_morph" "', argument " "1"" of type '" "vips::VImage *""'");
67413 - }
67414 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
67415 - ecode2 = SWIG_AsVal_int(obj1, &val2);
67416 - if (!SWIG_IsOK(ecode2)) {
67417 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_copy_morph" "', argument " "2"" of type '" "int""'");
67418 - }
67419 - arg2 = static_cast< int >(val2);
67420 - ecode3 = SWIG_AsVal_int(obj2, &val3);
67421 - if (!SWIG_IsOK(ecode3)) {
67422 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_copy_morph" "', argument " "3"" of type '" "int""'");
67423 - }
67424 - arg3 = static_cast< int >(val3);
67425 - ecode4 = SWIG_AsVal_int(obj3, &val4);
67426 - if (!SWIG_IsOK(ecode4)) {
67427 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_copy_morph" "', argument " "4"" of type '" "int""'");
67428 - }
67429 - arg4 = static_cast< int >(val4);
67430 - try {
67431 - result = (arg1)->copy_morph(arg2,arg3,arg4);
67432 - }
67433 - catch(vips::VError &_e) {
67434 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67435 - }
67436 -
67437 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67438 - return resultobj;
67439 -fail:
67440 - return NULL;
67441 -}
67442 -
67443 -
67444 -SWIGINTERN PyObject *_wrap_VImage_copy_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67445 - PyObject *resultobj = 0;
67446 - vips::VImage *arg1 = (vips::VImage *) 0 ;
67447 - void *argp1 = 0 ;
67448 - int res1 = 0 ;
67449 - PyObject * obj0 = 0 ;
67450 - vips::VImage result;
67451 -
67452 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_copy_swap",&obj0)) SWIG_fail;
67453 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
67454 - if (!SWIG_IsOK(res1)) {
67455 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_copy_swap" "', argument " "1"" of type '" "vips::VImage *""'");
67456 - }
67457 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
67458 - try {
67459 - result = (arg1)->copy_swap();
67460 - }
67461 - catch(vips::VError &_e) {
67462 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67463 - }
67464 -
67465 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67466 - return resultobj;
67467 -fail:
67468 - return NULL;
67469 -}
67470 -
67471 -
67472 -SWIGINTERN PyObject *_wrap_VImage_copy_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67473 - PyObject *resultobj = 0;
67474 - vips::VImage *arg1 = (vips::VImage *) 0 ;
67475 - int arg2 ;
67476 - double arg3 ;
67477 - double arg4 ;
67478 - int arg5 ;
67479 - int arg6 ;
67480 - void *argp1 = 0 ;
67481 - int res1 = 0 ;
67482 - int val2 ;
67483 - int ecode2 = 0 ;
67484 - double val3 ;
67485 - int ecode3 = 0 ;
67486 - double val4 ;
67487 - int ecode4 = 0 ;
67488 - int val5 ;
67489 - int ecode5 = 0 ;
67490 - int val6 ;
67491 - int ecode6 = 0 ;
67492 - PyObject * obj0 = 0 ;
67493 - PyObject * obj1 = 0 ;
67494 - PyObject * obj2 = 0 ;
67495 - PyObject * obj3 = 0 ;
67496 - PyObject * obj4 = 0 ;
67497 - PyObject * obj5 = 0 ;
67498 - vips::VImage result;
67499 -
67500 - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:VImage_copy_set",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
67501 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
67502 - if (!SWIG_IsOK(res1)) {
67503 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_copy_set" "', argument " "1"" of type '" "vips::VImage *""'");
67504 - }
67505 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
67506 - ecode2 = SWIG_AsVal_int(obj1, &val2);
67507 - if (!SWIG_IsOK(ecode2)) {
67508 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_copy_set" "', argument " "2"" of type '" "int""'");
67509 - }
67510 - arg2 = static_cast< int >(val2);
67511 - ecode3 = SWIG_AsVal_double(obj2, &val3);
67512 - if (!SWIG_IsOK(ecode3)) {
67513 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_copy_set" "', argument " "3"" of type '" "double""'");
67514 - }
67515 - arg3 = static_cast< double >(val3);
67516 - ecode4 = SWIG_AsVal_double(obj3, &val4);
67517 - if (!SWIG_IsOK(ecode4)) {
67518 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_copy_set" "', argument " "4"" of type '" "double""'");
67519 - }
67520 - arg4 = static_cast< double >(val4);
67521 - ecode5 = SWIG_AsVal_int(obj4, &val5);
67522 - if (!SWIG_IsOK(ecode5)) {
67523 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_copy_set" "', argument " "5"" of type '" "int""'");
67524 - }
67525 - arg5 = static_cast< int >(val5);
67526 - ecode6 = SWIG_AsVal_int(obj5, &val6);
67527 - if (!SWIG_IsOK(ecode6)) {
67528 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_copy_set" "', argument " "6"" of type '" "int""'");
67529 - }
67530 - arg6 = static_cast< int >(val6);
67531 - try {
67532 - result = (arg1)->copy_set(arg2,arg3,arg4,arg5,arg6);
67533 - }
67534 - catch(vips::VError &_e) {
67535 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67536 - }
67537 -
67538 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67539 - return resultobj;
67540 -fail:
67541 - return NULL;
67542 -}
67543 -
67544 -
67545 -SWIGINTERN PyObject *_wrap_VImage_extract_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67546 - PyObject *resultobj = 0;
67547 - vips::VImage *arg1 = (vips::VImage *) 0 ;
67548 - int arg2 ;
67549 - int arg3 ;
67550 - int arg4 ;
67551 - int arg5 ;
67552 - void *argp1 = 0 ;
67553 - int res1 = 0 ;
67554 - int val2 ;
67555 - int ecode2 = 0 ;
67556 - int val3 ;
67557 - int ecode3 = 0 ;
67558 - int val4 ;
67559 - int ecode4 = 0 ;
67560 - int val5 ;
67561 - int ecode5 = 0 ;
67562 - PyObject * obj0 = 0 ;
67563 - PyObject * obj1 = 0 ;
67564 - PyObject * obj2 = 0 ;
67565 - PyObject * obj3 = 0 ;
67566 - PyObject * obj4 = 0 ;
67567 - vips::VImage result;
67568 -
67569 - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_extract_area",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
67570 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
67571 - if (!SWIG_IsOK(res1)) {
67572 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_extract_area" "', argument " "1"" of type '" "vips::VImage *""'");
67573 - }
67574 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
67575 - ecode2 = SWIG_AsVal_int(obj1, &val2);
67576 - if (!SWIG_IsOK(ecode2)) {
67577 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_extract_area" "', argument " "2"" of type '" "int""'");
67578 - }
67579 - arg2 = static_cast< int >(val2);
67580 - ecode3 = SWIG_AsVal_int(obj2, &val3);
67581 - if (!SWIG_IsOK(ecode3)) {
67582 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_extract_area" "', argument " "3"" of type '" "int""'");
67583 - }
67584 - arg3 = static_cast< int >(val3);
67585 - ecode4 = SWIG_AsVal_int(obj3, &val4);
67586 - if (!SWIG_IsOK(ecode4)) {
67587 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_extract_area" "', argument " "4"" of type '" "int""'");
67588 - }
67589 - arg4 = static_cast< int >(val4);
67590 - ecode5 = SWIG_AsVal_int(obj4, &val5);
67591 - if (!SWIG_IsOK(ecode5)) {
67592 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_extract_area" "', argument " "5"" of type '" "int""'");
67593 - }
67594 - arg5 = static_cast< int >(val5);
67595 - try {
67596 - result = (arg1)->extract_area(arg2,arg3,arg4,arg5);
67597 - }
67598 - catch(vips::VError &_e) {
67599 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67600 - }
67601 -
67602 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67603 - return resultobj;
67604 -fail:
67605 - return NULL;
67606 -}
67607 -
67608 -
67609 -SWIGINTERN PyObject *_wrap_VImage_extract_areabands(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67610 - PyObject *resultobj = 0;
67611 - vips::VImage *arg1 = (vips::VImage *) 0 ;
67612 - int arg2 ;
67613 - int arg3 ;
67614 - int arg4 ;
67615 - int arg5 ;
67616 - int arg6 ;
67617 - int arg7 ;
67618 - void *argp1 = 0 ;
67619 - int res1 = 0 ;
67620 - int val2 ;
67621 - int ecode2 = 0 ;
67622 - int val3 ;
67623 - int ecode3 = 0 ;
67624 - int val4 ;
67625 - int ecode4 = 0 ;
67626 - int val5 ;
67627 - int ecode5 = 0 ;
67628 - int val6 ;
67629 - int ecode6 = 0 ;
67630 - int val7 ;
67631 - int ecode7 = 0 ;
67632 - PyObject * obj0 = 0 ;
67633 - PyObject * obj1 = 0 ;
67634 - PyObject * obj2 = 0 ;
67635 - PyObject * obj3 = 0 ;
67636 - PyObject * obj4 = 0 ;
67637 - PyObject * obj5 = 0 ;
67638 - PyObject * obj6 = 0 ;
67639 - vips::VImage result;
67640 -
67641 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_extract_areabands",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
67642 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
67643 - if (!SWIG_IsOK(res1)) {
67644 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_extract_areabands" "', argument " "1"" of type '" "vips::VImage *""'");
67645 - }
67646 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
67647 - ecode2 = SWIG_AsVal_int(obj1, &val2);
67648 - if (!SWIG_IsOK(ecode2)) {
67649 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_extract_areabands" "', argument " "2"" of type '" "int""'");
67650 - }
67651 - arg2 = static_cast< int >(val2);
67652 - ecode3 = SWIG_AsVal_int(obj2, &val3);
67653 - if (!SWIG_IsOK(ecode3)) {
67654 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_extract_areabands" "', argument " "3"" of type '" "int""'");
67655 - }
67656 - arg3 = static_cast< int >(val3);
67657 - ecode4 = SWIG_AsVal_int(obj3, &val4);
67658 - if (!SWIG_IsOK(ecode4)) {
67659 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_extract_areabands" "', argument " "4"" of type '" "int""'");
67660 - }
67661 - arg4 = static_cast< int >(val4);
67662 - ecode5 = SWIG_AsVal_int(obj4, &val5);
67663 - if (!SWIG_IsOK(ecode5)) {
67664 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_extract_areabands" "', argument " "5"" of type '" "int""'");
67665 - }
67666 - arg5 = static_cast< int >(val5);
67667 - ecode6 = SWIG_AsVal_int(obj5, &val6);
67668 - if (!SWIG_IsOK(ecode6)) {
67669 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_extract_areabands" "', argument " "6"" of type '" "int""'");
67670 - }
67671 - arg6 = static_cast< int >(val6);
67672 - ecode7 = SWIG_AsVal_int(obj6, &val7);
67673 - if (!SWIG_IsOK(ecode7)) {
67674 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_extract_areabands" "', argument " "7"" of type '" "int""'");
67675 - }
67676 - arg7 = static_cast< int >(val7);
67677 - try {
67678 - result = (arg1)->extract_areabands(arg2,arg3,arg4,arg5,arg6,arg7);
67679 - }
67680 - catch(vips::VError &_e) {
67681 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67682 - }
67683 -
67684 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67685 - return resultobj;
67686 -fail:
67687 - return NULL;
67688 -}
67689 -
67690 -
67691 -SWIGINTERN PyObject *_wrap_VImage_extract_band(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67692 - PyObject *resultobj = 0;
67693 - vips::VImage *arg1 = (vips::VImage *) 0 ;
67694 - int arg2 ;
67695 - void *argp1 = 0 ;
67696 - int res1 = 0 ;
67697 - int val2 ;
67698 - int ecode2 = 0 ;
67699 - PyObject * obj0 = 0 ;
67700 - PyObject * obj1 = 0 ;
67701 - vips::VImage result;
67702 -
67703 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_extract_band",&obj0,&obj1)) SWIG_fail;
67704 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
67705 - if (!SWIG_IsOK(res1)) {
67706 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_extract_band" "', argument " "1"" of type '" "vips::VImage *""'");
67707 - }
67708 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
67709 - ecode2 = SWIG_AsVal_int(obj1, &val2);
67710 - if (!SWIG_IsOK(ecode2)) {
67711 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_extract_band" "', argument " "2"" of type '" "int""'");
67712 - }
67713 - arg2 = static_cast< int >(val2);
67714 - try {
67715 - result = (arg1)->extract_band(arg2);
67716 - }
67717 - catch(vips::VError &_e) {
67718 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67719 - }
67720 -
67721 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67722 - return resultobj;
67723 -fail:
67724 - return NULL;
67725 -}
67726 -
67727 -
67728 -SWIGINTERN PyObject *_wrap_VImage_extract_bands(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67729 - PyObject *resultobj = 0;
67730 - vips::VImage *arg1 = (vips::VImage *) 0 ;
67731 - int arg2 ;
67732 - int arg3 ;
67733 - void *argp1 = 0 ;
67734 - int res1 = 0 ;
67735 - int val2 ;
67736 - int ecode2 = 0 ;
67737 - int val3 ;
67738 - int ecode3 = 0 ;
67739 - PyObject * obj0 = 0 ;
67740 - PyObject * obj1 = 0 ;
67741 - PyObject * obj2 = 0 ;
67742 - vips::VImage result;
67743 -
67744 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_extract_bands",&obj0,&obj1,&obj2)) SWIG_fail;
67745 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
67746 - if (!SWIG_IsOK(res1)) {
67747 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_extract_bands" "', argument " "1"" of type '" "vips::VImage *""'");
67748 - }
67749 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
67750 - ecode2 = SWIG_AsVal_int(obj1, &val2);
67751 - if (!SWIG_IsOK(ecode2)) {
67752 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_extract_bands" "', argument " "2"" of type '" "int""'");
67753 - }
67754 - arg2 = static_cast< int >(val2);
67755 - ecode3 = SWIG_AsVal_int(obj2, &val3);
67756 - if (!SWIG_IsOK(ecode3)) {
67757 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_extract_bands" "', argument " "3"" of type '" "int""'");
67758 - }
67759 - arg3 = static_cast< int >(val3);
67760 - try {
67761 - result = (arg1)->extract_bands(arg2,arg3);
67762 - }
67763 - catch(vips::VError &_e) {
67764 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67765 - }
67766 -
67767 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67768 - return resultobj;
67769 -fail:
67770 - return NULL;
67771 -}
67772 -
67773 -
67774 -SWIGINTERN PyObject *_wrap_VImage_extract(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67775 - PyObject *resultobj = 0;
67776 - vips::VImage *arg1 = (vips::VImage *) 0 ;
67777 - int arg2 ;
67778 - int arg3 ;
67779 - int arg4 ;
67780 - int arg5 ;
67781 - int arg6 ;
67782 - void *argp1 = 0 ;
67783 - int res1 = 0 ;
67784 - int val2 ;
67785 - int ecode2 = 0 ;
67786 - int val3 ;
67787 - int ecode3 = 0 ;
67788 - int val4 ;
67789 - int ecode4 = 0 ;
67790 - int val5 ;
67791 - int ecode5 = 0 ;
67792 - int val6 ;
67793 - int ecode6 = 0 ;
67794 - PyObject * obj0 = 0 ;
67795 - PyObject * obj1 = 0 ;
67796 - PyObject * obj2 = 0 ;
67797 - PyObject * obj3 = 0 ;
67798 - PyObject * obj4 = 0 ;
67799 - PyObject * obj5 = 0 ;
67800 - vips::VImage result;
67801 -
67802 - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:VImage_extract",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
67803 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
67804 - if (!SWIG_IsOK(res1)) {
67805 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_extract" "', argument " "1"" of type '" "vips::VImage *""'");
67806 - }
67807 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
67808 - ecode2 = SWIG_AsVal_int(obj1, &val2);
67809 - if (!SWIG_IsOK(ecode2)) {
67810 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_extract" "', argument " "2"" of type '" "int""'");
67811 - }
67812 - arg2 = static_cast< int >(val2);
67813 - ecode3 = SWIG_AsVal_int(obj2, &val3);
67814 - if (!SWIG_IsOK(ecode3)) {
67815 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_extract" "', argument " "3"" of type '" "int""'");
67816 - }
67817 - arg3 = static_cast< int >(val3);
67818 - ecode4 = SWIG_AsVal_int(obj3, &val4);
67819 - if (!SWIG_IsOK(ecode4)) {
67820 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_extract" "', argument " "4"" of type '" "int""'");
67821 - }
67822 - arg4 = static_cast< int >(val4);
67823 - ecode5 = SWIG_AsVal_int(obj4, &val5);
67824 - if (!SWIG_IsOK(ecode5)) {
67825 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_extract" "', argument " "5"" of type '" "int""'");
67826 - }
67827 - arg5 = static_cast< int >(val5);
67828 - ecode6 = SWIG_AsVal_int(obj5, &val6);
67829 - if (!SWIG_IsOK(ecode6)) {
67830 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_extract" "', argument " "6"" of type '" "int""'");
67831 - }
67832 - arg6 = static_cast< int >(val6);
67833 - try {
67834 - result = (arg1)->extract(arg2,arg3,arg4,arg5,arg6);
67835 - }
67836 - catch(vips::VError &_e) {
67837 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67838 - }
67839 -
67840 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67841 - return resultobj;
67842 -fail:
67843 - return NULL;
67844 -}
67845 -
67846 -
67847 -SWIGINTERN PyObject *_wrap_VImage_falsecolour(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67848 - PyObject *resultobj = 0;
67849 - vips::VImage *arg1 = (vips::VImage *) 0 ;
67850 - void *argp1 = 0 ;
67851 - int res1 = 0 ;
67852 - PyObject * obj0 = 0 ;
67853 - vips::VImage result;
67854 -
67855 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_falsecolour",&obj0)) SWIG_fail;
67856 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
67857 - if (!SWIG_IsOK(res1)) {
67858 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_falsecolour" "', argument " "1"" of type '" "vips::VImage *""'");
67859 - }
67860 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
67861 - try {
67862 - result = (arg1)->falsecolour();
67863 - }
67864 - catch(vips::VError &_e) {
67865 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67866 - }
67867 -
67868 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67869 - return resultobj;
67870 -fail:
67871 - return NULL;
67872 -}
67873 -
67874 -
67875 -SWIGINTERN PyObject *_wrap_VImage_fliphor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67876 - PyObject *resultobj = 0;
67877 - vips::VImage *arg1 = (vips::VImage *) 0 ;
67878 - void *argp1 = 0 ;
67879 - int res1 = 0 ;
67880 - PyObject * obj0 = 0 ;
67881 - vips::VImage result;
67882 -
67883 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_fliphor",&obj0)) SWIG_fail;
67884 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
67885 - if (!SWIG_IsOK(res1)) {
67886 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_fliphor" "', argument " "1"" of type '" "vips::VImage *""'");
67887 - }
67888 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
67889 - try {
67890 - result = (arg1)->fliphor();
67891 - }
67892 - catch(vips::VError &_e) {
67893 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67894 - }
67895 -
67896 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67897 - return resultobj;
67898 -fail:
67899 - return NULL;
67900 -}
67901 -
67902 -
67903 -SWIGINTERN PyObject *_wrap_VImage_flipver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67904 - PyObject *resultobj = 0;
67905 - vips::VImage *arg1 = (vips::VImage *) 0 ;
67906 - void *argp1 = 0 ;
67907 - int res1 = 0 ;
67908 - PyObject * obj0 = 0 ;
67909 - vips::VImage result;
67910 -
67911 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_flipver",&obj0)) SWIG_fail;
67912 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
67913 - if (!SWIG_IsOK(res1)) {
67914 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_flipver" "', argument " "1"" of type '" "vips::VImage *""'");
67915 - }
67916 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
67917 - try {
67918 - result = (arg1)->flipver();
67919 - }
67920 - catch(vips::VError &_e) {
67921 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67922 - }
67923 -
67924 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67925 - return resultobj;
67926 -fail:
67927 - return NULL;
67928 -}
67929 -
67930 -
67931 -SWIGINTERN PyObject *_wrap_VImage_gbandjoin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67932 - PyObject *resultobj = 0;
67933 - std::vector< vips::VImage,std::allocator< vips::VImage > > arg1 ;
67934 - PyObject * obj0 = 0 ;
67935 - vips::VImage result;
67936 -
67937 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_gbandjoin",&obj0)) SWIG_fail;
67938 - {
67939 - std::vector<vips::VImage,std::allocator< vips::VImage > > *ptr = (std::vector<vips::VImage,std::allocator< vips::VImage > > *)0;
67940 - int res = swig::asptr(obj0, &ptr);
67941 - if (!SWIG_IsOK(res) || !ptr) {
67942 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_gbandjoin" "', argument " "1"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > >""'");
67943 - }
67944 - arg1 = *ptr;
67945 - if (SWIG_IsNewObj(res)) delete ptr;
67946 - }
67947 - try {
67948 - result = vips::VImage::gbandjoin(arg1);
67949 - }
67950 - catch(vips::VError &_e) {
67951 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
67952 - }
67953 -
67954 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
67955 - return resultobj;
67956 -fail:
67957 - return NULL;
67958 -}
67959 -
67960 -
67961 -SWIGINTERN PyObject *_wrap_VImage_grid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67962 - PyObject *resultobj = 0;
67963 - vips::VImage *arg1 = (vips::VImage *) 0 ;
67964 - int arg2 ;
67965 - int arg3 ;
67966 - int arg4 ;
67967 - void *argp1 = 0 ;
67968 - int res1 = 0 ;
67969 - int val2 ;
67970 - int ecode2 = 0 ;
67971 - int val3 ;
67972 - int ecode3 = 0 ;
67973 - int val4 ;
67974 - int ecode4 = 0 ;
67975 - PyObject * obj0 = 0 ;
67976 - PyObject * obj1 = 0 ;
67977 - PyObject * obj2 = 0 ;
67978 - PyObject * obj3 = 0 ;
67979 - vips::VImage result;
67980 -
67981 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_grid",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
67982 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
67983 - if (!SWIG_IsOK(res1)) {
67984 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_grid" "', argument " "1"" of type '" "vips::VImage *""'");
67985 - }
67986 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
67987 - ecode2 = SWIG_AsVal_int(obj1, &val2);
67988 - if (!SWIG_IsOK(ecode2)) {
67989 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_grid" "', argument " "2"" of type '" "int""'");
67990 - }
67991 - arg2 = static_cast< int >(val2);
67992 - ecode3 = SWIG_AsVal_int(obj2, &val3);
67993 - if (!SWIG_IsOK(ecode3)) {
67994 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_grid" "', argument " "3"" of type '" "int""'");
67995 - }
67996 - arg3 = static_cast< int >(val3);
67997 - ecode4 = SWIG_AsVal_int(obj3, &val4);
67998 - if (!SWIG_IsOK(ecode4)) {
67999 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_grid" "', argument " "4"" of type '" "int""'");
68000 - }
68001 - arg4 = static_cast< int >(val4);
68002 - try {
68003 - result = (arg1)->grid(arg2,arg3,arg4);
68004 - }
68005 - catch(vips::VError &_e) {
68006 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
68007 - }
68008 -
68009 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
68010 - return resultobj;
68011 -fail:
68012 - return NULL;
68013 -}
68014 -
68015 -
68016 -SWIGINTERN PyObject *_wrap_VImage_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68017 - PyObject *resultobj = 0;
68018 - vips::VImage *arg1 = (vips::VImage *) 0 ;
68019 - vips::VImage arg2 ;
68020 - int arg3 ;
68021 - int arg4 ;
68022 - void *argp1 = 0 ;
68023 - int res1 = 0 ;
68024 - void *argp2 ;
68025 - int res2 = 0 ;
68026 - int val3 ;
68027 - int ecode3 = 0 ;
68028 - int val4 ;
68029 - int ecode4 = 0 ;
68030 - PyObject * obj0 = 0 ;
68031 - PyObject * obj1 = 0 ;
68032 - PyObject * obj2 = 0 ;
68033 - PyObject * obj3 = 0 ;
68034 - vips::VImage result;
68035 -
68036 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
68037 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
68038 - if (!SWIG_IsOK(res1)) {
68039 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_insert" "', argument " "1"" of type '" "vips::VImage *""'");
68040 - }
68041 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
68042 - {
68043 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
68044 - if (!SWIG_IsOK(res2)) {
68045 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_insert" "', argument " "2"" of type '" "vips::VImage""'");
68046 - }
68047 - if (!argp2) {
68048 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_insert" "', argument " "2"" of type '" "vips::VImage""'");
68049 - } else {
68050 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
68051 - arg2 = *temp;
68052 - if (SWIG_IsNewObj(res2)) delete temp;
68053 - }
68054 - }
68055 - ecode3 = SWIG_AsVal_int(obj2, &val3);
68056 - if (!SWIG_IsOK(ecode3)) {
68057 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_insert" "', argument " "3"" of type '" "int""'");
68058 - }
68059 - arg3 = static_cast< int >(val3);
68060 - ecode4 = SWIG_AsVal_int(obj3, &val4);
68061 - if (!SWIG_IsOK(ecode4)) {
68062 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_insert" "', argument " "4"" of type '" "int""'");
68063 - }
68064 - arg4 = static_cast< int >(val4);
68065 - try {
68066 - result = (arg1)->insert(arg2,arg3,arg4);
68067 - }
68068 - catch(vips::VError &_e) {
68069 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
68070 - }
68071 -
68072 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
68073 - return resultobj;
68074 -fail:
68075 - return NULL;
68076 -}
68077 -
68078 -
68079 -SWIGINTERN PyObject *_wrap_VImage_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68080 - PyObject *resultobj = 0;
68081 - vips::VImage *arg1 = (vips::VImage *) 0 ;
68082 - vips::VImage arg2 ;
68083 - std::vector< int,std::allocator< int > > arg3 ;
68084 - std::vector< int,std::allocator< int > > arg4 ;
68085 - void *argp1 = 0 ;
68086 - int res1 = 0 ;
68087 - void *argp2 ;
68088 - int res2 = 0 ;
68089 - PyObject * obj0 = 0 ;
68090 - PyObject * obj1 = 0 ;
68091 - PyObject * obj2 = 0 ;
68092 - PyObject * obj3 = 0 ;
68093 - vips::VImage result;
68094 -
68095 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
68096 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
68097 - if (!SWIG_IsOK(res1)) {
68098 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_insert" "', argument " "1"" of type '" "vips::VImage *""'");
68099 - }
68100 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
68101 - {
68102 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
68103 - if (!SWIG_IsOK(res2)) {
68104 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_insert" "', argument " "2"" of type '" "vips::VImage""'");
68105 - }
68106 - if (!argp2) {
68107 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_insert" "', argument " "2"" of type '" "vips::VImage""'");
68108 - } else {
68109 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
68110 - arg2 = *temp;
68111 - if (SWIG_IsNewObj(res2)) delete temp;
68112 - }
68113 - }
68114 - {
68115 - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
68116 - int res = swig::asptr(obj2, &ptr);
68117 - if (!SWIG_IsOK(res) || !ptr) {
68118 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_insert" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > >""'");
68119 - }
68120 - arg3 = *ptr;
68121 - if (SWIG_IsNewObj(res)) delete ptr;
68122 - }
68123 - {
68124 - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
68125 - int res = swig::asptr(obj3, &ptr);
68126 - if (!SWIG_IsOK(res) || !ptr) {
68127 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_insert" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > >""'");
68128 - }
68129 - arg4 = *ptr;
68130 - if (SWIG_IsNewObj(res)) delete ptr;
68131 - }
68132 - try {
68133 - result = (arg1)->insert(arg2,arg3,arg4);
68134 - }
68135 - catch(vips::VError &_e) {
68136 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
68137 - }
68138 -
68139 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
68140 - return resultobj;
68141 -fail:
68142 - return NULL;
68143 -}
68144 -
68145 -
68146 -SWIGINTERN PyObject *_wrap_VImage_insert(PyObject *self, PyObject *args) {
68147 - int argc;
68148 - PyObject *argv[5];
68149 - int ii;
68150 -
68151 - if (!PyTuple_Check(args)) SWIG_fail;
68152 - argc = args ? (int)PyObject_Length(args) : 0;
68153 - for (ii = 0; (ii < 4) && (ii < argc); ii++) {
68154 - argv[ii] = PyTuple_GET_ITEM(args,ii);
68155 - }
68156 - if (argc == 4) {
68157 - int _v;
68158 - void *vptr = 0;
68159 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
68160 - _v = SWIG_CheckState(res);
68161 - if (_v) {
68162 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
68163 - _v = SWIG_CheckState(res);
68164 - if (_v) {
68165 - {
68166 - int res = SWIG_AsVal_int(argv[2], NULL);
68167 - _v = SWIG_CheckState(res);
68168 - }
68169 - if (_v) {
68170 - {
68171 - int res = SWIG_AsVal_int(argv[3], NULL);
68172 - _v = SWIG_CheckState(res);
68173 - }
68174 - if (_v) {
68175 - return _wrap_VImage_insert__SWIG_0(self, args);
68176 - }
68177 - }
68178 - }
68179 - }
68180 - }
68181 - if (argc == 4) {
68182 - int _v;
68183 - void *vptr = 0;
68184 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
68185 - _v = SWIG_CheckState(res);
68186 - if (_v) {
68187 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
68188 - _v = SWIG_CheckState(res);
68189 - if (_v) {
68190 - int res = swig::asptr(argv[2], (std::vector<int,std::allocator< int > >**)(0));
68191 - _v = SWIG_CheckState(res);
68192 - if (_v) {
68193 - int res = swig::asptr(argv[3], (std::vector<int,std::allocator< int > >**)(0));
68194 - _v = SWIG_CheckState(res);
68195 - if (_v) {
68196 - return _wrap_VImage_insert__SWIG_1(self, args);
68197 - }
68198 - }
68199 - }
68200 - }
68201 - }
68202 -
68203 -fail:
68204 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_insert'.\n"
68205 - " Possible C/C++ prototypes are:\n"
68206 - " vips::VImage::insert(vips::VImage,int,int)\n"
68207 - " vips::VImage::insert(vips::VImage,std::vector< int,std::allocator< int > >,std::vector< int,std::allocator< int > >)\n");
68208 - return 0;
68209 -}
68210 -
68211 -
68212 -SWIGINTERN PyObject *_wrap_VImage_insert_noexpand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68213 - PyObject *resultobj = 0;
68214 - vips::VImage *arg1 = (vips::VImage *) 0 ;
68215 - vips::VImage arg2 ;
68216 - int arg3 ;
68217 - int arg4 ;
68218 - void *argp1 = 0 ;
68219 - int res1 = 0 ;
68220 - void *argp2 ;
68221 - int res2 = 0 ;
68222 - int val3 ;
68223 - int ecode3 = 0 ;
68224 - int val4 ;
68225 - int ecode4 = 0 ;
68226 - PyObject * obj0 = 0 ;
68227 - PyObject * obj1 = 0 ;
68228 - PyObject * obj2 = 0 ;
68229 - PyObject * obj3 = 0 ;
68230 - vips::VImage result;
68231 -
68232 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_insert_noexpand",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
68233 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
68234 - if (!SWIG_IsOK(res1)) {
68235 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_insert_noexpand" "', argument " "1"" of type '" "vips::VImage *""'");
68236 - }
68237 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
68238 - {
68239 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
68240 - if (!SWIG_IsOK(res2)) {
68241 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_insert_noexpand" "', argument " "2"" of type '" "vips::VImage""'");
68242 - }
68243 - if (!argp2) {
68244 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_insert_noexpand" "', argument " "2"" of type '" "vips::VImage""'");
68245 - } else {
68246 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
68247 - arg2 = *temp;
68248 - if (SWIG_IsNewObj(res2)) delete temp;
68249 - }
68250 - }
68251 - ecode3 = SWIG_AsVal_int(obj2, &val3);
68252 - if (!SWIG_IsOK(ecode3)) {
68253 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_insert_noexpand" "', argument " "3"" of type '" "int""'");
68254 - }
68255 - arg3 = static_cast< int >(val3);
68256 - ecode4 = SWIG_AsVal_int(obj3, &val4);
68257 - if (!SWIG_IsOK(ecode4)) {
68258 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_insert_noexpand" "', argument " "4"" of type '" "int""'");
68259 - }
68260 - arg4 = static_cast< int >(val4);
68261 - try {
68262 - result = (arg1)->insert_noexpand(arg2,arg3,arg4);
68263 - }
68264 - catch(vips::VError &_e) {
68265 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
68266 - }
68267 -
68268 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
68269 - return resultobj;
68270 -fail:
68271 - return NULL;
68272 -}
68273 -
68274 -
68275 -SWIGINTERN PyObject *_wrap_VImage_embed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68276 - PyObject *resultobj = 0;
68277 - vips::VImage *arg1 = (vips::VImage *) 0 ;
68278 - int arg2 ;
68279 - int arg3 ;
68280 - int arg4 ;
68281 - int arg5 ;
68282 - int arg6 ;
68283 - void *argp1 = 0 ;
68284 - int res1 = 0 ;
68285 - int val2 ;
68286 - int ecode2 = 0 ;
68287 - int val3 ;
68288 - int ecode3 = 0 ;
68289 - int val4 ;
68290 - int ecode4 = 0 ;
68291 - int val5 ;
68292 - int ecode5 = 0 ;
68293 - int val6 ;
68294 - int ecode6 = 0 ;
68295 - PyObject * obj0 = 0 ;
68296 - PyObject * obj1 = 0 ;
68297 - PyObject * obj2 = 0 ;
68298 - PyObject * obj3 = 0 ;
68299 - PyObject * obj4 = 0 ;
68300 - PyObject * obj5 = 0 ;
68301 - vips::VImage result;
68302 -
68303 - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:VImage_embed",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
68304 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
68305 - if (!SWIG_IsOK(res1)) {
68306 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_embed" "', argument " "1"" of type '" "vips::VImage *""'");
68307 - }
68308 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
68309 - ecode2 = SWIG_AsVal_int(obj1, &val2);
68310 - if (!SWIG_IsOK(ecode2)) {
68311 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_embed" "', argument " "2"" of type '" "int""'");
68312 - }
68313 - arg2 = static_cast< int >(val2);
68314 - ecode3 = SWIG_AsVal_int(obj2, &val3);
68315 - if (!SWIG_IsOK(ecode3)) {
68316 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_embed" "', argument " "3"" of type '" "int""'");
68317 - }
68318 - arg3 = static_cast< int >(val3);
68319 - ecode4 = SWIG_AsVal_int(obj3, &val4);
68320 - if (!SWIG_IsOK(ecode4)) {
68321 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_embed" "', argument " "4"" of type '" "int""'");
68322 - }
68323 - arg4 = static_cast< int >(val4);
68324 - ecode5 = SWIG_AsVal_int(obj4, &val5);
68325 - if (!SWIG_IsOK(ecode5)) {
68326 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_embed" "', argument " "5"" of type '" "int""'");
68327 - }
68328 - arg5 = static_cast< int >(val5);
68329 - ecode6 = SWIG_AsVal_int(obj5, &val6);
68330 - if (!SWIG_IsOK(ecode6)) {
68331 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_embed" "', argument " "6"" of type '" "int""'");
68332 - }
68333 - arg6 = static_cast< int >(val6);
68334 - try {
68335 - result = (arg1)->embed(arg2,arg3,arg4,arg5,arg6);
68336 - }
68337 - catch(vips::VError &_e) {
68338 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
68339 - }
68340 -
68341 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
68342 - return resultobj;
68343 -fail:
68344 - return NULL;
68345 -}
68346 -
68347 -
68348 -SWIGINTERN PyObject *_wrap_VImage_lrjoin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68349 - PyObject *resultobj = 0;
68350 - vips::VImage *arg1 = (vips::VImage *) 0 ;
68351 - vips::VImage arg2 ;
68352 - void *argp1 = 0 ;
68353 - int res1 = 0 ;
68354 - void *argp2 ;
68355 - int res2 = 0 ;
68356 - PyObject * obj0 = 0 ;
68357 - PyObject * obj1 = 0 ;
68358 - vips::VImage result;
68359 -
68360 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_lrjoin",&obj0,&obj1)) SWIG_fail;
68361 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
68362 - if (!SWIG_IsOK(res1)) {
68363 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lrjoin" "', argument " "1"" of type '" "vips::VImage *""'");
68364 - }
68365 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
68366 - {
68367 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
68368 - if (!SWIG_IsOK(res2)) {
68369 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lrjoin" "', argument " "2"" of type '" "vips::VImage""'");
68370 - }
68371 - if (!argp2) {
68372 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lrjoin" "', argument " "2"" of type '" "vips::VImage""'");
68373 - } else {
68374 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
68375 - arg2 = *temp;
68376 - if (SWIG_IsNewObj(res2)) delete temp;
68377 - }
68378 - }
68379 - try {
68380 - result = (arg1)->lrjoin(arg2);
68381 - }
68382 - catch(vips::VError &_e) {
68383 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
68384 - }
68385 -
68386 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
68387 - return resultobj;
68388 -fail:
68389 - return NULL;
68390 -}
68391 -
68392 -
68393 -SWIGINTERN PyObject *_wrap_VImage_msb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68394 - PyObject *resultobj = 0;
68395 - vips::VImage *arg1 = (vips::VImage *) 0 ;
68396 - void *argp1 = 0 ;
68397 - int res1 = 0 ;
68398 - PyObject * obj0 = 0 ;
68399 - vips::VImage result;
68400 -
68401 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_msb",&obj0)) SWIG_fail;
68402 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
68403 - if (!SWIG_IsOK(res1)) {
68404 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_msb" "', argument " "1"" of type '" "vips::VImage *""'");
68405 - }
68406 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
68407 - try {
68408 - result = (arg1)->msb();
68409 - }
68410 - catch(vips::VError &_e) {
68411 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
68412 - }
68413 -
68414 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
68415 - return resultobj;
68416 -fail:
68417 - return NULL;
68418 -}
68419 -
68420 -
68421 -SWIGINTERN PyObject *_wrap_VImage_msb_band(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68422 - PyObject *resultobj = 0;
68423 - vips::VImage *arg1 = (vips::VImage *) 0 ;
68424 - int arg2 ;
68425 - void *argp1 = 0 ;
68426 - int res1 = 0 ;
68427 - int val2 ;
68428 - int ecode2 = 0 ;
68429 - PyObject * obj0 = 0 ;
68430 - PyObject * obj1 = 0 ;
68431 - vips::VImage result;
68432 -
68433 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_msb_band",&obj0,&obj1)) SWIG_fail;
68434 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
68435 - if (!SWIG_IsOK(res1)) {
68436 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_msb_band" "', argument " "1"" of type '" "vips::VImage *""'");
68437 - }
68438 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
68439 - ecode2 = SWIG_AsVal_int(obj1, &val2);
68440 - if (!SWIG_IsOK(ecode2)) {
68441 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_msb_band" "', argument " "2"" of type '" "int""'");
68442 - }
68443 - arg2 = static_cast< int >(val2);
68444 - try {
68445 - result = (arg1)->msb_band(arg2);
68446 - }
68447 - catch(vips::VError &_e) {
68448 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
68449 - }
68450 -
68451 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
68452 - return resultobj;
68453 -fail:
68454 - return NULL;
68455 -}
68456 -
68457 -
68458 -SWIGINTERN PyObject *_wrap_VImage_replicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68459 - PyObject *resultobj = 0;
68460 - vips::VImage *arg1 = (vips::VImage *) 0 ;
68461 - int arg2 ;
68462 - int arg3 ;
68463 - void *argp1 = 0 ;
68464 - int res1 = 0 ;
68465 - int val2 ;
68466 - int ecode2 = 0 ;
68467 - int val3 ;
68468 - int ecode3 = 0 ;
68469 - PyObject * obj0 = 0 ;
68470 - PyObject * obj1 = 0 ;
68471 - PyObject * obj2 = 0 ;
68472 - vips::VImage result;
68473 -
68474 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_replicate",&obj0,&obj1,&obj2)) SWIG_fail;
68475 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
68476 - if (!SWIG_IsOK(res1)) {
68477 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_replicate" "', argument " "1"" of type '" "vips::VImage *""'");
68478 - }
68479 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
68480 - ecode2 = SWIG_AsVal_int(obj1, &val2);
68481 - if (!SWIG_IsOK(ecode2)) {
68482 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_replicate" "', argument " "2"" of type '" "int""'");
68483 - }
68484 - arg2 = static_cast< int >(val2);
68485 - ecode3 = SWIG_AsVal_int(obj2, &val3);
68486 - if (!SWIG_IsOK(ecode3)) {
68487 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_replicate" "', argument " "3"" of type '" "int""'");
68488 - }
68489 - arg3 = static_cast< int >(val3);
68490 - try {
68491 - result = (arg1)->replicate(arg2,arg3);
68492 - }
68493 - catch(vips::VError &_e) {
68494 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
68495 - }
68496 -
68497 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
68498 - return resultobj;
68499 -fail:
68500 - return NULL;
68501 -}
68502 -
68503 -
68504 -SWIGINTERN PyObject *_wrap_VImage_ri2c(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68505 - PyObject *resultobj = 0;
68506 - vips::VImage *arg1 = (vips::VImage *) 0 ;
68507 - vips::VImage arg2 ;
68508 - void *argp1 = 0 ;
68509 - int res1 = 0 ;
68510 - void *argp2 ;
68511 - int res2 = 0 ;
68512 - PyObject * obj0 = 0 ;
68513 - PyObject * obj1 = 0 ;
68514 - vips::VImage result;
68515 -
68516 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_ri2c",&obj0,&obj1)) SWIG_fail;
68517 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
68518 - if (!SWIG_IsOK(res1)) {
68519 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_ri2c" "', argument " "1"" of type '" "vips::VImage *""'");
68520 - }
68521 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
68522 - {
68523 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
68524 - if (!SWIG_IsOK(res2)) {
68525 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_ri2c" "', argument " "2"" of type '" "vips::VImage""'");
68526 - }
68527 - if (!argp2) {
68528 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_ri2c" "', argument " "2"" of type '" "vips::VImage""'");
68529 - } else {
68530 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
68531 - arg2 = *temp;
68532 - if (SWIG_IsNewObj(res2)) delete temp;
68533 - }
68534 - }
68535 - try {
68536 - result = (arg1)->ri2c(arg2);
68537 - }
68538 - catch(vips::VError &_e) {
68539 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
68540 - }
68541 -
68542 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
68543 - return resultobj;
68544 -fail:
68545 - return NULL;
68546 -}
68547 -
68548 -
68549 -SWIGINTERN PyObject *_wrap_VImage_rot180(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68550 - PyObject *resultobj = 0;
68551 - vips::VImage *arg1 = (vips::VImage *) 0 ;
68552 - void *argp1 = 0 ;
68553 - int res1 = 0 ;
68554 - PyObject * obj0 = 0 ;
68555 - vips::VImage result;
68556 -
68557 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_rot180",&obj0)) SWIG_fail;
68558 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
68559 - if (!SWIG_IsOK(res1)) {
68560 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rot180" "', argument " "1"" of type '" "vips::VImage *""'");
68561 - }
68562 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
68563 - try {
68564 - result = (arg1)->rot180();
68565 - }
68566 - catch(vips::VError &_e) {
68567 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
68568 - }
68569 -
68570 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
68571 - return resultobj;
68572 -fail:
68573 - return NULL;
68574 -}
68575 -
68576 -
68577 -SWIGINTERN PyObject *_wrap_VImage_rot270(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68578 - PyObject *resultobj = 0;
68579 - vips::VImage *arg1 = (vips::VImage *) 0 ;
68580 - void *argp1 = 0 ;
68581 - int res1 = 0 ;
68582 - PyObject * obj0 = 0 ;
68583 - vips::VImage result;
68584 -
68585 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_rot270",&obj0)) SWIG_fail;
68586 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
68587 - if (!SWIG_IsOK(res1)) {
68588 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rot270" "', argument " "1"" of type '" "vips::VImage *""'");
68589 - }
68590 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
68591 - try {
68592 - result = (arg1)->rot270();
68593 - }
68594 - catch(vips::VError &_e) {
68595 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
68596 - }
68597 -
68598 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
68599 - return resultobj;
68600 -fail:
68601 - return NULL;
68602 -}
68603 -
68604 -
68605 -SWIGINTERN PyObject *_wrap_VImage_rot90(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68606 - PyObject *resultobj = 0;
68607 - vips::VImage *arg1 = (vips::VImage *) 0 ;
68608 - void *argp1 = 0 ;
68609 - int res1 = 0 ;
68610 - PyObject * obj0 = 0 ;
68611 - vips::VImage result;
68612 -
68613 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_rot90",&obj0)) SWIG_fail;
68614 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
68615 - if (!SWIG_IsOK(res1)) {
68616 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rot90" "', argument " "1"" of type '" "vips::VImage *""'");
68617 - }
68618 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
68619 - try {
68620 - result = (arg1)->rot90();
68621 - }
68622 - catch(vips::VError &_e) {
68623 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
68624 - }
68625 -
68626 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
68627 - return resultobj;
68628 -fail:
68629 - return NULL;
68630 -}
68631 -
68632 -
68633 -SWIGINTERN PyObject *_wrap_VImage_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68634 - PyObject *resultobj = 0;
68635 - vips::VImage *arg1 = (vips::VImage *) 0 ;
68636 - void *argp1 = 0 ;
68637 - int res1 = 0 ;
68638 - PyObject * obj0 = 0 ;
68639 - vips::VImage result;
68640 -
68641 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_scale",&obj0)) SWIG_fail;
68642 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
68643 - if (!SWIG_IsOK(res1)) {
68644 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_scale" "', argument " "1"" of type '" "vips::VImage *""'");
68645 - }
68646 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
68647 - try {
68648 - result = (arg1)->scale();
68649 - }
68650 - catch(vips::VError &_e) {
68651 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
68652 - }
68653 -
68654 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
68655 - return resultobj;
68656 -fail:
68657 - return NULL;
68658 -}
68659 -
68660 -
68661 -SWIGINTERN PyObject *_wrap_VImage_scaleps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68662 - PyObject *resultobj = 0;
68663 - vips::VImage *arg1 = (vips::VImage *) 0 ;
68664 - void *argp1 = 0 ;
68665 - int res1 = 0 ;
68666 - PyObject * obj0 = 0 ;
68667 - vips::VImage result;
68668 -
68669 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_scaleps",&obj0)) SWIG_fail;
68670 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
68671 - if (!SWIG_IsOK(res1)) {
68672 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_scaleps" "', argument " "1"" of type '" "vips::VImage *""'");
68673 - }
68674 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
68675 - try {
68676 - result = (arg1)->scaleps();
68677 - }
68678 - catch(vips::VError &_e) {
68679 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
68680 - }
68681 -
68682 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
68683 - return resultobj;
68684 -fail:
68685 - return NULL;
68686 -}
68687 -
68688 -
68689 -SWIGINTERN PyObject *_wrap_VImage_subsample(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68690 - PyObject *resultobj = 0;
68691 - vips::VImage *arg1 = (vips::VImage *) 0 ;
68692 - int arg2 ;
68693 - int arg3 ;
68694 - void *argp1 = 0 ;
68695 - int res1 = 0 ;
68696 - int val2 ;
68697 - int ecode2 = 0 ;
68698 - int val3 ;
68699 - int ecode3 = 0 ;
68700 - PyObject * obj0 = 0 ;
68701 - PyObject * obj1 = 0 ;
68702 - PyObject * obj2 = 0 ;
68703 - vips::VImage result;
68704 -
68705 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_subsample",&obj0,&obj1,&obj2)) SWIG_fail;
68706 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
68707 - if (!SWIG_IsOK(res1)) {
68708 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_subsample" "', argument " "1"" of type '" "vips::VImage *""'");
68709 - }
68710 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
68711 - ecode2 = SWIG_AsVal_int(obj1, &val2);
68712 - if (!SWIG_IsOK(ecode2)) {
68713 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_subsample" "', argument " "2"" of type '" "int""'");
68714 - }
68715 - arg2 = static_cast< int >(val2);
68716 - ecode3 = SWIG_AsVal_int(obj2, &val3);
68717 - if (!SWIG_IsOK(ecode3)) {
68718 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_subsample" "', argument " "3"" of type '" "int""'");
68719 - }
68720 - arg3 = static_cast< int >(val3);
68721 - try {
68722 - result = (arg1)->subsample(arg2,arg3);
68723 - }
68724 - catch(vips::VError &_e) {
68725 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
68726 - }
68727 -
68728 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
68729 - return resultobj;
68730 -fail:
68731 - return NULL;
68732 -}
68733 -
68734 -
68735 -SWIGINTERN PyObject *_wrap_VImage_system(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68736 - PyObject *resultobj = 0;
68737 - vips::VImage *arg1 = (vips::VImage *) 0 ;
68738 - char *arg2 = (char *) 0 ;
68739 - void *argp1 = 0 ;
68740 - int res1 = 0 ;
68741 - int res2 ;
68742 - char *buf2 = 0 ;
68743 - int alloc2 = 0 ;
68744 - PyObject * obj0 = 0 ;
68745 - PyObject * obj1 = 0 ;
68746 - char *result = 0 ;
68747 -
68748 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_system",&obj0,&obj1)) SWIG_fail;
68749 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
68750 - if (!SWIG_IsOK(res1)) {
68751 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_system" "', argument " "1"" of type '" "vips::VImage *""'");
68752 - }
68753 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
68754 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
68755 - if (!SWIG_IsOK(res2)) {
68756 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_system" "', argument " "2"" of type '" "char *""'");
68757 - }
68758 - arg2 = reinterpret_cast< char * >(buf2);
68759 - try {
68760 - result = (char *)(arg1)->system(arg2);
68761 - }
68762 - catch(vips::VError &_e) {
68763 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
68764 - }
68765 -
68766 - resultobj = SWIG_FromCharPtr((const char *)result);
68767 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
68768 - return resultobj;
68769 -fail:
68770 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
68771 - return NULL;
68772 -}
68773 -
68774 -
68775 -SWIGINTERN PyObject *_wrap_VImage_system_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68776 - PyObject *resultobj = 0;
68777 - vips::VImage *arg1 = (vips::VImage *) 0 ;
68778 - char *arg2 = (char *) 0 ;
68779 - char *arg3 = (char *) 0 ;
68780 - char *arg4 = (char *) 0 ;
68781 - char **arg5 = 0 ;
68782 - void *argp1 = 0 ;
68783 - int res1 = 0 ;
68784 - int res2 ;
68785 - char *buf2 = 0 ;
68786 - int alloc2 = 0 ;
68787 - int res3 ;
68788 - char *buf3 = 0 ;
68789 - int alloc3 = 0 ;
68790 - int res4 ;
68791 - char *buf4 = 0 ;
68792 - int alloc4 = 0 ;
68793 - void *argp5 = 0 ;
68794 - int res5 = 0 ;
68795 - PyObject * obj0 = 0 ;
68796 - PyObject * obj1 = 0 ;
68797 - PyObject * obj2 = 0 ;
68798 - PyObject * obj3 = 0 ;
68799 - PyObject * obj4 = 0 ;
68800 - vips::VImage result;
68801 -
68802 - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_system_image",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
68803 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
68804 - if (!SWIG_IsOK(res1)) {
68805 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_system_image" "', argument " "1"" of type '" "vips::VImage *""'");
68806 - }
68807 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
68808 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
68809 - if (!SWIG_IsOK(res2)) {
68810 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_system_image" "', argument " "2"" of type '" "char *""'");
68811 - }
68812 - arg2 = reinterpret_cast< char * >(buf2);
68813 - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
68814 - if (!SWIG_IsOK(res3)) {
68815 - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_system_image" "', argument " "3"" of type '" "char *""'");
68816 - }
68817 - arg3 = reinterpret_cast< char * >(buf3);
68818 - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
68819 - if (!SWIG_IsOK(res4)) {
68820 - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VImage_system_image" "', argument " "4"" of type '" "char *""'");
68821 - }
68822 - arg4 = reinterpret_cast< char * >(buf4);
68823 - res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_p_char, 0 );
68824 - if (!SWIG_IsOK(res5)) {
68825 - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "VImage_system_image" "', argument " "5"" of type '" "char *&""'");
68826 - }
68827 - if (!argp5) {
68828 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_system_image" "', argument " "5"" of type '" "char *&""'");
68829 - }
68830 - arg5 = reinterpret_cast< char ** >(argp5);
68831 - try {
68832 - result = (arg1)->system_image(arg2,arg3,arg4,*arg5);
68833 - }
68834 - catch(vips::VError &_e) {
68835 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
68836 - }
68837 -
68838 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
68839 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
68840 - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
68841 - if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
68842 - return resultobj;
68843 -fail:
68844 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
68845 - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
68846 - if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
68847 - return NULL;
68848 -}
68849 -
68850 -
68851 -SWIGINTERN PyObject *_wrap_VImage_tbjoin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68852 - PyObject *resultobj = 0;
68853 - vips::VImage *arg1 = (vips::VImage *) 0 ;
68854 - vips::VImage arg2 ;
68855 - void *argp1 = 0 ;
68856 - int res1 = 0 ;
68857 - void *argp2 ;
68858 - int res2 = 0 ;
68859 - PyObject * obj0 = 0 ;
68860 - PyObject * obj1 = 0 ;
68861 - vips::VImage result;
68862 -
68863 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_tbjoin",&obj0,&obj1)) SWIG_fail;
68864 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
68865 - if (!SWIG_IsOK(res1)) {
68866 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tbjoin" "', argument " "1"" of type '" "vips::VImage *""'");
68867 - }
68868 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
68869 - {
68870 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
68871 - if (!SWIG_IsOK(res2)) {
68872 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_tbjoin" "', argument " "2"" of type '" "vips::VImage""'");
68873 - }
68874 - if (!argp2) {
68875 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_tbjoin" "', argument " "2"" of type '" "vips::VImage""'");
68876 - } else {
68877 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
68878 - arg2 = *temp;
68879 - if (SWIG_IsNewObj(res2)) delete temp;
68880 - }
68881 - }
68882 - try {
68883 - result = (arg1)->tbjoin(arg2);
68884 - }
68885 - catch(vips::VError &_e) {
68886 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
68887 - }
68888 -
68889 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
68890 - return resultobj;
68891 -fail:
68892 - return NULL;
68893 -}
68894 -
68895 -
68896 -SWIGINTERN PyObject *_wrap_VImage_text(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68897 - PyObject *resultobj = 0;
68898 - char *arg1 = (char *) 0 ;
68899 - char *arg2 = (char *) 0 ;
68900 - int arg3 ;
68901 - int arg4 ;
68902 - int arg5 ;
68903 - int res1 ;
68904 - char *buf1 = 0 ;
68905 - int alloc1 = 0 ;
68906 - int res2 ;
68907 - char *buf2 = 0 ;
68908 - int alloc2 = 0 ;
68909 - int val3 ;
68910 - int ecode3 = 0 ;
68911 - int val4 ;
68912 - int ecode4 = 0 ;
68913 - int val5 ;
68914 - int ecode5 = 0 ;
68915 - PyObject * obj0 = 0 ;
68916 - PyObject * obj1 = 0 ;
68917 - PyObject * obj2 = 0 ;
68918 - PyObject * obj3 = 0 ;
68919 - PyObject * obj4 = 0 ;
68920 - vips::VImage result;
68921 -
68922 - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_text",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
68923 - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
68924 - if (!SWIG_IsOK(res1)) {
68925 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_text" "', argument " "1"" of type '" "char *""'");
68926 - }
68927 - arg1 = reinterpret_cast< char * >(buf1);
68928 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
68929 - if (!SWIG_IsOK(res2)) {
68930 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_text" "', argument " "2"" of type '" "char *""'");
68931 - }
68932 - arg2 = reinterpret_cast< char * >(buf2);
68933 - ecode3 = SWIG_AsVal_int(obj2, &val3);
68934 - if (!SWIG_IsOK(ecode3)) {
68935 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_text" "', argument " "3"" of type '" "int""'");
68936 - }
68937 - arg3 = static_cast< int >(val3);
68938 - ecode4 = SWIG_AsVal_int(obj3, &val4);
68939 - if (!SWIG_IsOK(ecode4)) {
68940 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_text" "', argument " "4"" of type '" "int""'");
68941 - }
68942 - arg4 = static_cast< int >(val4);
68943 - ecode5 = SWIG_AsVal_int(obj4, &val5);
68944 - if (!SWIG_IsOK(ecode5)) {
68945 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_text" "', argument " "5"" of type '" "int""'");
68946 - }
68947 - arg5 = static_cast< int >(val5);
68948 - try {
68949 - result = vips::VImage::text(arg1,arg2,arg3,arg4,arg5);
68950 - }
68951 - catch(vips::VError &_e) {
68952 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
68953 - }
68954 -
68955 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
68956 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
68957 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
68958 - return resultobj;
68959 -fail:
68960 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
68961 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
68962 - return NULL;
68963 -}
68964 -
68965 -
68966 -SWIGINTERN PyObject *_wrap_VImage_wrap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68967 - PyObject *resultobj = 0;
68968 - vips::VImage *arg1 = (vips::VImage *) 0 ;
68969 - int arg2 ;
68970 - int arg3 ;
68971 - void *argp1 = 0 ;
68972 - int res1 = 0 ;
68973 - int val2 ;
68974 - int ecode2 = 0 ;
68975 - int val3 ;
68976 - int ecode3 = 0 ;
68977 - PyObject * obj0 = 0 ;
68978 - PyObject * obj1 = 0 ;
68979 - PyObject * obj2 = 0 ;
68980 - vips::VImage result;
68981 -
68982 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_wrap",&obj0,&obj1,&obj2)) SWIG_fail;
68983 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
68984 - if (!SWIG_IsOK(res1)) {
68985 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_wrap" "', argument " "1"" of type '" "vips::VImage *""'");
68986 - }
68987 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
68988 - ecode2 = SWIG_AsVal_int(obj1, &val2);
68989 - if (!SWIG_IsOK(ecode2)) {
68990 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_wrap" "', argument " "2"" of type '" "int""'");
68991 - }
68992 - arg2 = static_cast< int >(val2);
68993 - ecode3 = SWIG_AsVal_int(obj2, &val3);
68994 - if (!SWIG_IsOK(ecode3)) {
68995 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_wrap" "', argument " "3"" of type '" "int""'");
68996 - }
68997 - arg3 = static_cast< int >(val3);
68998 - try {
68999 - result = (arg1)->wrap(arg2,arg3);
69000 - }
69001 - catch(vips::VError &_e) {
69002 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
69003 - }
69004 -
69005 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
69006 - return resultobj;
69007 -fail:
69008 - return NULL;
69009 -}
69010 -
69011 -
69012 -SWIGINTERN PyObject *_wrap_VImage_zoom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69013 - PyObject *resultobj = 0;
69014 - vips::VImage *arg1 = (vips::VImage *) 0 ;
69015 - int arg2 ;
69016 - int arg3 ;
69017 - void *argp1 = 0 ;
69018 - int res1 = 0 ;
69019 - int val2 ;
69020 - int ecode2 = 0 ;
69021 - int val3 ;
69022 - int ecode3 = 0 ;
69023 - PyObject * obj0 = 0 ;
69024 - PyObject * obj1 = 0 ;
69025 - PyObject * obj2 = 0 ;
69026 - vips::VImage result;
69027 -
69028 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_zoom",&obj0,&obj1,&obj2)) SWIG_fail;
69029 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
69030 - if (!SWIG_IsOK(res1)) {
69031 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_zoom" "', argument " "1"" of type '" "vips::VImage *""'");
69032 - }
69033 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
69034 - ecode2 = SWIG_AsVal_int(obj1, &val2);
69035 - if (!SWIG_IsOK(ecode2)) {
69036 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_zoom" "', argument " "2"" of type '" "int""'");
69037 - }
69038 - arg2 = static_cast< int >(val2);
69039 - ecode3 = SWIG_AsVal_int(obj2, &val3);
69040 - if (!SWIG_IsOK(ecode3)) {
69041 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_zoom" "', argument " "3"" of type '" "int""'");
69042 - }
69043 - arg3 = static_cast< int >(val3);
69044 - try {
69045 - result = (arg1)->zoom(arg2,arg3);
69046 - }
69047 - catch(vips::VError &_e) {
69048 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
69049 - }
69050 -
69051 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
69052 - return resultobj;
69053 -fail:
69054 - return NULL;
69055 -}
69056 -
69057 -
69058 -SWIGINTERN PyObject *_wrap_VImage_aconvsep(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69059 - PyObject *resultobj = 0;
69060 - vips::VImage *arg1 = (vips::VImage *) 0 ;
69061 - vips::VDMask arg2 ;
69062 - int arg3 ;
69063 - void *argp1 = 0 ;
69064 - int res1 = 0 ;
69065 - void *argp2 ;
69066 - int res2 = 0 ;
69067 - int val3 ;
69068 - int ecode3 = 0 ;
69069 - PyObject * obj0 = 0 ;
69070 - PyObject * obj1 = 0 ;
69071 - PyObject * obj2 = 0 ;
69072 - vips::VImage result;
69073 -
69074 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_aconvsep",&obj0,&obj1,&obj2)) SWIG_fail;
69075 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
69076 - if (!SWIG_IsOK(res1)) {
69077 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_aconvsep" "', argument " "1"" of type '" "vips::VImage *""'");
69078 - }
69079 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
69080 - {
69081 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
69082 - if (!SWIG_IsOK(res2)) {
69083 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_aconvsep" "', argument " "2"" of type '" "vips::VDMask""'");
69084 - }
69085 - if (!argp2) {
69086 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_aconvsep" "', argument " "2"" of type '" "vips::VDMask""'");
69087 - } else {
69088 - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
69089 - arg2 = *temp;
69090 - if (SWIG_IsNewObj(res2)) delete temp;
69091 - }
69092 - }
69093 - ecode3 = SWIG_AsVal_int(obj2, &val3);
69094 - if (!SWIG_IsOK(ecode3)) {
69095 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_aconvsep" "', argument " "3"" of type '" "int""'");
69096 - }
69097 - arg3 = static_cast< int >(val3);
69098 - try {
69099 - result = (arg1)->aconvsep(arg2,arg3);
69100 - }
69101 - catch(vips::VError &_e) {
69102 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
69103 - }
69104 -
69105 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
69106 - return resultobj;
69107 -fail:
69108 - return NULL;
69109 -}
69110 -
69111 -
69112 -SWIGINTERN PyObject *_wrap_VImage_aconv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69113 - PyObject *resultobj = 0;
69114 - vips::VImage *arg1 = (vips::VImage *) 0 ;
69115 - vips::VDMask arg2 ;
69116 - int arg3 ;
69117 - int arg4 ;
69118 - void *argp1 = 0 ;
69119 - int res1 = 0 ;
69120 - void *argp2 ;
69121 - int res2 = 0 ;
69122 - int val3 ;
69123 - int ecode3 = 0 ;
69124 - int val4 ;
69125 - int ecode4 = 0 ;
69126 - PyObject * obj0 = 0 ;
69127 - PyObject * obj1 = 0 ;
69128 - PyObject * obj2 = 0 ;
69129 - PyObject * obj3 = 0 ;
69130 - vips::VImage result;
69131 -
69132 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_aconv",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
69133 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
69134 - if (!SWIG_IsOK(res1)) {
69135 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_aconv" "', argument " "1"" of type '" "vips::VImage *""'");
69136 - }
69137 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
69138 - {
69139 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
69140 - if (!SWIG_IsOK(res2)) {
69141 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_aconv" "', argument " "2"" of type '" "vips::VDMask""'");
69142 - }
69143 - if (!argp2) {
69144 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_aconv" "', argument " "2"" of type '" "vips::VDMask""'");
69145 - } else {
69146 - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
69147 - arg2 = *temp;
69148 - if (SWIG_IsNewObj(res2)) delete temp;
69149 - }
69150 - }
69151 - ecode3 = SWIG_AsVal_int(obj2, &val3);
69152 - if (!SWIG_IsOK(ecode3)) {
69153 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_aconv" "', argument " "3"" of type '" "int""'");
69154 - }
69155 - arg3 = static_cast< int >(val3);
69156 - ecode4 = SWIG_AsVal_int(obj3, &val4);
69157 - if (!SWIG_IsOK(ecode4)) {
69158 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_aconv" "', argument " "4"" of type '" "int""'");
69159 - }
69160 - arg4 = static_cast< int >(val4);
69161 - try {
69162 - result = (arg1)->aconv(arg2,arg3,arg4);
69163 - }
69164 - catch(vips::VError &_e) {
69165 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
69166 - }
69167 -
69168 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
69169 - return resultobj;
69170 -fail:
69171 - return NULL;
69172 -}
69173 -
69174 -
69175 -SWIGINTERN PyObject *_wrap_VImage_addgnoise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69176 - PyObject *resultobj = 0;
69177 - vips::VImage *arg1 = (vips::VImage *) 0 ;
69178 - double arg2 ;
69179 - void *argp1 = 0 ;
69180 - int res1 = 0 ;
69181 - double val2 ;
69182 - int ecode2 = 0 ;
69183 - PyObject * obj0 = 0 ;
69184 - PyObject * obj1 = 0 ;
69185 - vips::VImage result;
69186 -
69187 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_addgnoise",&obj0,&obj1)) SWIG_fail;
69188 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
69189 - if (!SWIG_IsOK(res1)) {
69190 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_addgnoise" "', argument " "1"" of type '" "vips::VImage *""'");
69191 - }
69192 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
69193 - ecode2 = SWIG_AsVal_double(obj1, &val2);
69194 - if (!SWIG_IsOK(ecode2)) {
69195 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_addgnoise" "', argument " "2"" of type '" "double""'");
69196 - }
69197 - arg2 = static_cast< double >(val2);
69198 - try {
69199 - result = (arg1)->addgnoise(arg2);
69200 - }
69201 - catch(vips::VError &_e) {
69202 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
69203 - }
69204 -
69205 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
69206 - return resultobj;
69207 -fail:
69208 - return NULL;
69209 -}
69210 -
69211 -
69212 -SWIGINTERN PyObject *_wrap_VImage_compass(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69213 - PyObject *resultobj = 0;
69214 - vips::VImage *arg1 = (vips::VImage *) 0 ;
69215 - vips::VIMask arg2 ;
69216 - void *argp1 = 0 ;
69217 - int res1 = 0 ;
69218 - void *argp2 ;
69219 - int res2 = 0 ;
69220 - PyObject * obj0 = 0 ;
69221 - PyObject * obj1 = 0 ;
69222 - vips::VImage result;
69223 -
69224 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_compass",&obj0,&obj1)) SWIG_fail;
69225 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
69226 - if (!SWIG_IsOK(res1)) {
69227 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_compass" "', argument " "1"" of type '" "vips::VImage *""'");
69228 - }
69229 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
69230 - {
69231 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
69232 - if (!SWIG_IsOK(res2)) {
69233 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_compass" "', argument " "2"" of type '" "vips::VIMask""'");
69234 - }
69235 - if (!argp2) {
69236 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_compass" "', argument " "2"" of type '" "vips::VIMask""'");
69237 - } else {
69238 - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
69239 - arg2 = *temp;
69240 - if (SWIG_IsNewObj(res2)) delete temp;
69241 - }
69242 - }
69243 - try {
69244 - result = (arg1)->compass(arg2);
69245 - }
69246 - catch(vips::VError &_e) {
69247 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
69248 - }
69249 -
69250 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
69251 - return resultobj;
69252 -fail:
69253 - return NULL;
69254 -}
69255 -
69256 -
69257 -SWIGINTERN PyObject *_wrap_VImage_contrast_surface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69258 - PyObject *resultobj = 0;
69259 - vips::VImage *arg1 = (vips::VImage *) 0 ;
69260 - int arg2 ;
69261 - int arg3 ;
69262 - void *argp1 = 0 ;
69263 - int res1 = 0 ;
69264 - int val2 ;
69265 - int ecode2 = 0 ;
69266 - int val3 ;
69267 - int ecode3 = 0 ;
69268 - PyObject * obj0 = 0 ;
69269 - PyObject * obj1 = 0 ;
69270 - PyObject * obj2 = 0 ;
69271 - vips::VImage result;
69272 -
69273 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_contrast_surface",&obj0,&obj1,&obj2)) SWIG_fail;
69274 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
69275 - if (!SWIG_IsOK(res1)) {
69276 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_contrast_surface" "', argument " "1"" of type '" "vips::VImage *""'");
69277 - }
69278 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
69279 - ecode2 = SWIG_AsVal_int(obj1, &val2);
69280 - if (!SWIG_IsOK(ecode2)) {
69281 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_contrast_surface" "', argument " "2"" of type '" "int""'");
69282 - }
69283 - arg2 = static_cast< int >(val2);
69284 - ecode3 = SWIG_AsVal_int(obj2, &val3);
69285 - if (!SWIG_IsOK(ecode3)) {
69286 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_contrast_surface" "', argument " "3"" of type '" "int""'");
69287 - }
69288 - arg3 = static_cast< int >(val3);
69289 - try {
69290 - result = (arg1)->contrast_surface(arg2,arg3);
69291 - }
69292 - catch(vips::VError &_e) {
69293 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
69294 - }
69295 -
69296 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
69297 - return resultobj;
69298 -fail:
69299 - return NULL;
69300 -}
69301 -
69302 -
69303 -SWIGINTERN PyObject *_wrap_VImage_conv__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69304 - PyObject *resultobj = 0;
69305 - vips::VImage *arg1 = (vips::VImage *) 0 ;
69306 - vips::VIMask arg2 ;
69307 - void *argp1 = 0 ;
69308 - int res1 = 0 ;
69309 - void *argp2 ;
69310 - int res2 = 0 ;
69311 - PyObject * obj0 = 0 ;
69312 - PyObject * obj1 = 0 ;
69313 - vips::VImage result;
69314 -
69315 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_conv",&obj0,&obj1)) SWIG_fail;
69316 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
69317 - if (!SWIG_IsOK(res1)) {
69318 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_conv" "', argument " "1"" of type '" "vips::VImage *""'");
69319 - }
69320 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
69321 - {
69322 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
69323 - if (!SWIG_IsOK(res2)) {
69324 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_conv" "', argument " "2"" of type '" "vips::VIMask""'");
69325 - }
69326 - if (!argp2) {
69327 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_conv" "', argument " "2"" of type '" "vips::VIMask""'");
69328 - } else {
69329 - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
69330 - arg2 = *temp;
69331 - if (SWIG_IsNewObj(res2)) delete temp;
69332 - }
69333 - }
69334 - try {
69335 - result = (arg1)->conv(arg2);
69336 - }
69337 - catch(vips::VError &_e) {
69338 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
69339 - }
69340 -
69341 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
69342 - return resultobj;
69343 -fail:
69344 - return NULL;
69345 -}
69346 -
69347 -
69348 -SWIGINTERN PyObject *_wrap_VImage_conv__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69349 - PyObject *resultobj = 0;
69350 - vips::VImage *arg1 = (vips::VImage *) 0 ;
69351 - vips::VDMask arg2 ;
69352 - void *argp1 = 0 ;
69353 - int res1 = 0 ;
69354 - void *argp2 ;
69355 - int res2 = 0 ;
69356 - PyObject * obj0 = 0 ;
69357 - PyObject * obj1 = 0 ;
69358 - vips::VImage result;
69359 -
69360 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_conv",&obj0,&obj1)) SWIG_fail;
69361 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
69362 - if (!SWIG_IsOK(res1)) {
69363 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_conv" "', argument " "1"" of type '" "vips::VImage *""'");
69364 - }
69365 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
69366 - {
69367 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
69368 - if (!SWIG_IsOK(res2)) {
69369 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_conv" "', argument " "2"" of type '" "vips::VDMask""'");
69370 - }
69371 - if (!argp2) {
69372 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_conv" "', argument " "2"" of type '" "vips::VDMask""'");
69373 - } else {
69374 - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
69375 - arg2 = *temp;
69376 - if (SWIG_IsNewObj(res2)) delete temp;
69377 - }
69378 - }
69379 - try {
69380 - result = (arg1)->conv(arg2);
69381 - }
69382 - catch(vips::VError &_e) {
69383 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
69384 - }
69385 -
69386 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
69387 - return resultobj;
69388 -fail:
69389 - return NULL;
69390 -}
69391 -
69392 -
69393 -SWIGINTERN PyObject *_wrap_VImage_conv(PyObject *self, PyObject *args) {
69394 - int argc;
69395 - PyObject *argv[3];
69396 - int ii;
69397 -
69398 - if (!PyTuple_Check(args)) SWIG_fail;
69399 - argc = args ? (int)PyObject_Length(args) : 0;
69400 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
69401 - argv[ii] = PyTuple_GET_ITEM(args,ii);
69402 - }
69403 - if (argc == 2) {
69404 - int _v;
69405 - void *vptr = 0;
69406 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
69407 - _v = SWIG_CheckState(res);
69408 - if (_v) {
69409 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VIMask, 0);
69410 - _v = SWIG_CheckState(res);
69411 - if (_v) {
69412 - return _wrap_VImage_conv__SWIG_0(self, args);
69413 - }
69414 - }
69415 - }
69416 - if (argc == 2) {
69417 - int _v;
69418 - void *vptr = 0;
69419 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
69420 - _v = SWIG_CheckState(res);
69421 - if (_v) {
69422 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VDMask, 0);
69423 - _v = SWIG_CheckState(res);
69424 - if (_v) {
69425 - return _wrap_VImage_conv__SWIG_1(self, args);
69426 - }
69427 - }
69428 - }
69429 -
69430 -fail:
69431 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_conv'.\n"
69432 - " Possible C/C++ prototypes are:\n"
69433 - " vips::VImage::conv(vips::VIMask)\n"
69434 - " vips::VImage::conv(vips::VDMask)\n");
69435 - return 0;
69436 -}
69437 -
69438 -
69439 -SWIGINTERN PyObject *_wrap_VImage_convsep__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69440 - PyObject *resultobj = 0;
69441 - vips::VImage *arg1 = (vips::VImage *) 0 ;
69442 - vips::VIMask arg2 ;
69443 - void *argp1 = 0 ;
69444 - int res1 = 0 ;
69445 - void *argp2 ;
69446 - int res2 = 0 ;
69447 - PyObject * obj0 = 0 ;
69448 - PyObject * obj1 = 0 ;
69449 - vips::VImage result;
69450 -
69451 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_convsep",&obj0,&obj1)) SWIG_fail;
69452 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
69453 - if (!SWIG_IsOK(res1)) {
69454 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convsep" "', argument " "1"" of type '" "vips::VImage *""'");
69455 - }
69456 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
69457 - {
69458 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
69459 - if (!SWIG_IsOK(res2)) {
69460 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convsep" "', argument " "2"" of type '" "vips::VIMask""'");
69461 - }
69462 - if (!argp2) {
69463 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convsep" "', argument " "2"" of type '" "vips::VIMask""'");
69464 - } else {
69465 - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
69466 - arg2 = *temp;
69467 - if (SWIG_IsNewObj(res2)) delete temp;
69468 - }
69469 - }
69470 - try {
69471 - result = (arg1)->convsep(arg2);
69472 - }
69473 - catch(vips::VError &_e) {
69474 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
69475 - }
69476 -
69477 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
69478 - return resultobj;
69479 -fail:
69480 - return NULL;
69481 -}
69482 -
69483 -
69484 -SWIGINTERN PyObject *_wrap_VImage_convsep__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69485 - PyObject *resultobj = 0;
69486 - vips::VImage *arg1 = (vips::VImage *) 0 ;
69487 - vips::VDMask arg2 ;
69488 - void *argp1 = 0 ;
69489 - int res1 = 0 ;
69490 - void *argp2 ;
69491 - int res2 = 0 ;
69492 - PyObject * obj0 = 0 ;
69493 - PyObject * obj1 = 0 ;
69494 - vips::VImage result;
69495 -
69496 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_convsep",&obj0,&obj1)) SWIG_fail;
69497 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
69498 - if (!SWIG_IsOK(res1)) {
69499 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convsep" "', argument " "1"" of type '" "vips::VImage *""'");
69500 - }
69501 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
69502 - {
69503 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
69504 - if (!SWIG_IsOK(res2)) {
69505 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convsep" "', argument " "2"" of type '" "vips::VDMask""'");
69506 - }
69507 - if (!argp2) {
69508 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convsep" "', argument " "2"" of type '" "vips::VDMask""'");
69509 - } else {
69510 - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
69511 - arg2 = *temp;
69512 - if (SWIG_IsNewObj(res2)) delete temp;
69513 - }
69514 - }
69515 - try {
69516 - result = (arg1)->convsep(arg2);
69517 - }
69518 - catch(vips::VError &_e) {
69519 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
69520 - }
69521 -
69522 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
69523 - return resultobj;
69524 -fail:
69525 - return NULL;
69526 -}
69527 -
69528 -
69529 -SWIGINTERN PyObject *_wrap_VImage_convsep(PyObject *self, PyObject *args) {
69530 - int argc;
69531 - PyObject *argv[3];
69532 - int ii;
69533 -
69534 - if (!PyTuple_Check(args)) SWIG_fail;
69535 - argc = args ? (int)PyObject_Length(args) : 0;
69536 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
69537 - argv[ii] = PyTuple_GET_ITEM(args,ii);
69538 - }
69539 - if (argc == 2) {
69540 - int _v;
69541 - void *vptr = 0;
69542 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
69543 - _v = SWIG_CheckState(res);
69544 - if (_v) {
69545 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VIMask, 0);
69546 - _v = SWIG_CheckState(res);
69547 - if (_v) {
69548 - return _wrap_VImage_convsep__SWIG_0(self, args);
69549 - }
69550 - }
69551 - }
69552 - if (argc == 2) {
69553 - int _v;
69554 - void *vptr = 0;
69555 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
69556 - _v = SWIG_CheckState(res);
69557 - if (_v) {
69558 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VDMask, 0);
69559 - _v = SWIG_CheckState(res);
69560 - if (_v) {
69561 - return _wrap_VImage_convsep__SWIG_1(self, args);
69562 - }
69563 - }
69564 - }
69565 -
69566 -fail:
69567 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_convsep'.\n"
69568 - " Possible C/C++ prototypes are:\n"
69569 - " vips::VImage::convsep(vips::VIMask)\n"
69570 - " vips::VImage::convsep(vips::VDMask)\n");
69571 - return 0;
69572 -}
69573 -
69574 -
69575 -SWIGINTERN PyObject *_wrap_VImage_fastcor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69576 - PyObject *resultobj = 0;
69577 - vips::VImage *arg1 = (vips::VImage *) 0 ;
69578 - vips::VImage arg2 ;
69579 - void *argp1 = 0 ;
69580 - int res1 = 0 ;
69581 - void *argp2 ;
69582 - int res2 = 0 ;
69583 - PyObject * obj0 = 0 ;
69584 - PyObject * obj1 = 0 ;
69585 - vips::VImage result;
69586 -
69587 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_fastcor",&obj0,&obj1)) SWIG_fail;
69588 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
69589 - if (!SWIG_IsOK(res1)) {
69590 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_fastcor" "', argument " "1"" of type '" "vips::VImage *""'");
69591 - }
69592 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
69593 - {
69594 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
69595 - if (!SWIG_IsOK(res2)) {
69596 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_fastcor" "', argument " "2"" of type '" "vips::VImage""'");
69597 - }
69598 - if (!argp2) {
69599 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_fastcor" "', argument " "2"" of type '" "vips::VImage""'");
69600 - } else {
69601 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
69602 - arg2 = *temp;
69603 - if (SWIG_IsNewObj(res2)) delete temp;
69604 - }
69605 - }
69606 - try {
69607 - result = (arg1)->fastcor(arg2);
69608 - }
69609 - catch(vips::VError &_e) {
69610 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
69611 - }
69612 -
69613 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
69614 - return resultobj;
69615 -fail:
69616 - return NULL;
69617 -}
69618 -
69619 -
69620 -SWIGINTERN PyObject *_wrap_VImage_gradcor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69621 - PyObject *resultobj = 0;
69622 - vips::VImage *arg1 = (vips::VImage *) 0 ;
69623 - vips::VImage arg2 ;
69624 - void *argp1 = 0 ;
69625 - int res1 = 0 ;
69626 - void *argp2 ;
69627 - int res2 = 0 ;
69628 - PyObject * obj0 = 0 ;
69629 - PyObject * obj1 = 0 ;
69630 - vips::VImage result;
69631 -
69632 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_gradcor",&obj0,&obj1)) SWIG_fail;
69633 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
69634 - if (!SWIG_IsOK(res1)) {
69635 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_gradcor" "', argument " "1"" of type '" "vips::VImage *""'");
69636 - }
69637 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
69638 - {
69639 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
69640 - if (!SWIG_IsOK(res2)) {
69641 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_gradcor" "', argument " "2"" of type '" "vips::VImage""'");
69642 - }
69643 - if (!argp2) {
69644 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_gradcor" "', argument " "2"" of type '" "vips::VImage""'");
69645 - } else {
69646 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
69647 - arg2 = *temp;
69648 - if (SWIG_IsNewObj(res2)) delete temp;
69649 - }
69650 - }
69651 - try {
69652 - result = (arg1)->gradcor(arg2);
69653 - }
69654 - catch(vips::VError &_e) {
69655 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
69656 - }
69657 -
69658 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
69659 - return resultobj;
69660 -fail:
69661 - return NULL;
69662 -}
69663 -
69664 -
69665 -SWIGINTERN PyObject *_wrap_VImage_gradient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69666 - PyObject *resultobj = 0;
69667 - vips::VImage *arg1 = (vips::VImage *) 0 ;
69668 - vips::VIMask arg2 ;
69669 - void *argp1 = 0 ;
69670 - int res1 = 0 ;
69671 - void *argp2 ;
69672 - int res2 = 0 ;
69673 - PyObject * obj0 = 0 ;
69674 - PyObject * obj1 = 0 ;
69675 - vips::VImage result;
69676 -
69677 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_gradient",&obj0,&obj1)) SWIG_fail;
69678 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
69679 - if (!SWIG_IsOK(res1)) {
69680 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_gradient" "', argument " "1"" of type '" "vips::VImage *""'");
69681 - }
69682 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
69683 - {
69684 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
69685 - if (!SWIG_IsOK(res2)) {
69686 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_gradient" "', argument " "2"" of type '" "vips::VIMask""'");
69687 - }
69688 - if (!argp2) {
69689 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_gradient" "', argument " "2"" of type '" "vips::VIMask""'");
69690 - } else {
69691 - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
69692 - arg2 = *temp;
69693 - if (SWIG_IsNewObj(res2)) delete temp;
69694 - }
69695 - }
69696 - try {
69697 - result = (arg1)->gradient(arg2);
69698 - }
69699 - catch(vips::VError &_e) {
69700 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
69701 - }
69702 -
69703 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
69704 - return resultobj;
69705 -fail:
69706 - return NULL;
69707 -}
69708 -
69709 -
69710 -SWIGINTERN PyObject *_wrap_VImage_grad_x(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69711 - PyObject *resultobj = 0;
69712 - vips::VImage *arg1 = (vips::VImage *) 0 ;
69713 - void *argp1 = 0 ;
69714 - int res1 = 0 ;
69715 - PyObject * obj0 = 0 ;
69716 - vips::VImage result;
69717 -
69718 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_grad_x",&obj0)) SWIG_fail;
69719 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
69720 - if (!SWIG_IsOK(res1)) {
69721 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_grad_x" "', argument " "1"" of type '" "vips::VImage *""'");
69722 - }
69723 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
69724 - try {
69725 - result = (arg1)->grad_x();
69726 - }
69727 - catch(vips::VError &_e) {
69728 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
69729 - }
69730 -
69731 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
69732 - return resultobj;
69733 -fail:
69734 - return NULL;
69735 -}
69736 -
69737 -
69738 -SWIGINTERN PyObject *_wrap_VImage_grad_y(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69739 - PyObject *resultobj = 0;
69740 - vips::VImage *arg1 = (vips::VImage *) 0 ;
69741 - void *argp1 = 0 ;
69742 - int res1 = 0 ;
69743 - PyObject * obj0 = 0 ;
69744 - vips::VImage result;
69745 -
69746 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_grad_y",&obj0)) SWIG_fail;
69747 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
69748 - if (!SWIG_IsOK(res1)) {
69749 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_grad_y" "', argument " "1"" of type '" "vips::VImage *""'");
69750 - }
69751 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
69752 - try {
69753 - result = (arg1)->grad_y();
69754 - }
69755 - catch(vips::VError &_e) {
69756 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
69757 - }
69758 -
69759 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
69760 - return resultobj;
69761 -fail:
69762 - return NULL;
69763 -}
69764 -
69765 -
69766 -SWIGINTERN PyObject *_wrap_VImage_lindetect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69767 - PyObject *resultobj = 0;
69768 - vips::VImage *arg1 = (vips::VImage *) 0 ;
69769 - vips::VIMask arg2 ;
69770 - void *argp1 = 0 ;
69771 - int res1 = 0 ;
69772 - void *argp2 ;
69773 - int res2 = 0 ;
69774 - PyObject * obj0 = 0 ;
69775 - PyObject * obj1 = 0 ;
69776 - vips::VImage result;
69777 -
69778 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_lindetect",&obj0,&obj1)) SWIG_fail;
69779 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
69780 - if (!SWIG_IsOK(res1)) {
69781 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lindetect" "', argument " "1"" of type '" "vips::VImage *""'");
69782 - }
69783 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
69784 - {
69785 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
69786 - if (!SWIG_IsOK(res2)) {
69787 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lindetect" "', argument " "2"" of type '" "vips::VIMask""'");
69788 - }
69789 - if (!argp2) {
69790 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lindetect" "', argument " "2"" of type '" "vips::VIMask""'");
69791 - } else {
69792 - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
69793 - arg2 = *temp;
69794 - if (SWIG_IsNewObj(res2)) delete temp;
69795 - }
69796 - }
69797 - try {
69798 - result = (arg1)->lindetect(arg2);
69799 - }
69800 - catch(vips::VError &_e) {
69801 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
69802 - }
69803 -
69804 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
69805 - return resultobj;
69806 -fail:
69807 - return NULL;
69808 -}
69809 -
69810 -
69811 -SWIGINTERN PyObject *_wrap_VImage_sharpen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69812 - PyObject *resultobj = 0;
69813 - vips::VImage *arg1 = (vips::VImage *) 0 ;
69814 - int arg2 ;
69815 - double arg3 ;
69816 - double arg4 ;
69817 - double arg5 ;
69818 - double arg6 ;
69819 - double arg7 ;
69820 - void *argp1 = 0 ;
69821 - int res1 = 0 ;
69822 - int val2 ;
69823 - int ecode2 = 0 ;
69824 - double val3 ;
69825 - int ecode3 = 0 ;
69826 - double val4 ;
69827 - int ecode4 = 0 ;
69828 - double val5 ;
69829 - int ecode5 = 0 ;
69830 - double val6 ;
69831 - int ecode6 = 0 ;
69832 - double val7 ;
69833 - int ecode7 = 0 ;
69834 - PyObject * obj0 = 0 ;
69835 - PyObject * obj1 = 0 ;
69836 - PyObject * obj2 = 0 ;
69837 - PyObject * obj3 = 0 ;
69838 - PyObject * obj4 = 0 ;
69839 - PyObject * obj5 = 0 ;
69840 - PyObject * obj6 = 0 ;
69841 - vips::VImage result;
69842 -
69843 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_sharpen",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
69844 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
69845 - if (!SWIG_IsOK(res1)) {
69846 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_sharpen" "', argument " "1"" of type '" "vips::VImage *""'");
69847 - }
69848 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
69849 - ecode2 = SWIG_AsVal_int(obj1, &val2);
69850 - if (!SWIG_IsOK(ecode2)) {
69851 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_sharpen" "', argument " "2"" of type '" "int""'");
69852 - }
69853 - arg2 = static_cast< int >(val2);
69854 - ecode3 = SWIG_AsVal_double(obj2, &val3);
69855 - if (!SWIG_IsOK(ecode3)) {
69856 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_sharpen" "', argument " "3"" of type '" "double""'");
69857 - }
69858 - arg3 = static_cast< double >(val3);
69859 - ecode4 = SWIG_AsVal_double(obj3, &val4);
69860 - if (!SWIG_IsOK(ecode4)) {
69861 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_sharpen" "', argument " "4"" of type '" "double""'");
69862 - }
69863 - arg4 = static_cast< double >(val4);
69864 - ecode5 = SWIG_AsVal_double(obj4, &val5);
69865 - if (!SWIG_IsOK(ecode5)) {
69866 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_sharpen" "', argument " "5"" of type '" "double""'");
69867 - }
69868 - arg5 = static_cast< double >(val5);
69869 - ecode6 = SWIG_AsVal_double(obj5, &val6);
69870 - if (!SWIG_IsOK(ecode6)) {
69871 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_sharpen" "', argument " "6"" of type '" "double""'");
69872 - }
69873 - arg6 = static_cast< double >(val6);
69874 - ecode7 = SWIG_AsVal_double(obj6, &val7);
69875 - if (!SWIG_IsOK(ecode7)) {
69876 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_sharpen" "', argument " "7"" of type '" "double""'");
69877 - }
69878 - arg7 = static_cast< double >(val7);
69879 - try {
69880 - result = (arg1)->sharpen(arg2,arg3,arg4,arg5,arg6,arg7);
69881 - }
69882 - catch(vips::VError &_e) {
69883 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
69884 - }
69885 -
69886 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
69887 - return resultobj;
69888 -fail:
69889 - return NULL;
69890 -}
69891 -
69892 -
69893 -SWIGINTERN PyObject *_wrap_VImage_spcor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69894 - PyObject *resultobj = 0;
69895 - vips::VImage *arg1 = (vips::VImage *) 0 ;
69896 - vips::VImage arg2 ;
69897 - void *argp1 = 0 ;
69898 - int res1 = 0 ;
69899 - void *argp2 ;
69900 - int res2 = 0 ;
69901 - PyObject * obj0 = 0 ;
69902 - PyObject * obj1 = 0 ;
69903 - vips::VImage result;
69904 -
69905 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_spcor",&obj0,&obj1)) SWIG_fail;
69906 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
69907 - if (!SWIG_IsOK(res1)) {
69908 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_spcor" "', argument " "1"" of type '" "vips::VImage *""'");
69909 - }
69910 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
69911 - {
69912 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
69913 - if (!SWIG_IsOK(res2)) {
69914 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_spcor" "', argument " "2"" of type '" "vips::VImage""'");
69915 - }
69916 - if (!argp2) {
69917 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_spcor" "', argument " "2"" of type '" "vips::VImage""'");
69918 - } else {
69919 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
69920 - arg2 = *temp;
69921 - if (SWIG_IsNewObj(res2)) delete temp;
69922 - }
69923 - }
69924 - try {
69925 - result = (arg1)->spcor(arg2);
69926 - }
69927 - catch(vips::VError &_e) {
69928 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
69929 - }
69930 -
69931 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
69932 - return resultobj;
69933 -fail:
69934 - return NULL;
69935 -}
69936 -
69937 -
69938 -SWIGINTERN PyObject *_wrap_VImage_argb2rgba(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69939 - PyObject *resultobj = 0;
69940 - vips::VImage *arg1 = (vips::VImage *) 0 ;
69941 - void *argp1 = 0 ;
69942 - int res1 = 0 ;
69943 - PyObject * obj0 = 0 ;
69944 - vips::VImage result;
69945 -
69946 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_argb2rgba",&obj0)) SWIG_fail;
69947 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
69948 - if (!SWIG_IsOK(res1)) {
69949 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_argb2rgba" "', argument " "1"" of type '" "vips::VImage *""'");
69950 - }
69951 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
69952 - try {
69953 - result = (arg1)->argb2rgba();
69954 - }
69955 - catch(vips::VError &_e) {
69956 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
69957 - }
69958 -
69959 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
69960 - return resultobj;
69961 -fail:
69962 - return NULL;
69963 -}
69964 -
69965 -
69966 -SWIGINTERN PyObject *_wrap_VImage_flood_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69967 - PyObject *resultobj = 0;
69968 - vips::VImage *arg1 = (vips::VImage *) 0 ;
69969 - int arg2 ;
69970 - int arg3 ;
69971 - std::vector< double,std::allocator< double > > arg4 ;
69972 - void *argp1 = 0 ;
69973 - int res1 = 0 ;
69974 - int val2 ;
69975 - int ecode2 = 0 ;
69976 - int val3 ;
69977 - int ecode3 = 0 ;
69978 - PyObject * obj0 = 0 ;
69979 - PyObject * obj1 = 0 ;
69980 - PyObject * obj2 = 0 ;
69981 - PyObject * obj3 = 0 ;
69982 - vips::VImage result;
69983 -
69984 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_flood_copy",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
69985 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
69986 - if (!SWIG_IsOK(res1)) {
69987 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_flood_copy" "', argument " "1"" of type '" "vips::VImage *""'");
69988 - }
69989 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
69990 - ecode2 = SWIG_AsVal_int(obj1, &val2);
69991 - if (!SWIG_IsOK(ecode2)) {
69992 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_flood_copy" "', argument " "2"" of type '" "int""'");
69993 - }
69994 - arg2 = static_cast< int >(val2);
69995 - ecode3 = SWIG_AsVal_int(obj2, &val3);
69996 - if (!SWIG_IsOK(ecode3)) {
69997 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_flood_copy" "', argument " "3"" of type '" "int""'");
69998 - }
69999 - arg3 = static_cast< int >(val3);
70000 - {
70001 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
70002 - int res = swig::asptr(obj3, &ptr);
70003 - if (!SWIG_IsOK(res) || !ptr) {
70004 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_flood_copy" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > >""'");
70005 - }
70006 - arg4 = *ptr;
70007 - if (SWIG_IsNewObj(res)) delete ptr;
70008 - }
70009 - try {
70010 - result = (arg1)->flood_copy(arg2,arg3,arg4);
70011 - }
70012 - catch(vips::VError &_e) {
70013 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
70014 - }
70015 -
70016 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
70017 - return resultobj;
70018 -fail:
70019 - return NULL;
70020 -}
70021 -
70022 -
70023 -SWIGINTERN PyObject *_wrap_VImage_flood_blob_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70024 - PyObject *resultobj = 0;
70025 - vips::VImage *arg1 = (vips::VImage *) 0 ;
70026 - int arg2 ;
70027 - int arg3 ;
70028 - std::vector< double,std::allocator< double > > arg4 ;
70029 - void *argp1 = 0 ;
70030 - int res1 = 0 ;
70031 - int val2 ;
70032 - int ecode2 = 0 ;
70033 - int val3 ;
70034 - int ecode3 = 0 ;
70035 - PyObject * obj0 = 0 ;
70036 - PyObject * obj1 = 0 ;
70037 - PyObject * obj2 = 0 ;
70038 - PyObject * obj3 = 0 ;
70039 - vips::VImage result;
70040 -
70041 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_flood_blob_copy",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
70042 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
70043 - if (!SWIG_IsOK(res1)) {
70044 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_flood_blob_copy" "', argument " "1"" of type '" "vips::VImage *""'");
70045 - }
70046 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
70047 - ecode2 = SWIG_AsVal_int(obj1, &val2);
70048 - if (!SWIG_IsOK(ecode2)) {
70049 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_flood_blob_copy" "', argument " "2"" of type '" "int""'");
70050 - }
70051 - arg2 = static_cast< int >(val2);
70052 - ecode3 = SWIG_AsVal_int(obj2, &val3);
70053 - if (!SWIG_IsOK(ecode3)) {
70054 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_flood_blob_copy" "', argument " "3"" of type '" "int""'");
70055 - }
70056 - arg3 = static_cast< int >(val3);
70057 - {
70058 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
70059 - int res = swig::asptr(obj3, &ptr);
70060 - if (!SWIG_IsOK(res) || !ptr) {
70061 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_flood_blob_copy" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > >""'");
70062 - }
70063 - arg4 = *ptr;
70064 - if (SWIG_IsNewObj(res)) delete ptr;
70065 - }
70066 - try {
70067 - result = (arg1)->flood_blob_copy(arg2,arg3,arg4);
70068 - }
70069 - catch(vips::VError &_e) {
70070 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
70071 - }
70072 -
70073 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
70074 - return resultobj;
70075 -fail:
70076 - return NULL;
70077 -}
70078 -
70079 -
70080 -SWIGINTERN PyObject *_wrap_VImage_flood_other_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70081 - PyObject *resultobj = 0;
70082 - vips::VImage *arg1 = (vips::VImage *) 0 ;
70083 - vips::VImage arg2 ;
70084 - int arg3 ;
70085 - int arg4 ;
70086 - int arg5 ;
70087 - void *argp1 = 0 ;
70088 - int res1 = 0 ;
70089 - void *argp2 ;
70090 - int res2 = 0 ;
70091 - int val3 ;
70092 - int ecode3 = 0 ;
70093 - int val4 ;
70094 - int ecode4 = 0 ;
70095 - int val5 ;
70096 - int ecode5 = 0 ;
70097 - PyObject * obj0 = 0 ;
70098 - PyObject * obj1 = 0 ;
70099 - PyObject * obj2 = 0 ;
70100 - PyObject * obj3 = 0 ;
70101 - PyObject * obj4 = 0 ;
70102 - vips::VImage result;
70103 -
70104 - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_flood_other_copy",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
70105 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
70106 - if (!SWIG_IsOK(res1)) {
70107 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_flood_other_copy" "', argument " "1"" of type '" "vips::VImage *""'");
70108 - }
70109 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
70110 - {
70111 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
70112 - if (!SWIG_IsOK(res2)) {
70113 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_flood_other_copy" "', argument " "2"" of type '" "vips::VImage""'");
70114 - }
70115 - if (!argp2) {
70116 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_flood_other_copy" "', argument " "2"" of type '" "vips::VImage""'");
70117 - } else {
70118 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
70119 - arg2 = *temp;
70120 - if (SWIG_IsNewObj(res2)) delete temp;
70121 - }
70122 - }
70123 - ecode3 = SWIG_AsVal_int(obj2, &val3);
70124 - if (!SWIG_IsOK(ecode3)) {
70125 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_flood_other_copy" "', argument " "3"" of type '" "int""'");
70126 - }
70127 - arg3 = static_cast< int >(val3);
70128 - ecode4 = SWIG_AsVal_int(obj3, &val4);
70129 - if (!SWIG_IsOK(ecode4)) {
70130 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_flood_other_copy" "', argument " "4"" of type '" "int""'");
70131 - }
70132 - arg4 = static_cast< int >(val4);
70133 - ecode5 = SWIG_AsVal_int(obj4, &val5);
70134 - if (!SWIG_IsOK(ecode5)) {
70135 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_flood_other_copy" "', argument " "5"" of type '" "int""'");
70136 - }
70137 - arg5 = static_cast< int >(val5);
70138 - try {
70139 - result = (arg1)->flood_other_copy(arg2,arg3,arg4,arg5);
70140 - }
70141 - catch(vips::VError &_e) {
70142 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
70143 - }
70144 -
70145 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
70146 - return resultobj;
70147 -fail:
70148 - return NULL;
70149 -}
70150 -
70151 -
70152 -SWIGINTERN PyObject *_wrap_VImage_clip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70153 - PyObject *resultobj = 0;
70154 - vips::VImage *arg1 = (vips::VImage *) 0 ;
70155 - void *argp1 = 0 ;
70156 - int res1 = 0 ;
70157 - PyObject * obj0 = 0 ;
70158 - vips::VImage result;
70159 -
70160 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip",&obj0)) SWIG_fail;
70161 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
70162 - if (!SWIG_IsOK(res1)) {
70163 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip" "', argument " "1"" of type '" "vips::VImage *""'");
70164 - }
70165 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
70166 - try {
70167 - result = (arg1)->clip();
70168 - }
70169 - catch(vips::VError &_e) {
70170 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
70171 - }
70172 -
70173 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
70174 - return resultobj;
70175 -fail:
70176 - return NULL;
70177 -}
70178 -
70179 -
70180 -SWIGINTERN PyObject *_wrap_VImage_c2ps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70181 - PyObject *resultobj = 0;
70182 - vips::VImage *arg1 = (vips::VImage *) 0 ;
70183 - void *argp1 = 0 ;
70184 - int res1 = 0 ;
70185 - PyObject * obj0 = 0 ;
70186 - vips::VImage result;
70187 -
70188 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_c2ps",&obj0)) SWIG_fail;
70189 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
70190 - if (!SWIG_IsOK(res1)) {
70191 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_c2ps" "', argument " "1"" of type '" "vips::VImage *""'");
70192 - }
70193 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
70194 - try {
70195 - result = (arg1)->c2ps();
70196 - }
70197 - catch(vips::VError &_e) {
70198 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
70199 - }
70200 -
70201 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
70202 - return resultobj;
70203 -fail:
70204 - return NULL;
70205 -}
70206 -
70207 -
70208 -SWIGINTERN PyObject *_wrap_VImage_resize_linear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70209 - PyObject *resultobj = 0;
70210 - vips::VImage *arg1 = (vips::VImage *) 0 ;
70211 - int arg2 ;
70212 - int arg3 ;
70213 - void *argp1 = 0 ;
70214 - int res1 = 0 ;
70215 - int val2 ;
70216 - int ecode2 = 0 ;
70217 - int val3 ;
70218 - int ecode3 = 0 ;
70219 - PyObject * obj0 = 0 ;
70220 - PyObject * obj1 = 0 ;
70221 - PyObject * obj2 = 0 ;
70222 - vips::VImage result;
70223 -
70224 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_resize_linear",&obj0,&obj1,&obj2)) SWIG_fail;
70225 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
70226 - if (!SWIG_IsOK(res1)) {
70227 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_resize_linear" "', argument " "1"" of type '" "vips::VImage *""'");
70228 - }
70229 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
70230 - ecode2 = SWIG_AsVal_int(obj1, &val2);
70231 - if (!SWIG_IsOK(ecode2)) {
70232 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_resize_linear" "', argument " "2"" of type '" "int""'");
70233 - }
70234 - arg2 = static_cast< int >(val2);
70235 - ecode3 = SWIG_AsVal_int(obj2, &val3);
70236 - if (!SWIG_IsOK(ecode3)) {
70237 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_resize_linear" "', argument " "3"" of type '" "int""'");
70238 - }
70239 - arg3 = static_cast< int >(val3);
70240 - try {
70241 - result = (arg1)->resize_linear(arg2,arg3);
70242 - }
70243 - catch(vips::VError &_e) {
70244 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
70245 - }
70246 -
70247 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
70248 - return resultobj;
70249 -fail:
70250 - return NULL;
70251 -}
70252 -
70253 -
70254 -SWIGINTERN PyObject *_wrap_VImage_cmulnorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70255 - PyObject *resultobj = 0;
70256 - vips::VImage *arg1 = (vips::VImage *) 0 ;
70257 - vips::VImage arg2 ;
70258 - void *argp1 = 0 ;
70259 - int res1 = 0 ;
70260 - void *argp2 ;
70261 - int res2 = 0 ;
70262 - PyObject * obj0 = 0 ;
70263 - PyObject * obj1 = 0 ;
70264 - vips::VImage result;
70265 -
70266 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_cmulnorm",&obj0,&obj1)) SWIG_fail;
70267 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
70268 - if (!SWIG_IsOK(res1)) {
70269 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_cmulnorm" "', argument " "1"" of type '" "vips::VImage *""'");
70270 - }
70271 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
70272 - {
70273 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
70274 - if (!SWIG_IsOK(res2)) {
70275 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_cmulnorm" "', argument " "2"" of type '" "vips::VImage""'");
70276 - }
70277 - if (!argp2) {
70278 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_cmulnorm" "', argument " "2"" of type '" "vips::VImage""'");
70279 - } else {
70280 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
70281 - arg2 = *temp;
70282 - if (SWIG_IsNewObj(res2)) delete temp;
70283 - }
70284 - }
70285 - try {
70286 - result = (arg1)->cmulnorm(arg2);
70287 - }
70288 - catch(vips::VError &_e) {
70289 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
70290 - }
70291 -
70292 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
70293 - return resultobj;
70294 -fail:
70295 - return NULL;
70296 -}
70297 -
70298 -
70299 -SWIGINTERN PyObject *_wrap_VImage_fav4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70300 - PyObject *resultobj = 0;
70301 - vips::VImage *arg1 = (vips::VImage *) 0 ;
70302 - vips::VImage arg2 ;
70303 - vips::VImage arg3 ;
70304 - vips::VImage arg4 ;
70305 - void *argp1 = 0 ;
70306 - int res1 = 0 ;
70307 - void *argp2 ;
70308 - int res2 = 0 ;
70309 - void *argp3 ;
70310 - int res3 = 0 ;
70311 - void *argp4 ;
70312 - int res4 = 0 ;
70313 - PyObject * obj0 = 0 ;
70314 - PyObject * obj1 = 0 ;
70315 - PyObject * obj2 = 0 ;
70316 - PyObject * obj3 = 0 ;
70317 - vips::VImage result;
70318 -
70319 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_fav4",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
70320 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
70321 - if (!SWIG_IsOK(res1)) {
70322 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_fav4" "', argument " "1"" of type '" "vips::VImage *""'");
70323 - }
70324 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
70325 - {
70326 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
70327 - if (!SWIG_IsOK(res2)) {
70328 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_fav4" "', argument " "2"" of type '" "vips::VImage""'");
70329 - }
70330 - if (!argp2) {
70331 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_fav4" "', argument " "2"" of type '" "vips::VImage""'");
70332 - } else {
70333 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
70334 - arg2 = *temp;
70335 - if (SWIG_IsNewObj(res2)) delete temp;
70336 - }
70337 - }
70338 - {
70339 - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0);
70340 - if (!SWIG_IsOK(res3)) {
70341 - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_fav4" "', argument " "3"" of type '" "vips::VImage""'");
70342 - }
70343 - if (!argp3) {
70344 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_fav4" "', argument " "3"" of type '" "vips::VImage""'");
70345 - } else {
70346 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp3);
70347 - arg3 = *temp;
70348 - if (SWIG_IsNewObj(res3)) delete temp;
70349 - }
70350 - }
70351 - {
70352 - res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_vips__VImage, 0 | 0);
70353 - if (!SWIG_IsOK(res4)) {
70354 - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VImage_fav4" "', argument " "4"" of type '" "vips::VImage""'");
70355 - }
70356 - if (!argp4) {
70357 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_fav4" "', argument " "4"" of type '" "vips::VImage""'");
70358 - } else {
70359 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp4);
70360 - arg4 = *temp;
70361 - if (SWIG_IsNewObj(res4)) delete temp;
70362 - }
70363 - }
70364 - try {
70365 - result = (arg1)->fav4(arg2,arg3,arg4);
70366 - }
70367 - catch(vips::VError &_e) {
70368 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
70369 - }
70370 -
70371 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
70372 - return resultobj;
70373 -fail:
70374 - return NULL;
70375 -}
70376 -
70377 -
70378 -SWIGINTERN PyObject *_wrap_VImage_gadd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70379 - PyObject *resultobj = 0;
70380 - vips::VImage *arg1 = (vips::VImage *) 0 ;
70381 - double arg2 ;
70382 - double arg3 ;
70383 - vips::VImage arg4 ;
70384 - double arg5 ;
70385 - void *argp1 = 0 ;
70386 - int res1 = 0 ;
70387 - double val2 ;
70388 - int ecode2 = 0 ;
70389 - double val3 ;
70390 - int ecode3 = 0 ;
70391 - void *argp4 ;
70392 - int res4 = 0 ;
70393 - double val5 ;
70394 - int ecode5 = 0 ;
70395 - PyObject * obj0 = 0 ;
70396 - PyObject * obj1 = 0 ;
70397 - PyObject * obj2 = 0 ;
70398 - PyObject * obj3 = 0 ;
70399 - PyObject * obj4 = 0 ;
70400 - vips::VImage result;
70401 -
70402 - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_gadd",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
70403 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
70404 - if (!SWIG_IsOK(res1)) {
70405 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_gadd" "', argument " "1"" of type '" "vips::VImage *""'");
70406 - }
70407 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
70408 - ecode2 = SWIG_AsVal_double(obj1, &val2);
70409 - if (!SWIG_IsOK(ecode2)) {
70410 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_gadd" "', argument " "2"" of type '" "double""'");
70411 - }
70412 - arg2 = static_cast< double >(val2);
70413 - ecode3 = SWIG_AsVal_double(obj2, &val3);
70414 - if (!SWIG_IsOK(ecode3)) {
70415 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_gadd" "', argument " "3"" of type '" "double""'");
70416 - }
70417 - arg3 = static_cast< double >(val3);
70418 - {
70419 - res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_vips__VImage, 0 | 0);
70420 - if (!SWIG_IsOK(res4)) {
70421 - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VImage_gadd" "', argument " "4"" of type '" "vips::VImage""'");
70422 - }
70423 - if (!argp4) {
70424 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_gadd" "', argument " "4"" of type '" "vips::VImage""'");
70425 - } else {
70426 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp4);
70427 - arg4 = *temp;
70428 - if (SWIG_IsNewObj(res4)) delete temp;
70429 - }
70430 - }
70431 - ecode5 = SWIG_AsVal_double(obj4, &val5);
70432 - if (!SWIG_IsOK(ecode5)) {
70433 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_gadd" "', argument " "5"" of type '" "double""'");
70434 - }
70435 - arg5 = static_cast< double >(val5);
70436 - try {
70437 - result = (arg1)->gadd(arg2,arg3,arg4,arg5);
70438 - }
70439 - catch(vips::VError &_e) {
70440 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
70441 - }
70442 -
70443 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
70444 - return resultobj;
70445 -fail:
70446 - return NULL;
70447 -}
70448 -
70449 -
70450 -SWIGINTERN PyObject *_wrap_VImage_icc_export(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70451 - PyObject *resultobj = 0;
70452 - vips::VImage *arg1 = (vips::VImage *) 0 ;
70453 - char *arg2 = (char *) 0 ;
70454 - int arg3 ;
70455 - void *argp1 = 0 ;
70456 - int res1 = 0 ;
70457 - int res2 ;
70458 - char *buf2 = 0 ;
70459 - int alloc2 = 0 ;
70460 - int val3 ;
70461 - int ecode3 = 0 ;
70462 - PyObject * obj0 = 0 ;
70463 - PyObject * obj1 = 0 ;
70464 - PyObject * obj2 = 0 ;
70465 - vips::VImage result;
70466 -
70467 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_icc_export",&obj0,&obj1,&obj2)) SWIG_fail;
70468 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
70469 - if (!SWIG_IsOK(res1)) {
70470 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_icc_export" "', argument " "1"" of type '" "vips::VImage *""'");
70471 - }
70472 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
70473 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
70474 - if (!SWIG_IsOK(res2)) {
70475 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_icc_export" "', argument " "2"" of type '" "char *""'");
70476 - }
70477 - arg2 = reinterpret_cast< char * >(buf2);
70478 - ecode3 = SWIG_AsVal_int(obj2, &val3);
70479 - if (!SWIG_IsOK(ecode3)) {
70480 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_icc_export" "', argument " "3"" of type '" "int""'");
70481 - }
70482 - arg3 = static_cast< int >(val3);
70483 - try {
70484 - result = (arg1)->icc_export(arg2,arg3);
70485 - }
70486 - catch(vips::VError &_e) {
70487 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
70488 - }
70489 -
70490 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
70491 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
70492 - return resultobj;
70493 -fail:
70494 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
70495 - return NULL;
70496 -}
70497 -
70498 -
70499 -SWIGINTERN PyObject *_wrap_VImage_litecor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70500 - PyObject *resultobj = 0;
70501 - vips::VImage *arg1 = (vips::VImage *) 0 ;
70502 - vips::VImage arg2 ;
70503 - int arg3 ;
70504 - double arg4 ;
70505 - void *argp1 = 0 ;
70506 - int res1 = 0 ;
70507 - void *argp2 ;
70508 - int res2 = 0 ;
70509 - int val3 ;
70510 - int ecode3 = 0 ;
70511 - double val4 ;
70512 - int ecode4 = 0 ;
70513 - PyObject * obj0 = 0 ;
70514 - PyObject * obj1 = 0 ;
70515 - PyObject * obj2 = 0 ;
70516 - PyObject * obj3 = 0 ;
70517 - vips::VImage result;
70518 -
70519 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_litecor",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
70520 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
70521 - if (!SWIG_IsOK(res1)) {
70522 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_litecor" "', argument " "1"" of type '" "vips::VImage *""'");
70523 - }
70524 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
70525 - {
70526 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
70527 - if (!SWIG_IsOK(res2)) {
70528 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_litecor" "', argument " "2"" of type '" "vips::VImage""'");
70529 - }
70530 - if (!argp2) {
70531 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_litecor" "', argument " "2"" of type '" "vips::VImage""'");
70532 - } else {
70533 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
70534 - arg2 = *temp;
70535 - if (SWIG_IsNewObj(res2)) delete temp;
70536 - }
70537 - }
70538 - ecode3 = SWIG_AsVal_int(obj2, &val3);
70539 - if (!SWIG_IsOK(ecode3)) {
70540 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_litecor" "', argument " "3"" of type '" "int""'");
70541 - }
70542 - arg3 = static_cast< int >(val3);
70543 - ecode4 = SWIG_AsVal_double(obj3, &val4);
70544 - if (!SWIG_IsOK(ecode4)) {
70545 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_litecor" "', argument " "4"" of type '" "double""'");
70546 - }
70547 - arg4 = static_cast< double >(val4);
70548 - try {
70549 - result = (arg1)->litecor(arg2,arg3,arg4);
70550 - }
70551 - catch(vips::VError &_e) {
70552 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
70553 - }
70554 -
70555 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
70556 - return resultobj;
70557 -fail:
70558 - return NULL;
70559 -}
70560 -
70561 -
70562 -SWIGINTERN PyObject *_wrap_VImage_affine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70563 - PyObject *resultobj = 0;
70564 - vips::VImage *arg1 = (vips::VImage *) 0 ;
70565 - double arg2 ;
70566 - double arg3 ;
70567 - double arg4 ;
70568 - double arg5 ;
70569 - double arg6 ;
70570 - double arg7 ;
70571 - int arg8 ;
70572 - int arg9 ;
70573 - int arg10 ;
70574 - int arg11 ;
70575 - void *argp1 = 0 ;
70576 - int res1 = 0 ;
70577 - double val2 ;
70578 - int ecode2 = 0 ;
70579 - double val3 ;
70580 - int ecode3 = 0 ;
70581 - double val4 ;
70582 - int ecode4 = 0 ;
70583 - double val5 ;
70584 - int ecode5 = 0 ;
70585 - double val6 ;
70586 - int ecode6 = 0 ;
70587 - double val7 ;
70588 - int ecode7 = 0 ;
70589 - int val8 ;
70590 - int ecode8 = 0 ;
70591 - int val9 ;
70592 - int ecode9 = 0 ;
70593 - int val10 ;
70594 - int ecode10 = 0 ;
70595 - int val11 ;
70596 - int ecode11 = 0 ;
70597 - PyObject * obj0 = 0 ;
70598 - PyObject * obj1 = 0 ;
70599 - PyObject * obj2 = 0 ;
70600 - PyObject * obj3 = 0 ;
70601 - PyObject * obj4 = 0 ;
70602 - PyObject * obj5 = 0 ;
70603 - PyObject * obj6 = 0 ;
70604 - PyObject * obj7 = 0 ;
70605 - PyObject * obj8 = 0 ;
70606 - PyObject * obj9 = 0 ;
70607 - PyObject * obj10 = 0 ;
70608 - vips::VImage result;
70609 -
70610 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:VImage_affine",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
70611 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
70612 - if (!SWIG_IsOK(res1)) {
70613 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_affine" "', argument " "1"" of type '" "vips::VImage *""'");
70614 - }
70615 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
70616 - ecode2 = SWIG_AsVal_double(obj1, &val2);
70617 - if (!SWIG_IsOK(ecode2)) {
70618 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_affine" "', argument " "2"" of type '" "double""'");
70619 - }
70620 - arg2 = static_cast< double >(val2);
70621 - ecode3 = SWIG_AsVal_double(obj2, &val3);
70622 - if (!SWIG_IsOK(ecode3)) {
70623 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_affine" "', argument " "3"" of type '" "double""'");
70624 - }
70625 - arg3 = static_cast< double >(val3);
70626 - ecode4 = SWIG_AsVal_double(obj3, &val4);
70627 - if (!SWIG_IsOK(ecode4)) {
70628 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_affine" "', argument " "4"" of type '" "double""'");
70629 - }
70630 - arg4 = static_cast< double >(val4);
70631 - ecode5 = SWIG_AsVal_double(obj4, &val5);
70632 - if (!SWIG_IsOK(ecode5)) {
70633 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_affine" "', argument " "5"" of type '" "double""'");
70634 - }
70635 - arg5 = static_cast< double >(val5);
70636 - ecode6 = SWIG_AsVal_double(obj5, &val6);
70637 - if (!SWIG_IsOK(ecode6)) {
70638 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_affine" "', argument " "6"" of type '" "double""'");
70639 - }
70640 - arg6 = static_cast< double >(val6);
70641 - ecode7 = SWIG_AsVal_double(obj6, &val7);
70642 - if (!SWIG_IsOK(ecode7)) {
70643 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_affine" "', argument " "7"" of type '" "double""'");
70644 - }
70645 - arg7 = static_cast< double >(val7);
70646 - ecode8 = SWIG_AsVal_int(obj7, &val8);
70647 - if (!SWIG_IsOK(ecode8)) {
70648 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_affine" "', argument " "8"" of type '" "int""'");
70649 - }
70650 - arg8 = static_cast< int >(val8);
70651 - ecode9 = SWIG_AsVal_int(obj8, &val9);
70652 - if (!SWIG_IsOK(ecode9)) {
70653 - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_affine" "', argument " "9"" of type '" "int""'");
70654 - }
70655 - arg9 = static_cast< int >(val9);
70656 - ecode10 = SWIG_AsVal_int(obj9, &val10);
70657 - if (!SWIG_IsOK(ecode10)) {
70658 - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_affine" "', argument " "10"" of type '" "int""'");
70659 - }
70660 - arg10 = static_cast< int >(val10);
70661 - ecode11 = SWIG_AsVal_int(obj10, &val11);
70662 - if (!SWIG_IsOK(ecode11)) {
70663 - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_affine" "', argument " "11"" of type '" "int""'");
70664 - }
70665 - arg11 = static_cast< int >(val11);
70666 - try {
70667 - result = (arg1)->affine(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
70668 - }
70669 - catch(vips::VError &_e) {
70670 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
70671 - }
70672 -
70673 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
70674 - return resultobj;
70675 -fail:
70676 - return NULL;
70677 -}
70678 -
70679 -
70680 -SWIGINTERN PyObject *_wrap_VImage_clip2c(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70681 - PyObject *resultobj = 0;
70682 - vips::VImage *arg1 = (vips::VImage *) 0 ;
70683 - void *argp1 = 0 ;
70684 - int res1 = 0 ;
70685 - PyObject * obj0 = 0 ;
70686 - vips::VImage result;
70687 -
70688 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2c",&obj0)) SWIG_fail;
70689 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
70690 - if (!SWIG_IsOK(res1)) {
70691 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2c" "', argument " "1"" of type '" "vips::VImage *""'");
70692 - }
70693 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
70694 - try {
70695 - result = (arg1)->clip2c();
70696 - }
70697 - catch(vips::VError &_e) {
70698 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
70699 - }
70700 -
70701 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
70702 - return resultobj;
70703 -fail:
70704 - return NULL;
70705 -}
70706 -
70707 -
70708 -SWIGINTERN PyObject *_wrap_VImage_clip2cm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70709 - PyObject *resultobj = 0;
70710 - vips::VImage *arg1 = (vips::VImage *) 0 ;
70711 - void *argp1 = 0 ;
70712 - int res1 = 0 ;
70713 - PyObject * obj0 = 0 ;
70714 - vips::VImage result;
70715 -
70716 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2cm",&obj0)) SWIG_fail;
70717 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
70718 - if (!SWIG_IsOK(res1)) {
70719 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2cm" "', argument " "1"" of type '" "vips::VImage *""'");
70720 - }
70721 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
70722 - try {
70723 - result = (arg1)->clip2cm();
70724 - }
70725 - catch(vips::VError &_e) {
70726 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
70727 - }
70728 -
70729 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
70730 - return resultobj;
70731 -fail:
70732 - return NULL;
70733 -}
70734 -
70735 -
70736 -SWIGINTERN PyObject *_wrap_VImage_clip2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70737 - PyObject *resultobj = 0;
70738 - vips::VImage *arg1 = (vips::VImage *) 0 ;
70739 - void *argp1 = 0 ;
70740 - int res1 = 0 ;
70741 - PyObject * obj0 = 0 ;
70742 - vips::VImage result;
70743 -
70744 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2d",&obj0)) SWIG_fail;
70745 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
70746 - if (!SWIG_IsOK(res1)) {
70747 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2d" "', argument " "1"" of type '" "vips::VImage *""'");
70748 - }
70749 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
70750 - try {
70751 - result = (arg1)->clip2d();
70752 - }
70753 - catch(vips::VError &_e) {
70754 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
70755 - }
70756 -
70757 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
70758 - return resultobj;
70759 -fail:
70760 - return NULL;
70761 -}
70762 -
70763 -
70764 -SWIGINTERN PyObject *_wrap_VImage_clip2dcm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70765 - PyObject *resultobj = 0;
70766 - vips::VImage *arg1 = (vips::VImage *) 0 ;
70767 - void *argp1 = 0 ;
70768 - int res1 = 0 ;
70769 - PyObject * obj0 = 0 ;
70770 - vips::VImage result;
70771 -
70772 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2dcm",&obj0)) SWIG_fail;
70773 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
70774 - if (!SWIG_IsOK(res1)) {
70775 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2dcm" "', argument " "1"" of type '" "vips::VImage *""'");
70776 - }
70777 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
70778 - try {
70779 - result = (arg1)->clip2dcm();
70780 - }
70781 - catch(vips::VError &_e) {
70782 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
70783 - }
70784 -
70785 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
70786 - return resultobj;
70787 -fail:
70788 - return NULL;
70789 -}
70790 -
70791 -
70792 -SWIGINTERN PyObject *_wrap_VImage_clip2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70793 - PyObject *resultobj = 0;
70794 - vips::VImage *arg1 = (vips::VImage *) 0 ;
70795 - void *argp1 = 0 ;
70796 - int res1 = 0 ;
70797 - PyObject * obj0 = 0 ;
70798 - vips::VImage result;
70799 -
70800 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2f",&obj0)) SWIG_fail;
70801 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
70802 - if (!SWIG_IsOK(res1)) {
70803 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2f" "', argument " "1"" of type '" "vips::VImage *""'");
70804 - }
70805 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
70806 - try {
70807 - result = (arg1)->clip2f();
70808 - }
70809 - catch(vips::VError &_e) {
70810 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
70811 - }
70812 -
70813 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
70814 - return resultobj;
70815 -fail:
70816 - return NULL;
70817 -}
70818 -
70819 -
70820 -SWIGINTERN PyObject *_wrap_VImage_clip2i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70821 - PyObject *resultobj = 0;
70822 - vips::VImage *arg1 = (vips::VImage *) 0 ;
70823 - void *argp1 = 0 ;
70824 - int res1 = 0 ;
70825 - PyObject * obj0 = 0 ;
70826 - vips::VImage result;
70827 -
70828 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2i",&obj0)) SWIG_fail;
70829 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
70830 - if (!SWIG_IsOK(res1)) {
70831 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2i" "', argument " "1"" of type '" "vips::VImage *""'");
70832 - }
70833 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
70834 - try {
70835 - result = (arg1)->clip2i();
70836 - }
70837 - catch(vips::VError &_e) {
70838 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
70839 - }
70840 -
70841 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
70842 - return resultobj;
70843 -fail:
70844 - return NULL;
70845 -}
70846 -
70847 -
70848 -SWIGINTERN PyObject *_wrap_VImage_convsub(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70849 - PyObject *resultobj = 0;
70850 - vips::VImage *arg1 = (vips::VImage *) 0 ;
70851 - vips::VIMask arg2 ;
70852 - int arg3 ;
70853 - int arg4 ;
70854 - void *argp1 = 0 ;
70855 - int res1 = 0 ;
70856 - void *argp2 ;
70857 - int res2 = 0 ;
70858 - int val3 ;
70859 - int ecode3 = 0 ;
70860 - int val4 ;
70861 - int ecode4 = 0 ;
70862 - PyObject * obj0 = 0 ;
70863 - PyObject * obj1 = 0 ;
70864 - PyObject * obj2 = 0 ;
70865 - PyObject * obj3 = 0 ;
70866 - vips::VImage result;
70867 -
70868 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_convsub",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
70869 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
70870 - if (!SWIG_IsOK(res1)) {
70871 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convsub" "', argument " "1"" of type '" "vips::VImage *""'");
70872 - }
70873 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
70874 - {
70875 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
70876 - if (!SWIG_IsOK(res2)) {
70877 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convsub" "', argument " "2"" of type '" "vips::VIMask""'");
70878 - }
70879 - if (!argp2) {
70880 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convsub" "', argument " "2"" of type '" "vips::VIMask""'");
70881 - } else {
70882 - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
70883 - arg2 = *temp;
70884 - if (SWIG_IsNewObj(res2)) delete temp;
70885 - }
70886 - }
70887 - ecode3 = SWIG_AsVal_int(obj2, &val3);
70888 - if (!SWIG_IsOK(ecode3)) {
70889 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_convsub" "', argument " "3"" of type '" "int""'");
70890 - }
70891 - arg3 = static_cast< int >(val3);
70892 - ecode4 = SWIG_AsVal_int(obj3, &val4);
70893 - if (!SWIG_IsOK(ecode4)) {
70894 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_convsub" "', argument " "4"" of type '" "int""'");
70895 - }
70896 - arg4 = static_cast< int >(val4);
70897 - try {
70898 - result = (arg1)->convsub(arg2,arg3,arg4);
70899 - }
70900 - catch(vips::VError &_e) {
70901 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
70902 - }
70903 -
70904 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
70905 - return resultobj;
70906 -fail:
70907 - return NULL;
70908 -}
70909 -
70910 -
70911 -SWIGINTERN PyObject *_wrap_VImage_convf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70912 - PyObject *resultobj = 0;
70913 - vips::VImage *arg1 = (vips::VImage *) 0 ;
70914 - vips::VDMask arg2 ;
70915 - void *argp1 = 0 ;
70916 - int res1 = 0 ;
70917 - void *argp2 ;
70918 - int res2 = 0 ;
70919 - PyObject * obj0 = 0 ;
70920 - PyObject * obj1 = 0 ;
70921 - vips::VImage result;
70922 -
70923 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_convf",&obj0,&obj1)) SWIG_fail;
70924 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
70925 - if (!SWIG_IsOK(res1)) {
70926 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convf" "', argument " "1"" of type '" "vips::VImage *""'");
70927 - }
70928 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
70929 - {
70930 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
70931 - if (!SWIG_IsOK(res2)) {
70932 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convf" "', argument " "2"" of type '" "vips::VDMask""'");
70933 - }
70934 - if (!argp2) {
70935 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convf" "', argument " "2"" of type '" "vips::VDMask""'");
70936 - } else {
70937 - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
70938 - arg2 = *temp;
70939 - if (SWIG_IsNewObj(res2)) delete temp;
70940 - }
70941 - }
70942 - try {
70943 - result = (arg1)->convf(arg2);
70944 - }
70945 - catch(vips::VError &_e) {
70946 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
70947 - }
70948 -
70949 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
70950 - return resultobj;
70951 -fail:
70952 - return NULL;
70953 -}
70954 -
70955 -
70956 -SWIGINTERN PyObject *_wrap_VImage_convsepf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70957 - PyObject *resultobj = 0;
70958 - vips::VImage *arg1 = (vips::VImage *) 0 ;
70959 - vips::VDMask arg2 ;
70960 - void *argp1 = 0 ;
70961 - int res1 = 0 ;
70962 - void *argp2 ;
70963 - int res2 = 0 ;
70964 - PyObject * obj0 = 0 ;
70965 - PyObject * obj1 = 0 ;
70966 - vips::VImage result;
70967 -
70968 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_convsepf",&obj0,&obj1)) SWIG_fail;
70969 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
70970 - if (!SWIG_IsOK(res1)) {
70971 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convsepf" "', argument " "1"" of type '" "vips::VImage *""'");
70972 - }
70973 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
70974 - {
70975 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
70976 - if (!SWIG_IsOK(res2)) {
70977 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convsepf" "', argument " "2"" of type '" "vips::VDMask""'");
70978 - }
70979 - if (!argp2) {
70980 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convsepf" "', argument " "2"" of type '" "vips::VDMask""'");
70981 - } else {
70982 - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
70983 - arg2 = *temp;
70984 - if (SWIG_IsNewObj(res2)) delete temp;
70985 - }
70986 - }
70987 - try {
70988 - result = (arg1)->convsepf(arg2);
70989 - }
70990 - catch(vips::VError &_e) {
70991 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
70992 - }
70993 -
70994 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
70995 - return resultobj;
70996 -fail:
70997 - return NULL;
70998 -}
70999 -
71000 -
71001 -SWIGINTERN PyObject *_wrap_VImage_clip2s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71002 - PyObject *resultobj = 0;
71003 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71004 - void *argp1 = 0 ;
71005 - int res1 = 0 ;
71006 - PyObject * obj0 = 0 ;
71007 - vips::VImage result;
71008 -
71009 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2s",&obj0)) SWIG_fail;
71010 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
71011 - if (!SWIG_IsOK(res1)) {
71012 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2s" "', argument " "1"" of type '" "vips::VImage *""'");
71013 - }
71014 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
71015 - try {
71016 - result = (arg1)->clip2s();
71017 - }
71018 - catch(vips::VError &_e) {
71019 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
71020 - }
71021 -
71022 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
71023 - return resultobj;
71024 -fail:
71025 - return NULL;
71026 -}
71027 -
71028 -
71029 -SWIGINTERN PyObject *_wrap_VImage_clip2ui(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71030 - PyObject *resultobj = 0;
71031 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71032 - void *argp1 = 0 ;
71033 - int res1 = 0 ;
71034 - PyObject * obj0 = 0 ;
71035 - vips::VImage result;
71036 -
71037 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2ui",&obj0)) SWIG_fail;
71038 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
71039 - if (!SWIG_IsOK(res1)) {
71040 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2ui" "', argument " "1"" of type '" "vips::VImage *""'");
71041 - }
71042 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
71043 - try {
71044 - result = (arg1)->clip2ui();
71045 - }
71046 - catch(vips::VError &_e) {
71047 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
71048 - }
71049 -
71050 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
71051 - return resultobj;
71052 -fail:
71053 - return NULL;
71054 -}
71055 -
71056 -
71057 -SWIGINTERN PyObject *_wrap_VImage_insertplace__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71058 - PyObject *resultobj = 0;
71059 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71060 - vips::VImage arg2 ;
71061 - std::vector< int,std::allocator< int > > arg3 ;
71062 - std::vector< int,std::allocator< int > > arg4 ;
71063 - void *argp1 = 0 ;
71064 - int res1 = 0 ;
71065 - void *argp2 ;
71066 - int res2 = 0 ;
71067 - PyObject * obj0 = 0 ;
71068 - PyObject * obj1 = 0 ;
71069 - PyObject * obj2 = 0 ;
71070 - PyObject * obj3 = 0 ;
71071 - vips::VImage result;
71072 -
71073 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_insertplace",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
71074 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
71075 - if (!SWIG_IsOK(res1)) {
71076 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_insertplace" "', argument " "1"" of type '" "vips::VImage *""'");
71077 - }
71078 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
71079 - {
71080 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
71081 - if (!SWIG_IsOK(res2)) {
71082 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_insertplace" "', argument " "2"" of type '" "vips::VImage""'");
71083 - }
71084 - if (!argp2) {
71085 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_insertplace" "', argument " "2"" of type '" "vips::VImage""'");
71086 - } else {
71087 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
71088 - arg2 = *temp;
71089 - if (SWIG_IsNewObj(res2)) delete temp;
71090 - }
71091 - }
71092 - {
71093 - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
71094 - int res = swig::asptr(obj2, &ptr);
71095 - if (!SWIG_IsOK(res) || !ptr) {
71096 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_insertplace" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > >""'");
71097 - }
71098 - arg3 = *ptr;
71099 - if (SWIG_IsNewObj(res)) delete ptr;
71100 - }
71101 - {
71102 - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
71103 - int res = swig::asptr(obj3, &ptr);
71104 - if (!SWIG_IsOK(res) || !ptr) {
71105 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_insertplace" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > >""'");
71106 - }
71107 - arg4 = *ptr;
71108 - if (SWIG_IsNewObj(res)) delete ptr;
71109 - }
71110 - try {
71111 - result = (arg1)->insertplace(arg2,arg3,arg4);
71112 - }
71113 - catch(vips::VError &_e) {
71114 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
71115 - }
71116 -
71117 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
71118 - return resultobj;
71119 -fail:
71120 - return NULL;
71121 -}
71122 -
71123 -
71124 -SWIGINTERN PyObject *_wrap_VImage_clip2us(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71125 - PyObject *resultobj = 0;
71126 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71127 - void *argp1 = 0 ;
71128 - int res1 = 0 ;
71129 - PyObject * obj0 = 0 ;
71130 - vips::VImage result;
71131 -
71132 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2us",&obj0)) SWIG_fail;
71133 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
71134 - if (!SWIG_IsOK(res1)) {
71135 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2us" "', argument " "1"" of type '" "vips::VImage *""'");
71136 - }
71137 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
71138 - try {
71139 - result = (arg1)->clip2us();
71140 - }
71141 - catch(vips::VError &_e) {
71142 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
71143 - }
71144 -
71145 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
71146 - return resultobj;
71147 -fail:
71148 - return NULL;
71149 -}
71150 -
71151 -
71152 -SWIGINTERN PyObject *_wrap_VImage_slice(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71153 - PyObject *resultobj = 0;
71154 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71155 - double arg2 ;
71156 - double arg3 ;
71157 - void *argp1 = 0 ;
71158 - int res1 = 0 ;
71159 - double val2 ;
71160 - int ecode2 = 0 ;
71161 - double val3 ;
71162 - int ecode3 = 0 ;
71163 - PyObject * obj0 = 0 ;
71164 - PyObject * obj1 = 0 ;
71165 - PyObject * obj2 = 0 ;
71166 - vips::VImage result;
71167 -
71168 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_slice",&obj0,&obj1,&obj2)) SWIG_fail;
71169 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
71170 - if (!SWIG_IsOK(res1)) {
71171 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_slice" "', argument " "1"" of type '" "vips::VImage *""'");
71172 - }
71173 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
71174 - ecode2 = SWIG_AsVal_double(obj1, &val2);
71175 - if (!SWIG_IsOK(ecode2)) {
71176 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_slice" "', argument " "2"" of type '" "double""'");
71177 - }
71178 - arg2 = static_cast< double >(val2);
71179 - ecode3 = SWIG_AsVal_double(obj2, &val3);
71180 - if (!SWIG_IsOK(ecode3)) {
71181 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_slice" "', argument " "3"" of type '" "double""'");
71182 - }
71183 - arg3 = static_cast< double >(val3);
71184 - try {
71185 - result = (arg1)->slice(arg2,arg3);
71186 - }
71187 - catch(vips::VError &_e) {
71188 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
71189 - }
71190 -
71191 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
71192 - return resultobj;
71193 -fail:
71194 - return NULL;
71195 -}
71196 -
71197 -
71198 -SWIGINTERN PyObject *_wrap_VImage_segment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71199 - PyObject *resultobj = 0;
71200 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71201 - int *arg2 = 0 ;
71202 - void *argp1 = 0 ;
71203 - int res1 = 0 ;
71204 - int temp2 ;
71205 - int res2 = SWIG_TMPOBJ ;
71206 - PyObject * obj0 = 0 ;
71207 - vips::VImage result;
71208 -
71209 - arg2 = &temp2;
71210 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_segment",&obj0)) SWIG_fail;
71211 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
71212 - if (!SWIG_IsOK(res1)) {
71213 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_segment" "', argument " "1"" of type '" "vips::VImage *""'");
71214 - }
71215 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
71216 - try {
71217 - result = (arg1)->segment(*arg2);
71218 - }
71219 - catch(vips::VError &_e) {
71220 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
71221 - }
71222 -
71223 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
71224 - if (SWIG_IsTmpObj(res2)) {
71225 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
71226 - } else {
71227 - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
71228 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
71229 - }
71230 - return resultobj;
71231 -fail:
71232 - return NULL;
71233 -}
71234 -
71235 -
71236 -SWIGINTERN PyObject *_wrap_VImage_line__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71237 - PyObject *resultobj = 0;
71238 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71239 - int arg2 ;
71240 - int arg3 ;
71241 - int arg4 ;
71242 - int arg5 ;
71243 - int arg6 ;
71244 - void *argp1 = 0 ;
71245 - int res1 = 0 ;
71246 - int val2 ;
71247 - int ecode2 = 0 ;
71248 - int val3 ;
71249 - int ecode3 = 0 ;
71250 - int val4 ;
71251 - int ecode4 = 0 ;
71252 - int val5 ;
71253 - int ecode5 = 0 ;
71254 - int val6 ;
71255 - int ecode6 = 0 ;
71256 - PyObject * obj0 = 0 ;
71257 - PyObject * obj1 = 0 ;
71258 - PyObject * obj2 = 0 ;
71259 - PyObject * obj3 = 0 ;
71260 - PyObject * obj4 = 0 ;
71261 - PyObject * obj5 = 0 ;
71262 -
71263 - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:VImage_line",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
71264 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
71265 - if (!SWIG_IsOK(res1)) {
71266 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_line" "', argument " "1"" of type '" "vips::VImage *""'");
71267 - }
71268 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
71269 - ecode2 = SWIG_AsVal_int(obj1, &val2);
71270 - if (!SWIG_IsOK(ecode2)) {
71271 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_line" "', argument " "2"" of type '" "int""'");
71272 - }
71273 - arg2 = static_cast< int >(val2);
71274 - ecode3 = SWIG_AsVal_int(obj2, &val3);
71275 - if (!SWIG_IsOK(ecode3)) {
71276 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_line" "', argument " "3"" of type '" "int""'");
71277 - }
71278 - arg3 = static_cast< int >(val3);
71279 - ecode4 = SWIG_AsVal_int(obj3, &val4);
71280 - if (!SWIG_IsOK(ecode4)) {
71281 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_line" "', argument " "4"" of type '" "int""'");
71282 - }
71283 - arg4 = static_cast< int >(val4);
71284 - ecode5 = SWIG_AsVal_int(obj4, &val5);
71285 - if (!SWIG_IsOK(ecode5)) {
71286 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_line" "', argument " "5"" of type '" "int""'");
71287 - }
71288 - arg5 = static_cast< int >(val5);
71289 - ecode6 = SWIG_AsVal_int(obj5, &val6);
71290 - if (!SWIG_IsOK(ecode6)) {
71291 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_line" "', argument " "6"" of type '" "int""'");
71292 - }
71293 - arg6 = static_cast< int >(val6);
71294 - try {
71295 - (arg1)->line(arg2,arg3,arg4,arg5,arg6);
71296 - }
71297 - catch(vips::VError &_e) {
71298 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
71299 - }
71300 -
71301 - resultobj = SWIG_Py_Void();
71302 - return resultobj;
71303 -fail:
71304 - return NULL;
71305 -}
71306 -
71307 -
71308 -SWIGINTERN PyObject *_wrap_VImage_thresh(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71309 - PyObject *resultobj = 0;
71310 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71311 - double arg2 ;
71312 - void *argp1 = 0 ;
71313 - int res1 = 0 ;
71314 - double val2 ;
71315 - int ecode2 = 0 ;
71316 - PyObject * obj0 = 0 ;
71317 - PyObject * obj1 = 0 ;
71318 - vips::VImage result;
71319 -
71320 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_thresh",&obj0,&obj1)) SWIG_fail;
71321 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
71322 - if (!SWIG_IsOK(res1)) {
71323 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_thresh" "', argument " "1"" of type '" "vips::VImage *""'");
71324 - }
71325 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
71326 - ecode2 = SWIG_AsVal_double(obj1, &val2);
71327 - if (!SWIG_IsOK(ecode2)) {
71328 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_thresh" "', argument " "2"" of type '" "double""'");
71329 - }
71330 - arg2 = static_cast< double >(val2);
71331 - try {
71332 - result = (arg1)->thresh(arg2);
71333 - }
71334 - catch(vips::VError &_e) {
71335 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
71336 - }
71337 -
71338 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
71339 - return resultobj;
71340 -fail:
71341 - return NULL;
71342 -}
71343 -
71344 -
71345 -SWIGINTERN PyObject *_wrap_VImage_convf_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71346 - PyObject *resultobj = 0;
71347 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71348 - vips::VDMask arg2 ;
71349 - void *argp1 = 0 ;
71350 - int res1 = 0 ;
71351 - void *argp2 ;
71352 - int res2 = 0 ;
71353 - PyObject * obj0 = 0 ;
71354 - PyObject * obj1 = 0 ;
71355 - vips::VImage result;
71356 -
71357 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_convf_raw",&obj0,&obj1)) SWIG_fail;
71358 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
71359 - if (!SWIG_IsOK(res1)) {
71360 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convf_raw" "', argument " "1"" of type '" "vips::VImage *""'");
71361 - }
71362 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
71363 - {
71364 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
71365 - if (!SWIG_IsOK(res2)) {
71366 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convf_raw" "', argument " "2"" of type '" "vips::VDMask""'");
71367 - }
71368 - if (!argp2) {
71369 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convf_raw" "', argument " "2"" of type '" "vips::VDMask""'");
71370 - } else {
71371 - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
71372 - arg2 = *temp;
71373 - if (SWIG_IsNewObj(res2)) delete temp;
71374 - }
71375 - }
71376 - try {
71377 - result = (arg1)->convf_raw(arg2);
71378 - }
71379 - catch(vips::VError &_e) {
71380 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
71381 - }
71382 -
71383 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
71384 - return resultobj;
71385 -fail:
71386 - return NULL;
71387 -}
71388 -
71389 -
71390 -SWIGINTERN PyObject *_wrap_VImage_conv_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71391 - PyObject *resultobj = 0;
71392 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71393 - vips::VIMask arg2 ;
71394 - void *argp1 = 0 ;
71395 - int res1 = 0 ;
71396 - void *argp2 ;
71397 - int res2 = 0 ;
71398 - PyObject * obj0 = 0 ;
71399 - PyObject * obj1 = 0 ;
71400 - vips::VImage result;
71401 -
71402 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_conv_raw",&obj0,&obj1)) SWIG_fail;
71403 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
71404 - if (!SWIG_IsOK(res1)) {
71405 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_conv_raw" "', argument " "1"" of type '" "vips::VImage *""'");
71406 - }
71407 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
71408 - {
71409 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
71410 - if (!SWIG_IsOK(res2)) {
71411 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_conv_raw" "', argument " "2"" of type '" "vips::VIMask""'");
71412 - }
71413 - if (!argp2) {
71414 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_conv_raw" "', argument " "2"" of type '" "vips::VIMask""'");
71415 - } else {
71416 - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
71417 - arg2 = *temp;
71418 - if (SWIG_IsNewObj(res2)) delete temp;
71419 - }
71420 - }
71421 - try {
71422 - result = (arg1)->conv_raw(arg2);
71423 - }
71424 - catch(vips::VError &_e) {
71425 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
71426 - }
71427 -
71428 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
71429 - return resultobj;
71430 -fail:
71431 - return NULL;
71432 -}
71433 -
71434 -
71435 -SWIGINTERN PyObject *_wrap_VImage_contrast_surface_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71436 - PyObject *resultobj = 0;
71437 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71438 - int arg2 ;
71439 - int arg3 ;
71440 - void *argp1 = 0 ;
71441 - int res1 = 0 ;
71442 - int val2 ;
71443 - int ecode2 = 0 ;
71444 - int val3 ;
71445 - int ecode3 = 0 ;
71446 - PyObject * obj0 = 0 ;
71447 - PyObject * obj1 = 0 ;
71448 - PyObject * obj2 = 0 ;
71449 - vips::VImage result;
71450 -
71451 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_contrast_surface_raw",&obj0,&obj1,&obj2)) SWIG_fail;
71452 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
71453 - if (!SWIG_IsOK(res1)) {
71454 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_contrast_surface_raw" "', argument " "1"" of type '" "vips::VImage *""'");
71455 - }
71456 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
71457 - ecode2 = SWIG_AsVal_int(obj1, &val2);
71458 - if (!SWIG_IsOK(ecode2)) {
71459 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_contrast_surface_raw" "', argument " "2"" of type '" "int""'");
71460 - }
71461 - arg2 = static_cast< int >(val2);
71462 - ecode3 = SWIG_AsVal_int(obj2, &val3);
71463 - if (!SWIG_IsOK(ecode3)) {
71464 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_contrast_surface_raw" "', argument " "3"" of type '" "int""'");
71465 - }
71466 - arg3 = static_cast< int >(val3);
71467 - try {
71468 - result = (arg1)->contrast_surface_raw(arg2,arg3);
71469 - }
71470 - catch(vips::VError &_e) {
71471 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
71472 - }
71473 -
71474 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
71475 - return resultobj;
71476 -fail:
71477 - return NULL;
71478 -}
71479 -
71480 -
71481 -SWIGINTERN PyObject *_wrap_VImage_convsepf_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71482 - PyObject *resultobj = 0;
71483 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71484 - vips::VDMask arg2 ;
71485 - void *argp1 = 0 ;
71486 - int res1 = 0 ;
71487 - void *argp2 ;
71488 - int res2 = 0 ;
71489 - PyObject * obj0 = 0 ;
71490 - PyObject * obj1 = 0 ;
71491 - vips::VImage result;
71492 -
71493 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_convsepf_raw",&obj0,&obj1)) SWIG_fail;
71494 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
71495 - if (!SWIG_IsOK(res1)) {
71496 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convsepf_raw" "', argument " "1"" of type '" "vips::VImage *""'");
71497 - }
71498 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
71499 - {
71500 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
71501 - if (!SWIG_IsOK(res2)) {
71502 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convsepf_raw" "', argument " "2"" of type '" "vips::VDMask""'");
71503 - }
71504 - if (!argp2) {
71505 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convsepf_raw" "', argument " "2"" of type '" "vips::VDMask""'");
71506 - } else {
71507 - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
71508 - arg2 = *temp;
71509 - if (SWIG_IsNewObj(res2)) delete temp;
71510 - }
71511 - }
71512 - try {
71513 - result = (arg1)->convsepf_raw(arg2);
71514 - }
71515 - catch(vips::VError &_e) {
71516 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
71517 - }
71518 -
71519 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
71520 - return resultobj;
71521 -fail:
71522 - return NULL;
71523 -}
71524 -
71525 -
71526 -SWIGINTERN PyObject *_wrap_VImage_convsep_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71527 - PyObject *resultobj = 0;
71528 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71529 - vips::VIMask arg2 ;
71530 - void *argp1 = 0 ;
71531 - int res1 = 0 ;
71532 - void *argp2 ;
71533 - int res2 = 0 ;
71534 - PyObject * obj0 = 0 ;
71535 - PyObject * obj1 = 0 ;
71536 - vips::VImage result;
71537 -
71538 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_convsep_raw",&obj0,&obj1)) SWIG_fail;
71539 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
71540 - if (!SWIG_IsOK(res1)) {
71541 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convsep_raw" "', argument " "1"" of type '" "vips::VImage *""'");
71542 - }
71543 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
71544 - {
71545 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
71546 - if (!SWIG_IsOK(res2)) {
71547 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convsep_raw" "', argument " "2"" of type '" "vips::VIMask""'");
71548 - }
71549 - if (!argp2) {
71550 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convsep_raw" "', argument " "2"" of type '" "vips::VIMask""'");
71551 - } else {
71552 - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
71553 - arg2 = *temp;
71554 - if (SWIG_IsNewObj(res2)) delete temp;
71555 - }
71556 - }
71557 - try {
71558 - result = (arg1)->convsep_raw(arg2);
71559 - }
71560 - catch(vips::VError &_e) {
71561 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
71562 - }
71563 -
71564 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
71565 - return resultobj;
71566 -fail:
71567 - return NULL;
71568 -}
71569 -
71570 -
71571 -SWIGINTERN PyObject *_wrap_VImage_fastcor_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71572 - PyObject *resultobj = 0;
71573 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71574 - vips::VImage arg2 ;
71575 - void *argp1 = 0 ;
71576 - int res1 = 0 ;
71577 - void *argp2 ;
71578 - int res2 = 0 ;
71579 - PyObject * obj0 = 0 ;
71580 - PyObject * obj1 = 0 ;
71581 - vips::VImage result;
71582 -
71583 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_fastcor_raw",&obj0,&obj1)) SWIG_fail;
71584 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
71585 - if (!SWIG_IsOK(res1)) {
71586 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_fastcor_raw" "', argument " "1"" of type '" "vips::VImage *""'");
71587 - }
71588 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
71589 - {
71590 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
71591 - if (!SWIG_IsOK(res2)) {
71592 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_fastcor_raw" "', argument " "2"" of type '" "vips::VImage""'");
71593 - }
71594 - if (!argp2) {
71595 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_fastcor_raw" "', argument " "2"" of type '" "vips::VImage""'");
71596 - } else {
71597 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
71598 - arg2 = *temp;
71599 - if (SWIG_IsNewObj(res2)) delete temp;
71600 - }
71601 - }
71602 - try {
71603 - result = (arg1)->fastcor_raw(arg2);
71604 - }
71605 - catch(vips::VError &_e) {
71606 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
71607 - }
71608 -
71609 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
71610 - return resultobj;
71611 -fail:
71612 - return NULL;
71613 -}
71614 -
71615 -
71616 -SWIGINTERN PyObject *_wrap_VImage_gradcor_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71617 - PyObject *resultobj = 0;
71618 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71619 - vips::VImage arg2 ;
71620 - void *argp1 = 0 ;
71621 - int res1 = 0 ;
71622 - void *argp2 ;
71623 - int res2 = 0 ;
71624 - PyObject * obj0 = 0 ;
71625 - PyObject * obj1 = 0 ;
71626 - vips::VImage result;
71627 -
71628 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_gradcor_raw",&obj0,&obj1)) SWIG_fail;
71629 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
71630 - if (!SWIG_IsOK(res1)) {
71631 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_gradcor_raw" "', argument " "1"" of type '" "vips::VImage *""'");
71632 - }
71633 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
71634 - {
71635 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
71636 - if (!SWIG_IsOK(res2)) {
71637 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_gradcor_raw" "', argument " "2"" of type '" "vips::VImage""'");
71638 - }
71639 - if (!argp2) {
71640 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_gradcor_raw" "', argument " "2"" of type '" "vips::VImage""'");
71641 - } else {
71642 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
71643 - arg2 = *temp;
71644 - if (SWIG_IsNewObj(res2)) delete temp;
71645 - }
71646 - }
71647 - try {
71648 - result = (arg1)->gradcor_raw(arg2);
71649 - }
71650 - catch(vips::VError &_e) {
71651 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
71652 - }
71653 -
71654 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
71655 - return resultobj;
71656 -fail:
71657 - return NULL;
71658 -}
71659 -
71660 -
71661 -SWIGINTERN PyObject *_wrap_VImage_spcor_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71662 - PyObject *resultobj = 0;
71663 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71664 - vips::VImage arg2 ;
71665 - void *argp1 = 0 ;
71666 - int res1 = 0 ;
71667 - void *argp2 ;
71668 - int res2 = 0 ;
71669 - PyObject * obj0 = 0 ;
71670 - PyObject * obj1 = 0 ;
71671 - vips::VImage result;
71672 -
71673 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_spcor_raw",&obj0,&obj1)) SWIG_fail;
71674 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
71675 - if (!SWIG_IsOK(res1)) {
71676 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_spcor_raw" "', argument " "1"" of type '" "vips::VImage *""'");
71677 - }
71678 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
71679 - {
71680 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
71681 - if (!SWIG_IsOK(res2)) {
71682 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_spcor_raw" "', argument " "2"" of type '" "vips::VImage""'");
71683 - }
71684 - if (!argp2) {
71685 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_spcor_raw" "', argument " "2"" of type '" "vips::VImage""'");
71686 - } else {
71687 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
71688 - arg2 = *temp;
71689 - if (SWIG_IsNewObj(res2)) delete temp;
71690 - }
71691 - }
71692 - try {
71693 - result = (arg1)->spcor_raw(arg2);
71694 - }
71695 - catch(vips::VError &_e) {
71696 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
71697 - }
71698 -
71699 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
71700 - return resultobj;
71701 -fail:
71702 - return NULL;
71703 -}
71704 -
71705 -
71706 -SWIGINTERN PyObject *_wrap_VImage_lhisteq_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71707 - PyObject *resultobj = 0;
71708 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71709 - int arg2 ;
71710 - int arg3 ;
71711 - void *argp1 = 0 ;
71712 - int res1 = 0 ;
71713 - int val2 ;
71714 - int ecode2 = 0 ;
71715 - int val3 ;
71716 - int ecode3 = 0 ;
71717 - PyObject * obj0 = 0 ;
71718 - PyObject * obj1 = 0 ;
71719 - PyObject * obj2 = 0 ;
71720 - vips::VImage result;
71721 -
71722 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_lhisteq_raw",&obj0,&obj1,&obj2)) SWIG_fail;
71723 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
71724 - if (!SWIG_IsOK(res1)) {
71725 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lhisteq_raw" "', argument " "1"" of type '" "vips::VImage *""'");
71726 - }
71727 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
71728 - ecode2 = SWIG_AsVal_int(obj1, &val2);
71729 - if (!SWIG_IsOK(ecode2)) {
71730 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_lhisteq_raw" "', argument " "2"" of type '" "int""'");
71731 - }
71732 - arg2 = static_cast< int >(val2);
71733 - ecode3 = SWIG_AsVal_int(obj2, &val3);
71734 - if (!SWIG_IsOK(ecode3)) {
71735 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lhisteq_raw" "', argument " "3"" of type '" "int""'");
71736 - }
71737 - arg3 = static_cast< int >(val3);
71738 - try {
71739 - result = (arg1)->lhisteq_raw(arg2,arg3);
71740 - }
71741 - catch(vips::VError &_e) {
71742 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
71743 - }
71744 -
71745 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
71746 - return resultobj;
71747 -fail:
71748 - return NULL;
71749 -}
71750 -
71751 -
71752 -SWIGINTERN PyObject *_wrap_VImage_stdif_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71753 - PyObject *resultobj = 0;
71754 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71755 - double arg2 ;
71756 - double arg3 ;
71757 - double arg4 ;
71758 - double arg5 ;
71759 - int arg6 ;
71760 - int arg7 ;
71761 - void *argp1 = 0 ;
71762 - int res1 = 0 ;
71763 - double val2 ;
71764 - int ecode2 = 0 ;
71765 - double val3 ;
71766 - int ecode3 = 0 ;
71767 - double val4 ;
71768 - int ecode4 = 0 ;
71769 - double val5 ;
71770 - int ecode5 = 0 ;
71771 - int val6 ;
71772 - int ecode6 = 0 ;
71773 - int val7 ;
71774 - int ecode7 = 0 ;
71775 - PyObject * obj0 = 0 ;
71776 - PyObject * obj1 = 0 ;
71777 - PyObject * obj2 = 0 ;
71778 - PyObject * obj3 = 0 ;
71779 - PyObject * obj4 = 0 ;
71780 - PyObject * obj5 = 0 ;
71781 - PyObject * obj6 = 0 ;
71782 - vips::VImage result;
71783 -
71784 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_stdif_raw",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
71785 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
71786 - if (!SWIG_IsOK(res1)) {
71787 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_stdif_raw" "', argument " "1"" of type '" "vips::VImage *""'");
71788 - }
71789 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
71790 - ecode2 = SWIG_AsVal_double(obj1, &val2);
71791 - if (!SWIG_IsOK(ecode2)) {
71792 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_stdif_raw" "', argument " "2"" of type '" "double""'");
71793 - }
71794 - arg2 = static_cast< double >(val2);
71795 - ecode3 = SWIG_AsVal_double(obj2, &val3);
71796 - if (!SWIG_IsOK(ecode3)) {
71797 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_stdif_raw" "', argument " "3"" of type '" "double""'");
71798 - }
71799 - arg3 = static_cast< double >(val3);
71800 - ecode4 = SWIG_AsVal_double(obj3, &val4);
71801 - if (!SWIG_IsOK(ecode4)) {
71802 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_stdif_raw" "', argument " "4"" of type '" "double""'");
71803 - }
71804 - arg4 = static_cast< double >(val4);
71805 - ecode5 = SWIG_AsVal_double(obj4, &val5);
71806 - if (!SWIG_IsOK(ecode5)) {
71807 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_stdif_raw" "', argument " "5"" of type '" "double""'");
71808 - }
71809 - arg5 = static_cast< double >(val5);
71810 - ecode6 = SWIG_AsVal_int(obj5, &val6);
71811 - if (!SWIG_IsOK(ecode6)) {
71812 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_stdif_raw" "', argument " "6"" of type '" "int""'");
71813 - }
71814 - arg6 = static_cast< int >(val6);
71815 - ecode7 = SWIG_AsVal_int(obj6, &val7);
71816 - if (!SWIG_IsOK(ecode7)) {
71817 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_stdif_raw" "', argument " "7"" of type '" "int""'");
71818 - }
71819 - arg7 = static_cast< int >(val7);
71820 - try {
71821 - result = (arg1)->stdif_raw(arg2,arg3,arg4,arg5,arg6,arg7);
71822 - }
71823 - catch(vips::VError &_e) {
71824 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
71825 - }
71826 -
71827 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
71828 - return resultobj;
71829 -fail:
71830 - return NULL;
71831 -}
71832 -
71833 -
71834 -SWIGINTERN PyObject *_wrap_VImage_rank_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71835 - PyObject *resultobj = 0;
71836 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71837 - int arg2 ;
71838 - int arg3 ;
71839 - int arg4 ;
71840 - void *argp1 = 0 ;
71841 - int res1 = 0 ;
71842 - int val2 ;
71843 - int ecode2 = 0 ;
71844 - int val3 ;
71845 - int ecode3 = 0 ;
71846 - int val4 ;
71847 - int ecode4 = 0 ;
71848 - PyObject * obj0 = 0 ;
71849 - PyObject * obj1 = 0 ;
71850 - PyObject * obj2 = 0 ;
71851 - PyObject * obj3 = 0 ;
71852 - vips::VImage result;
71853 -
71854 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_rank_raw",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
71855 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
71856 - if (!SWIG_IsOK(res1)) {
71857 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rank_raw" "', argument " "1"" of type '" "vips::VImage *""'");
71858 - }
71859 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
71860 - ecode2 = SWIG_AsVal_int(obj1, &val2);
71861 - if (!SWIG_IsOK(ecode2)) {
71862 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_rank_raw" "', argument " "2"" of type '" "int""'");
71863 - }
71864 - arg2 = static_cast< int >(val2);
71865 - ecode3 = SWIG_AsVal_int(obj2, &val3);
71866 - if (!SWIG_IsOK(ecode3)) {
71867 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_rank_raw" "', argument " "3"" of type '" "int""'");
71868 - }
71869 - arg3 = static_cast< int >(val3);
71870 - ecode4 = SWIG_AsVal_int(obj3, &val4);
71871 - if (!SWIG_IsOK(ecode4)) {
71872 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_rank_raw" "', argument " "4"" of type '" "int""'");
71873 - }
71874 - arg4 = static_cast< int >(val4);
71875 - try {
71876 - result = (arg1)->rank_raw(arg2,arg3,arg4);
71877 - }
71878 - catch(vips::VError &_e) {
71879 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
71880 - }
71881 -
71882 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
71883 - return resultobj;
71884 -fail:
71885 - return NULL;
71886 -}
71887 -
71888 -
71889 -SWIGINTERN PyObject *_wrap_VImage_dilate_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71890 - PyObject *resultobj = 0;
71891 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71892 - vips::VIMask arg2 ;
71893 - void *argp1 = 0 ;
71894 - int res1 = 0 ;
71895 - void *argp2 ;
71896 - int res2 = 0 ;
71897 - PyObject * obj0 = 0 ;
71898 - PyObject * obj1 = 0 ;
71899 - vips::VImage result;
71900 -
71901 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_dilate_raw",&obj0,&obj1)) SWIG_fail;
71902 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
71903 - if (!SWIG_IsOK(res1)) {
71904 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dilate_raw" "', argument " "1"" of type '" "vips::VImage *""'");
71905 - }
71906 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
71907 - {
71908 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
71909 - if (!SWIG_IsOK(res2)) {
71910 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dilate_raw" "', argument " "2"" of type '" "vips::VIMask""'");
71911 - }
71912 - if (!argp2) {
71913 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dilate_raw" "', argument " "2"" of type '" "vips::VIMask""'");
71914 - } else {
71915 - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
71916 - arg2 = *temp;
71917 - if (SWIG_IsNewObj(res2)) delete temp;
71918 - }
71919 - }
71920 - try {
71921 - result = (arg1)->dilate_raw(arg2);
71922 - }
71923 - catch(vips::VError &_e) {
71924 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
71925 - }
71926 -
71927 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
71928 - return resultobj;
71929 -fail:
71930 - return NULL;
71931 -}
71932 -
71933 -
71934 -SWIGINTERN PyObject *_wrap_VImage_erode_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71935 - PyObject *resultobj = 0;
71936 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71937 - vips::VIMask arg2 ;
71938 - void *argp1 = 0 ;
71939 - int res1 = 0 ;
71940 - void *argp2 ;
71941 - int res2 = 0 ;
71942 - PyObject * obj0 = 0 ;
71943 - PyObject * obj1 = 0 ;
71944 - vips::VImage result;
71945 -
71946 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_erode_raw",&obj0,&obj1)) SWIG_fail;
71947 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
71948 - if (!SWIG_IsOK(res1)) {
71949 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_erode_raw" "', argument " "1"" of type '" "vips::VImage *""'");
71950 - }
71951 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
71952 - {
71953 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
71954 - if (!SWIG_IsOK(res2)) {
71955 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_erode_raw" "', argument " "2"" of type '" "vips::VIMask""'");
71956 - }
71957 - if (!argp2) {
71958 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_erode_raw" "', argument " "2"" of type '" "vips::VIMask""'");
71959 - } else {
71960 - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
71961 - arg2 = *temp;
71962 - if (SWIG_IsNewObj(res2)) delete temp;
71963 - }
71964 - }
71965 - try {
71966 - result = (arg1)->erode_raw(arg2);
71967 - }
71968 - catch(vips::VError &_e) {
71969 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
71970 - }
71971 -
71972 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
71973 - return resultobj;
71974 -fail:
71975 - return NULL;
71976 -}
71977 -
71978 -
71979 -SWIGINTERN PyObject *_wrap_VImage_similarity_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71980 - PyObject *resultobj = 0;
71981 - vips::VImage *arg1 = (vips::VImage *) 0 ;
71982 - double arg2 ;
71983 - double arg3 ;
71984 - double arg4 ;
71985 - double arg5 ;
71986 - int arg6 ;
71987 - int arg7 ;
71988 - int arg8 ;
71989 - int arg9 ;
71990 - void *argp1 = 0 ;
71991 - int res1 = 0 ;
71992 - double val2 ;
71993 - int ecode2 = 0 ;
71994 - double val3 ;
71995 - int ecode3 = 0 ;
71996 - double val4 ;
71997 - int ecode4 = 0 ;
71998 - double val5 ;
71999 - int ecode5 = 0 ;
72000 - int val6 ;
72001 - int ecode6 = 0 ;
72002 - int val7 ;
72003 - int ecode7 = 0 ;
72004 - int val8 ;
72005 - int ecode8 = 0 ;
72006 - int val9 ;
72007 - int ecode9 = 0 ;
72008 - PyObject * obj0 = 0 ;
72009 - PyObject * obj1 = 0 ;
72010 - PyObject * obj2 = 0 ;
72011 - PyObject * obj3 = 0 ;
72012 - PyObject * obj4 = 0 ;
72013 - PyObject * obj5 = 0 ;
72014 - PyObject * obj6 = 0 ;
72015 - PyObject * obj7 = 0 ;
72016 - PyObject * obj8 = 0 ;
72017 - vips::VImage result;
72018 -
72019 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:VImage_similarity_area",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
72020 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
72021 - if (!SWIG_IsOK(res1)) {
72022 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_similarity_area" "', argument " "1"" of type '" "vips::VImage *""'");
72023 - }
72024 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
72025 - ecode2 = SWIG_AsVal_double(obj1, &val2);
72026 - if (!SWIG_IsOK(ecode2)) {
72027 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_similarity_area" "', argument " "2"" of type '" "double""'");
72028 - }
72029 - arg2 = static_cast< double >(val2);
72030 - ecode3 = SWIG_AsVal_double(obj2, &val3);
72031 - if (!SWIG_IsOK(ecode3)) {
72032 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_similarity_area" "', argument " "3"" of type '" "double""'");
72033 - }
72034 - arg3 = static_cast< double >(val3);
72035 - ecode4 = SWIG_AsVal_double(obj3, &val4);
72036 - if (!SWIG_IsOK(ecode4)) {
72037 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_similarity_area" "', argument " "4"" of type '" "double""'");
72038 - }
72039 - arg4 = static_cast< double >(val4);
72040 - ecode5 = SWIG_AsVal_double(obj4, &val5);
72041 - if (!SWIG_IsOK(ecode5)) {
72042 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_similarity_area" "', argument " "5"" of type '" "double""'");
72043 - }
72044 - arg5 = static_cast< double >(val5);
72045 - ecode6 = SWIG_AsVal_int(obj5, &val6);
72046 - if (!SWIG_IsOK(ecode6)) {
72047 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_similarity_area" "', argument " "6"" of type '" "int""'");
72048 - }
72049 - arg6 = static_cast< int >(val6);
72050 - ecode7 = SWIG_AsVal_int(obj6, &val7);
72051 - if (!SWIG_IsOK(ecode7)) {
72052 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_similarity_area" "', argument " "7"" of type '" "int""'");
72053 - }
72054 - arg7 = static_cast< int >(val7);
72055 - ecode8 = SWIG_AsVal_int(obj7, &val8);
72056 - if (!SWIG_IsOK(ecode8)) {
72057 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_similarity_area" "', argument " "8"" of type '" "int""'");
72058 - }
72059 - arg8 = static_cast< int >(val8);
72060 - ecode9 = SWIG_AsVal_int(obj8, &val9);
72061 - if (!SWIG_IsOK(ecode9)) {
72062 - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_similarity_area" "', argument " "9"" of type '" "int""'");
72063 - }
72064 - arg9 = static_cast< int >(val9);
72065 - try {
72066 - result = (arg1)->similarity_area(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
72067 - }
72068 - catch(vips::VError &_e) {
72069 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
72070 - }
72071 -
72072 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
72073 - return resultobj;
72074 -fail:
72075 - return NULL;
72076 -}
72077 -
72078 -
72079 -SWIGINTERN PyObject *_wrap_VImage_similarity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72080 - PyObject *resultobj = 0;
72081 - vips::VImage *arg1 = (vips::VImage *) 0 ;
72082 - double arg2 ;
72083 - double arg3 ;
72084 - double arg4 ;
72085 - double arg5 ;
72086 - void *argp1 = 0 ;
72087 - int res1 = 0 ;
72088 - double val2 ;
72089 - int ecode2 = 0 ;
72090 - double val3 ;
72091 - int ecode3 = 0 ;
72092 - double val4 ;
72093 - int ecode4 = 0 ;
72094 - double val5 ;
72095 - int ecode5 = 0 ;
72096 - PyObject * obj0 = 0 ;
72097 - PyObject * obj1 = 0 ;
72098 - PyObject * obj2 = 0 ;
72099 - PyObject * obj3 = 0 ;
72100 - PyObject * obj4 = 0 ;
72101 - vips::VImage result;
72102 -
72103 - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_similarity",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
72104 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
72105 - if (!SWIG_IsOK(res1)) {
72106 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_similarity" "', argument " "1"" of type '" "vips::VImage *""'");
72107 - }
72108 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
72109 - ecode2 = SWIG_AsVal_double(obj1, &val2);
72110 - if (!SWIG_IsOK(ecode2)) {
72111 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_similarity" "', argument " "2"" of type '" "double""'");
72112 - }
72113 - arg2 = static_cast< double >(val2);
72114 - ecode3 = SWIG_AsVal_double(obj2, &val3);
72115 - if (!SWIG_IsOK(ecode3)) {
72116 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_similarity" "', argument " "3"" of type '" "double""'");
72117 - }
72118 - arg3 = static_cast< double >(val3);
72119 - ecode4 = SWIG_AsVal_double(obj3, &val4);
72120 - if (!SWIG_IsOK(ecode4)) {
72121 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_similarity" "', argument " "4"" of type '" "double""'");
72122 - }
72123 - arg4 = static_cast< double >(val4);
72124 - ecode5 = SWIG_AsVal_double(obj4, &val5);
72125 - if (!SWIG_IsOK(ecode5)) {
72126 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_similarity" "', argument " "5"" of type '" "double""'");
72127 - }
72128 - arg5 = static_cast< double >(val5);
72129 - try {
72130 - result = (arg1)->similarity(arg2,arg3,arg4,arg5);
72131 - }
72132 - catch(vips::VError &_e) {
72133 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
72134 - }
72135 -
72136 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
72137 - return resultobj;
72138 -fail:
72139 - return NULL;
72140 -}
72141 -
72142 -
72143 -SWIGINTERN PyObject *_wrap_VImage_mask2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72144 - PyObject *resultobj = 0;
72145 - vips::VDMask arg1 ;
72146 - void *argp1 ;
72147 - int res1 = 0 ;
72148 - PyObject * obj0 = 0 ;
72149 - vips::VImage result;
72150 -
72151 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_mask2vips",&obj0)) SWIG_fail;
72152 - {
72153 - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_vips__VDMask, 0 | 0);
72154 - if (!SWIG_IsOK(res1)) {
72155 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_mask2vips" "', argument " "1"" of type '" "vips::VDMask""'");
72156 - }
72157 - if (!argp1) {
72158 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_mask2vips" "', argument " "1"" of type '" "vips::VDMask""'");
72159 - } else {
72160 - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp1);
72161 - arg1 = *temp;
72162 - if (SWIG_IsNewObj(res1)) delete temp;
72163 - }
72164 - }
72165 - try {
72166 - result = vips::VImage::mask2vips(arg1);
72167 - }
72168 - catch(vips::VError &_e) {
72169 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
72170 - }
72171 -
72172 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
72173 - return resultobj;
72174 -fail:
72175 - return NULL;
72176 -}
72177 -
72178 -
72179 -SWIGINTERN PyObject *_wrap_VImage_vips2mask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72180 - PyObject *resultobj = 0;
72181 - vips::VImage *arg1 = (vips::VImage *) 0 ;
72182 - void *argp1 = 0 ;
72183 - int res1 = 0 ;
72184 - PyObject * obj0 = 0 ;
72185 - vips::VDMask result;
72186 -
72187 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_vips2mask",&obj0)) SWIG_fail;
72188 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
72189 - if (!SWIG_IsOK(res1)) {
72190 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2mask" "', argument " "1"" of type '" "vips::VImage *""'");
72191 - }
72192 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
72193 - try {
72194 - result = (arg1)->vips2mask();
72195 - }
72196 - catch(vips::VError &_e) {
72197 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
72198 - }
72199 -
72200 - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
72201 - return resultobj;
72202 -fail:
72203 - return NULL;
72204 -}
72205 -
72206 -
72207 -SWIGINTERN PyObject *_wrap_VImage_insertplace__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72208 - PyObject *resultobj = 0;
72209 - vips::VImage *arg1 = (vips::VImage *) 0 ;
72210 - vips::VImage arg2 ;
72211 - int arg3 ;
72212 - int arg4 ;
72213 - void *argp1 = 0 ;
72214 - int res1 = 0 ;
72215 - void *argp2 ;
72216 - int res2 = 0 ;
72217 - int val3 ;
72218 - int ecode3 = 0 ;
72219 - int val4 ;
72220 - int ecode4 = 0 ;
72221 - PyObject * obj0 = 0 ;
72222 - PyObject * obj1 = 0 ;
72223 - PyObject * obj2 = 0 ;
72224 - PyObject * obj3 = 0 ;
72225 -
72226 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_insertplace",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
72227 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
72228 - if (!SWIG_IsOK(res1)) {
72229 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_insertplace" "', argument " "1"" of type '" "vips::VImage *""'");
72230 - }
72231 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
72232 - {
72233 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
72234 - if (!SWIG_IsOK(res2)) {
72235 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_insertplace" "', argument " "2"" of type '" "vips::VImage""'");
72236 - }
72237 - if (!argp2) {
72238 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_insertplace" "', argument " "2"" of type '" "vips::VImage""'");
72239 - } else {
72240 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
72241 - arg2 = *temp;
72242 - if (SWIG_IsNewObj(res2)) delete temp;
72243 - }
72244 - }
72245 - ecode3 = SWIG_AsVal_int(obj2, &val3);
72246 - if (!SWIG_IsOK(ecode3)) {
72247 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_insertplace" "', argument " "3"" of type '" "int""'");
72248 - }
72249 - arg3 = static_cast< int >(val3);
72250 - ecode4 = SWIG_AsVal_int(obj3, &val4);
72251 - if (!SWIG_IsOK(ecode4)) {
72252 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_insertplace" "', argument " "4"" of type '" "int""'");
72253 - }
72254 - arg4 = static_cast< int >(val4);
72255 - try {
72256 - (arg1)->insertplace(arg2,arg3,arg4);
72257 - }
72258 - catch(vips::VError &_e) {
72259 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
72260 - }
72261 -
72262 - resultobj = SWIG_Py_Void();
72263 - return resultobj;
72264 -fail:
72265 - return NULL;
72266 -}
72267 -
72268 -
72269 -SWIGINTERN PyObject *_wrap_VImage_insertplace(PyObject *self, PyObject *args) {
72270 - int argc;
72271 - PyObject *argv[5];
72272 - int ii;
72273 -
72274 - if (!PyTuple_Check(args)) SWIG_fail;
72275 - argc = args ? (int)PyObject_Length(args) : 0;
72276 - for (ii = 0; (ii < 4) && (ii < argc); ii++) {
72277 - argv[ii] = PyTuple_GET_ITEM(args,ii);
72278 - }
72279 - if (argc == 4) {
72280 - int _v;
72281 - void *vptr = 0;
72282 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
72283 - _v = SWIG_CheckState(res);
72284 - if (_v) {
72285 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
72286 - _v = SWIG_CheckState(res);
72287 - if (_v) {
72288 - {
72289 - int res = SWIG_AsVal_int(argv[2], NULL);
72290 - _v = SWIG_CheckState(res);
72291 - }
72292 - if (_v) {
72293 - {
72294 - int res = SWIG_AsVal_int(argv[3], NULL);
72295 - _v = SWIG_CheckState(res);
72296 - }
72297 - if (_v) {
72298 - return _wrap_VImage_insertplace__SWIG_1(self, args);
72299 - }
72300 - }
72301 - }
72302 - }
72303 - }
72304 - if (argc == 4) {
72305 - int _v;
72306 - void *vptr = 0;
72307 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
72308 - _v = SWIG_CheckState(res);
72309 - if (_v) {
72310 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
72311 - _v = SWIG_CheckState(res);
72312 - if (_v) {
72313 - int res = swig::asptr(argv[2], (std::vector<int,std::allocator< int > >**)(0));
72314 - _v = SWIG_CheckState(res);
72315 - if (_v) {
72316 - int res = swig::asptr(argv[3], (std::vector<int,std::allocator< int > >**)(0));
72317 - _v = SWIG_CheckState(res);
72318 - if (_v) {
72319 - return _wrap_VImage_insertplace__SWIG_0(self, args);
72320 - }
72321 - }
72322 - }
72323 - }
72324 - }
72325 -
72326 -fail:
72327 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_insertplace'.\n"
72328 - " Possible C/C++ prototypes are:\n"
72329 - " vips::VImage::insertplace(vips::VImage,std::vector< int,std::allocator< int > >,std::vector< int,std::allocator< int > >)\n"
72330 - " vips::VImage::insertplace(vips::VImage,int,int)\n");
72331 - return 0;
72332 -}
72333 -
72334 -
72335 -SWIGINTERN PyObject *_wrap_VImage_circle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72336 - PyObject *resultobj = 0;
72337 - vips::VImage *arg1 = (vips::VImage *) 0 ;
72338 - int arg2 ;
72339 - int arg3 ;
72340 - int arg4 ;
72341 - int arg5 ;
72342 - void *argp1 = 0 ;
72343 - int res1 = 0 ;
72344 - int val2 ;
72345 - int ecode2 = 0 ;
72346 - int val3 ;
72347 - int ecode3 = 0 ;
72348 - int val4 ;
72349 - int ecode4 = 0 ;
72350 - int val5 ;
72351 - int ecode5 = 0 ;
72352 - PyObject * obj0 = 0 ;
72353 - PyObject * obj1 = 0 ;
72354 - PyObject * obj2 = 0 ;
72355 - PyObject * obj3 = 0 ;
72356 - PyObject * obj4 = 0 ;
72357 -
72358 - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_circle",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
72359 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
72360 - if (!SWIG_IsOK(res1)) {
72361 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_circle" "', argument " "1"" of type '" "vips::VImage *""'");
72362 - }
72363 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
72364 - ecode2 = SWIG_AsVal_int(obj1, &val2);
72365 - if (!SWIG_IsOK(ecode2)) {
72366 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_circle" "', argument " "2"" of type '" "int""'");
72367 - }
72368 - arg2 = static_cast< int >(val2);
72369 - ecode3 = SWIG_AsVal_int(obj2, &val3);
72370 - if (!SWIG_IsOK(ecode3)) {
72371 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_circle" "', argument " "3"" of type '" "int""'");
72372 - }
72373 - arg3 = static_cast< int >(val3);
72374 - ecode4 = SWIG_AsVal_int(obj3, &val4);
72375 - if (!SWIG_IsOK(ecode4)) {
72376 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_circle" "', argument " "4"" of type '" "int""'");
72377 - }
72378 - arg4 = static_cast< int >(val4);
72379 - ecode5 = SWIG_AsVal_int(obj4, &val5);
72380 - if (!SWIG_IsOK(ecode5)) {
72381 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_circle" "', argument " "5"" of type '" "int""'");
72382 - }
72383 - arg5 = static_cast< int >(val5);
72384 - try {
72385 - (arg1)->circle(arg2,arg3,arg4,arg5);
72386 - }
72387 - catch(vips::VError &_e) {
72388 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
72389 - }
72390 -
72391 - resultobj = SWIG_Py_Void();
72392 - return resultobj;
72393 -fail:
72394 - return NULL;
72395 -}
72396 -
72397 -
72398 -SWIGINTERN PyObject *_wrap_VImage_andimage__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72399 - PyObject *resultobj = 0;
72400 - vips::VImage *arg1 = (vips::VImage *) 0 ;
72401 - vips::VImage arg2 ;
72402 - void *argp1 = 0 ;
72403 - int res1 = 0 ;
72404 - void *argp2 ;
72405 - int res2 = 0 ;
72406 - PyObject * obj0 = 0 ;
72407 - PyObject * obj1 = 0 ;
72408 - vips::VImage result;
72409 -
72410 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_andimage",&obj0,&obj1)) SWIG_fail;
72411 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
72412 - if (!SWIG_IsOK(res1)) {
72413 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_andimage" "', argument " "1"" of type '" "vips::VImage *""'");
72414 - }
72415 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
72416 - {
72417 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
72418 - if (!SWIG_IsOK(res2)) {
72419 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_andimage" "', argument " "2"" of type '" "vips::VImage""'");
72420 - }
72421 - if (!argp2) {
72422 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_andimage" "', argument " "2"" of type '" "vips::VImage""'");
72423 - } else {
72424 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
72425 - arg2 = *temp;
72426 - if (SWIG_IsNewObj(res2)) delete temp;
72427 - }
72428 - }
72429 - try {
72430 - result = (arg1)->andimage(arg2);
72431 - }
72432 - catch(vips::VError &_e) {
72433 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
72434 - }
72435 -
72436 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
72437 - return resultobj;
72438 -fail:
72439 - return NULL;
72440 -}
72441 -
72442 -
72443 -SWIGINTERN PyObject *_wrap_VImage_andimage__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72444 - PyObject *resultobj = 0;
72445 - vips::VImage *arg1 = (vips::VImage *) 0 ;
72446 - int arg2 ;
72447 - void *argp1 = 0 ;
72448 - int res1 = 0 ;
72449 - int val2 ;
72450 - int ecode2 = 0 ;
72451 - PyObject * obj0 = 0 ;
72452 - PyObject * obj1 = 0 ;
72453 - vips::VImage result;
72454 -
72455 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_andimage",&obj0,&obj1)) SWIG_fail;
72456 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
72457 - if (!SWIG_IsOK(res1)) {
72458 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_andimage" "', argument " "1"" of type '" "vips::VImage *""'");
72459 - }
72460 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
72461 - ecode2 = SWIG_AsVal_int(obj1, &val2);
72462 - if (!SWIG_IsOK(ecode2)) {
72463 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_andimage" "', argument " "2"" of type '" "int""'");
72464 - }
72465 - arg2 = static_cast< int >(val2);
72466 - try {
72467 - result = (arg1)->andimage(arg2);
72468 - }
72469 - catch(vips::VError &_e) {
72470 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
72471 - }
72472 -
72473 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
72474 - return resultobj;
72475 -fail:
72476 - return NULL;
72477 -}
72478 -
72479 -
72480 -SWIGINTERN PyObject *_wrap_VImage_andimage__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72481 - PyObject *resultobj = 0;
72482 - vips::VImage *arg1 = (vips::VImage *) 0 ;
72483 - std::vector< double,std::allocator< double > > arg2 ;
72484 - void *argp1 = 0 ;
72485 - int res1 = 0 ;
72486 - PyObject * obj0 = 0 ;
72487 - PyObject * obj1 = 0 ;
72488 - vips::VImage result;
72489 -
72490 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_andimage",&obj0,&obj1)) SWIG_fail;
72491 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
72492 - if (!SWIG_IsOK(res1)) {
72493 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_andimage" "', argument " "1"" of type '" "vips::VImage *""'");
72494 - }
72495 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
72496 - {
72497 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
72498 - int res = swig::asptr(obj1, &ptr);
72499 - if (!SWIG_IsOK(res) || !ptr) {
72500 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_andimage" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
72501 - }
72502 - arg2 = *ptr;
72503 - if (SWIG_IsNewObj(res)) delete ptr;
72504 - }
72505 - try {
72506 - result = (arg1)->andimage(arg2);
72507 - }
72508 - catch(vips::VError &_e) {
72509 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
72510 - }
72511 -
72512 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
72513 - return resultobj;
72514 -fail:
72515 - return NULL;
72516 -}
72517 -
72518 -
72519 -SWIGINTERN PyObject *_wrap_VImage_andimage(PyObject *self, PyObject *args) {
72520 - int argc;
72521 - PyObject *argv[3];
72522 - int ii;
72523 -
72524 - if (!PyTuple_Check(args)) SWIG_fail;
72525 - argc = args ? (int)PyObject_Length(args) : 0;
72526 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
72527 - argv[ii] = PyTuple_GET_ITEM(args,ii);
72528 - }
72529 - if (argc == 2) {
72530 - int _v;
72531 - void *vptr = 0;
72532 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
72533 - _v = SWIG_CheckState(res);
72534 - if (_v) {
72535 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
72536 - _v = SWIG_CheckState(res);
72537 - if (_v) {
72538 - return _wrap_VImage_andimage__SWIG_0(self, args);
72539 - }
72540 - }
72541 - }
72542 - if (argc == 2) {
72543 - int _v;
72544 - void *vptr = 0;
72545 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
72546 - _v = SWIG_CheckState(res);
72547 - if (_v) {
72548 - {
72549 - int res = SWIG_AsVal_int(argv[1], NULL);
72550 - _v = SWIG_CheckState(res);
72551 - }
72552 - if (_v) {
72553 - return _wrap_VImage_andimage__SWIG_1(self, args);
72554 - }
72555 - }
72556 - }
72557 - if (argc == 2) {
72558 - int _v;
72559 - void *vptr = 0;
72560 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
72561 - _v = SWIG_CheckState(res);
72562 - if (_v) {
72563 - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
72564 - _v = SWIG_CheckState(res);
72565 - if (_v) {
72566 - return _wrap_VImage_andimage__SWIG_2(self, args);
72567 - }
72568 - }
72569 - }
72570 -
72571 -fail:
72572 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_andimage'.\n"
72573 - " Possible C/C++ prototypes are:\n"
72574 - " vips::VImage::andimage(vips::VImage)\n"
72575 - " vips::VImage::andimage(int)\n"
72576 - " vips::VImage::andimage(std::vector< double,std::allocator< double > >)\n");
72577 - return 0;
72578 -}
72579 -
72580 -
72581 -SWIGINTERN PyObject *_wrap_VImage_orimage__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72582 - PyObject *resultobj = 0;
72583 - vips::VImage *arg1 = (vips::VImage *) 0 ;
72584 - vips::VImage arg2 ;
72585 - void *argp1 = 0 ;
72586 - int res1 = 0 ;
72587 - void *argp2 ;
72588 - int res2 = 0 ;
72589 - PyObject * obj0 = 0 ;
72590 - PyObject * obj1 = 0 ;
72591 - vips::VImage result;
72592 -
72593 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_orimage",&obj0,&obj1)) SWIG_fail;
72594 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
72595 - if (!SWIG_IsOK(res1)) {
72596 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_orimage" "', argument " "1"" of type '" "vips::VImage *""'");
72597 - }
72598 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
72599 - {
72600 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
72601 - if (!SWIG_IsOK(res2)) {
72602 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_orimage" "', argument " "2"" of type '" "vips::VImage""'");
72603 - }
72604 - if (!argp2) {
72605 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_orimage" "', argument " "2"" of type '" "vips::VImage""'");
72606 - } else {
72607 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
72608 - arg2 = *temp;
72609 - if (SWIG_IsNewObj(res2)) delete temp;
72610 - }
72611 - }
72612 - try {
72613 - result = (arg1)->orimage(arg2);
72614 - }
72615 - catch(vips::VError &_e) {
72616 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
72617 - }
72618 -
72619 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
72620 - return resultobj;
72621 -fail:
72622 - return NULL;
72623 -}
72624 -
72625 -
72626 -SWIGINTERN PyObject *_wrap_VImage_orimage__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72627 - PyObject *resultobj = 0;
72628 - vips::VImage *arg1 = (vips::VImage *) 0 ;
72629 - int arg2 ;
72630 - void *argp1 = 0 ;
72631 - int res1 = 0 ;
72632 - int val2 ;
72633 - int ecode2 = 0 ;
72634 - PyObject * obj0 = 0 ;
72635 - PyObject * obj1 = 0 ;
72636 - vips::VImage result;
72637 -
72638 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_orimage",&obj0,&obj1)) SWIG_fail;
72639 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
72640 - if (!SWIG_IsOK(res1)) {
72641 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_orimage" "', argument " "1"" of type '" "vips::VImage *""'");
72642 - }
72643 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
72644 - ecode2 = SWIG_AsVal_int(obj1, &val2);
72645 - if (!SWIG_IsOK(ecode2)) {
72646 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_orimage" "', argument " "2"" of type '" "int""'");
72647 - }
72648 - arg2 = static_cast< int >(val2);
72649 - try {
72650 - result = (arg1)->orimage(arg2);
72651 - }
72652 - catch(vips::VError &_e) {
72653 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
72654 - }
72655 -
72656 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
72657 - return resultobj;
72658 -fail:
72659 - return NULL;
72660 -}
72661 -
72662 -
72663 -SWIGINTERN PyObject *_wrap_VImage_orimage__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72664 - PyObject *resultobj = 0;
72665 - vips::VImage *arg1 = (vips::VImage *) 0 ;
72666 - std::vector< double,std::allocator< double > > arg2 ;
72667 - void *argp1 = 0 ;
72668 - int res1 = 0 ;
72669 - PyObject * obj0 = 0 ;
72670 - PyObject * obj1 = 0 ;
72671 - vips::VImage result;
72672 -
72673 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_orimage",&obj0,&obj1)) SWIG_fail;
72674 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
72675 - if (!SWIG_IsOK(res1)) {
72676 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_orimage" "', argument " "1"" of type '" "vips::VImage *""'");
72677 - }
72678 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
72679 - {
72680 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
72681 - int res = swig::asptr(obj1, &ptr);
72682 - if (!SWIG_IsOK(res) || !ptr) {
72683 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_orimage" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
72684 - }
72685 - arg2 = *ptr;
72686 - if (SWIG_IsNewObj(res)) delete ptr;
72687 - }
72688 - try {
72689 - result = (arg1)->orimage(arg2);
72690 - }
72691 - catch(vips::VError &_e) {
72692 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
72693 - }
72694 -
72695 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
72696 - return resultobj;
72697 -fail:
72698 - return NULL;
72699 -}
72700 -
72701 -
72702 -SWIGINTERN PyObject *_wrap_VImage_orimage(PyObject *self, PyObject *args) {
72703 - int argc;
72704 - PyObject *argv[3];
72705 - int ii;
72706 -
72707 - if (!PyTuple_Check(args)) SWIG_fail;
72708 - argc = args ? (int)PyObject_Length(args) : 0;
72709 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
72710 - argv[ii] = PyTuple_GET_ITEM(args,ii);
72711 - }
72712 - if (argc == 2) {
72713 - int _v;
72714 - void *vptr = 0;
72715 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
72716 - _v = SWIG_CheckState(res);
72717 - if (_v) {
72718 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
72719 - _v = SWIG_CheckState(res);
72720 - if (_v) {
72721 - return _wrap_VImage_orimage__SWIG_0(self, args);
72722 - }
72723 - }
72724 - }
72725 - if (argc == 2) {
72726 - int _v;
72727 - void *vptr = 0;
72728 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
72729 - _v = SWIG_CheckState(res);
72730 - if (_v) {
72731 - {
72732 - int res = SWIG_AsVal_int(argv[1], NULL);
72733 - _v = SWIG_CheckState(res);
72734 - }
72735 - if (_v) {
72736 - return _wrap_VImage_orimage__SWIG_1(self, args);
72737 - }
72738 - }
72739 - }
72740 - if (argc == 2) {
72741 - int _v;
72742 - void *vptr = 0;
72743 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
72744 - _v = SWIG_CheckState(res);
72745 - if (_v) {
72746 - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
72747 - _v = SWIG_CheckState(res);
72748 - if (_v) {
72749 - return _wrap_VImage_orimage__SWIG_2(self, args);
72750 - }
72751 - }
72752 - }
72753 -
72754 -fail:
72755 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_orimage'.\n"
72756 - " Possible C/C++ prototypes are:\n"
72757 - " vips::VImage::orimage(vips::VImage)\n"
72758 - " vips::VImage::orimage(int)\n"
72759 - " vips::VImage::orimage(std::vector< double,std::allocator< double > >)\n");
72760 - return 0;
72761 -}
72762 -
72763 -
72764 -SWIGINTERN PyObject *_wrap_VImage_eorimage__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72765 - PyObject *resultobj = 0;
72766 - vips::VImage *arg1 = (vips::VImage *) 0 ;
72767 - vips::VImage arg2 ;
72768 - void *argp1 = 0 ;
72769 - int res1 = 0 ;
72770 - void *argp2 ;
72771 - int res2 = 0 ;
72772 - PyObject * obj0 = 0 ;
72773 - PyObject * obj1 = 0 ;
72774 - vips::VImage result;
72775 -
72776 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_eorimage",&obj0,&obj1)) SWIG_fail;
72777 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
72778 - if (!SWIG_IsOK(res1)) {
72779 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_eorimage" "', argument " "1"" of type '" "vips::VImage *""'");
72780 - }
72781 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
72782 - {
72783 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
72784 - if (!SWIG_IsOK(res2)) {
72785 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_eorimage" "', argument " "2"" of type '" "vips::VImage""'");
72786 - }
72787 - if (!argp2) {
72788 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_eorimage" "', argument " "2"" of type '" "vips::VImage""'");
72789 - } else {
72790 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
72791 - arg2 = *temp;
72792 - if (SWIG_IsNewObj(res2)) delete temp;
72793 - }
72794 - }
72795 - try {
72796 - result = (arg1)->eorimage(arg2);
72797 - }
72798 - catch(vips::VError &_e) {
72799 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
72800 - }
72801 -
72802 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
72803 - return resultobj;
72804 -fail:
72805 - return NULL;
72806 -}
72807 -
72808 -
72809 -SWIGINTERN PyObject *_wrap_VImage_eorimage__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72810 - PyObject *resultobj = 0;
72811 - vips::VImage *arg1 = (vips::VImage *) 0 ;
72812 - int arg2 ;
72813 - void *argp1 = 0 ;
72814 - int res1 = 0 ;
72815 - int val2 ;
72816 - int ecode2 = 0 ;
72817 - PyObject * obj0 = 0 ;
72818 - PyObject * obj1 = 0 ;
72819 - vips::VImage result;
72820 -
72821 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_eorimage",&obj0,&obj1)) SWIG_fail;
72822 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
72823 - if (!SWIG_IsOK(res1)) {
72824 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_eorimage" "', argument " "1"" of type '" "vips::VImage *""'");
72825 - }
72826 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
72827 - ecode2 = SWIG_AsVal_int(obj1, &val2);
72828 - if (!SWIG_IsOK(ecode2)) {
72829 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_eorimage" "', argument " "2"" of type '" "int""'");
72830 - }
72831 - arg2 = static_cast< int >(val2);
72832 - try {
72833 - result = (arg1)->eorimage(arg2);
72834 - }
72835 - catch(vips::VError &_e) {
72836 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
72837 - }
72838 -
72839 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
72840 - return resultobj;
72841 -fail:
72842 - return NULL;
72843 -}
72844 -
72845 -
72846 -SWIGINTERN PyObject *_wrap_VImage_eorimage__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72847 - PyObject *resultobj = 0;
72848 - vips::VImage *arg1 = (vips::VImage *) 0 ;
72849 - std::vector< double,std::allocator< double > > arg2 ;
72850 - void *argp1 = 0 ;
72851 - int res1 = 0 ;
72852 - PyObject * obj0 = 0 ;
72853 - PyObject * obj1 = 0 ;
72854 - vips::VImage result;
72855 -
72856 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_eorimage",&obj0,&obj1)) SWIG_fail;
72857 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
72858 - if (!SWIG_IsOK(res1)) {
72859 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_eorimage" "', argument " "1"" of type '" "vips::VImage *""'");
72860 - }
72861 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
72862 - {
72863 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
72864 - int res = swig::asptr(obj1, &ptr);
72865 - if (!SWIG_IsOK(res) || !ptr) {
72866 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_eorimage" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
72867 - }
72868 - arg2 = *ptr;
72869 - if (SWIG_IsNewObj(res)) delete ptr;
72870 - }
72871 - try {
72872 - result = (arg1)->eorimage(arg2);
72873 - }
72874 - catch(vips::VError &_e) {
72875 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
72876 - }
72877 -
72878 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
72879 - return resultobj;
72880 -fail:
72881 - return NULL;
72882 -}
72883 -
72884 -
72885 -SWIGINTERN PyObject *_wrap_VImage_eorimage(PyObject *self, PyObject *args) {
72886 - int argc;
72887 - PyObject *argv[3];
72888 - int ii;
72889 -
72890 - if (!PyTuple_Check(args)) SWIG_fail;
72891 - argc = args ? (int)PyObject_Length(args) : 0;
72892 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
72893 - argv[ii] = PyTuple_GET_ITEM(args,ii);
72894 - }
72895 - if (argc == 2) {
72896 - int _v;
72897 - void *vptr = 0;
72898 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
72899 - _v = SWIG_CheckState(res);
72900 - if (_v) {
72901 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
72902 - _v = SWIG_CheckState(res);
72903 - if (_v) {
72904 - return _wrap_VImage_eorimage__SWIG_0(self, args);
72905 - }
72906 - }
72907 - }
72908 - if (argc == 2) {
72909 - int _v;
72910 - void *vptr = 0;
72911 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
72912 - _v = SWIG_CheckState(res);
72913 - if (_v) {
72914 - {
72915 - int res = SWIG_AsVal_int(argv[1], NULL);
72916 - _v = SWIG_CheckState(res);
72917 - }
72918 - if (_v) {
72919 - return _wrap_VImage_eorimage__SWIG_1(self, args);
72920 - }
72921 - }
72922 - }
72923 - if (argc == 2) {
72924 - int _v;
72925 - void *vptr = 0;
72926 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
72927 - _v = SWIG_CheckState(res);
72928 - if (_v) {
72929 - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
72930 - _v = SWIG_CheckState(res);
72931 - if (_v) {
72932 - return _wrap_VImage_eorimage__SWIG_2(self, args);
72933 - }
72934 - }
72935 - }
72936 -
72937 -fail:
72938 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_eorimage'.\n"
72939 - " Possible C/C++ prototypes are:\n"
72940 - " vips::VImage::eorimage(vips::VImage)\n"
72941 - " vips::VImage::eorimage(int)\n"
72942 - " vips::VImage::eorimage(std::vector< double,std::allocator< double > >)\n");
72943 - return 0;
72944 -}
72945 -
72946 -
72947 -SWIGINTERN PyObject *_wrap_VImage_shiftleft__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72948 - PyObject *resultobj = 0;
72949 - vips::VImage *arg1 = (vips::VImage *) 0 ;
72950 - std::vector< double,std::allocator< double > > arg2 ;
72951 - void *argp1 = 0 ;
72952 - int res1 = 0 ;
72953 - PyObject * obj0 = 0 ;
72954 - PyObject * obj1 = 0 ;
72955 - vips::VImage result;
72956 -
72957 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_shiftleft",&obj0,&obj1)) SWIG_fail;
72958 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
72959 - if (!SWIG_IsOK(res1)) {
72960 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_shiftleft" "', argument " "1"" of type '" "vips::VImage *""'");
72961 - }
72962 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
72963 - {
72964 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
72965 - int res = swig::asptr(obj1, &ptr);
72966 - if (!SWIG_IsOK(res) || !ptr) {
72967 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_shiftleft" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
72968 - }
72969 - arg2 = *ptr;
72970 - if (SWIG_IsNewObj(res)) delete ptr;
72971 - }
72972 - try {
72973 - result = (arg1)->shiftleft(arg2);
72974 - }
72975 - catch(vips::VError &_e) {
72976 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
72977 - }
72978 -
72979 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
72980 - return resultobj;
72981 -fail:
72982 - return NULL;
72983 -}
72984 -
72985 -
72986 -SWIGINTERN PyObject *_wrap_VImage_shiftleft__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72987 - PyObject *resultobj = 0;
72988 - vips::VImage *arg1 = (vips::VImage *) 0 ;
72989 - int arg2 ;
72990 - void *argp1 = 0 ;
72991 - int res1 = 0 ;
72992 - int val2 ;
72993 - int ecode2 = 0 ;
72994 - PyObject * obj0 = 0 ;
72995 - PyObject * obj1 = 0 ;
72996 - vips::VImage result;
72997 -
72998 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_shiftleft",&obj0,&obj1)) SWIG_fail;
72999 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
73000 - if (!SWIG_IsOK(res1)) {
73001 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_shiftleft" "', argument " "1"" of type '" "vips::VImage *""'");
73002 - }
73003 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
73004 - ecode2 = SWIG_AsVal_int(obj1, &val2);
73005 - if (!SWIG_IsOK(ecode2)) {
73006 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_shiftleft" "', argument " "2"" of type '" "int""'");
73007 - }
73008 - arg2 = static_cast< int >(val2);
73009 - try {
73010 - result = (arg1)->shiftleft(arg2);
73011 - }
73012 - catch(vips::VError &_e) {
73013 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
73014 - }
73015 -
73016 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
73017 - return resultobj;
73018 -fail:
73019 - return NULL;
73020 -}
73021 -
73022 -
73023 -SWIGINTERN PyObject *_wrap_VImage_shiftleft(PyObject *self, PyObject *args) {
73024 - int argc;
73025 - PyObject *argv[3];
73026 - int ii;
73027 -
73028 - if (!PyTuple_Check(args)) SWIG_fail;
73029 - argc = args ? (int)PyObject_Length(args) : 0;
73030 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
73031 - argv[ii] = PyTuple_GET_ITEM(args,ii);
73032 - }
73033 - if (argc == 2) {
73034 - int _v;
73035 - void *vptr = 0;
73036 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
73037 - _v = SWIG_CheckState(res);
73038 - if (_v) {
73039 - {
73040 - int res = SWIG_AsVal_int(argv[1], NULL);
73041 - _v = SWIG_CheckState(res);
73042 - }
73043 - if (_v) {
73044 - return _wrap_VImage_shiftleft__SWIG_1(self, args);
73045 - }
73046 - }
73047 - }
73048 - if (argc == 2) {
73049 - int _v;
73050 - void *vptr = 0;
73051 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
73052 - _v = SWIG_CheckState(res);
73053 - if (_v) {
73054 - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
73055 - _v = SWIG_CheckState(res);
73056 - if (_v) {
73057 - return _wrap_VImage_shiftleft__SWIG_0(self, args);
73058 - }
73059 - }
73060 - }
73061 -
73062 -fail:
73063 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_shiftleft'.\n"
73064 - " Possible C/C++ prototypes are:\n"
73065 - " vips::VImage::shiftleft(std::vector< double,std::allocator< double > >)\n"
73066 - " vips::VImage::shiftleft(int)\n");
73067 - return 0;
73068 -}
73069 -
73070 -
73071 -SWIGINTERN PyObject *_wrap_VImage_shiftright__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73072 - PyObject *resultobj = 0;
73073 - vips::VImage *arg1 = (vips::VImage *) 0 ;
73074 - std::vector< double,std::allocator< double > > arg2 ;
73075 - void *argp1 = 0 ;
73076 - int res1 = 0 ;
73077 - PyObject * obj0 = 0 ;
73078 - PyObject * obj1 = 0 ;
73079 - vips::VImage result;
73080 -
73081 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_shiftright",&obj0,&obj1)) SWIG_fail;
73082 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
73083 - if (!SWIG_IsOK(res1)) {
73084 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_shiftright" "', argument " "1"" of type '" "vips::VImage *""'");
73085 - }
73086 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
73087 - {
73088 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
73089 - int res = swig::asptr(obj1, &ptr);
73090 - if (!SWIG_IsOK(res) || !ptr) {
73091 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_shiftright" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
73092 - }
73093 - arg2 = *ptr;
73094 - if (SWIG_IsNewObj(res)) delete ptr;
73095 - }
73096 - try {
73097 - result = (arg1)->shiftright(arg2);
73098 - }
73099 - catch(vips::VError &_e) {
73100 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
73101 - }
73102 -
73103 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
73104 - return resultobj;
73105 -fail:
73106 - return NULL;
73107 -}
73108 -
73109 -
73110 -SWIGINTERN PyObject *_wrap_VImage_shiftright__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73111 - PyObject *resultobj = 0;
73112 - vips::VImage *arg1 = (vips::VImage *) 0 ;
73113 - int arg2 ;
73114 - void *argp1 = 0 ;
73115 - int res1 = 0 ;
73116 - int val2 ;
73117 - int ecode2 = 0 ;
73118 - PyObject * obj0 = 0 ;
73119 - PyObject * obj1 = 0 ;
73120 - vips::VImage result;
73121 -
73122 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_shiftright",&obj0,&obj1)) SWIG_fail;
73123 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
73124 - if (!SWIG_IsOK(res1)) {
73125 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_shiftright" "', argument " "1"" of type '" "vips::VImage *""'");
73126 - }
73127 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
73128 - ecode2 = SWIG_AsVal_int(obj1, &val2);
73129 - if (!SWIG_IsOK(ecode2)) {
73130 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_shiftright" "', argument " "2"" of type '" "int""'");
73131 - }
73132 - arg2 = static_cast< int >(val2);
73133 - try {
73134 - result = (arg1)->shiftright(arg2);
73135 - }
73136 - catch(vips::VError &_e) {
73137 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
73138 - }
73139 -
73140 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
73141 - return resultobj;
73142 -fail:
73143 - return NULL;
73144 -}
73145 -
73146 -
73147 -SWIGINTERN PyObject *_wrap_VImage_shiftright(PyObject *self, PyObject *args) {
73148 - int argc;
73149 - PyObject *argv[3];
73150 - int ii;
73151 -
73152 - if (!PyTuple_Check(args)) SWIG_fail;
73153 - argc = args ? (int)PyObject_Length(args) : 0;
73154 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
73155 - argv[ii] = PyTuple_GET_ITEM(args,ii);
73156 - }
73157 - if (argc == 2) {
73158 - int _v;
73159 - void *vptr = 0;
73160 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
73161 - _v = SWIG_CheckState(res);
73162 - if (_v) {
73163 - {
73164 - int res = SWIG_AsVal_int(argv[1], NULL);
73165 - _v = SWIG_CheckState(res);
73166 - }
73167 - if (_v) {
73168 - return _wrap_VImage_shiftright__SWIG_1(self, args);
73169 - }
73170 - }
73171 - }
73172 - if (argc == 2) {
73173 - int _v;
73174 - void *vptr = 0;
73175 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
73176 - _v = SWIG_CheckState(res);
73177 - if (_v) {
73178 - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
73179 - _v = SWIG_CheckState(res);
73180 - if (_v) {
73181 - return _wrap_VImage_shiftright__SWIG_0(self, args);
73182 - }
73183 - }
73184 - }
73185 -
73186 -fail:
73187 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_shiftright'.\n"
73188 - " Possible C/C++ prototypes are:\n"
73189 - " vips::VImage::shiftright(std::vector< double,std::allocator< double > >)\n"
73190 - " vips::VImage::shiftright(int)\n");
73191 - return 0;
73192 -}
73193 -
73194 -
73195 -SWIGINTERN PyObject *_wrap_VImage_blend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73196 - PyObject *resultobj = 0;
73197 - vips::VImage *arg1 = (vips::VImage *) 0 ;
73198 - vips::VImage arg2 ;
73199 - vips::VImage arg3 ;
73200 - void *argp1 = 0 ;
73201 - int res1 = 0 ;
73202 - void *argp2 ;
73203 - int res2 = 0 ;
73204 - void *argp3 ;
73205 - int res3 = 0 ;
73206 - PyObject * obj0 = 0 ;
73207 - PyObject * obj1 = 0 ;
73208 - PyObject * obj2 = 0 ;
73209 - vips::VImage result;
73210 -
73211 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_blend",&obj0,&obj1,&obj2)) SWIG_fail;
73212 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
73213 - if (!SWIG_IsOK(res1)) {
73214 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_blend" "', argument " "1"" of type '" "vips::VImage *""'");
73215 - }
73216 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
73217 - {
73218 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
73219 - if (!SWIG_IsOK(res2)) {
73220 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_blend" "', argument " "2"" of type '" "vips::VImage""'");
73221 - }
73222 - if (!argp2) {
73223 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_blend" "', argument " "2"" of type '" "vips::VImage""'");
73224 - } else {
73225 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
73226 - arg2 = *temp;
73227 - if (SWIG_IsNewObj(res2)) delete temp;
73228 - }
73229 - }
73230 - {
73231 - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0);
73232 - if (!SWIG_IsOK(res3)) {
73233 - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_blend" "', argument " "3"" of type '" "vips::VImage""'");
73234 - }
73235 - if (!argp3) {
73236 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_blend" "', argument " "3"" of type '" "vips::VImage""'");
73237 - } else {
73238 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp3);
73239 - arg3 = *temp;
73240 - if (SWIG_IsNewObj(res3)) delete temp;
73241 - }
73242 - }
73243 - try {
73244 - result = (arg1)->blend(arg2,arg3);
73245 - }
73246 - catch(vips::VError &_e) {
73247 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
73248 - }
73249 -
73250 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
73251 - return resultobj;
73252 -fail:
73253 - return NULL;
73254 -}
73255 -
73256 -
73257 -SWIGINTERN PyObject *_wrap_VImage_equal__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73258 - PyObject *resultobj = 0;
73259 - vips::VImage *arg1 = (vips::VImage *) 0 ;
73260 - vips::VImage arg2 ;
73261 - void *argp1 = 0 ;
73262 - int res1 = 0 ;
73263 - void *argp2 ;
73264 - int res2 = 0 ;
73265 - PyObject * obj0 = 0 ;
73266 - PyObject * obj1 = 0 ;
73267 - vips::VImage result;
73268 -
73269 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_equal",&obj0,&obj1)) SWIG_fail;
73270 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
73271 - if (!SWIG_IsOK(res1)) {
73272 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_equal" "', argument " "1"" of type '" "vips::VImage *""'");
73273 - }
73274 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
73275 - {
73276 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
73277 - if (!SWIG_IsOK(res2)) {
73278 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_equal" "', argument " "2"" of type '" "vips::VImage""'");
73279 - }
73280 - if (!argp2) {
73281 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_equal" "', argument " "2"" of type '" "vips::VImage""'");
73282 - } else {
73283 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
73284 - arg2 = *temp;
73285 - if (SWIG_IsNewObj(res2)) delete temp;
73286 - }
73287 - }
73288 - try {
73289 - result = (arg1)->equal(arg2);
73290 - }
73291 - catch(vips::VError &_e) {
73292 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
73293 - }
73294 -
73295 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
73296 - return resultobj;
73297 -fail:
73298 - return NULL;
73299 -}
73300 -
73301 -
73302 -SWIGINTERN PyObject *_wrap_VImage_equal__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73303 - PyObject *resultobj = 0;
73304 - vips::VImage *arg1 = (vips::VImage *) 0 ;
73305 - std::vector< double,std::allocator< double > > arg2 ;
73306 - void *argp1 = 0 ;
73307 - int res1 = 0 ;
73308 - PyObject * obj0 = 0 ;
73309 - PyObject * obj1 = 0 ;
73310 - vips::VImage result;
73311 -
73312 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_equal",&obj0,&obj1)) SWIG_fail;
73313 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
73314 - if (!SWIG_IsOK(res1)) {
73315 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_equal" "', argument " "1"" of type '" "vips::VImage *""'");
73316 - }
73317 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
73318 - {
73319 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
73320 - int res = swig::asptr(obj1, &ptr);
73321 - if (!SWIG_IsOK(res) || !ptr) {
73322 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_equal" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
73323 - }
73324 - arg2 = *ptr;
73325 - if (SWIG_IsNewObj(res)) delete ptr;
73326 - }
73327 - try {
73328 - result = (arg1)->equal(arg2);
73329 - }
73330 - catch(vips::VError &_e) {
73331 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
73332 - }
73333 -
73334 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
73335 - return resultobj;
73336 -fail:
73337 - return NULL;
73338 -}
73339 -
73340 -
73341 -SWIGINTERN PyObject *_wrap_VImage_equal__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73342 - PyObject *resultobj = 0;
73343 - vips::VImage *arg1 = (vips::VImage *) 0 ;
73344 - double arg2 ;
73345 - void *argp1 = 0 ;
73346 - int res1 = 0 ;
73347 - double val2 ;
73348 - int ecode2 = 0 ;
73349 - PyObject * obj0 = 0 ;
73350 - PyObject * obj1 = 0 ;
73351 - vips::VImage result;
73352 -
73353 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_equal",&obj0,&obj1)) SWIG_fail;
73354 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
73355 - if (!SWIG_IsOK(res1)) {
73356 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_equal" "', argument " "1"" of type '" "vips::VImage *""'");
73357 - }
73358 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
73359 - ecode2 = SWIG_AsVal_double(obj1, &val2);
73360 - if (!SWIG_IsOK(ecode2)) {
73361 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_equal" "', argument " "2"" of type '" "double""'");
73362 - }
73363 - arg2 = static_cast< double >(val2);
73364 - try {
73365 - result = (arg1)->equal(arg2);
73366 - }
73367 - catch(vips::VError &_e) {
73368 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
73369 - }
73370 -
73371 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
73372 - return resultobj;
73373 -fail:
73374 - return NULL;
73375 -}
73376 -
73377 -
73378 -SWIGINTERN PyObject *_wrap_VImage_equal(PyObject *self, PyObject *args) {
73379 - int argc;
73380 - PyObject *argv[3];
73381 - int ii;
73382 -
73383 - if (!PyTuple_Check(args)) SWIG_fail;
73384 - argc = args ? (int)PyObject_Length(args) : 0;
73385 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
73386 - argv[ii] = PyTuple_GET_ITEM(args,ii);
73387 - }
73388 - if (argc == 2) {
73389 - int _v;
73390 - void *vptr = 0;
73391 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
73392 - _v = SWIG_CheckState(res);
73393 - if (_v) {
73394 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
73395 - _v = SWIG_CheckState(res);
73396 - if (_v) {
73397 - return _wrap_VImage_equal__SWIG_0(self, args);
73398 - }
73399 - }
73400 - }
73401 - if (argc == 2) {
73402 - int _v;
73403 - void *vptr = 0;
73404 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
73405 - _v = SWIG_CheckState(res);
73406 - if (_v) {
73407 - {
73408 - int res = SWIG_AsVal_double(argv[1], NULL);
73409 - _v = SWIG_CheckState(res);
73410 - }
73411 - if (_v) {
73412 - return _wrap_VImage_equal__SWIG_2(self, args);
73413 - }
73414 - }
73415 - }
73416 - if (argc == 2) {
73417 - int _v;
73418 - void *vptr = 0;
73419 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
73420 - _v = SWIG_CheckState(res);
73421 - if (_v) {
73422 - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
73423 - _v = SWIG_CheckState(res);
73424 - if (_v) {
73425 - return _wrap_VImage_equal__SWIG_1(self, args);
73426 - }
73427 - }
73428 - }
73429 -
73430 -fail:
73431 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_equal'.\n"
73432 - " Possible C/C++ prototypes are:\n"
73433 - " vips::VImage::equal(vips::VImage)\n"
73434 - " vips::VImage::equal(std::vector< double,std::allocator< double > >)\n"
73435 - " vips::VImage::equal(double)\n");
73436 - return 0;
73437 -}
73438 -
73439 -
73440 -SWIGINTERN PyObject *_wrap_VImage_ifthenelse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73441 - PyObject *resultobj = 0;
73442 - vips::VImage *arg1 = (vips::VImage *) 0 ;
73443 - vips::VImage arg2 ;
73444 - vips::VImage arg3 ;
73445 - void *argp1 = 0 ;
73446 - int res1 = 0 ;
73447 - void *argp2 ;
73448 - int res2 = 0 ;
73449 - void *argp3 ;
73450 - int res3 = 0 ;
73451 - PyObject * obj0 = 0 ;
73452 - PyObject * obj1 = 0 ;
73453 - PyObject * obj2 = 0 ;
73454 - vips::VImage result;
73455 -
73456 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_ifthenelse",&obj0,&obj1,&obj2)) SWIG_fail;
73457 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
73458 - if (!SWIG_IsOK(res1)) {
73459 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_ifthenelse" "', argument " "1"" of type '" "vips::VImage *""'");
73460 - }
73461 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
73462 - {
73463 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
73464 - if (!SWIG_IsOK(res2)) {
73465 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_ifthenelse" "', argument " "2"" of type '" "vips::VImage""'");
73466 - }
73467 - if (!argp2) {
73468 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_ifthenelse" "', argument " "2"" of type '" "vips::VImage""'");
73469 - } else {
73470 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
73471 - arg2 = *temp;
73472 - if (SWIG_IsNewObj(res2)) delete temp;
73473 - }
73474 - }
73475 - {
73476 - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0);
73477 - if (!SWIG_IsOK(res3)) {
73478 - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_ifthenelse" "', argument " "3"" of type '" "vips::VImage""'");
73479 - }
73480 - if (!argp3) {
73481 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_ifthenelse" "', argument " "3"" of type '" "vips::VImage""'");
73482 - } else {
73483 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp3);
73484 - arg3 = *temp;
73485 - if (SWIG_IsNewObj(res3)) delete temp;
73486 - }
73487 - }
73488 - try {
73489 - result = (arg1)->ifthenelse(arg2,arg3);
73490 - }
73491 - catch(vips::VError &_e) {
73492 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
73493 - }
73494 -
73495 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
73496 - return resultobj;
73497 -fail:
73498 - return NULL;
73499 -}
73500 -
73501 -
73502 -SWIGINTERN PyObject *_wrap_VImage_less__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73503 - PyObject *resultobj = 0;
73504 - vips::VImage *arg1 = (vips::VImage *) 0 ;
73505 - vips::VImage arg2 ;
73506 - void *argp1 = 0 ;
73507 - int res1 = 0 ;
73508 - void *argp2 ;
73509 - int res2 = 0 ;
73510 - PyObject * obj0 = 0 ;
73511 - PyObject * obj1 = 0 ;
73512 - vips::VImage result;
73513 -
73514 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_less",&obj0,&obj1)) SWIG_fail;
73515 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
73516 - if (!SWIG_IsOK(res1)) {
73517 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_less" "', argument " "1"" of type '" "vips::VImage *""'");
73518 - }
73519 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
73520 - {
73521 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
73522 - if (!SWIG_IsOK(res2)) {
73523 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_less" "', argument " "2"" of type '" "vips::VImage""'");
73524 - }
73525 - if (!argp2) {
73526 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_less" "', argument " "2"" of type '" "vips::VImage""'");
73527 - } else {
73528 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
73529 - arg2 = *temp;
73530 - if (SWIG_IsNewObj(res2)) delete temp;
73531 - }
73532 - }
73533 - try {
73534 - result = (arg1)->less(arg2);
73535 - }
73536 - catch(vips::VError &_e) {
73537 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
73538 - }
73539 -
73540 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
73541 - return resultobj;
73542 -fail:
73543 - return NULL;
73544 -}
73545 -
73546 -
73547 -SWIGINTERN PyObject *_wrap_VImage_less__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73548 - PyObject *resultobj = 0;
73549 - vips::VImage *arg1 = (vips::VImage *) 0 ;
73550 - std::vector< double,std::allocator< double > > arg2 ;
73551 - void *argp1 = 0 ;
73552 - int res1 = 0 ;
73553 - PyObject * obj0 = 0 ;
73554 - PyObject * obj1 = 0 ;
73555 - vips::VImage result;
73556 -
73557 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_less",&obj0,&obj1)) SWIG_fail;
73558 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
73559 - if (!SWIG_IsOK(res1)) {
73560 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_less" "', argument " "1"" of type '" "vips::VImage *""'");
73561 - }
73562 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
73563 - {
73564 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
73565 - int res = swig::asptr(obj1, &ptr);
73566 - if (!SWIG_IsOK(res) || !ptr) {
73567 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_less" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
73568 - }
73569 - arg2 = *ptr;
73570 - if (SWIG_IsNewObj(res)) delete ptr;
73571 - }
73572 - try {
73573 - result = (arg1)->less(arg2);
73574 - }
73575 - catch(vips::VError &_e) {
73576 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
73577 - }
73578 -
73579 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
73580 - return resultobj;
73581 -fail:
73582 - return NULL;
73583 -}
73584 -
73585 -
73586 -SWIGINTERN PyObject *_wrap_VImage_less__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73587 - PyObject *resultobj = 0;
73588 - vips::VImage *arg1 = (vips::VImage *) 0 ;
73589 - double arg2 ;
73590 - void *argp1 = 0 ;
73591 - int res1 = 0 ;
73592 - double val2 ;
73593 - int ecode2 = 0 ;
73594 - PyObject * obj0 = 0 ;
73595 - PyObject * obj1 = 0 ;
73596 - vips::VImage result;
73597 -
73598 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_less",&obj0,&obj1)) SWIG_fail;
73599 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
73600 - if (!SWIG_IsOK(res1)) {
73601 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_less" "', argument " "1"" of type '" "vips::VImage *""'");
73602 - }
73603 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
73604 - ecode2 = SWIG_AsVal_double(obj1, &val2);
73605 - if (!SWIG_IsOK(ecode2)) {
73606 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_less" "', argument " "2"" of type '" "double""'");
73607 - }
73608 - arg2 = static_cast< double >(val2);
73609 - try {
73610 - result = (arg1)->less(arg2);
73611 - }
73612 - catch(vips::VError &_e) {
73613 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
73614 - }
73615 -
73616 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
73617 - return resultobj;
73618 -fail:
73619 - return NULL;
73620 -}
73621 -
73622 -
73623 -SWIGINTERN PyObject *_wrap_VImage_less(PyObject *self, PyObject *args) {
73624 - int argc;
73625 - PyObject *argv[3];
73626 - int ii;
73627 -
73628 - if (!PyTuple_Check(args)) SWIG_fail;
73629 - argc = args ? (int)PyObject_Length(args) : 0;
73630 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
73631 - argv[ii] = PyTuple_GET_ITEM(args,ii);
73632 - }
73633 - if (argc == 2) {
73634 - int _v;
73635 - void *vptr = 0;
73636 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
73637 - _v = SWIG_CheckState(res);
73638 - if (_v) {
73639 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
73640 - _v = SWIG_CheckState(res);
73641 - if (_v) {
73642 - return _wrap_VImage_less__SWIG_0(self, args);
73643 - }
73644 - }
73645 - }
73646 - if (argc == 2) {
73647 - int _v;
73648 - void *vptr = 0;
73649 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
73650 - _v = SWIG_CheckState(res);
73651 - if (_v) {
73652 - {
73653 - int res = SWIG_AsVal_double(argv[1], NULL);
73654 - _v = SWIG_CheckState(res);
73655 - }
73656 - if (_v) {
73657 - return _wrap_VImage_less__SWIG_2(self, args);
73658 - }
73659 - }
73660 - }
73661 - if (argc == 2) {
73662 - int _v;
73663 - void *vptr = 0;
73664 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
73665 - _v = SWIG_CheckState(res);
73666 - if (_v) {
73667 - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
73668 - _v = SWIG_CheckState(res);
73669 - if (_v) {
73670 - return _wrap_VImage_less__SWIG_1(self, args);
73671 - }
73672 - }
73673 - }
73674 -
73675 -fail:
73676 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_less'.\n"
73677 - " Possible C/C++ prototypes are:\n"
73678 - " vips::VImage::less(vips::VImage)\n"
73679 - " vips::VImage::less(std::vector< double,std::allocator< double > >)\n"
73680 - " vips::VImage::less(double)\n");
73681 - return 0;
73682 -}
73683 -
73684 -
73685 -SWIGINTERN PyObject *_wrap_VImage_lesseq__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73686 - PyObject *resultobj = 0;
73687 - vips::VImage *arg1 = (vips::VImage *) 0 ;
73688 - vips::VImage arg2 ;
73689 - void *argp1 = 0 ;
73690 - int res1 = 0 ;
73691 - void *argp2 ;
73692 - int res2 = 0 ;
73693 - PyObject * obj0 = 0 ;
73694 - PyObject * obj1 = 0 ;
73695 - vips::VImage result;
73696 -
73697 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_lesseq",&obj0,&obj1)) SWIG_fail;
73698 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
73699 - if (!SWIG_IsOK(res1)) {
73700 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lesseq" "', argument " "1"" of type '" "vips::VImage *""'");
73701 - }
73702 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
73703 - {
73704 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
73705 - if (!SWIG_IsOK(res2)) {
73706 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lesseq" "', argument " "2"" of type '" "vips::VImage""'");
73707 - }
73708 - if (!argp2) {
73709 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lesseq" "', argument " "2"" of type '" "vips::VImage""'");
73710 - } else {
73711 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
73712 - arg2 = *temp;
73713 - if (SWIG_IsNewObj(res2)) delete temp;
73714 - }
73715 - }
73716 - try {
73717 - result = (arg1)->lesseq(arg2);
73718 - }
73719 - catch(vips::VError &_e) {
73720 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
73721 - }
73722 -
73723 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
73724 - return resultobj;
73725 -fail:
73726 - return NULL;
73727 -}
73728 -
73729 -
73730 -SWIGINTERN PyObject *_wrap_VImage_lesseq__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73731 - PyObject *resultobj = 0;
73732 - vips::VImage *arg1 = (vips::VImage *) 0 ;
73733 - std::vector< double,std::allocator< double > > arg2 ;
73734 - void *argp1 = 0 ;
73735 - int res1 = 0 ;
73736 - PyObject * obj0 = 0 ;
73737 - PyObject * obj1 = 0 ;
73738 - vips::VImage result;
73739 -
73740 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_lesseq",&obj0,&obj1)) SWIG_fail;
73741 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
73742 - if (!SWIG_IsOK(res1)) {
73743 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lesseq" "', argument " "1"" of type '" "vips::VImage *""'");
73744 - }
73745 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
73746 - {
73747 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
73748 - int res = swig::asptr(obj1, &ptr);
73749 - if (!SWIG_IsOK(res) || !ptr) {
73750 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_lesseq" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
73751 - }
73752 - arg2 = *ptr;
73753 - if (SWIG_IsNewObj(res)) delete ptr;
73754 - }
73755 - try {
73756 - result = (arg1)->lesseq(arg2);
73757 - }
73758 - catch(vips::VError &_e) {
73759 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
73760 - }
73761 -
73762 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
73763 - return resultobj;
73764 -fail:
73765 - return NULL;
73766 -}
73767 -
73768 -
73769 -SWIGINTERN PyObject *_wrap_VImage_lesseq__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73770 - PyObject *resultobj = 0;
73771 - vips::VImage *arg1 = (vips::VImage *) 0 ;
73772 - double arg2 ;
73773 - void *argp1 = 0 ;
73774 - int res1 = 0 ;
73775 - double val2 ;
73776 - int ecode2 = 0 ;
73777 - PyObject * obj0 = 0 ;
73778 - PyObject * obj1 = 0 ;
73779 - vips::VImage result;
73780 -
73781 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_lesseq",&obj0,&obj1)) SWIG_fail;
73782 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
73783 - if (!SWIG_IsOK(res1)) {
73784 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lesseq" "', argument " "1"" of type '" "vips::VImage *""'");
73785 - }
73786 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
73787 - ecode2 = SWIG_AsVal_double(obj1, &val2);
73788 - if (!SWIG_IsOK(ecode2)) {
73789 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_lesseq" "', argument " "2"" of type '" "double""'");
73790 - }
73791 - arg2 = static_cast< double >(val2);
73792 - try {
73793 - result = (arg1)->lesseq(arg2);
73794 - }
73795 - catch(vips::VError &_e) {
73796 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
73797 - }
73798 -
73799 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
73800 - return resultobj;
73801 -fail:
73802 - return NULL;
73803 -}
73804 -
73805 -
73806 -SWIGINTERN PyObject *_wrap_VImage_lesseq(PyObject *self, PyObject *args) {
73807 - int argc;
73808 - PyObject *argv[3];
73809 - int ii;
73810 -
73811 - if (!PyTuple_Check(args)) SWIG_fail;
73812 - argc = args ? (int)PyObject_Length(args) : 0;
73813 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
73814 - argv[ii] = PyTuple_GET_ITEM(args,ii);
73815 - }
73816 - if (argc == 2) {
73817 - int _v;
73818 - void *vptr = 0;
73819 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
73820 - _v = SWIG_CheckState(res);
73821 - if (_v) {
73822 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
73823 - _v = SWIG_CheckState(res);
73824 - if (_v) {
73825 - return _wrap_VImage_lesseq__SWIG_0(self, args);
73826 - }
73827 - }
73828 - }
73829 - if (argc == 2) {
73830 - int _v;
73831 - void *vptr = 0;
73832 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
73833 - _v = SWIG_CheckState(res);
73834 - if (_v) {
73835 - {
73836 - int res = SWIG_AsVal_double(argv[1], NULL);
73837 - _v = SWIG_CheckState(res);
73838 - }
73839 - if (_v) {
73840 - return _wrap_VImage_lesseq__SWIG_2(self, args);
73841 - }
73842 - }
73843 - }
73844 - if (argc == 2) {
73845 - int _v;
73846 - void *vptr = 0;
73847 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
73848 - _v = SWIG_CheckState(res);
73849 - if (_v) {
73850 - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
73851 - _v = SWIG_CheckState(res);
73852 - if (_v) {
73853 - return _wrap_VImage_lesseq__SWIG_1(self, args);
73854 - }
73855 - }
73856 - }
73857 -
73858 -fail:
73859 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_lesseq'.\n"
73860 - " Possible C/C++ prototypes are:\n"
73861 - " vips::VImage::lesseq(vips::VImage)\n"
73862 - " vips::VImage::lesseq(std::vector< double,std::allocator< double > >)\n"
73863 - " vips::VImage::lesseq(double)\n");
73864 - return 0;
73865 -}
73866 -
73867 -
73868 -SWIGINTERN PyObject *_wrap_VImage_more__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73869 - PyObject *resultobj = 0;
73870 - vips::VImage *arg1 = (vips::VImage *) 0 ;
73871 - vips::VImage arg2 ;
73872 - void *argp1 = 0 ;
73873 - int res1 = 0 ;
73874 - void *argp2 ;
73875 - int res2 = 0 ;
73876 - PyObject * obj0 = 0 ;
73877 - PyObject * obj1 = 0 ;
73878 - vips::VImage result;
73879 -
73880 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_more",&obj0,&obj1)) SWIG_fail;
73881 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
73882 - if (!SWIG_IsOK(res1)) {
73883 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_more" "', argument " "1"" of type '" "vips::VImage *""'");
73884 - }
73885 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
73886 - {
73887 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
73888 - if (!SWIG_IsOK(res2)) {
73889 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_more" "', argument " "2"" of type '" "vips::VImage""'");
73890 - }
73891 - if (!argp2) {
73892 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_more" "', argument " "2"" of type '" "vips::VImage""'");
73893 - } else {
73894 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
73895 - arg2 = *temp;
73896 - if (SWIG_IsNewObj(res2)) delete temp;
73897 - }
73898 - }
73899 - try {
73900 - result = (arg1)->more(arg2);
73901 - }
73902 - catch(vips::VError &_e) {
73903 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
73904 - }
73905 -
73906 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
73907 - return resultobj;
73908 -fail:
73909 - return NULL;
73910 -}
73911 -
73912 -
73913 -SWIGINTERN PyObject *_wrap_VImage_more__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73914 - PyObject *resultobj = 0;
73915 - vips::VImage *arg1 = (vips::VImage *) 0 ;
73916 - std::vector< double,std::allocator< double > > arg2 ;
73917 - void *argp1 = 0 ;
73918 - int res1 = 0 ;
73919 - PyObject * obj0 = 0 ;
73920 - PyObject * obj1 = 0 ;
73921 - vips::VImage result;
73922 -
73923 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_more",&obj0,&obj1)) SWIG_fail;
73924 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
73925 - if (!SWIG_IsOK(res1)) {
73926 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_more" "', argument " "1"" of type '" "vips::VImage *""'");
73927 - }
73928 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
73929 - {
73930 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
73931 - int res = swig::asptr(obj1, &ptr);
73932 - if (!SWIG_IsOK(res) || !ptr) {
73933 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_more" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
73934 - }
73935 - arg2 = *ptr;
73936 - if (SWIG_IsNewObj(res)) delete ptr;
73937 - }
73938 - try {
73939 - result = (arg1)->more(arg2);
73940 - }
73941 - catch(vips::VError &_e) {
73942 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
73943 - }
73944 -
73945 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
73946 - return resultobj;
73947 -fail:
73948 - return NULL;
73949 -}
73950 -
73951 -
73952 -SWIGINTERN PyObject *_wrap_VImage_more__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73953 - PyObject *resultobj = 0;
73954 - vips::VImage *arg1 = (vips::VImage *) 0 ;
73955 - double arg2 ;
73956 - void *argp1 = 0 ;
73957 - int res1 = 0 ;
73958 - double val2 ;
73959 - int ecode2 = 0 ;
73960 - PyObject * obj0 = 0 ;
73961 - PyObject * obj1 = 0 ;
73962 - vips::VImage result;
73963 -
73964 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_more",&obj0,&obj1)) SWIG_fail;
73965 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
73966 - if (!SWIG_IsOK(res1)) {
73967 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_more" "', argument " "1"" of type '" "vips::VImage *""'");
73968 - }
73969 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
73970 - ecode2 = SWIG_AsVal_double(obj1, &val2);
73971 - if (!SWIG_IsOK(ecode2)) {
73972 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_more" "', argument " "2"" of type '" "double""'");
73973 - }
73974 - arg2 = static_cast< double >(val2);
73975 - try {
73976 - result = (arg1)->more(arg2);
73977 - }
73978 - catch(vips::VError &_e) {
73979 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
73980 - }
73981 -
73982 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
73983 - return resultobj;
73984 -fail:
73985 - return NULL;
73986 -}
73987 -
73988 -
73989 -SWIGINTERN PyObject *_wrap_VImage_more(PyObject *self, PyObject *args) {
73990 - int argc;
73991 - PyObject *argv[3];
73992 - int ii;
73993 -
73994 - if (!PyTuple_Check(args)) SWIG_fail;
73995 - argc = args ? (int)PyObject_Length(args) : 0;
73996 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
73997 - argv[ii] = PyTuple_GET_ITEM(args,ii);
73998 - }
73999 - if (argc == 2) {
74000 - int _v;
74001 - void *vptr = 0;
74002 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
74003 - _v = SWIG_CheckState(res);
74004 - if (_v) {
74005 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
74006 - _v = SWIG_CheckState(res);
74007 - if (_v) {
74008 - return _wrap_VImage_more__SWIG_0(self, args);
74009 - }
74010 - }
74011 - }
74012 - if (argc == 2) {
74013 - int _v;
74014 - void *vptr = 0;
74015 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
74016 - _v = SWIG_CheckState(res);
74017 - if (_v) {
74018 - {
74019 - int res = SWIG_AsVal_double(argv[1], NULL);
74020 - _v = SWIG_CheckState(res);
74021 - }
74022 - if (_v) {
74023 - return _wrap_VImage_more__SWIG_2(self, args);
74024 - }
74025 - }
74026 - }
74027 - if (argc == 2) {
74028 - int _v;
74029 - void *vptr = 0;
74030 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
74031 - _v = SWIG_CheckState(res);
74032 - if (_v) {
74033 - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
74034 - _v = SWIG_CheckState(res);
74035 - if (_v) {
74036 - return _wrap_VImage_more__SWIG_1(self, args);
74037 - }
74038 - }
74039 - }
74040 -
74041 -fail:
74042 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_more'.\n"
74043 - " Possible C/C++ prototypes are:\n"
74044 - " vips::VImage::more(vips::VImage)\n"
74045 - " vips::VImage::more(std::vector< double,std::allocator< double > >)\n"
74046 - " vips::VImage::more(double)\n");
74047 - return 0;
74048 -}
74049 -
74050 -
74051 -SWIGINTERN PyObject *_wrap_VImage_moreeq__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74052 - PyObject *resultobj = 0;
74053 - vips::VImage *arg1 = (vips::VImage *) 0 ;
74054 - vips::VImage arg2 ;
74055 - void *argp1 = 0 ;
74056 - int res1 = 0 ;
74057 - void *argp2 ;
74058 - int res2 = 0 ;
74059 - PyObject * obj0 = 0 ;
74060 - PyObject * obj1 = 0 ;
74061 - vips::VImage result;
74062 -
74063 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_moreeq",&obj0,&obj1)) SWIG_fail;
74064 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
74065 - if (!SWIG_IsOK(res1)) {
74066 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_moreeq" "', argument " "1"" of type '" "vips::VImage *""'");
74067 - }
74068 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
74069 - {
74070 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
74071 - if (!SWIG_IsOK(res2)) {
74072 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_moreeq" "', argument " "2"" of type '" "vips::VImage""'");
74073 - }
74074 - if (!argp2) {
74075 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_moreeq" "', argument " "2"" of type '" "vips::VImage""'");
74076 - } else {
74077 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
74078 - arg2 = *temp;
74079 - if (SWIG_IsNewObj(res2)) delete temp;
74080 - }
74081 - }
74082 - try {
74083 - result = (arg1)->moreeq(arg2);
74084 - }
74085 - catch(vips::VError &_e) {
74086 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74087 - }
74088 -
74089 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
74090 - return resultobj;
74091 -fail:
74092 - return NULL;
74093 -}
74094 -
74095 -
74096 -SWIGINTERN PyObject *_wrap_VImage_moreeq__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74097 - PyObject *resultobj = 0;
74098 - vips::VImage *arg1 = (vips::VImage *) 0 ;
74099 - std::vector< double,std::allocator< double > > arg2 ;
74100 - void *argp1 = 0 ;
74101 - int res1 = 0 ;
74102 - PyObject * obj0 = 0 ;
74103 - PyObject * obj1 = 0 ;
74104 - vips::VImage result;
74105 -
74106 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_moreeq",&obj0,&obj1)) SWIG_fail;
74107 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
74108 - if (!SWIG_IsOK(res1)) {
74109 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_moreeq" "', argument " "1"" of type '" "vips::VImage *""'");
74110 - }
74111 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
74112 - {
74113 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
74114 - int res = swig::asptr(obj1, &ptr);
74115 - if (!SWIG_IsOK(res) || !ptr) {
74116 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_moreeq" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
74117 - }
74118 - arg2 = *ptr;
74119 - if (SWIG_IsNewObj(res)) delete ptr;
74120 - }
74121 - try {
74122 - result = (arg1)->moreeq(arg2);
74123 - }
74124 - catch(vips::VError &_e) {
74125 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74126 - }
74127 -
74128 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
74129 - return resultobj;
74130 -fail:
74131 - return NULL;
74132 -}
74133 -
74134 -
74135 -SWIGINTERN PyObject *_wrap_VImage_moreeq__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74136 - PyObject *resultobj = 0;
74137 - vips::VImage *arg1 = (vips::VImage *) 0 ;
74138 - double arg2 ;
74139 - void *argp1 = 0 ;
74140 - int res1 = 0 ;
74141 - double val2 ;
74142 - int ecode2 = 0 ;
74143 - PyObject * obj0 = 0 ;
74144 - PyObject * obj1 = 0 ;
74145 - vips::VImage result;
74146 -
74147 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_moreeq",&obj0,&obj1)) SWIG_fail;
74148 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
74149 - if (!SWIG_IsOK(res1)) {
74150 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_moreeq" "', argument " "1"" of type '" "vips::VImage *""'");
74151 - }
74152 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
74153 - ecode2 = SWIG_AsVal_double(obj1, &val2);
74154 - if (!SWIG_IsOK(ecode2)) {
74155 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_moreeq" "', argument " "2"" of type '" "double""'");
74156 - }
74157 - arg2 = static_cast< double >(val2);
74158 - try {
74159 - result = (arg1)->moreeq(arg2);
74160 - }
74161 - catch(vips::VError &_e) {
74162 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74163 - }
74164 -
74165 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
74166 - return resultobj;
74167 -fail:
74168 - return NULL;
74169 -}
74170 -
74171 -
74172 -SWIGINTERN PyObject *_wrap_VImage_moreeq(PyObject *self, PyObject *args) {
74173 - int argc;
74174 - PyObject *argv[3];
74175 - int ii;
74176 -
74177 - if (!PyTuple_Check(args)) SWIG_fail;
74178 - argc = args ? (int)PyObject_Length(args) : 0;
74179 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
74180 - argv[ii] = PyTuple_GET_ITEM(args,ii);
74181 - }
74182 - if (argc == 2) {
74183 - int _v;
74184 - void *vptr = 0;
74185 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
74186 - _v = SWIG_CheckState(res);
74187 - if (_v) {
74188 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
74189 - _v = SWIG_CheckState(res);
74190 - if (_v) {
74191 - return _wrap_VImage_moreeq__SWIG_0(self, args);
74192 - }
74193 - }
74194 - }
74195 - if (argc == 2) {
74196 - int _v;
74197 - void *vptr = 0;
74198 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
74199 - _v = SWIG_CheckState(res);
74200 - if (_v) {
74201 - {
74202 - int res = SWIG_AsVal_double(argv[1], NULL);
74203 - _v = SWIG_CheckState(res);
74204 - }
74205 - if (_v) {
74206 - return _wrap_VImage_moreeq__SWIG_2(self, args);
74207 - }
74208 - }
74209 - }
74210 - if (argc == 2) {
74211 - int _v;
74212 - void *vptr = 0;
74213 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
74214 - _v = SWIG_CheckState(res);
74215 - if (_v) {
74216 - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
74217 - _v = SWIG_CheckState(res);
74218 - if (_v) {
74219 - return _wrap_VImage_moreeq__SWIG_1(self, args);
74220 - }
74221 - }
74222 - }
74223 -
74224 -fail:
74225 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_moreeq'.\n"
74226 - " Possible C/C++ prototypes are:\n"
74227 - " vips::VImage::moreeq(vips::VImage)\n"
74228 - " vips::VImage::moreeq(std::vector< double,std::allocator< double > >)\n"
74229 - " vips::VImage::moreeq(double)\n");
74230 - return 0;
74231 -}
74232 -
74233 -
74234 -SWIGINTERN PyObject *_wrap_VImage_notequal__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74235 - PyObject *resultobj = 0;
74236 - vips::VImage *arg1 = (vips::VImage *) 0 ;
74237 - vips::VImage arg2 ;
74238 - void *argp1 = 0 ;
74239 - int res1 = 0 ;
74240 - void *argp2 ;
74241 - int res2 = 0 ;
74242 - PyObject * obj0 = 0 ;
74243 - PyObject * obj1 = 0 ;
74244 - vips::VImage result;
74245 -
74246 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_notequal",&obj0,&obj1)) SWIG_fail;
74247 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
74248 - if (!SWIG_IsOK(res1)) {
74249 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_notequal" "', argument " "1"" of type '" "vips::VImage *""'");
74250 - }
74251 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
74252 - {
74253 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
74254 - if (!SWIG_IsOK(res2)) {
74255 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_notequal" "', argument " "2"" of type '" "vips::VImage""'");
74256 - }
74257 - if (!argp2) {
74258 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_notequal" "', argument " "2"" of type '" "vips::VImage""'");
74259 - } else {
74260 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
74261 - arg2 = *temp;
74262 - if (SWIG_IsNewObj(res2)) delete temp;
74263 - }
74264 - }
74265 - try {
74266 - result = (arg1)->notequal(arg2);
74267 - }
74268 - catch(vips::VError &_e) {
74269 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74270 - }
74271 -
74272 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
74273 - return resultobj;
74274 -fail:
74275 - return NULL;
74276 -}
74277 -
74278 -
74279 -SWIGINTERN PyObject *_wrap_VImage_notequal__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74280 - PyObject *resultobj = 0;
74281 - vips::VImage *arg1 = (vips::VImage *) 0 ;
74282 - std::vector< double,std::allocator< double > > arg2 ;
74283 - void *argp1 = 0 ;
74284 - int res1 = 0 ;
74285 - PyObject * obj0 = 0 ;
74286 - PyObject * obj1 = 0 ;
74287 - vips::VImage result;
74288 -
74289 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_notequal",&obj0,&obj1)) SWIG_fail;
74290 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
74291 - if (!SWIG_IsOK(res1)) {
74292 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_notequal" "', argument " "1"" of type '" "vips::VImage *""'");
74293 - }
74294 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
74295 - {
74296 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
74297 - int res = swig::asptr(obj1, &ptr);
74298 - if (!SWIG_IsOK(res) || !ptr) {
74299 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_notequal" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
74300 - }
74301 - arg2 = *ptr;
74302 - if (SWIG_IsNewObj(res)) delete ptr;
74303 - }
74304 - try {
74305 - result = (arg1)->notequal(arg2);
74306 - }
74307 - catch(vips::VError &_e) {
74308 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74309 - }
74310 -
74311 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
74312 - return resultobj;
74313 -fail:
74314 - return NULL;
74315 -}
74316 -
74317 -
74318 -SWIGINTERN PyObject *_wrap_VImage_notequal__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74319 - PyObject *resultobj = 0;
74320 - vips::VImage *arg1 = (vips::VImage *) 0 ;
74321 - double arg2 ;
74322 - void *argp1 = 0 ;
74323 - int res1 = 0 ;
74324 - double val2 ;
74325 - int ecode2 = 0 ;
74326 - PyObject * obj0 = 0 ;
74327 - PyObject * obj1 = 0 ;
74328 - vips::VImage result;
74329 -
74330 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_notequal",&obj0,&obj1)) SWIG_fail;
74331 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
74332 - if (!SWIG_IsOK(res1)) {
74333 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_notequal" "', argument " "1"" of type '" "vips::VImage *""'");
74334 - }
74335 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
74336 - ecode2 = SWIG_AsVal_double(obj1, &val2);
74337 - if (!SWIG_IsOK(ecode2)) {
74338 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_notequal" "', argument " "2"" of type '" "double""'");
74339 - }
74340 - arg2 = static_cast< double >(val2);
74341 - try {
74342 - result = (arg1)->notequal(arg2);
74343 - }
74344 - catch(vips::VError &_e) {
74345 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74346 - }
74347 -
74348 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
74349 - return resultobj;
74350 -fail:
74351 - return NULL;
74352 -}
74353 -
74354 -
74355 -SWIGINTERN PyObject *_wrap_VImage_notequal(PyObject *self, PyObject *args) {
74356 - int argc;
74357 - PyObject *argv[3];
74358 - int ii;
74359 -
74360 - if (!PyTuple_Check(args)) SWIG_fail;
74361 - argc = args ? (int)PyObject_Length(args) : 0;
74362 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
74363 - argv[ii] = PyTuple_GET_ITEM(args,ii);
74364 - }
74365 - if (argc == 2) {
74366 - int _v;
74367 - void *vptr = 0;
74368 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
74369 - _v = SWIG_CheckState(res);
74370 - if (_v) {
74371 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
74372 - _v = SWIG_CheckState(res);
74373 - if (_v) {
74374 - return _wrap_VImage_notequal__SWIG_0(self, args);
74375 - }
74376 - }
74377 - }
74378 - if (argc == 2) {
74379 - int _v;
74380 - void *vptr = 0;
74381 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
74382 - _v = SWIG_CheckState(res);
74383 - if (_v) {
74384 - {
74385 - int res = SWIG_AsVal_double(argv[1], NULL);
74386 - _v = SWIG_CheckState(res);
74387 - }
74388 - if (_v) {
74389 - return _wrap_VImage_notequal__SWIG_2(self, args);
74390 - }
74391 - }
74392 - }
74393 - if (argc == 2) {
74394 - int _v;
74395 - void *vptr = 0;
74396 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
74397 - _v = SWIG_CheckState(res);
74398 - if (_v) {
74399 - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
74400 - _v = SWIG_CheckState(res);
74401 - if (_v) {
74402 - return _wrap_VImage_notequal__SWIG_1(self, args);
74403 - }
74404 - }
74405 - }
74406 -
74407 -fail:
74408 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_notequal'.\n"
74409 - " Possible C/C++ prototypes are:\n"
74410 - " vips::VImage::notequal(vips::VImage)\n"
74411 - " vips::VImage::notequal(std::vector< double,std::allocator< double > >)\n"
74412 - " vips::VImage::notequal(double)\n");
74413 - return 0;
74414 -}
74415 -
74416 -
74417 -SWIGINTERN PyObject *_wrap_VImage_quadratic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74418 - PyObject *resultobj = 0;
74419 - vips::VImage *arg1 = (vips::VImage *) 0 ;
74420 - vips::VImage arg2 ;
74421 - void *argp1 = 0 ;
74422 - int res1 = 0 ;
74423 - void *argp2 ;
74424 - int res2 = 0 ;
74425 - PyObject * obj0 = 0 ;
74426 - PyObject * obj1 = 0 ;
74427 - vips::VImage result;
74428 -
74429 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_quadratic",&obj0,&obj1)) SWIG_fail;
74430 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
74431 - if (!SWIG_IsOK(res1)) {
74432 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_quadratic" "', argument " "1"" of type '" "vips::VImage *""'");
74433 - }
74434 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
74435 - {
74436 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
74437 - if (!SWIG_IsOK(res2)) {
74438 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_quadratic" "', argument " "2"" of type '" "vips::VImage""'");
74439 - }
74440 - if (!argp2) {
74441 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_quadratic" "', argument " "2"" of type '" "vips::VImage""'");
74442 - } else {
74443 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
74444 - arg2 = *temp;
74445 - if (SWIG_IsNewObj(res2)) delete temp;
74446 - }
74447 - }
74448 - try {
74449 - result = (arg1)->quadratic(arg2);
74450 - }
74451 - catch(vips::VError &_e) {
74452 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74453 - }
74454 -
74455 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
74456 - return resultobj;
74457 -fail:
74458 - return NULL;
74459 -}
74460 -
74461 -
74462 -SWIGINTERN PyObject *_wrap_VImage_csv2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74463 - PyObject *resultobj = 0;
74464 - char *arg1 = (char *) 0 ;
74465 - int res1 ;
74466 - char *buf1 = 0 ;
74467 - int alloc1 = 0 ;
74468 - PyObject * obj0 = 0 ;
74469 - vips::VImage result;
74470 -
74471 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_csv2vips",&obj0)) SWIG_fail;
74472 - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
74473 - if (!SWIG_IsOK(res1)) {
74474 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_csv2vips" "', argument " "1"" of type '" "char *""'");
74475 - }
74476 - arg1 = reinterpret_cast< char * >(buf1);
74477 - try {
74478 - result = vips::VImage::csv2vips(arg1);
74479 - }
74480 - catch(vips::VError &_e) {
74481 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74482 - }
74483 -
74484 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
74485 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
74486 - return resultobj;
74487 -fail:
74488 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
74489 - return NULL;
74490 -}
74491 -
74492 -
74493 -SWIGINTERN PyObject *_wrap_VImage_fits2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74494 - PyObject *resultobj = 0;
74495 - char *arg1 = (char *) 0 ;
74496 - int res1 ;
74497 - char *buf1 = 0 ;
74498 - int alloc1 = 0 ;
74499 - PyObject * obj0 = 0 ;
74500 - vips::VImage result;
74501 -
74502 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_fits2vips",&obj0)) SWIG_fail;
74503 - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
74504 - if (!SWIG_IsOK(res1)) {
74505 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_fits2vips" "', argument " "1"" of type '" "char *""'");
74506 - }
74507 - arg1 = reinterpret_cast< char * >(buf1);
74508 - try {
74509 - result = vips::VImage::fits2vips(arg1);
74510 - }
74511 - catch(vips::VError &_e) {
74512 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74513 - }
74514 -
74515 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
74516 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
74517 - return resultobj;
74518 -fail:
74519 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
74520 - return NULL;
74521 -}
74522 -
74523 -
74524 -SWIGINTERN PyObject *_wrap_VImage_jpeg2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74525 - PyObject *resultobj = 0;
74526 - char *arg1 = (char *) 0 ;
74527 - int res1 ;
74528 - char *buf1 = 0 ;
74529 - int alloc1 = 0 ;
74530 - PyObject * obj0 = 0 ;
74531 - vips::VImage result;
74532 -
74533 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_jpeg2vips",&obj0)) SWIG_fail;
74534 - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
74535 - if (!SWIG_IsOK(res1)) {
74536 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_jpeg2vips" "', argument " "1"" of type '" "char *""'");
74537 - }
74538 - arg1 = reinterpret_cast< char * >(buf1);
74539 - try {
74540 - result = vips::VImage::jpeg2vips(arg1);
74541 - }
74542 - catch(vips::VError &_e) {
74543 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74544 - }
74545 -
74546 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
74547 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
74548 - return resultobj;
74549 -fail:
74550 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
74551 - return NULL;
74552 -}
74553 -
74554 -
74555 -SWIGINTERN PyObject *_wrap_VImage_magick2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74556 - PyObject *resultobj = 0;
74557 - char *arg1 = (char *) 0 ;
74558 - int res1 ;
74559 - char *buf1 = 0 ;
74560 - int alloc1 = 0 ;
74561 - PyObject * obj0 = 0 ;
74562 - vips::VImage result;
74563 -
74564 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_magick2vips",&obj0)) SWIG_fail;
74565 - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
74566 - if (!SWIG_IsOK(res1)) {
74567 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_magick2vips" "', argument " "1"" of type '" "char *""'");
74568 - }
74569 - arg1 = reinterpret_cast< char * >(buf1);
74570 - try {
74571 - result = vips::VImage::magick2vips(arg1);
74572 - }
74573 - catch(vips::VError &_e) {
74574 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74575 - }
74576 -
74577 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
74578 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
74579 - return resultobj;
74580 -fail:
74581 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
74582 - return NULL;
74583 -}
74584 -
74585 -
74586 -SWIGINTERN PyObject *_wrap_VImage_png2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74587 - PyObject *resultobj = 0;
74588 - char *arg1 = (char *) 0 ;
74589 - int res1 ;
74590 - char *buf1 = 0 ;
74591 - int alloc1 = 0 ;
74592 - PyObject * obj0 = 0 ;
74593 - vips::VImage result;
74594 -
74595 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_png2vips",&obj0)) SWIG_fail;
74596 - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
74597 - if (!SWIG_IsOK(res1)) {
74598 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_png2vips" "', argument " "1"" of type '" "char *""'");
74599 - }
74600 - arg1 = reinterpret_cast< char * >(buf1);
74601 - try {
74602 - result = vips::VImage::png2vips(arg1);
74603 - }
74604 - catch(vips::VError &_e) {
74605 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74606 - }
74607 -
74608 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
74609 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
74610 - return resultobj;
74611 -fail:
74612 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
74613 - return NULL;
74614 -}
74615 -
74616 -
74617 -SWIGINTERN PyObject *_wrap_VImage_exr2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74618 - PyObject *resultobj = 0;
74619 - char *arg1 = (char *) 0 ;
74620 - int res1 ;
74621 - char *buf1 = 0 ;
74622 - int alloc1 = 0 ;
74623 - PyObject * obj0 = 0 ;
74624 - vips::VImage result;
74625 -
74626 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_exr2vips",&obj0)) SWIG_fail;
74627 - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
74628 - if (!SWIG_IsOK(res1)) {
74629 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_exr2vips" "', argument " "1"" of type '" "char *""'");
74630 - }
74631 - arg1 = reinterpret_cast< char * >(buf1);
74632 - try {
74633 - result = vips::VImage::exr2vips(arg1);
74634 - }
74635 - catch(vips::VError &_e) {
74636 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74637 - }
74638 -
74639 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
74640 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
74641 - return resultobj;
74642 -fail:
74643 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
74644 - return NULL;
74645 -}
74646 -
74647 -
74648 -SWIGINTERN PyObject *_wrap_VImage_ppm2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74649 - PyObject *resultobj = 0;
74650 - char *arg1 = (char *) 0 ;
74651 - int res1 ;
74652 - char *buf1 = 0 ;
74653 - int alloc1 = 0 ;
74654 - PyObject * obj0 = 0 ;
74655 - vips::VImage result;
74656 -
74657 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_ppm2vips",&obj0)) SWIG_fail;
74658 - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
74659 - if (!SWIG_IsOK(res1)) {
74660 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_ppm2vips" "', argument " "1"" of type '" "char *""'");
74661 - }
74662 - arg1 = reinterpret_cast< char * >(buf1);
74663 - try {
74664 - result = vips::VImage::ppm2vips(arg1);
74665 - }
74666 - catch(vips::VError &_e) {
74667 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74668 - }
74669 -
74670 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
74671 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
74672 - return resultobj;
74673 -fail:
74674 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
74675 - return NULL;
74676 -}
74677 -
74678 -
74679 -SWIGINTERN PyObject *_wrap_VImage_analyze2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74680 - PyObject *resultobj = 0;
74681 - char *arg1 = (char *) 0 ;
74682 - int res1 ;
74683 - char *buf1 = 0 ;
74684 - int alloc1 = 0 ;
74685 - PyObject * obj0 = 0 ;
74686 - vips::VImage result;
74687 -
74688 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_analyze2vips",&obj0)) SWIG_fail;
74689 - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
74690 - if (!SWIG_IsOK(res1)) {
74691 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_analyze2vips" "', argument " "1"" of type '" "char *""'");
74692 - }
74693 - arg1 = reinterpret_cast< char * >(buf1);
74694 - try {
74695 - result = vips::VImage::analyze2vips(arg1);
74696 - }
74697 - catch(vips::VError &_e) {
74698 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74699 - }
74700 -
74701 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
74702 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
74703 - return resultobj;
74704 -fail:
74705 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
74706 - return NULL;
74707 -}
74708 -
74709 -
74710 -SWIGINTERN PyObject *_wrap_VImage_tiff2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74711 - PyObject *resultobj = 0;
74712 - char *arg1 = (char *) 0 ;
74713 - int res1 ;
74714 - char *buf1 = 0 ;
74715 - int alloc1 = 0 ;
74716 - PyObject * obj0 = 0 ;
74717 - vips::VImage result;
74718 -
74719 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_tiff2vips",&obj0)) SWIG_fail;
74720 - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
74721 - if (!SWIG_IsOK(res1)) {
74722 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tiff2vips" "', argument " "1"" of type '" "char *""'");
74723 - }
74724 - arg1 = reinterpret_cast< char * >(buf1);
74725 - try {
74726 - result = vips::VImage::tiff2vips(arg1);
74727 - }
74728 - catch(vips::VError &_e) {
74729 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74730 - }
74731 -
74732 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
74733 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
74734 - return resultobj;
74735 -fail:
74736 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
74737 - return NULL;
74738 -}
74739 -
74740 -
74741 -SWIGINTERN PyObject *_wrap_VImage_vips2csv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74742 - PyObject *resultobj = 0;
74743 - vips::VImage *arg1 = (vips::VImage *) 0 ;
74744 - char *arg2 = (char *) 0 ;
74745 - void *argp1 = 0 ;
74746 - int res1 = 0 ;
74747 - int res2 ;
74748 - char *buf2 = 0 ;
74749 - int alloc2 = 0 ;
74750 - PyObject * obj0 = 0 ;
74751 - PyObject * obj1 = 0 ;
74752 -
74753 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_vips2csv",&obj0,&obj1)) SWIG_fail;
74754 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
74755 - if (!SWIG_IsOK(res1)) {
74756 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2csv" "', argument " "1"" of type '" "vips::VImage *""'");
74757 - }
74758 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
74759 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
74760 - if (!SWIG_IsOK(res2)) {
74761 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_vips2csv" "', argument " "2"" of type '" "char *""'");
74762 - }
74763 - arg2 = reinterpret_cast< char * >(buf2);
74764 - try {
74765 - (arg1)->vips2csv(arg2);
74766 - }
74767 - catch(vips::VError &_e) {
74768 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74769 - }
74770 -
74771 - resultobj = SWIG_Py_Void();
74772 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
74773 - return resultobj;
74774 -fail:
74775 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
74776 - return NULL;
74777 -}
74778 -
74779 -
74780 -SWIGINTERN PyObject *_wrap_VImage_vips2dz(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74781 - PyObject *resultobj = 0;
74782 - vips::VImage *arg1 = (vips::VImage *) 0 ;
74783 - char *arg2 = (char *) 0 ;
74784 - void *argp1 = 0 ;
74785 - int res1 = 0 ;
74786 - int res2 ;
74787 - char *buf2 = 0 ;
74788 - int alloc2 = 0 ;
74789 - PyObject * obj0 = 0 ;
74790 - PyObject * obj1 = 0 ;
74791 -
74792 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_vips2dz",&obj0,&obj1)) SWIG_fail;
74793 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
74794 - if (!SWIG_IsOK(res1)) {
74795 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2dz" "', argument " "1"" of type '" "vips::VImage *""'");
74796 - }
74797 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
74798 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
74799 - if (!SWIG_IsOK(res2)) {
74800 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_vips2dz" "', argument " "2"" of type '" "char *""'");
74801 - }
74802 - arg2 = reinterpret_cast< char * >(buf2);
74803 - try {
74804 - (arg1)->vips2dz(arg2);
74805 - }
74806 - catch(vips::VError &_e) {
74807 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74808 - }
74809 -
74810 - resultobj = SWIG_Py_Void();
74811 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
74812 - return resultobj;
74813 -fail:
74814 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
74815 - return NULL;
74816 -}
74817 -
74818 -
74819 -SWIGINTERN PyObject *_wrap_VImage_vips2jpeg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74820 - PyObject *resultobj = 0;
74821 - vips::VImage *arg1 = (vips::VImage *) 0 ;
74822 - char *arg2 = (char *) 0 ;
74823 - void *argp1 = 0 ;
74824 - int res1 = 0 ;
74825 - int res2 ;
74826 - char *buf2 = 0 ;
74827 - int alloc2 = 0 ;
74828 - PyObject * obj0 = 0 ;
74829 - PyObject * obj1 = 0 ;
74830 -
74831 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_vips2jpeg",&obj0,&obj1)) SWIG_fail;
74832 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
74833 - if (!SWIG_IsOK(res1)) {
74834 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2jpeg" "', argument " "1"" of type '" "vips::VImage *""'");
74835 - }
74836 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
74837 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
74838 - if (!SWIG_IsOK(res2)) {
74839 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_vips2jpeg" "', argument " "2"" of type '" "char *""'");
74840 - }
74841 - arg2 = reinterpret_cast< char * >(buf2);
74842 - try {
74843 - (arg1)->vips2jpeg(arg2);
74844 - }
74845 - catch(vips::VError &_e) {
74846 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74847 - }
74848 -
74849 - resultobj = SWIG_Py_Void();
74850 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
74851 - return resultobj;
74852 -fail:
74853 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
74854 - return NULL;
74855 -}
74856 -
74857 -
74858 -SWIGINTERN PyObject *_wrap_VImage_vips2mimejpeg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74859 - PyObject *resultobj = 0;
74860 - vips::VImage *arg1 = (vips::VImage *) 0 ;
74861 - int arg2 ;
74862 - void *argp1 = 0 ;
74863 - int res1 = 0 ;
74864 - int val2 ;
74865 - int ecode2 = 0 ;
74866 - PyObject * obj0 = 0 ;
74867 - PyObject * obj1 = 0 ;
74868 -
74869 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_vips2mimejpeg",&obj0,&obj1)) SWIG_fail;
74870 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
74871 - if (!SWIG_IsOK(res1)) {
74872 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2mimejpeg" "', argument " "1"" of type '" "vips::VImage *""'");
74873 - }
74874 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
74875 - ecode2 = SWIG_AsVal_int(obj1, &val2);
74876 - if (!SWIG_IsOK(ecode2)) {
74877 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_vips2mimejpeg" "', argument " "2"" of type '" "int""'");
74878 - }
74879 - arg2 = static_cast< int >(val2);
74880 - try {
74881 - (arg1)->vips2mimejpeg(arg2);
74882 - }
74883 - catch(vips::VError &_e) {
74884 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74885 - }
74886 -
74887 - resultobj = SWIG_Py_Void();
74888 - return resultobj;
74889 -fail:
74890 - return NULL;
74891 -}
74892 -
74893 -
74894 -SWIGINTERN PyObject *_wrap_VImage_vips2png(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74895 - PyObject *resultobj = 0;
74896 - vips::VImage *arg1 = (vips::VImage *) 0 ;
74897 - char *arg2 = (char *) 0 ;
74898 - void *argp1 = 0 ;
74899 - int res1 = 0 ;
74900 - int res2 ;
74901 - char *buf2 = 0 ;
74902 - int alloc2 = 0 ;
74903 - PyObject * obj0 = 0 ;
74904 - PyObject * obj1 = 0 ;
74905 -
74906 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_vips2png",&obj0,&obj1)) SWIG_fail;
74907 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
74908 - if (!SWIG_IsOK(res1)) {
74909 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2png" "', argument " "1"" of type '" "vips::VImage *""'");
74910 - }
74911 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
74912 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
74913 - if (!SWIG_IsOK(res2)) {
74914 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_vips2png" "', argument " "2"" of type '" "char *""'");
74915 - }
74916 - arg2 = reinterpret_cast< char * >(buf2);
74917 - try {
74918 - (arg1)->vips2png(arg2);
74919 - }
74920 - catch(vips::VError &_e) {
74921 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74922 - }
74923 -
74924 - resultobj = SWIG_Py_Void();
74925 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
74926 - return resultobj;
74927 -fail:
74928 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
74929 - return NULL;
74930 -}
74931 -
74932 -
74933 -SWIGINTERN PyObject *_wrap_VImage_vips2ppm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74934 - PyObject *resultobj = 0;
74935 - vips::VImage *arg1 = (vips::VImage *) 0 ;
74936 - char *arg2 = (char *) 0 ;
74937 - void *argp1 = 0 ;
74938 - int res1 = 0 ;
74939 - int res2 ;
74940 - char *buf2 = 0 ;
74941 - int alloc2 = 0 ;
74942 - PyObject * obj0 = 0 ;
74943 - PyObject * obj1 = 0 ;
74944 -
74945 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_vips2ppm",&obj0,&obj1)) SWIG_fail;
74946 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
74947 - if (!SWIG_IsOK(res1)) {
74948 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2ppm" "', argument " "1"" of type '" "vips::VImage *""'");
74949 - }
74950 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
74951 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
74952 - if (!SWIG_IsOK(res2)) {
74953 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_vips2ppm" "', argument " "2"" of type '" "char *""'");
74954 - }
74955 - arg2 = reinterpret_cast< char * >(buf2);
74956 - try {
74957 - (arg1)->vips2ppm(arg2);
74958 - }
74959 - catch(vips::VError &_e) {
74960 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
74961 - }
74962 -
74963 - resultobj = SWIG_Py_Void();
74964 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
74965 - return resultobj;
74966 -fail:
74967 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
74968 - return NULL;
74969 -}
74970 -
74971 -
74972 -SWIGINTERN PyObject *_wrap_VImage_vips2tiff(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74973 - PyObject *resultobj = 0;
74974 - vips::VImage *arg1 = (vips::VImage *) 0 ;
74975 - char *arg2 = (char *) 0 ;
74976 - void *argp1 = 0 ;
74977 - int res1 = 0 ;
74978 - int res2 ;
74979 - char *buf2 = 0 ;
74980 - int alloc2 = 0 ;
74981 - PyObject * obj0 = 0 ;
74982 - PyObject * obj1 = 0 ;
74983 -
74984 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_vips2tiff",&obj0,&obj1)) SWIG_fail;
74985 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
74986 - if (!SWIG_IsOK(res1)) {
74987 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2tiff" "', argument " "1"" of type '" "vips::VImage *""'");
74988 - }
74989 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
74990 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
74991 - if (!SWIG_IsOK(res2)) {
74992 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_vips2tiff" "', argument " "2"" of type '" "char *""'");
74993 - }
74994 - arg2 = reinterpret_cast< char * >(buf2);
74995 - try {
74996 - (arg1)->vips2tiff(arg2);
74997 - }
74998 - catch(vips::VError &_e) {
74999 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75000 - }
75001 -
75002 - resultobj = SWIG_Py_Void();
75003 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
75004 - return resultobj;
75005 -fail:
75006 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
75007 - return NULL;
75008 -}
75009 -
75010 -
75011 -SWIGINTERN PyObject *_wrap_VImage_create_fmask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75012 - PyObject *resultobj = 0;
75013 - int arg1 ;
75014 - int arg2 ;
75015 - int arg3 ;
75016 - double arg4 ;
75017 - double arg5 ;
75018 - double arg6 ;
75019 - double arg7 ;
75020 - double arg8 ;
75021 - int val1 ;
75022 - int ecode1 = 0 ;
75023 - int val2 ;
75024 - int ecode2 = 0 ;
75025 - int val3 ;
75026 - int ecode3 = 0 ;
75027 - double val4 ;
75028 - int ecode4 = 0 ;
75029 - double val5 ;
75030 - int ecode5 = 0 ;
75031 - double val6 ;
75032 - int ecode6 = 0 ;
75033 - double val7 ;
75034 - int ecode7 = 0 ;
75035 - double val8 ;
75036 - int ecode8 = 0 ;
75037 - PyObject * obj0 = 0 ;
75038 - PyObject * obj1 = 0 ;
75039 - PyObject * obj2 = 0 ;
75040 - PyObject * obj3 = 0 ;
75041 - PyObject * obj4 = 0 ;
75042 - PyObject * obj5 = 0 ;
75043 - PyObject * obj6 = 0 ;
75044 - PyObject * obj7 = 0 ;
75045 - vips::VImage result;
75046 -
75047 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:VImage_create_fmask",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
75048 - ecode1 = SWIG_AsVal_int(obj0, &val1);
75049 - if (!SWIG_IsOK(ecode1)) {
75050 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_create_fmask" "', argument " "1"" of type '" "int""'");
75051 - }
75052 - arg1 = static_cast< int >(val1);
75053 - ecode2 = SWIG_AsVal_int(obj1, &val2);
75054 - if (!SWIG_IsOK(ecode2)) {
75055 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_create_fmask" "', argument " "2"" of type '" "int""'");
75056 - }
75057 - arg2 = static_cast< int >(val2);
75058 - ecode3 = SWIG_AsVal_int(obj2, &val3);
75059 - if (!SWIG_IsOK(ecode3)) {
75060 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_create_fmask" "', argument " "3"" of type '" "int""'");
75061 - }
75062 - arg3 = static_cast< int >(val3);
75063 - ecode4 = SWIG_AsVal_double(obj3, &val4);
75064 - if (!SWIG_IsOK(ecode4)) {
75065 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_create_fmask" "', argument " "4"" of type '" "double""'");
75066 - }
75067 - arg4 = static_cast< double >(val4);
75068 - ecode5 = SWIG_AsVal_double(obj4, &val5);
75069 - if (!SWIG_IsOK(ecode5)) {
75070 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_create_fmask" "', argument " "5"" of type '" "double""'");
75071 - }
75072 - arg5 = static_cast< double >(val5);
75073 - ecode6 = SWIG_AsVal_double(obj5, &val6);
75074 - if (!SWIG_IsOK(ecode6)) {
75075 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_create_fmask" "', argument " "6"" of type '" "double""'");
75076 - }
75077 - arg6 = static_cast< double >(val6);
75078 - ecode7 = SWIG_AsVal_double(obj6, &val7);
75079 - if (!SWIG_IsOK(ecode7)) {
75080 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_create_fmask" "', argument " "7"" of type '" "double""'");
75081 - }
75082 - arg7 = static_cast< double >(val7);
75083 - ecode8 = SWIG_AsVal_double(obj7, &val8);
75084 - if (!SWIG_IsOK(ecode8)) {
75085 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_create_fmask" "', argument " "8"" of type '" "double""'");
75086 - }
75087 - arg8 = static_cast< double >(val8);
75088 - try {
75089 - result = vips::VImage::create_fmask(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
75090 - }
75091 - catch(vips::VError &_e) {
75092 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75093 - }
75094 -
75095 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75096 - return resultobj;
75097 -fail:
75098 - return NULL;
75099 -}
75100 -
75101 -
75102 -SWIGINTERN PyObject *_wrap_VImage_disp_ps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75103 - PyObject *resultobj = 0;
75104 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75105 - void *argp1 = 0 ;
75106 - int res1 = 0 ;
75107 - PyObject * obj0 = 0 ;
75108 - vips::VImage result;
75109 -
75110 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_disp_ps",&obj0)) SWIG_fail;
75111 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75112 - if (!SWIG_IsOK(res1)) {
75113 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_disp_ps" "', argument " "1"" of type '" "vips::VImage *""'");
75114 - }
75115 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75116 - try {
75117 - result = (arg1)->disp_ps();
75118 - }
75119 - catch(vips::VError &_e) {
75120 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75121 - }
75122 -
75123 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75124 - return resultobj;
75125 -fail:
75126 - return NULL;
75127 -}
75128 -
75129 -
75130 -SWIGINTERN PyObject *_wrap_VImage_flt_image_freq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75131 - PyObject *resultobj = 0;
75132 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75133 - int arg2 ;
75134 - double arg3 ;
75135 - double arg4 ;
75136 - double arg5 ;
75137 - double arg6 ;
75138 - double arg7 ;
75139 - void *argp1 = 0 ;
75140 - int res1 = 0 ;
75141 - int val2 ;
75142 - int ecode2 = 0 ;
75143 - double val3 ;
75144 - int ecode3 = 0 ;
75145 - double val4 ;
75146 - int ecode4 = 0 ;
75147 - double val5 ;
75148 - int ecode5 = 0 ;
75149 - double val6 ;
75150 - int ecode6 = 0 ;
75151 - double val7 ;
75152 - int ecode7 = 0 ;
75153 - PyObject * obj0 = 0 ;
75154 - PyObject * obj1 = 0 ;
75155 - PyObject * obj2 = 0 ;
75156 - PyObject * obj3 = 0 ;
75157 - PyObject * obj4 = 0 ;
75158 - PyObject * obj5 = 0 ;
75159 - PyObject * obj6 = 0 ;
75160 - vips::VImage result;
75161 -
75162 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_flt_image_freq",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
75163 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75164 - if (!SWIG_IsOK(res1)) {
75165 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_flt_image_freq" "', argument " "1"" of type '" "vips::VImage *""'");
75166 - }
75167 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75168 - ecode2 = SWIG_AsVal_int(obj1, &val2);
75169 - if (!SWIG_IsOK(ecode2)) {
75170 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_flt_image_freq" "', argument " "2"" of type '" "int""'");
75171 - }
75172 - arg2 = static_cast< int >(val2);
75173 - ecode3 = SWIG_AsVal_double(obj2, &val3);
75174 - if (!SWIG_IsOK(ecode3)) {
75175 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_flt_image_freq" "', argument " "3"" of type '" "double""'");
75176 - }
75177 - arg3 = static_cast< double >(val3);
75178 - ecode4 = SWIG_AsVal_double(obj3, &val4);
75179 - if (!SWIG_IsOK(ecode4)) {
75180 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_flt_image_freq" "', argument " "4"" of type '" "double""'");
75181 - }
75182 - arg4 = static_cast< double >(val4);
75183 - ecode5 = SWIG_AsVal_double(obj4, &val5);
75184 - if (!SWIG_IsOK(ecode5)) {
75185 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_flt_image_freq" "', argument " "5"" of type '" "double""'");
75186 - }
75187 - arg5 = static_cast< double >(val5);
75188 - ecode6 = SWIG_AsVal_double(obj5, &val6);
75189 - if (!SWIG_IsOK(ecode6)) {
75190 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_flt_image_freq" "', argument " "6"" of type '" "double""'");
75191 - }
75192 - arg6 = static_cast< double >(val6);
75193 - ecode7 = SWIG_AsVal_double(obj6, &val7);
75194 - if (!SWIG_IsOK(ecode7)) {
75195 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_flt_image_freq" "', argument " "7"" of type '" "double""'");
75196 - }
75197 - arg7 = static_cast< double >(val7);
75198 - try {
75199 - result = (arg1)->flt_image_freq(arg2,arg3,arg4,arg5,arg6,arg7);
75200 - }
75201 - catch(vips::VError &_e) {
75202 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75203 - }
75204 -
75205 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75206 - return resultobj;
75207 -fail:
75208 - return NULL;
75209 -}
75210 -
75211 -
75212 -SWIGINTERN PyObject *_wrap_VImage_fractsurf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75213 - PyObject *resultobj = 0;
75214 - int arg1 ;
75215 - double arg2 ;
75216 - int val1 ;
75217 - int ecode1 = 0 ;
75218 - double val2 ;
75219 - int ecode2 = 0 ;
75220 - PyObject * obj0 = 0 ;
75221 - PyObject * obj1 = 0 ;
75222 - vips::VImage result;
75223 -
75224 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_fractsurf",&obj0,&obj1)) SWIG_fail;
75225 - ecode1 = SWIG_AsVal_int(obj0, &val1);
75226 - if (!SWIG_IsOK(ecode1)) {
75227 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_fractsurf" "', argument " "1"" of type '" "int""'");
75228 - }
75229 - arg1 = static_cast< int >(val1);
75230 - ecode2 = SWIG_AsVal_double(obj1, &val2);
75231 - if (!SWIG_IsOK(ecode2)) {
75232 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_fractsurf" "', argument " "2"" of type '" "double""'");
75233 - }
75234 - arg2 = static_cast< double >(val2);
75235 - try {
75236 - result = vips::VImage::fractsurf(arg1,arg2);
75237 - }
75238 - catch(vips::VError &_e) {
75239 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75240 - }
75241 -
75242 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75243 - return resultobj;
75244 -fail:
75245 - return NULL;
75246 -}
75247 -
75248 -
75249 -SWIGINTERN PyObject *_wrap_VImage_freqflt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75250 - PyObject *resultobj = 0;
75251 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75252 - vips::VImage arg2 ;
75253 - void *argp1 = 0 ;
75254 - int res1 = 0 ;
75255 - void *argp2 ;
75256 - int res2 = 0 ;
75257 - PyObject * obj0 = 0 ;
75258 - PyObject * obj1 = 0 ;
75259 - vips::VImage result;
75260 -
75261 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_freqflt",&obj0,&obj1)) SWIG_fail;
75262 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75263 - if (!SWIG_IsOK(res1)) {
75264 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_freqflt" "', argument " "1"" of type '" "vips::VImage *""'");
75265 - }
75266 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75267 - {
75268 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
75269 - if (!SWIG_IsOK(res2)) {
75270 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_freqflt" "', argument " "2"" of type '" "vips::VImage""'");
75271 - }
75272 - if (!argp2) {
75273 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_freqflt" "', argument " "2"" of type '" "vips::VImage""'");
75274 - } else {
75275 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
75276 - arg2 = *temp;
75277 - if (SWIG_IsNewObj(res2)) delete temp;
75278 - }
75279 - }
75280 - try {
75281 - result = (arg1)->freqflt(arg2);
75282 - }
75283 - catch(vips::VError &_e) {
75284 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75285 - }
75286 -
75287 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75288 - return resultobj;
75289 -fail:
75290 - return NULL;
75291 -}
75292 -
75293 -
75294 -SWIGINTERN PyObject *_wrap_VImage_fwfft(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75295 - PyObject *resultobj = 0;
75296 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75297 - void *argp1 = 0 ;
75298 - int res1 = 0 ;
75299 - PyObject * obj0 = 0 ;
75300 - vips::VImage result;
75301 -
75302 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_fwfft",&obj0)) SWIG_fail;
75303 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75304 - if (!SWIG_IsOK(res1)) {
75305 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_fwfft" "', argument " "1"" of type '" "vips::VImage *""'");
75306 - }
75307 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75308 - try {
75309 - result = (arg1)->fwfft();
75310 - }
75311 - catch(vips::VError &_e) {
75312 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75313 - }
75314 -
75315 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75316 - return resultobj;
75317 -fail:
75318 - return NULL;
75319 -}
75320 -
75321 -
75322 -SWIGINTERN PyObject *_wrap_VImage_rotquad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75323 - PyObject *resultobj = 0;
75324 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75325 - void *argp1 = 0 ;
75326 - int res1 = 0 ;
75327 - PyObject * obj0 = 0 ;
75328 - vips::VImage result;
75329 -
75330 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_rotquad",&obj0)) SWIG_fail;
75331 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75332 - if (!SWIG_IsOK(res1)) {
75333 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rotquad" "', argument " "1"" of type '" "vips::VImage *""'");
75334 - }
75335 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75336 - try {
75337 - result = (arg1)->rotquad();
75338 - }
75339 - catch(vips::VError &_e) {
75340 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75341 - }
75342 -
75343 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75344 - return resultobj;
75345 -fail:
75346 - return NULL;
75347 -}
75348 -
75349 -
75350 -SWIGINTERN PyObject *_wrap_VImage_invfft(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75351 - PyObject *resultobj = 0;
75352 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75353 - void *argp1 = 0 ;
75354 - int res1 = 0 ;
75355 - PyObject * obj0 = 0 ;
75356 - vips::VImage result;
75357 -
75358 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_invfft",&obj0)) SWIG_fail;
75359 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75360 - if (!SWIG_IsOK(res1)) {
75361 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_invfft" "', argument " "1"" of type '" "vips::VImage *""'");
75362 - }
75363 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75364 - try {
75365 - result = (arg1)->invfft();
75366 - }
75367 - catch(vips::VError &_e) {
75368 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75369 - }
75370 -
75371 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75372 - return resultobj;
75373 -fail:
75374 - return NULL;
75375 -}
75376 -
75377 -
75378 -SWIGINTERN PyObject *_wrap_VImage_phasecor_fft(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75379 - PyObject *resultobj = 0;
75380 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75381 - vips::VImage arg2 ;
75382 - void *argp1 = 0 ;
75383 - int res1 = 0 ;
75384 - void *argp2 ;
75385 - int res2 = 0 ;
75386 - PyObject * obj0 = 0 ;
75387 - PyObject * obj1 = 0 ;
75388 - vips::VImage result;
75389 -
75390 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_phasecor_fft",&obj0,&obj1)) SWIG_fail;
75391 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75392 - if (!SWIG_IsOK(res1)) {
75393 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_phasecor_fft" "', argument " "1"" of type '" "vips::VImage *""'");
75394 - }
75395 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75396 - {
75397 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
75398 - if (!SWIG_IsOK(res2)) {
75399 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_phasecor_fft" "', argument " "2"" of type '" "vips::VImage""'");
75400 - }
75401 - if (!argp2) {
75402 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_phasecor_fft" "', argument " "2"" of type '" "vips::VImage""'");
75403 - } else {
75404 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
75405 - arg2 = *temp;
75406 - if (SWIG_IsNewObj(res2)) delete temp;
75407 - }
75408 - }
75409 - try {
75410 - result = (arg1)->phasecor_fft(arg2);
75411 - }
75412 - catch(vips::VError &_e) {
75413 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75414 - }
75415 -
75416 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75417 - return resultobj;
75418 -fail:
75419 - return NULL;
75420 -}
75421 -
75422 -
75423 -SWIGINTERN PyObject *_wrap_VImage_invfftr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75424 - PyObject *resultobj = 0;
75425 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75426 - void *argp1 = 0 ;
75427 - int res1 = 0 ;
75428 - PyObject * obj0 = 0 ;
75429 - vips::VImage result;
75430 -
75431 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_invfftr",&obj0)) SWIG_fail;
75432 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75433 - if (!SWIG_IsOK(res1)) {
75434 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_invfftr" "', argument " "1"" of type '" "vips::VImage *""'");
75435 - }
75436 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75437 - try {
75438 - result = (arg1)->invfftr();
75439 - }
75440 - catch(vips::VError &_e) {
75441 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75442 - }
75443 -
75444 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75445 - return resultobj;
75446 -fail:
75447 - return NULL;
75448 -}
75449 -
75450 -
75451 -SWIGINTERN PyObject *_wrap_VImage_gammacorrect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75452 - PyObject *resultobj = 0;
75453 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75454 - double arg2 ;
75455 - void *argp1 = 0 ;
75456 - int res1 = 0 ;
75457 - double val2 ;
75458 - int ecode2 = 0 ;
75459 - PyObject * obj0 = 0 ;
75460 - PyObject * obj1 = 0 ;
75461 - vips::VImage result;
75462 -
75463 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_gammacorrect",&obj0,&obj1)) SWIG_fail;
75464 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75465 - if (!SWIG_IsOK(res1)) {
75466 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_gammacorrect" "', argument " "1"" of type '" "vips::VImage *""'");
75467 - }
75468 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75469 - ecode2 = SWIG_AsVal_double(obj1, &val2);
75470 - if (!SWIG_IsOK(ecode2)) {
75471 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_gammacorrect" "', argument " "2"" of type '" "double""'");
75472 - }
75473 - arg2 = static_cast< double >(val2);
75474 - try {
75475 - result = (arg1)->gammacorrect(arg2);
75476 - }
75477 - catch(vips::VError &_e) {
75478 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75479 - }
75480 -
75481 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75482 - return resultobj;
75483 -fail:
75484 - return NULL;
75485 -}
75486 -
75487 -
75488 -SWIGINTERN PyObject *_wrap_VImage_heq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75489 - PyObject *resultobj = 0;
75490 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75491 - int arg2 ;
75492 - void *argp1 = 0 ;
75493 - int res1 = 0 ;
75494 - int val2 ;
75495 - int ecode2 = 0 ;
75496 - PyObject * obj0 = 0 ;
75497 - PyObject * obj1 = 0 ;
75498 - vips::VImage result;
75499 -
75500 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_heq",&obj0,&obj1)) SWIG_fail;
75501 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75502 - if (!SWIG_IsOK(res1)) {
75503 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_heq" "', argument " "1"" of type '" "vips::VImage *""'");
75504 - }
75505 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75506 - ecode2 = SWIG_AsVal_int(obj1, &val2);
75507 - if (!SWIG_IsOK(ecode2)) {
75508 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_heq" "', argument " "2"" of type '" "int""'");
75509 - }
75510 - arg2 = static_cast< int >(val2);
75511 - try {
75512 - result = (arg1)->heq(arg2);
75513 - }
75514 - catch(vips::VError &_e) {
75515 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75516 - }
75517 -
75518 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75519 - return resultobj;
75520 -fail:
75521 - return NULL;
75522 -}
75523 -
75524 -
75525 -SWIGINTERN PyObject *_wrap_VImage_hist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75526 - PyObject *resultobj = 0;
75527 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75528 - int arg2 ;
75529 - void *argp1 = 0 ;
75530 - int res1 = 0 ;
75531 - int val2 ;
75532 - int ecode2 = 0 ;
75533 - PyObject * obj0 = 0 ;
75534 - PyObject * obj1 = 0 ;
75535 - vips::VImage result;
75536 -
75537 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_hist",&obj0,&obj1)) SWIG_fail;
75538 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75539 - if (!SWIG_IsOK(res1)) {
75540 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_hist" "', argument " "1"" of type '" "vips::VImage *""'");
75541 - }
75542 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75543 - ecode2 = SWIG_AsVal_int(obj1, &val2);
75544 - if (!SWIG_IsOK(ecode2)) {
75545 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_hist" "', argument " "2"" of type '" "int""'");
75546 - }
75547 - arg2 = static_cast< int >(val2);
75548 - try {
75549 - result = (arg1)->hist(arg2);
75550 - }
75551 - catch(vips::VError &_e) {
75552 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75553 - }
75554 -
75555 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75556 - return resultobj;
75557 -fail:
75558 - return NULL;
75559 -}
75560 -
75561 -
75562 -SWIGINTERN PyObject *_wrap_VImage_histcum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75563 - PyObject *resultobj = 0;
75564 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75565 - void *argp1 = 0 ;
75566 - int res1 = 0 ;
75567 - PyObject * obj0 = 0 ;
75568 - vips::VImage result;
75569 -
75570 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_histcum",&obj0)) SWIG_fail;
75571 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75572 - if (!SWIG_IsOK(res1)) {
75573 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_histcum" "', argument " "1"" of type '" "vips::VImage *""'");
75574 - }
75575 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75576 - try {
75577 - result = (arg1)->histcum();
75578 - }
75579 - catch(vips::VError &_e) {
75580 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75581 - }
75582 -
75583 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75584 - return resultobj;
75585 -fail:
75586 - return NULL;
75587 -}
75588 -
75589 -
75590 -SWIGINTERN PyObject *_wrap_VImage_histeq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75591 - PyObject *resultobj = 0;
75592 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75593 - void *argp1 = 0 ;
75594 - int res1 = 0 ;
75595 - PyObject * obj0 = 0 ;
75596 - vips::VImage result;
75597 -
75598 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_histeq",&obj0)) SWIG_fail;
75599 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75600 - if (!SWIG_IsOK(res1)) {
75601 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_histeq" "', argument " "1"" of type '" "vips::VImage *""'");
75602 - }
75603 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75604 - try {
75605 - result = (arg1)->histeq();
75606 - }
75607 - catch(vips::VError &_e) {
75608 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75609 - }
75610 -
75611 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75612 - return resultobj;
75613 -fail:
75614 - return NULL;
75615 -}
75616 -
75617 -
75618 -SWIGINTERN PyObject *_wrap_VImage_hist_indexed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75619 - PyObject *resultobj = 0;
75620 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75621 - vips::VImage arg2 ;
75622 - void *argp1 = 0 ;
75623 - int res1 = 0 ;
75624 - void *argp2 ;
75625 - int res2 = 0 ;
75626 - PyObject * obj0 = 0 ;
75627 - PyObject * obj1 = 0 ;
75628 - vips::VImage result;
75629 -
75630 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_hist_indexed",&obj0,&obj1)) SWIG_fail;
75631 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75632 - if (!SWIG_IsOK(res1)) {
75633 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_hist_indexed" "', argument " "1"" of type '" "vips::VImage *""'");
75634 - }
75635 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75636 - {
75637 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
75638 - if (!SWIG_IsOK(res2)) {
75639 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_hist_indexed" "', argument " "2"" of type '" "vips::VImage""'");
75640 - }
75641 - if (!argp2) {
75642 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_hist_indexed" "', argument " "2"" of type '" "vips::VImage""'");
75643 - } else {
75644 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
75645 - arg2 = *temp;
75646 - if (SWIG_IsNewObj(res2)) delete temp;
75647 - }
75648 - }
75649 - try {
75650 - result = (arg1)->hist_indexed(arg2);
75651 - }
75652 - catch(vips::VError &_e) {
75653 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75654 - }
75655 -
75656 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75657 - return resultobj;
75658 -fail:
75659 - return NULL;
75660 -}
75661 -
75662 -
75663 -SWIGINTERN PyObject *_wrap_VImage_histgr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75664 - PyObject *resultobj = 0;
75665 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75666 - int arg2 ;
75667 - void *argp1 = 0 ;
75668 - int res1 = 0 ;
75669 - int val2 ;
75670 - int ecode2 = 0 ;
75671 - PyObject * obj0 = 0 ;
75672 - PyObject * obj1 = 0 ;
75673 - vips::VImage result;
75674 -
75675 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_histgr",&obj0,&obj1)) SWIG_fail;
75676 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75677 - if (!SWIG_IsOK(res1)) {
75678 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_histgr" "', argument " "1"" of type '" "vips::VImage *""'");
75679 - }
75680 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75681 - ecode2 = SWIG_AsVal_int(obj1, &val2);
75682 - if (!SWIG_IsOK(ecode2)) {
75683 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_histgr" "', argument " "2"" of type '" "int""'");
75684 - }
75685 - arg2 = static_cast< int >(val2);
75686 - try {
75687 - result = (arg1)->histgr(arg2);
75688 - }
75689 - catch(vips::VError &_e) {
75690 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75691 - }
75692 -
75693 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75694 - return resultobj;
75695 -fail:
75696 - return NULL;
75697 -}
75698 -
75699 -
75700 -SWIGINTERN PyObject *_wrap_VImage_histnD(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75701 - PyObject *resultobj = 0;
75702 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75703 - int arg2 ;
75704 - void *argp1 = 0 ;
75705 - int res1 = 0 ;
75706 - int val2 ;
75707 - int ecode2 = 0 ;
75708 - PyObject * obj0 = 0 ;
75709 - PyObject * obj1 = 0 ;
75710 - vips::VImage result;
75711 -
75712 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_histnD",&obj0,&obj1)) SWIG_fail;
75713 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75714 - if (!SWIG_IsOK(res1)) {
75715 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_histnD" "', argument " "1"" of type '" "vips::VImage *""'");
75716 - }
75717 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75718 - ecode2 = SWIG_AsVal_int(obj1, &val2);
75719 - if (!SWIG_IsOK(ecode2)) {
75720 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_histnD" "', argument " "2"" of type '" "int""'");
75721 - }
75722 - arg2 = static_cast< int >(val2);
75723 - try {
75724 - result = (arg1)->histnD(arg2);
75725 - }
75726 - catch(vips::VError &_e) {
75727 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75728 - }
75729 -
75730 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75731 - return resultobj;
75732 -fail:
75733 - return NULL;
75734 -}
75735 -
75736 -
75737 -SWIGINTERN PyObject *_wrap_VImage_histnorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75738 - PyObject *resultobj = 0;
75739 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75740 - void *argp1 = 0 ;
75741 - int res1 = 0 ;
75742 - PyObject * obj0 = 0 ;
75743 - vips::VImage result;
75744 -
75745 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_histnorm",&obj0)) SWIG_fail;
75746 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75747 - if (!SWIG_IsOK(res1)) {
75748 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_histnorm" "', argument " "1"" of type '" "vips::VImage *""'");
75749 - }
75750 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75751 - try {
75752 - result = (arg1)->histnorm();
75753 - }
75754 - catch(vips::VError &_e) {
75755 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75756 - }
75757 -
75758 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75759 - return resultobj;
75760 -fail:
75761 - return NULL;
75762 -}
75763 -
75764 -
75765 -SWIGINTERN PyObject *_wrap_VImage_histplot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75766 - PyObject *resultobj = 0;
75767 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75768 - void *argp1 = 0 ;
75769 - int res1 = 0 ;
75770 - PyObject * obj0 = 0 ;
75771 - vips::VImage result;
75772 -
75773 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_histplot",&obj0)) SWIG_fail;
75774 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75775 - if (!SWIG_IsOK(res1)) {
75776 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_histplot" "', argument " "1"" of type '" "vips::VImage *""'");
75777 - }
75778 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75779 - try {
75780 - result = (arg1)->histplot();
75781 - }
75782 - catch(vips::VError &_e) {
75783 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75784 - }
75785 -
75786 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75787 - return resultobj;
75788 -fail:
75789 - return NULL;
75790 -}
75791 -
75792 -
75793 -SWIGINTERN PyObject *_wrap_VImage_histspec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75794 - PyObject *resultobj = 0;
75795 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75796 - vips::VImage arg2 ;
75797 - void *argp1 = 0 ;
75798 - int res1 = 0 ;
75799 - void *argp2 ;
75800 - int res2 = 0 ;
75801 - PyObject * obj0 = 0 ;
75802 - PyObject * obj1 = 0 ;
75803 - vips::VImage result;
75804 -
75805 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_histspec",&obj0,&obj1)) SWIG_fail;
75806 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75807 - if (!SWIG_IsOK(res1)) {
75808 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_histspec" "', argument " "1"" of type '" "vips::VImage *""'");
75809 - }
75810 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75811 - {
75812 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
75813 - if (!SWIG_IsOK(res2)) {
75814 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_histspec" "', argument " "2"" of type '" "vips::VImage""'");
75815 - }
75816 - if (!argp2) {
75817 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_histspec" "', argument " "2"" of type '" "vips::VImage""'");
75818 - } else {
75819 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
75820 - arg2 = *temp;
75821 - if (SWIG_IsNewObj(res2)) delete temp;
75822 - }
75823 - }
75824 - try {
75825 - result = (arg1)->histspec(arg2);
75826 - }
75827 - catch(vips::VError &_e) {
75828 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75829 - }
75830 -
75831 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75832 - return resultobj;
75833 -fail:
75834 - return NULL;
75835 -}
75836 -
75837 -
75838 -SWIGINTERN PyObject *_wrap_VImage_hsp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75839 - PyObject *resultobj = 0;
75840 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75841 - vips::VImage arg2 ;
75842 - void *argp1 = 0 ;
75843 - int res1 = 0 ;
75844 - void *argp2 ;
75845 - int res2 = 0 ;
75846 - PyObject * obj0 = 0 ;
75847 - PyObject * obj1 = 0 ;
75848 - vips::VImage result;
75849 -
75850 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_hsp",&obj0,&obj1)) SWIG_fail;
75851 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75852 - if (!SWIG_IsOK(res1)) {
75853 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_hsp" "', argument " "1"" of type '" "vips::VImage *""'");
75854 - }
75855 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75856 - {
75857 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
75858 - if (!SWIG_IsOK(res2)) {
75859 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_hsp" "', argument " "2"" of type '" "vips::VImage""'");
75860 - }
75861 - if (!argp2) {
75862 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_hsp" "', argument " "2"" of type '" "vips::VImage""'");
75863 - } else {
75864 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
75865 - arg2 = *temp;
75866 - if (SWIG_IsNewObj(res2)) delete temp;
75867 - }
75868 - }
75869 - try {
75870 - result = (arg1)->hsp(arg2);
75871 - }
75872 - catch(vips::VError &_e) {
75873 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75874 - }
75875 -
75876 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75877 - return resultobj;
75878 -fail:
75879 - return NULL;
75880 -}
75881 -
75882 -
75883 -SWIGINTERN PyObject *_wrap_VImage_identity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75884 - PyObject *resultobj = 0;
75885 - int arg1 ;
75886 - int val1 ;
75887 - int ecode1 = 0 ;
75888 - PyObject * obj0 = 0 ;
75889 - vips::VImage result;
75890 -
75891 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_identity",&obj0)) SWIG_fail;
75892 - ecode1 = SWIG_AsVal_int(obj0, &val1);
75893 - if (!SWIG_IsOK(ecode1)) {
75894 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_identity" "', argument " "1"" of type '" "int""'");
75895 - }
75896 - arg1 = static_cast< int >(val1);
75897 - try {
75898 - result = vips::VImage::identity(arg1);
75899 - }
75900 - catch(vips::VError &_e) {
75901 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75902 - }
75903 -
75904 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75905 - return resultobj;
75906 -fail:
75907 - return NULL;
75908 -}
75909 -
75910 -
75911 -SWIGINTERN PyObject *_wrap_VImage_identity_ushort(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75912 - PyObject *resultobj = 0;
75913 - int arg1 ;
75914 - int arg2 ;
75915 - int val1 ;
75916 - int ecode1 = 0 ;
75917 - int val2 ;
75918 - int ecode2 = 0 ;
75919 - PyObject * obj0 = 0 ;
75920 - PyObject * obj1 = 0 ;
75921 - vips::VImage result;
75922 -
75923 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_identity_ushort",&obj0,&obj1)) SWIG_fail;
75924 - ecode1 = SWIG_AsVal_int(obj0, &val1);
75925 - if (!SWIG_IsOK(ecode1)) {
75926 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_identity_ushort" "', argument " "1"" of type '" "int""'");
75927 - }
75928 - arg1 = static_cast< int >(val1);
75929 - ecode2 = SWIG_AsVal_int(obj1, &val2);
75930 - if (!SWIG_IsOK(ecode2)) {
75931 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_identity_ushort" "', argument " "2"" of type '" "int""'");
75932 - }
75933 - arg2 = static_cast< int >(val2);
75934 - try {
75935 - result = vips::VImage::identity_ushort(arg1,arg2);
75936 - }
75937 - catch(vips::VError &_e) {
75938 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75939 - }
75940 -
75941 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
75942 - return resultobj;
75943 -fail:
75944 - return NULL;
75945 -}
75946 -
75947 -
75948 -SWIGINTERN PyObject *_wrap_VImage_ismonotonic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75949 - PyObject *resultobj = 0;
75950 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75951 - void *argp1 = 0 ;
75952 - int res1 = 0 ;
75953 - PyObject * obj0 = 0 ;
75954 - int result;
75955 -
75956 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_ismonotonic",&obj0)) SWIG_fail;
75957 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75958 - if (!SWIG_IsOK(res1)) {
75959 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_ismonotonic" "', argument " "1"" of type '" "vips::VImage *""'");
75960 - }
75961 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75962 - try {
75963 - result = (int)(arg1)->ismonotonic();
75964 - }
75965 - catch(vips::VError &_e) {
75966 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
75967 - }
75968 -
75969 - resultobj = SWIG_From_int(static_cast< int >(result));
75970 - return resultobj;
75971 -fail:
75972 - return NULL;
75973 -}
75974 -
75975 -
75976 -SWIGINTERN PyObject *_wrap_VImage_lhisteq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75977 - PyObject *resultobj = 0;
75978 - vips::VImage *arg1 = (vips::VImage *) 0 ;
75979 - int arg2 ;
75980 - int arg3 ;
75981 - void *argp1 = 0 ;
75982 - int res1 = 0 ;
75983 - int val2 ;
75984 - int ecode2 = 0 ;
75985 - int val3 ;
75986 - int ecode3 = 0 ;
75987 - PyObject * obj0 = 0 ;
75988 - PyObject * obj1 = 0 ;
75989 - PyObject * obj2 = 0 ;
75990 - vips::VImage result;
75991 -
75992 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_lhisteq",&obj0,&obj1,&obj2)) SWIG_fail;
75993 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
75994 - if (!SWIG_IsOK(res1)) {
75995 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lhisteq" "', argument " "1"" of type '" "vips::VImage *""'");
75996 - }
75997 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
75998 - ecode2 = SWIG_AsVal_int(obj1, &val2);
75999 - if (!SWIG_IsOK(ecode2)) {
76000 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_lhisteq" "', argument " "2"" of type '" "int""'");
76001 - }
76002 - arg2 = static_cast< int >(val2);
76003 - ecode3 = SWIG_AsVal_int(obj2, &val3);
76004 - if (!SWIG_IsOK(ecode3)) {
76005 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lhisteq" "', argument " "3"" of type '" "int""'");
76006 - }
76007 - arg3 = static_cast< int >(val3);
76008 - try {
76009 - result = (arg1)->lhisteq(arg2,arg3);
76010 - }
76011 - catch(vips::VError &_e) {
76012 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
76013 - }
76014 -
76015 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
76016 - return resultobj;
76017 -fail:
76018 - return NULL;
76019 -}
76020 -
76021 -
76022 -SWIGINTERN PyObject *_wrap_VImage_mpercent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76023 - PyObject *resultobj = 0;
76024 - vips::VImage *arg1 = (vips::VImage *) 0 ;
76025 - double arg2 ;
76026 - void *argp1 = 0 ;
76027 - int res1 = 0 ;
76028 - double val2 ;
76029 - int ecode2 = 0 ;
76030 - PyObject * obj0 = 0 ;
76031 - PyObject * obj1 = 0 ;
76032 - int result;
76033 -
76034 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_mpercent",&obj0,&obj1)) SWIG_fail;
76035 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
76036 - if (!SWIG_IsOK(res1)) {
76037 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_mpercent" "', argument " "1"" of type '" "vips::VImage *""'");
76038 - }
76039 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
76040 - ecode2 = SWIG_AsVal_double(obj1, &val2);
76041 - if (!SWIG_IsOK(ecode2)) {
76042 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_mpercent" "', argument " "2"" of type '" "double""'");
76043 - }
76044 - arg2 = static_cast< double >(val2);
76045 - try {
76046 - result = (int)(arg1)->mpercent(arg2);
76047 - }
76048 - catch(vips::VError &_e) {
76049 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
76050 - }
76051 -
76052 - resultobj = SWIG_From_int(static_cast< int >(result));
76053 - return resultobj;
76054 -fail:
76055 - return NULL;
76056 -}
76057 -
76058 -
76059 -SWIGINTERN PyObject *_wrap_VImage_invertlut(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76060 - PyObject *resultobj = 0;
76061 - vips::VDMask arg1 ;
76062 - int arg2 ;
76063 - void *argp1 ;
76064 - int res1 = 0 ;
76065 - int val2 ;
76066 - int ecode2 = 0 ;
76067 - PyObject * obj0 = 0 ;
76068 - PyObject * obj1 = 0 ;
76069 - vips::VImage result;
76070 -
76071 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_invertlut",&obj0,&obj1)) SWIG_fail;
76072 - {
76073 - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_vips__VDMask, 0 | 0);
76074 - if (!SWIG_IsOK(res1)) {
76075 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_invertlut" "', argument " "1"" of type '" "vips::VDMask""'");
76076 - }
76077 - if (!argp1) {
76078 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_invertlut" "', argument " "1"" of type '" "vips::VDMask""'");
76079 - } else {
76080 - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp1);
76081 - arg1 = *temp;
76082 - if (SWIG_IsNewObj(res1)) delete temp;
76083 - }
76084 - }
76085 - ecode2 = SWIG_AsVal_int(obj1, &val2);
76086 - if (!SWIG_IsOK(ecode2)) {
76087 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_invertlut" "', argument " "2"" of type '" "int""'");
76088 - }
76089 - arg2 = static_cast< int >(val2);
76090 - try {
76091 - result = vips::VImage::invertlut(arg1,arg2);
76092 - }
76093 - catch(vips::VError &_e) {
76094 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
76095 - }
76096 -
76097 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
76098 - return resultobj;
76099 -fail:
76100 - return NULL;
76101 -}
76102 -
76103 -
76104 -SWIGINTERN PyObject *_wrap_VImage_buildlut(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76105 - PyObject *resultobj = 0;
76106 - vips::VDMask arg1 ;
76107 - void *argp1 ;
76108 - int res1 = 0 ;
76109 - PyObject * obj0 = 0 ;
76110 - vips::VImage result;
76111 -
76112 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_buildlut",&obj0)) SWIG_fail;
76113 - {
76114 - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_vips__VDMask, 0 | 0);
76115 - if (!SWIG_IsOK(res1)) {
76116 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_buildlut" "', argument " "1"" of type '" "vips::VDMask""'");
76117 - }
76118 - if (!argp1) {
76119 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_buildlut" "', argument " "1"" of type '" "vips::VDMask""'");
76120 - } else {
76121 - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp1);
76122 - arg1 = *temp;
76123 - if (SWIG_IsNewObj(res1)) delete temp;
76124 - }
76125 - }
76126 - try {
76127 - result = vips::VImage::buildlut(arg1);
76128 - }
76129 - catch(vips::VError &_e) {
76130 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
76131 - }
76132 -
76133 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
76134 - return resultobj;
76135 -fail:
76136 - return NULL;
76137 -}
76138 -
76139 -
76140 -SWIGINTERN PyObject *_wrap_VImage_maplut(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76141 - PyObject *resultobj = 0;
76142 - vips::VImage *arg1 = (vips::VImage *) 0 ;
76143 - vips::VImage arg2 ;
76144 - void *argp1 = 0 ;
76145 - int res1 = 0 ;
76146 - void *argp2 ;
76147 - int res2 = 0 ;
76148 - PyObject * obj0 = 0 ;
76149 - PyObject * obj1 = 0 ;
76150 - vips::VImage result;
76151 -
76152 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_maplut",&obj0,&obj1)) SWIG_fail;
76153 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
76154 - if (!SWIG_IsOK(res1)) {
76155 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_maplut" "', argument " "1"" of type '" "vips::VImage *""'");
76156 - }
76157 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
76158 - {
76159 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
76160 - if (!SWIG_IsOK(res2)) {
76161 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_maplut" "', argument " "2"" of type '" "vips::VImage""'");
76162 - }
76163 - if (!argp2) {
76164 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_maplut" "', argument " "2"" of type '" "vips::VImage""'");
76165 - } else {
76166 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
76167 - arg2 = *temp;
76168 - if (SWIG_IsNewObj(res2)) delete temp;
76169 - }
76170 - }
76171 - try {
76172 - result = (arg1)->maplut(arg2);
76173 - }
76174 - catch(vips::VError &_e) {
76175 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
76176 - }
76177 -
76178 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
76179 - return resultobj;
76180 -fail:
76181 - return NULL;
76182 -}
76183 -
76184 -
76185 -SWIGINTERN PyObject *_wrap_VImage_project(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76186 - PyObject *resultobj = 0;
76187 - vips::VImage *arg1 = (vips::VImage *) 0 ;
76188 - vips::VImage *arg2 = 0 ;
76189 - void *argp1 = 0 ;
76190 - int res1 = 0 ;
76191 - void *argp2 = 0 ;
76192 - int res2 = 0 ;
76193 - PyObject * obj0 = 0 ;
76194 - PyObject * obj1 = 0 ;
76195 - vips::VImage result;
76196 -
76197 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_project",&obj0,&obj1)) SWIG_fail;
76198 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
76199 - if (!SWIG_IsOK(res1)) {
76200 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_project" "', argument " "1"" of type '" "vips::VImage *""'");
76201 - }
76202 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
76203 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 );
76204 - if (!SWIG_IsOK(res2)) {
76205 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_project" "', argument " "2"" of type '" "vips::VImage &""'");
76206 - }
76207 - if (!argp2) {
76208 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_project" "', argument " "2"" of type '" "vips::VImage &""'");
76209 - }
76210 - arg2 = reinterpret_cast< vips::VImage * >(argp2);
76211 - try {
76212 - result = (arg1)->project(*arg2);
76213 - }
76214 - catch(vips::VError &_e) {
76215 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
76216 - }
76217 -
76218 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
76219 - return resultobj;
76220 -fail:
76221 - return NULL;
76222 -}
76223 -
76224 -
76225 -SWIGINTERN PyObject *_wrap_VImage_stdif(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76226 - PyObject *resultobj = 0;
76227 - vips::VImage *arg1 = (vips::VImage *) 0 ;
76228 - double arg2 ;
76229 - double arg3 ;
76230 - double arg4 ;
76231 - double arg5 ;
76232 - int arg6 ;
76233 - int arg7 ;
76234 - void *argp1 = 0 ;
76235 - int res1 = 0 ;
76236 - double val2 ;
76237 - int ecode2 = 0 ;
76238 - double val3 ;
76239 - int ecode3 = 0 ;
76240 - double val4 ;
76241 - int ecode4 = 0 ;
76242 - double val5 ;
76243 - int ecode5 = 0 ;
76244 - int val6 ;
76245 - int ecode6 = 0 ;
76246 - int val7 ;
76247 - int ecode7 = 0 ;
76248 - PyObject * obj0 = 0 ;
76249 - PyObject * obj1 = 0 ;
76250 - PyObject * obj2 = 0 ;
76251 - PyObject * obj3 = 0 ;
76252 - PyObject * obj4 = 0 ;
76253 - PyObject * obj5 = 0 ;
76254 - PyObject * obj6 = 0 ;
76255 - vips::VImage result;
76256 -
76257 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_stdif",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
76258 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
76259 - if (!SWIG_IsOK(res1)) {
76260 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_stdif" "', argument " "1"" of type '" "vips::VImage *""'");
76261 - }
76262 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
76263 - ecode2 = SWIG_AsVal_double(obj1, &val2);
76264 - if (!SWIG_IsOK(ecode2)) {
76265 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_stdif" "', argument " "2"" of type '" "double""'");
76266 - }
76267 - arg2 = static_cast< double >(val2);
76268 - ecode3 = SWIG_AsVal_double(obj2, &val3);
76269 - if (!SWIG_IsOK(ecode3)) {
76270 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_stdif" "', argument " "3"" of type '" "double""'");
76271 - }
76272 - arg3 = static_cast< double >(val3);
76273 - ecode4 = SWIG_AsVal_double(obj3, &val4);
76274 - if (!SWIG_IsOK(ecode4)) {
76275 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_stdif" "', argument " "4"" of type '" "double""'");
76276 - }
76277 - arg4 = static_cast< double >(val4);
76278 - ecode5 = SWIG_AsVal_double(obj4, &val5);
76279 - if (!SWIG_IsOK(ecode5)) {
76280 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_stdif" "', argument " "5"" of type '" "double""'");
76281 - }
76282 - arg5 = static_cast< double >(val5);
76283 - ecode6 = SWIG_AsVal_int(obj5, &val6);
76284 - if (!SWIG_IsOK(ecode6)) {
76285 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_stdif" "', argument " "6"" of type '" "int""'");
76286 - }
76287 - arg6 = static_cast< int >(val6);
76288 - ecode7 = SWIG_AsVal_int(obj6, &val7);
76289 - if (!SWIG_IsOK(ecode7)) {
76290 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_stdif" "', argument " "7"" of type '" "int""'");
76291 - }
76292 - arg7 = static_cast< int >(val7);
76293 - try {
76294 - result = (arg1)->stdif(arg2,arg3,arg4,arg5,arg6,arg7);
76295 - }
76296 - catch(vips::VError &_e) {
76297 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
76298 - }
76299 -
76300 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
76301 - return resultobj;
76302 -fail:
76303 - return NULL;
76304 -}
76305 -
76306 -
76307 -SWIGINTERN PyObject *_wrap_VImage_tone_analyse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76308 - PyObject *resultobj = 0;
76309 - vips::VImage *arg1 = (vips::VImage *) 0 ;
76310 - double arg2 ;
76311 - double arg3 ;
76312 - double arg4 ;
76313 - double arg5 ;
76314 - double arg6 ;
76315 - double arg7 ;
76316 - void *argp1 = 0 ;
76317 - int res1 = 0 ;
76318 - double val2 ;
76319 - int ecode2 = 0 ;
76320 - double val3 ;
76321 - int ecode3 = 0 ;
76322 - double val4 ;
76323 - int ecode4 = 0 ;
76324 - double val5 ;
76325 - int ecode5 = 0 ;
76326 - double val6 ;
76327 - int ecode6 = 0 ;
76328 - double val7 ;
76329 - int ecode7 = 0 ;
76330 - PyObject * obj0 = 0 ;
76331 - PyObject * obj1 = 0 ;
76332 - PyObject * obj2 = 0 ;
76333 - PyObject * obj3 = 0 ;
76334 - PyObject * obj4 = 0 ;
76335 - PyObject * obj5 = 0 ;
76336 - PyObject * obj6 = 0 ;
76337 - vips::VImage result;
76338 -
76339 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_tone_analyse",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
76340 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
76341 - if (!SWIG_IsOK(res1)) {
76342 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tone_analyse" "', argument " "1"" of type '" "vips::VImage *""'");
76343 - }
76344 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
76345 - ecode2 = SWIG_AsVal_double(obj1, &val2);
76346 - if (!SWIG_IsOK(ecode2)) {
76347 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_tone_analyse" "', argument " "2"" of type '" "double""'");
76348 - }
76349 - arg2 = static_cast< double >(val2);
76350 - ecode3 = SWIG_AsVal_double(obj2, &val3);
76351 - if (!SWIG_IsOK(ecode3)) {
76352 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_tone_analyse" "', argument " "3"" of type '" "double""'");
76353 - }
76354 - arg3 = static_cast< double >(val3);
76355 - ecode4 = SWIG_AsVal_double(obj3, &val4);
76356 - if (!SWIG_IsOK(ecode4)) {
76357 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_tone_analyse" "', argument " "4"" of type '" "double""'");
76358 - }
76359 - arg4 = static_cast< double >(val4);
76360 - ecode5 = SWIG_AsVal_double(obj4, &val5);
76361 - if (!SWIG_IsOK(ecode5)) {
76362 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_tone_analyse" "', argument " "5"" of type '" "double""'");
76363 - }
76364 - arg5 = static_cast< double >(val5);
76365 - ecode6 = SWIG_AsVal_double(obj5, &val6);
76366 - if (!SWIG_IsOK(ecode6)) {
76367 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_tone_analyse" "', argument " "6"" of type '" "double""'");
76368 - }
76369 - arg6 = static_cast< double >(val6);
76370 - ecode7 = SWIG_AsVal_double(obj6, &val7);
76371 - if (!SWIG_IsOK(ecode7)) {
76372 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_tone_analyse" "', argument " "7"" of type '" "double""'");
76373 - }
76374 - arg7 = static_cast< double >(val7);
76375 - try {
76376 - result = (arg1)->tone_analyse(arg2,arg3,arg4,arg5,arg6,arg7);
76377 - }
76378 - catch(vips::VError &_e) {
76379 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
76380 - }
76381 -
76382 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
76383 - return resultobj;
76384 -fail:
76385 - return NULL;
76386 -}
76387 -
76388 -
76389 -SWIGINTERN PyObject *_wrap_VImage_tone_build(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76390 - PyObject *resultobj = 0;
76391 - double arg1 ;
76392 - double arg2 ;
76393 - double arg3 ;
76394 - double arg4 ;
76395 - double arg5 ;
76396 - double arg6 ;
76397 - double arg7 ;
76398 - double arg8 ;
76399 - double val1 ;
76400 - int ecode1 = 0 ;
76401 - double val2 ;
76402 - int ecode2 = 0 ;
76403 - double val3 ;
76404 - int ecode3 = 0 ;
76405 - double val4 ;
76406 - int ecode4 = 0 ;
76407 - double val5 ;
76408 - int ecode5 = 0 ;
76409 - double val6 ;
76410 - int ecode6 = 0 ;
76411 - double val7 ;
76412 - int ecode7 = 0 ;
76413 - double val8 ;
76414 - int ecode8 = 0 ;
76415 - PyObject * obj0 = 0 ;
76416 - PyObject * obj1 = 0 ;
76417 - PyObject * obj2 = 0 ;
76418 - PyObject * obj3 = 0 ;
76419 - PyObject * obj4 = 0 ;
76420 - PyObject * obj5 = 0 ;
76421 - PyObject * obj6 = 0 ;
76422 - PyObject * obj7 = 0 ;
76423 - vips::VImage result;
76424 -
76425 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:VImage_tone_build",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
76426 - ecode1 = SWIG_AsVal_double(obj0, &val1);
76427 - if (!SWIG_IsOK(ecode1)) {
76428 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_tone_build" "', argument " "1"" of type '" "double""'");
76429 - }
76430 - arg1 = static_cast< double >(val1);
76431 - ecode2 = SWIG_AsVal_double(obj1, &val2);
76432 - if (!SWIG_IsOK(ecode2)) {
76433 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_tone_build" "', argument " "2"" of type '" "double""'");
76434 - }
76435 - arg2 = static_cast< double >(val2);
76436 - ecode3 = SWIG_AsVal_double(obj2, &val3);
76437 - if (!SWIG_IsOK(ecode3)) {
76438 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_tone_build" "', argument " "3"" of type '" "double""'");
76439 - }
76440 - arg3 = static_cast< double >(val3);
76441 - ecode4 = SWIG_AsVal_double(obj3, &val4);
76442 - if (!SWIG_IsOK(ecode4)) {
76443 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_tone_build" "', argument " "4"" of type '" "double""'");
76444 - }
76445 - arg4 = static_cast< double >(val4);
76446 - ecode5 = SWIG_AsVal_double(obj4, &val5);
76447 - if (!SWIG_IsOK(ecode5)) {
76448 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_tone_build" "', argument " "5"" of type '" "double""'");
76449 - }
76450 - arg5 = static_cast< double >(val5);
76451 - ecode6 = SWIG_AsVal_double(obj5, &val6);
76452 - if (!SWIG_IsOK(ecode6)) {
76453 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_tone_build" "', argument " "6"" of type '" "double""'");
76454 - }
76455 - arg6 = static_cast< double >(val6);
76456 - ecode7 = SWIG_AsVal_double(obj6, &val7);
76457 - if (!SWIG_IsOK(ecode7)) {
76458 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_tone_build" "', argument " "7"" of type '" "double""'");
76459 - }
76460 - arg7 = static_cast< double >(val7);
76461 - ecode8 = SWIG_AsVal_double(obj7, &val8);
76462 - if (!SWIG_IsOK(ecode8)) {
76463 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_tone_build" "', argument " "8"" of type '" "double""'");
76464 - }
76465 - arg8 = static_cast< double >(val8);
76466 - try {
76467 - result = vips::VImage::tone_build(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
76468 - }
76469 - catch(vips::VError &_e) {
76470 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
76471 - }
76472 -
76473 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
76474 - return resultobj;
76475 -fail:
76476 - return NULL;
76477 -}
76478 -
76479 -
76480 -SWIGINTERN PyObject *_wrap_VImage_tone_build_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76481 - PyObject *resultobj = 0;
76482 - int arg1 ;
76483 - int arg2 ;
76484 - double arg3 ;
76485 - double arg4 ;
76486 - double arg5 ;
76487 - double arg6 ;
76488 - double arg7 ;
76489 - double arg8 ;
76490 - double arg9 ;
76491 - double arg10 ;
76492 - int val1 ;
76493 - int ecode1 = 0 ;
76494 - int val2 ;
76495 - int ecode2 = 0 ;
76496 - double val3 ;
76497 - int ecode3 = 0 ;
76498 - double val4 ;
76499 - int ecode4 = 0 ;
76500 - double val5 ;
76501 - int ecode5 = 0 ;
76502 - double val6 ;
76503 - int ecode6 = 0 ;
76504 - double val7 ;
76505 - int ecode7 = 0 ;
76506 - double val8 ;
76507 - int ecode8 = 0 ;
76508 - double val9 ;
76509 - int ecode9 = 0 ;
76510 - double val10 ;
76511 - int ecode10 = 0 ;
76512 - PyObject * obj0 = 0 ;
76513 - PyObject * obj1 = 0 ;
76514 - PyObject * obj2 = 0 ;
76515 - PyObject * obj3 = 0 ;
76516 - PyObject * obj4 = 0 ;
76517 - PyObject * obj5 = 0 ;
76518 - PyObject * obj6 = 0 ;
76519 - PyObject * obj7 = 0 ;
76520 - PyObject * obj8 = 0 ;
76521 - PyObject * obj9 = 0 ;
76522 - vips::VImage result;
76523 -
76524 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:VImage_tone_build_range",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
76525 - ecode1 = SWIG_AsVal_int(obj0, &val1);
76526 - if (!SWIG_IsOK(ecode1)) {
76527 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_tone_build_range" "', argument " "1"" of type '" "int""'");
76528 - }
76529 - arg1 = static_cast< int >(val1);
76530 - ecode2 = SWIG_AsVal_int(obj1, &val2);
76531 - if (!SWIG_IsOK(ecode2)) {
76532 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_tone_build_range" "', argument " "2"" of type '" "int""'");
76533 - }
76534 - arg2 = static_cast< int >(val2);
76535 - ecode3 = SWIG_AsVal_double(obj2, &val3);
76536 - if (!SWIG_IsOK(ecode3)) {
76537 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_tone_build_range" "', argument " "3"" of type '" "double""'");
76538 - }
76539 - arg3 = static_cast< double >(val3);
76540 - ecode4 = SWIG_AsVal_double(obj3, &val4);
76541 - if (!SWIG_IsOK(ecode4)) {
76542 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_tone_build_range" "', argument " "4"" of type '" "double""'");
76543 - }
76544 - arg4 = static_cast< double >(val4);
76545 - ecode5 = SWIG_AsVal_double(obj4, &val5);
76546 - if (!SWIG_IsOK(ecode5)) {
76547 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_tone_build_range" "', argument " "5"" of type '" "double""'");
76548 - }
76549 - arg5 = static_cast< double >(val5);
76550 - ecode6 = SWIG_AsVal_double(obj5, &val6);
76551 - if (!SWIG_IsOK(ecode6)) {
76552 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_tone_build_range" "', argument " "6"" of type '" "double""'");
76553 - }
76554 - arg6 = static_cast< double >(val6);
76555 - ecode7 = SWIG_AsVal_double(obj6, &val7);
76556 - if (!SWIG_IsOK(ecode7)) {
76557 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_tone_build_range" "', argument " "7"" of type '" "double""'");
76558 - }
76559 - arg7 = static_cast< double >(val7);
76560 - ecode8 = SWIG_AsVal_double(obj7, &val8);
76561 - if (!SWIG_IsOK(ecode8)) {
76562 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_tone_build_range" "', argument " "8"" of type '" "double""'");
76563 - }
76564 - arg8 = static_cast< double >(val8);
76565 - ecode9 = SWIG_AsVal_double(obj8, &val9);
76566 - if (!SWIG_IsOK(ecode9)) {
76567 - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_tone_build_range" "', argument " "9"" of type '" "double""'");
76568 - }
76569 - arg9 = static_cast< double >(val9);
76570 - ecode10 = SWIG_AsVal_double(obj9, &val10);
76571 - if (!SWIG_IsOK(ecode10)) {
76572 - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_tone_build_range" "', argument " "10"" of type '" "double""'");
76573 - }
76574 - arg10 = static_cast< double >(val10);
76575 - try {
76576 - result = vips::VImage::tone_build_range(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
76577 - }
76578 - catch(vips::VError &_e) {
76579 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
76580 - }
76581 -
76582 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
76583 - return resultobj;
76584 -fail:
76585 - return NULL;
76586 -}
76587 -
76588 -
76589 -SWIGINTERN PyObject *_wrap_VImage_tone_map(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76590 - PyObject *resultobj = 0;
76591 - vips::VImage *arg1 = (vips::VImage *) 0 ;
76592 - vips::VImage arg2 ;
76593 - void *argp1 = 0 ;
76594 - int res1 = 0 ;
76595 - void *argp2 ;
76596 - int res2 = 0 ;
76597 - PyObject * obj0 = 0 ;
76598 - PyObject * obj1 = 0 ;
76599 - vips::VImage result;
76600 -
76601 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_tone_map",&obj0,&obj1)) SWIG_fail;
76602 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
76603 - if (!SWIG_IsOK(res1)) {
76604 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tone_map" "', argument " "1"" of type '" "vips::VImage *""'");
76605 - }
76606 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
76607 - {
76608 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
76609 - if (!SWIG_IsOK(res2)) {
76610 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_tone_map" "', argument " "2"" of type '" "vips::VImage""'");
76611 - }
76612 - if (!argp2) {
76613 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_tone_map" "', argument " "2"" of type '" "vips::VImage""'");
76614 - } else {
76615 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
76616 - arg2 = *temp;
76617 - if (SWIG_IsNewObj(res2)) delete temp;
76618 - }
76619 - }
76620 - try {
76621 - result = (arg1)->tone_map(arg2);
76622 - }
76623 - catch(vips::VError &_e) {
76624 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
76625 - }
76626 -
76627 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
76628 - return resultobj;
76629 -fail:
76630 - return NULL;
76631 -}
76632 -
76633 -
76634 -SWIGINTERN PyObject *_wrap_VImage_draw_circle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76635 - PyObject *resultobj = 0;
76636 - vips::VImage *arg1 = (vips::VImage *) 0 ;
76637 - int arg2 ;
76638 - int arg3 ;
76639 - int arg4 ;
76640 - int arg5 ;
76641 - std::vector< double,std::allocator< double > > arg6 ;
76642 - void *argp1 = 0 ;
76643 - int res1 = 0 ;
76644 - int val2 ;
76645 - int ecode2 = 0 ;
76646 - int val3 ;
76647 - int ecode3 = 0 ;
76648 - int val4 ;
76649 - int ecode4 = 0 ;
76650 - int val5 ;
76651 - int ecode5 = 0 ;
76652 - PyObject * obj0 = 0 ;
76653 - PyObject * obj1 = 0 ;
76654 - PyObject * obj2 = 0 ;
76655 - PyObject * obj3 = 0 ;
76656 - PyObject * obj4 = 0 ;
76657 - PyObject * obj5 = 0 ;
76658 -
76659 - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:VImage_draw_circle",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
76660 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
76661 - if (!SWIG_IsOK(res1)) {
76662 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_circle" "', argument " "1"" of type '" "vips::VImage *""'");
76663 - }
76664 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
76665 - ecode2 = SWIG_AsVal_int(obj1, &val2);
76666 - if (!SWIG_IsOK(ecode2)) {
76667 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_draw_circle" "', argument " "2"" of type '" "int""'");
76668 - }
76669 - arg2 = static_cast< int >(val2);
76670 - ecode3 = SWIG_AsVal_int(obj2, &val3);
76671 - if (!SWIG_IsOK(ecode3)) {
76672 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_circle" "', argument " "3"" of type '" "int""'");
76673 - }
76674 - arg3 = static_cast< int >(val3);
76675 - ecode4 = SWIG_AsVal_int(obj3, &val4);
76676 - if (!SWIG_IsOK(ecode4)) {
76677 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_draw_circle" "', argument " "4"" of type '" "int""'");
76678 - }
76679 - arg4 = static_cast< int >(val4);
76680 - ecode5 = SWIG_AsVal_int(obj4, &val5);
76681 - if (!SWIG_IsOK(ecode5)) {
76682 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_draw_circle" "', argument " "5"" of type '" "int""'");
76683 - }
76684 - arg5 = static_cast< int >(val5);
76685 - {
76686 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
76687 - int res = swig::asptr(obj5, &ptr);
76688 - if (!SWIG_IsOK(res) || !ptr) {
76689 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_draw_circle" "', argument " "6"" of type '" "std::vector< double,std::allocator< double > >""'");
76690 - }
76691 - arg6 = *ptr;
76692 - if (SWIG_IsNewObj(res)) delete ptr;
76693 - }
76694 - try {
76695 - (arg1)->draw_circle(arg2,arg3,arg4,arg5,arg6);
76696 - }
76697 - catch(vips::VError &_e) {
76698 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
76699 - }
76700 -
76701 - resultobj = SWIG_Py_Void();
76702 - return resultobj;
76703 -fail:
76704 - return NULL;
76705 -}
76706 -
76707 -
76708 -SWIGINTERN PyObject *_wrap_VImage_draw_rect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76709 - PyObject *resultobj = 0;
76710 - vips::VImage *arg1 = (vips::VImage *) 0 ;
76711 - int arg2 ;
76712 - int arg3 ;
76713 - int arg4 ;
76714 - int arg5 ;
76715 - int arg6 ;
76716 - std::vector< double,std::allocator< double > > arg7 ;
76717 - void *argp1 = 0 ;
76718 - int res1 = 0 ;
76719 - int val2 ;
76720 - int ecode2 = 0 ;
76721 - int val3 ;
76722 - int ecode3 = 0 ;
76723 - int val4 ;
76724 - int ecode4 = 0 ;
76725 - int val5 ;
76726 - int ecode5 = 0 ;
76727 - int val6 ;
76728 - int ecode6 = 0 ;
76729 - PyObject * obj0 = 0 ;
76730 - PyObject * obj1 = 0 ;
76731 - PyObject * obj2 = 0 ;
76732 - PyObject * obj3 = 0 ;
76733 - PyObject * obj4 = 0 ;
76734 - PyObject * obj5 = 0 ;
76735 - PyObject * obj6 = 0 ;
76736 -
76737 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_draw_rect",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
76738 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
76739 - if (!SWIG_IsOK(res1)) {
76740 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_rect" "', argument " "1"" of type '" "vips::VImage *""'");
76741 - }
76742 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
76743 - ecode2 = SWIG_AsVal_int(obj1, &val2);
76744 - if (!SWIG_IsOK(ecode2)) {
76745 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_draw_rect" "', argument " "2"" of type '" "int""'");
76746 - }
76747 - arg2 = static_cast< int >(val2);
76748 - ecode3 = SWIG_AsVal_int(obj2, &val3);
76749 - if (!SWIG_IsOK(ecode3)) {
76750 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_rect" "', argument " "3"" of type '" "int""'");
76751 - }
76752 - arg3 = static_cast< int >(val3);
76753 - ecode4 = SWIG_AsVal_int(obj3, &val4);
76754 - if (!SWIG_IsOK(ecode4)) {
76755 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_draw_rect" "', argument " "4"" of type '" "int""'");
76756 - }
76757 - arg4 = static_cast< int >(val4);
76758 - ecode5 = SWIG_AsVal_int(obj4, &val5);
76759 - if (!SWIG_IsOK(ecode5)) {
76760 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_draw_rect" "', argument " "5"" of type '" "int""'");
76761 - }
76762 - arg5 = static_cast< int >(val5);
76763 - ecode6 = SWIG_AsVal_int(obj5, &val6);
76764 - if (!SWIG_IsOK(ecode6)) {
76765 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_draw_rect" "', argument " "6"" of type '" "int""'");
76766 - }
76767 - arg6 = static_cast< int >(val6);
76768 - {
76769 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
76770 - int res = swig::asptr(obj6, &ptr);
76771 - if (!SWIG_IsOK(res) || !ptr) {
76772 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_draw_rect" "', argument " "7"" of type '" "std::vector< double,std::allocator< double > >""'");
76773 - }
76774 - arg7 = *ptr;
76775 - if (SWIG_IsNewObj(res)) delete ptr;
76776 - }
76777 - try {
76778 - (arg1)->draw_rect(arg2,arg3,arg4,arg5,arg6,arg7);
76779 - }
76780 - catch(vips::VError &_e) {
76781 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
76782 - }
76783 -
76784 - resultobj = SWIG_Py_Void();
76785 - return resultobj;
76786 -fail:
76787 - return NULL;
76788 -}
76789 -
76790 -
76791 -SWIGINTERN PyObject *_wrap_VImage_draw_line(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76792 - PyObject *resultobj = 0;
76793 - vips::VImage *arg1 = (vips::VImage *) 0 ;
76794 - int arg2 ;
76795 - int arg3 ;
76796 - int arg4 ;
76797 - int arg5 ;
76798 - std::vector< double,std::allocator< double > > arg6 ;
76799 - void *argp1 = 0 ;
76800 - int res1 = 0 ;
76801 - int val2 ;
76802 - int ecode2 = 0 ;
76803 - int val3 ;
76804 - int ecode3 = 0 ;
76805 - int val4 ;
76806 - int ecode4 = 0 ;
76807 - int val5 ;
76808 - int ecode5 = 0 ;
76809 - PyObject * obj0 = 0 ;
76810 - PyObject * obj1 = 0 ;
76811 - PyObject * obj2 = 0 ;
76812 - PyObject * obj3 = 0 ;
76813 - PyObject * obj4 = 0 ;
76814 - PyObject * obj5 = 0 ;
76815 -
76816 - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:VImage_draw_line",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
76817 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
76818 - if (!SWIG_IsOK(res1)) {
76819 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_line" "', argument " "1"" of type '" "vips::VImage *""'");
76820 - }
76821 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
76822 - ecode2 = SWIG_AsVal_int(obj1, &val2);
76823 - if (!SWIG_IsOK(ecode2)) {
76824 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_draw_line" "', argument " "2"" of type '" "int""'");
76825 - }
76826 - arg2 = static_cast< int >(val2);
76827 - ecode3 = SWIG_AsVal_int(obj2, &val3);
76828 - if (!SWIG_IsOK(ecode3)) {
76829 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_line" "', argument " "3"" of type '" "int""'");
76830 - }
76831 - arg3 = static_cast< int >(val3);
76832 - ecode4 = SWIG_AsVal_int(obj3, &val4);
76833 - if (!SWIG_IsOK(ecode4)) {
76834 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_draw_line" "', argument " "4"" of type '" "int""'");
76835 - }
76836 - arg4 = static_cast< int >(val4);
76837 - ecode5 = SWIG_AsVal_int(obj4, &val5);
76838 - if (!SWIG_IsOK(ecode5)) {
76839 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_draw_line" "', argument " "5"" of type '" "int""'");
76840 - }
76841 - arg5 = static_cast< int >(val5);
76842 - {
76843 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
76844 - int res = swig::asptr(obj5, &ptr);
76845 - if (!SWIG_IsOK(res) || !ptr) {
76846 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_draw_line" "', argument " "6"" of type '" "std::vector< double,std::allocator< double > >""'");
76847 - }
76848 - arg6 = *ptr;
76849 - if (SWIG_IsNewObj(res)) delete ptr;
76850 - }
76851 - try {
76852 - (arg1)->draw_line(arg2,arg3,arg4,arg5,arg6);
76853 - }
76854 - catch(vips::VError &_e) {
76855 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
76856 - }
76857 -
76858 - resultobj = SWIG_Py_Void();
76859 - return resultobj;
76860 -fail:
76861 - return NULL;
76862 -}
76863 -
76864 -
76865 -SWIGINTERN PyObject *_wrap_VImage_draw_point(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76866 - PyObject *resultobj = 0;
76867 - vips::VImage *arg1 = (vips::VImage *) 0 ;
76868 - int arg2 ;
76869 - int arg3 ;
76870 - std::vector< double,std::allocator< double > > arg4 ;
76871 - void *argp1 = 0 ;
76872 - int res1 = 0 ;
76873 - int val2 ;
76874 - int ecode2 = 0 ;
76875 - int val3 ;
76876 - int ecode3 = 0 ;
76877 - PyObject * obj0 = 0 ;
76878 - PyObject * obj1 = 0 ;
76879 - PyObject * obj2 = 0 ;
76880 - PyObject * obj3 = 0 ;
76881 -
76882 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_draw_point",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
76883 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
76884 - if (!SWIG_IsOK(res1)) {
76885 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_point" "', argument " "1"" of type '" "vips::VImage *""'");
76886 - }
76887 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
76888 - ecode2 = SWIG_AsVal_int(obj1, &val2);
76889 - if (!SWIG_IsOK(ecode2)) {
76890 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_draw_point" "', argument " "2"" of type '" "int""'");
76891 - }
76892 - arg2 = static_cast< int >(val2);
76893 - ecode3 = SWIG_AsVal_int(obj2, &val3);
76894 - if (!SWIG_IsOK(ecode3)) {
76895 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_point" "', argument " "3"" of type '" "int""'");
76896 - }
76897 - arg3 = static_cast< int >(val3);
76898 - {
76899 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
76900 - int res = swig::asptr(obj3, &ptr);
76901 - if (!SWIG_IsOK(res) || !ptr) {
76902 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_draw_point" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > >""'");
76903 - }
76904 - arg4 = *ptr;
76905 - if (SWIG_IsNewObj(res)) delete ptr;
76906 - }
76907 - try {
76908 - (arg1)->draw_point(arg2,arg3,arg4);
76909 - }
76910 - catch(vips::VError &_e) {
76911 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
76912 - }
76913 -
76914 - resultobj = SWIG_Py_Void();
76915 - return resultobj;
76916 -fail:
76917 - return NULL;
76918 -}
76919 -
76920 -
76921 -SWIGINTERN PyObject *_wrap_VImage_draw_smudge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76922 - PyObject *resultobj = 0;
76923 - vips::VImage *arg1 = (vips::VImage *) 0 ;
76924 - int arg2 ;
76925 - int arg3 ;
76926 - int arg4 ;
76927 - int arg5 ;
76928 - void *argp1 = 0 ;
76929 - int res1 = 0 ;
76930 - int val2 ;
76931 - int ecode2 = 0 ;
76932 - int val3 ;
76933 - int ecode3 = 0 ;
76934 - int val4 ;
76935 - int ecode4 = 0 ;
76936 - int val5 ;
76937 - int ecode5 = 0 ;
76938 - PyObject * obj0 = 0 ;
76939 - PyObject * obj1 = 0 ;
76940 - PyObject * obj2 = 0 ;
76941 - PyObject * obj3 = 0 ;
76942 - PyObject * obj4 = 0 ;
76943 -
76944 - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_draw_smudge",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
76945 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
76946 - if (!SWIG_IsOK(res1)) {
76947 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_smudge" "', argument " "1"" of type '" "vips::VImage *""'");
76948 - }
76949 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
76950 - ecode2 = SWIG_AsVal_int(obj1, &val2);
76951 - if (!SWIG_IsOK(ecode2)) {
76952 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_draw_smudge" "', argument " "2"" of type '" "int""'");
76953 - }
76954 - arg2 = static_cast< int >(val2);
76955 - ecode3 = SWIG_AsVal_int(obj2, &val3);
76956 - if (!SWIG_IsOK(ecode3)) {
76957 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_smudge" "', argument " "3"" of type '" "int""'");
76958 - }
76959 - arg3 = static_cast< int >(val3);
76960 - ecode4 = SWIG_AsVal_int(obj3, &val4);
76961 - if (!SWIG_IsOK(ecode4)) {
76962 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_draw_smudge" "', argument " "4"" of type '" "int""'");
76963 - }
76964 - arg4 = static_cast< int >(val4);
76965 - ecode5 = SWIG_AsVal_int(obj4, &val5);
76966 - if (!SWIG_IsOK(ecode5)) {
76967 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_draw_smudge" "', argument " "5"" of type '" "int""'");
76968 - }
76969 - arg5 = static_cast< int >(val5);
76970 - try {
76971 - (arg1)->draw_smudge(arg2,arg3,arg4,arg5);
76972 - }
76973 - catch(vips::VError &_e) {
76974 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
76975 - }
76976 -
76977 - resultobj = SWIG_Py_Void();
76978 - return resultobj;
76979 -fail:
76980 - return NULL;
76981 -}
76982 -
76983 -
76984 -SWIGINTERN PyObject *_wrap_VImage_draw_flood(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76985 - PyObject *resultobj = 0;
76986 - vips::VImage *arg1 = (vips::VImage *) 0 ;
76987 - int arg2 ;
76988 - int arg3 ;
76989 - std::vector< double,std::allocator< double > > arg4 ;
76990 - void *argp1 = 0 ;
76991 - int res1 = 0 ;
76992 - int val2 ;
76993 - int ecode2 = 0 ;
76994 - int val3 ;
76995 - int ecode3 = 0 ;
76996 - PyObject * obj0 = 0 ;
76997 - PyObject * obj1 = 0 ;
76998 - PyObject * obj2 = 0 ;
76999 - PyObject * obj3 = 0 ;
77000 -
77001 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_draw_flood",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
77002 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
77003 - if (!SWIG_IsOK(res1)) {
77004 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_flood" "', argument " "1"" of type '" "vips::VImage *""'");
77005 - }
77006 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
77007 - ecode2 = SWIG_AsVal_int(obj1, &val2);
77008 - if (!SWIG_IsOK(ecode2)) {
77009 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_draw_flood" "', argument " "2"" of type '" "int""'");
77010 - }
77011 - arg2 = static_cast< int >(val2);
77012 - ecode3 = SWIG_AsVal_int(obj2, &val3);
77013 - if (!SWIG_IsOK(ecode3)) {
77014 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_flood" "', argument " "3"" of type '" "int""'");
77015 - }
77016 - arg3 = static_cast< int >(val3);
77017 - {
77018 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
77019 - int res = swig::asptr(obj3, &ptr);
77020 - if (!SWIG_IsOK(res) || !ptr) {
77021 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_draw_flood" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > >""'");
77022 - }
77023 - arg4 = *ptr;
77024 - if (SWIG_IsNewObj(res)) delete ptr;
77025 - }
77026 - try {
77027 - (arg1)->draw_flood(arg2,arg3,arg4);
77028 - }
77029 - catch(vips::VError &_e) {
77030 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
77031 - }
77032 -
77033 - resultobj = SWIG_Py_Void();
77034 - return resultobj;
77035 -fail:
77036 - return NULL;
77037 -}
77038 -
77039 -
77040 -SWIGINTERN PyObject *_wrap_VImage_draw_flood_blob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77041 - PyObject *resultobj = 0;
77042 - vips::VImage *arg1 = (vips::VImage *) 0 ;
77043 - int arg2 ;
77044 - int arg3 ;
77045 - std::vector< double,std::allocator< double > > arg4 ;
77046 - void *argp1 = 0 ;
77047 - int res1 = 0 ;
77048 - int val2 ;
77049 - int ecode2 = 0 ;
77050 - int val3 ;
77051 - int ecode3 = 0 ;
77052 - PyObject * obj0 = 0 ;
77053 - PyObject * obj1 = 0 ;
77054 - PyObject * obj2 = 0 ;
77055 - PyObject * obj3 = 0 ;
77056 -
77057 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_draw_flood_blob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
77058 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
77059 - if (!SWIG_IsOK(res1)) {
77060 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_flood_blob" "', argument " "1"" of type '" "vips::VImage *""'");
77061 - }
77062 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
77063 - ecode2 = SWIG_AsVal_int(obj1, &val2);
77064 - if (!SWIG_IsOK(ecode2)) {
77065 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_draw_flood_blob" "', argument " "2"" of type '" "int""'");
77066 - }
77067 - arg2 = static_cast< int >(val2);
77068 - ecode3 = SWIG_AsVal_int(obj2, &val3);
77069 - if (!SWIG_IsOK(ecode3)) {
77070 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_flood_blob" "', argument " "3"" of type '" "int""'");
77071 - }
77072 - arg3 = static_cast< int >(val3);
77073 - {
77074 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
77075 - int res = swig::asptr(obj3, &ptr);
77076 - if (!SWIG_IsOK(res) || !ptr) {
77077 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_draw_flood_blob" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > >""'");
77078 - }
77079 - arg4 = *ptr;
77080 - if (SWIG_IsNewObj(res)) delete ptr;
77081 - }
77082 - try {
77083 - (arg1)->draw_flood_blob(arg2,arg3,arg4);
77084 - }
77085 - catch(vips::VError &_e) {
77086 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
77087 - }
77088 -
77089 - resultobj = SWIG_Py_Void();
77090 - return resultobj;
77091 -fail:
77092 - return NULL;
77093 -}
77094 -
77095 -
77096 -SWIGINTERN PyObject *_wrap_VImage_draw_flood_other(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77097 - PyObject *resultobj = 0;
77098 - vips::VImage *arg1 = (vips::VImage *) 0 ;
77099 - vips::VImage arg2 ;
77100 - int arg3 ;
77101 - int arg4 ;
77102 - int arg5 ;
77103 - void *argp1 = 0 ;
77104 - int res1 = 0 ;
77105 - void *argp2 ;
77106 - int res2 = 0 ;
77107 - int val3 ;
77108 - int ecode3 = 0 ;
77109 - int val4 ;
77110 - int ecode4 = 0 ;
77111 - int val5 ;
77112 - int ecode5 = 0 ;
77113 - PyObject * obj0 = 0 ;
77114 - PyObject * obj1 = 0 ;
77115 - PyObject * obj2 = 0 ;
77116 - PyObject * obj3 = 0 ;
77117 - PyObject * obj4 = 0 ;
77118 -
77119 - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_draw_flood_other",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
77120 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
77121 - if (!SWIG_IsOK(res1)) {
77122 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_flood_other" "', argument " "1"" of type '" "vips::VImage *""'");
77123 - }
77124 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
77125 - {
77126 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
77127 - if (!SWIG_IsOK(res2)) {
77128 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_draw_flood_other" "', argument " "2"" of type '" "vips::VImage""'");
77129 - }
77130 - if (!argp2) {
77131 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_draw_flood_other" "', argument " "2"" of type '" "vips::VImage""'");
77132 - } else {
77133 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
77134 - arg2 = *temp;
77135 - if (SWIG_IsNewObj(res2)) delete temp;
77136 - }
77137 - }
77138 - ecode3 = SWIG_AsVal_int(obj2, &val3);
77139 - if (!SWIG_IsOK(ecode3)) {
77140 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_flood_other" "', argument " "3"" of type '" "int""'");
77141 - }
77142 - arg3 = static_cast< int >(val3);
77143 - ecode4 = SWIG_AsVal_int(obj3, &val4);
77144 - if (!SWIG_IsOK(ecode4)) {
77145 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_draw_flood_other" "', argument " "4"" of type '" "int""'");
77146 - }
77147 - arg4 = static_cast< int >(val4);
77148 - ecode5 = SWIG_AsVal_int(obj4, &val5);
77149 - if (!SWIG_IsOK(ecode5)) {
77150 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_draw_flood_other" "', argument " "5"" of type '" "int""'");
77151 - }
77152 - arg5 = static_cast< int >(val5);
77153 - try {
77154 - (arg1)->draw_flood_other(arg2,arg3,arg4,arg5);
77155 - }
77156 - catch(vips::VError &_e) {
77157 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
77158 - }
77159 -
77160 - resultobj = SWIG_Py_Void();
77161 - return resultobj;
77162 -fail:
77163 - return NULL;
77164 -}
77165 -
77166 -
77167 -SWIGINTERN PyObject *_wrap_VImage_draw_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77168 - PyObject *resultobj = 0;
77169 - vips::VImage *arg1 = (vips::VImage *) 0 ;
77170 - vips::VImage arg2 ;
77171 - int arg3 ;
77172 - int arg4 ;
77173 - void *argp1 = 0 ;
77174 - int res1 = 0 ;
77175 - void *argp2 ;
77176 - int res2 = 0 ;
77177 - int val3 ;
77178 - int ecode3 = 0 ;
77179 - int val4 ;
77180 - int ecode4 = 0 ;
77181 - PyObject * obj0 = 0 ;
77182 - PyObject * obj1 = 0 ;
77183 - PyObject * obj2 = 0 ;
77184 - PyObject * obj3 = 0 ;
77185 -
77186 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_draw_image",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
77187 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
77188 - if (!SWIG_IsOK(res1)) {
77189 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_image" "', argument " "1"" of type '" "vips::VImage *""'");
77190 - }
77191 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
77192 - {
77193 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
77194 - if (!SWIG_IsOK(res2)) {
77195 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_draw_image" "', argument " "2"" of type '" "vips::VImage""'");
77196 - }
77197 - if (!argp2) {
77198 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_draw_image" "', argument " "2"" of type '" "vips::VImage""'");
77199 - } else {
77200 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
77201 - arg2 = *temp;
77202 - if (SWIG_IsNewObj(res2)) delete temp;
77203 - }
77204 - }
77205 - ecode3 = SWIG_AsVal_int(obj2, &val3);
77206 - if (!SWIG_IsOK(ecode3)) {
77207 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_image" "', argument " "3"" of type '" "int""'");
77208 - }
77209 - arg3 = static_cast< int >(val3);
77210 - ecode4 = SWIG_AsVal_int(obj3, &val4);
77211 - if (!SWIG_IsOK(ecode4)) {
77212 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_draw_image" "', argument " "4"" of type '" "int""'");
77213 - }
77214 - arg4 = static_cast< int >(val4);
77215 - try {
77216 - (arg1)->draw_image(arg2,arg3,arg4);
77217 - }
77218 - catch(vips::VError &_e) {
77219 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
77220 - }
77221 -
77222 - resultobj = SWIG_Py_Void();
77223 - return resultobj;
77224 -fail:
77225 - return NULL;
77226 -}
77227 -
77228 -
77229 -SWIGINTERN PyObject *_wrap_VImage_draw_mask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77230 - PyObject *resultobj = 0;
77231 - vips::VImage *arg1 = (vips::VImage *) 0 ;
77232 - vips::VImage arg2 ;
77233 - int arg3 ;
77234 - int arg4 ;
77235 - std::vector< double,std::allocator< double > > arg5 ;
77236 - void *argp1 = 0 ;
77237 - int res1 = 0 ;
77238 - void *argp2 ;
77239 - int res2 = 0 ;
77240 - int val3 ;
77241 - int ecode3 = 0 ;
77242 - int val4 ;
77243 - int ecode4 = 0 ;
77244 - PyObject * obj0 = 0 ;
77245 - PyObject * obj1 = 0 ;
77246 - PyObject * obj2 = 0 ;
77247 - PyObject * obj3 = 0 ;
77248 - PyObject * obj4 = 0 ;
77249 -
77250 - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_draw_mask",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
77251 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
77252 - if (!SWIG_IsOK(res1)) {
77253 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_mask" "', argument " "1"" of type '" "vips::VImage *""'");
77254 - }
77255 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
77256 - {
77257 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
77258 - if (!SWIG_IsOK(res2)) {
77259 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_draw_mask" "', argument " "2"" of type '" "vips::VImage""'");
77260 - }
77261 - if (!argp2) {
77262 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_draw_mask" "', argument " "2"" of type '" "vips::VImage""'");
77263 - } else {
77264 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
77265 - arg2 = *temp;
77266 - if (SWIG_IsNewObj(res2)) delete temp;
77267 - }
77268 - }
77269 - ecode3 = SWIG_AsVal_int(obj2, &val3);
77270 - if (!SWIG_IsOK(ecode3)) {
77271 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_mask" "', argument " "3"" of type '" "int""'");
77272 - }
77273 - arg3 = static_cast< int >(val3);
77274 - ecode4 = SWIG_AsVal_int(obj3, &val4);
77275 - if (!SWIG_IsOK(ecode4)) {
77276 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_draw_mask" "', argument " "4"" of type '" "int""'");
77277 - }
77278 - arg4 = static_cast< int >(val4);
77279 - {
77280 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
77281 - int res = swig::asptr(obj4, &ptr);
77282 - if (!SWIG_IsOK(res) || !ptr) {
77283 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_draw_mask" "', argument " "5"" of type '" "std::vector< double,std::allocator< double > >""'");
77284 - }
77285 - arg5 = *ptr;
77286 - if (SWIG_IsNewObj(res)) delete ptr;
77287 - }
77288 - try {
77289 - (arg1)->draw_mask(arg2,arg3,arg4,arg5);
77290 - }
77291 - catch(vips::VError &_e) {
77292 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
77293 - }
77294 -
77295 - resultobj = SWIG_Py_Void();
77296 - return resultobj;
77297 -fail:
77298 - return NULL;
77299 -}
77300 -
77301 -
77302 -SWIGINTERN PyObject *_wrap_VImage_line__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77303 - PyObject *resultobj = 0;
77304 - vips::VImage *arg1 = (vips::VImage *) 0 ;
77305 - vips::VImage arg2 ;
77306 - vips::VImage arg3 ;
77307 - std::vector< int,std::allocator< int > > arg4 ;
77308 - std::vector< int,std::allocator< int > > arg5 ;
77309 - std::vector< int,std::allocator< int > > arg6 ;
77310 - std::vector< int,std::allocator< int > > arg7 ;
77311 - void *argp1 = 0 ;
77312 - int res1 = 0 ;
77313 - void *argp2 ;
77314 - int res2 = 0 ;
77315 - void *argp3 ;
77316 - int res3 = 0 ;
77317 - PyObject * obj0 = 0 ;
77318 - PyObject * obj1 = 0 ;
77319 - PyObject * obj2 = 0 ;
77320 - PyObject * obj3 = 0 ;
77321 - PyObject * obj4 = 0 ;
77322 - PyObject * obj5 = 0 ;
77323 - PyObject * obj6 = 0 ;
77324 - vips::VImage result;
77325 -
77326 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_line",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
77327 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
77328 - if (!SWIG_IsOK(res1)) {
77329 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_line" "', argument " "1"" of type '" "vips::VImage *""'");
77330 - }
77331 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
77332 - {
77333 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
77334 - if (!SWIG_IsOK(res2)) {
77335 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_line" "', argument " "2"" of type '" "vips::VImage""'");
77336 - }
77337 - if (!argp2) {
77338 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_line" "', argument " "2"" of type '" "vips::VImage""'");
77339 - } else {
77340 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
77341 - arg2 = *temp;
77342 - if (SWIG_IsNewObj(res2)) delete temp;
77343 - }
77344 - }
77345 - {
77346 - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0);
77347 - if (!SWIG_IsOK(res3)) {
77348 - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_line" "', argument " "3"" of type '" "vips::VImage""'");
77349 - }
77350 - if (!argp3) {
77351 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_line" "', argument " "3"" of type '" "vips::VImage""'");
77352 - } else {
77353 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp3);
77354 - arg3 = *temp;
77355 - if (SWIG_IsNewObj(res3)) delete temp;
77356 - }
77357 - }
77358 - {
77359 - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
77360 - int res = swig::asptr(obj3, &ptr);
77361 - if (!SWIG_IsOK(res) || !ptr) {
77362 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_line" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > >""'");
77363 - }
77364 - arg4 = *ptr;
77365 - if (SWIG_IsNewObj(res)) delete ptr;
77366 - }
77367 - {
77368 - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
77369 - int res = swig::asptr(obj4, &ptr);
77370 - if (!SWIG_IsOK(res) || !ptr) {
77371 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_line" "', argument " "5"" of type '" "std::vector< int,std::allocator< int > >""'");
77372 - }
77373 - arg5 = *ptr;
77374 - if (SWIG_IsNewObj(res)) delete ptr;
77375 - }
77376 - {
77377 - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
77378 - int res = swig::asptr(obj5, &ptr);
77379 - if (!SWIG_IsOK(res) || !ptr) {
77380 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_line" "', argument " "6"" of type '" "std::vector< int,std::allocator< int > >""'");
77381 - }
77382 - arg6 = *ptr;
77383 - if (SWIG_IsNewObj(res)) delete ptr;
77384 - }
77385 - {
77386 - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
77387 - int res = swig::asptr(obj6, &ptr);
77388 - if (!SWIG_IsOK(res) || !ptr) {
77389 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_line" "', argument " "7"" of type '" "std::vector< int,std::allocator< int > >""'");
77390 - }
77391 - arg7 = *ptr;
77392 - if (SWIG_IsNewObj(res)) delete ptr;
77393 - }
77394 - try {
77395 - result = (arg1)->line(arg2,arg3,arg4,arg5,arg6,arg7);
77396 - }
77397 - catch(vips::VError &_e) {
77398 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
77399 - }
77400 -
77401 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
77402 - return resultobj;
77403 -fail:
77404 - return NULL;
77405 -}
77406 -
77407 -
77408 -SWIGINTERN PyObject *_wrap_VImage_line(PyObject *self, PyObject *args) {
77409 - int argc;
77410 - PyObject *argv[8];
77411 - int ii;
77412 -
77413 - if (!PyTuple_Check(args)) SWIG_fail;
77414 - argc = args ? (int)PyObject_Length(args) : 0;
77415 - for (ii = 0; (ii < 7) && (ii < argc); ii++) {
77416 - argv[ii] = PyTuple_GET_ITEM(args,ii);
77417 - }
77418 - if (argc == 6) {
77419 - int _v;
77420 - void *vptr = 0;
77421 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
77422 - _v = SWIG_CheckState(res);
77423 - if (_v) {
77424 - {
77425 - int res = SWIG_AsVal_int(argv[1], NULL);
77426 - _v = SWIG_CheckState(res);
77427 - }
77428 - if (_v) {
77429 - {
77430 - int res = SWIG_AsVal_int(argv[2], NULL);
77431 - _v = SWIG_CheckState(res);
77432 - }
77433 - if (_v) {
77434 - {
77435 - int res = SWIG_AsVal_int(argv[3], NULL);
77436 - _v = SWIG_CheckState(res);
77437 - }
77438 - if (_v) {
77439 - {
77440 - int res = SWIG_AsVal_int(argv[4], NULL);
77441 - _v = SWIG_CheckState(res);
77442 - }
77443 - if (_v) {
77444 - {
77445 - int res = SWIG_AsVal_int(argv[5], NULL);
77446 - _v = SWIG_CheckState(res);
77447 - }
77448 - if (_v) {
77449 - return _wrap_VImage_line__SWIG_0(self, args);
77450 - }
77451 - }
77452 - }
77453 - }
77454 - }
77455 - }
77456 - }
77457 - if (argc == 7) {
77458 - int _v;
77459 - void *vptr = 0;
77460 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
77461 - _v = SWIG_CheckState(res);
77462 - if (_v) {
77463 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
77464 - _v = SWIG_CheckState(res);
77465 - if (_v) {
77466 - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_vips__VImage, 0);
77467 - _v = SWIG_CheckState(res);
77468 - if (_v) {
77469 - int res = swig::asptr(argv[3], (std::vector<int,std::allocator< int > >**)(0));
77470 - _v = SWIG_CheckState(res);
77471 - if (_v) {
77472 - int res = swig::asptr(argv[4], (std::vector<int,std::allocator< int > >**)(0));
77473 - _v = SWIG_CheckState(res);
77474 - if (_v) {
77475 - int res = swig::asptr(argv[5], (std::vector<int,std::allocator< int > >**)(0));
77476 - _v = SWIG_CheckState(res);
77477 - if (_v) {
77478 - int res = swig::asptr(argv[6], (std::vector<int,std::allocator< int > >**)(0));
77479 - _v = SWIG_CheckState(res);
77480 - if (_v) {
77481 - return _wrap_VImage_line__SWIG_1(self, args);
77482 - }
77483 - }
77484 - }
77485 - }
77486 - }
77487 - }
77488 - }
77489 - }
77490 -
77491 -fail:
77492 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_line'.\n"
77493 - " Possible C/C++ prototypes are:\n"
77494 - " vips::VImage::line(int,int,int,int,int)\n"
77495 - " vips::VImage::line(vips::VImage,vips::VImage,std::vector< int,std::allocator< int > >,std::vector< int,std::allocator< int > >,std::vector< int,std::allocator< int > >,std::vector< int,std::allocator< int > >)\n");
77496 - return 0;
77497 -}
77498 -
77499 -
77500 -SWIGINTERN PyObject *_wrap_VImage_binfile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77501 - PyObject *resultobj = 0;
77502 - char *arg1 = (char *) 0 ;
77503 - int arg2 ;
77504 - int arg3 ;
77505 - int arg4 ;
77506 - int arg5 ;
77507 - int res1 ;
77508 - char *buf1 = 0 ;
77509 - int alloc1 = 0 ;
77510 - int val2 ;
77511 - int ecode2 = 0 ;
77512 - int val3 ;
77513 - int ecode3 = 0 ;
77514 - int val4 ;
77515 - int ecode4 = 0 ;
77516 - int val5 ;
77517 - int ecode5 = 0 ;
77518 - PyObject * obj0 = 0 ;
77519 - PyObject * obj1 = 0 ;
77520 - PyObject * obj2 = 0 ;
77521 - PyObject * obj3 = 0 ;
77522 - PyObject * obj4 = 0 ;
77523 - vips::VImage result;
77524 -
77525 - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_binfile",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
77526 - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
77527 - if (!SWIG_IsOK(res1)) {
77528 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_binfile" "', argument " "1"" of type '" "char *""'");
77529 - }
77530 - arg1 = reinterpret_cast< char * >(buf1);
77531 - ecode2 = SWIG_AsVal_int(obj1, &val2);
77532 - if (!SWIG_IsOK(ecode2)) {
77533 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_binfile" "', argument " "2"" of type '" "int""'");
77534 - }
77535 - arg2 = static_cast< int >(val2);
77536 - ecode3 = SWIG_AsVal_int(obj2, &val3);
77537 - if (!SWIG_IsOK(ecode3)) {
77538 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_binfile" "', argument " "3"" of type '" "int""'");
77539 - }
77540 - arg3 = static_cast< int >(val3);
77541 - ecode4 = SWIG_AsVal_int(obj3, &val4);
77542 - if (!SWIG_IsOK(ecode4)) {
77543 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_binfile" "', argument " "4"" of type '" "int""'");
77544 - }
77545 - arg4 = static_cast< int >(val4);
77546 - ecode5 = SWIG_AsVal_int(obj4, &val5);
77547 - if (!SWIG_IsOK(ecode5)) {
77548 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_binfile" "', argument " "5"" of type '" "int""'");
77549 - }
77550 - arg5 = static_cast< int >(val5);
77551 - try {
77552 - result = vips::VImage::binfile(arg1,arg2,arg3,arg4,arg5);
77553 - }
77554 - catch(vips::VError &_e) {
77555 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
77556 - }
77557 -
77558 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
77559 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
77560 - return resultobj;
77561 -fail:
77562 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
77563 - return NULL;
77564 -}
77565 -
77566 -
77567 -SWIGINTERN PyObject *_wrap_VImage_cache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77568 - PyObject *resultobj = 0;
77569 - vips::VImage *arg1 = (vips::VImage *) 0 ;
77570 - int arg2 ;
77571 - int arg3 ;
77572 - int arg4 ;
77573 - void *argp1 = 0 ;
77574 - int res1 = 0 ;
77575 - int val2 ;
77576 - int ecode2 = 0 ;
77577 - int val3 ;
77578 - int ecode3 = 0 ;
77579 - int val4 ;
77580 - int ecode4 = 0 ;
77581 - PyObject * obj0 = 0 ;
77582 - PyObject * obj1 = 0 ;
77583 - PyObject * obj2 = 0 ;
77584 - PyObject * obj3 = 0 ;
77585 - vips::VImage result;
77586 -
77587 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_cache",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
77588 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
77589 - if (!SWIG_IsOK(res1)) {
77590 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_cache" "', argument " "1"" of type '" "vips::VImage *""'");
77591 - }
77592 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
77593 - ecode2 = SWIG_AsVal_int(obj1, &val2);
77594 - if (!SWIG_IsOK(ecode2)) {
77595 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_cache" "', argument " "2"" of type '" "int""'");
77596 - }
77597 - arg2 = static_cast< int >(val2);
77598 - ecode3 = SWIG_AsVal_int(obj2, &val3);
77599 - if (!SWIG_IsOK(ecode3)) {
77600 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_cache" "', argument " "3"" of type '" "int""'");
77601 - }
77602 - arg3 = static_cast< int >(val3);
77603 - ecode4 = SWIG_AsVal_int(obj3, &val4);
77604 - if (!SWIG_IsOK(ecode4)) {
77605 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_cache" "', argument " "4"" of type '" "int""'");
77606 - }
77607 - arg4 = static_cast< int >(val4);
77608 - try {
77609 - result = (arg1)->cache(arg2,arg3,arg4);
77610 - }
77611 - catch(vips::VError &_e) {
77612 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
77613 - }
77614 -
77615 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
77616 - return resultobj;
77617 -fail:
77618 - return NULL;
77619 -}
77620 -
77621 -
77622 -SWIGINTERN PyObject *_wrap_VImage_getext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77623 - PyObject *resultobj = 0;
77624 - vips::VImage *arg1 = (vips::VImage *) 0 ;
77625 - void *argp1 = 0 ;
77626 - int res1 = 0 ;
77627 - PyObject * obj0 = 0 ;
77628 - char *result = 0 ;
77629 -
77630 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_getext",&obj0)) SWIG_fail;
77631 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
77632 - if (!SWIG_IsOK(res1)) {
77633 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_getext" "', argument " "1"" of type '" "vips::VImage *""'");
77634 - }
77635 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
77636 - try {
77637 - result = (char *)(arg1)->getext();
77638 - }
77639 - catch(vips::VError &_e) {
77640 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
77641 - }
77642 -
77643 - resultobj = SWIG_FromCharPtr((const char *)result);
77644 - return resultobj;
77645 -fail:
77646 - return NULL;
77647 -}
77648 -
77649 -
77650 -SWIGINTERN PyObject *_wrap_VImage_header_get_typeof(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77651 - PyObject *resultobj = 0;
77652 - vips::VImage *arg1 = (vips::VImage *) 0 ;
77653 - char *arg2 = (char *) 0 ;
77654 - void *argp1 = 0 ;
77655 - int res1 = 0 ;
77656 - int res2 ;
77657 - char *buf2 = 0 ;
77658 - int alloc2 = 0 ;
77659 - PyObject * obj0 = 0 ;
77660 - PyObject * obj1 = 0 ;
77661 - int result;
77662 -
77663 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_header_get_typeof",&obj0,&obj1)) SWIG_fail;
77664 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
77665 - if (!SWIG_IsOK(res1)) {
77666 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_header_get_typeof" "', argument " "1"" of type '" "vips::VImage *""'");
77667 - }
77668 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
77669 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
77670 - if (!SWIG_IsOK(res2)) {
77671 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_header_get_typeof" "', argument " "2"" of type '" "char *""'");
77672 - }
77673 - arg2 = reinterpret_cast< char * >(buf2);
77674 - try {
77675 - result = (int)(arg1)->header_get_typeof(arg2);
77676 - }
77677 - catch(vips::VError &_e) {
77678 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
77679 - }
77680 -
77681 - resultobj = SWIG_From_int(static_cast< int >(result));
77682 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
77683 - return resultobj;
77684 -fail:
77685 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
77686 - return NULL;
77687 -}
77688 -
77689 -
77690 -SWIGINTERN PyObject *_wrap_VImage_header_int(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77691 - PyObject *resultobj = 0;
77692 - vips::VImage *arg1 = (vips::VImage *) 0 ;
77693 - char *arg2 = (char *) 0 ;
77694 - void *argp1 = 0 ;
77695 - int res1 = 0 ;
77696 - int res2 ;
77697 - char *buf2 = 0 ;
77698 - int alloc2 = 0 ;
77699 - PyObject * obj0 = 0 ;
77700 - PyObject * obj1 = 0 ;
77701 - int result;
77702 -
77703 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_header_int",&obj0,&obj1)) SWIG_fail;
77704 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
77705 - if (!SWIG_IsOK(res1)) {
77706 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_header_int" "', argument " "1"" of type '" "vips::VImage *""'");
77707 - }
77708 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
77709 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
77710 - if (!SWIG_IsOK(res2)) {
77711 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_header_int" "', argument " "2"" of type '" "char *""'");
77712 - }
77713 - arg2 = reinterpret_cast< char * >(buf2);
77714 - try {
77715 - result = (int)(arg1)->header_int(arg2);
77716 - }
77717 - catch(vips::VError &_e) {
77718 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
77719 - }
77720 -
77721 - resultobj = SWIG_From_int(static_cast< int >(result));
77722 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
77723 - return resultobj;
77724 -fail:
77725 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
77726 - return NULL;
77727 -}
77728 -
77729 -
77730 -SWIGINTERN PyObject *_wrap_VImage_header_double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77731 - PyObject *resultobj = 0;
77732 - vips::VImage *arg1 = (vips::VImage *) 0 ;
77733 - char *arg2 = (char *) 0 ;
77734 - void *argp1 = 0 ;
77735 - int res1 = 0 ;
77736 - int res2 ;
77737 - char *buf2 = 0 ;
77738 - int alloc2 = 0 ;
77739 - PyObject * obj0 = 0 ;
77740 - PyObject * obj1 = 0 ;
77741 - double result;
77742 -
77743 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_header_double",&obj0,&obj1)) SWIG_fail;
77744 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
77745 - if (!SWIG_IsOK(res1)) {
77746 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_header_double" "', argument " "1"" of type '" "vips::VImage *""'");
77747 - }
77748 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
77749 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
77750 - if (!SWIG_IsOK(res2)) {
77751 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_header_double" "', argument " "2"" of type '" "char *""'");
77752 - }
77753 - arg2 = reinterpret_cast< char * >(buf2);
77754 - try {
77755 - result = (double)(arg1)->header_double(arg2);
77756 - }
77757 - catch(vips::VError &_e) {
77758 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
77759 - }
77760 -
77761 - resultobj = SWIG_From_double(static_cast< double >(result));
77762 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
77763 - return resultobj;
77764 -fail:
77765 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
77766 - return NULL;
77767 -}
77768 -
77769 -
77770 -SWIGINTERN PyObject *_wrap_VImage_header_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77771 - PyObject *resultobj = 0;
77772 - vips::VImage *arg1 = (vips::VImage *) 0 ;
77773 - char *arg2 = (char *) 0 ;
77774 - void *argp1 = 0 ;
77775 - int res1 = 0 ;
77776 - int res2 ;
77777 - char *buf2 = 0 ;
77778 - int alloc2 = 0 ;
77779 - PyObject * obj0 = 0 ;
77780 - PyObject * obj1 = 0 ;
77781 - char *result = 0 ;
77782 -
77783 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_header_string",&obj0,&obj1)) SWIG_fail;
77784 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
77785 - if (!SWIG_IsOK(res1)) {
77786 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_header_string" "', argument " "1"" of type '" "vips::VImage *""'");
77787 - }
77788 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
77789 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
77790 - if (!SWIG_IsOK(res2)) {
77791 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_header_string" "', argument " "2"" of type '" "char *""'");
77792 - }
77793 - arg2 = reinterpret_cast< char * >(buf2);
77794 - try {
77795 - result = (char *)(arg1)->header_string(arg2);
77796 - }
77797 - catch(vips::VError &_e) {
77798 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
77799 - }
77800 -
77801 - resultobj = SWIG_FromCharPtr((const char *)result);
77802 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
77803 - return resultobj;
77804 -fail:
77805 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
77806 - return NULL;
77807 -}
77808 -
77809 -
77810 -SWIGINTERN PyObject *_wrap_VImage_history_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77811 - PyObject *resultobj = 0;
77812 - vips::VImage *arg1 = (vips::VImage *) 0 ;
77813 - void *argp1 = 0 ;
77814 - int res1 = 0 ;
77815 - PyObject * obj0 = 0 ;
77816 - char *result = 0 ;
77817 -
77818 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_history_get",&obj0)) SWIG_fail;
77819 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
77820 - if (!SWIG_IsOK(res1)) {
77821 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_history_get" "', argument " "1"" of type '" "vips::VImage *""'");
77822 - }
77823 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
77824 - try {
77825 - result = (char *)(arg1)->history_get();
77826 - }
77827 - catch(vips::VError &_e) {
77828 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
77829 - }
77830 -
77831 - resultobj = SWIG_FromCharPtr((const char *)result);
77832 - return resultobj;
77833 -fail:
77834 - return NULL;
77835 -}
77836 -
77837 -
77838 -SWIGINTERN PyObject *_wrap_VImage_printdesc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77839 - PyObject *resultobj = 0;
77840 - vips::VImage *arg1 = (vips::VImage *) 0 ;
77841 - void *argp1 = 0 ;
77842 - int res1 = 0 ;
77843 - PyObject * obj0 = 0 ;
77844 -
77845 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_printdesc",&obj0)) SWIG_fail;
77846 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
77847 - if (!SWIG_IsOK(res1)) {
77848 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_printdesc" "', argument " "1"" of type '" "vips::VImage *""'");
77849 - }
77850 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
77851 - try {
77852 - (arg1)->printdesc();
77853 - }
77854 - catch(vips::VError &_e) {
77855 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
77856 - }
77857 -
77858 - resultobj = SWIG_Py_Void();
77859 - return resultobj;
77860 -fail:
77861 - return NULL;
77862 -}
77863 -
77864 -
77865 -SWIGINTERN PyObject *_wrap_VImage_cntlines(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77866 - PyObject *resultobj = 0;
77867 - vips::VImage *arg1 = (vips::VImage *) 0 ;
77868 - int arg2 ;
77869 - void *argp1 = 0 ;
77870 - int res1 = 0 ;
77871 - int val2 ;
77872 - int ecode2 = 0 ;
77873 - PyObject * obj0 = 0 ;
77874 - PyObject * obj1 = 0 ;
77875 - double result;
77876 -
77877 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_cntlines",&obj0,&obj1)) SWIG_fail;
77878 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
77879 - if (!SWIG_IsOK(res1)) {
77880 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_cntlines" "', argument " "1"" of type '" "vips::VImage *""'");
77881 - }
77882 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
77883 - ecode2 = SWIG_AsVal_int(obj1, &val2);
77884 - if (!SWIG_IsOK(ecode2)) {
77885 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_cntlines" "', argument " "2"" of type '" "int""'");
77886 - }
77887 - arg2 = static_cast< int >(val2);
77888 - try {
77889 - result = (double)(arg1)->cntlines(arg2);
77890 - }
77891 - catch(vips::VError &_e) {
77892 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
77893 - }
77894 -
77895 - resultobj = SWIG_From_double(static_cast< double >(result));
77896 - return resultobj;
77897 -fail:
77898 - return NULL;
77899 -}
77900 -
77901 -
77902 -SWIGINTERN PyObject *_wrap_VImage_dilate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77903 - PyObject *resultobj = 0;
77904 - vips::VImage *arg1 = (vips::VImage *) 0 ;
77905 - vips::VIMask arg2 ;
77906 - void *argp1 = 0 ;
77907 - int res1 = 0 ;
77908 - void *argp2 ;
77909 - int res2 = 0 ;
77910 - PyObject * obj0 = 0 ;
77911 - PyObject * obj1 = 0 ;
77912 - vips::VImage result;
77913 -
77914 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_dilate",&obj0,&obj1)) SWIG_fail;
77915 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
77916 - if (!SWIG_IsOK(res1)) {
77917 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dilate" "', argument " "1"" of type '" "vips::VImage *""'");
77918 - }
77919 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
77920 - {
77921 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
77922 - if (!SWIG_IsOK(res2)) {
77923 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dilate" "', argument " "2"" of type '" "vips::VIMask""'");
77924 - }
77925 - if (!argp2) {
77926 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dilate" "', argument " "2"" of type '" "vips::VIMask""'");
77927 - } else {
77928 - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
77929 - arg2 = *temp;
77930 - if (SWIG_IsNewObj(res2)) delete temp;
77931 - }
77932 - }
77933 - try {
77934 - result = (arg1)->dilate(arg2);
77935 - }
77936 - catch(vips::VError &_e) {
77937 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
77938 - }
77939 -
77940 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
77941 - return resultobj;
77942 -fail:
77943 - return NULL;
77944 -}
77945 -
77946 -
77947 -SWIGINTERN PyObject *_wrap_VImage_rank(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77948 - PyObject *resultobj = 0;
77949 - vips::VImage *arg1 = (vips::VImage *) 0 ;
77950 - int arg2 ;
77951 - int arg3 ;
77952 - int arg4 ;
77953 - void *argp1 = 0 ;
77954 - int res1 = 0 ;
77955 - int val2 ;
77956 - int ecode2 = 0 ;
77957 - int val3 ;
77958 - int ecode3 = 0 ;
77959 - int val4 ;
77960 - int ecode4 = 0 ;
77961 - PyObject * obj0 = 0 ;
77962 - PyObject * obj1 = 0 ;
77963 - PyObject * obj2 = 0 ;
77964 - PyObject * obj3 = 0 ;
77965 - vips::VImage result;
77966 -
77967 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_rank",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
77968 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
77969 - if (!SWIG_IsOK(res1)) {
77970 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rank" "', argument " "1"" of type '" "vips::VImage *""'");
77971 - }
77972 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
77973 - ecode2 = SWIG_AsVal_int(obj1, &val2);
77974 - if (!SWIG_IsOK(ecode2)) {
77975 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_rank" "', argument " "2"" of type '" "int""'");
77976 - }
77977 - arg2 = static_cast< int >(val2);
77978 - ecode3 = SWIG_AsVal_int(obj2, &val3);
77979 - if (!SWIG_IsOK(ecode3)) {
77980 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_rank" "', argument " "3"" of type '" "int""'");
77981 - }
77982 - arg3 = static_cast< int >(val3);
77983 - ecode4 = SWIG_AsVal_int(obj3, &val4);
77984 - if (!SWIG_IsOK(ecode4)) {
77985 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_rank" "', argument " "4"" of type '" "int""'");
77986 - }
77987 - arg4 = static_cast< int >(val4);
77988 - try {
77989 - result = (arg1)->rank(arg2,arg3,arg4);
77990 - }
77991 - catch(vips::VError &_e) {
77992 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
77993 - }
77994 -
77995 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
77996 - return resultobj;
77997 -fail:
77998 - return NULL;
77999 -}
78000 -
78001 -
78002 -SWIGINTERN PyObject *_wrap_VImage_rank_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78003 - PyObject *resultobj = 0;
78004 - std::vector< vips::VImage,std::allocator< vips::VImage > > arg1 ;
78005 - int arg2 ;
78006 - int val2 ;
78007 - int ecode2 = 0 ;
78008 - PyObject * obj0 = 0 ;
78009 - PyObject * obj1 = 0 ;
78010 - vips::VImage result;
78011 -
78012 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_rank_image",&obj0,&obj1)) SWIG_fail;
78013 - {
78014 - std::vector<vips::VImage,std::allocator< vips::VImage > > *ptr = (std::vector<vips::VImage,std::allocator< vips::VImage > > *)0;
78015 - int res = swig::asptr(obj0, &ptr);
78016 - if (!SWIG_IsOK(res) || !ptr) {
78017 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_rank_image" "', argument " "1"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > >""'");
78018 - }
78019 - arg1 = *ptr;
78020 - if (SWIG_IsNewObj(res)) delete ptr;
78021 - }
78022 - ecode2 = SWIG_AsVal_int(obj1, &val2);
78023 - if (!SWIG_IsOK(ecode2)) {
78024 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_rank_image" "', argument " "2"" of type '" "int""'");
78025 - }
78026 - arg2 = static_cast< int >(val2);
78027 - try {
78028 - result = vips::VImage::rank_image(arg1,arg2);
78029 - }
78030 - catch(vips::VError &_e) {
78031 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
78032 - }
78033 -
78034 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
78035 - return resultobj;
78036 -fail:
78037 - return NULL;
78038 -}
78039 -
78040 -
78041 -SWIGINTERN PyObject *_wrap_VImage_maxvalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78042 - PyObject *resultobj = 0;
78043 - std::vector< vips::VImage,std::allocator< vips::VImage > > arg1 ;
78044 - PyObject * obj0 = 0 ;
78045 - vips::VImage result;
78046 -
78047 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_maxvalue",&obj0)) SWIG_fail;
78048 - {
78049 - std::vector<vips::VImage,std::allocator< vips::VImage > > *ptr = (std::vector<vips::VImage,std::allocator< vips::VImage > > *)0;
78050 - int res = swig::asptr(obj0, &ptr);
78051 - if (!SWIG_IsOK(res) || !ptr) {
78052 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_maxvalue" "', argument " "1"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > >""'");
78053 - }
78054 - arg1 = *ptr;
78055 - if (SWIG_IsNewObj(res)) delete ptr;
78056 - }
78057 - try {
78058 - result = vips::VImage::maxvalue(arg1);
78059 - }
78060 - catch(vips::VError &_e) {
78061 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
78062 - }
78063 -
78064 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
78065 - return resultobj;
78066 -fail:
78067 - return NULL;
78068 -}
78069 -
78070 -
78071 -SWIGINTERN PyObject *_wrap_VImage_label_regions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78072 - PyObject *resultobj = 0;
78073 - vips::VImage *arg1 = (vips::VImage *) 0 ;
78074 - int *arg2 = 0 ;
78075 - void *argp1 = 0 ;
78076 - int res1 = 0 ;
78077 - int temp2 ;
78078 - int res2 = SWIG_TMPOBJ ;
78079 - PyObject * obj0 = 0 ;
78080 - vips::VImage result;
78081 -
78082 - arg2 = &temp2;
78083 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_label_regions",&obj0)) SWIG_fail;
78084 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
78085 - if (!SWIG_IsOK(res1)) {
78086 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_label_regions" "', argument " "1"" of type '" "vips::VImage *""'");
78087 - }
78088 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
78089 - try {
78090 - result = (arg1)->label_regions(*arg2);
78091 - }
78092 - catch(vips::VError &_e) {
78093 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
78094 - }
78095 -
78096 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
78097 - if (SWIG_IsTmpObj(res2)) {
78098 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
78099 - } else {
78100 - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
78101 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
78102 - }
78103 - return resultobj;
78104 -fail:
78105 - return NULL;
78106 -}
78107 -
78108 -
78109 -SWIGINTERN PyObject *_wrap_VImage_zerox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78110 - PyObject *resultobj = 0;
78111 - vips::VImage *arg1 = (vips::VImage *) 0 ;
78112 - int arg2 ;
78113 - void *argp1 = 0 ;
78114 - int res1 = 0 ;
78115 - int val2 ;
78116 - int ecode2 = 0 ;
78117 - PyObject * obj0 = 0 ;
78118 - PyObject * obj1 = 0 ;
78119 - vips::VImage result;
78120 -
78121 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_zerox",&obj0,&obj1)) SWIG_fail;
78122 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
78123 - if (!SWIG_IsOK(res1)) {
78124 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_zerox" "', argument " "1"" of type '" "vips::VImage *""'");
78125 - }
78126 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
78127 - ecode2 = SWIG_AsVal_int(obj1, &val2);
78128 - if (!SWIG_IsOK(ecode2)) {
78129 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_zerox" "', argument " "2"" of type '" "int""'");
78130 - }
78131 - arg2 = static_cast< int >(val2);
78132 - try {
78133 - result = (arg1)->zerox(arg2);
78134 - }
78135 - catch(vips::VError &_e) {
78136 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
78137 - }
78138 -
78139 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
78140 - return resultobj;
78141 -fail:
78142 - return NULL;
78143 -}
78144 -
78145 -
78146 -SWIGINTERN PyObject *_wrap_VImage_erode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78147 - PyObject *resultobj = 0;
78148 - vips::VImage *arg1 = (vips::VImage *) 0 ;
78149 - vips::VIMask arg2 ;
78150 - void *argp1 = 0 ;
78151 - int res1 = 0 ;
78152 - void *argp2 ;
78153 - int res2 = 0 ;
78154 - PyObject * obj0 = 0 ;
78155 - PyObject * obj1 = 0 ;
78156 - vips::VImage result;
78157 -
78158 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_erode",&obj0,&obj1)) SWIG_fail;
78159 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
78160 - if (!SWIG_IsOK(res1)) {
78161 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_erode" "', argument " "1"" of type '" "vips::VImage *""'");
78162 - }
78163 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
78164 - {
78165 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
78166 - if (!SWIG_IsOK(res2)) {
78167 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_erode" "', argument " "2"" of type '" "vips::VIMask""'");
78168 - }
78169 - if (!argp2) {
78170 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_erode" "', argument " "2"" of type '" "vips::VIMask""'");
78171 - } else {
78172 - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
78173 - arg2 = *temp;
78174 - if (SWIG_IsNewObj(res2)) delete temp;
78175 - }
78176 - }
78177 - try {
78178 - result = (arg1)->erode(arg2);
78179 - }
78180 - catch(vips::VError &_e) {
78181 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
78182 - }
78183 -
78184 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
78185 - return resultobj;
78186 -fail:
78187 - return NULL;
78188 -}
78189 -
78190 -
78191 -SWIGINTERN PyObject *_wrap_VImage_profile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78192 - PyObject *resultobj = 0;
78193 - vips::VImage *arg1 = (vips::VImage *) 0 ;
78194 - int arg2 ;
78195 - void *argp1 = 0 ;
78196 - int res1 = 0 ;
78197 - int val2 ;
78198 - int ecode2 = 0 ;
78199 - PyObject * obj0 = 0 ;
78200 - PyObject * obj1 = 0 ;
78201 - vips::VImage result;
78202 -
78203 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_profile",&obj0,&obj1)) SWIG_fail;
78204 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
78205 - if (!SWIG_IsOK(res1)) {
78206 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_profile" "', argument " "1"" of type '" "vips::VImage *""'");
78207 - }
78208 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
78209 - ecode2 = SWIG_AsVal_int(obj1, &val2);
78210 - if (!SWIG_IsOK(ecode2)) {
78211 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_profile" "', argument " "2"" of type '" "int""'");
78212 - }
78213 - arg2 = static_cast< int >(val2);
78214 - try {
78215 - result = (arg1)->profile(arg2);
78216 - }
78217 - catch(vips::VError &_e) {
78218 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
78219 - }
78220 -
78221 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
78222 - return resultobj;
78223 -fail:
78224 - return NULL;
78225 -}
78226 -
78227 -
78228 -SWIGINTERN PyObject *_wrap_VImage_align_bands(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78229 - PyObject *resultobj = 0;
78230 - vips::VImage *arg1 = (vips::VImage *) 0 ;
78231 - void *argp1 = 0 ;
78232 - int res1 = 0 ;
78233 - PyObject * obj0 = 0 ;
78234 - vips::VImage result;
78235 -
78236 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_align_bands",&obj0)) SWIG_fail;
78237 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
78238 - if (!SWIG_IsOK(res1)) {
78239 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_align_bands" "', argument " "1"" of type '" "vips::VImage *""'");
78240 - }
78241 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
78242 - try {
78243 - result = (arg1)->align_bands();
78244 - }
78245 - catch(vips::VError &_e) {
78246 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
78247 - }
78248 -
78249 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
78250 - return resultobj;
78251 -fail:
78252 - return NULL;
78253 -}
78254 -
78255 -
78256 -SWIGINTERN PyObject *_wrap_VImage_correl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78257 - PyObject *resultobj = 0;
78258 - vips::VImage *arg1 = (vips::VImage *) 0 ;
78259 - vips::VImage arg2 ;
78260 - int arg3 ;
78261 - int arg4 ;
78262 - int arg5 ;
78263 - int arg6 ;
78264 - int arg7 ;
78265 - int arg8 ;
78266 - int *arg9 = 0 ;
78267 - int *arg10 = 0 ;
78268 - void *argp1 = 0 ;
78269 - int res1 = 0 ;
78270 - void *argp2 ;
78271 - int res2 = 0 ;
78272 - int val3 ;
78273 - int ecode3 = 0 ;
78274 - int val4 ;
78275 - int ecode4 = 0 ;
78276 - int val5 ;
78277 - int ecode5 = 0 ;
78278 - int val6 ;
78279 - int ecode6 = 0 ;
78280 - int val7 ;
78281 - int ecode7 = 0 ;
78282 - int val8 ;
78283 - int ecode8 = 0 ;
78284 - int temp9 ;
78285 - int res9 = SWIG_TMPOBJ ;
78286 - int temp10 ;
78287 - int res10 = SWIG_TMPOBJ ;
78288 - PyObject * obj0 = 0 ;
78289 - PyObject * obj1 = 0 ;
78290 - PyObject * obj2 = 0 ;
78291 - PyObject * obj3 = 0 ;
78292 - PyObject * obj4 = 0 ;
78293 - PyObject * obj5 = 0 ;
78294 - PyObject * obj6 = 0 ;
78295 - PyObject * obj7 = 0 ;
78296 - double result;
78297 -
78298 - arg9 = &temp9;
78299 - arg10 = &temp10;
78300 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:VImage_correl",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
78301 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
78302 - if (!SWIG_IsOK(res1)) {
78303 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_correl" "', argument " "1"" of type '" "vips::VImage *""'");
78304 - }
78305 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
78306 - {
78307 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
78308 - if (!SWIG_IsOK(res2)) {
78309 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_correl" "', argument " "2"" of type '" "vips::VImage""'");
78310 - }
78311 - if (!argp2) {
78312 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_correl" "', argument " "2"" of type '" "vips::VImage""'");
78313 - } else {
78314 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
78315 - arg2 = *temp;
78316 - if (SWIG_IsNewObj(res2)) delete temp;
78317 - }
78318 - }
78319 - ecode3 = SWIG_AsVal_int(obj2, &val3);
78320 - if (!SWIG_IsOK(ecode3)) {
78321 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_correl" "', argument " "3"" of type '" "int""'");
78322 - }
78323 - arg3 = static_cast< int >(val3);
78324 - ecode4 = SWIG_AsVal_int(obj3, &val4);
78325 - if (!SWIG_IsOK(ecode4)) {
78326 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_correl" "', argument " "4"" of type '" "int""'");
78327 - }
78328 - arg4 = static_cast< int >(val4);
78329 - ecode5 = SWIG_AsVal_int(obj4, &val5);
78330 - if (!SWIG_IsOK(ecode5)) {
78331 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_correl" "', argument " "5"" of type '" "int""'");
78332 - }
78333 - arg5 = static_cast< int >(val5);
78334 - ecode6 = SWIG_AsVal_int(obj5, &val6);
78335 - if (!SWIG_IsOK(ecode6)) {
78336 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_correl" "', argument " "6"" of type '" "int""'");
78337 - }
78338 - arg6 = static_cast< int >(val6);
78339 - ecode7 = SWIG_AsVal_int(obj6, &val7);
78340 - if (!SWIG_IsOK(ecode7)) {
78341 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_correl" "', argument " "7"" of type '" "int""'");
78342 - }
78343 - arg7 = static_cast< int >(val7);
78344 - ecode8 = SWIG_AsVal_int(obj7, &val8);
78345 - if (!SWIG_IsOK(ecode8)) {
78346 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_correl" "', argument " "8"" of type '" "int""'");
78347 - }
78348 - arg8 = static_cast< int >(val8);
78349 - try {
78350 - result = (double)(arg1)->correl(arg2,arg3,arg4,arg5,arg6,arg7,arg8,*arg9,*arg10);
78351 - }
78352 - catch(vips::VError &_e) {
78353 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
78354 - }
78355 -
78356 - resultobj = SWIG_From_double(static_cast< double >(result));
78357 - if (SWIG_IsTmpObj(res9)) {
78358 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9)));
78359 - } else {
78360 - int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
78361 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags));
78362 - }
78363 - if (SWIG_IsTmpObj(res10)) {
78364 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg10)));
78365 - } else {
78366 - int new_flags = SWIG_IsNewObj(res10) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
78367 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg10), SWIGTYPE_p_int, new_flags));
78368 - }
78369 - return resultobj;
78370 -fail:
78371 - return NULL;
78372 -}
78373 -
78374 -
78375 -SWIGINTERN PyObject *_wrap_VImage__find_lroverlap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78376 - PyObject *resultobj = 0;
78377 - vips::VImage *arg1 = (vips::VImage *) 0 ;
78378 - vips::VImage arg2 ;
78379 - int arg3 ;
78380 - int arg4 ;
78381 - int arg5 ;
78382 - int arg6 ;
78383 - int arg7 ;
78384 - int arg8 ;
78385 - int arg9 ;
78386 - int *arg10 = 0 ;
78387 - double *arg11 = 0 ;
78388 - double *arg12 = 0 ;
78389 - double *arg13 = 0 ;
78390 - double *arg14 = 0 ;
78391 - void *argp1 = 0 ;
78392 - int res1 = 0 ;
78393 - void *argp2 ;
78394 - int res2 = 0 ;
78395 - int val3 ;
78396 - int ecode3 = 0 ;
78397 - int val4 ;
78398 - int ecode4 = 0 ;
78399 - int val5 ;
78400 - int ecode5 = 0 ;
78401 - int val6 ;
78402 - int ecode6 = 0 ;
78403 - int val7 ;
78404 - int ecode7 = 0 ;
78405 - int val8 ;
78406 - int ecode8 = 0 ;
78407 - int val9 ;
78408 - int ecode9 = 0 ;
78409 - int temp10 ;
78410 - int res10 = SWIG_TMPOBJ ;
78411 - double temp11 ;
78412 - int res11 = SWIG_TMPOBJ ;
78413 - double temp12 ;
78414 - int res12 = SWIG_TMPOBJ ;
78415 - double temp13 ;
78416 - int res13 = SWIG_TMPOBJ ;
78417 - double temp14 ;
78418 - int res14 = SWIG_TMPOBJ ;
78419 - PyObject * obj0 = 0 ;
78420 - PyObject * obj1 = 0 ;
78421 - PyObject * obj2 = 0 ;
78422 - PyObject * obj3 = 0 ;
78423 - PyObject * obj4 = 0 ;
78424 - PyObject * obj5 = 0 ;
78425 - PyObject * obj6 = 0 ;
78426 - PyObject * obj7 = 0 ;
78427 - PyObject * obj8 = 0 ;
78428 - int result;
78429 -
78430 - arg10 = &temp10;
78431 - arg11 = &temp11;
78432 - arg12 = &temp12;
78433 - arg13 = &temp13;
78434 - arg14 = &temp14;
78435 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:VImage__find_lroverlap",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
78436 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
78437 - if (!SWIG_IsOK(res1)) {
78438 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage__find_lroverlap" "', argument " "1"" of type '" "vips::VImage *""'");
78439 - }
78440 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
78441 - {
78442 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
78443 - if (!SWIG_IsOK(res2)) {
78444 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage__find_lroverlap" "', argument " "2"" of type '" "vips::VImage""'");
78445 - }
78446 - if (!argp2) {
78447 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage__find_lroverlap" "', argument " "2"" of type '" "vips::VImage""'");
78448 - } else {
78449 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
78450 - arg2 = *temp;
78451 - if (SWIG_IsNewObj(res2)) delete temp;
78452 - }
78453 - }
78454 - ecode3 = SWIG_AsVal_int(obj2, &val3);
78455 - if (!SWIG_IsOK(ecode3)) {
78456 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage__find_lroverlap" "', argument " "3"" of type '" "int""'");
78457 - }
78458 - arg3 = static_cast< int >(val3);
78459 - ecode4 = SWIG_AsVal_int(obj3, &val4);
78460 - if (!SWIG_IsOK(ecode4)) {
78461 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage__find_lroverlap" "', argument " "4"" of type '" "int""'");
78462 - }
78463 - arg4 = static_cast< int >(val4);
78464 - ecode5 = SWIG_AsVal_int(obj4, &val5);
78465 - if (!SWIG_IsOK(ecode5)) {
78466 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage__find_lroverlap" "', argument " "5"" of type '" "int""'");
78467 - }
78468 - arg5 = static_cast< int >(val5);
78469 - ecode6 = SWIG_AsVal_int(obj5, &val6);
78470 - if (!SWIG_IsOK(ecode6)) {
78471 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage__find_lroverlap" "', argument " "6"" of type '" "int""'");
78472 - }
78473 - arg6 = static_cast< int >(val6);
78474 - ecode7 = SWIG_AsVal_int(obj6, &val7);
78475 - if (!SWIG_IsOK(ecode7)) {
78476 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage__find_lroverlap" "', argument " "7"" of type '" "int""'");
78477 - }
78478 - arg7 = static_cast< int >(val7);
78479 - ecode8 = SWIG_AsVal_int(obj7, &val8);
78480 - if (!SWIG_IsOK(ecode8)) {
78481 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage__find_lroverlap" "', argument " "8"" of type '" "int""'");
78482 - }
78483 - arg8 = static_cast< int >(val8);
78484 - ecode9 = SWIG_AsVal_int(obj8, &val9);
78485 - if (!SWIG_IsOK(ecode9)) {
78486 - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage__find_lroverlap" "', argument " "9"" of type '" "int""'");
78487 - }
78488 - arg9 = static_cast< int >(val9);
78489 - try {
78490 - result = (int)(arg1)->_find_lroverlap(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,*arg10,*arg11,*arg12,*arg13,*arg14);
78491 - }
78492 - catch(vips::VError &_e) {
78493 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
78494 - }
78495 -
78496 - resultobj = SWIG_From_int(static_cast< int >(result));
78497 - if (SWIG_IsTmpObj(res10)) {
78498 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg10)));
78499 - } else {
78500 - int new_flags = SWIG_IsNewObj(res10) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
78501 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg10), SWIGTYPE_p_int, new_flags));
78502 - }
78503 - if (SWIG_IsTmpObj(res11)) {
78504 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg11)));
78505 - } else {
78506 - int new_flags = SWIG_IsNewObj(res11) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
78507 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg11), SWIGTYPE_p_double, new_flags));
78508 - }
78509 - if (SWIG_IsTmpObj(res12)) {
78510 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg12)));
78511 - } else {
78512 - int new_flags = SWIG_IsNewObj(res12) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
78513 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg12), SWIGTYPE_p_double, new_flags));
78514 - }
78515 - if (SWIG_IsTmpObj(res13)) {
78516 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg13)));
78517 - } else {
78518 - int new_flags = SWIG_IsNewObj(res13) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
78519 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg13), SWIGTYPE_p_double, new_flags));
78520 - }
78521 - if (SWIG_IsTmpObj(res14)) {
78522 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg14)));
78523 - } else {
78524 - int new_flags = SWIG_IsNewObj(res14) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
78525 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg14), SWIGTYPE_p_double, new_flags));
78526 - }
78527 - return resultobj;
78528 -fail:
78529 - return NULL;
78530 -}
78531 -
78532 -
78533 -SWIGINTERN PyObject *_wrap_VImage__find_tboverlap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78534 - PyObject *resultobj = 0;
78535 - vips::VImage *arg1 = (vips::VImage *) 0 ;
78536 - vips::VImage arg2 ;
78537 - int arg3 ;
78538 - int arg4 ;
78539 - int arg5 ;
78540 - int arg6 ;
78541 - int arg7 ;
78542 - int arg8 ;
78543 - int arg9 ;
78544 - int *arg10 = 0 ;
78545 - double *arg11 = 0 ;
78546 - double *arg12 = 0 ;
78547 - double *arg13 = 0 ;
78548 - double *arg14 = 0 ;
78549 - void *argp1 = 0 ;
78550 - int res1 = 0 ;
78551 - void *argp2 ;
78552 - int res2 = 0 ;
78553 - int val3 ;
78554 - int ecode3 = 0 ;
78555 - int val4 ;
78556 - int ecode4 = 0 ;
78557 - int val5 ;
78558 - int ecode5 = 0 ;
78559 - int val6 ;
78560 - int ecode6 = 0 ;
78561 - int val7 ;
78562 - int ecode7 = 0 ;
78563 - int val8 ;
78564 - int ecode8 = 0 ;
78565 - int val9 ;
78566 - int ecode9 = 0 ;
78567 - int temp10 ;
78568 - int res10 = SWIG_TMPOBJ ;
78569 - double temp11 ;
78570 - int res11 = SWIG_TMPOBJ ;
78571 - double temp12 ;
78572 - int res12 = SWIG_TMPOBJ ;
78573 - double temp13 ;
78574 - int res13 = SWIG_TMPOBJ ;
78575 - double temp14 ;
78576 - int res14 = SWIG_TMPOBJ ;
78577 - PyObject * obj0 = 0 ;
78578 - PyObject * obj1 = 0 ;
78579 - PyObject * obj2 = 0 ;
78580 - PyObject * obj3 = 0 ;
78581 - PyObject * obj4 = 0 ;
78582 - PyObject * obj5 = 0 ;
78583 - PyObject * obj6 = 0 ;
78584 - PyObject * obj7 = 0 ;
78585 - PyObject * obj8 = 0 ;
78586 - int result;
78587 -
78588 - arg10 = &temp10;
78589 - arg11 = &temp11;
78590 - arg12 = &temp12;
78591 - arg13 = &temp13;
78592 - arg14 = &temp14;
78593 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:VImage__find_tboverlap",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
78594 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
78595 - if (!SWIG_IsOK(res1)) {
78596 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage__find_tboverlap" "', argument " "1"" of type '" "vips::VImage *""'");
78597 - }
78598 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
78599 - {
78600 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
78601 - if (!SWIG_IsOK(res2)) {
78602 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage__find_tboverlap" "', argument " "2"" of type '" "vips::VImage""'");
78603 - }
78604 - if (!argp2) {
78605 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage__find_tboverlap" "', argument " "2"" of type '" "vips::VImage""'");
78606 - } else {
78607 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
78608 - arg2 = *temp;
78609 - if (SWIG_IsNewObj(res2)) delete temp;
78610 - }
78611 - }
78612 - ecode3 = SWIG_AsVal_int(obj2, &val3);
78613 - if (!SWIG_IsOK(ecode3)) {
78614 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage__find_tboverlap" "', argument " "3"" of type '" "int""'");
78615 - }
78616 - arg3 = static_cast< int >(val3);
78617 - ecode4 = SWIG_AsVal_int(obj3, &val4);
78618 - if (!SWIG_IsOK(ecode4)) {
78619 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage__find_tboverlap" "', argument " "4"" of type '" "int""'");
78620 - }
78621 - arg4 = static_cast< int >(val4);
78622 - ecode5 = SWIG_AsVal_int(obj4, &val5);
78623 - if (!SWIG_IsOK(ecode5)) {
78624 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage__find_tboverlap" "', argument " "5"" of type '" "int""'");
78625 - }
78626 - arg5 = static_cast< int >(val5);
78627 - ecode6 = SWIG_AsVal_int(obj5, &val6);
78628 - if (!SWIG_IsOK(ecode6)) {
78629 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage__find_tboverlap" "', argument " "6"" of type '" "int""'");
78630 - }
78631 - arg6 = static_cast< int >(val6);
78632 - ecode7 = SWIG_AsVal_int(obj6, &val7);
78633 - if (!SWIG_IsOK(ecode7)) {
78634 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage__find_tboverlap" "', argument " "7"" of type '" "int""'");
78635 - }
78636 - arg7 = static_cast< int >(val7);
78637 - ecode8 = SWIG_AsVal_int(obj7, &val8);
78638 - if (!SWIG_IsOK(ecode8)) {
78639 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage__find_tboverlap" "', argument " "8"" of type '" "int""'");
78640 - }
78641 - arg8 = static_cast< int >(val8);
78642 - ecode9 = SWIG_AsVal_int(obj8, &val9);
78643 - if (!SWIG_IsOK(ecode9)) {
78644 - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage__find_tboverlap" "', argument " "9"" of type '" "int""'");
78645 - }
78646 - arg9 = static_cast< int >(val9);
78647 - try {
78648 - result = (int)(arg1)->_find_tboverlap(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,*arg10,*arg11,*arg12,*arg13,*arg14);
78649 - }
78650 - catch(vips::VError &_e) {
78651 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
78652 - }
78653 -
78654 - resultobj = SWIG_From_int(static_cast< int >(result));
78655 - if (SWIG_IsTmpObj(res10)) {
78656 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg10)));
78657 - } else {
78658 - int new_flags = SWIG_IsNewObj(res10) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
78659 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg10), SWIGTYPE_p_int, new_flags));
78660 - }
78661 - if (SWIG_IsTmpObj(res11)) {
78662 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg11)));
78663 - } else {
78664 - int new_flags = SWIG_IsNewObj(res11) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
78665 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg11), SWIGTYPE_p_double, new_flags));
78666 - }
78667 - if (SWIG_IsTmpObj(res12)) {
78668 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg12)));
78669 - } else {
78670 - int new_flags = SWIG_IsNewObj(res12) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
78671 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg12), SWIGTYPE_p_double, new_flags));
78672 - }
78673 - if (SWIG_IsTmpObj(res13)) {
78674 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg13)));
78675 - } else {
78676 - int new_flags = SWIG_IsNewObj(res13) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
78677 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg13), SWIGTYPE_p_double, new_flags));
78678 - }
78679 - if (SWIG_IsTmpObj(res14)) {
78680 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg14)));
78681 - } else {
78682 - int new_flags = SWIG_IsNewObj(res14) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
78683 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg14), SWIGTYPE_p_double, new_flags));
78684 - }
78685 - return resultobj;
78686 -fail:
78687 - return NULL;
78688 -}
78689 -
78690 -
78691 -SWIGINTERN PyObject *_wrap_VImage_global_balance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78692 - PyObject *resultobj = 0;
78693 - vips::VImage *arg1 = (vips::VImage *) 0 ;
78694 - double arg2 ;
78695 - void *argp1 = 0 ;
78696 - int res1 = 0 ;
78697 - double val2 ;
78698 - int ecode2 = 0 ;
78699 - PyObject * obj0 = 0 ;
78700 - PyObject * obj1 = 0 ;
78701 - vips::VImage result;
78702 -
78703 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_global_balance",&obj0,&obj1)) SWIG_fail;
78704 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
78705 - if (!SWIG_IsOK(res1)) {
78706 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_global_balance" "', argument " "1"" of type '" "vips::VImage *""'");
78707 - }
78708 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
78709 - ecode2 = SWIG_AsVal_double(obj1, &val2);
78710 - if (!SWIG_IsOK(ecode2)) {
78711 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_global_balance" "', argument " "2"" of type '" "double""'");
78712 - }
78713 - arg2 = static_cast< double >(val2);
78714 - try {
78715 - result = (arg1)->global_balance(arg2);
78716 - }
78717 - catch(vips::VError &_e) {
78718 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
78719 - }
78720 -
78721 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
78722 - return resultobj;
78723 -fail:
78724 - return NULL;
78725 -}
78726 -
78727 -
78728 -SWIGINTERN PyObject *_wrap_VImage_global_balancef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78729 - PyObject *resultobj = 0;
78730 - vips::VImage *arg1 = (vips::VImage *) 0 ;
78731 - double arg2 ;
78732 - void *argp1 = 0 ;
78733 - int res1 = 0 ;
78734 - double val2 ;
78735 - int ecode2 = 0 ;
78736 - PyObject * obj0 = 0 ;
78737 - PyObject * obj1 = 0 ;
78738 - vips::VImage result;
78739 -
78740 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_global_balancef",&obj0,&obj1)) SWIG_fail;
78741 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
78742 - if (!SWIG_IsOK(res1)) {
78743 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_global_balancef" "', argument " "1"" of type '" "vips::VImage *""'");
78744 - }
78745 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
78746 - ecode2 = SWIG_AsVal_double(obj1, &val2);
78747 - if (!SWIG_IsOK(ecode2)) {
78748 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_global_balancef" "', argument " "2"" of type '" "double""'");
78749 - }
78750 - arg2 = static_cast< double >(val2);
78751 - try {
78752 - result = (arg1)->global_balancef(arg2);
78753 - }
78754 - catch(vips::VError &_e) {
78755 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
78756 - }
78757 -
78758 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
78759 - return resultobj;
78760 -fail:
78761 - return NULL;
78762 -}
78763 -
78764 -
78765 -SWIGINTERN PyObject *_wrap_VImage_lrmerge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78766 - PyObject *resultobj = 0;
78767 - vips::VImage *arg1 = (vips::VImage *) 0 ;
78768 - vips::VImage arg2 ;
78769 - int arg3 ;
78770 - int arg4 ;
78771 - int arg5 ;
78772 - void *argp1 = 0 ;
78773 - int res1 = 0 ;
78774 - void *argp2 ;
78775 - int res2 = 0 ;
78776 - int val3 ;
78777 - int ecode3 = 0 ;
78778 - int val4 ;
78779 - int ecode4 = 0 ;
78780 - int val5 ;
78781 - int ecode5 = 0 ;
78782 - PyObject * obj0 = 0 ;
78783 - PyObject * obj1 = 0 ;
78784 - PyObject * obj2 = 0 ;
78785 - PyObject * obj3 = 0 ;
78786 - PyObject * obj4 = 0 ;
78787 - vips::VImage result;
78788 -
78789 - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_lrmerge",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
78790 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
78791 - if (!SWIG_IsOK(res1)) {
78792 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lrmerge" "', argument " "1"" of type '" "vips::VImage *""'");
78793 - }
78794 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
78795 - {
78796 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
78797 - if (!SWIG_IsOK(res2)) {
78798 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lrmerge" "', argument " "2"" of type '" "vips::VImage""'");
78799 - }
78800 - if (!argp2) {
78801 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lrmerge" "', argument " "2"" of type '" "vips::VImage""'");
78802 - } else {
78803 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
78804 - arg2 = *temp;
78805 - if (SWIG_IsNewObj(res2)) delete temp;
78806 - }
78807 - }
78808 - ecode3 = SWIG_AsVal_int(obj2, &val3);
78809 - if (!SWIG_IsOK(ecode3)) {
78810 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lrmerge" "', argument " "3"" of type '" "int""'");
78811 - }
78812 - arg3 = static_cast< int >(val3);
78813 - ecode4 = SWIG_AsVal_int(obj3, &val4);
78814 - if (!SWIG_IsOK(ecode4)) {
78815 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_lrmerge" "', argument " "4"" of type '" "int""'");
78816 - }
78817 - arg4 = static_cast< int >(val4);
78818 - ecode5 = SWIG_AsVal_int(obj4, &val5);
78819 - if (!SWIG_IsOK(ecode5)) {
78820 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_lrmerge" "', argument " "5"" of type '" "int""'");
78821 - }
78822 - arg5 = static_cast< int >(val5);
78823 - try {
78824 - result = (arg1)->lrmerge(arg2,arg3,arg4,arg5);
78825 - }
78826 - catch(vips::VError &_e) {
78827 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
78828 - }
78829 -
78830 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
78831 - return resultobj;
78832 -fail:
78833 - return NULL;
78834 -}
78835 -
78836 -
78837 -SWIGINTERN PyObject *_wrap_VImage_lrmerge1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78838 - PyObject *resultobj = 0;
78839 - vips::VImage *arg1 = (vips::VImage *) 0 ;
78840 - vips::VImage arg2 ;
78841 - int arg3 ;
78842 - int arg4 ;
78843 - int arg5 ;
78844 - int arg6 ;
78845 - int arg7 ;
78846 - int arg8 ;
78847 - int arg9 ;
78848 - int arg10 ;
78849 - int arg11 ;
78850 - void *argp1 = 0 ;
78851 - int res1 = 0 ;
78852 - void *argp2 ;
78853 - int res2 = 0 ;
78854 - int val3 ;
78855 - int ecode3 = 0 ;
78856 - int val4 ;
78857 - int ecode4 = 0 ;
78858 - int val5 ;
78859 - int ecode5 = 0 ;
78860 - int val6 ;
78861 - int ecode6 = 0 ;
78862 - int val7 ;
78863 - int ecode7 = 0 ;
78864 - int val8 ;
78865 - int ecode8 = 0 ;
78866 - int val9 ;
78867 - int ecode9 = 0 ;
78868 - int val10 ;
78869 - int ecode10 = 0 ;
78870 - int val11 ;
78871 - int ecode11 = 0 ;
78872 - PyObject * obj0 = 0 ;
78873 - PyObject * obj1 = 0 ;
78874 - PyObject * obj2 = 0 ;
78875 - PyObject * obj3 = 0 ;
78876 - PyObject * obj4 = 0 ;
78877 - PyObject * obj5 = 0 ;
78878 - PyObject * obj6 = 0 ;
78879 - PyObject * obj7 = 0 ;
78880 - PyObject * obj8 = 0 ;
78881 - PyObject * obj9 = 0 ;
78882 - PyObject * obj10 = 0 ;
78883 - vips::VImage result;
78884 -
78885 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:VImage_lrmerge1",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
78886 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
78887 - if (!SWIG_IsOK(res1)) {
78888 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lrmerge1" "', argument " "1"" of type '" "vips::VImage *""'");
78889 - }
78890 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
78891 - {
78892 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
78893 - if (!SWIG_IsOK(res2)) {
78894 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lrmerge1" "', argument " "2"" of type '" "vips::VImage""'");
78895 - }
78896 - if (!argp2) {
78897 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lrmerge1" "', argument " "2"" of type '" "vips::VImage""'");
78898 - } else {
78899 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
78900 - arg2 = *temp;
78901 - if (SWIG_IsNewObj(res2)) delete temp;
78902 - }
78903 - }
78904 - ecode3 = SWIG_AsVal_int(obj2, &val3);
78905 - if (!SWIG_IsOK(ecode3)) {
78906 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lrmerge1" "', argument " "3"" of type '" "int""'");
78907 - }
78908 - arg3 = static_cast< int >(val3);
78909 - ecode4 = SWIG_AsVal_int(obj3, &val4);
78910 - if (!SWIG_IsOK(ecode4)) {
78911 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_lrmerge1" "', argument " "4"" of type '" "int""'");
78912 - }
78913 - arg4 = static_cast< int >(val4);
78914 - ecode5 = SWIG_AsVal_int(obj4, &val5);
78915 - if (!SWIG_IsOK(ecode5)) {
78916 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_lrmerge1" "', argument " "5"" of type '" "int""'");
78917 - }
78918 - arg5 = static_cast< int >(val5);
78919 - ecode6 = SWIG_AsVal_int(obj5, &val6);
78920 - if (!SWIG_IsOK(ecode6)) {
78921 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_lrmerge1" "', argument " "6"" of type '" "int""'");
78922 - }
78923 - arg6 = static_cast< int >(val6);
78924 - ecode7 = SWIG_AsVal_int(obj6, &val7);
78925 - if (!SWIG_IsOK(ecode7)) {
78926 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_lrmerge1" "', argument " "7"" of type '" "int""'");
78927 - }
78928 - arg7 = static_cast< int >(val7);
78929 - ecode8 = SWIG_AsVal_int(obj7, &val8);
78930 - if (!SWIG_IsOK(ecode8)) {
78931 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_lrmerge1" "', argument " "8"" of type '" "int""'");
78932 - }
78933 - arg8 = static_cast< int >(val8);
78934 - ecode9 = SWIG_AsVal_int(obj8, &val9);
78935 - if (!SWIG_IsOK(ecode9)) {
78936 - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_lrmerge1" "', argument " "9"" of type '" "int""'");
78937 - }
78938 - arg9 = static_cast< int >(val9);
78939 - ecode10 = SWIG_AsVal_int(obj9, &val10);
78940 - if (!SWIG_IsOK(ecode10)) {
78941 - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_lrmerge1" "', argument " "10"" of type '" "int""'");
78942 - }
78943 - arg10 = static_cast< int >(val10);
78944 - ecode11 = SWIG_AsVal_int(obj10, &val11);
78945 - if (!SWIG_IsOK(ecode11)) {
78946 - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_lrmerge1" "', argument " "11"" of type '" "int""'");
78947 - }
78948 - arg11 = static_cast< int >(val11);
78949 - try {
78950 - result = (arg1)->lrmerge1(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
78951 - }
78952 - catch(vips::VError &_e) {
78953 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
78954 - }
78955 -
78956 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
78957 - return resultobj;
78958 -fail:
78959 - return NULL;
78960 -}
78961 -
78962 -
78963 -SWIGINTERN PyObject *_wrap_VImage_lrmosaic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78964 - PyObject *resultobj = 0;
78965 - vips::VImage *arg1 = (vips::VImage *) 0 ;
78966 - vips::VImage arg2 ;
78967 - int arg3 ;
78968 - int arg4 ;
78969 - int arg5 ;
78970 - int arg6 ;
78971 - int arg7 ;
78972 - int arg8 ;
78973 - int arg9 ;
78974 - int arg10 ;
78975 - int arg11 ;
78976 - void *argp1 = 0 ;
78977 - int res1 = 0 ;
78978 - void *argp2 ;
78979 - int res2 = 0 ;
78980 - int val3 ;
78981 - int ecode3 = 0 ;
78982 - int val4 ;
78983 - int ecode4 = 0 ;
78984 - int val5 ;
78985 - int ecode5 = 0 ;
78986 - int val6 ;
78987 - int ecode6 = 0 ;
78988 - int val7 ;
78989 - int ecode7 = 0 ;
78990 - int val8 ;
78991 - int ecode8 = 0 ;
78992 - int val9 ;
78993 - int ecode9 = 0 ;
78994 - int val10 ;
78995 - int ecode10 = 0 ;
78996 - int val11 ;
78997 - int ecode11 = 0 ;
78998 - PyObject * obj0 = 0 ;
78999 - PyObject * obj1 = 0 ;
79000 - PyObject * obj2 = 0 ;
79001 - PyObject * obj3 = 0 ;
79002 - PyObject * obj4 = 0 ;
79003 - PyObject * obj5 = 0 ;
79004 - PyObject * obj6 = 0 ;
79005 - PyObject * obj7 = 0 ;
79006 - PyObject * obj8 = 0 ;
79007 - PyObject * obj9 = 0 ;
79008 - PyObject * obj10 = 0 ;
79009 - vips::VImage result;
79010 -
79011 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:VImage_lrmosaic",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
79012 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
79013 - if (!SWIG_IsOK(res1)) {
79014 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lrmosaic" "', argument " "1"" of type '" "vips::VImage *""'");
79015 - }
79016 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
79017 - {
79018 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
79019 - if (!SWIG_IsOK(res2)) {
79020 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lrmosaic" "', argument " "2"" of type '" "vips::VImage""'");
79021 - }
79022 - if (!argp2) {
79023 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lrmosaic" "', argument " "2"" of type '" "vips::VImage""'");
79024 - } else {
79025 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
79026 - arg2 = *temp;
79027 - if (SWIG_IsNewObj(res2)) delete temp;
79028 - }
79029 - }
79030 - ecode3 = SWIG_AsVal_int(obj2, &val3);
79031 - if (!SWIG_IsOK(ecode3)) {
79032 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lrmosaic" "', argument " "3"" of type '" "int""'");
79033 - }
79034 - arg3 = static_cast< int >(val3);
79035 - ecode4 = SWIG_AsVal_int(obj3, &val4);
79036 - if (!SWIG_IsOK(ecode4)) {
79037 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_lrmosaic" "', argument " "4"" of type '" "int""'");
79038 - }
79039 - arg4 = static_cast< int >(val4);
79040 - ecode5 = SWIG_AsVal_int(obj4, &val5);
79041 - if (!SWIG_IsOK(ecode5)) {
79042 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_lrmosaic" "', argument " "5"" of type '" "int""'");
79043 - }
79044 - arg5 = static_cast< int >(val5);
79045 - ecode6 = SWIG_AsVal_int(obj5, &val6);
79046 - if (!SWIG_IsOK(ecode6)) {
79047 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_lrmosaic" "', argument " "6"" of type '" "int""'");
79048 - }
79049 - arg6 = static_cast< int >(val6);
79050 - ecode7 = SWIG_AsVal_int(obj6, &val7);
79051 - if (!SWIG_IsOK(ecode7)) {
79052 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_lrmosaic" "', argument " "7"" of type '" "int""'");
79053 - }
79054 - arg7 = static_cast< int >(val7);
79055 - ecode8 = SWIG_AsVal_int(obj7, &val8);
79056 - if (!SWIG_IsOK(ecode8)) {
79057 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_lrmosaic" "', argument " "8"" of type '" "int""'");
79058 - }
79059 - arg8 = static_cast< int >(val8);
79060 - ecode9 = SWIG_AsVal_int(obj8, &val9);
79061 - if (!SWIG_IsOK(ecode9)) {
79062 - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_lrmosaic" "', argument " "9"" of type '" "int""'");
79063 - }
79064 - arg9 = static_cast< int >(val9);
79065 - ecode10 = SWIG_AsVal_int(obj9, &val10);
79066 - if (!SWIG_IsOK(ecode10)) {
79067 - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_lrmosaic" "', argument " "10"" of type '" "int""'");
79068 - }
79069 - arg10 = static_cast< int >(val10);
79070 - ecode11 = SWIG_AsVal_int(obj10, &val11);
79071 - if (!SWIG_IsOK(ecode11)) {
79072 - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_lrmosaic" "', argument " "11"" of type '" "int""'");
79073 - }
79074 - arg11 = static_cast< int >(val11);
79075 - try {
79076 - result = (arg1)->lrmosaic(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
79077 - }
79078 - catch(vips::VError &_e) {
79079 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
79080 - }
79081 -
79082 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
79083 - return resultobj;
79084 -fail:
79085 - return NULL;
79086 -}
79087 -
79088 -
79089 -SWIGINTERN PyObject *_wrap_VImage_lrmosaic1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79090 - PyObject *resultobj = 0;
79091 - vips::VImage *arg1 = (vips::VImage *) 0 ;
79092 - vips::VImage arg2 ;
79093 - int arg3 ;
79094 - int arg4 ;
79095 - int arg5 ;
79096 - int arg6 ;
79097 - int arg7 ;
79098 - int arg8 ;
79099 - int arg9 ;
79100 - int arg10 ;
79101 - int arg11 ;
79102 - int arg12 ;
79103 - int arg13 ;
79104 - int arg14 ;
79105 - int arg15 ;
79106 - void *argp1 = 0 ;
79107 - int res1 = 0 ;
79108 - void *argp2 ;
79109 - int res2 = 0 ;
79110 - int val3 ;
79111 - int ecode3 = 0 ;
79112 - int val4 ;
79113 - int ecode4 = 0 ;
79114 - int val5 ;
79115 - int ecode5 = 0 ;
79116 - int val6 ;
79117 - int ecode6 = 0 ;
79118 - int val7 ;
79119 - int ecode7 = 0 ;
79120 - int val8 ;
79121 - int ecode8 = 0 ;
79122 - int val9 ;
79123 - int ecode9 = 0 ;
79124 - int val10 ;
79125 - int ecode10 = 0 ;
79126 - int val11 ;
79127 - int ecode11 = 0 ;
79128 - int val12 ;
79129 - int ecode12 = 0 ;
79130 - int val13 ;
79131 - int ecode13 = 0 ;
79132 - int val14 ;
79133 - int ecode14 = 0 ;
79134 - int val15 ;
79135 - int ecode15 = 0 ;
79136 - PyObject * obj0 = 0 ;
79137 - PyObject * obj1 = 0 ;
79138 - PyObject * obj2 = 0 ;
79139 - PyObject * obj3 = 0 ;
79140 - PyObject * obj4 = 0 ;
79141 - PyObject * obj5 = 0 ;
79142 - PyObject * obj6 = 0 ;
79143 - PyObject * obj7 = 0 ;
79144 - PyObject * obj8 = 0 ;
79145 - PyObject * obj9 = 0 ;
79146 - PyObject * obj10 = 0 ;
79147 - PyObject * obj11 = 0 ;
79148 - PyObject * obj12 = 0 ;
79149 - PyObject * obj13 = 0 ;
79150 - PyObject * obj14 = 0 ;
79151 - vips::VImage result;
79152 -
79153 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOO:VImage_lrmosaic1",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14)) SWIG_fail;
79154 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
79155 - if (!SWIG_IsOK(res1)) {
79156 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lrmosaic1" "', argument " "1"" of type '" "vips::VImage *""'");
79157 - }
79158 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
79159 - {
79160 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
79161 - if (!SWIG_IsOK(res2)) {
79162 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lrmosaic1" "', argument " "2"" of type '" "vips::VImage""'");
79163 - }
79164 - if (!argp2) {
79165 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lrmosaic1" "', argument " "2"" of type '" "vips::VImage""'");
79166 - } else {
79167 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
79168 - arg2 = *temp;
79169 - if (SWIG_IsNewObj(res2)) delete temp;
79170 - }
79171 - }
79172 - ecode3 = SWIG_AsVal_int(obj2, &val3);
79173 - if (!SWIG_IsOK(ecode3)) {
79174 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lrmosaic1" "', argument " "3"" of type '" "int""'");
79175 - }
79176 - arg3 = static_cast< int >(val3);
79177 - ecode4 = SWIG_AsVal_int(obj3, &val4);
79178 - if (!SWIG_IsOK(ecode4)) {
79179 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_lrmosaic1" "', argument " "4"" of type '" "int""'");
79180 - }
79181 - arg4 = static_cast< int >(val4);
79182 - ecode5 = SWIG_AsVal_int(obj4, &val5);
79183 - if (!SWIG_IsOK(ecode5)) {
79184 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_lrmosaic1" "', argument " "5"" of type '" "int""'");
79185 - }
79186 - arg5 = static_cast< int >(val5);
79187 - ecode6 = SWIG_AsVal_int(obj5, &val6);
79188 - if (!SWIG_IsOK(ecode6)) {
79189 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_lrmosaic1" "', argument " "6"" of type '" "int""'");
79190 - }
79191 - arg6 = static_cast< int >(val6);
79192 - ecode7 = SWIG_AsVal_int(obj6, &val7);
79193 - if (!SWIG_IsOK(ecode7)) {
79194 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_lrmosaic1" "', argument " "7"" of type '" "int""'");
79195 - }
79196 - arg7 = static_cast< int >(val7);
79197 - ecode8 = SWIG_AsVal_int(obj7, &val8);
79198 - if (!SWIG_IsOK(ecode8)) {
79199 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_lrmosaic1" "', argument " "8"" of type '" "int""'");
79200 - }
79201 - arg8 = static_cast< int >(val8);
79202 - ecode9 = SWIG_AsVal_int(obj8, &val9);
79203 - if (!SWIG_IsOK(ecode9)) {
79204 - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_lrmosaic1" "', argument " "9"" of type '" "int""'");
79205 - }
79206 - arg9 = static_cast< int >(val9);
79207 - ecode10 = SWIG_AsVal_int(obj9, &val10);
79208 - if (!SWIG_IsOK(ecode10)) {
79209 - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_lrmosaic1" "', argument " "10"" of type '" "int""'");
79210 - }
79211 - arg10 = static_cast< int >(val10);
79212 - ecode11 = SWIG_AsVal_int(obj10, &val11);
79213 - if (!SWIG_IsOK(ecode11)) {
79214 - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_lrmosaic1" "', argument " "11"" of type '" "int""'");
79215 - }
79216 - arg11 = static_cast< int >(val11);
79217 - ecode12 = SWIG_AsVal_int(obj11, &val12);
79218 - if (!SWIG_IsOK(ecode12)) {
79219 - SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "VImage_lrmosaic1" "', argument " "12"" of type '" "int""'");
79220 - }
79221 - arg12 = static_cast< int >(val12);
79222 - ecode13 = SWIG_AsVal_int(obj12, &val13);
79223 - if (!SWIG_IsOK(ecode13)) {
79224 - SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "VImage_lrmosaic1" "', argument " "13"" of type '" "int""'");
79225 - }
79226 - arg13 = static_cast< int >(val13);
79227 - ecode14 = SWIG_AsVal_int(obj13, &val14);
79228 - if (!SWIG_IsOK(ecode14)) {
79229 - SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "VImage_lrmosaic1" "', argument " "14"" of type '" "int""'");
79230 - }
79231 - arg14 = static_cast< int >(val14);
79232 - ecode15 = SWIG_AsVal_int(obj14, &val15);
79233 - if (!SWIG_IsOK(ecode15)) {
79234 - SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "VImage_lrmosaic1" "', argument " "15"" of type '" "int""'");
79235 - }
79236 - arg15 = static_cast< int >(val15);
79237 - try {
79238 - result = (arg1)->lrmosaic1(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
79239 - }
79240 - catch(vips::VError &_e) {
79241 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
79242 - }
79243 -
79244 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
79245 - return resultobj;
79246 -fail:
79247 - return NULL;
79248 -}
79249 -
79250 -
79251 -SWIGINTERN PyObject *_wrap_VImage_match_linear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79252 - PyObject *resultobj = 0;
79253 - vips::VImage *arg1 = (vips::VImage *) 0 ;
79254 - vips::VImage arg2 ;
79255 - int arg3 ;
79256 - int arg4 ;
79257 - int arg5 ;
79258 - int arg6 ;
79259 - int arg7 ;
79260 - int arg8 ;
79261 - int arg9 ;
79262 - int arg10 ;
79263 - void *argp1 = 0 ;
79264 - int res1 = 0 ;
79265 - void *argp2 ;
79266 - int res2 = 0 ;
79267 - int val3 ;
79268 - int ecode3 = 0 ;
79269 - int val4 ;
79270 - int ecode4 = 0 ;
79271 - int val5 ;
79272 - int ecode5 = 0 ;
79273 - int val6 ;
79274 - int ecode6 = 0 ;
79275 - int val7 ;
79276 - int ecode7 = 0 ;
79277 - int val8 ;
79278 - int ecode8 = 0 ;
79279 - int val9 ;
79280 - int ecode9 = 0 ;
79281 - int val10 ;
79282 - int ecode10 = 0 ;
79283 - PyObject * obj0 = 0 ;
79284 - PyObject * obj1 = 0 ;
79285 - PyObject * obj2 = 0 ;
79286 - PyObject * obj3 = 0 ;
79287 - PyObject * obj4 = 0 ;
79288 - PyObject * obj5 = 0 ;
79289 - PyObject * obj6 = 0 ;
79290 - PyObject * obj7 = 0 ;
79291 - PyObject * obj8 = 0 ;
79292 - PyObject * obj9 = 0 ;
79293 - vips::VImage result;
79294 -
79295 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:VImage_match_linear",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
79296 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
79297 - if (!SWIG_IsOK(res1)) {
79298 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_match_linear" "', argument " "1"" of type '" "vips::VImage *""'");
79299 - }
79300 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
79301 - {
79302 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
79303 - if (!SWIG_IsOK(res2)) {
79304 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_match_linear" "', argument " "2"" of type '" "vips::VImage""'");
79305 - }
79306 - if (!argp2) {
79307 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_match_linear" "', argument " "2"" of type '" "vips::VImage""'");
79308 - } else {
79309 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
79310 - arg2 = *temp;
79311 - if (SWIG_IsNewObj(res2)) delete temp;
79312 - }
79313 - }
79314 - ecode3 = SWIG_AsVal_int(obj2, &val3);
79315 - if (!SWIG_IsOK(ecode3)) {
79316 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_match_linear" "', argument " "3"" of type '" "int""'");
79317 - }
79318 - arg3 = static_cast< int >(val3);
79319 - ecode4 = SWIG_AsVal_int(obj3, &val4);
79320 - if (!SWIG_IsOK(ecode4)) {
79321 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_match_linear" "', argument " "4"" of type '" "int""'");
79322 - }
79323 - arg4 = static_cast< int >(val4);
79324 - ecode5 = SWIG_AsVal_int(obj4, &val5);
79325 - if (!SWIG_IsOK(ecode5)) {
79326 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_match_linear" "', argument " "5"" of type '" "int""'");
79327 - }
79328 - arg5 = static_cast< int >(val5);
79329 - ecode6 = SWIG_AsVal_int(obj5, &val6);
79330 - if (!SWIG_IsOK(ecode6)) {
79331 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_match_linear" "', argument " "6"" of type '" "int""'");
79332 - }
79333 - arg6 = static_cast< int >(val6);
79334 - ecode7 = SWIG_AsVal_int(obj6, &val7);
79335 - if (!SWIG_IsOK(ecode7)) {
79336 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_match_linear" "', argument " "7"" of type '" "int""'");
79337 - }
79338 - arg7 = static_cast< int >(val7);
79339 - ecode8 = SWIG_AsVal_int(obj7, &val8);
79340 - if (!SWIG_IsOK(ecode8)) {
79341 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_match_linear" "', argument " "8"" of type '" "int""'");
79342 - }
79343 - arg8 = static_cast< int >(val8);
79344 - ecode9 = SWIG_AsVal_int(obj8, &val9);
79345 - if (!SWIG_IsOK(ecode9)) {
79346 - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_match_linear" "', argument " "9"" of type '" "int""'");
79347 - }
79348 - arg9 = static_cast< int >(val9);
79349 - ecode10 = SWIG_AsVal_int(obj9, &val10);
79350 - if (!SWIG_IsOK(ecode10)) {
79351 - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_match_linear" "', argument " "10"" of type '" "int""'");
79352 - }
79353 - arg10 = static_cast< int >(val10);
79354 - try {
79355 - result = (arg1)->match_linear(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
79356 - }
79357 - catch(vips::VError &_e) {
79358 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
79359 - }
79360 -
79361 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
79362 - return resultobj;
79363 -fail:
79364 - return NULL;
79365 -}
79366 -
79367 -
79368 -SWIGINTERN PyObject *_wrap_VImage_match_linear_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79369 - PyObject *resultobj = 0;
79370 - vips::VImage *arg1 = (vips::VImage *) 0 ;
79371 - vips::VImage arg2 ;
79372 - int arg3 ;
79373 - int arg4 ;
79374 - int arg5 ;
79375 - int arg6 ;
79376 - int arg7 ;
79377 - int arg8 ;
79378 - int arg9 ;
79379 - int arg10 ;
79380 - int arg11 ;
79381 - int arg12 ;
79382 - void *argp1 = 0 ;
79383 - int res1 = 0 ;
79384 - void *argp2 ;
79385 - int res2 = 0 ;
79386 - int val3 ;
79387 - int ecode3 = 0 ;
79388 - int val4 ;
79389 - int ecode4 = 0 ;
79390 - int val5 ;
79391 - int ecode5 = 0 ;
79392 - int val6 ;
79393 - int ecode6 = 0 ;
79394 - int val7 ;
79395 - int ecode7 = 0 ;
79396 - int val8 ;
79397 - int ecode8 = 0 ;
79398 - int val9 ;
79399 - int ecode9 = 0 ;
79400 - int val10 ;
79401 - int ecode10 = 0 ;
79402 - int val11 ;
79403 - int ecode11 = 0 ;
79404 - int val12 ;
79405 - int ecode12 = 0 ;
79406 - PyObject * obj0 = 0 ;
79407 - PyObject * obj1 = 0 ;
79408 - PyObject * obj2 = 0 ;
79409 - PyObject * obj3 = 0 ;
79410 - PyObject * obj4 = 0 ;
79411 - PyObject * obj5 = 0 ;
79412 - PyObject * obj6 = 0 ;
79413 - PyObject * obj7 = 0 ;
79414 - PyObject * obj8 = 0 ;
79415 - PyObject * obj9 = 0 ;
79416 - PyObject * obj10 = 0 ;
79417 - PyObject * obj11 = 0 ;
79418 - vips::VImage result;
79419 -
79420 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOO:VImage_match_linear_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11)) SWIG_fail;
79421 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
79422 - if (!SWIG_IsOK(res1)) {
79423 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_match_linear_search" "', argument " "1"" of type '" "vips::VImage *""'");
79424 - }
79425 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
79426 - {
79427 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
79428 - if (!SWIG_IsOK(res2)) {
79429 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_match_linear_search" "', argument " "2"" of type '" "vips::VImage""'");
79430 - }
79431 - if (!argp2) {
79432 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_match_linear_search" "', argument " "2"" of type '" "vips::VImage""'");
79433 - } else {
79434 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
79435 - arg2 = *temp;
79436 - if (SWIG_IsNewObj(res2)) delete temp;
79437 - }
79438 - }
79439 - ecode3 = SWIG_AsVal_int(obj2, &val3);
79440 - if (!SWIG_IsOK(ecode3)) {
79441 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_match_linear_search" "', argument " "3"" of type '" "int""'");
79442 - }
79443 - arg3 = static_cast< int >(val3);
79444 - ecode4 = SWIG_AsVal_int(obj3, &val4);
79445 - if (!SWIG_IsOK(ecode4)) {
79446 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_match_linear_search" "', argument " "4"" of type '" "int""'");
79447 - }
79448 - arg4 = static_cast< int >(val4);
79449 - ecode5 = SWIG_AsVal_int(obj4, &val5);
79450 - if (!SWIG_IsOK(ecode5)) {
79451 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_match_linear_search" "', argument " "5"" of type '" "int""'");
79452 - }
79453 - arg5 = static_cast< int >(val5);
79454 - ecode6 = SWIG_AsVal_int(obj5, &val6);
79455 - if (!SWIG_IsOK(ecode6)) {
79456 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_match_linear_search" "', argument " "6"" of type '" "int""'");
79457 - }
79458 - arg6 = static_cast< int >(val6);
79459 - ecode7 = SWIG_AsVal_int(obj6, &val7);
79460 - if (!SWIG_IsOK(ecode7)) {
79461 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_match_linear_search" "', argument " "7"" of type '" "int""'");
79462 - }
79463 - arg7 = static_cast< int >(val7);
79464 - ecode8 = SWIG_AsVal_int(obj7, &val8);
79465 - if (!SWIG_IsOK(ecode8)) {
79466 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_match_linear_search" "', argument " "8"" of type '" "int""'");
79467 - }
79468 - arg8 = static_cast< int >(val8);
79469 - ecode9 = SWIG_AsVal_int(obj8, &val9);
79470 - if (!SWIG_IsOK(ecode9)) {
79471 - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_match_linear_search" "', argument " "9"" of type '" "int""'");
79472 - }
79473 - arg9 = static_cast< int >(val9);
79474 - ecode10 = SWIG_AsVal_int(obj9, &val10);
79475 - if (!SWIG_IsOK(ecode10)) {
79476 - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_match_linear_search" "', argument " "10"" of type '" "int""'");
79477 - }
79478 - arg10 = static_cast< int >(val10);
79479 - ecode11 = SWIG_AsVal_int(obj10, &val11);
79480 - if (!SWIG_IsOK(ecode11)) {
79481 - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_match_linear_search" "', argument " "11"" of type '" "int""'");
79482 - }
79483 - arg11 = static_cast< int >(val11);
79484 - ecode12 = SWIG_AsVal_int(obj11, &val12);
79485 - if (!SWIG_IsOK(ecode12)) {
79486 - SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "VImage_match_linear_search" "', argument " "12"" of type '" "int""'");
79487 - }
79488 - arg12 = static_cast< int >(val12);
79489 - try {
79490 - result = (arg1)->match_linear_search(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
79491 - }
79492 - catch(vips::VError &_e) {
79493 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
79494 - }
79495 -
79496 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
79497 - return resultobj;
79498 -fail:
79499 - return NULL;
79500 -}
79501 -
79502 -
79503 -SWIGINTERN PyObject *_wrap_VImage_maxpos_subpel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79504 - PyObject *resultobj = 0;
79505 - vips::VImage *arg1 = (vips::VImage *) 0 ;
79506 - double *arg2 = 0 ;
79507 - void *argp1 = 0 ;
79508 - int res1 = 0 ;
79509 - double temp2 ;
79510 - int res2 = SWIG_TMPOBJ ;
79511 - PyObject * obj0 = 0 ;
79512 - double result;
79513 -
79514 - arg2 = &temp2;
79515 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_maxpos_subpel",&obj0)) SWIG_fail;
79516 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
79517 - if (!SWIG_IsOK(res1)) {
79518 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_maxpos_subpel" "', argument " "1"" of type '" "vips::VImage *""'");
79519 - }
79520 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
79521 - try {
79522 - result = (double)(arg1)->maxpos_subpel(*arg2);
79523 - }
79524 - catch(vips::VError &_e) {
79525 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
79526 - }
79527 -
79528 - resultobj = SWIG_From_double(static_cast< double >(result));
79529 - if (SWIG_IsTmpObj(res2)) {
79530 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
79531 - } else {
79532 - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
79533 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
79534 - }
79535 - return resultobj;
79536 -fail:
79537 - return NULL;
79538 -}
79539 -
79540 -
79541 -SWIGINTERN PyObject *_wrap_VImage_remosaic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79542 - PyObject *resultobj = 0;
79543 - vips::VImage *arg1 = (vips::VImage *) 0 ;
79544 - char *arg2 = (char *) 0 ;
79545 - char *arg3 = (char *) 0 ;
79546 - void *argp1 = 0 ;
79547 - int res1 = 0 ;
79548 - int res2 ;
79549 - char *buf2 = 0 ;
79550 - int alloc2 = 0 ;
79551 - int res3 ;
79552 - char *buf3 = 0 ;
79553 - int alloc3 = 0 ;
79554 - PyObject * obj0 = 0 ;
79555 - PyObject * obj1 = 0 ;
79556 - PyObject * obj2 = 0 ;
79557 - vips::VImage result;
79558 -
79559 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_remosaic",&obj0,&obj1,&obj2)) SWIG_fail;
79560 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
79561 - if (!SWIG_IsOK(res1)) {
79562 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_remosaic" "', argument " "1"" of type '" "vips::VImage *""'");
79563 - }
79564 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
79565 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
79566 - if (!SWIG_IsOK(res2)) {
79567 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_remosaic" "', argument " "2"" of type '" "char *""'");
79568 - }
79569 - arg2 = reinterpret_cast< char * >(buf2);
79570 - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
79571 - if (!SWIG_IsOK(res3)) {
79572 - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_remosaic" "', argument " "3"" of type '" "char *""'");
79573 - }
79574 - arg3 = reinterpret_cast< char * >(buf3);
79575 - try {
79576 - result = (arg1)->remosaic(arg2,arg3);
79577 - }
79578 - catch(vips::VError &_e) {
79579 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
79580 - }
79581 -
79582 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
79583 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
79584 - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
79585 - return resultobj;
79586 -fail:
79587 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
79588 - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
79589 - return NULL;
79590 -}
79591 -
79592 -
79593 -SWIGINTERN PyObject *_wrap_VImage_tbmerge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79594 - PyObject *resultobj = 0;
79595 - vips::VImage *arg1 = (vips::VImage *) 0 ;
79596 - vips::VImage arg2 ;
79597 - int arg3 ;
79598 - int arg4 ;
79599 - int arg5 ;
79600 - void *argp1 = 0 ;
79601 - int res1 = 0 ;
79602 - void *argp2 ;
79603 - int res2 = 0 ;
79604 - int val3 ;
79605 - int ecode3 = 0 ;
79606 - int val4 ;
79607 - int ecode4 = 0 ;
79608 - int val5 ;
79609 - int ecode5 = 0 ;
79610 - PyObject * obj0 = 0 ;
79611 - PyObject * obj1 = 0 ;
79612 - PyObject * obj2 = 0 ;
79613 - PyObject * obj3 = 0 ;
79614 - PyObject * obj4 = 0 ;
79615 - vips::VImage result;
79616 -
79617 - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_tbmerge",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
79618 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
79619 - if (!SWIG_IsOK(res1)) {
79620 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tbmerge" "', argument " "1"" of type '" "vips::VImage *""'");
79621 - }
79622 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
79623 - {
79624 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
79625 - if (!SWIG_IsOK(res2)) {
79626 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_tbmerge" "', argument " "2"" of type '" "vips::VImage""'");
79627 - }
79628 - if (!argp2) {
79629 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_tbmerge" "', argument " "2"" of type '" "vips::VImage""'");
79630 - } else {
79631 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
79632 - arg2 = *temp;
79633 - if (SWIG_IsNewObj(res2)) delete temp;
79634 - }
79635 - }
79636 - ecode3 = SWIG_AsVal_int(obj2, &val3);
79637 - if (!SWIG_IsOK(ecode3)) {
79638 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_tbmerge" "', argument " "3"" of type '" "int""'");
79639 - }
79640 - arg3 = static_cast< int >(val3);
79641 - ecode4 = SWIG_AsVal_int(obj3, &val4);
79642 - if (!SWIG_IsOK(ecode4)) {
79643 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_tbmerge" "', argument " "4"" of type '" "int""'");
79644 - }
79645 - arg4 = static_cast< int >(val4);
79646 - ecode5 = SWIG_AsVal_int(obj4, &val5);
79647 - if (!SWIG_IsOK(ecode5)) {
79648 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_tbmerge" "', argument " "5"" of type '" "int""'");
79649 - }
79650 - arg5 = static_cast< int >(val5);
79651 - try {
79652 - result = (arg1)->tbmerge(arg2,arg3,arg4,arg5);
79653 - }
79654 - catch(vips::VError &_e) {
79655 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
79656 - }
79657 -
79658 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
79659 - return resultobj;
79660 -fail:
79661 - return NULL;
79662 -}
79663 -
79664 -
79665 -SWIGINTERN PyObject *_wrap_VImage_tbmerge1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79666 - PyObject *resultobj = 0;
79667 - vips::VImage *arg1 = (vips::VImage *) 0 ;
79668 - vips::VImage arg2 ;
79669 - int arg3 ;
79670 - int arg4 ;
79671 - int arg5 ;
79672 - int arg6 ;
79673 - int arg7 ;
79674 - int arg8 ;
79675 - int arg9 ;
79676 - int arg10 ;
79677 - int arg11 ;
79678 - void *argp1 = 0 ;
79679 - int res1 = 0 ;
79680 - void *argp2 ;
79681 - int res2 = 0 ;
79682 - int val3 ;
79683 - int ecode3 = 0 ;
79684 - int val4 ;
79685 - int ecode4 = 0 ;
79686 - int val5 ;
79687 - int ecode5 = 0 ;
79688 - int val6 ;
79689 - int ecode6 = 0 ;
79690 - int val7 ;
79691 - int ecode7 = 0 ;
79692 - int val8 ;
79693 - int ecode8 = 0 ;
79694 - int val9 ;
79695 - int ecode9 = 0 ;
79696 - int val10 ;
79697 - int ecode10 = 0 ;
79698 - int val11 ;
79699 - int ecode11 = 0 ;
79700 - PyObject * obj0 = 0 ;
79701 - PyObject * obj1 = 0 ;
79702 - PyObject * obj2 = 0 ;
79703 - PyObject * obj3 = 0 ;
79704 - PyObject * obj4 = 0 ;
79705 - PyObject * obj5 = 0 ;
79706 - PyObject * obj6 = 0 ;
79707 - PyObject * obj7 = 0 ;
79708 - PyObject * obj8 = 0 ;
79709 - PyObject * obj9 = 0 ;
79710 - PyObject * obj10 = 0 ;
79711 - vips::VImage result;
79712 -
79713 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:VImage_tbmerge1",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
79714 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
79715 - if (!SWIG_IsOK(res1)) {
79716 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tbmerge1" "', argument " "1"" of type '" "vips::VImage *""'");
79717 - }
79718 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
79719 - {
79720 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
79721 - if (!SWIG_IsOK(res2)) {
79722 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_tbmerge1" "', argument " "2"" of type '" "vips::VImage""'");
79723 - }
79724 - if (!argp2) {
79725 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_tbmerge1" "', argument " "2"" of type '" "vips::VImage""'");
79726 - } else {
79727 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
79728 - arg2 = *temp;
79729 - if (SWIG_IsNewObj(res2)) delete temp;
79730 - }
79731 - }
79732 - ecode3 = SWIG_AsVal_int(obj2, &val3);
79733 - if (!SWIG_IsOK(ecode3)) {
79734 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_tbmerge1" "', argument " "3"" of type '" "int""'");
79735 - }
79736 - arg3 = static_cast< int >(val3);
79737 - ecode4 = SWIG_AsVal_int(obj3, &val4);
79738 - if (!SWIG_IsOK(ecode4)) {
79739 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_tbmerge1" "', argument " "4"" of type '" "int""'");
79740 - }
79741 - arg4 = static_cast< int >(val4);
79742 - ecode5 = SWIG_AsVal_int(obj4, &val5);
79743 - if (!SWIG_IsOK(ecode5)) {
79744 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_tbmerge1" "', argument " "5"" of type '" "int""'");
79745 - }
79746 - arg5 = static_cast< int >(val5);
79747 - ecode6 = SWIG_AsVal_int(obj5, &val6);
79748 - if (!SWIG_IsOK(ecode6)) {
79749 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_tbmerge1" "', argument " "6"" of type '" "int""'");
79750 - }
79751 - arg6 = static_cast< int >(val6);
79752 - ecode7 = SWIG_AsVal_int(obj6, &val7);
79753 - if (!SWIG_IsOK(ecode7)) {
79754 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_tbmerge1" "', argument " "7"" of type '" "int""'");
79755 - }
79756 - arg7 = static_cast< int >(val7);
79757 - ecode8 = SWIG_AsVal_int(obj7, &val8);
79758 - if (!SWIG_IsOK(ecode8)) {
79759 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_tbmerge1" "', argument " "8"" of type '" "int""'");
79760 - }
79761 - arg8 = static_cast< int >(val8);
79762 - ecode9 = SWIG_AsVal_int(obj8, &val9);
79763 - if (!SWIG_IsOK(ecode9)) {
79764 - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_tbmerge1" "', argument " "9"" of type '" "int""'");
79765 - }
79766 - arg9 = static_cast< int >(val9);
79767 - ecode10 = SWIG_AsVal_int(obj9, &val10);
79768 - if (!SWIG_IsOK(ecode10)) {
79769 - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_tbmerge1" "', argument " "10"" of type '" "int""'");
79770 - }
79771 - arg10 = static_cast< int >(val10);
79772 - ecode11 = SWIG_AsVal_int(obj10, &val11);
79773 - if (!SWIG_IsOK(ecode11)) {
79774 - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_tbmerge1" "', argument " "11"" of type '" "int""'");
79775 - }
79776 - arg11 = static_cast< int >(val11);
79777 - try {
79778 - result = (arg1)->tbmerge1(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
79779 - }
79780 - catch(vips::VError &_e) {
79781 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
79782 - }
79783 -
79784 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
79785 - return resultobj;
79786 -fail:
79787 - return NULL;
79788 -}
79789 -
79790 -
79791 -SWIGINTERN PyObject *_wrap_VImage_tbmosaic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79792 - PyObject *resultobj = 0;
79793 - vips::VImage *arg1 = (vips::VImage *) 0 ;
79794 - vips::VImage arg2 ;
79795 - int arg3 ;
79796 - int arg4 ;
79797 - int arg5 ;
79798 - int arg6 ;
79799 - int arg7 ;
79800 - int arg8 ;
79801 - int arg9 ;
79802 - int arg10 ;
79803 - int arg11 ;
79804 - void *argp1 = 0 ;
79805 - int res1 = 0 ;
79806 - void *argp2 ;
79807 - int res2 = 0 ;
79808 - int val3 ;
79809 - int ecode3 = 0 ;
79810 - int val4 ;
79811 - int ecode4 = 0 ;
79812 - int val5 ;
79813 - int ecode5 = 0 ;
79814 - int val6 ;
79815 - int ecode6 = 0 ;
79816 - int val7 ;
79817 - int ecode7 = 0 ;
79818 - int val8 ;
79819 - int ecode8 = 0 ;
79820 - int val9 ;
79821 - int ecode9 = 0 ;
79822 - int val10 ;
79823 - int ecode10 = 0 ;
79824 - int val11 ;
79825 - int ecode11 = 0 ;
79826 - PyObject * obj0 = 0 ;
79827 - PyObject * obj1 = 0 ;
79828 - PyObject * obj2 = 0 ;
79829 - PyObject * obj3 = 0 ;
79830 - PyObject * obj4 = 0 ;
79831 - PyObject * obj5 = 0 ;
79832 - PyObject * obj6 = 0 ;
79833 - PyObject * obj7 = 0 ;
79834 - PyObject * obj8 = 0 ;
79835 - PyObject * obj9 = 0 ;
79836 - PyObject * obj10 = 0 ;
79837 - vips::VImage result;
79838 -
79839 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:VImage_tbmosaic",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
79840 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
79841 - if (!SWIG_IsOK(res1)) {
79842 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tbmosaic" "', argument " "1"" of type '" "vips::VImage *""'");
79843 - }
79844 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
79845 - {
79846 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
79847 - if (!SWIG_IsOK(res2)) {
79848 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_tbmosaic" "', argument " "2"" of type '" "vips::VImage""'");
79849 - }
79850 - if (!argp2) {
79851 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_tbmosaic" "', argument " "2"" of type '" "vips::VImage""'");
79852 - } else {
79853 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
79854 - arg2 = *temp;
79855 - if (SWIG_IsNewObj(res2)) delete temp;
79856 - }
79857 - }
79858 - ecode3 = SWIG_AsVal_int(obj2, &val3);
79859 - if (!SWIG_IsOK(ecode3)) {
79860 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_tbmosaic" "', argument " "3"" of type '" "int""'");
79861 - }
79862 - arg3 = static_cast< int >(val3);
79863 - ecode4 = SWIG_AsVal_int(obj3, &val4);
79864 - if (!SWIG_IsOK(ecode4)) {
79865 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_tbmosaic" "', argument " "4"" of type '" "int""'");
79866 - }
79867 - arg4 = static_cast< int >(val4);
79868 - ecode5 = SWIG_AsVal_int(obj4, &val5);
79869 - if (!SWIG_IsOK(ecode5)) {
79870 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_tbmosaic" "', argument " "5"" of type '" "int""'");
79871 - }
79872 - arg5 = static_cast< int >(val5);
79873 - ecode6 = SWIG_AsVal_int(obj5, &val6);
79874 - if (!SWIG_IsOK(ecode6)) {
79875 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_tbmosaic" "', argument " "6"" of type '" "int""'");
79876 - }
79877 - arg6 = static_cast< int >(val6);
79878 - ecode7 = SWIG_AsVal_int(obj6, &val7);
79879 - if (!SWIG_IsOK(ecode7)) {
79880 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_tbmosaic" "', argument " "7"" of type '" "int""'");
79881 - }
79882 - arg7 = static_cast< int >(val7);
79883 - ecode8 = SWIG_AsVal_int(obj7, &val8);
79884 - if (!SWIG_IsOK(ecode8)) {
79885 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_tbmosaic" "', argument " "8"" of type '" "int""'");
79886 - }
79887 - arg8 = static_cast< int >(val8);
79888 - ecode9 = SWIG_AsVal_int(obj8, &val9);
79889 - if (!SWIG_IsOK(ecode9)) {
79890 - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_tbmosaic" "', argument " "9"" of type '" "int""'");
79891 - }
79892 - arg9 = static_cast< int >(val9);
79893 - ecode10 = SWIG_AsVal_int(obj9, &val10);
79894 - if (!SWIG_IsOK(ecode10)) {
79895 - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_tbmosaic" "', argument " "10"" of type '" "int""'");
79896 - }
79897 - arg10 = static_cast< int >(val10);
79898 - ecode11 = SWIG_AsVal_int(obj10, &val11);
79899 - if (!SWIG_IsOK(ecode11)) {
79900 - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_tbmosaic" "', argument " "11"" of type '" "int""'");
79901 - }
79902 - arg11 = static_cast< int >(val11);
79903 - try {
79904 - result = (arg1)->tbmosaic(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
79905 - }
79906 - catch(vips::VError &_e) {
79907 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
79908 - }
79909 -
79910 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
79911 - return resultobj;
79912 -fail:
79913 - return NULL;
79914 -}
79915 -
79916 -
79917 -SWIGINTERN PyObject *_wrap_VImage_tbmosaic1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79918 - PyObject *resultobj = 0;
79919 - vips::VImage *arg1 = (vips::VImage *) 0 ;
79920 - vips::VImage arg2 ;
79921 - int arg3 ;
79922 - int arg4 ;
79923 - int arg5 ;
79924 - int arg6 ;
79925 - int arg7 ;
79926 - int arg8 ;
79927 - int arg9 ;
79928 - int arg10 ;
79929 - int arg11 ;
79930 - int arg12 ;
79931 - int arg13 ;
79932 - int arg14 ;
79933 - int arg15 ;
79934 - void *argp1 = 0 ;
79935 - int res1 = 0 ;
79936 - void *argp2 ;
79937 - int res2 = 0 ;
79938 - int val3 ;
79939 - int ecode3 = 0 ;
79940 - int val4 ;
79941 - int ecode4 = 0 ;
79942 - int val5 ;
79943 - int ecode5 = 0 ;
79944 - int val6 ;
79945 - int ecode6 = 0 ;
79946 - int val7 ;
79947 - int ecode7 = 0 ;
79948 - int val8 ;
79949 - int ecode8 = 0 ;
79950 - int val9 ;
79951 - int ecode9 = 0 ;
79952 - int val10 ;
79953 - int ecode10 = 0 ;
79954 - int val11 ;
79955 - int ecode11 = 0 ;
79956 - int val12 ;
79957 - int ecode12 = 0 ;
79958 - int val13 ;
79959 - int ecode13 = 0 ;
79960 - int val14 ;
79961 - int ecode14 = 0 ;
79962 - int val15 ;
79963 - int ecode15 = 0 ;
79964 - PyObject * obj0 = 0 ;
79965 - PyObject * obj1 = 0 ;
79966 - PyObject * obj2 = 0 ;
79967 - PyObject * obj3 = 0 ;
79968 - PyObject * obj4 = 0 ;
79969 - PyObject * obj5 = 0 ;
79970 - PyObject * obj6 = 0 ;
79971 - PyObject * obj7 = 0 ;
79972 - PyObject * obj8 = 0 ;
79973 - PyObject * obj9 = 0 ;
79974 - PyObject * obj10 = 0 ;
79975 - PyObject * obj11 = 0 ;
79976 - PyObject * obj12 = 0 ;
79977 - PyObject * obj13 = 0 ;
79978 - PyObject * obj14 = 0 ;
79979 - vips::VImage result;
79980 -
79981 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOO:VImage_tbmosaic1",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14)) SWIG_fail;
79982 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
79983 - if (!SWIG_IsOK(res1)) {
79984 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tbmosaic1" "', argument " "1"" of type '" "vips::VImage *""'");
79985 - }
79986 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
79987 - {
79988 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
79989 - if (!SWIG_IsOK(res2)) {
79990 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_tbmosaic1" "', argument " "2"" of type '" "vips::VImage""'");
79991 - }
79992 - if (!argp2) {
79993 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_tbmosaic1" "', argument " "2"" of type '" "vips::VImage""'");
79994 - } else {
79995 - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
79996 - arg2 = *temp;
79997 - if (SWIG_IsNewObj(res2)) delete temp;
79998 - }
79999 - }
80000 - ecode3 = SWIG_AsVal_int(obj2, &val3);
80001 - if (!SWIG_IsOK(ecode3)) {
80002 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_tbmosaic1" "', argument " "3"" of type '" "int""'");
80003 - }
80004 - arg3 = static_cast< int >(val3);
80005 - ecode4 = SWIG_AsVal_int(obj3, &val4);
80006 - if (!SWIG_IsOK(ecode4)) {
80007 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_tbmosaic1" "', argument " "4"" of type '" "int""'");
80008 - }
80009 - arg4 = static_cast< int >(val4);
80010 - ecode5 = SWIG_AsVal_int(obj4, &val5);
80011 - if (!SWIG_IsOK(ecode5)) {
80012 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_tbmosaic1" "', argument " "5"" of type '" "int""'");
80013 - }
80014 - arg5 = static_cast< int >(val5);
80015 - ecode6 = SWIG_AsVal_int(obj5, &val6);
80016 - if (!SWIG_IsOK(ecode6)) {
80017 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_tbmosaic1" "', argument " "6"" of type '" "int""'");
80018 - }
80019 - arg6 = static_cast< int >(val6);
80020 - ecode7 = SWIG_AsVal_int(obj6, &val7);
80021 - if (!SWIG_IsOK(ecode7)) {
80022 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_tbmosaic1" "', argument " "7"" of type '" "int""'");
80023 - }
80024 - arg7 = static_cast< int >(val7);
80025 - ecode8 = SWIG_AsVal_int(obj7, &val8);
80026 - if (!SWIG_IsOK(ecode8)) {
80027 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_tbmosaic1" "', argument " "8"" of type '" "int""'");
80028 - }
80029 - arg8 = static_cast< int >(val8);
80030 - ecode9 = SWIG_AsVal_int(obj8, &val9);
80031 - if (!SWIG_IsOK(ecode9)) {
80032 - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_tbmosaic1" "', argument " "9"" of type '" "int""'");
80033 - }
80034 - arg9 = static_cast< int >(val9);
80035 - ecode10 = SWIG_AsVal_int(obj9, &val10);
80036 - if (!SWIG_IsOK(ecode10)) {
80037 - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_tbmosaic1" "', argument " "10"" of type '" "int""'");
80038 - }
80039 - arg10 = static_cast< int >(val10);
80040 - ecode11 = SWIG_AsVal_int(obj10, &val11);
80041 - if (!SWIG_IsOK(ecode11)) {
80042 - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_tbmosaic1" "', argument " "11"" of type '" "int""'");
80043 - }
80044 - arg11 = static_cast< int >(val11);
80045 - ecode12 = SWIG_AsVal_int(obj11, &val12);
80046 - if (!SWIG_IsOK(ecode12)) {
80047 - SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "VImage_tbmosaic1" "', argument " "12"" of type '" "int""'");
80048 - }
80049 - arg12 = static_cast< int >(val12);
80050 - ecode13 = SWIG_AsVal_int(obj12, &val13);
80051 - if (!SWIG_IsOK(ecode13)) {
80052 - SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "VImage_tbmosaic1" "', argument " "13"" of type '" "int""'");
80053 - }
80054 - arg13 = static_cast< int >(val13);
80055 - ecode14 = SWIG_AsVal_int(obj13, &val14);
80056 - if (!SWIG_IsOK(ecode14)) {
80057 - SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "VImage_tbmosaic1" "', argument " "14"" of type '" "int""'");
80058 - }
80059 - arg14 = static_cast< int >(val14);
80060 - ecode15 = SWIG_AsVal_int(obj14, &val15);
80061 - if (!SWIG_IsOK(ecode15)) {
80062 - SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "VImage_tbmosaic1" "', argument " "15"" of type '" "int""'");
80063 - }
80064 - arg15 = static_cast< int >(val15);
80065 - try {
80066 - result = (arg1)->tbmosaic1(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
80067 - }
80068 - catch(vips::VError &_e) {
80069 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
80070 - }
80071 -
80072 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
80073 - return resultobj;
80074 -fail:
80075 - return NULL;
80076 -}
80077 -
80078 -
80079 -SWIGINTERN PyObject *_wrap_VImage_benchmark(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80080 - PyObject *resultobj = 0;
80081 - vips::VImage *arg1 = (vips::VImage *) 0 ;
80082 - void *argp1 = 0 ;
80083 - int res1 = 0 ;
80084 - PyObject * obj0 = 0 ;
80085 - vips::VImage result;
80086 -
80087 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_benchmark",&obj0)) SWIG_fail;
80088 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
80089 - if (!SWIG_IsOK(res1)) {
80090 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_benchmark" "', argument " "1"" of type '" "vips::VImage *""'");
80091 - }
80092 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
80093 - try {
80094 - result = (arg1)->benchmark();
80095 - }
80096 - catch(vips::VError &_e) {
80097 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
80098 - }
80099 -
80100 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
80101 - return resultobj;
80102 -fail:
80103 - return NULL;
80104 -}
80105 -
80106 -
80107 -SWIGINTERN PyObject *_wrap_VImage_benchmark2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80108 - PyObject *resultobj = 0;
80109 - vips::VImage *arg1 = (vips::VImage *) 0 ;
80110 - void *argp1 = 0 ;
80111 - int res1 = 0 ;
80112 - PyObject * obj0 = 0 ;
80113 - double result;
80114 -
80115 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_benchmark2",&obj0)) SWIG_fail;
80116 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
80117 - if (!SWIG_IsOK(res1)) {
80118 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_benchmark2" "', argument " "1"" of type '" "vips::VImage *""'");
80119 - }
80120 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
80121 - try {
80122 - result = (double)(arg1)->benchmark2();
80123 - }
80124 - catch(vips::VError &_e) {
80125 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
80126 - }
80127 -
80128 - resultobj = SWIG_From_double(static_cast< double >(result));
80129 - return resultobj;
80130 -fail:
80131 - return NULL;
80132 -}
80133 -
80134 -
80135 -SWIGINTERN PyObject *_wrap_VImage_benchmarkn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80136 - PyObject *resultobj = 0;
80137 - vips::VImage *arg1 = (vips::VImage *) 0 ;
80138 - int arg2 ;
80139 - void *argp1 = 0 ;
80140 - int res1 = 0 ;
80141 - int val2 ;
80142 - int ecode2 = 0 ;
80143 - PyObject * obj0 = 0 ;
80144 - PyObject * obj1 = 0 ;
80145 - vips::VImage result;
80146 -
80147 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_benchmarkn",&obj0,&obj1)) SWIG_fail;
80148 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
80149 - if (!SWIG_IsOK(res1)) {
80150 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_benchmarkn" "', argument " "1"" of type '" "vips::VImage *""'");
80151 - }
80152 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
80153 - ecode2 = SWIG_AsVal_int(obj1, &val2);
80154 - if (!SWIG_IsOK(ecode2)) {
80155 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_benchmarkn" "', argument " "2"" of type '" "int""'");
80156 - }
80157 - arg2 = static_cast< int >(val2);
80158 - try {
80159 - result = (arg1)->benchmarkn(arg2);
80160 - }
80161 - catch(vips::VError &_e) {
80162 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
80163 - }
80164 -
80165 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
80166 - return resultobj;
80167 -fail:
80168 - return NULL;
80169 -}
80170 -
80171 -
80172 -SWIGINTERN PyObject *_wrap_VImage_eye(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80173 - PyObject *resultobj = 0;
80174 - int arg1 ;
80175 - int arg2 ;
80176 - double arg3 ;
80177 - int val1 ;
80178 - int ecode1 = 0 ;
80179 - int val2 ;
80180 - int ecode2 = 0 ;
80181 - double val3 ;
80182 - int ecode3 = 0 ;
80183 - PyObject * obj0 = 0 ;
80184 - PyObject * obj1 = 0 ;
80185 - PyObject * obj2 = 0 ;
80186 - vips::VImage result;
80187 -
80188 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_eye",&obj0,&obj1,&obj2)) SWIG_fail;
80189 - ecode1 = SWIG_AsVal_int(obj0, &val1);
80190 - if (!SWIG_IsOK(ecode1)) {
80191 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_eye" "', argument " "1"" of type '" "int""'");
80192 - }
80193 - arg1 = static_cast< int >(val1);
80194 - ecode2 = SWIG_AsVal_int(obj1, &val2);
80195 - if (!SWIG_IsOK(ecode2)) {
80196 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_eye" "', argument " "2"" of type '" "int""'");
80197 - }
80198 - arg2 = static_cast< int >(val2);
80199 - ecode3 = SWIG_AsVal_double(obj2, &val3);
80200 - if (!SWIG_IsOK(ecode3)) {
80201 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_eye" "', argument " "3"" of type '" "double""'");
80202 - }
80203 - arg3 = static_cast< double >(val3);
80204 - try {
80205 - result = vips::VImage::eye(arg1,arg2,arg3);
80206 - }
80207 - catch(vips::VError &_e) {
80208 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
80209 - }
80210 -
80211 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
80212 - return resultobj;
80213 -fail:
80214 - return NULL;
80215 -}
80216 -
80217 -
80218 -SWIGINTERN PyObject *_wrap_VImage_grey(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80219 - PyObject *resultobj = 0;
80220 - int arg1 ;
80221 - int arg2 ;
80222 - int val1 ;
80223 - int ecode1 = 0 ;
80224 - int val2 ;
80225 - int ecode2 = 0 ;
80226 - PyObject * obj0 = 0 ;
80227 - PyObject * obj1 = 0 ;
80228 - vips::VImage result;
80229 -
80230 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_grey",&obj0,&obj1)) SWIG_fail;
80231 - ecode1 = SWIG_AsVal_int(obj0, &val1);
80232 - if (!SWIG_IsOK(ecode1)) {
80233 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_grey" "', argument " "1"" of type '" "int""'");
80234 - }
80235 - arg1 = static_cast< int >(val1);
80236 - ecode2 = SWIG_AsVal_int(obj1, &val2);
80237 - if (!SWIG_IsOK(ecode2)) {
80238 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_grey" "', argument " "2"" of type '" "int""'");
80239 - }
80240 - arg2 = static_cast< int >(val2);
80241 - try {
80242 - result = vips::VImage::grey(arg1,arg2);
80243 - }
80244 - catch(vips::VError &_e) {
80245 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
80246 - }
80247 -
80248 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
80249 - return resultobj;
80250 -fail:
80251 - return NULL;
80252 -}
80253 -
80254 -
80255 -SWIGINTERN PyObject *_wrap_VImage_feye(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80256 - PyObject *resultobj = 0;
80257 - int arg1 ;
80258 - int arg2 ;
80259 - double arg3 ;
80260 - int val1 ;
80261 - int ecode1 = 0 ;
80262 - int val2 ;
80263 - int ecode2 = 0 ;
80264 - double val3 ;
80265 - int ecode3 = 0 ;
80266 - PyObject * obj0 = 0 ;
80267 - PyObject * obj1 = 0 ;
80268 - PyObject * obj2 = 0 ;
80269 - vips::VImage result;
80270 -
80271 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_feye",&obj0,&obj1,&obj2)) SWIG_fail;
80272 - ecode1 = SWIG_AsVal_int(obj0, &val1);
80273 - if (!SWIG_IsOK(ecode1)) {
80274 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_feye" "', argument " "1"" of type '" "int""'");
80275 - }
80276 - arg1 = static_cast< int >(val1);
80277 - ecode2 = SWIG_AsVal_int(obj1, &val2);
80278 - if (!SWIG_IsOK(ecode2)) {
80279 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_feye" "', argument " "2"" of type '" "int""'");
80280 - }
80281 - arg2 = static_cast< int >(val2);
80282 - ecode3 = SWIG_AsVal_double(obj2, &val3);
80283 - if (!SWIG_IsOK(ecode3)) {
80284 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_feye" "', argument " "3"" of type '" "double""'");
80285 - }
80286 - arg3 = static_cast< double >(val3);
80287 - try {
80288 - result = vips::VImage::feye(arg1,arg2,arg3);
80289 - }
80290 - catch(vips::VError &_e) {
80291 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
80292 - }
80293 -
80294 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
80295 - return resultobj;
80296 -fail:
80297 - return NULL;
80298 -}
80299 -
80300 -
80301 -SWIGINTERN PyObject *_wrap_VImage_fgrey(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80302 - PyObject *resultobj = 0;
80303 - int arg1 ;
80304 - int arg2 ;
80305 - int val1 ;
80306 - int ecode1 = 0 ;
80307 - int val2 ;
80308 - int ecode2 = 0 ;
80309 - PyObject * obj0 = 0 ;
80310 - PyObject * obj1 = 0 ;
80311 - vips::VImage result;
80312 -
80313 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_fgrey",&obj0,&obj1)) SWIG_fail;
80314 - ecode1 = SWIG_AsVal_int(obj0, &val1);
80315 - if (!SWIG_IsOK(ecode1)) {
80316 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_fgrey" "', argument " "1"" of type '" "int""'");
80317 - }
80318 - arg1 = static_cast< int >(val1);
80319 - ecode2 = SWIG_AsVal_int(obj1, &val2);
80320 - if (!SWIG_IsOK(ecode2)) {
80321 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_fgrey" "', argument " "2"" of type '" "int""'");
80322 - }
80323 - arg2 = static_cast< int >(val2);
80324 - try {
80325 - result = vips::VImage::fgrey(arg1,arg2);
80326 - }
80327 - catch(vips::VError &_e) {
80328 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
80329 - }
80330 -
80331 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
80332 - return resultobj;
80333 -fail:
80334 - return NULL;
80335 -}
80336 -
80337 -
80338 -SWIGINTERN PyObject *_wrap_VImage_fzone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80339 - PyObject *resultobj = 0;
80340 - int arg1 ;
80341 - int val1 ;
80342 - int ecode1 = 0 ;
80343 - PyObject * obj0 = 0 ;
80344 - vips::VImage result;
80345 -
80346 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_fzone",&obj0)) SWIG_fail;
80347 - ecode1 = SWIG_AsVal_int(obj0, &val1);
80348 - if (!SWIG_IsOK(ecode1)) {
80349 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_fzone" "', argument " "1"" of type '" "int""'");
80350 - }
80351 - arg1 = static_cast< int >(val1);
80352 - try {
80353 - result = vips::VImage::fzone(arg1);
80354 - }
80355 - catch(vips::VError &_e) {
80356 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
80357 - }
80358 -
80359 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
80360 - return resultobj;
80361 -fail:
80362 - return NULL;
80363 -}
80364 -
80365 -
80366 -SWIGINTERN PyObject *_wrap_VImage_make_xy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80367 - PyObject *resultobj = 0;
80368 - int arg1 ;
80369 - int arg2 ;
80370 - int val1 ;
80371 - int ecode1 = 0 ;
80372 - int val2 ;
80373 - int ecode2 = 0 ;
80374 - PyObject * obj0 = 0 ;
80375 - PyObject * obj1 = 0 ;
80376 - vips::VImage result;
80377 -
80378 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_make_xy",&obj0,&obj1)) SWIG_fail;
80379 - ecode1 = SWIG_AsVal_int(obj0, &val1);
80380 - if (!SWIG_IsOK(ecode1)) {
80381 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_make_xy" "', argument " "1"" of type '" "int""'");
80382 - }
80383 - arg1 = static_cast< int >(val1);
80384 - ecode2 = SWIG_AsVal_int(obj1, &val2);
80385 - if (!SWIG_IsOK(ecode2)) {
80386 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_make_xy" "', argument " "2"" of type '" "int""'");
80387 - }
80388 - arg2 = static_cast< int >(val2);
80389 - try {
80390 - result = vips::VImage::make_xy(arg1,arg2);
80391 - }
80392 - catch(vips::VError &_e) {
80393 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
80394 - }
80395 -
80396 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
80397 - return resultobj;
80398 -fail:
80399 - return NULL;
80400 -}
80401 -
80402 -
80403 -SWIGINTERN PyObject *_wrap_VImage_sines(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80404 - PyObject *resultobj = 0;
80405 - int arg1 ;
80406 - int arg2 ;
80407 - double arg3 ;
80408 - double arg4 ;
80409 - int val1 ;
80410 - int ecode1 = 0 ;
80411 - int val2 ;
80412 - int ecode2 = 0 ;
80413 - double val3 ;
80414 - int ecode3 = 0 ;
80415 - double val4 ;
80416 - int ecode4 = 0 ;
80417 - PyObject * obj0 = 0 ;
80418 - PyObject * obj1 = 0 ;
80419 - PyObject * obj2 = 0 ;
80420 - PyObject * obj3 = 0 ;
80421 - vips::VImage result;
80422 -
80423 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_sines",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
80424 - ecode1 = SWIG_AsVal_int(obj0, &val1);
80425 - if (!SWIG_IsOK(ecode1)) {
80426 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_sines" "', argument " "1"" of type '" "int""'");
80427 - }
80428 - arg1 = static_cast< int >(val1);
80429 - ecode2 = SWIG_AsVal_int(obj1, &val2);
80430 - if (!SWIG_IsOK(ecode2)) {
80431 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_sines" "', argument " "2"" of type '" "int""'");
80432 - }
80433 - arg2 = static_cast< int >(val2);
80434 - ecode3 = SWIG_AsVal_double(obj2, &val3);
80435 - if (!SWIG_IsOK(ecode3)) {
80436 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_sines" "', argument " "3"" of type '" "double""'");
80437 - }
80438 - arg3 = static_cast< double >(val3);
80439 - ecode4 = SWIG_AsVal_double(obj3, &val4);
80440 - if (!SWIG_IsOK(ecode4)) {
80441 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_sines" "', argument " "4"" of type '" "double""'");
80442 - }
80443 - arg4 = static_cast< double >(val4);
80444 - try {
80445 - result = vips::VImage::sines(arg1,arg2,arg3,arg4);
80446 - }
80447 - catch(vips::VError &_e) {
80448 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
80449 - }
80450 -
80451 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
80452 - return resultobj;
80453 -fail:
80454 - return NULL;
80455 -}
80456 -
80457 -
80458 -SWIGINTERN PyObject *_wrap_VImage_zone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80459 - PyObject *resultobj = 0;
80460 - int arg1 ;
80461 - int val1 ;
80462 - int ecode1 = 0 ;
80463 - PyObject * obj0 = 0 ;
80464 - vips::VImage result;
80465 -
80466 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_zone",&obj0)) SWIG_fail;
80467 - ecode1 = SWIG_AsVal_int(obj0, &val1);
80468 - if (!SWIG_IsOK(ecode1)) {
80469 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_zone" "', argument " "1"" of type '" "int""'");
80470 - }
80471 - arg1 = static_cast< int >(val1);
80472 - try {
80473 - result = vips::VImage::zone(arg1);
80474 - }
80475 - catch(vips::VError &_e) {
80476 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
80477 - }
80478 -
80479 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
80480 - return resultobj;
80481 -fail:
80482 - return NULL;
80483 -}
80484 -
80485 -
80486 -SWIGINTERN PyObject *_wrap_VImage_rightshift_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80487 - PyObject *resultobj = 0;
80488 - vips::VImage *arg1 = (vips::VImage *) 0 ;
80489 - int arg2 ;
80490 - int arg3 ;
80491 - int arg4 ;
80492 - void *argp1 = 0 ;
80493 - int res1 = 0 ;
80494 - int val2 ;
80495 - int ecode2 = 0 ;
80496 - int val3 ;
80497 - int ecode3 = 0 ;
80498 - int val4 ;
80499 - int ecode4 = 0 ;
80500 - PyObject * obj0 = 0 ;
80501 - PyObject * obj1 = 0 ;
80502 - PyObject * obj2 = 0 ;
80503 - PyObject * obj3 = 0 ;
80504 - vips::VImage result;
80505 -
80506 - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_rightshift_size",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
80507 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
80508 - if (!SWIG_IsOK(res1)) {
80509 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rightshift_size" "', argument " "1"" of type '" "vips::VImage *""'");
80510 - }
80511 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
80512 - ecode2 = SWIG_AsVal_int(obj1, &val2);
80513 - if (!SWIG_IsOK(ecode2)) {
80514 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_rightshift_size" "', argument " "2"" of type '" "int""'");
80515 - }
80516 - arg2 = static_cast< int >(val2);
80517 - ecode3 = SWIG_AsVal_int(obj2, &val3);
80518 - if (!SWIG_IsOK(ecode3)) {
80519 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_rightshift_size" "', argument " "3"" of type '" "int""'");
80520 - }
80521 - arg3 = static_cast< int >(val3);
80522 - ecode4 = SWIG_AsVal_int(obj3, &val4);
80523 - if (!SWIG_IsOK(ecode4)) {
80524 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_rightshift_size" "', argument " "4"" of type '" "int""'");
80525 - }
80526 - arg4 = static_cast< int >(val4);
80527 - try {
80528 - result = (arg1)->rightshift_size(arg2,arg3,arg4);
80529 - }
80530 - catch(vips::VError &_e) {
80531 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
80532 - }
80533 -
80534 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
80535 - return resultobj;
80536 -fail:
80537 - return NULL;
80538 -}
80539 -
80540 -
80541 -SWIGINTERN PyObject *_wrap_VImage_shrink(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80542 - PyObject *resultobj = 0;
80543 - vips::VImage *arg1 = (vips::VImage *) 0 ;
80544 - double arg2 ;
80545 - double arg3 ;
80546 - void *argp1 = 0 ;
80547 - int res1 = 0 ;
80548 - double val2 ;
80549 - int ecode2 = 0 ;
80550 - double val3 ;
80551 - int ecode3 = 0 ;
80552 - PyObject * obj0 = 0 ;
80553 - PyObject * obj1 = 0 ;
80554 - PyObject * obj2 = 0 ;
80555 - vips::VImage result;
80556 -
80557 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_shrink",&obj0,&obj1,&obj2)) SWIG_fail;
80558 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
80559 - if (!SWIG_IsOK(res1)) {
80560 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_shrink" "', argument " "1"" of type '" "vips::VImage *""'");
80561 - }
80562 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
80563 - ecode2 = SWIG_AsVal_double(obj1, &val2);
80564 - if (!SWIG_IsOK(ecode2)) {
80565 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_shrink" "', argument " "2"" of type '" "double""'");
80566 - }
80567 - arg2 = static_cast< double >(val2);
80568 - ecode3 = SWIG_AsVal_double(obj2, &val3);
80569 - if (!SWIG_IsOK(ecode3)) {
80570 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_shrink" "', argument " "3"" of type '" "double""'");
80571 - }
80572 - arg3 = static_cast< double >(val3);
80573 - try {
80574 - result = (arg1)->shrink(arg2,arg3);
80575 - }
80576 - catch(vips::VError &_e) {
80577 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
80578 - }
80579 -
80580 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
80581 - return resultobj;
80582 -fail:
80583 - return NULL;
80584 -}
80585 -
80586 -
80587 -SWIGINTERN PyObject *_wrap_VImage_stretch3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80588 - PyObject *resultobj = 0;
80589 - vips::VImage *arg1 = (vips::VImage *) 0 ;
80590 - double arg2 ;
80591 - double arg3 ;
80592 - void *argp1 = 0 ;
80593 - int res1 = 0 ;
80594 - double val2 ;
80595 - int ecode2 = 0 ;
80596 - double val3 ;
80597 - int ecode3 = 0 ;
80598 - PyObject * obj0 = 0 ;
80599 - PyObject * obj1 = 0 ;
80600 - PyObject * obj2 = 0 ;
80601 - vips::VImage result;
80602 -
80603 - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_stretch3",&obj0,&obj1,&obj2)) SWIG_fail;
80604 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
80605 - if (!SWIG_IsOK(res1)) {
80606 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_stretch3" "', argument " "1"" of type '" "vips::VImage *""'");
80607 - }
80608 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
80609 - ecode2 = SWIG_AsVal_double(obj1, &val2);
80610 - if (!SWIG_IsOK(ecode2)) {
80611 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_stretch3" "', argument " "2"" of type '" "double""'");
80612 - }
80613 - arg2 = static_cast< double >(val2);
80614 - ecode3 = SWIG_AsVal_double(obj2, &val3);
80615 - if (!SWIG_IsOK(ecode3)) {
80616 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_stretch3" "', argument " "3"" of type '" "double""'");
80617 - }
80618 - arg3 = static_cast< double >(val3);
80619 - try {
80620 - result = (arg1)->stretch3(arg2,arg3);
80621 - }
80622 - catch(vips::VError &_e) {
80623 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
80624 - }
80625 -
80626 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
80627 - return resultobj;
80628 -fail:
80629 - return NULL;
80630 -}
80631 -
80632 -
80633 -SWIGINTERN PyObject *_wrap_VImage_affinei(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80634 - PyObject *resultobj = 0;
80635 - vips::VImage *arg1 = (vips::VImage *) 0 ;
80636 - char *arg2 = (char *) 0 ;
80637 - double arg3 ;
80638 - double arg4 ;
80639 - double arg5 ;
80640 - double arg6 ;
80641 - double arg7 ;
80642 - double arg8 ;
80643 - int arg9 ;
80644 - int arg10 ;
80645 - int arg11 ;
80646 - int arg12 ;
80647 - void *argp1 = 0 ;
80648 - int res1 = 0 ;
80649 - int res2 ;
80650 - char *buf2 = 0 ;
80651 - int alloc2 = 0 ;
80652 - double val3 ;
80653 - int ecode3 = 0 ;
80654 - double val4 ;
80655 - int ecode4 = 0 ;
80656 - double val5 ;
80657 - int ecode5 = 0 ;
80658 - double val6 ;
80659 - int ecode6 = 0 ;
80660 - double val7 ;
80661 - int ecode7 = 0 ;
80662 - double val8 ;
80663 - int ecode8 = 0 ;
80664 - int val9 ;
80665 - int ecode9 = 0 ;
80666 - int val10 ;
80667 - int ecode10 = 0 ;
80668 - int val11 ;
80669 - int ecode11 = 0 ;
80670 - int val12 ;
80671 - int ecode12 = 0 ;
80672 - PyObject * obj0 = 0 ;
80673 - PyObject * obj1 = 0 ;
80674 - PyObject * obj2 = 0 ;
80675 - PyObject * obj3 = 0 ;
80676 - PyObject * obj4 = 0 ;
80677 - PyObject * obj5 = 0 ;
80678 - PyObject * obj6 = 0 ;
80679 - PyObject * obj7 = 0 ;
80680 - PyObject * obj8 = 0 ;
80681 - PyObject * obj9 = 0 ;
80682 - PyObject * obj10 = 0 ;
80683 - PyObject * obj11 = 0 ;
80684 - vips::VImage result;
80685 -
80686 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOO:VImage_affinei",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11)) SWIG_fail;
80687 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
80688 - if (!SWIG_IsOK(res1)) {
80689 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_affinei" "', argument " "1"" of type '" "vips::VImage *""'");
80690 - }
80691 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
80692 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
80693 - if (!SWIG_IsOK(res2)) {
80694 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_affinei" "', argument " "2"" of type '" "char *""'");
80695 - }
80696 - arg2 = reinterpret_cast< char * >(buf2);
80697 - ecode3 = SWIG_AsVal_double(obj2, &val3);
80698 - if (!SWIG_IsOK(ecode3)) {
80699 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_affinei" "', argument " "3"" of type '" "double""'");
80700 - }
80701 - arg3 = static_cast< double >(val3);
80702 - ecode4 = SWIG_AsVal_double(obj3, &val4);
80703 - if (!SWIG_IsOK(ecode4)) {
80704 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_affinei" "', argument " "4"" of type '" "double""'");
80705 - }
80706 - arg4 = static_cast< double >(val4);
80707 - ecode5 = SWIG_AsVal_double(obj4, &val5);
80708 - if (!SWIG_IsOK(ecode5)) {
80709 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_affinei" "', argument " "5"" of type '" "double""'");
80710 - }
80711 - arg5 = static_cast< double >(val5);
80712 - ecode6 = SWIG_AsVal_double(obj5, &val6);
80713 - if (!SWIG_IsOK(ecode6)) {
80714 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_affinei" "', argument " "6"" of type '" "double""'");
80715 - }
80716 - arg6 = static_cast< double >(val6);
80717 - ecode7 = SWIG_AsVal_double(obj6, &val7);
80718 - if (!SWIG_IsOK(ecode7)) {
80719 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_affinei" "', argument " "7"" of type '" "double""'");
80720 - }
80721 - arg7 = static_cast< double >(val7);
80722 - ecode8 = SWIG_AsVal_double(obj7, &val8);
80723 - if (!SWIG_IsOK(ecode8)) {
80724 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_affinei" "', argument " "8"" of type '" "double""'");
80725 - }
80726 - arg8 = static_cast< double >(val8);
80727 - ecode9 = SWIG_AsVal_int(obj8, &val9);
80728 - if (!SWIG_IsOK(ecode9)) {
80729 - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_affinei" "', argument " "9"" of type '" "int""'");
80730 - }
80731 - arg9 = static_cast< int >(val9);
80732 - ecode10 = SWIG_AsVal_int(obj9, &val10);
80733 - if (!SWIG_IsOK(ecode10)) {
80734 - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_affinei" "', argument " "10"" of type '" "int""'");
80735 - }
80736 - arg10 = static_cast< int >(val10);
80737 - ecode11 = SWIG_AsVal_int(obj10, &val11);
80738 - if (!SWIG_IsOK(ecode11)) {
80739 - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_affinei" "', argument " "11"" of type '" "int""'");
80740 - }
80741 - arg11 = static_cast< int >(val11);
80742 - ecode12 = SWIG_AsVal_int(obj11, &val12);
80743 - if (!SWIG_IsOK(ecode12)) {
80744 - SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "VImage_affinei" "', argument " "12"" of type '" "int""'");
80745 - }
80746 - arg12 = static_cast< int >(val12);
80747 - try {
80748 - result = (arg1)->affinei(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
80749 - }
80750 - catch(vips::VError &_e) {
80751 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
80752 - }
80753 -
80754 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
80755 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
80756 - return resultobj;
80757 -fail:
80758 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
80759 - return NULL;
80760 -}
80761 -
80762 -
80763 -SWIGINTERN PyObject *_wrap_VImage_affinei_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80764 - PyObject *resultobj = 0;
80765 - vips::VImage *arg1 = (vips::VImage *) 0 ;
80766 - char *arg2 = (char *) 0 ;
80767 - double arg3 ;
80768 - double arg4 ;
80769 - double arg5 ;
80770 - double arg6 ;
80771 - double arg7 ;
80772 - double arg8 ;
80773 - void *argp1 = 0 ;
80774 - int res1 = 0 ;
80775 - int res2 ;
80776 - char *buf2 = 0 ;
80777 - int alloc2 = 0 ;
80778 - double val3 ;
80779 - int ecode3 = 0 ;
80780 - double val4 ;
80781 - int ecode4 = 0 ;
80782 - double val5 ;
80783 - int ecode5 = 0 ;
80784 - double val6 ;
80785 - int ecode6 = 0 ;
80786 - double val7 ;
80787 - int ecode7 = 0 ;
80788 - double val8 ;
80789 - int ecode8 = 0 ;
80790 - PyObject * obj0 = 0 ;
80791 - PyObject * obj1 = 0 ;
80792 - PyObject * obj2 = 0 ;
80793 - PyObject * obj3 = 0 ;
80794 - PyObject * obj4 = 0 ;
80795 - PyObject * obj5 = 0 ;
80796 - PyObject * obj6 = 0 ;
80797 - PyObject * obj7 = 0 ;
80798 - vips::VImage result;
80799 -
80800 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:VImage_affinei_all",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
80801 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
80802 - if (!SWIG_IsOK(res1)) {
80803 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_affinei_all" "', argument " "1"" of type '" "vips::VImage *""'");
80804 - }
80805 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
80806 - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
80807 - if (!SWIG_IsOK(res2)) {
80808 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_affinei_all" "', argument " "2"" of type '" "char *""'");
80809 - }
80810 - arg2 = reinterpret_cast< char * >(buf2);
80811 - ecode3 = SWIG_AsVal_double(obj2, &val3);
80812 - if (!SWIG_IsOK(ecode3)) {
80813 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_affinei_all" "', argument " "3"" of type '" "double""'");
80814 - }
80815 - arg3 = static_cast< double >(val3);
80816 - ecode4 = SWIG_AsVal_double(obj3, &val4);
80817 - if (!SWIG_IsOK(ecode4)) {
80818 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_affinei_all" "', argument " "4"" of type '" "double""'");
80819 - }
80820 - arg4 = static_cast< double >(val4);
80821 - ecode5 = SWIG_AsVal_double(obj4, &val5);
80822 - if (!SWIG_IsOK(ecode5)) {
80823 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_affinei_all" "', argument " "5"" of type '" "double""'");
80824 - }
80825 - arg5 = static_cast< double >(val5);
80826 - ecode6 = SWIG_AsVal_double(obj5, &val6);
80827 - if (!SWIG_IsOK(ecode6)) {
80828 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_affinei_all" "', argument " "6"" of type '" "double""'");
80829 - }
80830 - arg6 = static_cast< double >(val6);
80831 - ecode7 = SWIG_AsVal_double(obj6, &val7);
80832 - if (!SWIG_IsOK(ecode7)) {
80833 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_affinei_all" "', argument " "7"" of type '" "double""'");
80834 - }
80835 - arg7 = static_cast< double >(val7);
80836 - ecode8 = SWIG_AsVal_double(obj7, &val8);
80837 - if (!SWIG_IsOK(ecode8)) {
80838 - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_affinei_all" "', argument " "8"" of type '" "double""'");
80839 - }
80840 - arg8 = static_cast< double >(val8);
80841 - try {
80842 - result = (arg1)->affinei_all(arg2,arg3,arg4,arg5,arg6,arg7,arg8);
80843 - }
80844 - catch(vips::VError &_e) {
80845 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
80846 - }
80847 -
80848 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
80849 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
80850 - return resultobj;
80851 -fail:
80852 - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
80853 - return NULL;
80854 -}
80855 -
80856 -
80857 -SWIGINTERN PyObject *_wrap_VImage_video_test(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80858 - PyObject *resultobj = 0;
80859 - int arg1 ;
80860 - int arg2 ;
80861 - int val1 ;
80862 - int ecode1 = 0 ;
80863 - int val2 ;
80864 - int ecode2 = 0 ;
80865 - PyObject * obj0 = 0 ;
80866 - PyObject * obj1 = 0 ;
80867 - vips::VImage result;
80868 -
80869 - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_video_test",&obj0,&obj1)) SWIG_fail;
80870 - ecode1 = SWIG_AsVal_int(obj0, &val1);
80871 - if (!SWIG_IsOK(ecode1)) {
80872 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_video_test" "', argument " "1"" of type '" "int""'");
80873 - }
80874 - arg1 = static_cast< int >(val1);
80875 - ecode2 = SWIG_AsVal_int(obj1, &val2);
80876 - if (!SWIG_IsOK(ecode2)) {
80877 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_video_test" "', argument " "2"" of type '" "int""'");
80878 - }
80879 - arg2 = static_cast< int >(val2);
80880 - try {
80881 - result = vips::VImage::video_test(arg1,arg2);
80882 - }
80883 - catch(vips::VError &_e) {
80884 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
80885 - }
80886 -
80887 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
80888 - return resultobj;
80889 -fail:
80890 - return NULL;
80891 -}
80892 -
80893 -
80894 -SWIGINTERN PyObject *_wrap_VImage_video_v4l1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80895 - PyObject *resultobj = 0;
80896 - char *arg1 = (char *) 0 ;
80897 - int arg2 ;
80898 - int arg3 ;
80899 - int arg4 ;
80900 - int arg5 ;
80901 - int arg6 ;
80902 - int arg7 ;
80903 - int res1 ;
80904 - char *buf1 = 0 ;
80905 - int alloc1 = 0 ;
80906 - int val2 ;
80907 - int ecode2 = 0 ;
80908 - int val3 ;
80909 - int ecode3 = 0 ;
80910 - int val4 ;
80911 - int ecode4 = 0 ;
80912 - int val5 ;
80913 - int ecode5 = 0 ;
80914 - int val6 ;
80915 - int ecode6 = 0 ;
80916 - int val7 ;
80917 - int ecode7 = 0 ;
80918 - PyObject * obj0 = 0 ;
80919 - PyObject * obj1 = 0 ;
80920 - PyObject * obj2 = 0 ;
80921 - PyObject * obj3 = 0 ;
80922 - PyObject * obj4 = 0 ;
80923 - PyObject * obj5 = 0 ;
80924 - PyObject * obj6 = 0 ;
80925 - vips::VImage result;
80926 -
80927 - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_video_v4l1",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
80928 - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
80929 - if (!SWIG_IsOK(res1)) {
80930 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_video_v4l1" "', argument " "1"" of type '" "char *""'");
80931 - }
80932 - arg1 = reinterpret_cast< char * >(buf1);
80933 - ecode2 = SWIG_AsVal_int(obj1, &val2);
80934 - if (!SWIG_IsOK(ecode2)) {
80935 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_video_v4l1" "', argument " "2"" of type '" "int""'");
80936 - }
80937 - arg2 = static_cast< int >(val2);
80938 - ecode3 = SWIG_AsVal_int(obj2, &val3);
80939 - if (!SWIG_IsOK(ecode3)) {
80940 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_video_v4l1" "', argument " "3"" of type '" "int""'");
80941 - }
80942 - arg3 = static_cast< int >(val3);
80943 - ecode4 = SWIG_AsVal_int(obj3, &val4);
80944 - if (!SWIG_IsOK(ecode4)) {
80945 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_video_v4l1" "', argument " "4"" of type '" "int""'");
80946 - }
80947 - arg4 = static_cast< int >(val4);
80948 - ecode5 = SWIG_AsVal_int(obj4, &val5);
80949 - if (!SWIG_IsOK(ecode5)) {
80950 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_video_v4l1" "', argument " "5"" of type '" "int""'");
80951 - }
80952 - arg5 = static_cast< int >(val5);
80953 - ecode6 = SWIG_AsVal_int(obj5, &val6);
80954 - if (!SWIG_IsOK(ecode6)) {
80955 - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_video_v4l1" "', argument " "6"" of type '" "int""'");
80956 - }
80957 - arg6 = static_cast< int >(val6);
80958 - ecode7 = SWIG_AsVal_int(obj6, &val7);
80959 - if (!SWIG_IsOK(ecode7)) {
80960 - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_video_v4l1" "', argument " "7"" of type '" "int""'");
80961 - }
80962 - arg7 = static_cast< int >(val7);
80963 - try {
80964 - result = vips::VImage::video_v4l1(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
80965 - }
80966 - catch(vips::VError &_e) {
80967 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
80968 - }
80969 -
80970 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
80971 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
80972 - return resultobj;
80973 -fail:
80974 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
80975 - return NULL;
80976 -}
80977 -
80978 -
80979 -SWIGINTERN PyObject *_wrap_VImage_tobuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80980 - PyObject *resultobj = 0;
80981 - vips::VImage *arg1 = (vips::VImage *) 0 ;
80982 - void *argp1 = 0 ;
80983 - int res1 = 0 ;
80984 - PyObject * obj0 = 0 ;
80985 - VBuffer result;
80986 -
80987 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_tobuffer",&obj0)) SWIG_fail;
80988 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
80989 - if (!SWIG_IsOK(res1)) {
80990 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tobuffer" "', argument " "1"" of type '" "vips::VImage *""'");
80991 - }
80992 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
80993 - try {
80994 - result = vips_VImage_tobuffer(arg1);
80995 - }
80996 - catch(vips::VError &_e) {
80997 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
80998 - }
80999 -
81000 - {
81001 - resultobj = PyBuffer_FromMemory ((&result)->data, (&result)->size);
81002 - }
81003 - return resultobj;
81004 -fail:
81005 - return NULL;
81006 -}
81007 -
81008 -
81009 -SWIGINTERN PyObject *_wrap_VImage_frombuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81010 - PyObject *resultobj = 0;
81011 - VBuffer arg1 ;
81012 - int arg2 ;
81013 - int arg3 ;
81014 - int arg4 ;
81015 - vips::VImage::TBandFmt arg5 ;
81016 - int val2 ;
81017 - int ecode2 = 0 ;
81018 - int val3 ;
81019 - int ecode3 = 0 ;
81020 - int val4 ;
81021 - int ecode4 = 0 ;
81022 - int val5 ;
81023 - int ecode5 = 0 ;
81024 - PyObject * obj0 = 0 ;
81025 - PyObject * obj1 = 0 ;
81026 - PyObject * obj2 = 0 ;
81027 - PyObject * obj3 = 0 ;
81028 - PyObject * obj4 = 0 ;
81029 - vips::VImage result;
81030 -
81031 - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_frombuffer",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
81032 - {
81033 - const char *buffer;
81034 - Py_ssize_t buffer_len;
81035 -
81036 - if (PyObject_AsCharBuffer (obj0, &buffer, &buffer_len) == -1) {
81037 - PyErr_SetString (PyExc_TypeError,"Type error. Unable to get char pointer from buffer");
81038 - return NULL;
81039 - }
81040 -
81041 - (&arg1)->data = (void *) buffer;
81042 - (&arg1)->size = buffer_len;
81043 - }
81044 - ecode2 = SWIG_AsVal_int(obj1, &val2);
81045 - if (!SWIG_IsOK(ecode2)) {
81046 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_frombuffer" "', argument " "2"" of type '" "int""'");
81047 - }
81048 - arg2 = static_cast< int >(val2);
81049 - ecode3 = SWIG_AsVal_int(obj2, &val3);
81050 - if (!SWIG_IsOK(ecode3)) {
81051 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_frombuffer" "', argument " "3"" of type '" "int""'");
81052 - }
81053 - arg3 = static_cast< int >(val3);
81054 - ecode4 = SWIG_AsVal_int(obj3, &val4);
81055 - if (!SWIG_IsOK(ecode4)) {
81056 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_frombuffer" "', argument " "4"" of type '" "int""'");
81057 - }
81058 - arg4 = static_cast< int >(val4);
81059 - ecode5 = SWIG_AsVal_int(obj4, &val5);
81060 - if (!SWIG_IsOK(ecode5)) {
81061 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_frombuffer" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'");
81062 - }
81063 - arg5 = static_cast< vips::VImage::TBandFmt >(val5);
81064 - try {
81065 - result = vips_VImage_frombuffer(arg1,arg2,arg3,arg4,arg5);
81066 - }
81067 - catch(vips::VError &_e) {
81068 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
81069 - }
81070 -
81071 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
81072 - return resultobj;
81073 -fail:
81074 - return NULL;
81075 -}
81076 -
81077 -
81078 -SWIGINTERN PyObject *_wrap_VImage_tostring(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81079 - PyObject *resultobj = 0;
81080 - vips::VImage *arg1 = (vips::VImage *) 0 ;
81081 - char **arg2 = (char **) 0 ;
81082 - int *arg3 = (int *) 0 ;
81083 - void *argp1 = 0 ;
81084 - int res1 = 0 ;
81085 - char *temp2 = 0 ;
81086 - int tempn2 ;
81087 - PyObject * obj0 = 0 ;
81088 -
81089 - arg2 = &temp2; arg3 = &tempn2;
81090 - if (!PyArg_ParseTuple(args,(char *)"O:VImage_tostring",&obj0)) SWIG_fail;
81091 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
81092 - if (!SWIG_IsOK(res1)) {
81093 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tostring" "', argument " "1"" of type '" "vips::VImage *""'");
81094 - }
81095 - arg1 = reinterpret_cast< vips::VImage * >(argp1);
81096 - try {
81097 - vips_VImage_tostring(arg1,arg2,arg3);
81098 - }
81099 - catch(vips::VError &_e) {
81100 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
81101 - }
81102 -
81103 - resultobj = SWIG_Py_Void();
81104 - if (*arg2) {
81105 - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg2,*arg3));
81106 - im_free (*arg2);
81107 - }
81108 - return resultobj;
81109 -fail:
81110 - return NULL;
81111 -}
81112 -
81113 -
81114 -SWIGINTERN PyObject *_wrap_VImage_fromstring(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81115 - PyObject *resultobj = 0;
81116 - std::string arg1 ;
81117 - int arg2 ;
81118 - int arg3 ;
81119 - int arg4 ;
81120 - vips::VImage::TBandFmt arg5 ;
81121 - int val2 ;
81122 - int ecode2 = 0 ;
81123 - int val3 ;
81124 - int ecode3 = 0 ;
81125 - int val4 ;
81126 - int ecode4 = 0 ;
81127 - int val5 ;
81128 - int ecode5 = 0 ;
81129 - PyObject * obj0 = 0 ;
81130 - PyObject * obj1 = 0 ;
81131 - PyObject * obj2 = 0 ;
81132 - PyObject * obj3 = 0 ;
81133 - PyObject * obj4 = 0 ;
81134 - vips::VImage result;
81135 -
81136 - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_fromstring",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
81137 - {
81138 - std::string *ptr = (std::string *)0;
81139 - int res = SWIG_AsPtr_std_string(obj0, &ptr);
81140 - if (!SWIG_IsOK(res) || !ptr) {
81141 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_fromstring" "', argument " "1"" of type '" "std::string""'");
81142 - }
81143 - arg1 = *ptr;
81144 - if (SWIG_IsNewObj(res)) delete ptr;
81145 - }
81146 - ecode2 = SWIG_AsVal_int(obj1, &val2);
81147 - if (!SWIG_IsOK(ecode2)) {
81148 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_fromstring" "', argument " "2"" of type '" "int""'");
81149 - }
81150 - arg2 = static_cast< int >(val2);
81151 - ecode3 = SWIG_AsVal_int(obj2, &val3);
81152 - if (!SWIG_IsOK(ecode3)) {
81153 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_fromstring" "', argument " "3"" of type '" "int""'");
81154 - }
81155 - arg3 = static_cast< int >(val3);
81156 - ecode4 = SWIG_AsVal_int(obj3, &val4);
81157 - if (!SWIG_IsOK(ecode4)) {
81158 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_fromstring" "', argument " "4"" of type '" "int""'");
81159 - }
81160 - arg4 = static_cast< int >(val4);
81161 - ecode5 = SWIG_AsVal_int(obj4, &val5);
81162 - if (!SWIG_IsOK(ecode5)) {
81163 - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_fromstring" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'");
81164 - }
81165 - arg5 = static_cast< vips::VImage::TBandFmt >(val5);
81166 - try {
81167 - result = vips_VImage_fromstring(arg1,arg2,arg3,arg4,arg5);
81168 - }
81169 - catch(vips::VError &_e) {
81170 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
81171 - }
81172 -
81173 - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
81174 - return resultobj;
81175 -fail:
81176 - return NULL;
81177 -}
81178 -
81179 -
81180 -SWIGINTERN PyObject *VImage_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81181 - PyObject *obj;
81182 - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
81183 - SWIG_TypeNewClientData(SWIGTYPE_p_vips__VImage, SWIG_NewClientData(obj));
81184 - return SWIG_Py_Void();
81185 -}
81186 -
81187 -SWIGINTERN PyObject *_wrap_im_init_world(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81188 - PyObject *resultobj = 0;
81189 - char *arg1 = (char *) 0 ;
81190 - int res1 ;
81191 - char *buf1 = 0 ;
81192 - int alloc1 = 0 ;
81193 - PyObject * obj0 = 0 ;
81194 - int result;
81195 -
81196 - if (!PyArg_ParseTuple(args,(char *)"O:im_init_world",&obj0)) SWIG_fail;
81197 - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
81198 - if (!SWIG_IsOK(res1)) {
81199 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "im_init_world" "', argument " "1"" of type '" "char const *""'");
81200 - }
81201 - arg1 = reinterpret_cast< char * >(buf1);
81202 - result = (int)im_init_world((char const *)arg1);
81203 - resultobj = SWIG_From_int(static_cast< int >(result));
81204 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
81205 - return resultobj;
81206 -fail:
81207 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
81208 - return NULL;
81209 -}
81210 -
81211 -
81212 -SWIGINTERN PyObject *_wrap_im__print_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81213 - PyObject *resultobj = 0;
81214 -
81215 - if (!PyArg_ParseTuple(args,(char *)":im__print_all")) SWIG_fail;
81216 - im__print_all();
81217 - resultobj = SWIG_Py_Void();
81218 - return resultobj;
81219 -fail:
81220 - return NULL;
81221 -}
81222 -
81223 -
81224 -SWIGINTERN PyObject *_wrap_im_col_Lab2XYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81225 - PyObject *resultobj = 0;
81226 - float arg1 ;
81227 - float arg2 ;
81228 - float arg3 ;
81229 - float *arg4 = (float *) 0 ;
81230 - float *arg5 = (float *) 0 ;
81231 - float *arg6 = (float *) 0 ;
81232 - float val1 ;
81233 - int ecode1 = 0 ;
81234 - float val2 ;
81235 - int ecode2 = 0 ;
81236 - float val3 ;
81237 - int ecode3 = 0 ;
81238 - void *argp4 = 0 ;
81239 - int res4 = 0 ;
81240 - void *argp5 = 0 ;
81241 - int res5 = 0 ;
81242 - void *argp6 = 0 ;
81243 - int res6 = 0 ;
81244 - PyObject * obj0 = 0 ;
81245 - PyObject * obj1 = 0 ;
81246 - PyObject * obj2 = 0 ;
81247 - PyObject * obj3 = 0 ;
81248 - PyObject * obj4 = 0 ;
81249 - PyObject * obj5 = 0 ;
81250 -
81251 - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:im_col_Lab2XYZ",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
81252 - ecode1 = SWIG_AsVal_float(obj0, &val1);
81253 - if (!SWIG_IsOK(ecode1)) {
81254 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "im_col_Lab2XYZ" "', argument " "1"" of type '" "float""'");
81255 - }
81256 - arg1 = static_cast< float >(val1);
81257 - ecode2 = SWIG_AsVal_float(obj1, &val2);
81258 - if (!SWIG_IsOK(ecode2)) {
81259 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "im_col_Lab2XYZ" "', argument " "2"" of type '" "float""'");
81260 - }
81261 - arg2 = static_cast< float >(val2);
81262 - ecode3 = SWIG_AsVal_float(obj2, &val3);
81263 - if (!SWIG_IsOK(ecode3)) {
81264 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "im_col_Lab2XYZ" "', argument " "3"" of type '" "float""'");
81265 - }
81266 - arg3 = static_cast< float >(val3);
81267 - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
81268 - if (!SWIG_IsOK(res4)) {
81269 - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "im_col_Lab2XYZ" "', argument " "4"" of type '" "float *""'");
81270 - }
81271 - arg4 = reinterpret_cast< float * >(argp4);
81272 - res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
81273 - if (!SWIG_IsOK(res5)) {
81274 - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "im_col_Lab2XYZ" "', argument " "5"" of type '" "float *""'");
81275 - }
81276 - arg5 = reinterpret_cast< float * >(argp5);
81277 - res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
81278 - if (!SWIG_IsOK(res6)) {
81279 - SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "im_col_Lab2XYZ" "', argument " "6"" of type '" "float *""'");
81280 - }
81281 - arg6 = reinterpret_cast< float * >(argp6);
81282 - im_col_Lab2XYZ(arg1,arg2,arg3,arg4,arg5,arg6);
81283 - resultobj = SWIG_Py_Void();
81284 - return resultobj;
81285 -fail:
81286 - return NULL;
81287 -}
81288 -
81289 -
81290 -static PyMethodDef SwigMethods[] = {
81291 - { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
81292 - { (char *)"delete_SwigPyIterator", _wrap_delete_SwigPyIterator, METH_VARARGS, NULL},
81293 - { (char *)"SwigPyIterator_value", _wrap_SwigPyIterator_value, METH_VARARGS, NULL},
81294 - { (char *)"SwigPyIterator_incr", _wrap_SwigPyIterator_incr, METH_VARARGS, NULL},
81295 - { (char *)"SwigPyIterator_decr", _wrap_SwigPyIterator_decr, METH_VARARGS, NULL},
81296 - { (char *)"SwigPyIterator_distance", _wrap_SwigPyIterator_distance, METH_VARARGS, NULL},
81297 - { (char *)"SwigPyIterator_equal", _wrap_SwigPyIterator_equal, METH_VARARGS, NULL},
81298 - { (char *)"SwigPyIterator_copy", _wrap_SwigPyIterator_copy, METH_VARARGS, NULL},
81299 - { (char *)"SwigPyIterator_next", _wrap_SwigPyIterator_next, METH_VARARGS, NULL},
81300 - { (char *)"SwigPyIterator___next__", _wrap_SwigPyIterator___next__, METH_VARARGS, NULL},
81301 - { (char *)"SwigPyIterator_previous", _wrap_SwigPyIterator_previous, METH_VARARGS, NULL},
81302 - { (char *)"SwigPyIterator_advance", _wrap_SwigPyIterator_advance, METH_VARARGS, NULL},
81303 - { (char *)"SwigPyIterator___eq__", _wrap_SwigPyIterator___eq__, METH_VARARGS, NULL},
81304 - { (char *)"SwigPyIterator___ne__", _wrap_SwigPyIterator___ne__, METH_VARARGS, NULL},
81305 - { (char *)"SwigPyIterator___iadd__", _wrap_SwigPyIterator___iadd__, METH_VARARGS, NULL},
81306 - { (char *)"SwigPyIterator___isub__", _wrap_SwigPyIterator___isub__, METH_VARARGS, NULL},
81307 - { (char *)"SwigPyIterator___add__", _wrap_SwigPyIterator___add__, METH_VARARGS, NULL},
81308 - { (char *)"SwigPyIterator___sub__", _wrap_SwigPyIterator___sub__, METH_VARARGS, NULL},
81309 - { (char *)"SwigPyIterator_swigregister", SwigPyIterator_swigregister, METH_VARARGS, NULL},
81310 - { (char *)"IntVector_iterator", _wrap_IntVector_iterator, METH_VARARGS, NULL},
81311 - { (char *)"IntVector___nonzero__", _wrap_IntVector___nonzero__, METH_VARARGS, NULL},
81312 - { (char *)"IntVector___bool__", _wrap_IntVector___bool__, METH_VARARGS, NULL},
81313 - { (char *)"IntVector___len__", _wrap_IntVector___len__, METH_VARARGS, NULL},
81314 - { (char *)"IntVector_pop", _wrap_IntVector_pop, METH_VARARGS, NULL},
81315 - { (char *)"IntVector___getslice__", _wrap_IntVector___getslice__, METH_VARARGS, NULL},
81316 - { (char *)"IntVector___setslice__", _wrap_IntVector___setslice__, METH_VARARGS, NULL},
81317 - { (char *)"IntVector___delslice__", _wrap_IntVector___delslice__, METH_VARARGS, NULL},
81318 - { (char *)"IntVector___delitem__", _wrap_IntVector___delitem__, METH_VARARGS, NULL},
81319 - { (char *)"IntVector___getitem__", _wrap_IntVector___getitem__, METH_VARARGS, NULL},
81320 - { (char *)"IntVector___setitem__", _wrap_IntVector___setitem__, METH_VARARGS, NULL},
81321 - { (char *)"IntVector_append", _wrap_IntVector_append, METH_VARARGS, NULL},
81322 - { (char *)"IntVector_empty", _wrap_IntVector_empty, METH_VARARGS, NULL},
81323 - { (char *)"IntVector_size", _wrap_IntVector_size, METH_VARARGS, NULL},
81324 - { (char *)"IntVector_clear", _wrap_IntVector_clear, METH_VARARGS, NULL},
81325 - { (char *)"IntVector_swap", _wrap_IntVector_swap, METH_VARARGS, NULL},
81326 - { (char *)"IntVector_get_allocator", _wrap_IntVector_get_allocator, METH_VARARGS, NULL},
81327 - { (char *)"IntVector_begin", _wrap_IntVector_begin, METH_VARARGS, NULL},
81328 - { (char *)"IntVector_end", _wrap_IntVector_end, METH_VARARGS, NULL},
81329 - { (char *)"IntVector_rbegin", _wrap_IntVector_rbegin, METH_VARARGS, NULL},
81330 - { (char *)"IntVector_rend", _wrap_IntVector_rend, METH_VARARGS, NULL},
81331 - { (char *)"IntVector_pop_back", _wrap_IntVector_pop_back, METH_VARARGS, NULL},
81332 - { (char *)"IntVector_erase", _wrap_IntVector_erase, METH_VARARGS, NULL},
81333 - { (char *)"new_IntVector", _wrap_new_IntVector, METH_VARARGS, NULL},
81334 - { (char *)"IntVector_push_back", _wrap_IntVector_push_back, METH_VARARGS, NULL},
81335 - { (char *)"IntVector_front", _wrap_IntVector_front, METH_VARARGS, NULL},
81336 - { (char *)"IntVector_back", _wrap_IntVector_back, METH_VARARGS, NULL},
81337 - { (char *)"IntVector_assign", _wrap_IntVector_assign, METH_VARARGS, NULL},
81338 - { (char *)"IntVector_resize", _wrap_IntVector_resize, METH_VARARGS, NULL},
81339 - { (char *)"IntVector_insert", _wrap_IntVector_insert, METH_VARARGS, NULL},
81340 - { (char *)"IntVector_reserve", _wrap_IntVector_reserve, METH_VARARGS, NULL},
81341 - { (char *)"IntVector_capacity", _wrap_IntVector_capacity, METH_VARARGS, NULL},
81342 - { (char *)"delete_IntVector", _wrap_delete_IntVector, METH_VARARGS, NULL},
81343 - { (char *)"IntVector_swigregister", IntVector_swigregister, METH_VARARGS, NULL},
81344 - { (char *)"DoubleVector_iterator", _wrap_DoubleVector_iterator, METH_VARARGS, NULL},
81345 - { (char *)"DoubleVector___nonzero__", _wrap_DoubleVector___nonzero__, METH_VARARGS, NULL},
81346 - { (char *)"DoubleVector___bool__", _wrap_DoubleVector___bool__, METH_VARARGS, NULL},
81347 - { (char *)"DoubleVector___len__", _wrap_DoubleVector___len__, METH_VARARGS, NULL},
81348 - { (char *)"DoubleVector_pop", _wrap_DoubleVector_pop, METH_VARARGS, NULL},
81349 - { (char *)"DoubleVector___getslice__", _wrap_DoubleVector___getslice__, METH_VARARGS, NULL},
81350 - { (char *)"DoubleVector___setslice__", _wrap_DoubleVector___setslice__, METH_VARARGS, NULL},
81351 - { (char *)"DoubleVector___delslice__", _wrap_DoubleVector___delslice__, METH_VARARGS, NULL},
81352 - { (char *)"DoubleVector___delitem__", _wrap_DoubleVector___delitem__, METH_VARARGS, NULL},
81353 - { (char *)"DoubleVector___getitem__", _wrap_DoubleVector___getitem__, METH_VARARGS, NULL},
81354 - { (char *)"DoubleVector___setitem__", _wrap_DoubleVector___setitem__, METH_VARARGS, NULL},
81355 - { (char *)"DoubleVector_append", _wrap_DoubleVector_append, METH_VARARGS, NULL},
81356 - { (char *)"DoubleVector_empty", _wrap_DoubleVector_empty, METH_VARARGS, NULL},
81357 - { (char *)"DoubleVector_size", _wrap_DoubleVector_size, METH_VARARGS, NULL},
81358 - { (char *)"DoubleVector_clear", _wrap_DoubleVector_clear, METH_VARARGS, NULL},
81359 - { (char *)"DoubleVector_swap", _wrap_DoubleVector_swap, METH_VARARGS, NULL},
81360 - { (char *)"DoubleVector_get_allocator", _wrap_DoubleVector_get_allocator, METH_VARARGS, NULL},
81361 - { (char *)"DoubleVector_begin", _wrap_DoubleVector_begin, METH_VARARGS, NULL},
81362 - { (char *)"DoubleVector_end", _wrap_DoubleVector_end, METH_VARARGS, NULL},
81363 - { (char *)"DoubleVector_rbegin", _wrap_DoubleVector_rbegin, METH_VARARGS, NULL},
81364 - { (char *)"DoubleVector_rend", _wrap_DoubleVector_rend, METH_VARARGS, NULL},
81365 - { (char *)"DoubleVector_pop_back", _wrap_DoubleVector_pop_back, METH_VARARGS, NULL},
81366 - { (char *)"DoubleVector_erase", _wrap_DoubleVector_erase, METH_VARARGS, NULL},
81367 - { (char *)"new_DoubleVector", _wrap_new_DoubleVector, METH_VARARGS, NULL},
81368 - { (char *)"DoubleVector_push_back", _wrap_DoubleVector_push_back, METH_VARARGS, NULL},
81369 - { (char *)"DoubleVector_front", _wrap_DoubleVector_front, METH_VARARGS, NULL},
81370 - { (char *)"DoubleVector_back", _wrap_DoubleVector_back, METH_VARARGS, NULL},
81371 - { (char *)"DoubleVector_assign", _wrap_DoubleVector_assign, METH_VARARGS, NULL},
81372 - { (char *)"DoubleVector_resize", _wrap_DoubleVector_resize, METH_VARARGS, NULL},
81373 - { (char *)"DoubleVector_insert", _wrap_DoubleVector_insert, METH_VARARGS, NULL},
81374 - { (char *)"DoubleVector_reserve", _wrap_DoubleVector_reserve, METH_VARARGS, NULL},
81375 - { (char *)"DoubleVector_capacity", _wrap_DoubleVector_capacity, METH_VARARGS, NULL},
81376 - { (char *)"delete_DoubleVector", _wrap_delete_DoubleVector, METH_VARARGS, NULL},
81377 - { (char *)"DoubleVector_swigregister", DoubleVector_swigregister, METH_VARARGS, NULL},
81378 - { (char *)"ImageVector_iterator", _wrap_ImageVector_iterator, METH_VARARGS, NULL},
81379 - { (char *)"ImageVector___nonzero__", _wrap_ImageVector___nonzero__, METH_VARARGS, NULL},
81380 - { (char *)"ImageVector___bool__", _wrap_ImageVector___bool__, METH_VARARGS, NULL},
81381 - { (char *)"ImageVector___len__", _wrap_ImageVector___len__, METH_VARARGS, NULL},
81382 - { (char *)"ImageVector_pop", _wrap_ImageVector_pop, METH_VARARGS, NULL},
81383 - { (char *)"ImageVector___getslice__", _wrap_ImageVector___getslice__, METH_VARARGS, NULL},
81384 - { (char *)"ImageVector___setslice__", _wrap_ImageVector___setslice__, METH_VARARGS, NULL},
81385 - { (char *)"ImageVector___delslice__", _wrap_ImageVector___delslice__, METH_VARARGS, NULL},
81386 - { (char *)"ImageVector___delitem__", _wrap_ImageVector___delitem__, METH_VARARGS, NULL},
81387 - { (char *)"ImageVector___getitem__", _wrap_ImageVector___getitem__, METH_VARARGS, NULL},
81388 - { (char *)"ImageVector___setitem__", _wrap_ImageVector___setitem__, METH_VARARGS, NULL},
81389 - { (char *)"ImageVector_append", _wrap_ImageVector_append, METH_VARARGS, NULL},
81390 - { (char *)"ImageVector_empty", _wrap_ImageVector_empty, METH_VARARGS, NULL},
81391 - { (char *)"ImageVector_size", _wrap_ImageVector_size, METH_VARARGS, NULL},
81392 - { (char *)"ImageVector_clear", _wrap_ImageVector_clear, METH_VARARGS, NULL},
81393 - { (char *)"ImageVector_swap", _wrap_ImageVector_swap, METH_VARARGS, NULL},
81394 - { (char *)"ImageVector_get_allocator", _wrap_ImageVector_get_allocator, METH_VARARGS, NULL},
81395 - { (char *)"ImageVector_begin", _wrap_ImageVector_begin, METH_VARARGS, NULL},
81396 - { (char *)"ImageVector_end", _wrap_ImageVector_end, METH_VARARGS, NULL},
81397 - { (char *)"ImageVector_rbegin", _wrap_ImageVector_rbegin, METH_VARARGS, NULL},
81398 - { (char *)"ImageVector_rend", _wrap_ImageVector_rend, METH_VARARGS, NULL},
81399 - { (char *)"ImageVector_pop_back", _wrap_ImageVector_pop_back, METH_VARARGS, NULL},
81400 - { (char *)"ImageVector_erase", _wrap_ImageVector_erase, METH_VARARGS, NULL},
81401 - { (char *)"new_ImageVector", _wrap_new_ImageVector, METH_VARARGS, NULL},
81402 - { (char *)"ImageVector_push_back", _wrap_ImageVector_push_back, METH_VARARGS, NULL},
81403 - { (char *)"ImageVector_front", _wrap_ImageVector_front, METH_VARARGS, NULL},
81404 - { (char *)"ImageVector_back", _wrap_ImageVector_back, METH_VARARGS, NULL},
81405 - { (char *)"ImageVector_assign", _wrap_ImageVector_assign, METH_VARARGS, NULL},
81406 - { (char *)"ImageVector_resize", _wrap_ImageVector_resize, METH_VARARGS, NULL},
81407 - { (char *)"ImageVector_insert", _wrap_ImageVector_insert, METH_VARARGS, NULL},
81408 - { (char *)"ImageVector_reserve", _wrap_ImageVector_reserve, METH_VARARGS, NULL},
81409 - { (char *)"ImageVector_capacity", _wrap_ImageVector_capacity, METH_VARARGS, NULL},
81410 - { (char *)"delete_ImageVector", _wrap_delete_ImageVector, METH_VARARGS, NULL},
81411 - { (char *)"ImageVector_swigregister", ImageVector_swigregister, METH_VARARGS, NULL},
81412 - { (char *)"init", _wrap_init, METH_VARARGS, NULL},
81413 - { (char *)"shutdown", _wrap_shutdown, METH_VARARGS, NULL},
81414 - { (char *)"VImage_print_all", _wrap_VImage_print_all, METH_VARARGS, NULL},
81415 - { (char *)"VImage_convert2disc", _wrap_VImage_convert2disc, METH_VARARGS, NULL},
81416 - { (char *)"new_VImage", _wrap_new_VImage, METH_VARARGS, NULL},
81417 - { (char *)"VImage___assign__", _wrap_VImage___assign__, METH_VARARGS, NULL},
81418 - { (char *)"delete_VImage", _wrap_delete_VImage, METH_VARARGS, NULL},
81419 - { (char *)"VImage_image", _wrap_VImage_image, METH_VARARGS, NULL},
81420 - { (char *)"VImage_data", _wrap_VImage_data, METH_VARARGS, NULL},
81421 - { (char *)"VImage_write", _wrap_VImage_write, METH_VARARGS, NULL},
81422 - { (char *)"VImage_debug_print", _wrap_VImage_debug_print, METH_VARARGS, NULL},
81423 - { (char *)"VImage_Xsize", _wrap_VImage_Xsize, METH_VARARGS, NULL},
81424 - { (char *)"VImage_Ysize", _wrap_VImage_Ysize, METH_VARARGS, NULL},
81425 - { (char *)"VImage_Bands", _wrap_VImage_Bands, METH_VARARGS, NULL},
81426 - { (char *)"VImage_BandFmt", _wrap_VImage_BandFmt, METH_VARARGS, NULL},
81427 - { (char *)"VImage_Coding", _wrap_VImage_Coding, METH_VARARGS, NULL},
81428 - { (char *)"VImage_Type", _wrap_VImage_Type, METH_VARARGS, NULL},
81429 - { (char *)"VImage_Xres", _wrap_VImage_Xres, METH_VARARGS, NULL},
81430 - { (char *)"VImage_Yres", _wrap_VImage_Yres, METH_VARARGS, NULL},
81431 - { (char *)"VImage_Length", _wrap_VImage_Length, METH_VARARGS, NULL},
81432 - { (char *)"VImage_Compression", _wrap_VImage_Compression, METH_VARARGS, NULL},
81433 - { (char *)"VImage_Level", _wrap_VImage_Level, METH_VARARGS, NULL},
81434 - { (char *)"VImage_Xoffset", _wrap_VImage_Xoffset, METH_VARARGS, NULL},
81435 - { (char *)"VImage_Yoffset", _wrap_VImage_Yoffset, METH_VARARGS, NULL},
81436 - { (char *)"VImage_filename", _wrap_VImage_filename, METH_VARARGS, NULL},
81437 - { (char *)"VImage_Hist", _wrap_VImage_Hist, METH_VARARGS, NULL},
81438 - { (char *)"VImage_meta_remove", _wrap_VImage_meta_remove, METH_VARARGS, NULL},
81439 - { (char *)"VImage_meta_get_typeof", _wrap_VImage_meta_get_typeof, METH_VARARGS, NULL},
81440 - { (char *)"VImage_meta_get_int", _wrap_VImage_meta_get_int, METH_VARARGS, NULL},
81441 - { (char *)"VImage_meta_get_double", _wrap_VImage_meta_get_double, METH_VARARGS, NULL},
81442 - { (char *)"VImage_meta_get_string", _wrap_VImage_meta_get_string, METH_VARARGS, NULL},
81443 - { (char *)"VImage_meta_get_area", _wrap_VImage_meta_get_area, METH_VARARGS, NULL},
81444 - { (char *)"VImage_meta_get_blob", _wrap_VImage_meta_get_blob, METH_VARARGS, NULL},
81445 - { (char *)"VImage_meta_set", _wrap_VImage_meta_set, METH_VARARGS, NULL},
81446 - { (char *)"VImage_initdesc", _wrap_VImage_initdesc, METH_VARARGS, NULL},
81447 - { (char *)"VImage_abs", _wrap_VImage_abs, METH_VARARGS, NULL},
81448 - { (char *)"VImage_acos", _wrap_VImage_acos, METH_VARARGS, NULL},
81449 - { (char *)"VImage_add", _wrap_VImage_add, METH_VARARGS, NULL},
81450 - { (char *)"VImage_asin", _wrap_VImage_asin, METH_VARARGS, NULL},
81451 - { (char *)"VImage_atan", _wrap_VImage_atan, METH_VARARGS, NULL},
81452 - { (char *)"VImage_avg", _wrap_VImage_avg, METH_VARARGS, NULL},
81453 - { (char *)"VImage_point", _wrap_VImage_point, METH_VARARGS, NULL},
81454 - { (char *)"VImage_point_bilinear", _wrap_VImage_point_bilinear, METH_VARARGS, NULL},
81455 - { (char *)"VImage_bandmean", _wrap_VImage_bandmean, METH_VARARGS, NULL},
81456 - { (char *)"VImage_ceil", _wrap_VImage_ceil, METH_VARARGS, NULL},
81457 - { (char *)"VImage_cos", _wrap_VImage_cos, METH_VARARGS, NULL},
81458 - { (char *)"VImage_cross_phase", _wrap_VImage_cross_phase, METH_VARARGS, NULL},
81459 - { (char *)"VImage_deviate", _wrap_VImage_deviate, METH_VARARGS, NULL},
81460 - { (char *)"VImage_divide", _wrap_VImage_divide, METH_VARARGS, NULL},
81461 - { (char *)"VImage_exp10", _wrap_VImage_exp10, METH_VARARGS, NULL},
81462 - { (char *)"VImage_expn", _wrap_VImage_expn, METH_VARARGS, NULL},
81463 - { (char *)"VImage_exp", _wrap_VImage_exp, METH_VARARGS, NULL},
81464 - { (char *)"VImage_floor", _wrap_VImage_floor, METH_VARARGS, NULL},
81465 - { (char *)"VImage_invert", _wrap_VImage_invert, METH_VARARGS, NULL},
81466 - { (char *)"VImage_linreg", _wrap_VImage_linreg, METH_VARARGS, NULL},
81467 - { (char *)"VImage_lin", _wrap_VImage_lin, METH_VARARGS, NULL},
81468 - { (char *)"VImage_log10", _wrap_VImage_log10, METH_VARARGS, NULL},
81469 - { (char *)"VImage_log", _wrap_VImage_log, METH_VARARGS, NULL},
81470 - { (char *)"VImage_max", _wrap_VImage_max, METH_VARARGS, NULL},
81471 - { (char *)"VImage_maxpos", _wrap_VImage_maxpos, METH_VARARGS, NULL},
81472 - { (char *)"VImage_maxpos_avg", _wrap_VImage_maxpos_avg, METH_VARARGS, NULL},
81473 - { (char *)"VImage_measure", _wrap_VImage_measure, METH_VARARGS, NULL},
81474 - { (char *)"VImage_min", _wrap_VImage_min, METH_VARARGS, NULL},
81475 - { (char *)"VImage_minpos", _wrap_VImage_minpos, METH_VARARGS, NULL},
81476 - { (char *)"VImage_multiply", _wrap_VImage_multiply, METH_VARARGS, NULL},
81477 - { (char *)"VImage_pow", _wrap_VImage_pow, METH_VARARGS, NULL},
81478 - { (char *)"VImage_recomb", _wrap_VImage_recomb, METH_VARARGS, NULL},
81479 - { (char *)"VImage_remainder", _wrap_VImage_remainder, METH_VARARGS, NULL},
81480 - { (char *)"VImage_rint", _wrap_VImage_rint, METH_VARARGS, NULL},
81481 - { (char *)"VImage_sign", _wrap_VImage_sign, METH_VARARGS, NULL},
81482 - { (char *)"VImage_sin", _wrap_VImage_sin, METH_VARARGS, NULL},
81483 - { (char *)"VImage_stats", _wrap_VImage_stats, METH_VARARGS, NULL},
81484 - { (char *)"VImage_subtract", _wrap_VImage_subtract, METH_VARARGS, NULL},
81485 - { (char *)"VImage_tan", _wrap_VImage_tan, METH_VARARGS, NULL},
81486 - { (char *)"VImage_greyc", _wrap_VImage_greyc, METH_VARARGS, NULL},
81487 - { (char *)"VImage_greyc_mask", _wrap_VImage_greyc_mask, METH_VARARGS, NULL},
81488 - { (char *)"VImage_LCh2Lab", _wrap_VImage_LCh2Lab, METH_VARARGS, NULL},
81489 - { (char *)"VImage_LCh2UCS", _wrap_VImage_LCh2UCS, METH_VARARGS, NULL},
81490 - { (char *)"VImage_Lab2LCh", _wrap_VImage_Lab2LCh, METH_VARARGS, NULL},
81491 - { (char *)"VImage_Lab2LabQ", _wrap_VImage_Lab2LabQ, METH_VARARGS, NULL},
81492 - { (char *)"VImage_Lab2LabS", _wrap_VImage_Lab2LabS, METH_VARARGS, NULL},
81493 - { (char *)"VImage_Lab2UCS", _wrap_VImage_Lab2UCS, METH_VARARGS, NULL},
81494 - { (char *)"VImage_Lab2XYZ", _wrap_VImage_Lab2XYZ, METH_VARARGS, NULL},
81495 - { (char *)"VImage_Lab2XYZ_temp", _wrap_VImage_Lab2XYZ_temp, METH_VARARGS, NULL},
81496 - { (char *)"VImage_Lab2disp", _wrap_VImage_Lab2disp, METH_VARARGS, NULL},
81497 - { (char *)"VImage_LabQ2LabS", _wrap_VImage_LabQ2LabS, METH_VARARGS, NULL},
81498 - { (char *)"VImage_LabQ2Lab", _wrap_VImage_LabQ2Lab, METH_VARARGS, NULL},
81499 - { (char *)"VImage_LabQ2XYZ", _wrap_VImage_LabQ2XYZ, METH_VARARGS, NULL},
81500 - { (char *)"VImage_LabQ2disp", _wrap_VImage_LabQ2disp, METH_VARARGS, NULL},
81501 - { (char *)"VImage_LabS2LabQ", _wrap_VImage_LabS2LabQ, METH_VARARGS, NULL},
81502 - { (char *)"VImage_LabS2Lab", _wrap_VImage_LabS2Lab, METH_VARARGS, NULL},
81503 - { (char *)"VImage_UCS2LCh", _wrap_VImage_UCS2LCh, METH_VARARGS, NULL},
81504 - { (char *)"VImage_UCS2Lab", _wrap_VImage_UCS2Lab, METH_VARARGS, NULL},
81505 - { (char *)"VImage_UCS2XYZ", _wrap_VImage_UCS2XYZ, METH_VARARGS, NULL},
81506 - { (char *)"VImage_XYZ2Lab", _wrap_VImage_XYZ2Lab, METH_VARARGS, NULL},
81507 - { (char *)"VImage_XYZ2Lab_temp", _wrap_VImage_XYZ2Lab_temp, METH_VARARGS, NULL},
81508 - { (char *)"VImage_XYZ2UCS", _wrap_VImage_XYZ2UCS, METH_VARARGS, NULL},
81509 - { (char *)"VImage_XYZ2Yxy", _wrap_VImage_XYZ2Yxy, METH_VARARGS, NULL},
81510 - { (char *)"VImage_XYZ2disp", _wrap_VImage_XYZ2disp, METH_VARARGS, NULL},
81511 - { (char *)"VImage_XYZ2sRGB", _wrap_VImage_XYZ2sRGB, METH_VARARGS, NULL},
81512 - { (char *)"VImage_Yxy2XYZ", _wrap_VImage_Yxy2XYZ, METH_VARARGS, NULL},
81513 - { (char *)"VImage_dE00_fromLab", _wrap_VImage_dE00_fromLab, METH_VARARGS, NULL},
81514 - { (char *)"VImage_dECMC_fromLab", _wrap_VImage_dECMC_fromLab, METH_VARARGS, NULL},
81515 - { (char *)"VImage_dECMC_fromdisp", _wrap_VImage_dECMC_fromdisp, METH_VARARGS, NULL},
81516 - { (char *)"VImage_dE_fromLab", _wrap_VImage_dE_fromLab, METH_VARARGS, NULL},
81517 - { (char *)"VImage_dE_fromXYZ", _wrap_VImage_dE_fromXYZ, METH_VARARGS, NULL},
81518 - { (char *)"VImage_dE_fromdisp", _wrap_VImage_dE_fromdisp, METH_VARARGS, NULL},
81519 - { (char *)"VImage_disp2Lab", _wrap_VImage_disp2Lab, METH_VARARGS, NULL},
81520 - { (char *)"VImage_disp2XYZ", _wrap_VImage_disp2XYZ, METH_VARARGS, NULL},
81521 - { (char *)"VImage_float2rad", _wrap_VImage_float2rad, METH_VARARGS, NULL},
81522 - { (char *)"VImage_icc_ac2rc", _wrap_VImage_icc_ac2rc, METH_VARARGS, NULL},
81523 - { (char *)"VImage_icc_export_depth", _wrap_VImage_icc_export_depth, METH_VARARGS, NULL},
81524 - { (char *)"VImage_icc_import", _wrap_VImage_icc_import, METH_VARARGS, NULL},
81525 - { (char *)"VImage_icc_import_embedded", _wrap_VImage_icc_import_embedded, METH_VARARGS, NULL},
81526 - { (char *)"VImage_icc_transform", _wrap_VImage_icc_transform, METH_VARARGS, NULL},
81527 - { (char *)"VImage_lab_morph", _wrap_VImage_lab_morph, METH_VARARGS, NULL},
81528 - { (char *)"VImage_rad2float", _wrap_VImage_rad2float, METH_VARARGS, NULL},
81529 - { (char *)"VImage_sRGB2XYZ", _wrap_VImage_sRGB2XYZ, METH_VARARGS, NULL},
81530 - { (char *)"VImage_gaussnoise", _wrap_VImage_gaussnoise, METH_VARARGS, NULL},
81531 - { (char *)"VImage_bandjoin", _wrap_VImage_bandjoin, METH_VARARGS, NULL},
81532 - { (char *)"VImage_black", _wrap_VImage_black, METH_VARARGS, NULL},
81533 - { (char *)"VImage_c2amph", _wrap_VImage_c2amph, METH_VARARGS, NULL},
81534 - { (char *)"VImage_c2imag", _wrap_VImage_c2imag, METH_VARARGS, NULL},
81535 - { (char *)"VImage_c2real", _wrap_VImage_c2real, METH_VARARGS, NULL},
81536 - { (char *)"VImage_c2rect", _wrap_VImage_c2rect, METH_VARARGS, NULL},
81537 - { (char *)"VImage_clip2fmt", _wrap_VImage_clip2fmt, METH_VARARGS, NULL},
81538 - { (char *)"VImage_copy", _wrap_VImage_copy, METH_VARARGS, NULL},
81539 - { (char *)"VImage_copy_file", _wrap_VImage_copy_file, METH_VARARGS, NULL},
81540 - { (char *)"VImage_copy_morph", _wrap_VImage_copy_morph, METH_VARARGS, NULL},
81541 - { (char *)"VImage_copy_swap", _wrap_VImage_copy_swap, METH_VARARGS, NULL},
81542 - { (char *)"VImage_copy_set", _wrap_VImage_copy_set, METH_VARARGS, NULL},
81543 - { (char *)"VImage_extract_area", _wrap_VImage_extract_area, METH_VARARGS, NULL},
81544 - { (char *)"VImage_extract_areabands", _wrap_VImage_extract_areabands, METH_VARARGS, NULL},
81545 - { (char *)"VImage_extract_band", _wrap_VImage_extract_band, METH_VARARGS, NULL},
81546 - { (char *)"VImage_extract_bands", _wrap_VImage_extract_bands, METH_VARARGS, NULL},
81547 - { (char *)"VImage_extract", _wrap_VImage_extract, METH_VARARGS, NULL},
81548 - { (char *)"VImage_falsecolour", _wrap_VImage_falsecolour, METH_VARARGS, NULL},
81549 - { (char *)"VImage_fliphor", _wrap_VImage_fliphor, METH_VARARGS, NULL},
81550 - { (char *)"VImage_flipver", _wrap_VImage_flipver, METH_VARARGS, NULL},
81551 - { (char *)"VImage_gbandjoin", _wrap_VImage_gbandjoin, METH_VARARGS, NULL},
81552 - { (char *)"VImage_grid", _wrap_VImage_grid, METH_VARARGS, NULL},
81553 - { (char *)"VImage_insert", _wrap_VImage_insert, METH_VARARGS, NULL},
81554 - { (char *)"VImage_insert_noexpand", _wrap_VImage_insert_noexpand, METH_VARARGS, NULL},
81555 - { (char *)"VImage_embed", _wrap_VImage_embed, METH_VARARGS, NULL},
81556 - { (char *)"VImage_lrjoin", _wrap_VImage_lrjoin, METH_VARARGS, NULL},
81557 - { (char *)"VImage_msb", _wrap_VImage_msb, METH_VARARGS, NULL},
81558 - { (char *)"VImage_msb_band", _wrap_VImage_msb_band, METH_VARARGS, NULL},
81559 - { (char *)"VImage_replicate", _wrap_VImage_replicate, METH_VARARGS, NULL},
81560 - { (char *)"VImage_ri2c", _wrap_VImage_ri2c, METH_VARARGS, NULL},
81561 - { (char *)"VImage_rot180", _wrap_VImage_rot180, METH_VARARGS, NULL},
81562 - { (char *)"VImage_rot270", _wrap_VImage_rot270, METH_VARARGS, NULL},
81563 - { (char *)"VImage_rot90", _wrap_VImage_rot90, METH_VARARGS, NULL},
81564 - { (char *)"VImage_scale", _wrap_VImage_scale, METH_VARARGS, NULL},
81565 - { (char *)"VImage_scaleps", _wrap_VImage_scaleps, METH_VARARGS, NULL},
81566 - { (char *)"VImage_subsample", _wrap_VImage_subsample, METH_VARARGS, NULL},
81567 - { (char *)"VImage_system", _wrap_VImage_system, METH_VARARGS, NULL},
81568 - { (char *)"VImage_system_image", _wrap_VImage_system_image, METH_VARARGS, NULL},
81569 - { (char *)"VImage_tbjoin", _wrap_VImage_tbjoin, METH_VARARGS, NULL},
81570 - { (char *)"VImage_text", _wrap_VImage_text, METH_VARARGS, NULL},
81571 - { (char *)"VImage_wrap", _wrap_VImage_wrap, METH_VARARGS, NULL},
81572 - { (char *)"VImage_zoom", _wrap_VImage_zoom, METH_VARARGS, NULL},
81573 - { (char *)"VImage_aconvsep", _wrap_VImage_aconvsep, METH_VARARGS, NULL},
81574 - { (char *)"VImage_aconv", _wrap_VImage_aconv, METH_VARARGS, NULL},
81575 - { (char *)"VImage_addgnoise", _wrap_VImage_addgnoise, METH_VARARGS, NULL},
81576 - { (char *)"VImage_compass", _wrap_VImage_compass, METH_VARARGS, NULL},
81577 - { (char *)"VImage_contrast_surface", _wrap_VImage_contrast_surface, METH_VARARGS, NULL},
81578 - { (char *)"VImage_conv", _wrap_VImage_conv, METH_VARARGS, NULL},
81579 - { (char *)"VImage_convsep", _wrap_VImage_convsep, METH_VARARGS, NULL},
81580 - { (char *)"VImage_fastcor", _wrap_VImage_fastcor, METH_VARARGS, NULL},
81581 - { (char *)"VImage_gradcor", _wrap_VImage_gradcor, METH_VARARGS, NULL},
81582 - { (char *)"VImage_gradient", _wrap_VImage_gradient, METH_VARARGS, NULL},
81583 - { (char *)"VImage_grad_x", _wrap_VImage_grad_x, METH_VARARGS, NULL},
81584 - { (char *)"VImage_grad_y", _wrap_VImage_grad_y, METH_VARARGS, NULL},
81585 - { (char *)"VImage_lindetect", _wrap_VImage_lindetect, METH_VARARGS, NULL},
81586 - { (char *)"VImage_sharpen", _wrap_VImage_sharpen, METH_VARARGS, NULL},
81587 - { (char *)"VImage_spcor", _wrap_VImage_spcor, METH_VARARGS, NULL},
81588 - { (char *)"VImage_argb2rgba", _wrap_VImage_argb2rgba, METH_VARARGS, NULL},
81589 - { (char *)"VImage_flood_copy", _wrap_VImage_flood_copy, METH_VARARGS, NULL},
81590 - { (char *)"VImage_flood_blob_copy", _wrap_VImage_flood_blob_copy, METH_VARARGS, NULL},
81591 - { (char *)"VImage_flood_other_copy", _wrap_VImage_flood_other_copy, METH_VARARGS, NULL},
81592 - { (char *)"VImage_clip", _wrap_VImage_clip, METH_VARARGS, NULL},
81593 - { (char *)"VImage_c2ps", _wrap_VImage_c2ps, METH_VARARGS, NULL},
81594 - { (char *)"VImage_resize_linear", _wrap_VImage_resize_linear, METH_VARARGS, NULL},
81595 - { (char *)"VImage_cmulnorm", _wrap_VImage_cmulnorm, METH_VARARGS, NULL},
81596 - { (char *)"VImage_fav4", _wrap_VImage_fav4, METH_VARARGS, NULL},
81597 - { (char *)"VImage_gadd", _wrap_VImage_gadd, METH_VARARGS, NULL},
81598 - { (char *)"VImage_icc_export", _wrap_VImage_icc_export, METH_VARARGS, NULL},
81599 - { (char *)"VImage_litecor", _wrap_VImage_litecor, METH_VARARGS, NULL},
81600 - { (char *)"VImage_affine", _wrap_VImage_affine, METH_VARARGS, NULL},
81601 - { (char *)"VImage_clip2c", _wrap_VImage_clip2c, METH_VARARGS, NULL},
81602 - { (char *)"VImage_clip2cm", _wrap_VImage_clip2cm, METH_VARARGS, NULL},
81603 - { (char *)"VImage_clip2d", _wrap_VImage_clip2d, METH_VARARGS, NULL},
81604 - { (char *)"VImage_clip2dcm", _wrap_VImage_clip2dcm, METH_VARARGS, NULL},
81605 - { (char *)"VImage_clip2f", _wrap_VImage_clip2f, METH_VARARGS, NULL},
81606 - { (char *)"VImage_clip2i", _wrap_VImage_clip2i, METH_VARARGS, NULL},
81607 - { (char *)"VImage_convsub", _wrap_VImage_convsub, METH_VARARGS, NULL},
81608 - { (char *)"VImage_convf", _wrap_VImage_convf, METH_VARARGS, NULL},
81609 - { (char *)"VImage_convsepf", _wrap_VImage_convsepf, METH_VARARGS, NULL},
81610 - { (char *)"VImage_clip2s", _wrap_VImage_clip2s, METH_VARARGS, NULL},
81611 - { (char *)"VImage_clip2ui", _wrap_VImage_clip2ui, METH_VARARGS, NULL},
81612 - { (char *)"VImage_clip2us", _wrap_VImage_clip2us, METH_VARARGS, NULL},
81613 - { (char *)"VImage_slice", _wrap_VImage_slice, METH_VARARGS, NULL},
81614 - { (char *)"VImage_segment", _wrap_VImage_segment, METH_VARARGS, NULL},
81615 - { (char *)"VImage_thresh", _wrap_VImage_thresh, METH_VARARGS, NULL},
81616 - { (char *)"VImage_convf_raw", _wrap_VImage_convf_raw, METH_VARARGS, NULL},
81617 - { (char *)"VImage_conv_raw", _wrap_VImage_conv_raw, METH_VARARGS, NULL},
81618 - { (char *)"VImage_contrast_surface_raw", _wrap_VImage_contrast_surface_raw, METH_VARARGS, NULL},
81619 - { (char *)"VImage_convsepf_raw", _wrap_VImage_convsepf_raw, METH_VARARGS, NULL},
81620 - { (char *)"VImage_convsep_raw", _wrap_VImage_convsep_raw, METH_VARARGS, NULL},
81621 - { (char *)"VImage_fastcor_raw", _wrap_VImage_fastcor_raw, METH_VARARGS, NULL},
81622 - { (char *)"VImage_gradcor_raw", _wrap_VImage_gradcor_raw, METH_VARARGS, NULL},
81623 - { (char *)"VImage_spcor_raw", _wrap_VImage_spcor_raw, METH_VARARGS, NULL},
81624 - { (char *)"VImage_lhisteq_raw", _wrap_VImage_lhisteq_raw, METH_VARARGS, NULL},
81625 - { (char *)"VImage_stdif_raw", _wrap_VImage_stdif_raw, METH_VARARGS, NULL},
81626 - { (char *)"VImage_rank_raw", _wrap_VImage_rank_raw, METH_VARARGS, NULL},
81627 - { (char *)"VImage_dilate_raw", _wrap_VImage_dilate_raw, METH_VARARGS, NULL},
81628 - { (char *)"VImage_erode_raw", _wrap_VImage_erode_raw, METH_VARARGS, NULL},
81629 - { (char *)"VImage_similarity_area", _wrap_VImage_similarity_area, METH_VARARGS, NULL},
81630 - { (char *)"VImage_similarity", _wrap_VImage_similarity, METH_VARARGS, NULL},
81631 - { (char *)"VImage_mask2vips", _wrap_VImage_mask2vips, METH_VARARGS, NULL},
81632 - { (char *)"VImage_vips2mask", _wrap_VImage_vips2mask, METH_VARARGS, NULL},
81633 - { (char *)"VImage_insertplace", _wrap_VImage_insertplace, METH_VARARGS, NULL},
81634 - { (char *)"VImage_circle", _wrap_VImage_circle, METH_VARARGS, NULL},
81635 - { (char *)"VImage_andimage", _wrap_VImage_andimage, METH_VARARGS, NULL},
81636 - { (char *)"VImage_orimage", _wrap_VImage_orimage, METH_VARARGS, NULL},
81637 - { (char *)"VImage_eorimage", _wrap_VImage_eorimage, METH_VARARGS, NULL},
81638 - { (char *)"VImage_shiftleft", _wrap_VImage_shiftleft, METH_VARARGS, NULL},
81639 - { (char *)"VImage_shiftright", _wrap_VImage_shiftright, METH_VARARGS, NULL},
81640 - { (char *)"VImage_blend", _wrap_VImage_blend, METH_VARARGS, NULL},
81641 - { (char *)"VImage_equal", _wrap_VImage_equal, METH_VARARGS, NULL},
81642 - { (char *)"VImage_ifthenelse", _wrap_VImage_ifthenelse, METH_VARARGS, NULL},
81643 - { (char *)"VImage_less", _wrap_VImage_less, METH_VARARGS, NULL},
81644 - { (char *)"VImage_lesseq", _wrap_VImage_lesseq, METH_VARARGS, NULL},
81645 - { (char *)"VImage_more", _wrap_VImage_more, METH_VARARGS, NULL},
81646 - { (char *)"VImage_moreeq", _wrap_VImage_moreeq, METH_VARARGS, NULL},
81647 - { (char *)"VImage_notequal", _wrap_VImage_notequal, METH_VARARGS, NULL},
81648 - { (char *)"VImage_quadratic", _wrap_VImage_quadratic, METH_VARARGS, NULL},
81649 - { (char *)"VImage_csv2vips", _wrap_VImage_csv2vips, METH_VARARGS, NULL},
81650 - { (char *)"VImage_fits2vips", _wrap_VImage_fits2vips, METH_VARARGS, NULL},
81651 - { (char *)"VImage_jpeg2vips", _wrap_VImage_jpeg2vips, METH_VARARGS, NULL},
81652 - { (char *)"VImage_magick2vips", _wrap_VImage_magick2vips, METH_VARARGS, NULL},
81653 - { (char *)"VImage_png2vips", _wrap_VImage_png2vips, METH_VARARGS, NULL},
81654 - { (char *)"VImage_exr2vips", _wrap_VImage_exr2vips, METH_VARARGS, NULL},
81655 - { (char *)"VImage_ppm2vips", _wrap_VImage_ppm2vips, METH_VARARGS, NULL},
81656 - { (char *)"VImage_analyze2vips", _wrap_VImage_analyze2vips, METH_VARARGS, NULL},
81657 - { (char *)"VImage_tiff2vips", _wrap_VImage_tiff2vips, METH_VARARGS, NULL},
81658 - { (char *)"VImage_vips2csv", _wrap_VImage_vips2csv, METH_VARARGS, NULL},
81659 - { (char *)"VImage_vips2dz", _wrap_VImage_vips2dz, METH_VARARGS, NULL},
81660 - { (char *)"VImage_vips2jpeg", _wrap_VImage_vips2jpeg, METH_VARARGS, NULL},
81661 - { (char *)"VImage_vips2mimejpeg", _wrap_VImage_vips2mimejpeg, METH_VARARGS, NULL},
81662 - { (char *)"VImage_vips2png", _wrap_VImage_vips2png, METH_VARARGS, NULL},
81663 - { (char *)"VImage_vips2ppm", _wrap_VImage_vips2ppm, METH_VARARGS, NULL},
81664 - { (char *)"VImage_vips2tiff", _wrap_VImage_vips2tiff, METH_VARARGS, NULL},
81665 - { (char *)"VImage_create_fmask", _wrap_VImage_create_fmask, METH_VARARGS, NULL},
81666 - { (char *)"VImage_disp_ps", _wrap_VImage_disp_ps, METH_VARARGS, NULL},
81667 - { (char *)"VImage_flt_image_freq", _wrap_VImage_flt_image_freq, METH_VARARGS, NULL},
81668 - { (char *)"VImage_fractsurf", _wrap_VImage_fractsurf, METH_VARARGS, NULL},
81669 - { (char *)"VImage_freqflt", _wrap_VImage_freqflt, METH_VARARGS, NULL},
81670 - { (char *)"VImage_fwfft", _wrap_VImage_fwfft, METH_VARARGS, NULL},
81671 - { (char *)"VImage_rotquad", _wrap_VImage_rotquad, METH_VARARGS, NULL},
81672 - { (char *)"VImage_invfft", _wrap_VImage_invfft, METH_VARARGS, NULL},
81673 - { (char *)"VImage_phasecor_fft", _wrap_VImage_phasecor_fft, METH_VARARGS, NULL},
81674 - { (char *)"VImage_invfftr", _wrap_VImage_invfftr, METH_VARARGS, NULL},
81675 - { (char *)"VImage_gammacorrect", _wrap_VImage_gammacorrect, METH_VARARGS, NULL},
81676 - { (char *)"VImage_heq", _wrap_VImage_heq, METH_VARARGS, NULL},
81677 - { (char *)"VImage_hist", _wrap_VImage_hist, METH_VARARGS, NULL},
81678 - { (char *)"VImage_histcum", _wrap_VImage_histcum, METH_VARARGS, NULL},
81679 - { (char *)"VImage_histeq", _wrap_VImage_histeq, METH_VARARGS, NULL},
81680 - { (char *)"VImage_hist_indexed", _wrap_VImage_hist_indexed, METH_VARARGS, NULL},
81681 - { (char *)"VImage_histgr", _wrap_VImage_histgr, METH_VARARGS, NULL},
81682 - { (char *)"VImage_histnD", _wrap_VImage_histnD, METH_VARARGS, NULL},
81683 - { (char *)"VImage_histnorm", _wrap_VImage_histnorm, METH_VARARGS, NULL},
81684 - { (char *)"VImage_histplot", _wrap_VImage_histplot, METH_VARARGS, NULL},
81685 - { (char *)"VImage_histspec", _wrap_VImage_histspec, METH_VARARGS, NULL},
81686 - { (char *)"VImage_hsp", _wrap_VImage_hsp, METH_VARARGS, NULL},
81687 - { (char *)"VImage_identity", _wrap_VImage_identity, METH_VARARGS, NULL},
81688 - { (char *)"VImage_identity_ushort", _wrap_VImage_identity_ushort, METH_VARARGS, NULL},
81689 - { (char *)"VImage_ismonotonic", _wrap_VImage_ismonotonic, METH_VARARGS, NULL},
81690 - { (char *)"VImage_lhisteq", _wrap_VImage_lhisteq, METH_VARARGS, NULL},
81691 - { (char *)"VImage_mpercent", _wrap_VImage_mpercent, METH_VARARGS, NULL},
81692 - { (char *)"VImage_invertlut", _wrap_VImage_invertlut, METH_VARARGS, NULL},
81693 - { (char *)"VImage_buildlut", _wrap_VImage_buildlut, METH_VARARGS, NULL},
81694 - { (char *)"VImage_maplut", _wrap_VImage_maplut, METH_VARARGS, NULL},
81695 - { (char *)"VImage_project", _wrap_VImage_project, METH_VARARGS, NULL},
81696 - { (char *)"VImage_stdif", _wrap_VImage_stdif, METH_VARARGS, NULL},
81697 - { (char *)"VImage_tone_analyse", _wrap_VImage_tone_analyse, METH_VARARGS, NULL},
81698 - { (char *)"VImage_tone_build", _wrap_VImage_tone_build, METH_VARARGS, NULL},
81699 - { (char *)"VImage_tone_build_range", _wrap_VImage_tone_build_range, METH_VARARGS, NULL},
81700 - { (char *)"VImage_tone_map", _wrap_VImage_tone_map, METH_VARARGS, NULL},
81701 - { (char *)"VImage_draw_circle", _wrap_VImage_draw_circle, METH_VARARGS, NULL},
81702 - { (char *)"VImage_draw_rect", _wrap_VImage_draw_rect, METH_VARARGS, NULL},
81703 - { (char *)"VImage_draw_line", _wrap_VImage_draw_line, METH_VARARGS, NULL},
81704 - { (char *)"VImage_draw_point", _wrap_VImage_draw_point, METH_VARARGS, NULL},
81705 - { (char *)"VImage_draw_smudge", _wrap_VImage_draw_smudge, METH_VARARGS, NULL},
81706 - { (char *)"VImage_draw_flood", _wrap_VImage_draw_flood, METH_VARARGS, NULL},
81707 - { (char *)"VImage_draw_flood_blob", _wrap_VImage_draw_flood_blob, METH_VARARGS, NULL},
81708 - { (char *)"VImage_draw_flood_other", _wrap_VImage_draw_flood_other, METH_VARARGS, NULL},
81709 - { (char *)"VImage_draw_image", _wrap_VImage_draw_image, METH_VARARGS, NULL},
81710 - { (char *)"VImage_draw_mask", _wrap_VImage_draw_mask, METH_VARARGS, NULL},
81711 - { (char *)"VImage_line", _wrap_VImage_line, METH_VARARGS, NULL},
81712 - { (char *)"VImage_binfile", _wrap_VImage_binfile, METH_VARARGS, NULL},
81713 - { (char *)"VImage_cache", _wrap_VImage_cache, METH_VARARGS, NULL},
81714 - { (char *)"VImage_getext", _wrap_VImage_getext, METH_VARARGS, NULL},
81715 - { (char *)"VImage_header_get_typeof", _wrap_VImage_header_get_typeof, METH_VARARGS, NULL},
81716 - { (char *)"VImage_header_int", _wrap_VImage_header_int, METH_VARARGS, NULL},
81717 - { (char *)"VImage_header_double", _wrap_VImage_header_double, METH_VARARGS, NULL},
81718 - { (char *)"VImage_header_string", _wrap_VImage_header_string, METH_VARARGS, NULL},
81719 - { (char *)"VImage_history_get", _wrap_VImage_history_get, METH_VARARGS, NULL},
81720 - { (char *)"VImage_printdesc", _wrap_VImage_printdesc, METH_VARARGS, NULL},
81721 - { (char *)"VImage_cntlines", _wrap_VImage_cntlines, METH_VARARGS, NULL},
81722 - { (char *)"VImage_dilate", _wrap_VImage_dilate, METH_VARARGS, NULL},
81723 - { (char *)"VImage_rank", _wrap_VImage_rank, METH_VARARGS, NULL},
81724 - { (char *)"VImage_rank_image", _wrap_VImage_rank_image, METH_VARARGS, NULL},
81725 - { (char *)"VImage_maxvalue", _wrap_VImage_maxvalue, METH_VARARGS, NULL},
81726 - { (char *)"VImage_label_regions", _wrap_VImage_label_regions, METH_VARARGS, NULL},
81727 - { (char *)"VImage_zerox", _wrap_VImage_zerox, METH_VARARGS, NULL},
81728 - { (char *)"VImage_erode", _wrap_VImage_erode, METH_VARARGS, NULL},
81729 - { (char *)"VImage_profile", _wrap_VImage_profile, METH_VARARGS, NULL},
81730 - { (char *)"VImage_align_bands", _wrap_VImage_align_bands, METH_VARARGS, NULL},
81731 - { (char *)"VImage_correl", _wrap_VImage_correl, METH_VARARGS, NULL},
81732 - { (char *)"VImage__find_lroverlap", _wrap_VImage__find_lroverlap, METH_VARARGS, NULL},
81733 - { (char *)"VImage__find_tboverlap", _wrap_VImage__find_tboverlap, METH_VARARGS, NULL},
81734 - { (char *)"VImage_global_balance", _wrap_VImage_global_balance, METH_VARARGS, NULL},
81735 - { (char *)"VImage_global_balancef", _wrap_VImage_global_balancef, METH_VARARGS, NULL},
81736 - { (char *)"VImage_lrmerge", _wrap_VImage_lrmerge, METH_VARARGS, NULL},
81737 - { (char *)"VImage_lrmerge1", _wrap_VImage_lrmerge1, METH_VARARGS, NULL},
81738 - { (char *)"VImage_lrmosaic", _wrap_VImage_lrmosaic, METH_VARARGS, NULL},
81739 - { (char *)"VImage_lrmosaic1", _wrap_VImage_lrmosaic1, METH_VARARGS, NULL},
81740 - { (char *)"VImage_match_linear", _wrap_VImage_match_linear, METH_VARARGS, NULL},
81741 - { (char *)"VImage_match_linear_search", _wrap_VImage_match_linear_search, METH_VARARGS, NULL},
81742 - { (char *)"VImage_maxpos_subpel", _wrap_VImage_maxpos_subpel, METH_VARARGS, NULL},
81743 - { (char *)"VImage_remosaic", _wrap_VImage_remosaic, METH_VARARGS, NULL},
81744 - { (char *)"VImage_tbmerge", _wrap_VImage_tbmerge, METH_VARARGS, NULL},
81745 - { (char *)"VImage_tbmerge1", _wrap_VImage_tbmerge1, METH_VARARGS, NULL},
81746 - { (char *)"VImage_tbmosaic", _wrap_VImage_tbmosaic, METH_VARARGS, NULL},
81747 - { (char *)"VImage_tbmosaic1", _wrap_VImage_tbmosaic1, METH_VARARGS, NULL},
81748 - { (char *)"VImage_benchmark", _wrap_VImage_benchmark, METH_VARARGS, NULL},
81749 - { (char *)"VImage_benchmark2", _wrap_VImage_benchmark2, METH_VARARGS, NULL},
81750 - { (char *)"VImage_benchmarkn", _wrap_VImage_benchmarkn, METH_VARARGS, NULL},
81751 - { (char *)"VImage_eye", _wrap_VImage_eye, METH_VARARGS, NULL},
81752 - { (char *)"VImage_grey", _wrap_VImage_grey, METH_VARARGS, NULL},
81753 - { (char *)"VImage_feye", _wrap_VImage_feye, METH_VARARGS, NULL},
81754 - { (char *)"VImage_fgrey", _wrap_VImage_fgrey, METH_VARARGS, NULL},
81755 - { (char *)"VImage_fzone", _wrap_VImage_fzone, METH_VARARGS, NULL},
81756 - { (char *)"VImage_make_xy", _wrap_VImage_make_xy, METH_VARARGS, NULL},
81757 - { (char *)"VImage_sines", _wrap_VImage_sines, METH_VARARGS, NULL},
81758 - { (char *)"VImage_zone", _wrap_VImage_zone, METH_VARARGS, NULL},
81759 - { (char *)"VImage_rightshift_size", _wrap_VImage_rightshift_size, METH_VARARGS, NULL},
81760 - { (char *)"VImage_shrink", _wrap_VImage_shrink, METH_VARARGS, NULL},
81761 - { (char *)"VImage_stretch3", _wrap_VImage_stretch3, METH_VARARGS, NULL},
81762 - { (char *)"VImage_affinei", _wrap_VImage_affinei, METH_VARARGS, NULL},
81763 - { (char *)"VImage_affinei_all", _wrap_VImage_affinei_all, METH_VARARGS, NULL},
81764 - { (char *)"VImage_video_test", _wrap_VImage_video_test, METH_VARARGS, NULL},
81765 - { (char *)"VImage_video_v4l1", _wrap_VImage_video_v4l1, METH_VARARGS, NULL},
81766 - { (char *)"VImage_tobuffer", _wrap_VImage_tobuffer, METH_VARARGS, NULL},
81767 - { (char *)"VImage_frombuffer", _wrap_VImage_frombuffer, METH_VARARGS, NULL},
81768 - { (char *)"VImage_tostring", _wrap_VImage_tostring, METH_VARARGS, NULL},
81769 - { (char *)"VImage_fromstring", _wrap_VImage_fromstring, METH_VARARGS, NULL},
81770 - { (char *)"VImage_swigregister", VImage_swigregister, METH_VARARGS, NULL},
81771 - { (char *)"im_init_world", _wrap_im_init_world, METH_VARARGS, NULL},
81772 - { (char *)"im__print_all", _wrap_im__print_all, METH_VARARGS, NULL},
81773 - { (char *)"im_col_Lab2XYZ", _wrap_im_col_Lab2XYZ, METH_VARARGS, NULL},
81774 - { NULL, NULL, 0, NULL }
81775 -};
81776 -
81777 -
81778 -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
81779 -
81780 -static swig_type_info _swigt__p_GType = {"_p_GType", "GType *", 0, 0, (void*)0, 0};
81781 -static swig_type_info _swigt__p_VBuffer = {"_p_VBuffer", "VBuffer *", 0, 0, (void*)0, 0};
81782 -static swig_type_info _swigt__p__VipsImage = {"_p__VipsImage", "_VipsImage *", 0, 0, (void*)0, 0};
81783 -static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0};
81784 -static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
81785 -static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0};
81786 -static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
81787 -static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0};
81788 -static swig_type_info _swigt__p_gboolean = {"_p_gboolean", "gboolean *", 0, 0, (void*)0, 0};
81789 -static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0};
81790 -static swig_type_info _swigt__p_matrix = {"_p_matrix", "matrix *", 0, 0, (void*)0, 0};
81791 -static swig_type_info _swigt__p_p_PyObject = {"_p_p_PyObject", "PyObject **", 0, 0, (void*)0, 0};
81792 -static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
81793 -static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0};
81794 -static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0};
81795 -static swig_type_info _swigt__p_std__allocatorT_double_t = {"_p_std__allocatorT_double_t", "std::vector< double >::allocator_type *|std::allocator< double > *", 0, 0, (void*)0, 0};
81796 -static swig_type_info _swigt__p_std__allocatorT_int_t = {"_p_std__allocatorT_int_t", "std::vector< int >::allocator_type *|std::allocator< int > *", 0, 0, (void*)0, 0};
81797 -static swig_type_info _swigt__p_std__allocatorT_vips__VImage_t = {"_p_std__allocatorT_vips__VImage_t", "std::vector< vips::VImage >::allocator_type *|std::allocator< vips::VImage > *", 0, 0, (void*)0, 0};
81798 -static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0};
81799 -static swig_type_info _swigt__p_std__vectorT__Tp__Alloc_t = {"_p_std__vectorT__Tp__Alloc_t", "std::vector< _Tp,_Alloc > *", 0, 0, (void*)0, 0};
81800 -static swig_type_info _swigt__p_std__vectorT_double_std__allocatorT_double_t_t = {"_p_std__vectorT_double_std__allocatorT_double_t_t", "std::vector< double,std::allocator< double > > *|std::vector< double > *", 0, 0, (void*)0, 0};
81801 -static swig_type_info _swigt__p_std__vectorT_int_std__allocatorT_int_t_t = {"_p_std__vectorT_int_std__allocatorT_int_t_t", "std::vector< int,std::allocator< int > > *|std::vector< int > *", 0, 0, (void*)0, 0};
81802 -static swig_type_info _swigt__p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t = {"_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t", "std::vector< vips::VImage > *|std::vector< vips::VImage,std::allocator< vips::VImage > > *", 0, 0, (void*)0, 0};
81803 -static swig_type_info _swigt__p_swig__SwigPyIterator = {"_p_swig__SwigPyIterator", "swig::SwigPyIterator *", 0, 0, (void*)0, 0};
81804 -static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0};
81805 -static swig_type_info _swigt__p_vips__VDMask = {"_p_vips__VDMask", "vips::VDMask *", 0, 0, (void*)0, 0};
81806 -static swig_type_info _swigt__p_vips__VDisplay = {"_p_vips__VDisplay", "vips::VDisplay *", 0, 0, (void*)0, 0};
81807 -static swig_type_info _swigt__p_vips__VError = {"_p_vips__VError", "vips::VError *", 0, 0, (void*)0, 0};
81808 -static swig_type_info _swigt__p_vips__VIMask = {"_p_vips__VIMask", "vips::VIMask *", 0, 0, (void*)0, 0};
81809 -static swig_type_info _swigt__p_vips__VImage = {"_p_vips__VImage", "vips::VImage *|std::vector< vips::VImage >::value_type *", 0, 0, (void*)0, 0};
81810 -static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};
81811 -
81812 -static swig_type_info *swig_type_initial[] = {
81813 - &_swigt__p_GType,
81814 - &_swigt__p_VBuffer,
81815 - &_swigt__p__VipsImage,
81816 - &_swigt__p_allocator_type,
81817 - &_swigt__p_char,
81818 - &_swigt__p_difference_type,
81819 - &_swigt__p_double,
81820 - &_swigt__p_float,
81821 - &_swigt__p_gboolean,
81822 - &_swigt__p_int,
81823 - &_swigt__p_matrix,
81824 - &_swigt__p_p_PyObject,
81825 - &_swigt__p_p_char,
81826 - &_swigt__p_size_t,
81827 - &_swigt__p_size_type,
81828 - &_swigt__p_std__allocatorT_double_t,
81829 - &_swigt__p_std__allocatorT_int_t,
81830 - &_swigt__p_std__allocatorT_vips__VImage_t,
81831 - &_swigt__p_std__invalid_argument,
81832 - &_swigt__p_std__vectorT__Tp__Alloc_t,
81833 - &_swigt__p_std__vectorT_double_std__allocatorT_double_t_t,
81834 - &_swigt__p_std__vectorT_int_std__allocatorT_int_t_t,
81835 - &_swigt__p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t,
81836 - &_swigt__p_swig__SwigPyIterator,
81837 - &_swigt__p_value_type,
81838 - &_swigt__p_vips__VDMask,
81839 - &_swigt__p_vips__VDisplay,
81840 - &_swigt__p_vips__VError,
81841 - &_swigt__p_vips__VIMask,
81842 - &_swigt__p_vips__VImage,
81843 - &_swigt__p_void,
81844 -};
81845 -
81846 -static swig_cast_info _swigc__p_GType[] = { {&_swigt__p_GType, 0, 0, 0},{0, 0, 0, 0}};
81847 -static swig_cast_info _swigc__p_VBuffer[] = { {&_swigt__p_VBuffer, 0, 0, 0},{0, 0, 0, 0}};
81848 -static swig_cast_info _swigc__p__VipsImage[] = { {&_swigt__p__VipsImage, 0, 0, 0},{0, 0, 0, 0}};
81849 -static swig_cast_info _swigc__p_allocator_type[] = { {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}};
81850 -static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
81851 -static swig_cast_info _swigc__p_difference_type[] = { {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}};
81852 -static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
81853 -static swig_cast_info _swigc__p_float[] = { {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
81854 -static swig_cast_info _swigc__p_gboolean[] = { {&_swigt__p_gboolean, 0, 0, 0},{0, 0, 0, 0}};
81855 -static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
81856 -static swig_cast_info _swigc__p_matrix[] = { {&_swigt__p_matrix, 0, 0, 0},{0, 0, 0, 0}};
81857 -static swig_cast_info _swigc__p_p_PyObject[] = { {&_swigt__p_p_PyObject, 0, 0, 0},{0, 0, 0, 0}};
81858 -static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
81859 -static swig_cast_info _swigc__p_size_t[] = { {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}};
81860 -static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}};
81861 -static swig_cast_info _swigc__p_std__allocatorT_double_t[] = { {&_swigt__p_std__allocatorT_double_t, 0, 0, 0},{0, 0, 0, 0}};
81862 -static swig_cast_info _swigc__p_std__allocatorT_int_t[] = { {&_swigt__p_std__allocatorT_int_t, 0, 0, 0},{0, 0, 0, 0}};
81863 -static swig_cast_info _swigc__p_std__allocatorT_vips__VImage_t[] = { {&_swigt__p_std__allocatorT_vips__VImage_t, 0, 0, 0},{0, 0, 0, 0}};
81864 -static swig_cast_info _swigc__p_std__invalid_argument[] = { {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}};
81865 -static swig_cast_info _swigc__p_std__vectorT__Tp__Alloc_t[] = { {&_swigt__p_std__vectorT__Tp__Alloc_t, 0, 0, 0},{0, 0, 0, 0}};
81866 -static swig_cast_info _swigc__p_std__vectorT_double_std__allocatorT_double_t_t[] = { {&_swigt__p_std__vectorT_double_std__allocatorT_double_t_t, 0, 0, 0},{0, 0, 0, 0}};
81867 -static swig_cast_info _swigc__p_std__vectorT_int_std__allocatorT_int_t_t[] = { {&_swigt__p_std__vectorT_int_std__allocatorT_int_t_t, 0, 0, 0},{0, 0, 0, 0}};
81868 -static swig_cast_info _swigc__p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t[] = { {&_swigt__p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0, 0, 0},{0, 0, 0, 0}};
81869 -static swig_cast_info _swigc__p_swig__SwigPyIterator[] = { {&_swigt__p_swig__SwigPyIterator, 0, 0, 0},{0, 0, 0, 0}};
81870 -static swig_cast_info _swigc__p_value_type[] = { {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}};
81871 -static swig_cast_info _swigc__p_vips__VDMask[] = { {&_swigt__p_vips__VDMask, 0, 0, 0},{0, 0, 0, 0}};
81872 -static swig_cast_info _swigc__p_vips__VDisplay[] = { {&_swigt__p_vips__VDisplay, 0, 0, 0},{0, 0, 0, 0}};
81873 -static swig_cast_info _swigc__p_vips__VError[] = { {&_swigt__p_vips__VError, 0, 0, 0},{0, 0, 0, 0}};
81874 -static swig_cast_info _swigc__p_vips__VIMask[] = { {&_swigt__p_vips__VIMask, 0, 0, 0},{0, 0, 0, 0}};
81875 -static swig_cast_info _swigc__p_vips__VImage[] = { {&_swigt__p_vips__VImage, 0, 0, 0},{0, 0, 0, 0}};
81876 -static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
81877 -
81878 -static swig_cast_info *swig_cast_initial[] = {
81879 - _swigc__p_GType,
81880 - _swigc__p_VBuffer,
81881 - _swigc__p__VipsImage,
81882 - _swigc__p_allocator_type,
81883 - _swigc__p_char,
81884 - _swigc__p_difference_type,
81885 - _swigc__p_double,
81886 - _swigc__p_float,
81887 - _swigc__p_gboolean,
81888 - _swigc__p_int,
81889 - _swigc__p_matrix,
81890 - _swigc__p_p_PyObject,
81891 - _swigc__p_p_char,
81892 - _swigc__p_size_t,
81893 - _swigc__p_size_type,
81894 - _swigc__p_std__allocatorT_double_t,
81895 - _swigc__p_std__allocatorT_int_t,
81896 - _swigc__p_std__allocatorT_vips__VImage_t,
81897 - _swigc__p_std__invalid_argument,
81898 - _swigc__p_std__vectorT__Tp__Alloc_t,
81899 - _swigc__p_std__vectorT_double_std__allocatorT_double_t_t,
81900 - _swigc__p_std__vectorT_int_std__allocatorT_int_t_t,
81901 - _swigc__p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t,
81902 - _swigc__p_swig__SwigPyIterator,
81903 - _swigc__p_value_type,
81904 - _swigc__p_vips__VDMask,
81905 - _swigc__p_vips__VDisplay,
81906 - _swigc__p_vips__VError,
81907 - _swigc__p_vips__VIMask,
81908 - _swigc__p_vips__VImage,
81909 - _swigc__p_void,
81910 -};
81911 -
81912 -
81913 -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
81914 -
81915 -static swig_const_info swig_const_table[] = {
81916 -{0, 0, 0, 0.0, 0, 0}};
81917 -
81918 -#ifdef __cplusplus
81919 -}
81920 -#endif
81921 -/* -----------------------------------------------------------------------------
81922 - * Type initialization:
81923 - * This problem is tough by the requirement that no dynamic
81924 - * memory is used. Also, since swig_type_info structures store pointers to
81925 - * swig_cast_info structures and swig_cast_info structures store pointers back
81926 - * to swig_type_info structures, we need some lookup code at initialization.
81927 - * The idea is that swig generates all the structures that are needed.
81928 - * The runtime then collects these partially filled structures.
81929 - * The SWIG_InitializeModule function takes these initial arrays out of
81930 - * swig_module, and does all the lookup, filling in the swig_module.types
81931 - * array with the correct data and linking the correct swig_cast_info
81932 - * structures together.
81933 - *
81934 - * The generated swig_type_info structures are assigned staticly to an initial
81935 - * array. We just loop through that array, and handle each type individually.
81936 - * First we lookup if this type has been already loaded, and if so, use the
81937 - * loaded structure instead of the generated one. Then we have to fill in the
81938 - * cast linked list. The cast data is initially stored in something like a
81939 - * two-dimensional array. Each row corresponds to a type (there are the same
81940 - * number of rows as there are in the swig_type_initial array). Each entry in
81941 - * a column is one of the swig_cast_info structures for that type.
81942 - * The cast_initial array is actually an array of arrays, because each row has
81943 - * a variable number of columns. So to actually build the cast linked list,
81944 - * we find the array of casts associated with the type, and loop through it
81945 - * adding the casts to the list. The one last trick we need to do is making
81946 - * sure the type pointer in the swig_cast_info struct is correct.
81947 - *
81948 - * First off, we lookup the cast->type name to see if it is already loaded.
81949 - * There are three cases to handle:
81950 - * 1) If the cast->type has already been loaded AND the type we are adding
81951 - * casting info to has not been loaded (it is in this module), THEN we
81952 - * replace the cast->type pointer with the type pointer that has already
81953 - * been loaded.
81954 - * 2) If BOTH types (the one we are adding casting info to, and the
81955 - * cast->type) are loaded, THEN the cast info has already been loaded by
81956 - * the previous module so we just ignore it.
81957 - * 3) Finally, if cast->type has not already been loaded, then we add that
81958 - * swig_cast_info to the linked list (because the cast->type) pointer will
81959 - * be correct.
81960 - * ----------------------------------------------------------------------------- */
81961 -
81962 -#ifdef __cplusplus
81963 -extern "C" {
81964 -#if 0
81965 -} /* c-mode */
81966 -#endif
81967 -#endif
81968 -
81969 -#if 0
81970 -#define SWIGRUNTIME_DEBUG
81971 -#endif
81972 -
81973 -
81974 -SWIGRUNTIME void
81975 -SWIG_InitializeModule(void *clientdata) {
81976 - size_t i;
81977 - swig_module_info *module_head, *iter;
81978 - int found, init;
81979 -
81980 - /* check to see if the circular list has been setup, if not, set it up */
81981 - if (swig_module.next==0) {
81982 - /* Initialize the swig_module */
81983 - swig_module.type_initial = swig_type_initial;
81984 - swig_module.cast_initial = swig_cast_initial;
81985 - swig_module.next = &swig_module;
81986 - init = 1;
81987 - } else {
81988 - init = 0;
81989 - }
81990 -
81991 - /* Try and load any already created modules */
81992 - module_head = SWIG_GetModule(clientdata);
81993 - if (!module_head) {
81994 - /* This is the first module loaded for this interpreter */
81995 - /* so set the swig module into the interpreter */
81996 - SWIG_SetModule(clientdata, &swig_module);
81997 - module_head = &swig_module;
81998 - } else {
81999 - /* the interpreter has loaded a SWIG module, but has it loaded this one? */
82000 - found=0;
82001 - iter=module_head;
82002 - do {
82003 - if (iter==&swig_module) {
82004 - found=1;
82005 - break;
82006 - }
82007 - iter=iter->next;
82008 - } while (iter!= module_head);
82009 -
82010 - /* if the is found in the list, then all is done and we may leave */
82011 - if (found) return;
82012 - /* otherwise we must add out module into the list */
82013 - swig_module.next = module_head->next;
82014 - module_head->next = &swig_module;
82015 - }
82016 -
82017 - /* When multiple interpeters are used, a module could have already been initialized in
82018 - a different interpreter, but not yet have a pointer in this interpreter.
82019 - In this case, we do not want to continue adding types... everything should be
82020 - set up already */
82021 - if (init == 0) return;
82022 -
82023 - /* Now work on filling in swig_module.types */
82024 -#ifdef SWIGRUNTIME_DEBUG
82025 - printf("SWIG_InitializeModule: size %d\n", swig_module.size);
82026 -#endif
82027 - for (i = 0; i < swig_module.size; ++i) {
82028 - swig_type_info *type = 0;
82029 - swig_type_info *ret;
82030 - swig_cast_info *cast;
82031 -
82032 -#ifdef SWIGRUNTIME_DEBUG
82033 - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
82034 -#endif
82035 -
82036 - /* if there is another module already loaded */
82037 - if (swig_module.next != &swig_module) {
82038 - type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
82039 - }
82040 - if (type) {
82041 - /* Overwrite clientdata field */
82042 -#ifdef SWIGRUNTIME_DEBUG
82043 - printf("SWIG_InitializeModule: found type %s\n", type->name);
82044 -#endif
82045 - if (swig_module.type_initial[i]->clientdata) {
82046 - type->clientdata = swig_module.type_initial[i]->clientdata;
82047 -#ifdef SWIGRUNTIME_DEBUG
82048 - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
82049 -#endif
82050 - }
82051 - } else {
82052 - type = swig_module.type_initial[i];
82053 - }
82054 -
82055 - /* Insert casting types */
82056 - cast = swig_module.cast_initial[i];
82057 - while (cast->type) {
82058 - /* Don't need to add information already in the list */
82059 - ret = 0;
82060 -#ifdef SWIGRUNTIME_DEBUG
82061 - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
82062 -#endif
82063 - if (swig_module.next != &swig_module) {
82064 - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
82065 -#ifdef SWIGRUNTIME_DEBUG
82066 - if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
82067 -#endif
82068 - }
82069 - if (ret) {
82070 - if (type == swig_module.type_initial[i]) {
82071 -#ifdef SWIGRUNTIME_DEBUG
82072 - printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
82073 -#endif
82074 - cast->type = ret;
82075 - ret = 0;
82076 - } else {
82077 - /* Check for casting already in the list */
82078 - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
82079 -#ifdef SWIGRUNTIME_DEBUG
82080 - if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
82081 -#endif
82082 - if (!ocast) ret = 0;
82083 - }
82084 - }
82085 -
82086 - if (!ret) {
82087 -#ifdef SWIGRUNTIME_DEBUG
82088 - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
82089 -#endif
82090 - if (type->cast) {
82091 - type->cast->prev = cast;
82092 - cast->next = type->cast;
82093 - }
82094 - type->cast = cast;
82095 - }
82096 - cast++;
82097 - }
82098 - /* Set entry in modules->types array equal to the type */
82099 - swig_module.types[i] = type;
82100 - }
82101 - swig_module.types[i] = 0;
82102 -
82103 -#ifdef SWIGRUNTIME_DEBUG
82104 - printf("**** SWIG_InitializeModule: Cast List ******\n");
82105 - for (i = 0; i < swig_module.size; ++i) {
82106 - int j = 0;
82107 - swig_cast_info *cast = swig_module.cast_initial[i];
82108 - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
82109 - while (cast->type) {
82110 - printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
82111 - cast++;
82112 - ++j;
82113 - }
82114 - printf("---- Total casts: %d\n",j);
82115 - }
82116 - printf("**** SWIG_InitializeModule: Cast List ******\n");
82117 -#endif
82118 -}
82119 -
82120 -/* This function will propagate the clientdata field of type to
82121 -* any new swig_type_info structures that have been added into the list
82122 -* of equivalent types. It is like calling
82123 -* SWIG_TypeClientData(type, clientdata) a second time.
82124 -*/
82125 -SWIGRUNTIME void
82126 -SWIG_PropagateClientData(void) {
82127 - size_t i;
82128 - swig_cast_info *equiv;
82129 - static int init_run = 0;
82130 -
82131 - if (init_run) return;
82132 - init_run = 1;
82133 -
82134 - for (i = 0; i < swig_module.size; i++) {
82135 - if (swig_module.types[i]->clientdata) {
82136 - equiv = swig_module.types[i]->cast;
82137 - while (equiv) {
82138 - if (!equiv->converter) {
82139 - if (equiv->type && !equiv->type->clientdata)
82140 - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
82141 - }
82142 - equiv = equiv->next;
82143 - }
82144 - }
82145 - }
82146 -}
82147 -
82148 -#ifdef __cplusplus
82149 -#if 0
82150 -{
82151 - /* c-mode */
82152 -#endif
82153 -}
82154 -#endif
82155 -
82156 -
82157 -
82158 -#ifdef __cplusplus
82159 -extern "C" {
82160 -#endif
82161 -
82162 - /* Python-specific SWIG API */
82163 -#define SWIG_newvarlink() SWIG_Python_newvarlink()
82164 -#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
82165 -#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
82166 -
82167 - /* -----------------------------------------------------------------------------
82168 - * global variable support code.
82169 - * ----------------------------------------------------------------------------- */
82170 -
82171 - typedef struct swig_globalvar {
82172 - char *name; /* Name of global variable */
82173 - PyObject *(*get_attr)(void); /* Return the current value */
82174 - int (*set_attr)(PyObject *); /* Set the value */
82175 - struct swig_globalvar *next;
82176 - } swig_globalvar;
82177 -
82178 - typedef struct swig_varlinkobject {
82179 - PyObject_HEAD
82180 - swig_globalvar *vars;
82181 - } swig_varlinkobject;
82182 -
82183 - SWIGINTERN PyObject *
82184 - swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
82185 -#if PY_VERSION_HEX >= 0x03000000
82186 - return PyUnicode_InternFromString("<Swig global variables>");
82187 -#else
82188 - return PyString_FromString("<Swig global variables>");
82189 -#endif
82190 - }
82191 -
82192 - SWIGINTERN PyObject *
82193 - swig_varlink_str(swig_varlinkobject *v) {
82194 -#if PY_VERSION_HEX >= 0x03000000
82195 - PyObject *str = PyUnicode_InternFromString("(");
82196 - PyObject *tail;
82197 - PyObject *joined;
82198 - swig_globalvar *var;
82199 - for (var = v->vars; var; var=var->next) {
82200 - tail = PyUnicode_FromString(var->name);
82201 - joined = PyUnicode_Concat(str, tail);
82202 - Py_DecRef(str);
82203 - Py_DecRef(tail);
82204 - str = joined;
82205 - if (var->next) {
82206 - tail = PyUnicode_InternFromString(", ");
82207 - joined = PyUnicode_Concat(str, tail);
82208 - Py_DecRef(str);
82209 - Py_DecRef(tail);
82210 - str = joined;
82211 - }
82212 - }
82213 - tail = PyUnicode_InternFromString(")");
82214 - joined = PyUnicode_Concat(str, tail);
82215 - Py_DecRef(str);
82216 - Py_DecRef(tail);
82217 - str = joined;
82218 -#else
82219 - PyObject *str = PyString_FromString("(");
82220 - swig_globalvar *var;
82221 - for (var = v->vars; var; var=var->next) {
82222 - PyString_ConcatAndDel(&str,PyString_FromString(var->name));
82223 - if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
82224 - }
82225 - PyString_ConcatAndDel(&str,PyString_FromString(")"));
82226 -#endif
82227 - return str;
82228 - }
82229 -
82230 - SWIGINTERN int
82231 - swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
82232 - char *tmp;
82233 - PyObject *str = swig_varlink_str(v);
82234 - fprintf(fp,"Swig global variables ");
82235 - fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
82236 - SWIG_Python_str_DelForPy3(tmp);
82237 - Py_DECREF(str);
82238 - return 0;
82239 - }
82240 -
82241 - SWIGINTERN void
82242 - swig_varlink_dealloc(swig_varlinkobject *v) {
82243 - swig_globalvar *var = v->vars;
82244 - while (var) {
82245 - swig_globalvar *n = var->next;
82246 - free(var->name);
82247 - free(var);
82248 - var = n;
82249 - }
82250 - }
82251 -
82252 - SWIGINTERN PyObject *
82253 - swig_varlink_getattr(swig_varlinkobject *v, char *n) {
82254 - PyObject *res = NULL;
82255 - swig_globalvar *var = v->vars;
82256 - while (var) {
82257 - if (strcmp(var->name,n) == 0) {
82258 - res = (*var->get_attr)();
82259 - break;
82260 - }
82261 - var = var->next;
82262 - }
82263 - if (res == NULL && !PyErr_Occurred()) {
82264 - PyErr_SetString(PyExc_NameError,"Unknown C global variable");
82265 - }
82266 - return res;
82267 - }
82268 -
82269 - SWIGINTERN int
82270 - swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
82271 - int res = 1;
82272 - swig_globalvar *var = v->vars;
82273 - while (var) {
82274 - if (strcmp(var->name,n) == 0) {
82275 - res = (*var->set_attr)(p);
82276 - break;
82277 - }
82278 - var = var->next;
82279 - }
82280 - if (res == 1 && !PyErr_Occurred()) {
82281 - PyErr_SetString(PyExc_NameError,"Unknown C global variable");
82282 - }
82283 - return res;
82284 - }
82285 -
82286 - SWIGINTERN PyTypeObject*
82287 - swig_varlink_type(void) {
82288 - static char varlink__doc__[] = "Swig var link object";
82289 - static PyTypeObject varlink_type;
82290 - static int type_init = 0;
82291 - if (!type_init) {
82292 - const PyTypeObject tmp = {
82293 - /* PyObject header changed in Python 3 */
82294 -#if PY_VERSION_HEX >= 0x03000000
82295 - PyVarObject_HEAD_INIT(NULL, 0)
82296 -#else
82297 - PyObject_HEAD_INIT(NULL)
82298 - 0, /* ob_size */
82299 -#endif
82300 - (char *)"swigvarlink", /* tp_name */
82301 - sizeof(swig_varlinkobject), /* tp_basicsize */
82302 - 0, /* tp_itemsize */
82303 - (destructor) swig_varlink_dealloc, /* tp_dealloc */
82304 - (printfunc) swig_varlink_print, /* tp_print */
82305 - (getattrfunc) swig_varlink_getattr, /* tp_getattr */
82306 - (setattrfunc) swig_varlink_setattr, /* tp_setattr */
82307 - 0, /* tp_compare */
82308 - (reprfunc) swig_varlink_repr, /* tp_repr */
82309 - 0, /* tp_as_number */
82310 - 0, /* tp_as_sequence */
82311 - 0, /* tp_as_mapping */
82312 - 0, /* tp_hash */
82313 - 0, /* tp_call */
82314 - (reprfunc) swig_varlink_str, /* tp_str */
82315 - 0, /* tp_getattro */
82316 - 0, /* tp_setattro */
82317 - 0, /* tp_as_buffer */
82318 - 0, /* tp_flags */
82319 - varlink__doc__, /* tp_doc */
82320 - 0, /* tp_traverse */
82321 - 0, /* tp_clear */
82322 - 0, /* tp_richcompare */
82323 - 0, /* tp_weaklistoffset */
82324 -#if PY_VERSION_HEX >= 0x02020000
82325 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
82326 -#endif
82327 -#if PY_VERSION_HEX >= 0x02030000
82328 - 0, /* tp_del */
82329 -#endif
82330 -#if PY_VERSION_HEX >= 0x02060000
82331 - 0, /* tp_version */
82332 -#endif
82333 -#ifdef COUNT_ALLOCS
82334 - 0,0,0,0 /* tp_alloc -> tp_next */
82335 -#endif
82336 - };
82337 - varlink_type = tmp;
82338 - type_init = 1;
82339 -#if PY_VERSION_HEX < 0x02020000
82340 - varlink_type.ob_type = &PyType_Type;
82341 -#else
82342 - if (PyType_Ready(&varlink_type) < 0)
82343 - return NULL;
82344 -#endif
82345 - }
82346 - return &varlink_type;
82347 - }
82348 -
82349 - /* Create a variable linking object for use later */
82350 - SWIGINTERN PyObject *
82351 - SWIG_Python_newvarlink(void) {
82352 - swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
82353 - if (result) {
82354 - result->vars = 0;
82355 - }
82356 - return ((PyObject*) result);
82357 - }
82358 -
82359 - SWIGINTERN void
82360 - SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
82361 - swig_varlinkobject *v = (swig_varlinkobject *) p;
82362 - swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
82363 - if (gv) {
82364 - size_t size = strlen(name)+1;
82365 - gv->name = (char *)malloc(size);
82366 - if (gv->name) {
82367 - strncpy(gv->name,name,size);
82368 - gv->get_attr = get_attr;
82369 - gv->set_attr = set_attr;
82370 - gv->next = v->vars;
82371 - }
82372 - }
82373 - v->vars = gv;
82374 - }
82375 -
82376 - SWIGINTERN PyObject *
82377 - SWIG_globals(void) {
82378 - static PyObject *_SWIG_globals = 0;
82379 - if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
82380 - return _SWIG_globals;
82381 - }
82382 -
82383 - /* -----------------------------------------------------------------------------
82384 - * constants/methods manipulation
82385 - * ----------------------------------------------------------------------------- */
82386 -
82387 - /* Install Constants */
82388 - SWIGINTERN void
82389 - SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
82390 - PyObject *obj = 0;
82391 - size_t i;
82392 - for (i = 0; constants[i].type; ++i) {
82393 - switch(constants[i].type) {
82394 - case SWIG_PY_POINTER:
82395 - obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
82396 - break;
82397 - case SWIG_PY_BINARY:
82398 - obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
82399 - break;
82400 - default:
82401 - obj = 0;
82402 - break;
82403 - }
82404 - if (obj) {
82405 - PyDict_SetItemString(d, constants[i].name, obj);
82406 - Py_DECREF(obj);
82407 - }
82408 - }
82409 - }
82410 -
82411 - /* -----------------------------------------------------------------------------*/
82412 - /* Fix SwigMethods to carry the callback ptrs when needed */
82413 - /* -----------------------------------------------------------------------------*/
82414 -
82415 - SWIGINTERN void
82416 - SWIG_Python_FixMethods(PyMethodDef *methods,
82417 - swig_const_info *const_table,
82418 - swig_type_info **types,
82419 - swig_type_info **types_initial) {
82420 - size_t i;
82421 - for (i = 0; methods[i].ml_name; ++i) {
82422 - const char *c = methods[i].ml_doc;
82423 - if (c && (c = strstr(c, "swig_ptr: "))) {
82424 - int j;
82425 - swig_const_info *ci = 0;
82426 - const char *name = c + 10;
82427 - for (j = 0; const_table[j].type; ++j) {
82428 - if (strncmp(const_table[j].name, name,
82429 - strlen(const_table[j].name)) == 0) {
82430 - ci = &(const_table[j]);
82431 - break;
82432 - }
82433 - }
82434 - if (ci) {
82435 - void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
82436 - if (ptr) {
82437 - size_t shift = (ci->ptype) - types;
82438 - swig_type_info *ty = types_initial[shift];
82439 - size_t ldoc = (c - methods[i].ml_doc);
82440 - size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
82441 - char *ndoc = (char*)malloc(ldoc + lptr + 10);
82442 - if (ndoc) {
82443 - char *buff = ndoc;
82444 - strncpy(buff, methods[i].ml_doc, ldoc);
82445 - buff += ldoc;
82446 - strncpy(buff, "swig_ptr: ", 10);
82447 - buff += 10;
82448 - SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
82449 - methods[i].ml_doc = ndoc;
82450 - }
82451 - }
82452 - }
82453 - }
82454 - }
82455 - }
82456 -
82457 -#ifdef __cplusplus
82458 -}
82459 -#endif
82460 -
82461 -/* -----------------------------------------------------------------------------*
82462 - * Partial Init method
82463 - * -----------------------------------------------------------------------------*/
82464 -
82465 -#ifdef __cplusplus
82466 -extern "C"
82467 -#endif
82468 -
82469 -SWIGEXPORT
82470 -#if PY_VERSION_HEX >= 0x03000000
82471 -PyObject*
82472 -#else
82473 -void
82474 -#endif
82475 -SWIG_init(void) {
82476 - PyObject *m, *d, *md;
82477 -#if PY_VERSION_HEX >= 0x03000000
82478 - static struct PyModuleDef SWIG_module = {
82479 -# if PY_VERSION_HEX >= 0x03020000
82480 - PyModuleDef_HEAD_INIT,
82481 -# else
82482 - {
82483 - PyObject_HEAD_INIT(NULL)
82484 - NULL, /* m_init */
82485 - 0, /* m_index */
82486 - NULL, /* m_copy */
82487 - },
82488 -# endif
82489 - (char *) SWIG_name,
82490 - NULL,
82491 - -1,
82492 - SwigMethods,
82493 - NULL,
82494 - NULL,
82495 - NULL,
82496 - NULL
82497 - };
82498 -#endif
82499 -
82500 -#if defined(SWIGPYTHON_BUILTIN)
82501 - static SwigPyClientData SwigPyObject_clientdata = {
82502 - 0, 0, 0, 0, 0, 0, 0
82503 - };
82504 - static PyGetSetDef this_getset_def = {
82505 - (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
82506 - };
82507 - static SwigPyGetSet thisown_getset_closure = {
82508 - (PyCFunction) SwigPyObject_own,
82509 - (PyCFunction) SwigPyObject_own
82510 - };
82511 - static PyGetSetDef thisown_getset_def = {
82512 - (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
82513 - };
82514 - PyObject *metatype_args;
82515 - PyTypeObject *builtin_pytype;
82516 - int builtin_base_count;
82517 - swig_type_info *builtin_basetype;
82518 - PyObject *tuple;
82519 - PyGetSetDescrObject *static_getset;
82520 - PyTypeObject *metatype;
82521 - SwigPyClientData *cd;
82522 - PyObject *public_interface, *public_symbol;
82523 - PyObject *this_descr;
82524 - PyObject *thisown_descr;
82525 - int i;
82526 -
82527 - (void)builtin_pytype;
82528 - (void)builtin_base_count;
82529 - (void)builtin_basetype;
82530 - (void)tuple;
82531 - (void)static_getset;
82532 -
82533 - /* metatype is used to implement static member variables. */
82534 - metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
82535 - assert(metatype_args);
82536 - metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
82537 - assert(metatype);
82538 - Py_DECREF(metatype_args);
82539 - metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
82540 - assert(PyType_Ready(metatype) >= 0);
82541 -#endif
82542 -
82543 - /* Fix SwigMethods to carry the callback ptrs when needed */
82544 - SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
82545 -
82546 -#if PY_VERSION_HEX >= 0x03000000
82547 - m = PyModule_Create(&SWIG_module);
82548 -#else
82549 - m = Py_InitModule((char *) SWIG_name, SwigMethods);
82550 -#endif
82551 - md = d = PyModule_GetDict(m);
82552 - (void)md;
82553 -
82554 - SWIG_InitializeModule(0);
82555 -
82556 -#ifdef SWIGPYTHON_BUILTIN
82557 - SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
82558 - assert(SwigPyObject_stype);
82559 - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
82560 - if (!cd) {
82561 - SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
82562 - SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
82563 - } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
82564 - PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
82565 -# if PY_VERSION_HEX >= 0x03000000
82566 - return NULL;
82567 -# else
82568 - return;
82569 -# endif
82570 - }
82571 -
82572 - /* All objects have a 'this' attribute */
82573 - this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
82574 - (void)this_descr;
82575 -
82576 - /* All objects have a 'thisown' attribute */
82577 - thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
82578 - (void)thisown_descr;
82579 -
82580 - public_interface = PyList_New(0);
82581 - public_symbol = 0;
82582 - (void)public_symbol;
82583 -
82584 - PyDict_SetItemString(md, "__all__", public_interface);
82585 - Py_DECREF(public_interface);
82586 - for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
82587 - SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
82588 - for (i = 0; swig_const_table[i].name != 0; ++i)
82589 - SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
82590 -#endif
82591 -
82592 - SWIG_InstallConstants(d,swig_const_table);
82593 -
82594 - SWIG_Python_SetConstant(d, "VImage_MULTIBAND",SWIG_From_int(static_cast< int >(vips::VImage::MULTIBAND)));
82595 - SWIG_Python_SetConstant(d, "VImage_B_W",SWIG_From_int(static_cast< int >(vips::VImage::B_W)));
82596 - SWIG_Python_SetConstant(d, "VImage_LUMINACE",SWIG_From_int(static_cast< int >(vips::VImage::LUMINACE)));
82597 - SWIG_Python_SetConstant(d, "VImage_XRAY",SWIG_From_int(static_cast< int >(vips::VImage::XRAY)));
82598 - SWIG_Python_SetConstant(d, "VImage_IR",SWIG_From_int(static_cast< int >(vips::VImage::IR)));
82599 - SWIG_Python_SetConstant(d, "VImage_YUV",SWIG_From_int(static_cast< int >(vips::VImage::YUV)));
82600 - SWIG_Python_SetConstant(d, "VImage_RED_ONLY",SWIG_From_int(static_cast< int >(vips::VImage::RED_ONLY)));
82601 - SWIG_Python_SetConstant(d, "VImage_GREEN_ONLY",SWIG_From_int(static_cast< int >(vips::VImage::GREEN_ONLY)));
82602 - SWIG_Python_SetConstant(d, "VImage_BLUE_ONLY",SWIG_From_int(static_cast< int >(vips::VImage::BLUE_ONLY)));
82603 - SWIG_Python_SetConstant(d, "VImage_POWER_SPECTRUM",SWIG_From_int(static_cast< int >(vips::VImage::POWER_SPECTRUM)));
82604 - SWIG_Python_SetConstant(d, "VImage_HISTOGRAM",SWIG_From_int(static_cast< int >(vips::VImage::HISTOGRAM)));
82605 - SWIG_Python_SetConstant(d, "VImage_LUT",SWIG_From_int(static_cast< int >(vips::VImage::LUT)));
82606 - SWIG_Python_SetConstant(d, "VImage_XYZ",SWIG_From_int(static_cast< int >(vips::VImage::XYZ)));
82607 - SWIG_Python_SetConstant(d, "VImage_LAB",SWIG_From_int(static_cast< int >(vips::VImage::LAB)));
82608 - SWIG_Python_SetConstant(d, "VImage_CMC",SWIG_From_int(static_cast< int >(vips::VImage::CMC)));
82609 - SWIG_Python_SetConstant(d, "VImage_CMYK",SWIG_From_int(static_cast< int >(vips::VImage::CMYK)));
82610 - SWIG_Python_SetConstant(d, "VImage_LABQ",SWIG_From_int(static_cast< int >(vips::VImage::LABQ)));
82611 - SWIG_Python_SetConstant(d, "VImage_RGB",SWIG_From_int(static_cast< int >(vips::VImage::RGB)));
82612 - SWIG_Python_SetConstant(d, "VImage_UCS",SWIG_From_int(static_cast< int >(vips::VImage::UCS)));
82613 - SWIG_Python_SetConstant(d, "VImage_LCH",SWIG_From_int(static_cast< int >(vips::VImage::LCH)));
82614 - SWIG_Python_SetConstant(d, "VImage_LABS",SWIG_From_int(static_cast< int >(vips::VImage::LABS)));
82615 - SWIG_Python_SetConstant(d, "VImage_sRGB",SWIG_From_int(static_cast< int >(vips::VImage::sRGB)));
82616 - SWIG_Python_SetConstant(d, "VImage_YXY",SWIG_From_int(static_cast< int >(vips::VImage::YXY)));
82617 - SWIG_Python_SetConstant(d, "VImage_FOURIER",SWIG_From_int(static_cast< int >(vips::VImage::FOURIER)));
82618 - SWIG_Python_SetConstant(d, "VImage_RGB16",SWIG_From_int(static_cast< int >(vips::VImage::RGB16)));
82619 - SWIG_Python_SetConstant(d, "VImage_GREY16",SWIG_From_int(static_cast< int >(vips::VImage::GREY16)));
82620 - SWIG_Python_SetConstant(d, "VImage_FMTNOTSET",SWIG_From_int(static_cast< int >(vips::VImage::FMTNOTSET)));
82621 - SWIG_Python_SetConstant(d, "VImage_FMTUCHAR",SWIG_From_int(static_cast< int >(vips::VImage::FMTUCHAR)));
82622 - SWIG_Python_SetConstant(d, "VImage_FMTCHAR",SWIG_From_int(static_cast< int >(vips::VImage::FMTCHAR)));
82623 - SWIG_Python_SetConstant(d, "VImage_FMTUSHORT",SWIG_From_int(static_cast< int >(vips::VImage::FMTUSHORT)));
82624 - SWIG_Python_SetConstant(d, "VImage_FMTSHORT",SWIG_From_int(static_cast< int >(vips::VImage::FMTSHORT)));
82625 - SWIG_Python_SetConstant(d, "VImage_FMTUINT",SWIG_From_int(static_cast< int >(vips::VImage::FMTUINT)));
82626 - SWIG_Python_SetConstant(d, "VImage_FMTINT",SWIG_From_int(static_cast< int >(vips::VImage::FMTINT)));
82627 - SWIG_Python_SetConstant(d, "VImage_FMTFLOAT",SWIG_From_int(static_cast< int >(vips::VImage::FMTFLOAT)));
82628 - SWIG_Python_SetConstant(d, "VImage_FMTCOMPLEX",SWIG_From_int(static_cast< int >(vips::VImage::FMTCOMPLEX)));
82629 - SWIG_Python_SetConstant(d, "VImage_FMTDOUBLE",SWIG_From_int(static_cast< int >(vips::VImage::FMTDOUBLE)));
82630 - SWIG_Python_SetConstant(d, "VImage_FMTDPCOMPLEX",SWIG_From_int(static_cast< int >(vips::VImage::FMTDPCOMPLEX)));
82631 - SWIG_Python_SetConstant(d, "VImage_NOCODING",SWIG_From_int(static_cast< int >(vips::VImage::NOCODING)));
82632 - SWIG_Python_SetConstant(d, "VImage_COLQUANT",SWIG_From_int(static_cast< int >(vips::VImage::COLQUANT)));
82633 - SWIG_Python_SetConstant(d, "VImage_LABPACK",SWIG_From_int(static_cast< int >(vips::VImage::LABPACK)));
82634 - SWIG_Python_SetConstant(d, "VImage_LABPACK_COMPRESSED",SWIG_From_int(static_cast< int >(vips::VImage::LABPACK_COMPRESSED)));
82635 - SWIG_Python_SetConstant(d, "VImage_RGB_COMPRESSED",SWIG_From_int(static_cast< int >(vips::VImage::RGB_COMPRESSED)));
82636 - SWIG_Python_SetConstant(d, "VImage_LUM_COMPRESSED",SWIG_From_int(static_cast< int >(vips::VImage::LUM_COMPRESSED)));
82637 - SWIG_Python_SetConstant(d, "VImage_RAD",SWIG_From_int(static_cast< int >(vips::VImage::RAD)));
82638 - SWIG_Python_SetConstant(d, "VImage_NO_COMPRESSION",SWIG_From_int(static_cast< int >(vips::VImage::NO_COMPRESSION)));
82639 - SWIG_Python_SetConstant(d, "VImage_TCSF_COMPRESSION",SWIG_From_int(static_cast< int >(vips::VImage::TCSF_COMPRESSION)));
82640 - SWIG_Python_SetConstant(d, "VImage_JPEG_COMPRESSION",SWIG_From_int(static_cast< int >(vips::VImage::JPEG_COMPRESSION)));
82641 -
82642 - {
82643 - Args *args;
82644 -
82645 - args = args_new ();
82646 -
82647 -#ifdef DEBUG
82648 - printf ("on startup:\n");
82649 - args_print (args);
82650 -#endif /*DEBUG*/
82651 -
82652 - if (im_init_world (args->argv[0])) {
82653 - args_free (args);
82654 - vips_fatal ("can't initialise module vips");
82655 - }
82656 -
82657 - /* Now parse any GOptions.
82658 - */
82659 - GError *error = NULL;
82660 - GOptionContext *context;
82661 -
82662 - context = g_option_context_new ("- vips");
82663 - g_option_context_add_group (context, im_get_option_group());
82664 -
82665 - g_option_context_set_ignore_unknown_options (context, TRUE);
82666 - if (!g_option_context_parse (context,
82667 - &args->argc, &args->argv, &error)) {
82668 - g_option_context_free (context);
82669 - args_free (args);
82670 - im_error ("vipsmodule", "%s", error->message);
82671 - g_error_free (error);
82672 - vips_fatal ("can't initialise module vips");
82673 - }
82674 - g_option_context_free (context);
82675 -
82676 -#ifdef DEBUG
82677 - printf ("after parse:\n");
82678 - args_print (args);
82679 -#endif /*DEBUG*/
82680 -
82681 - // Write (possibly) modified argc/argv back again.
82682 - if (args->argv)
82683 - PySys_SetArgv (args->argc, args->argv);
82684 -
82685 - args_free (args);
82686 - }
82687 -
82688 -#if PY_VERSION_HEX >= 0x03000000
82689 - return m;
82690 -#else
82691 - return;
82692 -#endif
82693 -}
82694 -
82695 diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/VImage.py vips-7.38.5/swig/vipsCC/VImage.py
82696 --- vips-7.38.5-vanilla/swig/vipsCC/VImage.py 2014-07-17 23:48:36.208794473 -0400
82697 +++ vips-7.38.5/swig/vipsCC/VImage.py 1969-12-31 19:00:00.000000000 -0500
82698 @@ -1,919 +0,0 @@
82699 -# This file was automatically generated by SWIG (http://www.swig.org).
82700 -# Version 2.0.10
82701 -#
82702 -# Do not make changes to this file unless you know what you are doing--modify
82703 -# the SWIG interface file instead.
82704 -
82705 -
82706 -
82707 -from sys import version_info
82708 -if version_info >= (2,6,0):
82709 - def swig_import_helper():
82710 - from os.path import dirname
82711 - import imp
82712 - fp = None
82713 - try:
82714 - fp, pathname, description = imp.find_module('vimagemodule', [dirname(__file__)])
82715 - except ImportError:
82716 - import vimagemodule
82717 - return vimagemodule
82718 - if fp is not None:
82719 - try:
82720 - _mod = imp.load_module('vimagemodule', fp, pathname, description)
82721 - finally:
82722 - fp.close()
82723 - return _mod
82724 - vimagemodule = swig_import_helper()
82725 - del swig_import_helper
82726 -else:
82727 - import vimagemodule
82728 -del version_info
82729 -try:
82730 - _swig_property = property
82731 -except NameError:
82732 - pass # Python < 2.2 doesn't have 'property'.
82733 -def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
82734 - if (name == "thisown"): return self.this.own(value)
82735 - if (name == "this"):
82736 - if type(value).__name__ == 'SwigPyObject':
82737 - self.__dict__[name] = value
82738 - return
82739 - method = class_type.__swig_setmethods__.get(name,None)
82740 - if method: return method(self,value)
82741 - if (not static):
82742 - self.__dict__[name] = value
82743 - else:
82744 - raise AttributeError("You cannot add attributes to %s" % self)
82745 -
82746 -def _swig_setattr(self,class_type,name,value):
82747 - return _swig_setattr_nondynamic(self,class_type,name,value,0)
82748 -
82749 -def _swig_getattr(self,class_type,name):
82750 - if (name == "thisown"): return self.this.own()
82751 - method = class_type.__swig_getmethods__.get(name,None)
82752 - if method: return method(self)
82753 - raise AttributeError(name)
82754 -
82755 -def _swig_repr(self):
82756 - try: strthis = "proxy of " + self.this.__repr__()
82757 - except: strthis = ""
82758 - return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
82759 -
82760 -try:
82761 - _object = object
82762 - _newclass = 1
82763 -except AttributeError:
82764 - class _object : pass
82765 - _newclass = 0
82766 -
82767 -
82768 -class SwigPyIterator(_object):
82769 - __swig_setmethods__ = {}
82770 - __setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value)
82771 - __swig_getmethods__ = {}
82772 - __getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name)
82773 - def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")
82774 - __repr__ = _swig_repr
82775 - __swig_destroy__ = vimagemodule.delete_SwigPyIterator
82776 - __del__ = lambda self : None;
82777 - def value(self): return vimagemodule.SwigPyIterator_value(self)
82778 - def incr(self, n=1): return vimagemodule.SwigPyIterator_incr(self, n)
82779 - def decr(self, n=1): return vimagemodule.SwigPyIterator_decr(self, n)
82780 - def distance(self, *args): return vimagemodule.SwigPyIterator_distance(self, *args)
82781 - def equal(self, *args): return vimagemodule.SwigPyIterator_equal(self, *args)
82782 - def copy(self): return vimagemodule.SwigPyIterator_copy(self)
82783 - def next(self): return vimagemodule.SwigPyIterator_next(self)
82784 - def __next__(self): return vimagemodule.SwigPyIterator___next__(self)
82785 - def previous(self): return vimagemodule.SwigPyIterator_previous(self)
82786 - def advance(self, *args): return vimagemodule.SwigPyIterator_advance(self, *args)
82787 - def __eq__(self, *args): return vimagemodule.SwigPyIterator___eq__(self, *args)
82788 - def __ne__(self, *args): return vimagemodule.SwigPyIterator___ne__(self, *args)
82789 - def __iadd__(self, *args): return vimagemodule.SwigPyIterator___iadd__(self, *args)
82790 - def __isub__(self, *args): return vimagemodule.SwigPyIterator___isub__(self, *args)
82791 - def __add__(self, *args): return vimagemodule.SwigPyIterator___add__(self, *args)
82792 - def __sub__(self, *args): return vimagemodule.SwigPyIterator___sub__(self, *args)
82793 - def __iter__(self): return self
82794 -SwigPyIterator_swigregister = vimagemodule.SwigPyIterator_swigregister
82795 -SwigPyIterator_swigregister(SwigPyIterator)
82796 -
82797 -import VError
82798 -import VMask
82799 -import VDisplay
82800 -class IntVector(_object):
82801 - __swig_setmethods__ = {}
82802 - __setattr__ = lambda self, name, value: _swig_setattr(self, IntVector, name, value)
82803 - __swig_getmethods__ = {}
82804 - __getattr__ = lambda self, name: _swig_getattr(self, IntVector, name)
82805 - __repr__ = _swig_repr
82806 - def iterator(self): return vimagemodule.IntVector_iterator(self)
82807 - def __iter__(self): return self.iterator()
82808 - def __nonzero__(self): return vimagemodule.IntVector___nonzero__(self)
82809 - def __bool__(self): return vimagemodule.IntVector___bool__(self)
82810 - def __len__(self): return vimagemodule.IntVector___len__(self)
82811 - def pop(self): return vimagemodule.IntVector_pop(self)
82812 - def __getslice__(self, *args): return vimagemodule.IntVector___getslice__(self, *args)
82813 - def __setslice__(self, *args): return vimagemodule.IntVector___setslice__(self, *args)
82814 - def __delslice__(self, *args): return vimagemodule.IntVector___delslice__(self, *args)
82815 - def __delitem__(self, *args): return vimagemodule.IntVector___delitem__(self, *args)
82816 - def __getitem__(self, *args): return vimagemodule.IntVector___getitem__(self, *args)
82817 - def __setitem__(self, *args): return vimagemodule.IntVector___setitem__(self, *args)
82818 - def append(self, *args): return vimagemodule.IntVector_append(self, *args)
82819 - def empty(self): return vimagemodule.IntVector_empty(self)
82820 - def size(self): return vimagemodule.IntVector_size(self)
82821 - def clear(self): return vimagemodule.IntVector_clear(self)
82822 - def swap(self, *args): return vimagemodule.IntVector_swap(self, *args)
82823 - def get_allocator(self): return vimagemodule.IntVector_get_allocator(self)
82824 - def begin(self): return vimagemodule.IntVector_begin(self)
82825 - def end(self): return vimagemodule.IntVector_end(self)
82826 - def rbegin(self): return vimagemodule.IntVector_rbegin(self)
82827 - def rend(self): return vimagemodule.IntVector_rend(self)
82828 - def pop_back(self): return vimagemodule.IntVector_pop_back(self)
82829 - def erase(self, *args): return vimagemodule.IntVector_erase(self, *args)
82830 - def __init__(self, *args):
82831 - this = vimagemodule.new_IntVector(*args)
82832 - try: self.this.append(this)
82833 - except: self.this = this
82834 - def push_back(self, *args): return vimagemodule.IntVector_push_back(self, *args)
82835 - def front(self): return vimagemodule.IntVector_front(self)
82836 - def back(self): return vimagemodule.IntVector_back(self)
82837 - def assign(self, *args): return vimagemodule.IntVector_assign(self, *args)
82838 - def resize(self, *args): return vimagemodule.IntVector_resize(self, *args)
82839 - def insert(self, *args): return vimagemodule.IntVector_insert(self, *args)
82840 - def reserve(self, *args): return vimagemodule.IntVector_reserve(self, *args)
82841 - def capacity(self): return vimagemodule.IntVector_capacity(self)
82842 - __swig_destroy__ = vimagemodule.delete_IntVector
82843 - __del__ = lambda self : None;
82844 -IntVector_swigregister = vimagemodule.IntVector_swigregister
82845 -IntVector_swigregister(IntVector)
82846 -
82847 -class DoubleVector(_object):
82848 - __swig_setmethods__ = {}
82849 - __setattr__ = lambda self, name, value: _swig_setattr(self, DoubleVector, name, value)
82850 - __swig_getmethods__ = {}
82851 - __getattr__ = lambda self, name: _swig_getattr(self, DoubleVector, name)
82852 - __repr__ = _swig_repr
82853 - def iterator(self): return vimagemodule.DoubleVector_iterator(self)
82854 - def __iter__(self): return self.iterator()
82855 - def __nonzero__(self): return vimagemodule.DoubleVector___nonzero__(self)
82856 - def __bool__(self): return vimagemodule.DoubleVector___bool__(self)
82857 - def __len__(self): return vimagemodule.DoubleVector___len__(self)
82858 - def pop(self): return vimagemodule.DoubleVector_pop(self)
82859 - def __getslice__(self, *args): return vimagemodule.DoubleVector___getslice__(self, *args)
82860 - def __setslice__(self, *args): return vimagemodule.DoubleVector___setslice__(self, *args)
82861 - def __delslice__(self, *args): return vimagemodule.DoubleVector___delslice__(self, *args)
82862 - def __delitem__(self, *args): return vimagemodule.DoubleVector___delitem__(self, *args)
82863 - def __getitem__(self, *args): return vimagemodule.DoubleVector___getitem__(self, *args)
82864 - def __setitem__(self, *args): return vimagemodule.DoubleVector___setitem__(self, *args)
82865 - def append(self, *args): return vimagemodule.DoubleVector_append(self, *args)
82866 - def empty(self): return vimagemodule.DoubleVector_empty(self)
82867 - def size(self): return vimagemodule.DoubleVector_size(self)
82868 - def clear(self): return vimagemodule.DoubleVector_clear(self)
82869 - def swap(self, *args): return vimagemodule.DoubleVector_swap(self, *args)
82870 - def get_allocator(self): return vimagemodule.DoubleVector_get_allocator(self)
82871 - def begin(self): return vimagemodule.DoubleVector_begin(self)
82872 - def end(self): return vimagemodule.DoubleVector_end(self)
82873 - def rbegin(self): return vimagemodule.DoubleVector_rbegin(self)
82874 - def rend(self): return vimagemodule.DoubleVector_rend(self)
82875 - def pop_back(self): return vimagemodule.DoubleVector_pop_back(self)
82876 - def erase(self, *args): return vimagemodule.DoubleVector_erase(self, *args)
82877 - def __init__(self, *args):
82878 - this = vimagemodule.new_DoubleVector(*args)
82879 - try: self.this.append(this)
82880 - except: self.this = this
82881 - def push_back(self, *args): return vimagemodule.DoubleVector_push_back(self, *args)
82882 - def front(self): return vimagemodule.DoubleVector_front(self)
82883 - def back(self): return vimagemodule.DoubleVector_back(self)
82884 - def assign(self, *args): return vimagemodule.DoubleVector_assign(self, *args)
82885 - def resize(self, *args): return vimagemodule.DoubleVector_resize(self, *args)
82886 - def insert(self, *args): return vimagemodule.DoubleVector_insert(self, *args)
82887 - def reserve(self, *args): return vimagemodule.DoubleVector_reserve(self, *args)
82888 - def capacity(self): return vimagemodule.DoubleVector_capacity(self)
82889 - __swig_destroy__ = vimagemodule.delete_DoubleVector
82890 - __del__ = lambda self : None;
82891 -DoubleVector_swigregister = vimagemodule.DoubleVector_swigregister
82892 -DoubleVector_swigregister(DoubleVector)
82893 -
82894 -class ImageVector(_object):
82895 - __swig_setmethods__ = {}
82896 - __setattr__ = lambda self, name, value: _swig_setattr(self, ImageVector, name, value)
82897 - __swig_getmethods__ = {}
82898 - __getattr__ = lambda self, name: _swig_getattr(self, ImageVector, name)
82899 - __repr__ = _swig_repr
82900 - def iterator(self): return vimagemodule.ImageVector_iterator(self)
82901 - def __iter__(self): return self.iterator()
82902 - def __nonzero__(self): return vimagemodule.ImageVector___nonzero__(self)
82903 - def __bool__(self): return vimagemodule.ImageVector___bool__(self)
82904 - def __len__(self): return vimagemodule.ImageVector___len__(self)
82905 - def pop(self): return vimagemodule.ImageVector_pop(self)
82906 - def __getslice__(self, *args): return vimagemodule.ImageVector___getslice__(self, *args)
82907 - def __setslice__(self, *args): return vimagemodule.ImageVector___setslice__(self, *args)
82908 - def __delslice__(self, *args): return vimagemodule.ImageVector___delslice__(self, *args)
82909 - def __delitem__(self, *args): return vimagemodule.ImageVector___delitem__(self, *args)
82910 - def __getitem__(self, *args): return vimagemodule.ImageVector___getitem__(self, *args)
82911 - def __setitem__(self, *args): return vimagemodule.ImageVector___setitem__(self, *args)
82912 - def append(self, *args): return vimagemodule.ImageVector_append(self, *args)
82913 - def empty(self): return vimagemodule.ImageVector_empty(self)
82914 - def size(self): return vimagemodule.ImageVector_size(self)
82915 - def clear(self): return vimagemodule.ImageVector_clear(self)
82916 - def swap(self, *args): return vimagemodule.ImageVector_swap(self, *args)
82917 - def get_allocator(self): return vimagemodule.ImageVector_get_allocator(self)
82918 - def begin(self): return vimagemodule.ImageVector_begin(self)
82919 - def end(self): return vimagemodule.ImageVector_end(self)
82920 - def rbegin(self): return vimagemodule.ImageVector_rbegin(self)
82921 - def rend(self): return vimagemodule.ImageVector_rend(self)
82922 - def pop_back(self): return vimagemodule.ImageVector_pop_back(self)
82923 - def erase(self, *args): return vimagemodule.ImageVector_erase(self, *args)
82924 - def __init__(self, *args):
82925 - this = vimagemodule.new_ImageVector(*args)
82926 - try: self.this.append(this)
82927 - except: self.this = this
82928 - def push_back(self, *args): return vimagemodule.ImageVector_push_back(self, *args)
82929 - def front(self): return vimagemodule.ImageVector_front(self)
82930 - def back(self): return vimagemodule.ImageVector_back(self)
82931 - def assign(self, *args): return vimagemodule.ImageVector_assign(self, *args)
82932 - def resize(self, *args): return vimagemodule.ImageVector_resize(self, *args)
82933 - def insert(self, *args): return vimagemodule.ImageVector_insert(self, *args)
82934 - def reserve(self, *args): return vimagemodule.ImageVector_reserve(self, *args)
82935 - def capacity(self): return vimagemodule.ImageVector_capacity(self)
82936 - __swig_destroy__ = vimagemodule.delete_ImageVector
82937 - __del__ = lambda self : None;
82938 -ImageVector_swigregister = vimagemodule.ImageVector_swigregister
82939 -ImageVector_swigregister(ImageVector)
82940 -
82941 -
82942 -def init(argv0="nothing"):
82943 - return vimagemodule.init(argv0)
82944 -init = vimagemodule.init
82945 -
82946 -def shutdown():
82947 - return vimagemodule.shutdown()
82948 -shutdown = vimagemodule.shutdown
82949 -class VImage(_object):
82950 - __swig_setmethods__ = {}
82951 - __setattr__ = lambda self, name, value: _swig_setattr(self, VImage, name, value)
82952 - __swig_getmethods__ = {}
82953 - __getattr__ = lambda self, name: _swig_getattr(self, VImage, name)
82954 - __repr__ = _swig_repr
82955 - __swig_getmethods__["print_all"] = lambda x: vimagemodule.VImage_print_all
82956 - if _newclass:print_all = staticmethod(vimagemodule.VImage_print_all)
82957 - MULTIBAND = vimagemodule.VImage_MULTIBAND
82958 - B_W = vimagemodule.VImage_B_W
82959 - LUMINACE = vimagemodule.VImage_LUMINACE
82960 - XRAY = vimagemodule.VImage_XRAY
82961 - IR = vimagemodule.VImage_IR
82962 - YUV = vimagemodule.VImage_YUV
82963 - RED_ONLY = vimagemodule.VImage_RED_ONLY
82964 - GREEN_ONLY = vimagemodule.VImage_GREEN_ONLY
82965 - BLUE_ONLY = vimagemodule.VImage_BLUE_ONLY
82966 - POWER_SPECTRUM = vimagemodule.VImage_POWER_SPECTRUM
82967 - HISTOGRAM = vimagemodule.VImage_HISTOGRAM
82968 - LUT = vimagemodule.VImage_LUT
82969 - XYZ = vimagemodule.VImage_XYZ
82970 - LAB = vimagemodule.VImage_LAB
82971 - CMC = vimagemodule.VImage_CMC
82972 - CMYK = vimagemodule.VImage_CMYK
82973 - LABQ = vimagemodule.VImage_LABQ
82974 - RGB = vimagemodule.VImage_RGB
82975 - UCS = vimagemodule.VImage_UCS
82976 - LCH = vimagemodule.VImage_LCH
82977 - LABS = vimagemodule.VImage_LABS
82978 - sRGB = vimagemodule.VImage_sRGB
82979 - YXY = vimagemodule.VImage_YXY
82980 - FOURIER = vimagemodule.VImage_FOURIER
82981 - RGB16 = vimagemodule.VImage_RGB16
82982 - GREY16 = vimagemodule.VImage_GREY16
82983 - FMTNOTSET = vimagemodule.VImage_FMTNOTSET
82984 - FMTUCHAR = vimagemodule.VImage_FMTUCHAR
82985 - FMTCHAR = vimagemodule.VImage_FMTCHAR
82986 - FMTUSHORT = vimagemodule.VImage_FMTUSHORT
82987 - FMTSHORT = vimagemodule.VImage_FMTSHORT
82988 - FMTUINT = vimagemodule.VImage_FMTUINT
82989 - FMTINT = vimagemodule.VImage_FMTINT
82990 - FMTFLOAT = vimagemodule.VImage_FMTFLOAT
82991 - FMTCOMPLEX = vimagemodule.VImage_FMTCOMPLEX
82992 - FMTDOUBLE = vimagemodule.VImage_FMTDOUBLE
82993 - FMTDPCOMPLEX = vimagemodule.VImage_FMTDPCOMPLEX
82994 - NOCODING = vimagemodule.VImage_NOCODING
82995 - COLQUANT = vimagemodule.VImage_COLQUANT
82996 - LABPACK = vimagemodule.VImage_LABPACK
82997 - LABPACK_COMPRESSED = vimagemodule.VImage_LABPACK_COMPRESSED
82998 - RGB_COMPRESSED = vimagemodule.VImage_RGB_COMPRESSED
82999 - LUM_COMPRESSED = vimagemodule.VImage_LUM_COMPRESSED
83000 - RAD = vimagemodule.VImage_RAD
83001 - NO_COMPRESSION = vimagemodule.VImage_NO_COMPRESSION
83002 - TCSF_COMPRESSION = vimagemodule.VImage_TCSF_COMPRESSION
83003 - JPEG_COMPRESSION = vimagemodule.VImage_JPEG_COMPRESSION
83004 - __swig_getmethods__["convert2disc"] = lambda x: vimagemodule.VImage_convert2disc
83005 - if _newclass:convert2disc = staticmethod(vimagemodule.VImage_convert2disc)
83006 - def __init__(self, *args):
83007 - this = vimagemodule.new_VImage(*args)
83008 - try: self.this.append(this)
83009 - except: self.this = this
83010 - def __assign__(self, *args): return vimagemodule.VImage___assign__(self, *args)
83011 - __swig_destroy__ = vimagemodule.delete_VImage
83012 - __del__ = lambda self : None;
83013 - def image(self): return vimagemodule.VImage_image(self)
83014 - def data(self): return vimagemodule.VImage_data(self)
83015 - def write(self, *args): return vimagemodule.VImage_write(self, *args)
83016 - def debug_print(self): return vimagemodule.VImage_debug_print(self)
83017 - def Xsize(self): return vimagemodule.VImage_Xsize(self)
83018 - def Ysize(self): return vimagemodule.VImage_Ysize(self)
83019 - def Bands(self): return vimagemodule.VImage_Bands(self)
83020 - def BandFmt(self): return vimagemodule.VImage_BandFmt(self)
83021 - def Coding(self): return vimagemodule.VImage_Coding(self)
83022 - def Type(self): return vimagemodule.VImage_Type(self)
83023 - def Xres(self): return vimagemodule.VImage_Xres(self)
83024 - def Yres(self): return vimagemodule.VImage_Yres(self)
83025 - def Length(self): return vimagemodule.VImage_Length(self)
83026 - def Compression(self): return vimagemodule.VImage_Compression(self)
83027 - def Level(self): return vimagemodule.VImage_Level(self)
83028 - def Xoffset(self): return vimagemodule.VImage_Xoffset(self)
83029 - def Yoffset(self): return vimagemodule.VImage_Yoffset(self)
83030 - def filename(self): return vimagemodule.VImage_filename(self)
83031 - def Hist(self): return vimagemodule.VImage_Hist(self)
83032 - def meta_remove(self, *args): return vimagemodule.VImage_meta_remove(self, *args)
83033 - def meta_get_typeof(self, *args): return vimagemodule.VImage_meta_get_typeof(self, *args)
83034 - def meta_get_int(self, *args): return vimagemodule.VImage_meta_get_int(self, *args)
83035 - def meta_get_double(self, *args): return vimagemodule.VImage_meta_get_double(self, *args)
83036 - def meta_get_string(self, *args): return vimagemodule.VImage_meta_get_string(self, *args)
83037 - def meta_get_area(self, *args): return vimagemodule.VImage_meta_get_area(self, *args)
83038 - def meta_get_blob(self, *args): return vimagemodule.VImage_meta_get_blob(self, *args)
83039 - def meta_set(self, *args): return vimagemodule.VImage_meta_set(self, *args)
83040 - def initdesc(self, *args): return vimagemodule.VImage_initdesc(self, *args)
83041 - def abs(self): return vimagemodule.VImage_abs(self)
83042 - def acos(self): return vimagemodule.VImage_acos(self)
83043 - def add(self, *args): return vimagemodule.VImage_add(self, *args)
83044 - def asin(self): return vimagemodule.VImage_asin(self)
83045 - def atan(self): return vimagemodule.VImage_atan(self)
83046 - def avg(self): return vimagemodule.VImage_avg(self)
83047 - def point(self, *args): return vimagemodule.VImage_point(self, *args)
83048 - def point_bilinear(self, *args): return vimagemodule.VImage_point_bilinear(self, *args)
83049 - def bandmean(self): return vimagemodule.VImage_bandmean(self)
83050 - def ceil(self): return vimagemodule.VImage_ceil(self)
83051 - def cos(self): return vimagemodule.VImage_cos(self)
83052 - def cross_phase(self, *args): return vimagemodule.VImage_cross_phase(self, *args)
83053 - def deviate(self): return vimagemodule.VImage_deviate(self)
83054 - def divide(self, *args): return vimagemodule.VImage_divide(self, *args)
83055 - def exp10(self): return vimagemodule.VImage_exp10(self)
83056 - def expn(self, *args): return vimagemodule.VImage_expn(self, *args)
83057 - def exp(self): return vimagemodule.VImage_exp(self)
83058 - def floor(self): return vimagemodule.VImage_floor(self)
83059 - def invert(self): return vimagemodule.VImage_invert(self)
83060 - __swig_getmethods__["linreg"] = lambda x: vimagemodule.VImage_linreg
83061 - if _newclass:linreg = staticmethod(vimagemodule.VImage_linreg)
83062 - def lin(self, *args): return vimagemodule.VImage_lin(self, *args)
83063 - def log10(self): return vimagemodule.VImage_log10(self)
83064 - def log(self): return vimagemodule.VImage_log(self)
83065 - def max(self): return vimagemodule.VImage_max(self)
83066 - def maxpos(self): return vimagemodule.VImage_maxpos(self)
83067 - def maxpos_avg(self): return vimagemodule.VImage_maxpos_avg(self)
83068 - def measure(self, *args): return vimagemodule.VImage_measure(self, *args)
83069 - def min(self): return vimagemodule.VImage_min(self)
83070 - def minpos(self): return vimagemodule.VImage_minpos(self)
83071 - def multiply(self, *args): return vimagemodule.VImage_multiply(self, *args)
83072 - def pow(self, *args): return vimagemodule.VImage_pow(self, *args)
83073 - def recomb(self, *args): return vimagemodule.VImage_recomb(self, *args)
83074 - def remainder(self, *args): return vimagemodule.VImage_remainder(self, *args)
83075 - def rint(self): return vimagemodule.VImage_rint(self)
83076 - def sign(self): return vimagemodule.VImage_sign(self)
83077 - def sin(self): return vimagemodule.VImage_sin(self)
83078 - def stats(self): return vimagemodule.VImage_stats(self)
83079 - def subtract(self, *args): return vimagemodule.VImage_subtract(self, *args)
83080 - def tan(self): return vimagemodule.VImage_tan(self)
83081 - def greyc(self, *args): return vimagemodule.VImage_greyc(self, *args)
83082 - def greyc_mask(self, *args): return vimagemodule.VImage_greyc_mask(self, *args)
83083 - def LCh2Lab(self): return vimagemodule.VImage_LCh2Lab(self)
83084 - def LCh2UCS(self): return vimagemodule.VImage_LCh2UCS(self)
83085 - def Lab2LCh(self): return vimagemodule.VImage_Lab2LCh(self)
83086 - def Lab2LabQ(self): return vimagemodule.VImage_Lab2LabQ(self)
83087 - def Lab2LabS(self): return vimagemodule.VImage_Lab2LabS(self)
83088 - def Lab2UCS(self): return vimagemodule.VImage_Lab2UCS(self)
83089 - def Lab2XYZ(self): return vimagemodule.VImage_Lab2XYZ(self)
83090 - def Lab2XYZ_temp(self, *args): return vimagemodule.VImage_Lab2XYZ_temp(self, *args)
83091 - def Lab2disp(self, *args): return vimagemodule.VImage_Lab2disp(self, *args)
83092 - def LabQ2LabS(self): return vimagemodule.VImage_LabQ2LabS(self)
83093 - def LabQ2Lab(self): return vimagemodule.VImage_LabQ2Lab(self)
83094 - def LabQ2XYZ(self): return vimagemodule.VImage_LabQ2XYZ(self)
83095 - def LabQ2disp(self, *args): return vimagemodule.VImage_LabQ2disp(self, *args)
83096 - def LabS2LabQ(self): return vimagemodule.VImage_LabS2LabQ(self)
83097 - def LabS2Lab(self): return vimagemodule.VImage_LabS2Lab(self)
83098 - def UCS2LCh(self): return vimagemodule.VImage_UCS2LCh(self)
83099 - def UCS2Lab(self): return vimagemodule.VImage_UCS2Lab(self)
83100 - def UCS2XYZ(self): return vimagemodule.VImage_UCS2XYZ(self)
83101 - def XYZ2Lab(self): return vimagemodule.VImage_XYZ2Lab(self)
83102 - def XYZ2Lab_temp(self, *args): return vimagemodule.VImage_XYZ2Lab_temp(self, *args)
83103 - def XYZ2UCS(self): return vimagemodule.VImage_XYZ2UCS(self)
83104 - def XYZ2Yxy(self): return vimagemodule.VImage_XYZ2Yxy(self)
83105 - def XYZ2disp(self, *args): return vimagemodule.VImage_XYZ2disp(self, *args)
83106 - def XYZ2sRGB(self): return vimagemodule.VImage_XYZ2sRGB(self)
83107 - def Yxy2XYZ(self): return vimagemodule.VImage_Yxy2XYZ(self)
83108 - def dE00_fromLab(self, *args): return vimagemodule.VImage_dE00_fromLab(self, *args)
83109 - def dECMC_fromLab(self, *args): return vimagemodule.VImage_dECMC_fromLab(self, *args)
83110 - def dECMC_fromdisp(self, *args): return vimagemodule.VImage_dECMC_fromdisp(self, *args)
83111 - def dE_fromLab(self, *args): return vimagemodule.VImage_dE_fromLab(self, *args)
83112 - def dE_fromXYZ(self, *args): return vimagemodule.VImage_dE_fromXYZ(self, *args)
83113 - def dE_fromdisp(self, *args): return vimagemodule.VImage_dE_fromdisp(self, *args)
83114 - def disp2Lab(self, *args): return vimagemodule.VImage_disp2Lab(self, *args)
83115 - def disp2XYZ(self, *args): return vimagemodule.VImage_disp2XYZ(self, *args)
83116 - def float2rad(self): return vimagemodule.VImage_float2rad(self)
83117 - def icc_ac2rc(self, *args): return vimagemodule.VImage_icc_ac2rc(self, *args)
83118 - def icc_export_depth(self, *args): return vimagemodule.VImage_icc_export_depth(self, *args)
83119 - def icc_import(self, *args): return vimagemodule.VImage_icc_import(self, *args)
83120 - def icc_import_embedded(self, *args): return vimagemodule.VImage_icc_import_embedded(self, *args)
83121 - def icc_transform(self, *args): return vimagemodule.VImage_icc_transform(self, *args)
83122 - def lab_morph(self, *args): return vimagemodule.VImage_lab_morph(self, *args)
83123 - def rad2float(self): return vimagemodule.VImage_rad2float(self)
83124 - def sRGB2XYZ(self): return vimagemodule.VImage_sRGB2XYZ(self)
83125 - __swig_getmethods__["gaussnoise"] = lambda x: vimagemodule.VImage_gaussnoise
83126 - if _newclass:gaussnoise = staticmethod(vimagemodule.VImage_gaussnoise)
83127 - def bandjoin(self, *args): return vimagemodule.VImage_bandjoin(self, *args)
83128 - __swig_getmethods__["black"] = lambda x: vimagemodule.VImage_black
83129 - if _newclass:black = staticmethod(vimagemodule.VImage_black)
83130 - def c2amph(self): return vimagemodule.VImage_c2amph(self)
83131 - def c2imag(self): return vimagemodule.VImage_c2imag(self)
83132 - def c2real(self): return vimagemodule.VImage_c2real(self)
83133 - def c2rect(self): return vimagemodule.VImage_c2rect(self)
83134 - def clip2fmt(self, *args): return vimagemodule.VImage_clip2fmt(self, *args)
83135 - def copy(self): return vimagemodule.VImage_copy(self)
83136 - def copy_file(self): return vimagemodule.VImage_copy_file(self)
83137 - def copy_morph(self, *args): return vimagemodule.VImage_copy_morph(self, *args)
83138 - def copy_swap(self): return vimagemodule.VImage_copy_swap(self)
83139 - def copy_set(self, *args): return vimagemodule.VImage_copy_set(self, *args)
83140 - def extract_area(self, *args): return vimagemodule.VImage_extract_area(self, *args)
83141 - def extract_areabands(self, *args): return vimagemodule.VImage_extract_areabands(self, *args)
83142 - def extract_band(self, *args): return vimagemodule.VImage_extract_band(self, *args)
83143 - def extract_bands(self, *args): return vimagemodule.VImage_extract_bands(self, *args)
83144 - def extract(self, *args): return vimagemodule.VImage_extract(self, *args)
83145 - def falsecolour(self): return vimagemodule.VImage_falsecolour(self)
83146 - def fliphor(self): return vimagemodule.VImage_fliphor(self)
83147 - def flipver(self): return vimagemodule.VImage_flipver(self)
83148 - __swig_getmethods__["gbandjoin"] = lambda x: vimagemodule.VImage_gbandjoin
83149 - if _newclass:gbandjoin = staticmethod(vimagemodule.VImage_gbandjoin)
83150 - def grid(self, *args): return vimagemodule.VImage_grid(self, *args)
83151 - def insert(self, *args): return vimagemodule.VImage_insert(self, *args)
83152 - def insert_noexpand(self, *args): return vimagemodule.VImage_insert_noexpand(self, *args)
83153 - def embed(self, *args): return vimagemodule.VImage_embed(self, *args)
83154 - def lrjoin(self, *args): return vimagemodule.VImage_lrjoin(self, *args)
83155 - def msb(self): return vimagemodule.VImage_msb(self)
83156 - def msb_band(self, *args): return vimagemodule.VImage_msb_band(self, *args)
83157 - def replicate(self, *args): return vimagemodule.VImage_replicate(self, *args)
83158 - def ri2c(self, *args): return vimagemodule.VImage_ri2c(self, *args)
83159 - def rot180(self): return vimagemodule.VImage_rot180(self)
83160 - def rot270(self): return vimagemodule.VImage_rot270(self)
83161 - def rot90(self): return vimagemodule.VImage_rot90(self)
83162 - def scale(self): return vimagemodule.VImage_scale(self)
83163 - def scaleps(self): return vimagemodule.VImage_scaleps(self)
83164 - def subsample(self, *args): return vimagemodule.VImage_subsample(self, *args)
83165 - def system(self, *args): return vimagemodule.VImage_system(self, *args)
83166 - def system_image(self, *args): return vimagemodule.VImage_system_image(self, *args)
83167 - def tbjoin(self, *args): return vimagemodule.VImage_tbjoin(self, *args)
83168 - __swig_getmethods__["text"] = lambda x: vimagemodule.VImage_text
83169 - if _newclass:text = staticmethod(vimagemodule.VImage_text)
83170 - def wrap(self, *args): return vimagemodule.VImage_wrap(self, *args)
83171 - def zoom(self, *args): return vimagemodule.VImage_zoom(self, *args)
83172 - def aconvsep(self, *args): return vimagemodule.VImage_aconvsep(self, *args)
83173 - def aconv(self, *args): return vimagemodule.VImage_aconv(self, *args)
83174 - def addgnoise(self, *args): return vimagemodule.VImage_addgnoise(self, *args)
83175 - def compass(self, *args): return vimagemodule.VImage_compass(self, *args)
83176 - def contrast_surface(self, *args): return vimagemodule.VImage_contrast_surface(self, *args)
83177 - def conv(self, *args): return vimagemodule.VImage_conv(self, *args)
83178 - def convsep(self, *args): return vimagemodule.VImage_convsep(self, *args)
83179 - def fastcor(self, *args): return vimagemodule.VImage_fastcor(self, *args)
83180 - def gradcor(self, *args): return vimagemodule.VImage_gradcor(self, *args)
83181 - def gradient(self, *args): return vimagemodule.VImage_gradient(self, *args)
83182 - def grad_x(self): return vimagemodule.VImage_grad_x(self)
83183 - def grad_y(self): return vimagemodule.VImage_grad_y(self)
83184 - def lindetect(self, *args): return vimagemodule.VImage_lindetect(self, *args)
83185 - def sharpen(self, *args): return vimagemodule.VImage_sharpen(self, *args)
83186 - def spcor(self, *args): return vimagemodule.VImage_spcor(self, *args)
83187 - def argb2rgba(self): return vimagemodule.VImage_argb2rgba(self)
83188 - def flood_copy(self, *args): return vimagemodule.VImage_flood_copy(self, *args)
83189 - def flood_blob_copy(self, *args): return vimagemodule.VImage_flood_blob_copy(self, *args)
83190 - def flood_other_copy(self, *args): return vimagemodule.VImage_flood_other_copy(self, *args)
83191 - def clip(self): return vimagemodule.VImage_clip(self)
83192 - def c2ps(self): return vimagemodule.VImage_c2ps(self)
83193 - def resize_linear(self, *args): return vimagemodule.VImage_resize_linear(self, *args)
83194 - def cmulnorm(self, *args): return vimagemodule.VImage_cmulnorm(self, *args)
83195 - def fav4(self, *args): return vimagemodule.VImage_fav4(self, *args)
83196 - def gadd(self, *args): return vimagemodule.VImage_gadd(self, *args)
83197 - def icc_export(self, *args): return vimagemodule.VImage_icc_export(self, *args)
83198 - def litecor(self, *args): return vimagemodule.VImage_litecor(self, *args)
83199 - def affine(self, *args): return vimagemodule.VImage_affine(self, *args)
83200 - def clip2c(self): return vimagemodule.VImage_clip2c(self)
83201 - def clip2cm(self): return vimagemodule.VImage_clip2cm(self)
83202 - def clip2d(self): return vimagemodule.VImage_clip2d(self)
83203 - def clip2dcm(self): return vimagemodule.VImage_clip2dcm(self)
83204 - def clip2f(self): return vimagemodule.VImage_clip2f(self)
83205 - def clip2i(self): return vimagemodule.VImage_clip2i(self)
83206 - def convsub(self, *args): return vimagemodule.VImage_convsub(self, *args)
83207 - def convf(self, *args): return vimagemodule.VImage_convf(self, *args)
83208 - def convsepf(self, *args): return vimagemodule.VImage_convsepf(self, *args)
83209 - def clip2s(self): return vimagemodule.VImage_clip2s(self)
83210 - def clip2ui(self): return vimagemodule.VImage_clip2ui(self)
83211 - def clip2us(self): return vimagemodule.VImage_clip2us(self)
83212 - def slice(self, *args): return vimagemodule.VImage_slice(self, *args)
83213 - def segment(self): return vimagemodule.VImage_segment(self)
83214 - def thresh(self, *args): return vimagemodule.VImage_thresh(self, *args)
83215 - def convf_raw(self, *args): return vimagemodule.VImage_convf_raw(self, *args)
83216 - def conv_raw(self, *args): return vimagemodule.VImage_conv_raw(self, *args)
83217 - def contrast_surface_raw(self, *args): return vimagemodule.VImage_contrast_surface_raw(self, *args)
83218 - def convsepf_raw(self, *args): return vimagemodule.VImage_convsepf_raw(self, *args)
83219 - def convsep_raw(self, *args): return vimagemodule.VImage_convsep_raw(self, *args)
83220 - def fastcor_raw(self, *args): return vimagemodule.VImage_fastcor_raw(self, *args)
83221 - def gradcor_raw(self, *args): return vimagemodule.VImage_gradcor_raw(self, *args)
83222 - def spcor_raw(self, *args): return vimagemodule.VImage_spcor_raw(self, *args)
83223 - def lhisteq_raw(self, *args): return vimagemodule.VImage_lhisteq_raw(self, *args)
83224 - def stdif_raw(self, *args): return vimagemodule.VImage_stdif_raw(self, *args)
83225 - def rank_raw(self, *args): return vimagemodule.VImage_rank_raw(self, *args)
83226 - def dilate_raw(self, *args): return vimagemodule.VImage_dilate_raw(self, *args)
83227 - def erode_raw(self, *args): return vimagemodule.VImage_erode_raw(self, *args)
83228 - def similarity_area(self, *args): return vimagemodule.VImage_similarity_area(self, *args)
83229 - def similarity(self, *args): return vimagemodule.VImage_similarity(self, *args)
83230 - __swig_getmethods__["mask2vips"] = lambda x: vimagemodule.VImage_mask2vips
83231 - if _newclass:mask2vips = staticmethod(vimagemodule.VImage_mask2vips)
83232 - def vips2mask(self): return vimagemodule.VImage_vips2mask(self)
83233 - def insertplace(self, *args): return vimagemodule.VImage_insertplace(self, *args)
83234 - def circle(self, *args): return vimagemodule.VImage_circle(self, *args)
83235 - def andimage(self, *args): return vimagemodule.VImage_andimage(self, *args)
83236 - def orimage(self, *args): return vimagemodule.VImage_orimage(self, *args)
83237 - def eorimage(self, *args): return vimagemodule.VImage_eorimage(self, *args)
83238 - def shiftleft(self, *args): return vimagemodule.VImage_shiftleft(self, *args)
83239 - def shiftright(self, *args): return vimagemodule.VImage_shiftright(self, *args)
83240 - def blend(self, *args): return vimagemodule.VImage_blend(self, *args)
83241 - def equal(self, *args): return vimagemodule.VImage_equal(self, *args)
83242 - def ifthenelse(self, *args): return vimagemodule.VImage_ifthenelse(self, *args)
83243 - def less(self, *args): return vimagemodule.VImage_less(self, *args)
83244 - def lesseq(self, *args): return vimagemodule.VImage_lesseq(self, *args)
83245 - def more(self, *args): return vimagemodule.VImage_more(self, *args)
83246 - def moreeq(self, *args): return vimagemodule.VImage_moreeq(self, *args)
83247 - def notequal(self, *args): return vimagemodule.VImage_notequal(self, *args)
83248 - def quadratic(self, *args): return vimagemodule.VImage_quadratic(self, *args)
83249 - __swig_getmethods__["csv2vips"] = lambda x: vimagemodule.VImage_csv2vips
83250 - if _newclass:csv2vips = staticmethod(vimagemodule.VImage_csv2vips)
83251 - __swig_getmethods__["fits2vips"] = lambda x: vimagemodule.VImage_fits2vips
83252 - if _newclass:fits2vips = staticmethod(vimagemodule.VImage_fits2vips)
83253 - __swig_getmethods__["jpeg2vips"] = lambda x: vimagemodule.VImage_jpeg2vips
83254 - if _newclass:jpeg2vips = staticmethod(vimagemodule.VImage_jpeg2vips)
83255 - __swig_getmethods__["magick2vips"] = lambda x: vimagemodule.VImage_magick2vips
83256 - if _newclass:magick2vips = staticmethod(vimagemodule.VImage_magick2vips)
83257 - __swig_getmethods__["png2vips"] = lambda x: vimagemodule.VImage_png2vips
83258 - if _newclass:png2vips = staticmethod(vimagemodule.VImage_png2vips)
83259 - __swig_getmethods__["exr2vips"] = lambda x: vimagemodule.VImage_exr2vips
83260 - if _newclass:exr2vips = staticmethod(vimagemodule.VImage_exr2vips)
83261 - __swig_getmethods__["ppm2vips"] = lambda x: vimagemodule.VImage_ppm2vips
83262 - if _newclass:ppm2vips = staticmethod(vimagemodule.VImage_ppm2vips)
83263 - __swig_getmethods__["analyze2vips"] = lambda x: vimagemodule.VImage_analyze2vips
83264 - if _newclass:analyze2vips = staticmethod(vimagemodule.VImage_analyze2vips)
83265 - __swig_getmethods__["tiff2vips"] = lambda x: vimagemodule.VImage_tiff2vips
83266 - if _newclass:tiff2vips = staticmethod(vimagemodule.VImage_tiff2vips)
83267 - def vips2csv(self, *args): return vimagemodule.VImage_vips2csv(self, *args)
83268 - def vips2dz(self, *args): return vimagemodule.VImage_vips2dz(self, *args)
83269 - def vips2jpeg(self, *args): return vimagemodule.VImage_vips2jpeg(self, *args)
83270 - def vips2mimejpeg(self, *args): return vimagemodule.VImage_vips2mimejpeg(self, *args)
83271 - def vips2png(self, *args): return vimagemodule.VImage_vips2png(self, *args)
83272 - def vips2ppm(self, *args): return vimagemodule.VImage_vips2ppm(self, *args)
83273 - def vips2tiff(self, *args): return vimagemodule.VImage_vips2tiff(self, *args)
83274 - __swig_getmethods__["create_fmask"] = lambda x: vimagemodule.VImage_create_fmask
83275 - if _newclass:create_fmask = staticmethod(vimagemodule.VImage_create_fmask)
83276 - def disp_ps(self): return vimagemodule.VImage_disp_ps(self)
83277 - def flt_image_freq(self, *args): return vimagemodule.VImage_flt_image_freq(self, *args)
83278 - __swig_getmethods__["fractsurf"] = lambda x: vimagemodule.VImage_fractsurf
83279 - if _newclass:fractsurf = staticmethod(vimagemodule.VImage_fractsurf)
83280 - def freqflt(self, *args): return vimagemodule.VImage_freqflt(self, *args)
83281 - def fwfft(self): return vimagemodule.VImage_fwfft(self)
83282 - def rotquad(self): return vimagemodule.VImage_rotquad(self)
83283 - def invfft(self): return vimagemodule.VImage_invfft(self)
83284 - def phasecor_fft(self, *args): return vimagemodule.VImage_phasecor_fft(self, *args)
83285 - def invfftr(self): return vimagemodule.VImage_invfftr(self)
83286 - def gammacorrect(self, *args): return vimagemodule.VImage_gammacorrect(self, *args)
83287 - def heq(self, *args): return vimagemodule.VImage_heq(self, *args)
83288 - def hist(self, *args): return vimagemodule.VImage_hist(self, *args)
83289 - def histcum(self): return vimagemodule.VImage_histcum(self)
83290 - def histeq(self): return vimagemodule.VImage_histeq(self)
83291 - def hist_indexed(self, *args): return vimagemodule.VImage_hist_indexed(self, *args)
83292 - def histgr(self, *args): return vimagemodule.VImage_histgr(self, *args)
83293 - def histnD(self, *args): return vimagemodule.VImage_histnD(self, *args)
83294 - def histnorm(self): return vimagemodule.VImage_histnorm(self)
83295 - def histplot(self): return vimagemodule.VImage_histplot(self)
83296 - def histspec(self, *args): return vimagemodule.VImage_histspec(self, *args)
83297 - def hsp(self, *args): return vimagemodule.VImage_hsp(self, *args)
83298 - __swig_getmethods__["identity"] = lambda x: vimagemodule.VImage_identity
83299 - if _newclass:identity = staticmethod(vimagemodule.VImage_identity)
83300 - __swig_getmethods__["identity_ushort"] = lambda x: vimagemodule.VImage_identity_ushort
83301 - if _newclass:identity_ushort = staticmethod(vimagemodule.VImage_identity_ushort)
83302 - def ismonotonic(self): return vimagemodule.VImage_ismonotonic(self)
83303 - def lhisteq(self, *args): return vimagemodule.VImage_lhisteq(self, *args)
83304 - def mpercent(self, *args): return vimagemodule.VImage_mpercent(self, *args)
83305 - __swig_getmethods__["invertlut"] = lambda x: vimagemodule.VImage_invertlut
83306 - if _newclass:invertlut = staticmethod(vimagemodule.VImage_invertlut)
83307 - __swig_getmethods__["buildlut"] = lambda x: vimagemodule.VImage_buildlut
83308 - if _newclass:buildlut = staticmethod(vimagemodule.VImage_buildlut)
83309 - def maplut(self, *args): return vimagemodule.VImage_maplut(self, *args)
83310 - def project(self, *args): return vimagemodule.VImage_project(self, *args)
83311 - def stdif(self, *args): return vimagemodule.VImage_stdif(self, *args)
83312 - def tone_analyse(self, *args): return vimagemodule.VImage_tone_analyse(self, *args)
83313 - __swig_getmethods__["tone_build"] = lambda x: vimagemodule.VImage_tone_build
83314 - if _newclass:tone_build = staticmethod(vimagemodule.VImage_tone_build)
83315 - __swig_getmethods__["tone_build_range"] = lambda x: vimagemodule.VImage_tone_build_range
83316 - if _newclass:tone_build_range = staticmethod(vimagemodule.VImage_tone_build_range)
83317 - def tone_map(self, *args): return vimagemodule.VImage_tone_map(self, *args)
83318 - def draw_circle(self, *args): return vimagemodule.VImage_draw_circle(self, *args)
83319 - def draw_rect(self, *args): return vimagemodule.VImage_draw_rect(self, *args)
83320 - def draw_line(self, *args): return vimagemodule.VImage_draw_line(self, *args)
83321 - def draw_point(self, *args): return vimagemodule.VImage_draw_point(self, *args)
83322 - def draw_smudge(self, *args): return vimagemodule.VImage_draw_smudge(self, *args)
83323 - def draw_flood(self, *args): return vimagemodule.VImage_draw_flood(self, *args)
83324 - def draw_flood_blob(self, *args): return vimagemodule.VImage_draw_flood_blob(self, *args)
83325 - def draw_flood_other(self, *args): return vimagemodule.VImage_draw_flood_other(self, *args)
83326 - def draw_image(self, *args): return vimagemodule.VImage_draw_image(self, *args)
83327 - def draw_mask(self, *args): return vimagemodule.VImage_draw_mask(self, *args)
83328 - def line(self, *args): return vimagemodule.VImage_line(self, *args)
83329 - __swig_getmethods__["binfile"] = lambda x: vimagemodule.VImage_binfile
83330 - if _newclass:binfile = staticmethod(vimagemodule.VImage_binfile)
83331 - def cache(self, *args): return vimagemodule.VImage_cache(self, *args)
83332 - def getext(self): return vimagemodule.VImage_getext(self)
83333 - def header_get_typeof(self, *args): return vimagemodule.VImage_header_get_typeof(self, *args)
83334 - def header_int(self, *args): return vimagemodule.VImage_header_int(self, *args)
83335 - def header_double(self, *args): return vimagemodule.VImage_header_double(self, *args)
83336 - def header_string(self, *args): return vimagemodule.VImage_header_string(self, *args)
83337 - def history_get(self): return vimagemodule.VImage_history_get(self)
83338 - def printdesc(self): return vimagemodule.VImage_printdesc(self)
83339 - def cntlines(self, *args): return vimagemodule.VImage_cntlines(self, *args)
83340 - def dilate(self, *args): return vimagemodule.VImage_dilate(self, *args)
83341 - def rank(self, *args): return vimagemodule.VImage_rank(self, *args)
83342 - __swig_getmethods__["rank_image"] = lambda x: vimagemodule.VImage_rank_image
83343 - if _newclass:rank_image = staticmethod(vimagemodule.VImage_rank_image)
83344 - __swig_getmethods__["maxvalue"] = lambda x: vimagemodule.VImage_maxvalue
83345 - if _newclass:maxvalue = staticmethod(vimagemodule.VImage_maxvalue)
83346 - def label_regions(self): return vimagemodule.VImage_label_regions(self)
83347 - def zerox(self, *args): return vimagemodule.VImage_zerox(self, *args)
83348 - def erode(self, *args): return vimagemodule.VImage_erode(self, *args)
83349 - def profile(self, *args): return vimagemodule.VImage_profile(self, *args)
83350 - def align_bands(self): return vimagemodule.VImage_align_bands(self)
83351 - def correl(self, *args): return vimagemodule.VImage_correl(self, *args)
83352 - def _find_lroverlap(self, *args): return vimagemodule.VImage__find_lroverlap(self, *args)
83353 - def _find_tboverlap(self, *args): return vimagemodule.VImage__find_tboverlap(self, *args)
83354 - def global_balance(self, *args): return vimagemodule.VImage_global_balance(self, *args)
83355 - def global_balancef(self, *args): return vimagemodule.VImage_global_balancef(self, *args)
83356 - def lrmerge(self, *args): return vimagemodule.VImage_lrmerge(self, *args)
83357 - def lrmerge1(self, *args): return vimagemodule.VImage_lrmerge1(self, *args)
83358 - def lrmosaic(self, *args): return vimagemodule.VImage_lrmosaic(self, *args)
83359 - def lrmosaic1(self, *args): return vimagemodule.VImage_lrmosaic1(self, *args)
83360 - def match_linear(self, *args): return vimagemodule.VImage_match_linear(self, *args)
83361 - def match_linear_search(self, *args): return vimagemodule.VImage_match_linear_search(self, *args)
83362 - def maxpos_subpel(self): return vimagemodule.VImage_maxpos_subpel(self)
83363 - def remosaic(self, *args): return vimagemodule.VImage_remosaic(self, *args)
83364 - def tbmerge(self, *args): return vimagemodule.VImage_tbmerge(self, *args)
83365 - def tbmerge1(self, *args): return vimagemodule.VImage_tbmerge1(self, *args)
83366 - def tbmosaic(self, *args): return vimagemodule.VImage_tbmosaic(self, *args)
83367 - def tbmosaic1(self, *args): return vimagemodule.VImage_tbmosaic1(self, *args)
83368 - def benchmark(self): return vimagemodule.VImage_benchmark(self)
83369 - def benchmark2(self): return vimagemodule.VImage_benchmark2(self)
83370 - def benchmarkn(self, *args): return vimagemodule.VImage_benchmarkn(self, *args)
83371 - __swig_getmethods__["eye"] = lambda x: vimagemodule.VImage_eye
83372 - if _newclass:eye = staticmethod(vimagemodule.VImage_eye)
83373 - __swig_getmethods__["grey"] = lambda x: vimagemodule.VImage_grey
83374 - if _newclass:grey = staticmethod(vimagemodule.VImage_grey)
83375 - __swig_getmethods__["feye"] = lambda x: vimagemodule.VImage_feye
83376 - if _newclass:feye = staticmethod(vimagemodule.VImage_feye)
83377 - __swig_getmethods__["fgrey"] = lambda x: vimagemodule.VImage_fgrey
83378 - if _newclass:fgrey = staticmethod(vimagemodule.VImage_fgrey)
83379 - __swig_getmethods__["fzone"] = lambda x: vimagemodule.VImage_fzone
83380 - if _newclass:fzone = staticmethod(vimagemodule.VImage_fzone)
83381 - __swig_getmethods__["make_xy"] = lambda x: vimagemodule.VImage_make_xy
83382 - if _newclass:make_xy = staticmethod(vimagemodule.VImage_make_xy)
83383 - __swig_getmethods__["sines"] = lambda x: vimagemodule.VImage_sines
83384 - if _newclass:sines = staticmethod(vimagemodule.VImage_sines)
83385 - __swig_getmethods__["zone"] = lambda x: vimagemodule.VImage_zone
83386 - if _newclass:zone = staticmethod(vimagemodule.VImage_zone)
83387 - def rightshift_size(self, *args): return vimagemodule.VImage_rightshift_size(self, *args)
83388 - def shrink(self, *args): return vimagemodule.VImage_shrink(self, *args)
83389 - def stretch3(self, *args): return vimagemodule.VImage_stretch3(self, *args)
83390 - def affinei(self, *args): return vimagemodule.VImage_affinei(self, *args)
83391 - def affinei_all(self, *args): return vimagemodule.VImage_affinei_all(self, *args)
83392 - __swig_getmethods__["video_test"] = lambda x: vimagemodule.VImage_video_test
83393 - if _newclass:video_test = staticmethod(vimagemodule.VImage_video_test)
83394 - __swig_getmethods__["video_v4l1"] = lambda x: vimagemodule.VImage_video_v4l1
83395 - if _newclass:video_v4l1 = staticmethod(vimagemodule.VImage_video_v4l1)
83396 - def tobuffer(self): return vimagemodule.VImage_tobuffer(self)
83397 - __swig_getmethods__["frombuffer"] = lambda x: vimagemodule.VImage_frombuffer
83398 - if _newclass:frombuffer = staticmethod(vimagemodule.VImage_frombuffer)
83399 - def tostring(self): return vimagemodule.VImage_tostring(self)
83400 - __swig_getmethods__["fromstring"] = lambda x: vimagemodule.VImage_fromstring
83401 - if _newclass:fromstring = staticmethod(vimagemodule.VImage_fromstring)
83402 -VImage_swigregister = vimagemodule.VImage_swigregister
83403 -VImage_swigregister(VImage)
83404 -
83405 -def VImage_print_all():
83406 - return vimagemodule.VImage_print_all()
83407 -VImage_print_all = vimagemodule.VImage_print_all
83408 -
83409 -def VImage_convert2disc(*args):
83410 - return vimagemodule.VImage_convert2disc(*args)
83411 -VImage_convert2disc = vimagemodule.VImage_convert2disc
83412 -
83413 -def VImage_linreg(*args):
83414 - return vimagemodule.VImage_linreg(*args)
83415 -VImage_linreg = vimagemodule.VImage_linreg
83416 -
83417 -def VImage_gaussnoise(*args):
83418 - return vimagemodule.VImage_gaussnoise(*args)
83419 -VImage_gaussnoise = vimagemodule.VImage_gaussnoise
83420 -
83421 -def VImage_black(*args):
83422 - return vimagemodule.VImage_black(*args)
83423 -VImage_black = vimagemodule.VImage_black
83424 -
83425 -def VImage_gbandjoin(*args):
83426 - return vimagemodule.VImage_gbandjoin(*args)
83427 -VImage_gbandjoin = vimagemodule.VImage_gbandjoin
83428 -
83429 -def VImage_text(*args):
83430 - return vimagemodule.VImage_text(*args)
83431 -VImage_text = vimagemodule.VImage_text
83432 -
83433 -def VImage_mask2vips(*args):
83434 - return vimagemodule.VImage_mask2vips(*args)
83435 -VImage_mask2vips = vimagemodule.VImage_mask2vips
83436 -
83437 -def VImage_csv2vips(*args):
83438 - return vimagemodule.VImage_csv2vips(*args)
83439 -VImage_csv2vips = vimagemodule.VImage_csv2vips
83440 -
83441 -def VImage_fits2vips(*args):
83442 - return vimagemodule.VImage_fits2vips(*args)
83443 -VImage_fits2vips = vimagemodule.VImage_fits2vips
83444 -
83445 -def VImage_jpeg2vips(*args):
83446 - return vimagemodule.VImage_jpeg2vips(*args)
83447 -VImage_jpeg2vips = vimagemodule.VImage_jpeg2vips
83448 -
83449 -def VImage_magick2vips(*args):
83450 - return vimagemodule.VImage_magick2vips(*args)
83451 -VImage_magick2vips = vimagemodule.VImage_magick2vips
83452 -
83453 -def VImage_png2vips(*args):
83454 - return vimagemodule.VImage_png2vips(*args)
83455 -VImage_png2vips = vimagemodule.VImage_png2vips
83456 -
83457 -def VImage_exr2vips(*args):
83458 - return vimagemodule.VImage_exr2vips(*args)
83459 -VImage_exr2vips = vimagemodule.VImage_exr2vips
83460 -
83461 -def VImage_ppm2vips(*args):
83462 - return vimagemodule.VImage_ppm2vips(*args)
83463 -VImage_ppm2vips = vimagemodule.VImage_ppm2vips
83464 -
83465 -def VImage_analyze2vips(*args):
83466 - return vimagemodule.VImage_analyze2vips(*args)
83467 -VImage_analyze2vips = vimagemodule.VImage_analyze2vips
83468 -
83469 -def VImage_tiff2vips(*args):
83470 - return vimagemodule.VImage_tiff2vips(*args)
83471 -VImage_tiff2vips = vimagemodule.VImage_tiff2vips
83472 -
83473 -def VImage_create_fmask(*args):
83474 - return vimagemodule.VImage_create_fmask(*args)
83475 -VImage_create_fmask = vimagemodule.VImage_create_fmask
83476 -
83477 -def VImage_fractsurf(*args):
83478 - return vimagemodule.VImage_fractsurf(*args)
83479 -VImage_fractsurf = vimagemodule.VImage_fractsurf
83480 -
83481 -def VImage_identity(*args):
83482 - return vimagemodule.VImage_identity(*args)
83483 -VImage_identity = vimagemodule.VImage_identity
83484 -
83485 -def VImage_identity_ushort(*args):
83486 - return vimagemodule.VImage_identity_ushort(*args)
83487 -VImage_identity_ushort = vimagemodule.VImage_identity_ushort
83488 -
83489 -def VImage_invertlut(*args):
83490 - return vimagemodule.VImage_invertlut(*args)
83491 -VImage_invertlut = vimagemodule.VImage_invertlut
83492 -
83493 -def VImage_buildlut(*args):
83494 - return vimagemodule.VImage_buildlut(*args)
83495 -VImage_buildlut = vimagemodule.VImage_buildlut
83496 -
83497 -def VImage_tone_build(*args):
83498 - return vimagemodule.VImage_tone_build(*args)
83499 -VImage_tone_build = vimagemodule.VImage_tone_build
83500 -
83501 -def VImage_tone_build_range(*args):
83502 - return vimagemodule.VImage_tone_build_range(*args)
83503 -VImage_tone_build_range = vimagemodule.VImage_tone_build_range
83504 -
83505 -def VImage_binfile(*args):
83506 - return vimagemodule.VImage_binfile(*args)
83507 -VImage_binfile = vimagemodule.VImage_binfile
83508 -
83509 -def VImage_rank_image(*args):
83510 - return vimagemodule.VImage_rank_image(*args)
83511 -VImage_rank_image = vimagemodule.VImage_rank_image
83512 -
83513 -def VImage_maxvalue(*args):
83514 - return vimagemodule.VImage_maxvalue(*args)
83515 -VImage_maxvalue = vimagemodule.VImage_maxvalue
83516 -
83517 -def VImage_eye(*args):
83518 - return vimagemodule.VImage_eye(*args)
83519 -VImage_eye = vimagemodule.VImage_eye
83520 -
83521 -def VImage_grey(*args):
83522 - return vimagemodule.VImage_grey(*args)
83523 -VImage_grey = vimagemodule.VImage_grey
83524 -
83525 -def VImage_feye(*args):
83526 - return vimagemodule.VImage_feye(*args)
83527 -VImage_feye = vimagemodule.VImage_feye
83528 -
83529 -def VImage_fgrey(*args):
83530 - return vimagemodule.VImage_fgrey(*args)
83531 -VImage_fgrey = vimagemodule.VImage_fgrey
83532 -
83533 -def VImage_fzone(*args):
83534 - return vimagemodule.VImage_fzone(*args)
83535 -VImage_fzone = vimagemodule.VImage_fzone
83536 -
83537 -def VImage_make_xy(*args):
83538 - return vimagemodule.VImage_make_xy(*args)
83539 -VImage_make_xy = vimagemodule.VImage_make_xy
83540 -
83541 -def VImage_sines(*args):
83542 - return vimagemodule.VImage_sines(*args)
83543 -VImage_sines = vimagemodule.VImage_sines
83544 -
83545 -def VImage_zone(*args):
83546 - return vimagemodule.VImage_zone(*args)
83547 -VImage_zone = vimagemodule.VImage_zone
83548 -
83549 -def VImage_video_test(*args):
83550 - return vimagemodule.VImage_video_test(*args)
83551 -VImage_video_test = vimagemodule.VImage_video_test
83552 -
83553 -def VImage_video_v4l1(*args):
83554 - return vimagemodule.VImage_video_v4l1(*args)
83555 -VImage_video_v4l1 = vimagemodule.VImage_video_v4l1
83556 -
83557 -def VImage_frombuffer(*args):
83558 - return vimagemodule.VImage_frombuffer(*args)
83559 -VImage_frombuffer = vimagemodule.VImage_frombuffer
83560 -
83561 -def VImage_fromstring(*args):
83562 - return vimagemodule.VImage_fromstring(*args)
83563 -VImage_fromstring = vimagemodule.VImage_fromstring
83564 -
83565 -
83566 -def im_init_world(*args):
83567 - return vimagemodule.im_init_world(*args)
83568 -im_init_world = vimagemodule.im_init_world
83569 -
83570 -def im__print_all():
83571 - return vimagemodule.im__print_all()
83572 -im__print_all = vimagemodule.im__print_all
83573 -
83574 -def im_col_Lab2XYZ(*args):
83575 - return vimagemodule.im_col_Lab2XYZ(*args)
83576 -im_col_Lab2XYZ = vimagemodule.im_col_Lab2XYZ
83577 -# try to guess a PIL mode string from a VIPS image
83578 -def PIL_mode_from_vips (vim):
83579 - if vim.Bands () == 3 and vim.BandFmt () == VImage.FMTUCHAR:
83580 - return 'RGB'
83581 - elif vim.Bands () == 4 and vim.BandFmt () == VImage.FMTUCHAR and vim.Type () == VImage.RGB:
83582 - return 'RGBA'
83583 - elif vim.Bands () == 4 and vim.BandFmt () == VImage.FMTUCHAR and vim.Type () == VImage.CMYK:
83584 - return 'CMYK'
83585 - elif vim.Bands () == 1 and vim.BandFmt () == VImage.FMTUCHAR:
83586 - return 'L'
83587 - elif vim.Bands () == 1 and vim.BandFmt () == VImage.FMTINT:
83588 - return 'I'
83589 - elif vim.Bands () == 1 and vim.BandFmt () == VImage.FMTFLOAT:
83590 - return 'F'
83591 - elif vim.Bands () == 2 and vim.BandFmt () == VImage.FMTUCHAR:
83592 - return 'LA'
83593 - else:
83594 - raise ValueError ('unsupported vips -> pil image')
83595 -
83596 -# return vips (bands, format, type) for a PIL mode
83597 -def vips_from_PIL_mode (mode):
83598 - if mode == 'RGB':
83599 - return (3, VImage.FMTUCHAR, VImage.RGB)
83600 - elif mode == 'RGBA':
83601 - return (4, VImage.FMTUCHAR, VImage.RGB)
83602 - elif mode == 'CMYK':
83603 - return (4, VImage.FMTUCHAR, VImage.CMYK)
83604 - elif mode == 'L':
83605 - return (1, VImage.FMTUCHAR, VImage.B_W)
83606 - elif mode == 'I':
83607 - return (1, VImage.FMTINT, VImage.B_W)
83608 - elif mode == 'F':
83609 - return (1, VImage.FMTFLOAT, VImage.B_W)
83610 - elif mode == 'LA':
83611 - return (2, VImage.FMTUCHAR, VImage.B_W)
83612 - else:
83613 - raise ValueError ('unsupported pil -> vips image')
83614 -
83615 -# This file is compatible with both classic and new-style classes.
83616 -
83617 -
83618 diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/VMask.i vips-7.38.5/swig/vipsCC/VMask.i
83619 --- vips-7.38.5-vanilla/swig/vipsCC/VMask.i 2014-07-17 23:48:36.207794473 -0400
83620 +++ vips-7.38.5/swig/vipsCC/VMask.i 1969-12-31 19:00:00.000000000 -0500
83621 @@ -1,35 +0,0 @@
83622 -/* SWIG interface file for VMask.
83623 - */
83624 -
83625 -%module VMask
83626 -%{
83627 -#include <stdexcept>
83628 -#include <vips/vipscpp.h>
83629 -%}
83630 -
83631 -%import "VError.i"
83632 -%import "VImage.i"
83633 -
83634 -/* Need to override assignment to get refcounting working.
83635 - */
83636 -%rename(__assign__) *::operator=;
83637 -
83638 -/* [] is array subscript, as you'd expect.
83639 - */
83640 -%rename(__index__) vips::VIMask::operator[];
83641 -%rename(__index__) vips::VDMask::operator[];
83642 -
83643 -/* () is 2d array subscript, how odd!
83644 - */
83645 -%rename(__call__) vips::VIMask::operator();
83646 -%rename(__call__) vips::VDMask::operator();
83647 -
83648 -/* Type conversion operators renamed as functions.
83649 - */
83650 -%rename(convert_VImage) vips::VIMask::operator vips::VImage;
83651 -%rename(convert_VImage) vips::VDMask::operator vips::VImage;
83652 -
83653 -%rename(convert_VIMask) vips::VDMask::operator vips::VIMask;
83654 -%rename(convert_VDMask) vips::VIMask::operator vips::VDMask;
83655 -
83656 -%include vips/VMask.h
83657 diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/vmaskmodule.cxx vips-7.38.5/swig/vipsCC/vmaskmodule.cxx
83658 --- vips-7.38.5-vanilla/swig/vipsCC/vmaskmodule.cxx 2014-07-17 23:48:36.208794473 -0400
83659 +++ vips-7.38.5/swig/vipsCC/vmaskmodule.cxx 1969-12-31 19:00:00.000000000 -0500
83660 @@ -1,7363 +0,0 @@
83661 -/* ----------------------------------------------------------------------------
83662 - * This file was automatically generated by SWIG (http://www.swig.org).
83663 - * Version 2.0.10
83664 - *
83665 - * This file is not intended to be easily readable and contains a number of
83666 - * coding conventions designed to improve portability and efficiency. Do not make
83667 - * changes to this file unless you know what you are doing--modify the SWIG
83668 - * interface file instead.
83669 - * ----------------------------------------------------------------------------- */
83670 -
83671 -#define SWIGPYTHON
83672 -#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
83673 -
83674 -
83675 -#ifdef __cplusplus
83676 -/* SwigValueWrapper is described in swig.swg */
83677 -template<typename T> class SwigValueWrapper {
83678 - struct SwigMovePointer {
83679 - T *ptr;
83680 - SwigMovePointer(T *p) : ptr(p) { }
83681 - ~SwigMovePointer() { delete ptr; }
83682 - SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
83683 - } pointer;
83684 - SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
83685 - SwigValueWrapper(const SwigValueWrapper<T>& rhs);
83686 -public:
83687 - SwigValueWrapper() : pointer(0) { }
83688 - SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
83689 - operator T&() const { return *pointer.ptr; }
83690 - T *operator&() { return pointer.ptr; }
83691 -};
83692 -
83693 -template <typename T> T SwigValueInit() {
83694 - return T();
83695 -}
83696 -#endif
83697 -
83698 -/* -----------------------------------------------------------------------------
83699 - * This section contains generic SWIG labels for method/variable
83700 - * declarations/attributes, and other compiler dependent labels.
83701 - * ----------------------------------------------------------------------------- */
83702 -
83703 -/* template workaround for compilers that cannot correctly implement the C++ standard */
83704 -#ifndef SWIGTEMPLATEDISAMBIGUATOR
83705 -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
83706 -# define SWIGTEMPLATEDISAMBIGUATOR template
83707 -# elif defined(__HP_aCC)
83708 -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
83709 -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
83710 -# define SWIGTEMPLATEDISAMBIGUATOR template
83711 -# else
83712 -# define SWIGTEMPLATEDISAMBIGUATOR
83713 -# endif
83714 -#endif
83715 -
83716 -/* inline attribute */
83717 -#ifndef SWIGINLINE
83718 -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
83719 -# define SWIGINLINE inline
83720 -# else
83721 -# define SWIGINLINE
83722 -# endif
83723 -#endif
83724 -
83725 -/* attribute recognised by some compilers to avoid 'unused' warnings */
83726 -#ifndef SWIGUNUSED
83727 -# if defined(__GNUC__)
83728 -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
83729 -# define SWIGUNUSED __attribute__ ((__unused__))
83730 -# else
83731 -# define SWIGUNUSED
83732 -# endif
83733 -# elif defined(__ICC)
83734 -# define SWIGUNUSED __attribute__ ((__unused__))
83735 -# else
83736 -# define SWIGUNUSED
83737 -# endif
83738 -#endif
83739 -
83740 -#ifndef SWIG_MSC_UNSUPPRESS_4505
83741 -# if defined(_MSC_VER)
83742 -# pragma warning(disable : 4505) /* unreferenced local function has been removed */
83743 -# endif
83744 -#endif
83745 -
83746 -#ifndef SWIGUNUSEDPARM
83747 -# ifdef __cplusplus
83748 -# define SWIGUNUSEDPARM(p)
83749 -# else
83750 -# define SWIGUNUSEDPARM(p) p SWIGUNUSED
83751 -# endif
83752 -#endif
83753 -
83754 -/* internal SWIG method */
83755 -#ifndef SWIGINTERN
83756 -# define SWIGINTERN static SWIGUNUSED
83757 -#endif
83758 -
83759 -/* internal inline SWIG method */
83760 -#ifndef SWIGINTERNINLINE
83761 -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
83762 -#endif
83763 -
83764 -/* exporting methods */
83765 -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
83766 -# ifndef GCC_HASCLASSVISIBILITY
83767 -# define GCC_HASCLASSVISIBILITY
83768 -# endif
83769 -#endif
83770 -
83771 -#ifndef SWIGEXPORT
83772 -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
83773 -# if defined(STATIC_LINKED)
83774 -# define SWIGEXPORT
83775 -# else
83776 -# define SWIGEXPORT __declspec(dllexport)
83777 -# endif
83778 -# else
83779 -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
83780 -# define SWIGEXPORT __attribute__ ((visibility("default")))
83781 -# else
83782 -# define SWIGEXPORT
83783 -# endif
83784 -# endif
83785 -#endif
83786 -
83787 -/* calling conventions for Windows */
83788 -#ifndef SWIGSTDCALL
83789 -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
83790 -# define SWIGSTDCALL __stdcall
83791 -# else
83792 -# define SWIGSTDCALL
83793 -# endif
83794 -#endif
83795 -
83796 -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
83797 -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
83798 -# define _CRT_SECURE_NO_DEPRECATE
83799 -#endif
83800 -
83801 -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
83802 -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
83803 -# define _SCL_SECURE_NO_DEPRECATE
83804 -#endif
83805 -
83806 -
83807 -
83808 -/* Python.h has to appear first */
83809 -#include <Python.h>
83810 -
83811 -/* -----------------------------------------------------------------------------
83812 - * swigrun.swg
83813 - *
83814 - * This file contains generic C API SWIG runtime support for pointer
83815 - * type checking.
83816 - * ----------------------------------------------------------------------------- */
83817 -
83818 -/* This should only be incremented when either the layout of swig_type_info changes,
83819 - or for whatever reason, the runtime changes incompatibly */
83820 -#define SWIG_RUNTIME_VERSION "4"
83821 -
83822 -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
83823 -#ifdef SWIG_TYPE_TABLE
83824 -# define SWIG_QUOTE_STRING(x) #x
83825 -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
83826 -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
83827 -#else
83828 -# define SWIG_TYPE_TABLE_NAME
83829 -#endif
83830 -
83831 -/*
83832 - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
83833 - creating a static or dynamic library from the SWIG runtime code.
83834 - In 99.9% of the cases, SWIG just needs to declare them as 'static'.
83835 -
83836 - But only do this if strictly necessary, ie, if you have problems
83837 - with your compiler or suchlike.
83838 -*/
83839 -
83840 -#ifndef SWIGRUNTIME
83841 -# define SWIGRUNTIME SWIGINTERN
83842 -#endif
83843 -
83844 -#ifndef SWIGRUNTIMEINLINE
83845 -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
83846 -#endif
83847 -
83848 -/* Generic buffer size */
83849 -#ifndef SWIG_BUFFER_SIZE
83850 -# define SWIG_BUFFER_SIZE 1024
83851 -#endif
83852 -
83853 -/* Flags for pointer conversions */
83854 -#define SWIG_POINTER_DISOWN 0x1
83855 -#define SWIG_CAST_NEW_MEMORY 0x2
83856 -
83857 -/* Flags for new pointer objects */
83858 -#define SWIG_POINTER_OWN 0x1
83859 -
83860 -
83861 -/*
83862 - Flags/methods for returning states.
83863 -
83864 - The SWIG conversion methods, as ConvertPtr, return an integer
83865 - that tells if the conversion was successful or not. And if not,
83866 - an error code can be returned (see swigerrors.swg for the codes).
83867 -
83868 - Use the following macros/flags to set or process the returning
83869 - states.
83870 -
83871 - In old versions of SWIG, code such as the following was usually written:
83872 -
83873 - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
83874 - // success code
83875 - } else {
83876 - //fail code
83877 - }
83878 -
83879 - Now you can be more explicit:
83880 -
83881 - int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
83882 - if (SWIG_IsOK(res)) {
83883 - // success code
83884 - } else {
83885 - // fail code
83886 - }
83887 -
83888 - which is the same really, but now you can also do
83889 -
83890 - Type *ptr;
83891 - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
83892 - if (SWIG_IsOK(res)) {
83893 - // success code
83894 - if (SWIG_IsNewObj(res) {
83895 - ...
83896 - delete *ptr;
83897 - } else {
83898 - ...
83899 - }
83900 - } else {
83901 - // fail code
83902 - }
83903 -
83904 - I.e., now SWIG_ConvertPtr can return new objects and you can
83905 - identify the case and take care of the deallocation. Of course that
83906 - also requires SWIG_ConvertPtr to return new result values, such as
83907 -
83908 - int SWIG_ConvertPtr(obj, ptr,...) {
83909 - if (<obj is ok>) {
83910 - if (<need new object>) {
83911 - *ptr = <ptr to new allocated object>;
83912 - return SWIG_NEWOBJ;
83913 - } else {
83914 - *ptr = <ptr to old object>;
83915 - return SWIG_OLDOBJ;
83916 - }
83917 - } else {
83918 - return SWIG_BADOBJ;
83919 - }
83920 - }
83921 -
83922 - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
83923 - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
83924 - SWIG errors code.
83925 -
83926 - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
83927 - allows to return the 'cast rank', for example, if you have this
83928 -
83929 - int food(double)
83930 - int fooi(int);
83931 -
83932 - and you call
83933 -
83934 - food(1) // cast rank '1' (1 -> 1.0)
83935 - fooi(1) // cast rank '0'
83936 -
83937 - just use the SWIG_AddCast()/SWIG_CheckState()
83938 -*/
83939 -
83940 -#define SWIG_OK (0)
83941 -#define SWIG_ERROR (-1)
83942 -#define SWIG_IsOK(r) (r >= 0)
83943 -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
83944 -
83945 -/* The CastRankLimit says how many bits are used for the cast rank */
83946 -#define SWIG_CASTRANKLIMIT (1 << 8)
83947 -/* The NewMask denotes the object was created (using new/malloc) */
83948 -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
83949 -/* The TmpMask is for in/out typemaps that use temporal objects */
83950 -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
83951 -/* Simple returning values */
83952 -#define SWIG_BADOBJ (SWIG_ERROR)
83953 -#define SWIG_OLDOBJ (SWIG_OK)
83954 -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
83955 -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
83956 -/* Check, add and del mask methods */
83957 -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
83958 -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
83959 -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
83960 -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
83961 -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
83962 -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
83963 -
83964 -/* Cast-Rank Mode */
83965 -#if defined(SWIG_CASTRANK_MODE)
83966 -# ifndef SWIG_TypeRank
83967 -# define SWIG_TypeRank unsigned long
83968 -# endif
83969 -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */
83970 -# define SWIG_MAXCASTRANK (2)
83971 -# endif
83972 -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
83973 -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
83974 -SWIGINTERNINLINE int SWIG_AddCast(int r) {
83975 - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
83976 -}
83977 -SWIGINTERNINLINE int SWIG_CheckState(int r) {
83978 - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
83979 -}
83980 -#else /* no cast-rank mode */
83981 -# define SWIG_AddCast(r) (r)
83982 -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
83983 -#endif
83984 -
83985 -
83986 -#include <string.h>
83987 -
83988 -#ifdef __cplusplus
83989 -extern "C" {
83990 -#endif
83991 -
83992 -typedef void *(*swig_converter_func)(void *, int *);
83993 -typedef struct swig_type_info *(*swig_dycast_func)(void **);
83994 -
83995 -/* Structure to store information on one type */
83996 -typedef struct swig_type_info {
83997 - const char *name; /* mangled name of this type */
83998 - const char *str; /* human readable name of this type */
83999 - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
84000 - struct swig_cast_info *cast; /* linked list of types that can cast into this type */
84001 - void *clientdata; /* language specific type data */
84002 - int owndata; /* flag if the structure owns the clientdata */
84003 -} swig_type_info;
84004 -
84005 -/* Structure to store a type and conversion function used for casting */
84006 -typedef struct swig_cast_info {
84007 - swig_type_info *type; /* pointer to type that is equivalent to this type */
84008 - swig_converter_func converter; /* function to cast the void pointers */
84009 - struct swig_cast_info *next; /* pointer to next cast in linked list */
84010 - struct swig_cast_info *prev; /* pointer to the previous cast */
84011 -} swig_cast_info;
84012 -
84013 -/* Structure used to store module information
84014 - * Each module generates one structure like this, and the runtime collects
84015 - * all of these structures and stores them in a circularly linked list.*/
84016 -typedef struct swig_module_info {
84017 - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
84018 - size_t size; /* Number of types in this module */
84019 - struct swig_module_info *next; /* Pointer to next element in circularly linked list */
84020 - swig_type_info **type_initial; /* Array of initially generated type structures */
84021 - swig_cast_info **cast_initial; /* Array of initially generated casting structures */
84022 - void *clientdata; /* Language specific module data */
84023 -} swig_module_info;
84024 -
84025 -/*
84026 - Compare two type names skipping the space characters, therefore
84027 - "char*" == "char *" and "Class<int>" == "Class<int >", etc.
84028 -
84029 - Return 0 when the two name types are equivalent, as in
84030 - strncmp, but skipping ' '.
84031 -*/
84032 -SWIGRUNTIME int
84033 -SWIG_TypeNameComp(const char *f1, const char *l1,
84034 - const char *f2, const char *l2) {
84035 - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
84036 - while ((*f1 == ' ') && (f1 != l1)) ++f1;
84037 - while ((*f2 == ' ') && (f2 != l2)) ++f2;
84038 - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
84039 - }
84040 - return (int)((l1 - f1) - (l2 - f2));
84041 -}
84042 -
84043 -/*
84044 - Check type equivalence in a name list like <name1>|<name2>|...
84045 - Return 0 if equal, -1 if nb < tb, 1 if nb > tb
84046 -*/
84047 -SWIGRUNTIME int
84048 -SWIG_TypeCmp(const char *nb, const char *tb) {
84049 - int equiv = 1;
84050 - const char* te = tb + strlen(tb);
84051 - const char* ne = nb;
84052 - while (equiv != 0 && *ne) {
84053 - for (nb = ne; *ne; ++ne) {
84054 - if (*ne == '|') break;
84055 - }
84056 - equiv = SWIG_TypeNameComp(nb, ne, tb, te);
84057 - if (*ne) ++ne;
84058 - }
84059 - return equiv;
84060 -}
84061 -
84062 -/*
84063 - Check type equivalence in a name list like <name1>|<name2>|...
84064 - Return 0 if not equal, 1 if equal
84065 -*/
84066 -SWIGRUNTIME int
84067 -SWIG_TypeEquiv(const char *nb, const char *tb) {
84068 - return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
84069 -}
84070 -
84071 -/*
84072 - Check the typename
84073 -*/
84074 -SWIGRUNTIME swig_cast_info *
84075 -SWIG_TypeCheck(const char *c, swig_type_info *ty) {
84076 - if (ty) {
84077 - swig_cast_info *iter = ty->cast;
84078 - while (iter) {
84079 - if (strcmp(iter->type->name, c) == 0) {
84080 - if (iter == ty->cast)
84081 - return iter;
84082 - /* Move iter to the top of the linked list */
84083 - iter->prev->next = iter->next;
84084 - if (iter->next)
84085 - iter->next->prev = iter->prev;
84086 - iter->next = ty->cast;
84087 - iter->prev = 0;
84088 - if (ty->cast) ty->cast->prev = iter;
84089 - ty->cast = iter;
84090 - return iter;
84091 - }
84092 - iter = iter->next;
84093 - }
84094 - }
84095 - return 0;
84096 -}
84097 -
84098 -/*
84099 - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
84100 -*/
84101 -SWIGRUNTIME swig_cast_info *
84102 -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
84103 - if (ty) {
84104 - swig_cast_info *iter = ty->cast;
84105 - while (iter) {
84106 - if (iter->type == from) {
84107 - if (iter == ty->cast)
84108 - return iter;
84109 - /* Move iter to the top of the linked list */
84110 - iter->prev->next = iter->next;
84111 - if (iter->next)
84112 - iter->next->prev = iter->prev;
84113 - iter->next = ty->cast;
84114 - iter->prev = 0;
84115 - if (ty->cast) ty->cast->prev = iter;
84116 - ty->cast = iter;
84117 - return iter;
84118 - }
84119 - iter = iter->next;
84120 - }
84121 - }
84122 - return 0;
84123 -}
84124 -
84125 -/*
84126 - Cast a pointer up an inheritance hierarchy
84127 -*/
84128 -SWIGRUNTIMEINLINE void *
84129 -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
84130 - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
84131 -}
84132 -
84133 -/*
84134 - Dynamic pointer casting. Down an inheritance hierarchy
84135 -*/
84136 -SWIGRUNTIME swig_type_info *
84137 -SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
84138 - swig_type_info *lastty = ty;
84139 - if (!ty || !ty->dcast) return ty;
84140 - while (ty && (ty->dcast)) {
84141 - ty = (*ty->dcast)(ptr);
84142 - if (ty) lastty = ty;
84143 - }
84144 - return lastty;
84145 -}
84146 -
84147 -/*
84148 - Return the name associated with this type
84149 -*/
84150 -SWIGRUNTIMEINLINE const char *
84151 -SWIG_TypeName(const swig_type_info *ty) {
84152 - return ty->name;
84153 -}
84154 -
84155 -/*
84156 - Return the pretty name associated with this type,
84157 - that is an unmangled type name in a form presentable to the user.
84158 -*/
84159 -SWIGRUNTIME const char *
84160 -SWIG_TypePrettyName(const swig_type_info *type) {
84161 - /* The "str" field contains the equivalent pretty names of the
84162 - type, separated by vertical-bar characters. We choose
84163 - to print the last name, as it is often (?) the most
84164 - specific. */
84165 - if (!type) return NULL;
84166 - if (type->str != NULL) {
84167 - const char *last_name = type->str;
84168 - const char *s;
84169 - for (s = type->str; *s; s++)
84170 - if (*s == '|') last_name = s+1;
84171 - return last_name;
84172 - }
84173 - else
84174 - return type->name;
84175 -}
84176 -
84177 -/*
84178 - Set the clientdata field for a type
84179 -*/
84180 -SWIGRUNTIME void
84181 -SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
84182 - swig_cast_info *cast = ti->cast;
84183 - /* if (ti->clientdata == clientdata) return; */
84184 - ti->clientdata = clientdata;
84185 -
84186 - while (cast) {
84187 - if (!cast->converter) {
84188 - swig_type_info *tc = cast->type;
84189 - if (!tc->clientdata) {
84190 - SWIG_TypeClientData(tc, clientdata);
84191 - }
84192 - }
84193 - cast = cast->next;
84194 - }
84195 -}
84196 -SWIGRUNTIME void
84197 -SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
84198 - SWIG_TypeClientData(ti, clientdata);
84199 - ti->owndata = 1;
84200 -}
84201 -
84202 -/*
84203 - Search for a swig_type_info structure only by mangled name
84204 - Search is a O(log #types)
84205 -
84206 - We start searching at module start, and finish searching when start == end.
84207 - Note: if start == end at the beginning of the function, we go all the way around
84208 - the circular list.
84209 -*/
84210 -SWIGRUNTIME swig_type_info *
84211 -SWIG_MangledTypeQueryModule(swig_module_info *start,
84212 - swig_module_info *end,
84213 - const char *name) {
84214 - swig_module_info *iter = start;
84215 - do {
84216 - if (iter->size) {
84217 - register size_t l = 0;
84218 - register size_t r = iter->size - 1;
84219 - do {
84220 - /* since l+r >= 0, we can (>> 1) instead (/ 2) */
84221 - register size_t i = (l + r) >> 1;
84222 - const char *iname = iter->types[i]->name;
84223 - if (iname) {
84224 - register int compare = strcmp(name, iname);
84225 - if (compare == 0) {
84226 - return iter->types[i];
84227 - } else if (compare < 0) {
84228 - if (i) {
84229 - r = i - 1;
84230 - } else {
84231 - break;
84232 - }
84233 - } else if (compare > 0) {
84234 - l = i + 1;
84235 - }
84236 - } else {
84237 - break; /* should never happen */
84238 - }
84239 - } while (l <= r);
84240 - }
84241 - iter = iter->next;
84242 - } while (iter != end);
84243 - return 0;
84244 -}
84245 -
84246 -/*
84247 - Search for a swig_type_info structure for either a mangled name or a human readable name.
84248 - It first searches the mangled names of the types, which is a O(log #types)
84249 - If a type is not found it then searches the human readable names, which is O(#types).
84250 -
84251 - We start searching at module start, and finish searching when start == end.
84252 - Note: if start == end at the beginning of the function, we go all the way around
84253 - the circular list.
84254 -*/
84255 -SWIGRUNTIME swig_type_info *
84256 -SWIG_TypeQueryModule(swig_module_info *start,
84257 - swig_module_info *end,
84258 - const char *name) {
84259 - /* STEP 1: Search the name field using binary search */
84260 - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
84261 - if (ret) {
84262 - return ret;
84263 - } else {
84264 - /* STEP 2: If the type hasn't been found, do a complete search
84265 - of the str field (the human readable name) */
84266 - swig_module_info *iter = start;
84267 - do {
84268 - register size_t i = 0;
84269 - for (; i < iter->size; ++i) {
84270 - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
84271 - return iter->types[i];
84272 - }
84273 - iter = iter->next;
84274 - } while (iter != end);
84275 - }
84276 -
84277 - /* neither found a match */
84278 - return 0;
84279 -}
84280 -
84281 -/*
84282 - Pack binary data into a string
84283 -*/
84284 -SWIGRUNTIME char *
84285 -SWIG_PackData(char *c, void *ptr, size_t sz) {
84286 - static const char hex[17] = "0123456789abcdef";
84287 - register const unsigned char *u = (unsigned char *) ptr;
84288 - register const unsigned char *eu = u + sz;
84289 - for (; u != eu; ++u) {
84290 - register unsigned char uu = *u;
84291 - *(c++) = hex[(uu & 0xf0) >> 4];
84292 - *(c++) = hex[uu & 0xf];
84293 - }
84294 - return c;
84295 -}
84296 -
84297 -/*
84298 - Unpack binary data from a string
84299 -*/
84300 -SWIGRUNTIME const char *
84301 -SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
84302 - register unsigned char *u = (unsigned char *) ptr;
84303 - register const unsigned char *eu = u + sz;
84304 - for (; u != eu; ++u) {
84305 - register char d = *(c++);
84306 - register unsigned char uu;
84307 - if ((d >= '0') && (d <= '9'))
84308 - uu = ((d - '0') << 4);
84309 - else if ((d >= 'a') && (d <= 'f'))
84310 - uu = ((d - ('a'-10)) << 4);
84311 - else
84312 - return (char *) 0;
84313 - d = *(c++);
84314 - if ((d >= '0') && (d <= '9'))
84315 - uu |= (d - '0');
84316 - else if ((d >= 'a') && (d <= 'f'))
84317 - uu |= (d - ('a'-10));
84318 - else
84319 - return (char *) 0;
84320 - *u = uu;
84321 - }
84322 - return c;
84323 -}
84324 -
84325 -/*
84326 - Pack 'void *' into a string buffer.
84327 -*/
84328 -SWIGRUNTIME char *
84329 -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
84330 - char *r = buff;
84331 - if ((2*sizeof(void *) + 2) > bsz) return 0;
84332 - *(r++) = '_';
84333 - r = SWIG_PackData(r,&ptr,sizeof(void *));
84334 - if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
84335 - strcpy(r,name);
84336 - return buff;
84337 -}
84338 -
84339 -SWIGRUNTIME const char *
84340 -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
84341 - if (*c != '_') {
84342 - if (strcmp(c,"NULL") == 0) {
84343 - *ptr = (void *) 0;
84344 - return name;
84345 - } else {
84346 - return 0;
84347 - }
84348 - }
84349 - return SWIG_UnpackData(++c,ptr,sizeof(void *));
84350 -}
84351 -
84352 -SWIGRUNTIME char *
84353 -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
84354 - char *r = buff;
84355 - size_t lname = (name ? strlen(name) : 0);
84356 - if ((2*sz + 2 + lname) > bsz) return 0;
84357 - *(r++) = '_';
84358 - r = SWIG_PackData(r,ptr,sz);
84359 - if (lname) {
84360 - strncpy(r,name,lname+1);
84361 - } else {
84362 - *r = 0;
84363 - }
84364 - return buff;
84365 -}
84366 -
84367 -SWIGRUNTIME const char *
84368 -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
84369 - if (*c != '_') {
84370 - if (strcmp(c,"NULL") == 0) {
84371 - memset(ptr,0,sz);
84372 - return name;
84373 - } else {
84374 - return 0;
84375 - }
84376 - }
84377 - return SWIG_UnpackData(++c,ptr,sz);
84378 -}
84379 -
84380 -#ifdef __cplusplus
84381 -}
84382 -#endif
84383 -
84384 -/* Errors in SWIG */
84385 -#define SWIG_UnknownError -1
84386 -#define SWIG_IOError -2
84387 -#define SWIG_RuntimeError -3
84388 -#define SWIG_IndexError -4
84389 -#define SWIG_TypeError -5
84390 -#define SWIG_DivisionByZero -6
84391 -#define SWIG_OverflowError -7
84392 -#define SWIG_SyntaxError -8
84393 -#define SWIG_ValueError -9
84394 -#define SWIG_SystemError -10
84395 -#define SWIG_AttributeError -11
84396 -#define SWIG_MemoryError -12
84397 -#define SWIG_NullReferenceError -13
84398 -
84399 -
84400 -
84401 -/* Compatibility macros for Python 3 */
84402 -#if PY_VERSION_HEX >= 0x03000000
84403 -
84404 -#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
84405 -#define PyInt_Check(x) PyLong_Check(x)
84406 -#define PyInt_AsLong(x) PyLong_AsLong(x)
84407 -#define PyInt_FromLong(x) PyLong_FromLong(x)
84408 -#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
84409 -#define PyString_Check(name) PyBytes_Check(name)
84410 -#define PyString_FromString(x) PyUnicode_FromString(x)
84411 -#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
84412 -#define PyString_AsString(str) PyBytes_AsString(str)
84413 -#define PyString_Size(str) PyBytes_Size(str)
84414 -#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
84415 -#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
84416 -#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
84417 -#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
84418 -
84419 -#endif
84420 -
84421 -#ifndef Py_TYPE
84422 -# define Py_TYPE(op) ((op)->ob_type)
84423 -#endif
84424 -
84425 -/* SWIG APIs for compatibility of both Python 2 & 3 */
84426 -
84427 -#if PY_VERSION_HEX >= 0x03000000
84428 -# define SWIG_Python_str_FromFormat PyUnicode_FromFormat
84429 -#else
84430 -# define SWIG_Python_str_FromFormat PyString_FromFormat
84431 -#endif
84432 -
84433 -
84434 -/* Warning: This function will allocate a new string in Python 3,
84435 - * so please call SWIG_Python_str_DelForPy3(x) to free the space.
84436 - */
84437 -SWIGINTERN char*
84438 -SWIG_Python_str_AsChar(PyObject *str)
84439 -{
84440 -#if PY_VERSION_HEX >= 0x03000000
84441 - char *cstr;
84442 - char *newstr;
84443 - Py_ssize_t len;
84444 - str = PyUnicode_AsUTF8String(str);
84445 - PyBytes_AsStringAndSize(str, &cstr, &len);
84446 - newstr = (char *) malloc(len+1);
84447 - memcpy(newstr, cstr, len+1);
84448 - Py_XDECREF(str);
84449 - return newstr;
84450 -#else
84451 - return PyString_AsString(str);
84452 -#endif
84453 -}
84454 -
84455 -#if PY_VERSION_HEX >= 0x03000000
84456 -# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
84457 -#else
84458 -# define SWIG_Python_str_DelForPy3(x)
84459 -#endif
84460 -
84461 -
84462 -SWIGINTERN PyObject*
84463 -SWIG_Python_str_FromChar(const char *c)
84464 -{
84465 -#if PY_VERSION_HEX >= 0x03000000
84466 - return PyUnicode_FromString(c);
84467 -#else
84468 - return PyString_FromString(c);
84469 -#endif
84470 -}
84471 -
84472 -/* Add PyOS_snprintf for old Pythons */
84473 -#if PY_VERSION_HEX < 0x02020000
84474 -# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
84475 -# define PyOS_snprintf _snprintf
84476 -# else
84477 -# define PyOS_snprintf snprintf
84478 -# endif
84479 -#endif
84480 -
84481 -/* A crude PyString_FromFormat implementation for old Pythons */
84482 -#if PY_VERSION_HEX < 0x02020000
84483 -
84484 -#ifndef SWIG_PYBUFFER_SIZE
84485 -# define SWIG_PYBUFFER_SIZE 1024
84486 -#endif
84487 -
84488 -static PyObject *
84489 -PyString_FromFormat(const char *fmt, ...) {
84490 - va_list ap;
84491 - char buf[SWIG_PYBUFFER_SIZE * 2];
84492 - int res;
84493 - va_start(ap, fmt);
84494 - res = vsnprintf(buf, sizeof(buf), fmt, ap);
84495 - va_end(ap);
84496 - return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
84497 -}
84498 -#endif
84499 -
84500 -/* Add PyObject_Del for old Pythons */
84501 -#if PY_VERSION_HEX < 0x01060000
84502 -# define PyObject_Del(op) PyMem_DEL((op))
84503 -#endif
84504 -#ifndef PyObject_DEL
84505 -# define PyObject_DEL PyObject_Del
84506 -#endif
84507 -
84508 -/* A crude PyExc_StopIteration exception for old Pythons */
84509 -#if PY_VERSION_HEX < 0x02020000
84510 -# ifndef PyExc_StopIteration
84511 -# define PyExc_StopIteration PyExc_RuntimeError
84512 -# endif
84513 -# ifndef PyObject_GenericGetAttr
84514 -# define PyObject_GenericGetAttr 0
84515 -# endif
84516 -#endif
84517 -
84518 -/* Py_NotImplemented is defined in 2.1 and up. */
84519 -#if PY_VERSION_HEX < 0x02010000
84520 -# ifndef Py_NotImplemented
84521 -# define Py_NotImplemented PyExc_RuntimeError
84522 -# endif
84523 -#endif
84524 -
84525 -/* A crude PyString_AsStringAndSize implementation for old Pythons */
84526 -#if PY_VERSION_HEX < 0x02010000
84527 -# ifndef PyString_AsStringAndSize
84528 -# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
84529 -# endif
84530 -#endif
84531 -
84532 -/* PySequence_Size for old Pythons */
84533 -#if PY_VERSION_HEX < 0x02000000
84534 -# ifndef PySequence_Size
84535 -# define PySequence_Size PySequence_Length
84536 -# endif
84537 -#endif
84538 -
84539 -/* PyBool_FromLong for old Pythons */
84540 -#if PY_VERSION_HEX < 0x02030000
84541 -static
84542 -PyObject *PyBool_FromLong(long ok)
84543 -{
84544 - PyObject *result = ok ? Py_True : Py_False;
84545 - Py_INCREF(result);
84546 - return result;
84547 -}
84548 -#endif
84549 -
84550 -/* Py_ssize_t for old Pythons */
84551 -/* This code is as recommended by: */
84552 -/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
84553 -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
84554 -typedef int Py_ssize_t;
84555 -# define PY_SSIZE_T_MAX INT_MAX
84556 -# define PY_SSIZE_T_MIN INT_MIN
84557 -typedef inquiry lenfunc;
84558 -typedef intargfunc ssizeargfunc;
84559 -typedef intintargfunc ssizessizeargfunc;
84560 -typedef intobjargproc ssizeobjargproc;
84561 -typedef intintobjargproc ssizessizeobjargproc;
84562 -typedef getreadbufferproc readbufferproc;
84563 -typedef getwritebufferproc writebufferproc;
84564 -typedef getsegcountproc segcountproc;
84565 -typedef getcharbufferproc charbufferproc;
84566 -static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
84567 -{
84568 - long result = 0;
84569 - PyObject *i = PyNumber_Int(x);
84570 - if (i) {
84571 - result = PyInt_AsLong(i);
84572 - Py_DECREF(i);
84573 - }
84574 - return result;
84575 -}
84576 -#endif
84577 -
84578 -#if PY_VERSION_HEX < 0x02050000
84579 -#define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
84580 -#endif
84581 -
84582 -#if PY_VERSION_HEX < 0x02040000
84583 -#define Py_VISIT(op) \
84584 - do { \
84585 - if (op) { \
84586 - int vret = visit((op), arg); \
84587 - if (vret) \
84588 - return vret; \
84589 - } \
84590 - } while (0)
84591 -#endif
84592 -
84593 -#if PY_VERSION_HEX < 0x02030000
84594 -typedef struct {
84595 - PyTypeObject type;
84596 - PyNumberMethods as_number;
84597 - PyMappingMethods as_mapping;
84598 - PySequenceMethods as_sequence;
84599 - PyBufferProcs as_buffer;
84600 - PyObject *name, *slots;
84601 -} PyHeapTypeObject;
84602 -#endif
84603 -
84604 -#if PY_VERSION_HEX < 0x02030000
84605 -typedef destructor freefunc;
84606 -#endif
84607 -
84608 -#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
84609 - (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
84610 - (PY_MAJOR_VERSION > 3))
84611 -# define SWIGPY_USE_CAPSULE
84612 -# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
84613 -#endif
84614 -
84615 -#if PY_VERSION_HEX < 0x03020000
84616 -#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
84617 -#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
84618 -#endif
84619 -
84620 -/* -----------------------------------------------------------------------------
84621 - * error manipulation
84622 - * ----------------------------------------------------------------------------- */
84623 -
84624 -SWIGRUNTIME PyObject*
84625 -SWIG_Python_ErrorType(int code) {
84626 - PyObject* type = 0;
84627 - switch(code) {
84628 - case SWIG_MemoryError:
84629 - type = PyExc_MemoryError;
84630 - break;
84631 - case SWIG_IOError:
84632 - type = PyExc_IOError;
84633 - break;
84634 - case SWIG_RuntimeError:
84635 - type = PyExc_RuntimeError;
84636 - break;
84637 - case SWIG_IndexError:
84638 - type = PyExc_IndexError;
84639 - break;
84640 - case SWIG_TypeError:
84641 - type = PyExc_TypeError;
84642 - break;
84643 - case SWIG_DivisionByZero:
84644 - type = PyExc_ZeroDivisionError;
84645 - break;
84646 - case SWIG_OverflowError:
84647 - type = PyExc_OverflowError;
84648 - break;
84649 - case SWIG_SyntaxError:
84650 - type = PyExc_SyntaxError;
84651 - break;
84652 - case SWIG_ValueError:
84653 - type = PyExc_ValueError;
84654 - break;
84655 - case SWIG_SystemError:
84656 - type = PyExc_SystemError;
84657 - break;
84658 - case SWIG_AttributeError:
84659 - type = PyExc_AttributeError;
84660 - break;
84661 - default:
84662 - type = PyExc_RuntimeError;
84663 - }
84664 - return type;
84665 -}
84666 -
84667 -
84668 -SWIGRUNTIME void
84669 -SWIG_Python_AddErrorMsg(const char* mesg)
84670 -{
84671 - PyObject *type = 0;
84672 - PyObject *value = 0;
84673 - PyObject *traceback = 0;
84674 -
84675 - if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
84676 - if (value) {
84677 - char *tmp;
84678 - PyObject *old_str = PyObject_Str(value);
84679 - PyErr_Clear();
84680 - Py_XINCREF(type);
84681 -
84682 - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
84683 - SWIG_Python_str_DelForPy3(tmp);
84684 - Py_DECREF(old_str);
84685 - Py_DECREF(value);
84686 - } else {
84687 - PyErr_SetString(PyExc_RuntimeError, mesg);
84688 - }
84689 -}
84690 -
84691 -#if defined(SWIG_PYTHON_NO_THREADS)
84692 -# if defined(SWIG_PYTHON_THREADS)
84693 -# undef SWIG_PYTHON_THREADS
84694 -# endif
84695 -#endif
84696 -#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
84697 -# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
84698 -# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
84699 -# define SWIG_PYTHON_USE_GIL
84700 -# endif
84701 -# endif
84702 -# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
84703 -# ifndef SWIG_PYTHON_INITIALIZE_THREADS
84704 -# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
84705 -# endif
84706 -# ifdef __cplusplus /* C++ code */
84707 - class SWIG_Python_Thread_Block {
84708 - bool status;
84709 - PyGILState_STATE state;
84710 - public:
84711 - void end() { if (status) { PyGILState_Release(state); status = false;} }
84712 - SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
84713 - ~SWIG_Python_Thread_Block() { end(); }
84714 - };
84715 - class SWIG_Python_Thread_Allow {
84716 - bool status;
84717 - PyThreadState *save;
84718 - public:
84719 - void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
84720 - SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
84721 - ~SWIG_Python_Thread_Allow() { end(); }
84722 - };
84723 -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
84724 -# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
84725 -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
84726 -# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
84727 -# else /* C code */
84728 -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
84729 -# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
84730 -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
84731 -# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
84732 -# endif
84733 -# else /* Old thread way, not implemented, user must provide it */
84734 -# if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
84735 -# define SWIG_PYTHON_INITIALIZE_THREADS
84736 -# endif
84737 -# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
84738 -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
84739 -# endif
84740 -# if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
84741 -# define SWIG_PYTHON_THREAD_END_BLOCK
84742 -# endif
84743 -# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
84744 -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
84745 -# endif
84746 -# if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
84747 -# define SWIG_PYTHON_THREAD_END_ALLOW
84748 -# endif
84749 -# endif
84750 -#else /* No thread support */
84751 -# define SWIG_PYTHON_INITIALIZE_THREADS
84752 -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
84753 -# define SWIG_PYTHON_THREAD_END_BLOCK
84754 -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
84755 -# define SWIG_PYTHON_THREAD_END_ALLOW
84756 -#endif
84757 -
84758 -/* -----------------------------------------------------------------------------
84759 - * Python API portion that goes into the runtime
84760 - * ----------------------------------------------------------------------------- */
84761 -
84762 -#ifdef __cplusplus
84763 -extern "C" {
84764 -#endif
84765 -
84766 -/* -----------------------------------------------------------------------------
84767 - * Constant declarations
84768 - * ----------------------------------------------------------------------------- */
84769 -
84770 -/* Constant Types */
84771 -#define SWIG_PY_POINTER 4
84772 -#define SWIG_PY_BINARY 5
84773 -
84774 -/* Constant information structure */
84775 -typedef struct swig_const_info {
84776 - int type;
84777 - char *name;
84778 - long lvalue;
84779 - double dvalue;
84780 - void *pvalue;
84781 - swig_type_info **ptype;
84782 -} swig_const_info;
84783 -
84784 -
84785 -/* -----------------------------------------------------------------------------
84786 - * Wrapper of PyInstanceMethod_New() used in Python 3
84787 - * It is exported to the generated module, used for -fastproxy
84788 - * ----------------------------------------------------------------------------- */
84789 -#if PY_VERSION_HEX >= 0x03000000
84790 -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
84791 -{
84792 - return PyInstanceMethod_New(func);
84793 -}
84794 -#else
84795 -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
84796 -{
84797 - return NULL;
84798 -}
84799 -#endif
84800 -
84801 -#ifdef __cplusplus
84802 -}
84803 -#endif
84804 -
84805 -
84806 -/* -----------------------------------------------------------------------------
84807 - * pyrun.swg
84808 - *
84809 - * This file contains the runtime support for Python modules
84810 - * and includes code for managing global variables and pointer
84811 - * type checking.
84812 - *
84813 - * ----------------------------------------------------------------------------- */
84814 -
84815 -/* Common SWIG API */
84816 -
84817 -/* for raw pointers */
84818 -#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
84819 -#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
84820 -#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
84821 -
84822 -#ifdef SWIGPYTHON_BUILTIN
84823 -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
84824 -#else
84825 -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
84826 -#endif
84827 -
84828 -#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
84829 -
84830 -#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
84831 -#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
84832 -#define swig_owntype int
84833 -
84834 -/* for raw packed data */
84835 -#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
84836 -#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
84837 -
84838 -/* for class or struct pointers */
84839 -#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
84840 -#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
84841 -
84842 -/* for C or C++ function pointers */
84843 -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
84844 -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
84845 -
84846 -/* for C++ member pointers, ie, member methods */
84847 -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
84848 -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
84849 -
84850 -
84851 -/* Runtime API */
84852 -
84853 -#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
84854 -#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
84855 -#define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
84856 -
84857 -#define SWIG_SetErrorObj SWIG_Python_SetErrorObj
84858 -#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
84859 -#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
84860 -#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
84861 -#define SWIG_fail goto fail
84862 -
84863 -
84864 -/* Runtime API implementation */
84865 -
84866 -/* Error manipulation */
84867 -
84868 -SWIGINTERN void
84869 -SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
84870 - SWIG_PYTHON_THREAD_BEGIN_BLOCK;
84871 - PyErr_SetObject(errtype, obj);
84872 - Py_DECREF(obj);
84873 - SWIG_PYTHON_THREAD_END_BLOCK;
84874 -}
84875 -
84876 -SWIGINTERN void
84877 -SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
84878 - SWIG_PYTHON_THREAD_BEGIN_BLOCK;
84879 - PyErr_SetString(errtype, msg);
84880 - SWIG_PYTHON_THREAD_END_BLOCK;
84881 -}
84882 -
84883 -#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
84884 -
84885 -/* Set a constant value */
84886 -
84887 -#if defined(SWIGPYTHON_BUILTIN)
84888 -
84889 -SWIGINTERN void
84890 -SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
84891 - PyObject *s = PyString_InternFromString(key);
84892 - PyList_Append(seq, s);
84893 - Py_DECREF(s);
84894 -}
84895 -
84896 -SWIGINTERN void
84897 -SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
84898 -#if PY_VERSION_HEX < 0x02030000
84899 - PyDict_SetItemString(d, (char *)name, obj);
84900 -#else
84901 - PyDict_SetItemString(d, name, obj);
84902 -#endif
84903 - Py_DECREF(obj);
84904 - if (public_interface)
84905 - SwigPyBuiltin_AddPublicSymbol(public_interface, name);
84906 -}
84907 -
84908 -#else
84909 -
84910 -SWIGINTERN void
84911 -SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
84912 -#if PY_VERSION_HEX < 0x02030000
84913 - PyDict_SetItemString(d, (char *)name, obj);
84914 -#else
84915 - PyDict_SetItemString(d, name, obj);
84916 -#endif
84917 - Py_DECREF(obj);
84918 -}
84919 -
84920 -#endif
84921 -
84922 -/* Append a value to the result obj */
84923 -
84924 -SWIGINTERN PyObject*
84925 -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
84926 -#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
84927 - if (!result) {
84928 - result = obj;
84929 - } else if (result == Py_None) {
84930 - Py_DECREF(result);
84931 - result = obj;
84932 - } else {
84933 - if (!PyList_Check(result)) {
84934 - PyObject *o2 = result;
84935 - result = PyList_New(1);
84936 - PyList_SetItem(result, 0, o2);
84937 - }
84938 - PyList_Append(result,obj);
84939 - Py_DECREF(obj);
84940 - }
84941 - return result;
84942 -#else
84943 - PyObject* o2;
84944 - PyObject* o3;
84945 - if (!result) {
84946 - result = obj;
84947 - } else if (result == Py_None) {
84948 - Py_DECREF(result);
84949 - result = obj;
84950 - } else {
84951 - if (!PyTuple_Check(result)) {
84952 - o2 = result;
84953 - result = PyTuple_New(1);
84954 - PyTuple_SET_ITEM(result, 0, o2);
84955 - }
84956 - o3 = PyTuple_New(1);
84957 - PyTuple_SET_ITEM(o3, 0, obj);
84958 - o2 = result;
84959 - result = PySequence_Concat(o2, o3);
84960 - Py_DECREF(o2);
84961 - Py_DECREF(o3);
84962 - }
84963 - return result;
84964 -#endif
84965 -}
84966 -
84967 -/* Unpack the argument tuple */
84968 -
84969 -SWIGINTERN int
84970 -SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
84971 -{
84972 - if (!args) {
84973 - if (!min && !max) {
84974 - return 1;
84975 - } else {
84976 - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
84977 - name, (min == max ? "" : "at least "), (int)min);
84978 - return 0;
84979 - }
84980 - }
84981 - if (!PyTuple_Check(args)) {
84982 - if (min <= 1 && max >= 1) {
84983 - register int i;
84984 - objs[0] = args;
84985 - for (i = 1; i < max; ++i) {
84986 - objs[i] = 0;
84987 - }
84988 - return 2;
84989 - }
84990 - PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
84991 - return 0;
84992 - } else {
84993 - register Py_ssize_t l = PyTuple_GET_SIZE(args);
84994 - if (l < min) {
84995 - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
84996 - name, (min == max ? "" : "at least "), (int)min, (int)l);
84997 - return 0;
84998 - } else if (l > max) {
84999 - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
85000 - name, (min == max ? "" : "at most "), (int)max, (int)l);
85001 - return 0;
85002 - } else {
85003 - register int i;
85004 - for (i = 0; i < l; ++i) {
85005 - objs[i] = PyTuple_GET_ITEM(args, i);
85006 - }
85007 - for (; l < max; ++l) {
85008 - objs[l] = 0;
85009 - }
85010 - return i + 1;
85011 - }
85012 - }
85013 -}
85014 -
85015 -/* A functor is a function object with one single object argument */
85016 -#if PY_VERSION_HEX >= 0x02020000
85017 -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
85018 -#else
85019 -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
85020 -#endif
85021 -
85022 -/*
85023 - Helper for static pointer initialization for both C and C++ code, for example
85024 - static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
85025 -*/
85026 -#ifdef __cplusplus
85027 -#define SWIG_STATIC_POINTER(var) var
85028 -#else
85029 -#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
85030 -#endif
85031 -
85032 -/* -----------------------------------------------------------------------------
85033 - * Pointer declarations
85034 - * ----------------------------------------------------------------------------- */
85035 -
85036 -/* Flags for new pointer objects */
85037 -#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
85038 -#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
85039 -
85040 -#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
85041 -
85042 -#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
85043 -#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
85044 -
85045 -#ifdef __cplusplus
85046 -extern "C" {
85047 -#endif
85048 -
85049 -/* How to access Py_None */
85050 -#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
85051 -# ifndef SWIG_PYTHON_NO_BUILD_NONE
85052 -# ifndef SWIG_PYTHON_BUILD_NONE
85053 -# define SWIG_PYTHON_BUILD_NONE
85054 -# endif
85055 -# endif
85056 -#endif
85057 -
85058 -#ifdef SWIG_PYTHON_BUILD_NONE
85059 -# ifdef Py_None
85060 -# undef Py_None
85061 -# define Py_None SWIG_Py_None()
85062 -# endif
85063 -SWIGRUNTIMEINLINE PyObject *
85064 -_SWIG_Py_None(void)
85065 -{
85066 - PyObject *none = Py_BuildValue((char*)"");
85067 - Py_DECREF(none);
85068 - return none;
85069 -}
85070 -SWIGRUNTIME PyObject *
85071 -SWIG_Py_None(void)
85072 -{
85073 - static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
85074 - return none;
85075 -}
85076 -#endif
85077 -
85078 -/* The python void return value */
85079 -
85080 -SWIGRUNTIMEINLINE PyObject *
85081 -SWIG_Py_Void(void)
85082 -{
85083 - PyObject *none = Py_None;
85084 - Py_INCREF(none);
85085 - return none;
85086 -}
85087 -
85088 -/* SwigPyClientData */
85089 -
85090 -typedef struct {
85091 - PyObject *klass;
85092 - PyObject *newraw;
85093 - PyObject *newargs;
85094 - PyObject *destroy;
85095 - int delargs;
85096 - int implicitconv;
85097 - PyTypeObject *pytype;
85098 -} SwigPyClientData;
85099 -
85100 -SWIGRUNTIMEINLINE int
85101 -SWIG_Python_CheckImplicit(swig_type_info *ty)
85102 -{
85103 - SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
85104 - return data ? data->implicitconv : 0;
85105 -}
85106 -
85107 -SWIGRUNTIMEINLINE PyObject *
85108 -SWIG_Python_ExceptionType(swig_type_info *desc) {
85109 - SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
85110 - PyObject *klass = data ? data->klass : 0;
85111 - return (klass ? klass : PyExc_RuntimeError);
85112 -}
85113 -
85114 -
85115 -SWIGRUNTIME SwigPyClientData *
85116 -SwigPyClientData_New(PyObject* obj)
85117 -{
85118 - if (!obj) {
85119 - return 0;
85120 - } else {
85121 - SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
85122 - /* the klass element */
85123 - data->klass = obj;
85124 - Py_INCREF(data->klass);
85125 - /* the newraw method and newargs arguments used to create a new raw instance */
85126 - if (PyClass_Check(obj)) {
85127 - data->newraw = 0;
85128 - data->newargs = obj;
85129 - Py_INCREF(obj);
85130 - } else {
85131 -#if (PY_VERSION_HEX < 0x02020000)
85132 - data->newraw = 0;
85133 -#else
85134 - data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
85135 -#endif
85136 - if (data->newraw) {
85137 - Py_INCREF(data->newraw);
85138 - data->newargs = PyTuple_New(1);
85139 - PyTuple_SetItem(data->newargs, 0, obj);
85140 - } else {
85141 - data->newargs = obj;
85142 - }
85143 - Py_INCREF(data->newargs);
85144 - }
85145 - /* the destroy method, aka as the C++ delete method */
85146 - data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
85147 - if (PyErr_Occurred()) {
85148 - PyErr_Clear();
85149 - data->destroy = 0;
85150 - }
85151 - if (data->destroy) {
85152 - int flags;
85153 - Py_INCREF(data->destroy);
85154 - flags = PyCFunction_GET_FLAGS(data->destroy);
85155 -#ifdef METH_O
85156 - data->delargs = !(flags & (METH_O));
85157 -#else
85158 - data->delargs = 0;
85159 -#endif
85160 - } else {
85161 - data->delargs = 0;
85162 - }
85163 - data->implicitconv = 0;
85164 - data->pytype = 0;
85165 - return data;
85166 - }
85167 -}
85168 -
85169 -SWIGRUNTIME void
85170 -SwigPyClientData_Del(SwigPyClientData *data) {
85171 - Py_XDECREF(data->newraw);
85172 - Py_XDECREF(data->newargs);
85173 - Py_XDECREF(data->destroy);
85174 -}
85175 -
85176 -/* =============== SwigPyObject =====================*/
85177 -
85178 -typedef struct {
85179 - PyObject_HEAD
85180 - void *ptr;
85181 - swig_type_info *ty;
85182 - int own;
85183 - PyObject *next;
85184 -#ifdef SWIGPYTHON_BUILTIN
85185 - PyObject *dict;
85186 -#endif
85187 -} SwigPyObject;
85188 -
85189 -SWIGRUNTIME PyObject *
85190 -SwigPyObject_long(SwigPyObject *v)
85191 -{
85192 - return PyLong_FromVoidPtr(v->ptr);
85193 -}
85194 -
85195 -SWIGRUNTIME PyObject *
85196 -SwigPyObject_format(const char* fmt, SwigPyObject *v)
85197 -{
85198 - PyObject *res = NULL;
85199 - PyObject *args = PyTuple_New(1);
85200 - if (args) {
85201 - if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
85202 - PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
85203 - if (ofmt) {
85204 -#if PY_VERSION_HEX >= 0x03000000
85205 - res = PyUnicode_Format(ofmt,args);
85206 -#else
85207 - res = PyString_Format(ofmt,args);
85208 -#endif
85209 - Py_DECREF(ofmt);
85210 - }
85211 - Py_DECREF(args);
85212 - }
85213 - }
85214 - return res;
85215 -}
85216 -
85217 -SWIGRUNTIME PyObject *
85218 -SwigPyObject_oct(SwigPyObject *v)
85219 -{
85220 - return SwigPyObject_format("%o",v);
85221 -}
85222 -
85223 -SWIGRUNTIME PyObject *
85224 -SwigPyObject_hex(SwigPyObject *v)
85225 -{
85226 - return SwigPyObject_format("%x",v);
85227 -}
85228 -
85229 -SWIGRUNTIME PyObject *
85230 -#ifdef METH_NOARGS
85231 -SwigPyObject_repr(SwigPyObject *v)
85232 -#else
85233 -SwigPyObject_repr(SwigPyObject *v, PyObject *args)
85234 -#endif
85235 -{
85236 - const char *name = SWIG_TypePrettyName(v->ty);
85237 - PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
85238 - if (v->next) {
85239 -# ifdef METH_NOARGS
85240 - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
85241 -# else
85242 - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
85243 -# endif
85244 -# if PY_VERSION_HEX >= 0x03000000
85245 - PyObject *joined = PyUnicode_Concat(repr, nrep);
85246 - Py_DecRef(repr);
85247 - Py_DecRef(nrep);
85248 - repr = joined;
85249 -# else
85250 - PyString_ConcatAndDel(&repr,nrep);
85251 -# endif
85252 - }
85253 - return repr;
85254 -}
85255 -
85256 -SWIGRUNTIME int
85257 -SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
85258 -{
85259 - char *str;
85260 -#ifdef METH_NOARGS
85261 - PyObject *repr = SwigPyObject_repr(v);
85262 -#else
85263 - PyObject *repr = SwigPyObject_repr(v, NULL);
85264 -#endif
85265 - if (repr) {
85266 - str = SWIG_Python_str_AsChar(repr);
85267 - fputs(str, fp);
85268 - SWIG_Python_str_DelForPy3(str);
85269 - Py_DECREF(repr);
85270 - return 0;
85271 - } else {
85272 - return 1;
85273 - }
85274 -}
85275 -
85276 -SWIGRUNTIME PyObject *
85277 -SwigPyObject_str(SwigPyObject *v)
85278 -{
85279 - char result[SWIG_BUFFER_SIZE];
85280 - return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
85281 - SWIG_Python_str_FromChar(result) : 0;
85282 -}
85283 -
85284 -SWIGRUNTIME int
85285 -SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
85286 -{
85287 - void *i = v->ptr;
85288 - void *j = w->ptr;
85289 - return (i < j) ? -1 : ((i > j) ? 1 : 0);
85290 -}
85291 -
85292 -/* Added for Python 3.x, would it also be useful for Python 2.x? */
85293 -SWIGRUNTIME PyObject*
85294 -SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
85295 -{
85296 - PyObject* res;
85297 - if( op != Py_EQ && op != Py_NE ) {
85298 - Py_INCREF(Py_NotImplemented);
85299 - return Py_NotImplemented;
85300 - }
85301 - res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
85302 - return res;
85303 -}
85304 -
85305 -
85306 -SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
85307 -
85308 -#ifdef SWIGPYTHON_BUILTIN
85309 -static swig_type_info *SwigPyObject_stype = 0;
85310 -SWIGRUNTIME PyTypeObject*
85311 -SwigPyObject_type(void) {
85312 - SwigPyClientData *cd;
85313 - assert(SwigPyObject_stype);
85314 - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
85315 - assert(cd);
85316 - assert(cd->pytype);
85317 - return cd->pytype;
85318 -}
85319 -#else
85320 -SWIGRUNTIME PyTypeObject*
85321 -SwigPyObject_type(void) {
85322 - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
85323 - return type;
85324 -}
85325 -#endif
85326 -
85327 -SWIGRUNTIMEINLINE int
85328 -SwigPyObject_Check(PyObject *op) {
85329 -#ifdef SWIGPYTHON_BUILTIN
85330 - PyTypeObject *target_tp = SwigPyObject_type();
85331 - if (PyType_IsSubtype(op->ob_type, target_tp))
85332 - return 1;
85333 - return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
85334 -#else
85335 - return (Py_TYPE(op) == SwigPyObject_type())
85336 - || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
85337 -#endif
85338 -}
85339 -
85340 -SWIGRUNTIME PyObject *
85341 -SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
85342 -
85343 -SWIGRUNTIME void
85344 -SwigPyObject_dealloc(PyObject *v)
85345 -{
85346 - SwigPyObject *sobj = (SwigPyObject *) v;
85347 - PyObject *next = sobj->next;
85348 - if (sobj->own == SWIG_POINTER_OWN) {
85349 - swig_type_info *ty = sobj->ty;
85350 - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
85351 - PyObject *destroy = data ? data->destroy : 0;
85352 - if (destroy) {
85353 - /* destroy is always a VARARGS method */
85354 - PyObject *res;
85355 - if (data->delargs) {
85356 - /* we need to create a temporary object to carry the destroy operation */
85357 - PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
85358 - res = SWIG_Python_CallFunctor(destroy, tmp);
85359 - Py_DECREF(tmp);
85360 - } else {
85361 - PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
85362 - PyObject *mself = PyCFunction_GET_SELF(destroy);
85363 - res = ((*meth)(mself, v));
85364 - }
85365 - Py_XDECREF(res);
85366 - }
85367 -#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
85368 - else {
85369 - const char *name = SWIG_TypePrettyName(ty);
85370 - printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
85371 - }
85372 -#endif
85373 - }
85374 - Py_XDECREF(next);
85375 - PyObject_DEL(v);
85376 -}
85377 -
85378 -SWIGRUNTIME PyObject*
85379 -SwigPyObject_append(PyObject* v, PyObject* next)
85380 -{
85381 - SwigPyObject *sobj = (SwigPyObject *) v;
85382 -#ifndef METH_O
85383 - PyObject *tmp = 0;
85384 - if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
85385 - next = tmp;
85386 -#endif
85387 - if (!SwigPyObject_Check(next)) {
85388 - return NULL;
85389 - }
85390 - sobj->next = next;
85391 - Py_INCREF(next);
85392 - return SWIG_Py_Void();
85393 -}
85394 -
85395 -SWIGRUNTIME PyObject*
85396 -#ifdef METH_NOARGS
85397 -SwigPyObject_next(PyObject* v)
85398 -#else
85399 -SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
85400 -#endif
85401 -{
85402 - SwigPyObject *sobj = (SwigPyObject *) v;
85403 - if (sobj->next) {
85404 - Py_INCREF(sobj->next);
85405 - return sobj->next;
85406 - } else {
85407 - return SWIG_Py_Void();
85408 - }
85409 -}
85410 -
85411 -SWIGINTERN PyObject*
85412 -#ifdef METH_NOARGS
85413 -SwigPyObject_disown(PyObject *v)
85414 -#else
85415 -SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
85416 -#endif
85417 -{
85418 - SwigPyObject *sobj = (SwigPyObject *)v;
85419 - sobj->own = 0;
85420 - return SWIG_Py_Void();
85421 -}
85422 -
85423 -SWIGINTERN PyObject*
85424 -#ifdef METH_NOARGS
85425 -SwigPyObject_acquire(PyObject *v)
85426 -#else
85427 -SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
85428 -#endif
85429 -{
85430 - SwigPyObject *sobj = (SwigPyObject *)v;
85431 - sobj->own = SWIG_POINTER_OWN;
85432 - return SWIG_Py_Void();
85433 -}
85434 -
85435 -SWIGINTERN PyObject*
85436 -SwigPyObject_own(PyObject *v, PyObject *args)
85437 -{
85438 - PyObject *val = 0;
85439 -#if (PY_VERSION_HEX < 0x02020000)
85440 - if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
85441 -#elif (PY_VERSION_HEX < 0x02050000)
85442 - if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
85443 -#else
85444 - if (!PyArg_UnpackTuple(args, "own", 0, 1, &val))
85445 -#endif
85446 - {
85447 - return NULL;
85448 - }
85449 - else
85450 - {
85451 - SwigPyObject *sobj = (SwigPyObject *)v;
85452 - PyObject *obj = PyBool_FromLong(sobj->own);
85453 - if (val) {
85454 -#ifdef METH_NOARGS
85455 - if (PyObject_IsTrue(val)) {
85456 - SwigPyObject_acquire(v);
85457 - } else {
85458 - SwigPyObject_disown(v);
85459 - }
85460 -#else
85461 - if (PyObject_IsTrue(val)) {
85462 - SwigPyObject_acquire(v,args);
85463 - } else {
85464 - SwigPyObject_disown(v,args);
85465 - }
85466 -#endif
85467 - }
85468 - return obj;
85469 - }
85470 -}
85471 -
85472 -#ifdef METH_O
85473 -static PyMethodDef
85474 -swigobject_methods[] = {
85475 - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
85476 - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
85477 - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
85478 - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
85479 - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
85480 - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
85481 - {0, 0, 0, 0}
85482 -};
85483 -#else
85484 -static PyMethodDef
85485 -swigobject_methods[] = {
85486 - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
85487 - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
85488 - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
85489 - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
85490 - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
85491 - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
85492 - {0, 0, 0, 0}
85493 -};
85494 -#endif
85495 -
85496 -#if PY_VERSION_HEX < 0x02020000
85497 -SWIGINTERN PyObject *
85498 -SwigPyObject_getattr(SwigPyObject *sobj,char *name)
85499 -{
85500 - return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
85501 -}
85502 -#endif
85503 -
85504 -SWIGRUNTIME PyTypeObject*
85505 -SwigPyObject_TypeOnce(void) {
85506 - static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
85507 -
85508 - static PyNumberMethods SwigPyObject_as_number = {
85509 - (binaryfunc)0, /*nb_add*/
85510 - (binaryfunc)0, /*nb_subtract*/
85511 - (binaryfunc)0, /*nb_multiply*/
85512 - /* nb_divide removed in Python 3 */
85513 -#if PY_VERSION_HEX < 0x03000000
85514 - (binaryfunc)0, /*nb_divide*/
85515 -#endif
85516 - (binaryfunc)0, /*nb_remainder*/
85517 - (binaryfunc)0, /*nb_divmod*/
85518 - (ternaryfunc)0,/*nb_power*/
85519 - (unaryfunc)0, /*nb_negative*/
85520 - (unaryfunc)0, /*nb_positive*/
85521 - (unaryfunc)0, /*nb_absolute*/
85522 - (inquiry)0, /*nb_nonzero*/
85523 - 0, /*nb_invert*/
85524 - 0, /*nb_lshift*/
85525 - 0, /*nb_rshift*/
85526 - 0, /*nb_and*/
85527 - 0, /*nb_xor*/
85528 - 0, /*nb_or*/
85529 -#if PY_VERSION_HEX < 0x03000000
85530 - 0, /*nb_coerce*/
85531 -#endif
85532 - (unaryfunc)SwigPyObject_long, /*nb_int*/
85533 -#if PY_VERSION_HEX < 0x03000000
85534 - (unaryfunc)SwigPyObject_long, /*nb_long*/
85535 -#else
85536 - 0, /*nb_reserved*/
85537 -#endif
85538 - (unaryfunc)0, /*nb_float*/
85539 -#if PY_VERSION_HEX < 0x03000000
85540 - (unaryfunc)SwigPyObject_oct, /*nb_oct*/
85541 - (unaryfunc)SwigPyObject_hex, /*nb_hex*/
85542 -#endif
85543 -#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
85544 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
85545 -#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
85546 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
85547 -#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
85548 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
85549 -#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
85550 - 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
85551 -#endif
85552 - };
85553 -
85554 - static PyTypeObject swigpyobject_type;
85555 - static int type_init = 0;
85556 - if (!type_init) {
85557 - const PyTypeObject tmp = {
85558 - /* PyObject header changed in Python 3 */
85559 -#if PY_VERSION_HEX >= 0x03000000
85560 - PyVarObject_HEAD_INIT(NULL, 0)
85561 -#else
85562 - PyObject_HEAD_INIT(NULL)
85563 - 0, /* ob_size */
85564 -#endif
85565 - (char *)"SwigPyObject", /* tp_name */
85566 - sizeof(SwigPyObject), /* tp_basicsize */
85567 - 0, /* tp_itemsize */
85568 - (destructor)SwigPyObject_dealloc, /* tp_dealloc */
85569 - (printfunc)SwigPyObject_print, /* tp_print */
85570 -#if PY_VERSION_HEX < 0x02020000
85571 - (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
85572 -#else
85573 - (getattrfunc)0, /* tp_getattr */
85574 -#endif
85575 - (setattrfunc)0, /* tp_setattr */
85576 -#if PY_VERSION_HEX >= 0x03000000
85577 - 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
85578 -#else
85579 - (cmpfunc)SwigPyObject_compare, /* tp_compare */
85580 -#endif
85581 - (reprfunc)SwigPyObject_repr, /* tp_repr */
85582 - &SwigPyObject_as_number, /* tp_as_number */
85583 - 0, /* tp_as_sequence */
85584 - 0, /* tp_as_mapping */
85585 - (hashfunc)0, /* tp_hash */
85586 - (ternaryfunc)0, /* tp_call */
85587 - (reprfunc)SwigPyObject_str, /* tp_str */
85588 - PyObject_GenericGetAttr, /* tp_getattro */
85589 - 0, /* tp_setattro */
85590 - 0, /* tp_as_buffer */
85591 - Py_TPFLAGS_DEFAULT, /* tp_flags */
85592 - swigobject_doc, /* tp_doc */
85593 - 0, /* tp_traverse */
85594 - 0, /* tp_clear */
85595 - (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
85596 - 0, /* tp_weaklistoffset */
85597 -#if PY_VERSION_HEX >= 0x02020000
85598 - 0, /* tp_iter */
85599 - 0, /* tp_iternext */
85600 - swigobject_methods, /* tp_methods */
85601 - 0, /* tp_members */
85602 - 0, /* tp_getset */
85603 - 0, /* tp_base */
85604 - 0, /* tp_dict */
85605 - 0, /* tp_descr_get */
85606 - 0, /* tp_descr_set */
85607 - 0, /* tp_dictoffset */
85608 - 0, /* tp_init */
85609 - 0, /* tp_alloc */
85610 - 0, /* tp_new */
85611 - 0, /* tp_free */
85612 - 0, /* tp_is_gc */
85613 - 0, /* tp_bases */
85614 - 0, /* tp_mro */
85615 - 0, /* tp_cache */
85616 - 0, /* tp_subclasses */
85617 - 0, /* tp_weaklist */
85618 -#endif
85619 -#if PY_VERSION_HEX >= 0x02030000
85620 - 0, /* tp_del */
85621 -#endif
85622 -#if PY_VERSION_HEX >= 0x02060000
85623 - 0, /* tp_version */
85624 -#endif
85625 -#ifdef COUNT_ALLOCS
85626 - 0,0,0,0 /* tp_alloc -> tp_next */
85627 -#endif
85628 - };
85629 - swigpyobject_type = tmp;
85630 - type_init = 1;
85631 -#if PY_VERSION_HEX < 0x02020000
85632 - swigpyobject_type.ob_type = &PyType_Type;
85633 -#else
85634 - if (PyType_Ready(&swigpyobject_type) < 0)
85635 - return NULL;
85636 -#endif
85637 - }
85638 - return &swigpyobject_type;
85639 -}
85640 -
85641 -SWIGRUNTIME PyObject *
85642 -SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
85643 -{
85644 - SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
85645 - if (sobj) {
85646 - sobj->ptr = ptr;
85647 - sobj->ty = ty;
85648 - sobj->own = own;
85649 - sobj->next = 0;
85650 - }
85651 - return (PyObject *)sobj;
85652 -}
85653 -
85654 -/* -----------------------------------------------------------------------------
85655 - * Implements a simple Swig Packed type, and use it instead of string
85656 - * ----------------------------------------------------------------------------- */
85657 -
85658 -typedef struct {
85659 - PyObject_HEAD
85660 - void *pack;
85661 - swig_type_info *ty;
85662 - size_t size;
85663 -} SwigPyPacked;
85664 -
85665 -SWIGRUNTIME int
85666 -SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
85667 -{
85668 - char result[SWIG_BUFFER_SIZE];
85669 - fputs("<Swig Packed ", fp);
85670 - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
85671 - fputs("at ", fp);
85672 - fputs(result, fp);
85673 - }
85674 - fputs(v->ty->name,fp);
85675 - fputs(">", fp);
85676 - return 0;
85677 -}
85678 -
85679 -SWIGRUNTIME PyObject *
85680 -SwigPyPacked_repr(SwigPyPacked *v)
85681 -{
85682 - char result[SWIG_BUFFER_SIZE];
85683 - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
85684 - return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
85685 - } else {
85686 - return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
85687 - }
85688 -}
85689 -
85690 -SWIGRUNTIME PyObject *
85691 -SwigPyPacked_str(SwigPyPacked *v)
85692 -{
85693 - char result[SWIG_BUFFER_SIZE];
85694 - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
85695 - return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
85696 - } else {
85697 - return SWIG_Python_str_FromChar(v->ty->name);
85698 - }
85699 -}
85700 -
85701 -SWIGRUNTIME int
85702 -SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
85703 -{
85704 - size_t i = v->size;
85705 - size_t j = w->size;
85706 - int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
85707 - return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
85708 -}
85709 -
85710 -SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
85711 -
85712 -SWIGRUNTIME PyTypeObject*
85713 -SwigPyPacked_type(void) {
85714 - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
85715 - return type;
85716 -}
85717 -
85718 -SWIGRUNTIMEINLINE int
85719 -SwigPyPacked_Check(PyObject *op) {
85720 - return ((op)->ob_type == SwigPyPacked_TypeOnce())
85721 - || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
85722 -}
85723 -
85724 -SWIGRUNTIME void
85725 -SwigPyPacked_dealloc(PyObject *v)
85726 -{
85727 - if (SwigPyPacked_Check(v)) {
85728 - SwigPyPacked *sobj = (SwigPyPacked *) v;
85729 - free(sobj->pack);
85730 - }
85731 - PyObject_DEL(v);
85732 -}
85733 -
85734 -SWIGRUNTIME PyTypeObject*
85735 -SwigPyPacked_TypeOnce(void) {
85736 - static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
85737 - static PyTypeObject swigpypacked_type;
85738 - static int type_init = 0;
85739 - if (!type_init) {
85740 - const PyTypeObject tmp = {
85741 - /* PyObject header changed in Python 3 */
85742 -#if PY_VERSION_HEX>=0x03000000
85743 - PyVarObject_HEAD_INIT(NULL, 0)
85744 -#else
85745 - PyObject_HEAD_INIT(NULL)
85746 - 0, /* ob_size */
85747 -#endif
85748 - (char *)"SwigPyPacked", /* tp_name */
85749 - sizeof(SwigPyPacked), /* tp_basicsize */
85750 - 0, /* tp_itemsize */
85751 - (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
85752 - (printfunc)SwigPyPacked_print, /* tp_print */
85753 - (getattrfunc)0, /* tp_getattr */
85754 - (setattrfunc)0, /* tp_setattr */
85755 -#if PY_VERSION_HEX>=0x03000000
85756 - 0, /* tp_reserved in 3.0.1 */
85757 -#else
85758 - (cmpfunc)SwigPyPacked_compare, /* tp_compare */
85759 -#endif
85760 - (reprfunc)SwigPyPacked_repr, /* tp_repr */
85761 - 0, /* tp_as_number */
85762 - 0, /* tp_as_sequence */
85763 - 0, /* tp_as_mapping */
85764 - (hashfunc)0, /* tp_hash */
85765 - (ternaryfunc)0, /* tp_call */
85766 - (reprfunc)SwigPyPacked_str, /* tp_str */
85767 - PyObject_GenericGetAttr, /* tp_getattro */
85768 - 0, /* tp_setattro */
85769 - 0, /* tp_as_buffer */
85770 - Py_TPFLAGS_DEFAULT, /* tp_flags */
85771 - swigpacked_doc, /* tp_doc */
85772 - 0, /* tp_traverse */
85773 - 0, /* tp_clear */
85774 - 0, /* tp_richcompare */
85775 - 0, /* tp_weaklistoffset */
85776 -#if PY_VERSION_HEX >= 0x02020000
85777 - 0, /* tp_iter */
85778 - 0, /* tp_iternext */
85779 - 0, /* tp_methods */
85780 - 0, /* tp_members */
85781 - 0, /* tp_getset */
85782 - 0, /* tp_base */
85783 - 0, /* tp_dict */
85784 - 0, /* tp_descr_get */
85785 - 0, /* tp_descr_set */
85786 - 0, /* tp_dictoffset */
85787 - 0, /* tp_init */
85788 - 0, /* tp_alloc */
85789 - 0, /* tp_new */
85790 - 0, /* tp_free */
85791 - 0, /* tp_is_gc */
85792 - 0, /* tp_bases */
85793 - 0, /* tp_mro */
85794 - 0, /* tp_cache */
85795 - 0, /* tp_subclasses */
85796 - 0, /* tp_weaklist */
85797 -#endif
85798 -#if PY_VERSION_HEX >= 0x02030000
85799 - 0, /* tp_del */
85800 -#endif
85801 -#if PY_VERSION_HEX >= 0x02060000
85802 - 0, /* tp_version */
85803 -#endif
85804 -#ifdef COUNT_ALLOCS
85805 - 0,0,0,0 /* tp_alloc -> tp_next */
85806 -#endif
85807 - };
85808 - swigpypacked_type = tmp;
85809 - type_init = 1;
85810 -#if PY_VERSION_HEX < 0x02020000
85811 - swigpypacked_type.ob_type = &PyType_Type;
85812 -#else
85813 - if (PyType_Ready(&swigpypacked_type) < 0)
85814 - return NULL;
85815 -#endif
85816 - }
85817 - return &swigpypacked_type;
85818 -}
85819 -
85820 -SWIGRUNTIME PyObject *
85821 -SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
85822 -{
85823 - SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
85824 - if (sobj) {
85825 - void *pack = malloc(size);
85826 - if (pack) {
85827 - memcpy(pack, ptr, size);
85828 - sobj->pack = pack;
85829 - sobj->ty = ty;
85830 - sobj->size = size;
85831 - } else {
85832 - PyObject_DEL((PyObject *) sobj);
85833 - sobj = 0;
85834 - }
85835 - }
85836 - return (PyObject *) sobj;
85837 -}
85838 -
85839 -SWIGRUNTIME swig_type_info *
85840 -SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
85841 -{
85842 - if (SwigPyPacked_Check(obj)) {
85843 - SwigPyPacked *sobj = (SwigPyPacked *)obj;
85844 - if (sobj->size != size) return 0;
85845 - memcpy(ptr, sobj->pack, size);
85846 - return sobj->ty;
85847 - } else {
85848 - return 0;
85849 - }
85850 -}
85851 -
85852 -/* -----------------------------------------------------------------------------
85853 - * pointers/data manipulation
85854 - * ----------------------------------------------------------------------------- */
85855 -
85856 -SWIGRUNTIMEINLINE PyObject *
85857 -_SWIG_This(void)
85858 -{
85859 - return SWIG_Python_str_FromChar("this");
85860 -}
85861 -
85862 -static PyObject *swig_this = NULL;
85863 -
85864 -SWIGRUNTIME PyObject *
85865 -SWIG_This(void)
85866 -{
85867 - if (swig_this == NULL)
85868 - swig_this = _SWIG_This();
85869 - return swig_this;
85870 -}
85871 -
85872 -/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
85873 -
85874 -/* TODO: I don't know how to implement the fast getset in Python 3 right now */
85875 -#if PY_VERSION_HEX>=0x03000000
85876 -#define SWIG_PYTHON_SLOW_GETSET_THIS
85877 -#endif
85878 -
85879 -SWIGRUNTIME SwigPyObject *
85880 -SWIG_Python_GetSwigThis(PyObject *pyobj)
85881 -{
85882 - PyObject *obj;
85883 -
85884 - if (SwigPyObject_Check(pyobj))
85885 - return (SwigPyObject *) pyobj;
85886 -
85887 -#ifdef SWIGPYTHON_BUILTIN
85888 - (void)obj;
85889 -# ifdef PyWeakref_CheckProxy
85890 - if (PyWeakref_CheckProxy(pyobj)) {
85891 - pyobj = PyWeakref_GET_OBJECT(pyobj);
85892 - if (pyobj && SwigPyObject_Check(pyobj))
85893 - return (SwigPyObject*) pyobj;
85894 - }
85895 -# endif
85896 - return NULL;
85897 -#else
85898 -
85899 - obj = 0;
85900 -
85901 -#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
85902 - if (PyInstance_Check(pyobj)) {
85903 - obj = _PyInstance_Lookup(pyobj, SWIG_This());
85904 - } else {
85905 - PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
85906 - if (dictptr != NULL) {
85907 - PyObject *dict = *dictptr;
85908 - obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
85909 - } else {
85910 -#ifdef PyWeakref_CheckProxy
85911 - if (PyWeakref_CheckProxy(pyobj)) {
85912 - PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
85913 - return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
85914 - }
85915 -#endif
85916 - obj = PyObject_GetAttr(pyobj,SWIG_This());
85917 - if (obj) {
85918 - Py_DECREF(obj);
85919 - } else {
85920 - if (PyErr_Occurred()) PyErr_Clear();
85921 - return 0;
85922 - }
85923 - }
85924 - }
85925 -#else
85926 - obj = PyObject_GetAttr(pyobj,SWIG_This());
85927 - if (obj) {
85928 - Py_DECREF(obj);
85929 - } else {
85930 - if (PyErr_Occurred()) PyErr_Clear();
85931 - return 0;
85932 - }
85933 -#endif
85934 - if (obj && !SwigPyObject_Check(obj)) {
85935 - /* a PyObject is called 'this', try to get the 'real this'
85936 - SwigPyObject from it */
85937 - return SWIG_Python_GetSwigThis(obj);
85938 - }
85939 - return (SwigPyObject *)obj;
85940 -#endif
85941 -}
85942 -
85943 -/* Acquire a pointer value */
85944 -
85945 -SWIGRUNTIME int
85946 -SWIG_Python_AcquirePtr(PyObject *obj, int own) {
85947 - if (own == SWIG_POINTER_OWN) {
85948 - SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
85949 - if (sobj) {
85950 - int oldown = sobj->own;
85951 - sobj->own = own;
85952 - return oldown;
85953 - }
85954 - }
85955 - return 0;
85956 -}
85957 -
85958 -/* Convert a pointer value */
85959 -
85960 -SWIGRUNTIME int
85961 -SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
85962 - int res;
85963 - SwigPyObject *sobj;
85964 -
85965 - if (!obj)
85966 - return SWIG_ERROR;
85967 - if (obj == Py_None) {
85968 - if (ptr)
85969 - *ptr = 0;
85970 - return SWIG_OK;
85971 - }
85972 -
85973 - res = SWIG_ERROR;
85974 -
85975 - sobj = SWIG_Python_GetSwigThis(obj);
85976 - if (own)
85977 - *own = 0;
85978 - while (sobj) {
85979 - void *vptr = sobj->ptr;
85980 - if (ty) {
85981 - swig_type_info *to = sobj->ty;
85982 - if (to == ty) {
85983 - /* no type cast needed */
85984 - if (ptr) *ptr = vptr;
85985 - break;
85986 - } else {
85987 - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
85988 - if (!tc) {
85989 - sobj = (SwigPyObject *)sobj->next;
85990 - } else {
85991 - if (ptr) {
85992 - int newmemory = 0;
85993 - *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
85994 - if (newmemory == SWIG_CAST_NEW_MEMORY) {
85995 - assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
85996 - if (own)
85997 - *own = *own | SWIG_CAST_NEW_MEMORY;
85998 - }
85999 - }
86000 - break;
86001 - }
86002 - }
86003 - } else {
86004 - if (ptr) *ptr = vptr;
86005 - break;
86006 - }
86007 - }
86008 - if (sobj) {
86009 - if (own)
86010 - *own = *own | sobj->own;
86011 - if (flags & SWIG_POINTER_DISOWN) {
86012 - sobj->own = 0;
86013 - }
86014 - res = SWIG_OK;
86015 - } else {
86016 - if (flags & SWIG_POINTER_IMPLICIT_CONV) {
86017 - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
86018 - if (data && !data->implicitconv) {
86019 - PyObject *klass = data->klass;
86020 - if (klass) {
86021 - PyObject *impconv;
86022 - data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
86023 - impconv = SWIG_Python_CallFunctor(klass, obj);
86024 - data->implicitconv = 0;
86025 - if (PyErr_Occurred()) {
86026 - PyErr_Clear();
86027 - impconv = 0;
86028 - }
86029 - if (impconv) {
86030 - SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
86031 - if (iobj) {
86032 - void *vptr;
86033 - res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
86034 - if (SWIG_IsOK(res)) {
86035 - if (ptr) {
86036 - *ptr = vptr;
86037 - /* transfer the ownership to 'ptr' */
86038 - iobj->own = 0;
86039 - res = SWIG_AddCast(res);
86040 - res = SWIG_AddNewMask(res);
86041 - } else {
86042 - res = SWIG_AddCast(res);
86043 - }
86044 - }
86045 - }
86046 - Py_DECREF(impconv);
86047 - }
86048 - }
86049 - }
86050 - }
86051 - }
86052 - return res;
86053 -}
86054 -
86055 -/* Convert a function ptr value */
86056 -
86057 -SWIGRUNTIME int
86058 -SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
86059 - if (!PyCFunction_Check(obj)) {
86060 - return SWIG_ConvertPtr(obj, ptr, ty, 0);
86061 - } else {
86062 - void *vptr = 0;
86063 -
86064 - /* here we get the method pointer for callbacks */
86065 - const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
86066 - const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
86067 - if (desc)
86068 - desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
86069 - if (!desc)
86070 - return SWIG_ERROR;
86071 - if (ty) {
86072 - swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
86073 - if (tc) {
86074 - int newmemory = 0;
86075 - *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
86076 - assert(!newmemory); /* newmemory handling not yet implemented */
86077 - } else {
86078 - return SWIG_ERROR;
86079 - }
86080 - } else {
86081 - *ptr = vptr;
86082 - }
86083 - return SWIG_OK;
86084 - }
86085 -}
86086 -
86087 -/* Convert a packed value value */
86088 -
86089 -SWIGRUNTIME int
86090 -SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
86091 - swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
86092 - if (!to) return SWIG_ERROR;
86093 - if (ty) {
86094 - if (to != ty) {
86095 - /* check type cast? */
86096 - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
86097 - if (!tc) return SWIG_ERROR;
86098 - }
86099 - }
86100 - return SWIG_OK;
86101 -}
86102 -
86103 -/* -----------------------------------------------------------------------------
86104 - * Create a new pointer object
86105 - * ----------------------------------------------------------------------------- */
86106 -
86107 -/*
86108 - Create a new instance object, without calling __init__, and set the
86109 - 'this' attribute.
86110 -*/
86111 -
86112 -SWIGRUNTIME PyObject*
86113 -SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
86114 -{
86115 -#if (PY_VERSION_HEX >= 0x02020000)
86116 - PyObject *inst = 0;
86117 - PyObject *newraw = data->newraw;
86118 - if (newraw) {
86119 - inst = PyObject_Call(newraw, data->newargs, NULL);
86120 - if (inst) {
86121 -#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
86122 - PyObject **dictptr = _PyObject_GetDictPtr(inst);
86123 - if (dictptr != NULL) {
86124 - PyObject *dict = *dictptr;
86125 - if (dict == NULL) {
86126 - dict = PyDict_New();
86127 - *dictptr = dict;
86128 - PyDict_SetItem(dict, SWIG_This(), swig_this);
86129 - }
86130 - }
86131 -#else
86132 - PyObject *key = SWIG_This();
86133 - PyObject_SetAttr(inst, key, swig_this);
86134 -#endif
86135 - }
86136 - } else {
86137 -#if PY_VERSION_HEX >= 0x03000000
86138 - inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
86139 - if (inst) {
86140 - PyObject_SetAttr(inst, SWIG_This(), swig_this);
86141 - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
86142 - }
86143 -#else
86144 - PyObject *dict = PyDict_New();
86145 - if (dict) {
86146 - PyDict_SetItem(dict, SWIG_This(), swig_this);
86147 - inst = PyInstance_NewRaw(data->newargs, dict);
86148 - Py_DECREF(dict);
86149 - }
86150 -#endif
86151 - }
86152 - return inst;
86153 -#else
86154 -#if (PY_VERSION_HEX >= 0x02010000)
86155 - PyObject *inst = 0;
86156 - PyObject *dict = PyDict_New();
86157 - if (dict) {
86158 - PyDict_SetItem(dict, SWIG_This(), swig_this);
86159 - inst = PyInstance_NewRaw(data->newargs, dict);
86160 - Py_DECREF(dict);
86161 - }
86162 - return (PyObject *) inst;
86163 -#else
86164 - PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
86165 - if (inst == NULL) {
86166 - return NULL;
86167 - }
86168 - inst->in_class = (PyClassObject *)data->newargs;
86169 - Py_INCREF(inst->in_class);
86170 - inst->in_dict = PyDict_New();
86171 - if (inst->in_dict == NULL) {
86172 - Py_DECREF(inst);
86173 - return NULL;
86174 - }
86175 -#ifdef Py_TPFLAGS_HAVE_WEAKREFS
86176 - inst->in_weakreflist = NULL;
86177 -#endif
86178 -#ifdef Py_TPFLAGS_GC
86179 - PyObject_GC_Init(inst);
86180 -#endif
86181 - PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
86182 - return (PyObject *) inst;
86183 -#endif
86184 -#endif
86185 -}
86186 -
86187 -SWIGRUNTIME void
86188 -SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
86189 -{
86190 - PyObject *dict;
86191 -#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
86192 - PyObject **dictptr = _PyObject_GetDictPtr(inst);
86193 - if (dictptr != NULL) {
86194 - dict = *dictptr;
86195 - if (dict == NULL) {
86196 - dict = PyDict_New();
86197 - *dictptr = dict;
86198 - }
86199 - PyDict_SetItem(dict, SWIG_This(), swig_this);
86200 - return;
86201 - }
86202 -#endif
86203 - dict = PyObject_GetAttrString(inst, (char*)"__dict__");
86204 - PyDict_SetItem(dict, SWIG_This(), swig_this);
86205 - Py_DECREF(dict);
86206 -}
86207 -
86208 -
86209 -SWIGINTERN PyObject *
86210 -SWIG_Python_InitShadowInstance(PyObject *args) {
86211 - PyObject *obj[2];
86212 - if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
86213 - return NULL;
86214 - } else {
86215 - SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
86216 - if (sthis) {
86217 - SwigPyObject_append((PyObject*) sthis, obj[1]);
86218 - } else {
86219 - SWIG_Python_SetSwigThis(obj[0], obj[1]);
86220 - }
86221 - return SWIG_Py_Void();
86222 - }
86223 -}
86224 -
86225 -/* Create a new pointer object */
86226 -
86227 -SWIGRUNTIME PyObject *
86228 -SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
86229 - SwigPyClientData *clientdata;
86230 - PyObject * robj;
86231 - int own;
86232 -
86233 - if (!ptr)
86234 - return SWIG_Py_Void();
86235 -
86236 - clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
86237 - own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
86238 - if (clientdata && clientdata->pytype) {
86239 - SwigPyObject *newobj;
86240 - if (flags & SWIG_BUILTIN_TP_INIT) {
86241 - newobj = (SwigPyObject*) self;
86242 - if (newobj->ptr) {
86243 - PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
86244 - while (newobj->next)
86245 - newobj = (SwigPyObject *) newobj->next;
86246 - newobj->next = next_self;
86247 - newobj = (SwigPyObject *)next_self;
86248 - }
86249 - } else {
86250 - newobj = PyObject_New(SwigPyObject, clientdata->pytype);
86251 - }
86252 - if (newobj) {
86253 - newobj->ptr = ptr;
86254 - newobj->ty = type;
86255 - newobj->own = own;
86256 - newobj->next = 0;
86257 -#ifdef SWIGPYTHON_BUILTIN
86258 - newobj->dict = 0;
86259 -#endif
86260 - return (PyObject*) newobj;
86261 - }
86262 - return SWIG_Py_Void();
86263 - }
86264 -
86265 - assert(!(flags & SWIG_BUILTIN_TP_INIT));
86266 -
86267 - robj = SwigPyObject_New(ptr, type, own);
86268 - if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
86269 - PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
86270 - Py_DECREF(robj);
86271 - robj = inst;
86272 - }
86273 - return robj;
86274 -}
86275 -
86276 -/* Create a new packed object */
86277 -
86278 -SWIGRUNTIMEINLINE PyObject *
86279 -SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
86280 - return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
86281 -}
86282 -
86283 -/* -----------------------------------------------------------------------------*
86284 - * Get type list
86285 - * -----------------------------------------------------------------------------*/
86286 -
86287 -#ifdef SWIG_LINK_RUNTIME
86288 -void *SWIG_ReturnGlobalTypeList(void *);
86289 -#endif
86290 -
86291 -SWIGRUNTIME swig_module_info *
86292 -SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
86293 - static void *type_pointer = (void *)0;
86294 - /* first check if module already created */
86295 - if (!type_pointer) {
86296 -#ifdef SWIG_LINK_RUNTIME
86297 - type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
86298 -#else
86299 -# ifdef SWIGPY_USE_CAPSULE
86300 - type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
86301 -# else
86302 - type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
86303 - (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
86304 -# endif
86305 - if (PyErr_Occurred()) {
86306 - PyErr_Clear();
86307 - type_pointer = (void *)0;
86308 - }
86309 -#endif
86310 - }
86311 - return (swig_module_info *) type_pointer;
86312 -}
86313 -
86314 -#if PY_MAJOR_VERSION < 2
86315 -/* PyModule_AddObject function was introduced in Python 2.0. The following function
86316 - is copied out of Python/modsupport.c in python version 2.3.4 */
86317 -SWIGINTERN int
86318 -PyModule_AddObject(PyObject *m, char *name, PyObject *o)
86319 -{
86320 - PyObject *dict;
86321 - if (!PyModule_Check(m)) {
86322 - PyErr_SetString(PyExc_TypeError,
86323 - "PyModule_AddObject() needs module as first arg");
86324 - return SWIG_ERROR;
86325 - }
86326 - if (!o) {
86327 - PyErr_SetString(PyExc_TypeError,
86328 - "PyModule_AddObject() needs non-NULL value");
86329 - return SWIG_ERROR;
86330 - }
86331 -
86332 - dict = PyModule_GetDict(m);
86333 - if (dict == NULL) {
86334 - /* Internal error -- modules must have a dict! */
86335 - PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
86336 - PyModule_GetName(m));
86337 - return SWIG_ERROR;
86338 - }
86339 - if (PyDict_SetItemString(dict, name, o))
86340 - return SWIG_ERROR;
86341 - Py_DECREF(o);
86342 - return SWIG_OK;
86343 -}
86344 -#endif
86345 -
86346 -SWIGRUNTIME void
86347 -#ifdef SWIGPY_USE_CAPSULE
86348 -SWIG_Python_DestroyModule(PyObject *obj)
86349 -#else
86350 -SWIG_Python_DestroyModule(void *vptr)
86351 -#endif
86352 -{
86353 -#ifdef SWIGPY_USE_CAPSULE
86354 - swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
86355 -#else
86356 - swig_module_info *swig_module = (swig_module_info *) vptr;
86357 -#endif
86358 - swig_type_info **types = swig_module->types;
86359 - size_t i;
86360 - for (i =0; i < swig_module->size; ++i) {
86361 - swig_type_info *ty = types[i];
86362 - if (ty->owndata) {
86363 - SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
86364 - if (data) SwigPyClientData_Del(data);
86365 - }
86366 - }
86367 - Py_DECREF(SWIG_This());
86368 - swig_this = NULL;
86369 -}
86370 -
86371 -SWIGRUNTIME void
86372 -SWIG_Python_SetModule(swig_module_info *swig_module) {
86373 -#if PY_VERSION_HEX >= 0x03000000
86374 - /* Add a dummy module object into sys.modules */
86375 - PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
86376 -#else
86377 - static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
86378 - PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
86379 -#endif
86380 -#ifdef SWIGPY_USE_CAPSULE
86381 - PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
86382 - if (pointer && module) {
86383 - PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
86384 - } else {
86385 - Py_XDECREF(pointer);
86386 - }
86387 -#else
86388 - PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
86389 - if (pointer && module) {
86390 - PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
86391 - } else {
86392 - Py_XDECREF(pointer);
86393 - }
86394 -#endif
86395 -}
86396 -
86397 -/* The python cached type query */
86398 -SWIGRUNTIME PyObject *
86399 -SWIG_Python_TypeCache(void) {
86400 - static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
86401 - return cache;
86402 -}
86403 -
86404 -SWIGRUNTIME swig_type_info *
86405 -SWIG_Python_TypeQuery(const char *type)
86406 -{
86407 - PyObject *cache = SWIG_Python_TypeCache();
86408 - PyObject *key = SWIG_Python_str_FromChar(type);
86409 - PyObject *obj = PyDict_GetItem(cache, key);
86410 - swig_type_info *descriptor;
86411 - if (obj) {
86412 -#ifdef SWIGPY_USE_CAPSULE
86413 - descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
86414 -#else
86415 - descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
86416 -#endif
86417 - } else {
86418 - swig_module_info *swig_module = SWIG_GetModule(0);
86419 - descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
86420 - if (descriptor) {
86421 -#ifdef SWIGPY_USE_CAPSULE
86422 - obj = PyCapsule_New((void*) descriptor, NULL, NULL);
86423 -#else
86424 - obj = PyCObject_FromVoidPtr(descriptor, NULL);
86425 -#endif
86426 - PyDict_SetItem(cache, key, obj);
86427 - Py_DECREF(obj);
86428 - }
86429 - }
86430 - Py_DECREF(key);
86431 - return descriptor;
86432 -}
86433 -
86434 -/*
86435 - For backward compatibility only
86436 -*/
86437 -#define SWIG_POINTER_EXCEPTION 0
86438 -#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
86439 -#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
86440 -
86441 -SWIGRUNTIME int
86442 -SWIG_Python_AddErrMesg(const char* mesg, int infront)
86443 -{
86444 - if (PyErr_Occurred()) {
86445 - PyObject *type = 0;
86446 - PyObject *value = 0;
86447 - PyObject *traceback = 0;
86448 - PyErr_Fetch(&type, &value, &traceback);
86449 - if (value) {
86450 - char *tmp;
86451 - PyObject *old_str = PyObject_Str(value);
86452 - Py_XINCREF(type);
86453 - PyErr_Clear();
86454 - if (infront) {
86455 - PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
86456 - } else {
86457 - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
86458 - }
86459 - SWIG_Python_str_DelForPy3(tmp);
86460 - Py_DECREF(old_str);
86461 - }
86462 - return 1;
86463 - } else {
86464 - return 0;
86465 - }
86466 -}
86467 -
86468 -SWIGRUNTIME int
86469 -SWIG_Python_ArgFail(int argnum)
86470 -{
86471 - if (PyErr_Occurred()) {
86472 - /* add information about failing argument */
86473 - char mesg[256];
86474 - PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
86475 - return SWIG_Python_AddErrMesg(mesg, 1);
86476 - } else {
86477 - return 0;
86478 - }
86479 -}
86480 -
86481 -SWIGRUNTIMEINLINE const char *
86482 -SwigPyObject_GetDesc(PyObject *self)
86483 -{
86484 - SwigPyObject *v = (SwigPyObject *)self;
86485 - swig_type_info *ty = v ? v->ty : 0;
86486 - return ty ? ty->str : "";
86487 -}
86488 -
86489 -SWIGRUNTIME void
86490 -SWIG_Python_TypeError(const char *type, PyObject *obj)
86491 -{
86492 - if (type) {
86493 -#if defined(SWIG_COBJECT_TYPES)
86494 - if (obj && SwigPyObject_Check(obj)) {
86495 - const char *otype = (const char *) SwigPyObject_GetDesc(obj);
86496 - if (otype) {
86497 - PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
86498 - type, otype);
86499 - return;
86500 - }
86501 - } else
86502 -#endif
86503 - {
86504 - const char *otype = (obj ? obj->ob_type->tp_name : 0);
86505 - if (otype) {
86506 - PyObject *str = PyObject_Str(obj);
86507 - const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
86508 - if (cstr) {
86509 - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
86510 - type, otype, cstr);
86511 - SWIG_Python_str_DelForPy3(cstr);
86512 - } else {
86513 - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
86514 - type, otype);
86515 - }
86516 - Py_XDECREF(str);
86517 - return;
86518 - }
86519 - }
86520 - PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
86521 - } else {
86522 - PyErr_Format(PyExc_TypeError, "unexpected type is received");
86523 - }
86524 -}
86525 -
86526 -
86527 -/* Convert a pointer value, signal an exception on a type mismatch */
86528 -SWIGRUNTIME void *
86529 -SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
86530 - void *result;
86531 - if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
86532 - PyErr_Clear();
86533 -#if SWIG_POINTER_EXCEPTION
86534 - if (flags) {
86535 - SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
86536 - SWIG_Python_ArgFail(argnum);
86537 - }
86538 -#endif
86539 - }
86540 - return result;
86541 -}
86542 -
86543 -#ifdef SWIGPYTHON_BUILTIN
86544 -SWIGRUNTIME int
86545 -SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
86546 - PyTypeObject *tp = obj->ob_type;
86547 - PyObject *descr;
86548 - PyObject *encoded_name;
86549 - descrsetfunc f;
86550 - int res;
86551 -
86552 -# ifdef Py_USING_UNICODE
86553 - if (PyString_Check(name)) {
86554 - name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
86555 - if (!name)
86556 - return -1;
86557 - } else if (!PyUnicode_Check(name))
86558 -# else
86559 - if (!PyString_Check(name))
86560 -# endif
86561 - {
86562 - PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
86563 - return -1;
86564 - } else {
86565 - Py_INCREF(name);
86566 - }
86567 -
86568 - if (!tp->tp_dict) {
86569 - if (PyType_Ready(tp) < 0)
86570 - goto done;
86571 - }
86572 -
86573 - res = -1;
86574 - descr = _PyType_Lookup(tp, name);
86575 - f = NULL;
86576 - if (descr != NULL)
86577 - f = descr->ob_type->tp_descr_set;
86578 - if (!f) {
86579 - if (PyString_Check(name)) {
86580 - encoded_name = name;
86581 - Py_INCREF(name);
86582 - } else {
86583 - encoded_name = PyUnicode_AsUTF8String(name);
86584 - }
86585 - PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
86586 - Py_DECREF(encoded_name);
86587 - } else {
86588 - res = f(descr, obj, value);
86589 - }
86590 -
86591 - done:
86592 - Py_DECREF(name);
86593 - return res;
86594 -}
86595 -#endif
86596 -
86597 -
86598 -#ifdef __cplusplus
86599 -}
86600 -#endif
86601 -
86602 -
86603 -
86604 -#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
86605 -
86606 -#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
86607 -
86608 -
86609 -
86610 -/* -------- TYPES TABLE (BEGIN) -------- */
86611 -
86612 -#define SWIGTYPE_p__private_detail__MASKUNION swig_types[0]
86613 -#define SWIGTYPE_p__private_detail__VPMask__VMaskType swig_types[1]
86614 -#define SWIGTYPE_p_allocator_type swig_types[2]
86615 -#define SWIGTYPE_p_char swig_types[3]
86616 -#define SWIGTYPE_p_difference_type swig_types[4]
86617 -#define SWIGTYPE_p_double swig_types[5]
86618 -#define SWIGTYPE_p_im__DOUBLEMASK swig_types[6]
86619 -#define SWIGTYPE_p_im__INTMASK swig_types[7]
86620 -#define SWIGTYPE_p_int swig_types[8]
86621 -#define SWIGTYPE_p_matrix swig_types[9]
86622 -#define SWIGTYPE_p_size_type swig_types[10]
86623 -#define SWIGTYPE_p_std__ostream swig_types[11]
86624 -#define SWIGTYPE_p_value_type swig_types[12]
86625 -#define SWIGTYPE_p_vips__VDMask swig_types[13]
86626 -#define SWIGTYPE_p_vips__VError swig_types[14]
86627 -#define SWIGTYPE_p_vips__VIMask swig_types[15]
86628 -#define SWIGTYPE_p_vips__VMask swig_types[16]
86629 -static swig_type_info *swig_types[18];
86630 -static swig_module_info swig_module = {swig_types, 17, 0, 0, 0, 0};
86631 -#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
86632 -#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
86633 -
86634 -/* -------- TYPES TABLE (END) -------- */
86635 -
86636 -#if (PY_VERSION_HEX <= 0x02000000)
86637 -# if !defined(SWIG_PYTHON_CLASSIC)
86638 -# error "This python version requires swig to be run with the '-classic' option"
86639 -# endif
86640 -#endif
86641 -
86642 -/*-----------------------------------------------
86643 - @(target):= vmaskmodule.so
86644 - ------------------------------------------------*/
86645 -#if PY_VERSION_HEX >= 0x03000000
86646 -# define SWIG_init PyInit_vmaskmodule
86647 -
86648 -#else
86649 -# define SWIG_init initvmaskmodule
86650 -
86651 -#endif
86652 -#define SWIG_name "vmaskmodule"
86653 -
86654 -#define SWIGVERSION 0x020010
86655 -#define SWIG_VERSION SWIGVERSION
86656 -
86657 -
86658 -#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
86659 -#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
86660 -
86661 -
86662 -#include <stdexcept>
86663 -
86664 -
86665 -namespace swig {
86666 - class SwigPtr_PyObject {
86667 - protected:
86668 - PyObject *_obj;
86669 -
86670 - public:
86671 - SwigPtr_PyObject() :_obj(0)
86672 - {
86673 - }
86674 -
86675 - SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
86676 - {
86677 - Py_XINCREF(_obj);
86678 - }
86679 -
86680 - SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
86681 - {
86682 - if (initial_ref) {
86683 - Py_XINCREF(_obj);
86684 - }
86685 - }
86686 -
86687 - SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
86688 - {
86689 - Py_XINCREF(item._obj);
86690 - Py_XDECREF(_obj);
86691 - _obj = item._obj;
86692 - return *this;
86693 - }
86694 -
86695 - ~SwigPtr_PyObject()
86696 - {
86697 - Py_XDECREF(_obj);
86698 - }
86699 -
86700 - operator PyObject *() const
86701 - {
86702 - return _obj;
86703 - }
86704 -
86705 - PyObject *operator->() const
86706 - {
86707 - return _obj;
86708 - }
86709 - };
86710 -}
86711 -
86712 -
86713 -namespace swig {
86714 - struct SwigVar_PyObject : SwigPtr_PyObject {
86715 - SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
86716 -
86717 - SwigVar_PyObject & operator = (PyObject* obj)
86718 - {
86719 - Py_XDECREF(_obj);
86720 - _obj = obj;
86721 - return *this;
86722 - }
86723 - };
86724 -}
86725 -
86726 -
86727 -#include <stdexcept>
86728 -#include <vips/vipscpp.h>
86729 -
86730 -
86731 - #include <stddef.h>
86732 -
86733 -
86734 -namespace swig {
86735 - struct stop_iteration {
86736 - };
86737 -
86738 - struct SwigPyIterator {
86739 - private:
86740 - SwigPtr_PyObject _seq;
86741 -
86742 - protected:
86743 - SwigPyIterator(PyObject *seq) : _seq(seq)
86744 - {
86745 - }
86746 -
86747 - public:
86748 - virtual ~SwigPyIterator() {}
86749 -
86750 - // Access iterator method, required by Python
86751 - virtual PyObject *value() const = 0;
86752 -
86753 - // Forward iterator method, required by Python
86754 - virtual SwigPyIterator *incr(size_t n = 1) = 0;
86755 -
86756 - // Backward iterator method, very common in C++, but not required in Python
86757 - virtual SwigPyIterator *decr(size_t /*n*/ = 1)
86758 - {
86759 - throw stop_iteration();
86760 - }
86761 -
86762 - // Random access iterator methods, but not required in Python
86763 - virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
86764 - {
86765 - throw std::invalid_argument("operation not supported");
86766 - }
86767 -
86768 - virtual bool equal (const SwigPyIterator &/*x*/) const
86769 - {
86770 - throw std::invalid_argument("operation not supported");
86771 - }
86772 -
86773 - // C++ common/needed methods
86774 - virtual SwigPyIterator *copy() const = 0;
86775 -
86776 - PyObject *next()
86777 - {
86778 - SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads
86779 - PyObject *obj = value();
86780 - incr();
86781 - SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
86782 - return obj;
86783 - }
86784 -
86785 - /* Make an alias for Python 3.x */
86786 - PyObject *__next__()
86787 - {
86788 - return next();
86789 - }
86790 -
86791 - PyObject *previous()
86792 - {
86793 - SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads
86794 - decr();
86795 - PyObject *obj = value();
86796 - SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
86797 - return obj;
86798 - }
86799 -
86800 - SwigPyIterator *advance(ptrdiff_t n)
86801 - {
86802 - return (n > 0) ? incr(n) : decr(-n);
86803 - }
86804 -
86805 - bool operator == (const SwigPyIterator& x) const
86806 - {
86807 - return equal(x);
86808 - }
86809 -
86810 - bool operator != (const SwigPyIterator& x) const
86811 - {
86812 - return ! operator==(x);
86813 - }
86814 -
86815 - SwigPyIterator& operator += (ptrdiff_t n)
86816 - {
86817 - return *advance(n);
86818 - }
86819 -
86820 - SwigPyIterator& operator -= (ptrdiff_t n)
86821 - {
86822 - return *advance(-n);
86823 - }
86824 -
86825 - SwigPyIterator* operator + (ptrdiff_t n) const
86826 - {
86827 - return copy()->advance(n);
86828 - }
86829 -
86830 - SwigPyIterator* operator - (ptrdiff_t n) const
86831 - {
86832 - return copy()->advance(-n);
86833 - }
86834 -
86835 - ptrdiff_t operator - (const SwigPyIterator& x) const
86836 - {
86837 - return x.distance(*this);
86838 - }
86839 -
86840 - static swig_type_info* descriptor() {
86841 - static int init = 0;
86842 - static swig_type_info* desc = 0;
86843 - if (!init) {
86844 - desc = SWIG_TypeQuery("swig::SwigPyIterator *");
86845 - init = 1;
86846 - }
86847 - return desc;
86848 - }
86849 - };
86850 -
86851 -#if defined(SWIGPYTHON_BUILTIN)
86852 - inline PyObject* make_output_iterator_builtin (PyObject *pyself)
86853 - {
86854 - Py_INCREF(pyself);
86855 - return pyself;
86856 - }
86857 -#endif
86858 -}
86859 -
86860 -
86861 -namespace swig {
86862 - template <class Type>
86863 - struct noconst_traits {
86864 - typedef Type noconst_type;
86865 - };
86866 -
86867 - template <class Type>
86868 - struct noconst_traits<const Type> {
86869 - typedef Type noconst_type;
86870 - };
86871 -
86872 - /*
86873 - type categories
86874 - */
86875 - struct pointer_category { };
86876 - struct value_category { };
86877 -
86878 - /*
86879 - General traits that provides type_name and type_info
86880 - */
86881 - template <class Type> struct traits { };
86882 -
86883 - template <class Type>
86884 - inline const char* type_name() {
86885 - return traits<typename noconst_traits<Type >::noconst_type >::type_name();
86886 - }
86887 -
86888 - template <class Type>
86889 - struct traits_info {
86890 - static swig_type_info *type_query(std::string name) {
86891 - name += " *";
86892 - return SWIG_TypeQuery(name.c_str());
86893 - }
86894 - static swig_type_info *type_info() {
86895 - static swig_type_info *info = type_query(type_name<Type>());
86896 - return info;
86897 - }
86898 - };
86899 -
86900 - template <class Type>
86901 - inline swig_type_info *type_info() {
86902 - return traits_info<Type>::type_info();
86903 - }
86904 -
86905 - /*
86906 - Partial specialization for pointers
86907 - */
86908 - template <class Type> struct traits <Type *> {
86909 - typedef pointer_category category;
86910 - static std::string make_ptr_name(const char* name) {
86911 - std::string ptrname = name;
86912 - ptrname += " *";
86913 - return ptrname;
86914 - }
86915 - static const char* type_name() {
86916 - static std::string name = make_ptr_name(swig::type_name<Type>());
86917 - return name.c_str();
86918 - }
86919 - };
86920 -
86921 - template <class Type, class Category>
86922 - struct traits_as { };
86923 -
86924 - template <class Type, class Category>
86925 - struct traits_check { };
86926 -
86927 -}
86928 -
86929 -
86930 -namespace swig {
86931 - /*
86932 - Traits that provides the from method
86933 - */
86934 - template <class Type> struct traits_from_ptr {
86935 - static PyObject *from(Type *val, int owner = 0) {
86936 - return SWIG_InternalNewPointerObj(val, type_info<Type>(), owner);
86937 - }
86938 - };
86939 -
86940 - template <class Type> struct traits_from {
86941 - static PyObject *from(const Type& val) {
86942 - return traits_from_ptr<Type>::from(new Type(val), 1);
86943 - }
86944 - };
86945 -
86946 - template <class Type> struct traits_from<Type *> {
86947 - static PyObject *from(Type* val) {
86948 - return traits_from_ptr<Type>::from(val, 0);
86949 - }
86950 - };
86951 -
86952 - template <class Type> struct traits_from<const Type *> {
86953 - static PyObject *from(const Type* val) {
86954 - return traits_from_ptr<Type>::from(const_cast<Type*>(val), 0);
86955 - }
86956 - };
86957 -
86958 -
86959 - template <class Type>
86960 - inline PyObject *from(const Type& val) {
86961 - return traits_from<Type>::from(val);
86962 - }
86963 -
86964 - template <class Type>
86965 - inline PyObject *from_ptr(Type* val, int owner) {
86966 - return traits_from_ptr<Type>::from(val, owner);
86967 - }
86968 -
86969 - /*
86970 - Traits that provides the asval/as/check method
86971 - */
86972 - template <class Type>
86973 - struct traits_asptr {
86974 - static int asptr(PyObject *obj, Type **val) {
86975 - Type *p;
86976 - int res = SWIG_ConvertPtr(obj, (void**)&p, type_info<Type>(), 0);
86977 - if (SWIG_IsOK(res)) {
86978 - if (val) *val = p;
86979 - }
86980 - return res;
86981 - }
86982 - };
86983 -
86984 - template <class Type>
86985 - inline int asptr(PyObject *obj, Type **vptr) {
86986 - return traits_asptr<Type>::asptr(obj, vptr);
86987 - }
86988 -
86989 - template <class Type>
86990 - struct traits_asval {
86991 - static int asval(PyObject *obj, Type *val) {
86992 - if (val) {
86993 - Type *p = 0;
86994 - int res = traits_asptr<Type>::asptr(obj, &p);
86995 - if (!SWIG_IsOK(res)) return res;
86996 - if (p) {
86997 - typedef typename noconst_traits<Type>::noconst_type noconst_type;
86998 - *(const_cast<noconst_type*>(val)) = *p;
86999 - if (SWIG_IsNewObj(res)){
87000 - delete p;
87001 - res = SWIG_DelNewMask(res);
87002 - }
87003 - return res;
87004 - } else {
87005 - return SWIG_ERROR;
87006 - }
87007 - } else {
87008 - return traits_asptr<Type>::asptr(obj, (Type **)(0));
87009 - }
87010 - }
87011 - };
87012 -
87013 - template <class Type> struct traits_asval<Type*> {
87014 - static int asval(PyObject *obj, Type **val) {
87015 - if (val) {
87016 - typedef typename noconst_traits<Type>::noconst_type noconst_type;
87017 - noconst_type *p = 0;
87018 - int res = traits_asptr<noconst_type>::asptr(obj, &p);
87019 - if (SWIG_IsOK(res)) {
87020 - *(const_cast<noconst_type**>(val)) = p;
87021 - }
87022 - return res;
87023 - } else {
87024 - return traits_asptr<Type>::asptr(obj, (Type **)(0));
87025 - }
87026 - }
87027 - };
87028 -
87029 - template <class Type>
87030 - inline int asval(PyObject *obj, Type *val) {
87031 - return traits_asval<Type>::asval(obj, val);
87032 - }
87033 -
87034 - template <class Type>
87035 - struct traits_as<Type, value_category> {
87036 - static Type as(PyObject *obj, bool throw_error) {
87037 - Type v;
87038 - int res = asval(obj, &v);
87039 - if (!obj || !SWIG_IsOK(res)) {
87040 - if (!PyErr_Occurred()) {
87041 - ::SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
87042 - }
87043 - if (throw_error) throw std::invalid_argument("bad type");
87044 - }
87045 - return v;
87046 - }
87047 - };
87048 -
87049 - template <class Type>
87050 - struct traits_as<Type, pointer_category> {
87051 - static Type as(PyObject *obj, bool throw_error) {
87052 - Type *v = 0;
87053 - int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
87054 - if (SWIG_IsOK(res) && v) {
87055 - if (SWIG_IsNewObj(res)) {
87056 - Type r(*v);
87057 - delete v;
87058 - return r;
87059 - } else {
87060 - return *v;
87061 - }
87062 - } else {
87063 - // Uninitialized return value, no Type() constructor required.
87064 - static Type *v_def = (Type*) malloc(sizeof(Type));
87065 - if (!PyErr_Occurred()) {
87066 - SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
87067 - }
87068 - if (throw_error) throw std::invalid_argument("bad type");
87069 - memset(v_def,0,sizeof(Type));
87070 - return *v_def;
87071 - }
87072 - }
87073 - };
87074 -
87075 - template <class Type>
87076 - struct traits_as<Type*, pointer_category> {
87077 - static Type* as(PyObject *obj, bool throw_error) {
87078 - Type *v = 0;
87079 - int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
87080 - if (SWIG_IsOK(res)) {
87081 - return v;
87082 - } else {
87083 - if (!PyErr_Occurred()) {
87084 - SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
87085 - }
87086 - if (throw_error) throw std::invalid_argument("bad type");
87087 - return 0;
87088 - }
87089 - }
87090 - };
87091 -
87092 - template <class Type>
87093 - inline Type as(PyObject *obj, bool te = false) {
87094 - return traits_as<Type, typename traits<Type>::category>::as(obj, te);
87095 - }
87096 -
87097 - template <class Type>
87098 - struct traits_check<Type, value_category> {
87099 - static bool check(PyObject *obj) {
87100 - int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR;
87101 - return SWIG_IsOK(res) ? true : false;
87102 - }
87103 - };
87104 -
87105 - template <class Type>
87106 - struct traits_check<Type, pointer_category> {
87107 - static bool check(PyObject *obj) {
87108 - int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR;
87109 - return SWIG_IsOK(res) ? true : false;
87110 - }
87111 - };
87112 -
87113 - template <class Type>
87114 - inline bool check(PyObject *obj) {
87115 - return traits_check<Type, typename traits<Type>::category>::check(obj);
87116 - }
87117 -}
87118 -
87119 -
87120 -#include <functional>
87121 -
87122 -namespace std {
87123 - template <>
87124 - struct less <PyObject *>: public binary_function<PyObject *, PyObject *, bool>
87125 - {
87126 - bool
87127 - operator()(PyObject * v, PyObject *w) const
87128 - {
87129 - bool res;
87130 - SWIG_PYTHON_THREAD_BEGIN_BLOCK;
87131 - res = PyObject_RichCompareBool(v, w, Py_LT) ? true : false;
87132 - /* This may fall into a case of inconsistent
87133 - eg. ObjA > ObjX > ObjB
87134 - but ObjA < ObjB
87135 - */
87136 - if( PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError) )
87137 - {
87138 - /* Objects can't be compared, this mostly occurred in Python 3.0 */
87139 - /* Compare their ptr directly for a workaround */
87140 - res = (v < w);
87141 - PyErr_Clear();
87142 - }
87143 - SWIG_PYTHON_THREAD_END_BLOCK;
87144 - return res;
87145 - }
87146 - };
87147 -
87148 - template <>
87149 - struct less <swig::SwigPtr_PyObject>: public binary_function<swig::SwigPtr_PyObject, swig::SwigPtr_PyObject, bool>
87150 - {
87151 - bool
87152 - operator()(const swig::SwigPtr_PyObject& v, const swig::SwigPtr_PyObject& w) const
87153 - {
87154 - return std::less<PyObject *>()(v, w);
87155 - }
87156 - };
87157 -
87158 - template <>
87159 - struct less <swig::SwigVar_PyObject>: public binary_function<swig::SwigVar_PyObject, swig::SwigVar_PyObject, bool>
87160 - {
87161 - bool
87162 - operator()(const swig::SwigVar_PyObject& v, const swig::SwigVar_PyObject& w) const
87163 - {
87164 - return std::less<PyObject *>()(v, w);
87165 - }
87166 - };
87167 -
87168 -}
87169 -
87170 -namespace swig {
87171 - template <> struct traits<PyObject *> {
87172 - typedef value_category category;
87173 - static const char* type_name() { return "PyObject *"; }
87174 - };
87175 -
87176 - template <> struct traits_asval<PyObject * > {
87177 - typedef PyObject * value_type;
87178 - static int asval(PyObject *obj, value_type *val) {
87179 - if (val) *val = obj;
87180 - return SWIG_OK;
87181 - }
87182 - };
87183 -
87184 - template <>
87185 - struct traits_check<PyObject *, value_category> {
87186 - static bool check(PyObject *) {
87187 - return true;
87188 - }
87189 - };
87190 -
87191 - template <> struct traits_from<PyObject *> {
87192 - typedef PyObject * value_type;
87193 - static PyObject *from(const value_type& val) {
87194 - Py_XINCREF(val);
87195 - return val;
87196 - }
87197 - };
87198 -
87199 -}
87200 -
87201 -namespace swig {
87202 - template <class Difference>
87203 - inline size_t
87204 - check_index(Difference i, size_t size, bool insert = false) {
87205 - if ( i < 0 ) {
87206 - if ((size_t) (-i) <= size)
87207 - return (size_t) (i + size);
87208 - } else if ( (size_t) i < size ) {
87209 - return (size_t) i;
87210 - } else if (insert && ((size_t) i == size)) {
87211 - return size;
87212 - }
87213 - throw std::out_of_range("index out of range");
87214 - }
87215 -
87216 - template <class Difference>
87217 - void
87218 - slice_adjust(Difference i, Difference j, Py_ssize_t step, size_t size, Difference &ii, Difference &jj, bool insert = false) {
87219 - if (step == 0) {
87220 - throw std::invalid_argument("slice step cannot be zero");
87221 - } else if (step > 0) {
87222 - // Required range: 0 <= i < size, 0 <= j < size
87223 - if (i < 0) {
87224 - ii = 0;
87225 - } else if (i < (Difference)size) {
87226 - ii = i;
87227 - } else if (insert && (i >= (Difference)size)) {
87228 - ii = (Difference)size;
87229 - }
87230 - if ( j < 0 ) {
87231 - jj = 0;
87232 - } else {
87233 - jj = (j < (Difference)size) ? j : (Difference)size;
87234 - }
87235 - } else {
87236 - // Required range: -1 <= i < size-1, -1 <= j < size-1
87237 - if (i < -1) {
87238 - ii = -1;
87239 - } else if (i < (Difference) size) {
87240 - ii = i;
87241 - } else if (i >= (Difference)(size-1)) {
87242 - ii = (Difference)(size-1);
87243 - }
87244 - if (j < -1) {
87245 - jj = -1;
87246 - } else {
87247 - jj = (j < (Difference)size ) ? j : (Difference)(size-1);
87248 - }
87249 - }
87250 - }
87251 -
87252 - template <class Sequence, class Difference>
87253 - inline typename Sequence::iterator
87254 - getpos(Sequence* self, Difference i) {
87255 - typename Sequence::iterator pos = self->begin();
87256 - std::advance(pos, check_index(i,self->size()));
87257 - return pos;
87258 - }
87259 -
87260 - template <class Sequence, class Difference>
87261 - inline typename Sequence::const_iterator
87262 - cgetpos(const Sequence* self, Difference i) {
87263 - typename Sequence::const_iterator pos = self->begin();
87264 - std::advance(pos, check_index(i,self->size()));
87265 - return pos;
87266 - }
87267 -
87268 - template <class Sequence, class Difference>
87269 - inline Sequence*
87270 - getslice(const Sequence* self, Difference i, Difference j, Py_ssize_t step) {
87271 - typename Sequence::size_type size = self->size();
87272 - Difference ii = 0;
87273 - Difference jj = 0;
87274 - swig::slice_adjust(i, j, step, size, ii, jj);
87275 -
87276 - if (step > 0) {
87277 - typename Sequence::const_iterator sb = self->begin();
87278 - typename Sequence::const_iterator se = self->begin();
87279 - std::advance(sb,ii);
87280 - std::advance(se,jj);
87281 - if (step == 1) {
87282 - return new Sequence(sb, se);
87283 - } else {
87284 - Sequence *sequence = new Sequence();
87285 - typename Sequence::const_iterator it = sb;
87286 - while (it!=se) {
87287 - sequence->push_back(*it);
87288 - for (Py_ssize_t c=0; c<step && it!=se; ++c)
87289 - it++;
87290 - }
87291 - return sequence;
87292 - }
87293 - } else {
87294 - Sequence *sequence = new Sequence();
87295 - if (ii > jj) {
87296 - typename Sequence::const_reverse_iterator sb = self->rbegin();
87297 - typename Sequence::const_reverse_iterator se = self->rbegin();
87298 - std::advance(sb,size-ii-1);
87299 - std::advance(se,size-jj-1);
87300 - typename Sequence::const_reverse_iterator it = sb;
87301 - while (it!=se) {
87302 - sequence->push_back(*it);
87303 - for (Py_ssize_t c=0; c<-step && it!=se; ++c)
87304 - it++;
87305 - }
87306 - }
87307 - return sequence;
87308 - }
87309 - }
87310 -
87311 - template <class Sequence, class Difference, class InputSeq>
87312 - inline void
87313 - setslice(Sequence* self, Difference i, Difference j, Py_ssize_t step, const InputSeq& is = InputSeq()) {
87314 - typename Sequence::size_type size = self->size();
87315 - Difference ii = 0;
87316 - Difference jj = 0;
87317 - swig::slice_adjust(i, j, step, size, ii, jj, true);
87318 - if (step > 0) {
87319 - if (jj < ii)
87320 - jj = ii;
87321 - if (step == 1) {
87322 - size_t ssize = jj - ii;
87323 - if (ssize <= is.size()) {
87324 - // expanding/staying the same size
87325 - typename Sequence::iterator sb = self->begin();
87326 - typename InputSeq::const_iterator isit = is.begin();
87327 - std::advance(sb,ii);
87328 - std::advance(isit, jj - ii);
87329 - self->insert(std::copy(is.begin(), isit, sb), isit, is.end());
87330 - } else {
87331 - // shrinking
87332 - typename Sequence::iterator sb = self->begin();
87333 - typename Sequence::iterator se = self->begin();
87334 - std::advance(sb,ii);
87335 - std::advance(se,jj);
87336 - self->erase(sb,se);
87337 - sb = self->begin();
87338 - std::advance(sb,ii);
87339 - self->insert(sb, is.begin(), is.end());
87340 - }
87341 - } else {
87342 - size_t replacecount = (jj - ii + step - 1) / step;
87343 - if (is.size() != replacecount) {
87344 - char msg[1024];
87345 - sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount);
87346 - throw std::invalid_argument(msg);
87347 - }
87348 - typename Sequence::const_iterator isit = is.begin();
87349 - typename Sequence::iterator it = self->begin();
87350 - std::advance(it,ii);
87351 - for (size_t rc=0; rc<replacecount; ++rc) {
87352 - *it++ = *isit++;
87353 - for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c)
87354 - it++;
87355 - }
87356 - }
87357 - } else {
87358 - if (jj > ii)
87359 - jj = ii;
87360 - size_t replacecount = (ii - jj - step - 1) / -step;
87361 - if (is.size() != replacecount) {
87362 - char msg[1024];
87363 - sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount);
87364 - throw std::invalid_argument(msg);
87365 - }
87366 - typename Sequence::const_iterator isit = is.begin();
87367 - typename Sequence::reverse_iterator it = self->rbegin();
87368 - std::advance(it,size-ii-1);
87369 - for (size_t rc=0; rc<replacecount; ++rc) {
87370 - *it++ = *isit++;
87371 - for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c)
87372 - it++;
87373 - }
87374 - }
87375 - }
87376 -
87377 - template <class Sequence, class Difference>
87378 - inline void
87379 - delslice(Sequence* self, Difference i, Difference j, Py_ssize_t step) {
87380 - typename Sequence::size_type size = self->size();
87381 - Difference ii = 0;
87382 - Difference jj = 0;
87383 - swig::slice_adjust(i, j, step, size, ii, jj, true);
87384 - if (step > 0) {
87385 - if (jj > ii) {
87386 - typename Sequence::iterator sb = self->begin();
87387 - std::advance(sb,ii);
87388 - if (step == 1) {
87389 - typename Sequence::iterator se = self->begin();
87390 - std::advance(se,jj);
87391 - self->erase(sb,se);
87392 - } else {
87393 - typename Sequence::iterator it = sb;
87394 - size_t delcount = (jj - ii + step - 1) / step;
87395 - while (delcount) {
87396 - it = self->erase(it);
87397 - for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c)
87398 - it++;
87399 - delcount--;
87400 - }
87401 - }
87402 - }
87403 - } else {
87404 - if (ii > jj) {
87405 - typename Sequence::reverse_iterator sb = self->rbegin();
87406 - std::advance(sb,size-ii-1);
87407 - typename Sequence::reverse_iterator it = sb;
87408 - size_t delcount = (ii - jj - step - 1) / -step;
87409 - while (delcount) {
87410 - it = typename Sequence::reverse_iterator(self->erase((++it).base()));
87411 - for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c)
87412 - it++;
87413 - delcount--;
87414 - }
87415 - }
87416 - }
87417 - }
87418 -}
87419 -
87420 -
87421 -#if defined(__SUNPRO_CC) && defined(_RWSTD_VER)
87422 -# if !defined(SWIG_NO_STD_NOITERATOR_TRAITS_STL)
87423 -# define SWIG_STD_NOITERATOR_TRAITS_STL
87424 -# endif
87425 -#endif
87426 -
87427 -#if !defined(SWIG_STD_NOITERATOR_TRAITS_STL)
87428 -#include <iterator>
87429 -#else
87430 -namespace std {
87431 - template <class Iterator>
87432 - struct iterator_traits {
87433 - typedef ptrdiff_t difference_type;
87434 - typedef typename Iterator::value_type value_type;
87435 - };
87436 -
87437 - template <class Iterator, class Category,class T, class Reference, class Pointer, class Distance>
87438 - struct iterator_traits<__reverse_bi_iterator<Iterator,Category,T,Reference,Pointer,Distance> > {
87439 - typedef Distance difference_type;
87440 - typedef T value_type;
87441 - };
87442 -
87443 - template <class T>
87444 - struct iterator_traits<T*> {
87445 - typedef T value_type;
87446 - typedef ptrdiff_t difference_type;
87447 - };
87448 -
87449 - template<typename _InputIterator>
87450 - inline typename iterator_traits<_InputIterator>::difference_type
87451 - distance(_InputIterator __first, _InputIterator __last)
87452 - {
87453 - typename iterator_traits<_InputIterator>::difference_type __n = 0;
87454 - while (__first != __last) {
87455 - ++__first; ++__n;
87456 - }
87457 - return __n;
87458 - }
87459 -}
87460 -#endif
87461 -
87462 -
87463 -namespace swig {
87464 - template<typename OutIterator>
87465 - class SwigPyIterator_T : public SwigPyIterator
87466 - {
87467 - public:
87468 - typedef OutIterator out_iterator;
87469 - typedef typename std::iterator_traits<out_iterator>::value_type value_type;
87470 - typedef SwigPyIterator_T<out_iterator> self_type;
87471 -
87472 - SwigPyIterator_T(out_iterator curr, PyObject *seq)
87473 - : SwigPyIterator(seq), current(curr)
87474 - {
87475 - }
87476 -
87477 - const out_iterator& get_current() const
87478 - {
87479 - return current;
87480 - }
87481 -
87482 -
87483 - bool equal (const SwigPyIterator &iter) const
87484 - {
87485 - const self_type *iters = dynamic_cast<const self_type *>(&iter);
87486 - if (iters) {
87487 - return (current == iters->get_current());
87488 - } else {
87489 - throw std::invalid_argument("bad iterator type");
87490 - }
87491 - }
87492 -
87493 - ptrdiff_t distance(const SwigPyIterator &iter) const
87494 - {
87495 - const self_type *iters = dynamic_cast<const self_type *>(&iter);
87496 - if (iters) {
87497 - return std::distance(current, iters->get_current());
87498 - } else {
87499 - throw std::invalid_argument("bad iterator type");
87500 - }
87501 - }
87502 -
87503 - protected:
87504 - out_iterator current;
87505 - };
87506 -
87507 - template <class ValueType>
87508 - struct from_oper
87509 - {
87510 - typedef const ValueType& argument_type;
87511 - typedef PyObject *result_type;
87512 - result_type operator()(argument_type v) const
87513 - {
87514 - return swig::from(v);
87515 - }
87516 - };
87517 -
87518 - template<typename OutIterator,
87519 - typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
87520 - typename FromOper = from_oper<ValueType> >
87521 - class SwigPyIteratorOpen_T : public SwigPyIterator_T<OutIterator>
87522 - {
87523 - public:
87524 - FromOper from;
87525 - typedef OutIterator out_iterator;
87526 - typedef ValueType value_type;
87527 - typedef SwigPyIterator_T<out_iterator> base;
87528 - typedef SwigPyIteratorOpen_T<OutIterator, ValueType, FromOper> self_type;
87529 -
87530 - SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
87531 - : SwigPyIterator_T<OutIterator>(curr, seq)
87532 - {
87533 - }
87534 -
87535 - PyObject *value() const {
87536 - return from(static_cast<const value_type&>(*(base::current)));
87537 - }
87538 -
87539 - SwigPyIterator *copy() const
87540 - {
87541 - return new self_type(*this);
87542 - }
87543 -
87544 - SwigPyIterator *incr(size_t n = 1)
87545 - {
87546 - while (n--) {
87547 - ++base::current;
87548 - }
87549 - return this;
87550 - }
87551 -
87552 - SwigPyIterator *decr(size_t n = 1)
87553 - {
87554 - while (n--) {
87555 - --base::current;
87556 - }
87557 - return this;
87558 - }
87559 - };
87560 -
87561 - template<typename OutIterator,
87562 - typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
87563 - typename FromOper = from_oper<ValueType> >
87564 - class SwigPyIteratorClosed_T : public SwigPyIterator_T<OutIterator>
87565 - {
87566 - public:
87567 - FromOper from;
87568 - typedef OutIterator out_iterator;
87569 - typedef ValueType value_type;
87570 - typedef SwigPyIterator_T<out_iterator> base;
87571 - typedef SwigPyIteratorClosed_T<OutIterator, ValueType, FromOper> self_type;
87572 -
87573 - SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq)
87574 - : SwigPyIterator_T<OutIterator>(curr, seq), begin(first), end(last)
87575 - {
87576 - }
87577 -
87578 - PyObject *value() const {
87579 - if (base::current == end) {
87580 - throw stop_iteration();
87581 - } else {
87582 - return from(static_cast<const value_type&>(*(base::current)));
87583 - }
87584 - }
87585 -
87586 - SwigPyIterator *copy() const
87587 - {
87588 - return new self_type(*this);
87589 - }
87590 -
87591 - SwigPyIterator *incr(size_t n = 1)
87592 - {
87593 - while (n--) {
87594 - if (base::current == end) {
87595 - throw stop_iteration();
87596 - } else {
87597 - ++base::current;
87598 - }
87599 - }
87600 - return this;
87601 - }
87602 -
87603 - SwigPyIterator *decr(size_t n = 1)
87604 - {
87605 - while (n--) {
87606 - if (base::current == begin) {
87607 - throw stop_iteration();
87608 - } else {
87609 - --base::current;
87610 - }
87611 - }
87612 - return this;
87613 - }
87614 -
87615 - private:
87616 - out_iterator begin;
87617 - out_iterator end;
87618 - };
87619 -
87620 - template<typename OutIter>
87621 - inline SwigPyIterator*
87622 - make_output_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0)
87623 - {
87624 - return new SwigPyIteratorClosed_T<OutIter>(current, begin, end, seq);
87625 - }
87626 -
87627 - template<typename OutIter>
87628 - inline SwigPyIterator*
87629 - make_output_iterator(const OutIter& current, PyObject *seq = 0)
87630 - {
87631 - return new SwigPyIteratorOpen_T<OutIter>(current, seq);
87632 - }
87633 -
87634 -}
87635 -
87636 -
87637 -namespace swig
87638 -{
87639 - template <class T>
87640 - struct SwigPySequence_Ref
87641 - {
87642 - SwigPySequence_Ref(PyObject* seq, int index)
87643 - : _seq(seq), _index(index)
87644 - {
87645 - }
87646 -
87647 - operator T () const
87648 - {
87649 - swig::SwigVar_PyObject item = PySequence_GetItem(_seq, _index);
87650 - try {
87651 - return swig::as<T>(item, true);
87652 - } catch (std::exception& e) {
87653 - char msg[1024];
87654 - sprintf(msg, "in sequence element %d ", _index);
87655 - if (!PyErr_Occurred()) {
87656 - ::SWIG_Error(SWIG_TypeError, swig::type_name<T>());
87657 - }
87658 - SWIG_Python_AddErrorMsg(msg);
87659 - SWIG_Python_AddErrorMsg(e.what());
87660 - throw;
87661 - }
87662 - }
87663 -
87664 - SwigPySequence_Ref& operator=(const T& v)
87665 - {
87666 - PySequence_SetItem(_seq, _index, swig::from<T>(v));
87667 - return *this;
87668 - }
87669 -
87670 - private:
87671 - PyObject* _seq;
87672 - int _index;
87673 - };
87674 -
87675 - template <class T>
87676 - struct SwigPySequence_ArrowProxy
87677 - {
87678 - SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
87679 - const T* operator->() const { return &m_value; }
87680 - operator const T*() const { return &m_value; }
87681 - T m_value;
87682 - };
87683 -
87684 - template <class T, class Reference >
87685 - struct SwigPySequence_InputIterator
87686 - {
87687 - typedef SwigPySequence_InputIterator<T, Reference > self;
87688 -
87689 - typedef std::random_access_iterator_tag iterator_category;
87690 - typedef Reference reference;
87691 - typedef T value_type;
87692 - typedef T* pointer;
87693 - typedef int difference_type;
87694 -
87695 - SwigPySequence_InputIterator()
87696 - {
87697 - }
87698 -
87699 - SwigPySequence_InputIterator(PyObject* seq, int index)
87700 - : _seq(seq), _index(index)
87701 - {
87702 - }
87703 -
87704 - reference operator*() const
87705 - {
87706 - return reference(_seq, _index);
87707 - }
87708 -
87709 - SwigPySequence_ArrowProxy<T>
87710 - operator->() const {
87711 - return SwigPySequence_ArrowProxy<T>(operator*());
87712 - }
87713 -
87714 - bool operator==(const self& ri) const
87715 - {
87716 - return (_index == ri._index) && (_seq == ri._seq);
87717 - }
87718 -
87719 - bool operator!=(const self& ri) const
87720 - {
87721 - return !(operator==(ri));
87722 - }
87723 -
87724 - self& operator ++ ()
87725 - {
87726 - ++_index;
87727 - return *this;
87728 - }
87729 -
87730 - self& operator -- ()
87731 - {
87732 - --_index;
87733 - return *this;
87734 - }
87735 -
87736 - self& operator += (difference_type n)
87737 - {
87738 - _index += n;
87739 - return *this;
87740 - }
87741 -
87742 - self operator +(difference_type n) const
87743 - {
87744 - return self(_seq, _index + n);
87745 - }
87746 -
87747 - self& operator -= (difference_type n)
87748 - {
87749 - _index -= n;
87750 - return *this;
87751 - }
87752 -
87753 - self operator -(difference_type n) const
87754 - {
87755 - return self(_seq, _index - n);
87756 - }
87757 -
87758 - difference_type operator - (const self& ri) const
87759 - {
87760 - return _index - ri._index;
87761 - }
87762 -
87763 - bool operator < (const self& ri) const
87764 - {
87765 - return _index < ri._index;
87766 - }
87767 -
87768 - reference
87769 - operator[](difference_type n) const
87770 - {
87771 - return reference(_seq, _index + n);
87772 - }
87773 -
87774 - private:
87775 - PyObject* _seq;
87776 - difference_type _index;
87777 - };
87778 -
87779 - template <class T>
87780 - struct SwigPySequence_Cont
87781 - {
87782 - typedef SwigPySequence_Ref<T> reference;
87783 - typedef const SwigPySequence_Ref<T> const_reference;
87784 - typedef T value_type;
87785 - typedef T* pointer;
87786 - typedef int difference_type;
87787 - typedef int size_type;
87788 - typedef const pointer const_pointer;
87789 - typedef SwigPySequence_InputIterator<T, reference> iterator;
87790 - typedef SwigPySequence_InputIterator<T, const_reference> const_iterator;
87791 -
87792 - SwigPySequence_Cont(PyObject* seq) : _seq(0)
87793 - {
87794 - if (!PySequence_Check(seq)) {
87795 - throw std::invalid_argument("a sequence is expected");
87796 - }
87797 - _seq = seq;
87798 - Py_INCREF(_seq);
87799 - }
87800 -
87801 - ~SwigPySequence_Cont()
87802 - {
87803 - Py_XDECREF(_seq);
87804 - }
87805 -
87806 - size_type size() const
87807 - {
87808 - return static_cast<size_type>(PySequence_Size(_seq));
87809 - }
87810 -
87811 - bool empty() const
87812 - {
87813 - return size() == 0;
87814 - }
87815 -
87816 - iterator begin()
87817 - {
87818 - return iterator(_seq, 0);
87819 - }
87820 -
87821 - const_iterator begin() const
87822 - {
87823 - return const_iterator(_seq, 0);
87824 - }
87825 -
87826 - iterator end()
87827 - {
87828 - return iterator(_seq, size());
87829 - }
87830 -
87831 - const_iterator end() const
87832 - {
87833 - return const_iterator(_seq, size());
87834 - }
87835 -
87836 - reference operator[](difference_type n)
87837 - {
87838 - return reference(_seq, n);
87839 - }
87840 -
87841 - const_reference operator[](difference_type n) const
87842 - {
87843 - return const_reference(_seq, n);
87844 - }
87845 -
87846 - bool check(bool set_err = true) const
87847 - {
87848 - int s = size();
87849 - for (int i = 0; i < s; ++i) {
87850 - swig::SwigVar_PyObject item = PySequence_GetItem(_seq, i);
87851 - if (!swig::check<value_type>(item)) {
87852 - if (set_err) {
87853 - char msg[1024];
87854 - sprintf(msg, "in sequence element %d", i);
87855 - SWIG_Error(SWIG_RuntimeError, msg);
87856 - }
87857 - return false;
87858 - }
87859 - }
87860 - return true;
87861 - }
87862 -
87863 - private:
87864 - PyObject* _seq;
87865 - };
87866 -
87867 -}
87868 -
87869 -
87870 -SWIGINTERNINLINE PyObject*
87871 - SWIG_From_int (int value)
87872 -{
87873 - return PyInt_FromLong((long) value);
87874 -}
87875 -
87876 -
87877 -SWIGINTERN swig_type_info*
87878 -SWIG_pchar_descriptor(void)
87879 -{
87880 - static int init = 0;
87881 - static swig_type_info* info = 0;
87882 - if (!init) {
87883 - info = SWIG_TypeQuery("_p_char");
87884 - init = 1;
87885 - }
87886 - return info;
87887 -}
87888 -
87889 -
87890 -SWIGINTERNINLINE PyObject *
87891 -SWIG_FromCharPtrAndSize(const char* carray, size_t size)
87892 -{
87893 - if (carray) {
87894 - if (size > INT_MAX) {
87895 - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
87896 - return pchar_descriptor ?
87897 - SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
87898 - } else {
87899 -#if PY_VERSION_HEX >= 0x03000000
87900 - return PyUnicode_FromStringAndSize(carray, static_cast< int >(size));
87901 -#else
87902 - return PyString_FromStringAndSize(carray, static_cast< int >(size));
87903 -#endif
87904 - }
87905 - } else {
87906 - return SWIG_Py_Void();
87907 - }
87908 -}
87909 -
87910 -
87911 -SWIGINTERNINLINE PyObject *
87912 -SWIG_FromCharPtr(const char *cptr)
87913 -{
87914 - return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
87915 -}
87916 -
87917 -
87918 -#include <limits.h>
87919 -#if !defined(SWIG_NO_LLONG_MAX)
87920 -# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
87921 -# define LLONG_MAX __LONG_LONG_MAX__
87922 -# define LLONG_MIN (-LLONG_MAX - 1LL)
87923 -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
87924 -# endif
87925 -#endif
87926 -
87927 -
87928 -SWIGINTERN int
87929 -SWIG_AsVal_double (PyObject *obj, double *val)
87930 -{
87931 - int res = SWIG_TypeError;
87932 - if (PyFloat_Check(obj)) {
87933 - if (val) *val = PyFloat_AsDouble(obj);
87934 - return SWIG_OK;
87935 - } else if (PyInt_Check(obj)) {
87936 - if (val) *val = PyInt_AsLong(obj);
87937 - return SWIG_OK;
87938 - } else if (PyLong_Check(obj)) {
87939 - double v = PyLong_AsDouble(obj);
87940 - if (!PyErr_Occurred()) {
87941 - if (val) *val = v;
87942 - return SWIG_OK;
87943 - } else {
87944 - PyErr_Clear();
87945 - }
87946 - }
87947 -#ifdef SWIG_PYTHON_CAST_MODE
87948 - {
87949 - int dispatch = 0;
87950 - double d = PyFloat_AsDouble(obj);
87951 - if (!PyErr_Occurred()) {
87952 - if (val) *val = d;
87953 - return SWIG_AddCast(SWIG_OK);
87954 - } else {
87955 - PyErr_Clear();
87956 - }
87957 - if (!dispatch) {
87958 - long v = PyLong_AsLong(obj);
87959 - if (!PyErr_Occurred()) {
87960 - if (val) *val = v;
87961 - return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
87962 - } else {
87963 - PyErr_Clear();
87964 - }
87965 - }
87966 - }
87967 -#endif
87968 - return res;
87969 -}
87970 -
87971 -
87972 -#include <float.h>
87973 -
87974 -
87975 -#include <math.h>
87976 -
87977 -
87978 -SWIGINTERNINLINE int
87979 -SWIG_CanCastAsInteger(double *d, double min, double max) {
87980 - double x = *d;
87981 - if ((min <= x && x <= max)) {
87982 - double fx = floor(x);
87983 - double cx = ceil(x);
87984 - double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
87985 - if ((errno == EDOM) || (errno == ERANGE)) {
87986 - errno = 0;
87987 - } else {
87988 - double summ, reps, diff;
87989 - if (rd < x) {
87990 - diff = x - rd;
87991 - } else if (rd > x) {
87992 - diff = rd - x;
87993 - } else {
87994 - return 1;
87995 - }
87996 - summ = rd + x;
87997 - reps = diff/summ;
87998 - if (reps < 8*DBL_EPSILON) {
87999 - *d = rd;
88000 - return 1;
88001 - }
88002 - }
88003 - }
88004 - return 0;
88005 -}
88006 -
88007 -
88008 -SWIGINTERN int
88009 -SWIG_AsVal_long (PyObject *obj, long* val)
88010 -{
88011 - if (PyInt_Check(obj)) {
88012 - if (val) *val = PyInt_AsLong(obj);
88013 - return SWIG_OK;
88014 - } else if (PyLong_Check(obj)) {
88015 - long v = PyLong_AsLong(obj);
88016 - if (!PyErr_Occurred()) {
88017 - if (val) *val = v;
88018 - return SWIG_OK;
88019 - } else {
88020 - PyErr_Clear();
88021 - }
88022 - }
88023 -#ifdef SWIG_PYTHON_CAST_MODE
88024 - {
88025 - int dispatch = 0;
88026 - long v = PyInt_AsLong(obj);
88027 - if (!PyErr_Occurred()) {
88028 - if (val) *val = v;
88029 - return SWIG_AddCast(SWIG_OK);
88030 - } else {
88031 - PyErr_Clear();
88032 - }
88033 - if (!dispatch) {
88034 - double d;
88035 - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
88036 - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
88037 - if (val) *val = (long)(d);
88038 - return res;
88039 - }
88040 - }
88041 - }
88042 -#endif
88043 - return SWIG_TypeError;
88044 -}
88045 -
88046 -
88047 -SWIGINTERN int
88048 -SWIG_AsVal_int (PyObject * obj, int *val)
88049 -{
88050 - long v;
88051 - int res = SWIG_AsVal_long (obj, &v);
88052 - if (SWIG_IsOK(res)) {
88053 - if ((v < INT_MIN || v > INT_MAX)) {
88054 - return SWIG_OverflowError;
88055 - } else {
88056 - if (val) *val = static_cast< int >(v);
88057 - }
88058 - }
88059 - return res;
88060 -}
88061 -
88062 -
88063 -namespace swig {
88064 - template <> struct traits<int > {
88065 - typedef value_category category;
88066 - static const char* type_name() { return"int"; }
88067 - };
88068 - template <> struct traits_asval<int > {
88069 - typedef int value_type;
88070 - static int asval(PyObject *obj, value_type *val) {
88071 - return SWIG_AsVal_int (obj, val);
88072 - }
88073 - };
88074 - template <> struct traits_from<int > {
88075 - typedef int value_type;
88076 - static PyObject *from(const value_type& val) {
88077 - return SWIG_From_int (val);
88078 - }
88079 - };
88080 -}
88081 -
88082 -
88083 -namespace swig {
88084 - template <class SwigPySeq, class Seq>
88085 - inline void
88086 - assign(const SwigPySeq& swigpyseq, Seq* seq) {
88087 - // seq->assign(swigpyseq.begin(), swigpyseq.end()); // not used as not always implemented
88088 - typedef typename SwigPySeq::value_type value_type;
88089 - typename SwigPySeq::const_iterator it = swigpyseq.begin();
88090 - for (;it != swigpyseq.end(); ++it) {
88091 - seq->insert(seq->end(),(value_type)(*it));
88092 - }
88093 - }
88094 -
88095 - template <class Seq, class T = typename Seq::value_type >
88096 - struct traits_asptr_stdseq {
88097 - typedef Seq sequence;
88098 - typedef T value_type;
88099 -
88100 - static int asptr(PyObject *obj, sequence **seq) {
88101 - if (obj == Py_None || SWIG_Python_GetSwigThis(obj)) {
88102 - sequence *p;
88103 - if (::SWIG_ConvertPtr(obj,(void**)&p,
88104 - swig::type_info<sequence>(),0) == SWIG_OK) {
88105 - if (seq) *seq = p;
88106 - return SWIG_OLDOBJ;
88107 - }
88108 - } else if (PySequence_Check(obj)) {
88109 - try {
88110 - SwigPySequence_Cont<value_type> swigpyseq(obj);
88111 - if (seq) {
88112 - sequence *pseq = new sequence();
88113 - assign(swigpyseq, pseq);
88114 - *seq = pseq;
88115 - return SWIG_NEWOBJ;
88116 - } else {
88117 - return swigpyseq.check() ? SWIG_OK : SWIG_ERROR;
88118 - }
88119 - } catch (std::exception& e) {
88120 - if (seq) {
88121 - if (!PyErr_Occurred()) {
88122 - PyErr_SetString(PyExc_TypeError, e.what());
88123 - }
88124 - }
88125 - return SWIG_ERROR;
88126 - }
88127 - }
88128 - return SWIG_ERROR;
88129 - }
88130 - };
88131 -
88132 - template <class Seq, class T = typename Seq::value_type >
88133 - struct traits_from_stdseq {
88134 - typedef Seq sequence;
88135 - typedef T value_type;
88136 - typedef typename Seq::size_type size_type;
88137 - typedef typename sequence::const_iterator const_iterator;
88138 -
88139 - static PyObject *from(const sequence& seq) {
88140 -#ifdef SWIG_PYTHON_EXTRA_NATIVE_CONTAINERS
88141 - swig_type_info *desc = swig::type_info<sequence>();
88142 - if (desc && desc->clientdata) {
88143 - return SWIG_NewPointerObj(new sequence(seq), desc, SWIG_POINTER_OWN);
88144 - }
88145 -#endif
88146 - size_type size = seq.size();
88147 - if (size <= (size_type)INT_MAX) {
88148 - PyObject *obj = PyTuple_New((int)size);
88149 - int i = 0;
88150 - for (const_iterator it = seq.begin();
88151 - it != seq.end(); ++it, ++i) {
88152 - PyTuple_SetItem(obj,i,swig::from<value_type>(*it));
88153 - }
88154 - return obj;
88155 - } else {
88156 - PyErr_SetString(PyExc_OverflowError,"sequence size not valid in python");
88157 - return NULL;
88158 - }
88159 - }
88160 - };
88161 -}
88162 -
88163 -
88164 - namespace swig {
88165 - template <class T>
88166 - struct traits_asptr<std::vector<T> > {
88167 - static int asptr(PyObject *obj, std::vector<T> **vec) {
88168 - return traits_asptr_stdseq<std::vector<T> >::asptr(obj, vec);
88169 - }
88170 - };
88171 -
88172 - template <class T>
88173 - struct traits_from<std::vector<T> > {
88174 - static PyObject *from(const std::vector<T>& vec) {
88175 - return traits_from_stdseq<std::vector<T> >::from(vec);
88176 - }
88177 - };
88178 - }
88179 -
88180 -
88181 - namespace swig {
88182 - template <> struct traits<std::vector<int, std::allocator< int > > > {
88183 - typedef pointer_category category;
88184 - static const char* type_name() {
88185 - return "std::vector<" "int" "," "std::allocator< int >" " >";
88186 - }
88187 - };
88188 - }
88189 -
88190 -
88191 -SWIGINTERN int
88192 -SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
88193 -{
88194 -#if PY_VERSION_HEX>=0x03000000
88195 - if (PyUnicode_Check(obj))
88196 -#else
88197 - if (PyString_Check(obj))
88198 -#endif
88199 - {
88200 - char *cstr; Py_ssize_t len;
88201 -#if PY_VERSION_HEX>=0x03000000
88202 - if (!alloc && cptr) {
88203 - /* We can't allow converting without allocation, since the internal
88204 - representation of string in Python 3 is UCS-2/UCS-4 but we require
88205 - a UTF-8 representation.
88206 - TODO(bhy) More detailed explanation */
88207 - return SWIG_RuntimeError;
88208 - }
88209 - obj = PyUnicode_AsUTF8String(obj);
88210 - PyBytes_AsStringAndSize(obj, &cstr, &len);
88211 - if(alloc) *alloc = SWIG_NEWOBJ;
88212 -#else
88213 - PyString_AsStringAndSize(obj, &cstr, &len);
88214 -#endif
88215 - if (cptr) {
88216 - if (alloc) {
88217 - /*
88218 - In python the user should not be able to modify the inner
88219 - string representation. To warranty that, if you define
88220 - SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
88221 - buffer is always returned.
88222 -
88223 - The default behavior is just to return the pointer value,
88224 - so, be careful.
88225 - */
88226 -#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
88227 - if (*alloc != SWIG_OLDOBJ)
88228 -#else
88229 - if (*alloc == SWIG_NEWOBJ)
88230 -#endif
88231 - {
88232 - *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
88233 - *alloc = SWIG_NEWOBJ;
88234 - }
88235 - else {
88236 - *cptr = cstr;
88237 - *alloc = SWIG_OLDOBJ;
88238 - }
88239 - } else {
88240 - #if PY_VERSION_HEX>=0x03000000
88241 - assert(0); /* Should never reach here in Python 3 */
88242 - #endif
88243 - *cptr = SWIG_Python_str_AsChar(obj);
88244 - }
88245 - }
88246 - if (psize) *psize = len + 1;
88247 -#if PY_VERSION_HEX>=0x03000000
88248 - Py_XDECREF(obj);
88249 -#endif
88250 - return SWIG_OK;
88251 - } else {
88252 - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
88253 - if (pchar_descriptor) {
88254 - void* vptr = 0;
88255 - if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
88256 - if (cptr) *cptr = (char *) vptr;
88257 - if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
88258 - if (alloc) *alloc = SWIG_OLDOBJ;
88259 - return SWIG_OK;
88260 - }
88261 - }
88262 - }
88263 - return SWIG_TypeError;
88264 -}
88265 -
88266 -
88267 -
88268 -
88269 -
88270 - #define SWIG_From_double PyFloat_FromDouble
88271 -
88272 -
88273 -namespace swig {
88274 - template <> struct traits<double > {
88275 - typedef value_category category;
88276 - static const char* type_name() { return"double"; }
88277 - };
88278 - template <> struct traits_asval<double > {
88279 - typedef double value_type;
88280 - static int asval(PyObject *obj, value_type *val) {
88281 - return SWIG_AsVal_double (obj, val);
88282 - }
88283 - };
88284 - template <> struct traits_from<double > {
88285 - typedef double value_type;
88286 - static PyObject *from(const value_type& val) {
88287 - return SWIG_From_double (val);
88288 - }
88289 - };
88290 -}
88291 -
88292 -
88293 - namespace swig {
88294 - template <> struct traits<std::vector<double, std::allocator< double > > > {
88295 - typedef pointer_category category;
88296 - static const char* type_name() {
88297 - return "std::vector<" "double" "," "std::allocator< double >" " >";
88298 - }
88299 - };
88300 - }
88301 -
88302 -#ifdef __cplusplus
88303 -extern "C" {
88304 -#endif
88305 -SWIGINTERN PyObject *_wrap_new_VMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
88306 - PyObject *resultobj = 0;
88307 - vips::VMask *result = 0 ;
88308 -
88309 - if (!PyArg_ParseTuple(args,(char *)":new_VMask")) SWIG_fail;
88310 - result = (vips::VMask *)new vips::VMask();
88311 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VMask, SWIG_POINTER_NEW | 0 );
88312 - return resultobj;
88313 -fail:
88314 - return NULL;
88315 -}
88316 -
88317 -
88318 -SWIGINTERN PyObject *_wrap_new_VMask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
88319 - PyObject *resultobj = 0;
88320 - vips::VMask *arg1 = 0 ;
88321 - void *argp1 = 0 ;
88322 - int res1 = 0 ;
88323 - PyObject * obj0 = 0 ;
88324 - vips::VMask *result = 0 ;
88325 -
88326 - if (!PyArg_ParseTuple(args,(char *)"O:new_VMask",&obj0)) SWIG_fail;
88327 - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_vips__VMask, 0 | 0);
88328 - if (!SWIG_IsOK(res1)) {
88329 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VMask" "', argument " "1"" of type '" "vips::VMask const &""'");
88330 - }
88331 - if (!argp1) {
88332 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VMask" "', argument " "1"" of type '" "vips::VMask const &""'");
88333 - }
88334 - arg1 = reinterpret_cast< vips::VMask * >(argp1);
88335 - result = (vips::VMask *)new vips::VMask((vips::VMask const &)*arg1);
88336 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VMask, SWIG_POINTER_NEW | 0 );
88337 - return resultobj;
88338 -fail:
88339 - return NULL;
88340 -}
88341 -
88342 -
88343 -SWIGINTERN PyObject *_wrap_new_VMask(PyObject *self, PyObject *args) {
88344 - int argc;
88345 - PyObject *argv[2];
88346 - int ii;
88347 -
88348 - if (!PyTuple_Check(args)) SWIG_fail;
88349 - argc = args ? (int)PyObject_Length(args) : 0;
88350 - for (ii = 0; (ii < 1) && (ii < argc); ii++) {
88351 - argv[ii] = PyTuple_GET_ITEM(args,ii);
88352 - }
88353 - if (argc == 0) {
88354 - return _wrap_new_VMask__SWIG_0(self, args);
88355 - }
88356 - if (argc == 1) {
88357 - int _v;
88358 - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_vips__VMask, 0);
88359 - _v = SWIG_CheckState(res);
88360 - if (_v) {
88361 - return _wrap_new_VMask__SWIG_1(self, args);
88362 - }
88363 - }
88364 -
88365 -fail:
88366 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VMask'.\n"
88367 - " Possible C/C++ prototypes are:\n"
88368 - " vips::VMask::VMask()\n"
88369 - " vips::VMask::VMask(vips::VMask const &)\n");
88370 - return 0;
88371 -}
88372 -
88373 -
88374 -SWIGINTERN PyObject *_wrap_VMask___assign__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
88375 - PyObject *resultobj = 0;
88376 - vips::VMask *arg1 = (vips::VMask *) 0 ;
88377 - vips::VMask *arg2 = 0 ;
88378 - void *argp1 = 0 ;
88379 - int res1 = 0 ;
88380 - void *argp2 = 0 ;
88381 - int res2 = 0 ;
88382 - PyObject * obj0 = 0 ;
88383 - PyObject * obj1 = 0 ;
88384 - vips::VMask *result = 0 ;
88385 -
88386 - if (!PyArg_ParseTuple(args,(char *)"OO:VMask___assign__",&obj0,&obj1)) SWIG_fail;
88387 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 );
88388 - if (!SWIG_IsOK(res1)) {
88389 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask___assign__" "', argument " "1"" of type '" "vips::VMask *""'");
88390 - }
88391 - arg1 = reinterpret_cast< vips::VMask * >(argp1);
88392 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VMask, 0 | 0);
88393 - if (!SWIG_IsOK(res2)) {
88394 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VMask___assign__" "', argument " "2"" of type '" "vips::VMask const &""'");
88395 - }
88396 - if (!argp2) {
88397 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VMask___assign__" "', argument " "2"" of type '" "vips::VMask const &""'");
88398 - }
88399 - arg2 = reinterpret_cast< vips::VMask * >(argp2);
88400 - result = (vips::VMask *) &(arg1)->operator =((vips::VMask const &)*arg2);
88401 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VMask, 0 | 0 );
88402 - return resultobj;
88403 -fail:
88404 - return NULL;
88405 -}
88406 -
88407 -
88408 -SWIGINTERN PyObject *_wrap_delete_VMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
88409 - PyObject *resultobj = 0;
88410 - vips::VMask *arg1 = (vips::VMask *) 0 ;
88411 - void *argp1 = 0 ;
88412 - int res1 = 0 ;
88413 - PyObject * obj0 = 0 ;
88414 -
88415 - if (!PyArg_ParseTuple(args,(char *)"O:delete_VMask",&obj0)) SWIG_fail;
88416 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, SWIG_POINTER_DISOWN | 0 );
88417 - if (!SWIG_IsOK(res1)) {
88418 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VMask" "', argument " "1"" of type '" "vips::VMask *""'");
88419 - }
88420 - arg1 = reinterpret_cast< vips::VMask * >(argp1);
88421 - delete arg1;
88422 - resultobj = SWIG_Py_Void();
88423 - return resultobj;
88424 -fail:
88425 - return NULL;
88426 -}
88427 -
88428 -
88429 -SWIGINTERN PyObject *_wrap_VMask_xsize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
88430 - PyObject *resultobj = 0;
88431 - vips::VMask *arg1 = (vips::VMask *) 0 ;
88432 - void *argp1 = 0 ;
88433 - int res1 = 0 ;
88434 - PyObject * obj0 = 0 ;
88435 - int result;
88436 -
88437 - if (!PyArg_ParseTuple(args,(char *)"O:VMask_xsize",&obj0)) SWIG_fail;
88438 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 );
88439 - if (!SWIG_IsOK(res1)) {
88440 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask_xsize" "', argument " "1"" of type '" "vips::VMask const *""'");
88441 - }
88442 - arg1 = reinterpret_cast< vips::VMask * >(argp1);
88443 - try {
88444 - result = (int)((vips::VMask const *)arg1)->xsize();
88445 - }
88446 - catch(vips::VError &_e) {
88447 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
88448 - }
88449 -
88450 - resultobj = SWIG_From_int(static_cast< int >(result));
88451 - return resultobj;
88452 -fail:
88453 - return NULL;
88454 -}
88455 -
88456 -
88457 -SWIGINTERN PyObject *_wrap_VMask_ysize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
88458 - PyObject *resultobj = 0;
88459 - vips::VMask *arg1 = (vips::VMask *) 0 ;
88460 - void *argp1 = 0 ;
88461 - int res1 = 0 ;
88462 - PyObject * obj0 = 0 ;
88463 - int result;
88464 -
88465 - if (!PyArg_ParseTuple(args,(char *)"O:VMask_ysize",&obj0)) SWIG_fail;
88466 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 );
88467 - if (!SWIG_IsOK(res1)) {
88468 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask_ysize" "', argument " "1"" of type '" "vips::VMask const *""'");
88469 - }
88470 - arg1 = reinterpret_cast< vips::VMask * >(argp1);
88471 - try {
88472 - result = (int)((vips::VMask const *)arg1)->ysize();
88473 - }
88474 - catch(vips::VError &_e) {
88475 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
88476 - }
88477 -
88478 - resultobj = SWIG_From_int(static_cast< int >(result));
88479 - return resultobj;
88480 -fail:
88481 - return NULL;
88482 -}
88483 -
88484 -
88485 -SWIGINTERN PyObject *_wrap_VMask_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
88486 - PyObject *resultobj = 0;
88487 - vips::VMask *arg1 = (vips::VMask *) 0 ;
88488 - void *argp1 = 0 ;
88489 - int res1 = 0 ;
88490 - PyObject * obj0 = 0 ;
88491 - int result;
88492 -
88493 - if (!PyArg_ParseTuple(args,(char *)"O:VMask_size",&obj0)) SWIG_fail;
88494 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 );
88495 - if (!SWIG_IsOK(res1)) {
88496 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask_size" "', argument " "1"" of type '" "vips::VMask const *""'");
88497 - }
88498 - arg1 = reinterpret_cast< vips::VMask * >(argp1);
88499 - try {
88500 - result = (int)((vips::VMask const *)arg1)->size();
88501 - }
88502 - catch(vips::VError &_e) {
88503 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
88504 - }
88505 -
88506 - resultobj = SWIG_From_int(static_cast< int >(result));
88507 - return resultobj;
88508 -fail:
88509 - return NULL;
88510 -}
88511 -
88512 -
88513 -SWIGINTERN PyObject *_wrap_VMask_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
88514 - PyObject *resultobj = 0;
88515 - vips::VMask *arg1 = (vips::VMask *) 0 ;
88516 - void *argp1 = 0 ;
88517 - int res1 = 0 ;
88518 - PyObject * obj0 = 0 ;
88519 - char *result = 0 ;
88520 -
88521 - if (!PyArg_ParseTuple(args,(char *)"O:VMask_filename",&obj0)) SWIG_fail;
88522 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 );
88523 - if (!SWIG_IsOK(res1)) {
88524 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask_filename" "', argument " "1"" of type '" "vips::VMask const *""'");
88525 - }
88526 - arg1 = reinterpret_cast< vips::VMask * >(argp1);
88527 - try {
88528 - result = (char *)((vips::VMask const *)arg1)->filename();
88529 - }
88530 - catch(vips::VError &_e) {
88531 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
88532 - }
88533 -
88534 - resultobj = SWIG_FromCharPtr((const char *)result);
88535 - return resultobj;
88536 -fail:
88537 - return NULL;
88538 -}
88539 -
88540 -
88541 -SWIGINTERN PyObject *_wrap_VMask_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
88542 - PyObject *resultobj = 0;
88543 - vips::VMask *arg1 = (vips::VMask *) 0 ;
88544 - void *argp1 = 0 ;
88545 - int res1 = 0 ;
88546 - PyObject * obj0 = 0 ;
88547 - _private_detail::VPMask::VMaskType result;
88548 -
88549 - if (!PyArg_ParseTuple(args,(char *)"O:VMask_type",&obj0)) SWIG_fail;
88550 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 );
88551 - if (!SWIG_IsOK(res1)) {
88552 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask_type" "', argument " "1"" of type '" "vips::VMask const *""'");
88553 - }
88554 - arg1 = reinterpret_cast< vips::VMask * >(argp1);
88555 - result = ((vips::VMask const *)arg1)->type();
88556 - resultobj = SWIG_NewPointerObj((new _private_detail::VPMask::VMaskType(static_cast< const _private_detail::VPMask::VMaskType& >(result))), SWIGTYPE_p__private_detail__VPMask__VMaskType, SWIG_POINTER_OWN | 0 );
88557 - return resultobj;
88558 -fail:
88559 - return NULL;
88560 -}
88561 -
88562 -
88563 -SWIGINTERN PyObject *_wrap_VMask_mask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
88564 - PyObject *resultobj = 0;
88565 - vips::VMask *arg1 = (vips::VMask *) 0 ;
88566 - void *argp1 = 0 ;
88567 - int res1 = 0 ;
88568 - PyObject * obj0 = 0 ;
88569 - _private_detail::MASKUNION result;
88570 -
88571 - if (!PyArg_ParseTuple(args,(char *)"O:VMask_mask",&obj0)) SWIG_fail;
88572 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 );
88573 - if (!SWIG_IsOK(res1)) {
88574 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask_mask" "', argument " "1"" of type '" "vips::VMask const *""'");
88575 - }
88576 - arg1 = reinterpret_cast< vips::VMask * >(argp1);
88577 - result = ((vips::VMask const *)arg1)->mask();
88578 - resultobj = SWIG_NewPointerObj((new _private_detail::MASKUNION(static_cast< const _private_detail::MASKUNION& >(result))), SWIGTYPE_p__private_detail__MASKUNION, SWIG_POINTER_OWN | 0 );
88579 - return resultobj;
88580 -fail:
88581 - return NULL;
88582 -}
88583 -
88584 -
88585 -SWIGINTERN PyObject *_wrap_VMask_ostream_print(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
88586 - PyObject *resultobj = 0;
88587 - vips::VMask *arg1 = (vips::VMask *) 0 ;
88588 - std::ostream *arg2 = 0 ;
88589 - void *argp1 = 0 ;
88590 - int res1 = 0 ;
88591 - void *argp2 = 0 ;
88592 - int res2 = 0 ;
88593 - PyObject * obj0 = 0 ;
88594 - PyObject * obj1 = 0 ;
88595 -
88596 - if (!PyArg_ParseTuple(args,(char *)"OO:VMask_ostream_print",&obj0,&obj1)) SWIG_fail;
88597 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 );
88598 - if (!SWIG_IsOK(res1)) {
88599 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask_ostream_print" "', argument " "1"" of type '" "vips::VMask const *""'");
88600 - }
88601 - arg1 = reinterpret_cast< vips::VMask * >(argp1);
88602 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__ostream, 0 );
88603 - if (!SWIG_IsOK(res2)) {
88604 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VMask_ostream_print" "', argument " "2"" of type '" "std::ostream &""'");
88605 - }
88606 - if (!argp2) {
88607 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VMask_ostream_print" "', argument " "2"" of type '" "std::ostream &""'");
88608 - }
88609 - arg2 = reinterpret_cast< std::ostream * >(argp2);
88610 - ((vips::VMask const *)arg1)->ostream_print(*arg2);
88611 - resultobj = SWIG_Py_Void();
88612 - return resultobj;
88613 -fail:
88614 - return NULL;
88615 -}
88616 -
88617 -
88618 -SWIGINTERN PyObject *VMask_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
88619 - PyObject *obj;
88620 - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
88621 - SWIG_TypeNewClientData(SWIGTYPE_p_vips__VMask, SWIG_NewClientData(obj));
88622 - return SWIG_Py_Void();
88623 -}
88624 -
88625 -SWIGINTERN PyObject *_wrap___lshift____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
88626 - PyObject *resultobj = 0;
88627 - std::ostream *arg1 = 0 ;
88628 - vips::VMask *arg2 = 0 ;
88629 - void *argp1 = 0 ;
88630 - int res1 = 0 ;
88631 - void *argp2 = 0 ;
88632 - int res2 = 0 ;
88633 - PyObject * obj0 = 0 ;
88634 - PyObject * obj1 = 0 ;
88635 - std::ostream *result = 0 ;
88636 -
88637 - if (!PyArg_ParseTuple(args,(char *)"OO:__lshift__",&obj0,&obj1)) SWIG_fail;
88638 - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__ostream, 0 );
88639 - if (!SWIG_IsOK(res1)) {
88640 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__lshift__" "', argument " "1"" of type '" "std::ostream &""'");
88641 - }
88642 - if (!argp1) {
88643 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lshift__" "', argument " "1"" of type '" "std::ostream &""'");
88644 - }
88645 - arg1 = reinterpret_cast< std::ostream * >(argp1);
88646 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VMask, 0 | 0);
88647 - if (!SWIG_IsOK(res2)) {
88648 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__lshift__" "', argument " "2"" of type '" "vips::VMask const &""'");
88649 - }
88650 - if (!argp2) {
88651 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lshift__" "', argument " "2"" of type '" "vips::VMask const &""'");
88652 - }
88653 - arg2 = reinterpret_cast< vips::VMask * >(argp2);
88654 - result = (std::ostream *) &vips::operator <<(*arg1,(vips::VMask const &)*arg2);
88655 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__ostream, 0 | 0 );
88656 - return resultobj;
88657 -fail:
88658 - return NULL;
88659 -}
88660 -
88661 -
88662 -SWIGINTERN PyObject *_wrap___lshift__(PyObject *self, PyObject *args) {
88663 - int argc;
88664 - PyObject *argv[3];
88665 - int ii;
88666 -
88667 - if (!PyTuple_Check(args)) SWIG_fail;
88668 - argc = args ? (int)PyObject_Length(args) : 0;
88669 - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
88670 - argv[ii] = PyTuple_GET_ITEM(args,ii);
88671 - }
88672 - if (argc == 2) {
88673 - int _v;
88674 - void *vptr = 0;
88675 - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__ostream, 0);
88676 - _v = SWIG_CheckState(res);
88677 - if (_v) {
88678 - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VMask, 0);
88679 - _v = SWIG_CheckState(res);
88680 - if (_v) {
88681 - return _wrap___lshift____SWIG_1(self, args);
88682 - }
88683 - }
88684 - }
88685 -
88686 -fail:
88687 - Py_INCREF(Py_NotImplemented);
88688 - return Py_NotImplemented;
88689 -}
88690 -
88691 -
88692 -SWIGINTERN PyObject *_wrap_new_VIMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
88693 - PyObject *resultobj = 0;
88694 - int arg1 ;
88695 - int arg2 ;
88696 - int val1 ;
88697 - int ecode1 = 0 ;
88698 - int val2 ;
88699 - int ecode2 = 0 ;
88700 - PyObject * obj0 = 0 ;
88701 - PyObject * obj1 = 0 ;
88702 - vips::VIMask *result = 0 ;
88703 -
88704 - if (!PyArg_ParseTuple(args,(char *)"OO:new_VIMask",&obj0,&obj1)) SWIG_fail;
88705 - ecode1 = SWIG_AsVal_int(obj0, &val1);
88706 - if (!SWIG_IsOK(ecode1)) {
88707 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VIMask" "', argument " "1"" of type '" "int""'");
88708 - }
88709 - arg1 = static_cast< int >(val1);
88710 - ecode2 = SWIG_AsVal_int(obj1, &val2);
88711 - if (!SWIG_IsOK(ecode2)) {
88712 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_VIMask" "', argument " "2"" of type '" "int""'");
88713 - }
88714 - arg2 = static_cast< int >(val2);
88715 - result = (vips::VIMask *)new vips::VIMask(arg1,arg2);
88716 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_NEW | 0 );
88717 - return resultobj;
88718 -fail:
88719 - return NULL;
88720 -}
88721 -
88722 -
88723 -SWIGINTERN PyObject *_wrap_new_VIMask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
88724 - PyObject *resultobj = 0;
88725 - int arg1 ;
88726 - int arg2 ;
88727 - int arg3 ;
88728 - int arg4 ;
88729 - std::vector< int,std::allocator< int > > arg5 ;
88730 - int val1 ;
88731 - int ecode1 = 0 ;
88732 - int val2 ;
88733 - int ecode2 = 0 ;
88734 - int val3 ;
88735 - int ecode3 = 0 ;
88736 - int val4 ;
88737 - int ecode4 = 0 ;
88738 - PyObject * obj0 = 0 ;
88739 - PyObject * obj1 = 0 ;
88740 - PyObject * obj2 = 0 ;
88741 - PyObject * obj3 = 0 ;
88742 - PyObject * obj4 = 0 ;
88743 - vips::VIMask *result = 0 ;
88744 -
88745 - if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_VIMask",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
88746 - ecode1 = SWIG_AsVal_int(obj0, &val1);
88747 - if (!SWIG_IsOK(ecode1)) {
88748 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VIMask" "', argument " "1"" of type '" "int""'");
88749 - }
88750 - arg1 = static_cast< int >(val1);
88751 - ecode2 = SWIG_AsVal_int(obj1, &val2);
88752 - if (!SWIG_IsOK(ecode2)) {
88753 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_VIMask" "', argument " "2"" of type '" "int""'");
88754 - }
88755 - arg2 = static_cast< int >(val2);
88756 - ecode3 = SWIG_AsVal_int(obj2, &val3);
88757 - if (!SWIG_IsOK(ecode3)) {
88758 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_VIMask" "', argument " "3"" of type '" "int""'");
88759 - }
88760 - arg3 = static_cast< int >(val3);
88761 - ecode4 = SWIG_AsVal_int(obj3, &val4);
88762 - if (!SWIG_IsOK(ecode4)) {
88763 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_VIMask" "', argument " "4"" of type '" "int""'");
88764 - }
88765 - arg4 = static_cast< int >(val4);
88766 - {
88767 - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
88768 - int res = swig::asptr(obj4, &ptr);
88769 - if (!SWIG_IsOK(res) || !ptr) {
88770 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_VIMask" "', argument " "5"" of type '" "std::vector< int,std::allocator< int > >""'");
88771 - }
88772 - arg5 = *ptr;
88773 - if (SWIG_IsNewObj(res)) delete ptr;
88774 - }
88775 - result = (vips::VIMask *)new vips::VIMask(arg1,arg2,arg3,arg4,arg5);
88776 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_NEW | 0 );
88777 - return resultobj;
88778 -fail:
88779 - return NULL;
88780 -}
88781 -
88782 -
88783 -SWIGINTERN PyObject *_wrap_new_VIMask__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
88784 - PyObject *resultobj = 0;
88785 - char *arg1 = (char *) 0 ;
88786 - int res1 ;
88787 - char *buf1 = 0 ;
88788 - int alloc1 = 0 ;
88789 - PyObject * obj0 = 0 ;
88790 - vips::VIMask *result = 0 ;
88791 -
88792 - if (!PyArg_ParseTuple(args,(char *)"O:new_VIMask",&obj0)) SWIG_fail;
88793 - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
88794 - if (!SWIG_IsOK(res1)) {
88795 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VIMask" "', argument " "1"" of type '" "char const *""'");
88796 - }
88797 - arg1 = reinterpret_cast< char * >(buf1);
88798 - result = (vips::VIMask *)new vips::VIMask((char const *)arg1);
88799 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_NEW | 0 );
88800 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
88801 - return resultobj;
88802 -fail:
88803 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
88804 - return NULL;
88805 -}
88806 -
88807 -
88808 -SWIGINTERN PyObject *_wrap_new_VIMask__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
88809 - PyObject *resultobj = 0;
88810 - vips::VIMask *result = 0 ;
88811 -
88812 - if (!PyArg_ParseTuple(args,(char *)":new_VIMask")) SWIG_fail;
88813 - result = (vips::VIMask *)new vips::VIMask();
88814 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_NEW | 0 );
88815 - return resultobj;
88816 -fail:
88817 - return NULL;
88818 -}
88819 -
88820 -
88821 -SWIGINTERN PyObject *_wrap_new_VIMask(PyObject *self, PyObject *args) {
88822 - int argc;
88823 - PyObject *argv[6];
88824 - int ii;
88825 -
88826 - if (!PyTuple_Check(args)) SWIG_fail;
88827 - argc = args ? (int)PyObject_Length(args) : 0;
88828 - for (ii = 0; (ii < 5) && (ii < argc); ii++) {
88829 - argv[ii] = PyTuple_GET_ITEM(args,ii);
88830 - }
88831 - if (argc == 0) {
88832 - return _wrap_new_VIMask__SWIG_3(self, args);
88833 - }
88834 - if (argc == 1) {
88835 - int _v;
88836 - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
88837 - _v = SWIG_CheckState(res);
88838 - if (_v) {
88839 - return _wrap_new_VIMask__SWIG_2(self, args);
88840 - }
88841 - }
88842 - if (argc == 2) {
88843 - int _v;
88844 - {
88845 - int res = SWIG_AsVal_int(argv[0], NULL);
88846 - _v = SWIG_CheckState(res);
88847 - }
88848 - if (_v) {
88849 - {
88850 - int res = SWIG_AsVal_int(argv[1], NULL);
88851 - _v = SWIG_CheckState(res);
88852 - }
88853 - if (_v) {
88854 - return _wrap_new_VIMask__SWIG_0(self, args);
88855 - }
88856 - }
88857 - }
88858 - if (argc == 5) {
88859 - int _v;
88860 - {
88861 - int res = SWIG_AsVal_int(argv[0], NULL);
88862 - _v = SWIG_CheckState(res);
88863 - }
88864 - if (_v) {
88865 - {
88866 - int res = SWIG_AsVal_int(argv[1], NULL);
88867 - _v = SWIG_CheckState(res);
88868 - }
88869 - if (_v) {
88870 - {
88871 - int res = SWIG_AsVal_int(argv[2], NULL);
88872 - _v = SWIG_CheckState(res);
88873 - }
88874 - if (_v) {
88875 - {
88876 - int res = SWIG_AsVal_int(argv[3], NULL);
88877 - _v = SWIG_CheckState(res);
88878 - }
88879 - if (_v) {
88880 - int res = swig::asptr(argv[4], (std::vector<int,std::allocator< int > >**)(0));
88881 - _v = SWIG_CheckState(res);
88882 - if (_v) {
88883 - return _wrap_new_VIMask__SWIG_1(self, args);
88884 - }
88885 - }
88886 - }
88887 - }
88888 - }
88889 - }
88890 -
88891 -fail:
88892 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VIMask'.\n"
88893 - " Possible C/C++ prototypes are:\n"
88894 - " vips::VIMask::VIMask(int,int)\n"
88895 - " vips::VIMask::VIMask(int,int,int,int,std::vector< int,std::allocator< int > >)\n"
88896 - " vips::VIMask::VIMask(char const *)\n"
88897 - " vips::VIMask::VIMask()\n");
88898 - return 0;
88899 -}
88900 -
88901 -
88902 -SWIGINTERN PyObject *_wrap_VIMask_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
88903 - PyObject *resultobj = 0;
88904 - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
88905 - void *argp1 = 0 ;
88906 - int res1 = 0 ;
88907 - PyObject * obj0 = 0 ;
88908 - int result;
88909 -
88910 - if (!PyArg_ParseTuple(args,(char *)"O:VIMask_scale",&obj0)) SWIG_fail;
88911 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
88912 - if (!SWIG_IsOK(res1)) {
88913 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_scale" "', argument " "1"" of type '" "vips::VIMask *""'");
88914 - }
88915 - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
88916 - result = (int)(arg1)->scale();
88917 - resultobj = SWIG_From_int(static_cast< int >(result));
88918 - return resultobj;
88919 -fail:
88920 - return NULL;
88921 -}
88922 -
88923 -
88924 -SWIGINTERN PyObject *_wrap_VIMask_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
88925 - PyObject *resultobj = 0;
88926 - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
88927 - void *argp1 = 0 ;
88928 - int res1 = 0 ;
88929 - PyObject * obj0 = 0 ;
88930 - int result;
88931 -
88932 - if (!PyArg_ParseTuple(args,(char *)"O:VIMask_offset",&obj0)) SWIG_fail;
88933 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
88934 - if (!SWIG_IsOK(res1)) {
88935 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_offset" "', argument " "1"" of type '" "vips::VIMask *""'");
88936 - }
88937 - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
88938 - result = (int)(arg1)->offset();
88939 - resultobj = SWIG_From_int(static_cast< int >(result));
88940 - return resultobj;
88941 -fail:
88942 - return NULL;
88943 -}
88944 -
88945 -
88946 -SWIGINTERN PyObject *_wrap_VIMask_embed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
88947 - PyObject *resultobj = 0;
88948 - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
88949 - im__INTMASK *arg2 = (im__INTMASK *) 0 ;
88950 - void *argp1 = 0 ;
88951 - int res1 = 0 ;
88952 - void *argp2 = 0 ;
88953 - int res2 = 0 ;
88954 - PyObject * obj0 = 0 ;
88955 - PyObject * obj1 = 0 ;
88956 -
88957 - if (!PyArg_ParseTuple(args,(char *)"OO:VIMask_embed",&obj0,&obj1)) SWIG_fail;
88958 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
88959 - if (!SWIG_IsOK(res1)) {
88960 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_embed" "', argument " "1"" of type '" "vips::VIMask *""'");
88961 - }
88962 - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
88963 - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_im__INTMASK, 0 | 0 );
88964 - if (!SWIG_IsOK(res2)) {
88965 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VIMask_embed" "', argument " "2"" of type '" "im__INTMASK *""'");
88966 - }
88967 - arg2 = reinterpret_cast< im__INTMASK * >(argp2);
88968 - try {
88969 - (arg1)->embed(arg2);
88970 - }
88971 - catch(vips::VError &_e) {
88972 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
88973 - }
88974 -
88975 - resultobj = SWIG_Py_Void();
88976 - return resultobj;
88977 -fail:
88978 - return NULL;
88979 -}
88980 -
88981 -
88982 -SWIGINTERN PyObject *_wrap_VIMask___index__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
88983 - PyObject *resultobj = 0;
88984 - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
88985 - int arg2 ;
88986 - void *argp1 = 0 ;
88987 - int res1 = 0 ;
88988 - int val2 ;
88989 - int ecode2 = 0 ;
88990 - PyObject * obj0 = 0 ;
88991 - PyObject * obj1 = 0 ;
88992 - int *result = 0 ;
88993 -
88994 - if (!PyArg_ParseTuple(args,(char *)"OO:VIMask___index__",&obj0,&obj1)) SWIG_fail;
88995 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
88996 - if (!SWIG_IsOK(res1)) {
88997 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask___index__" "', argument " "1"" of type '" "vips::VIMask *""'");
88998 - }
88999 - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
89000 - ecode2 = SWIG_AsVal_int(obj1, &val2);
89001 - if (!SWIG_IsOK(ecode2)) {
89002 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VIMask___index__" "', argument " "2"" of type '" "int""'");
89003 - }
89004 - arg2 = static_cast< int >(val2);
89005 - try {
89006 - result = (int *) &(arg1)->operator [](arg2);
89007 - }
89008 - catch(vips::VError &_e) {
89009 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89010 - }
89011 -
89012 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
89013 - return resultobj;
89014 -fail:
89015 - return NULL;
89016 -}
89017 -
89018 -
89019 -SWIGINTERN PyObject *_wrap_VIMask___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89020 - PyObject *resultobj = 0;
89021 - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
89022 - int arg2 ;
89023 - int arg3 ;
89024 - void *argp1 = 0 ;
89025 - int res1 = 0 ;
89026 - int val2 ;
89027 - int ecode2 = 0 ;
89028 - int val3 ;
89029 - int ecode3 = 0 ;
89030 - PyObject * obj0 = 0 ;
89031 - PyObject * obj1 = 0 ;
89032 - PyObject * obj2 = 0 ;
89033 - int *result = 0 ;
89034 -
89035 - if (!PyArg_ParseTuple(args,(char *)"OOO:VIMask___call__",&obj0,&obj1,&obj2)) SWIG_fail;
89036 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
89037 - if (!SWIG_IsOK(res1)) {
89038 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask___call__" "', argument " "1"" of type '" "vips::VIMask *""'");
89039 - }
89040 - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
89041 - ecode2 = SWIG_AsVal_int(obj1, &val2);
89042 - if (!SWIG_IsOK(ecode2)) {
89043 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VIMask___call__" "', argument " "2"" of type '" "int""'");
89044 - }
89045 - arg2 = static_cast< int >(val2);
89046 - ecode3 = SWIG_AsVal_int(obj2, &val3);
89047 - if (!SWIG_IsOK(ecode3)) {
89048 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VIMask___call__" "', argument " "3"" of type '" "int""'");
89049 - }
89050 - arg3 = static_cast< int >(val3);
89051 - try {
89052 - result = (int *) &(arg1)->operator ()(arg2,arg3);
89053 - }
89054 - catch(vips::VError &_e) {
89055 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89056 - }
89057 -
89058 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
89059 - return resultobj;
89060 -fail:
89061 - return NULL;
89062 -}
89063 -
89064 -
89065 -SWIGINTERN PyObject *_wrap_VIMask_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89066 - PyObject *resultobj = 0;
89067 - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
89068 - int arg2 ;
89069 - void *argp1 = 0 ;
89070 - int res1 = 0 ;
89071 - int val2 ;
89072 - int ecode2 = 0 ;
89073 - PyObject * obj0 = 0 ;
89074 - PyObject * obj1 = 0 ;
89075 - int result;
89076 -
89077 - if (!PyArg_ParseTuple(args,(char *)"OO:VIMask_get",&obj0,&obj1)) SWIG_fail;
89078 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
89079 - if (!SWIG_IsOK(res1)) {
89080 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_get" "', argument " "1"" of type '" "vips::VIMask *""'");
89081 - }
89082 - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
89083 - ecode2 = SWIG_AsVal_int(obj1, &val2);
89084 - if (!SWIG_IsOK(ecode2)) {
89085 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VIMask_get" "', argument " "2"" of type '" "int""'");
89086 - }
89087 - arg2 = static_cast< int >(val2);
89088 - try {
89089 - result = (int)(arg1)->get(arg2);
89090 - }
89091 - catch(vips::VError &_e) {
89092 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89093 - }
89094 -
89095 - resultobj = SWIG_From_int(static_cast< int >(result));
89096 - return resultobj;
89097 -fail:
89098 - return NULL;
89099 -}
89100 -
89101 -
89102 -SWIGINTERN PyObject *_wrap_VIMask_gauss(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89103 - PyObject *resultobj = 0;
89104 - double arg1 ;
89105 - double arg2 ;
89106 - double val1 ;
89107 - int ecode1 = 0 ;
89108 - double val2 ;
89109 - int ecode2 = 0 ;
89110 - PyObject * obj0 = 0 ;
89111 - PyObject * obj1 = 0 ;
89112 - vips::VIMask result;
89113 -
89114 - if (!PyArg_ParseTuple(args,(char *)"OO:VIMask_gauss",&obj0,&obj1)) SWIG_fail;
89115 - ecode1 = SWIG_AsVal_double(obj0, &val1);
89116 - if (!SWIG_IsOK(ecode1)) {
89117 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VIMask_gauss" "', argument " "1"" of type '" "double""'");
89118 - }
89119 - arg1 = static_cast< double >(val1);
89120 - ecode2 = SWIG_AsVal_double(obj1, &val2);
89121 - if (!SWIG_IsOK(ecode2)) {
89122 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VIMask_gauss" "', argument " "2"" of type '" "double""'");
89123 - }
89124 - arg2 = static_cast< double >(val2);
89125 - try {
89126 - result = vips::VIMask::gauss(arg1,arg2);
89127 - }
89128 - catch(vips::VError &_e) {
89129 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89130 - }
89131 -
89132 - resultobj = SWIG_NewPointerObj((new vips::VIMask(static_cast< const vips::VIMask& >(result))), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_OWN | 0 );
89133 - return resultobj;
89134 -fail:
89135 - return NULL;
89136 -}
89137 -
89138 -
89139 -SWIGINTERN PyObject *_wrap_VIMask_gauss_sep(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89140 - PyObject *resultobj = 0;
89141 - double arg1 ;
89142 - double arg2 ;
89143 - double val1 ;
89144 - int ecode1 = 0 ;
89145 - double val2 ;
89146 - int ecode2 = 0 ;
89147 - PyObject * obj0 = 0 ;
89148 - PyObject * obj1 = 0 ;
89149 - vips::VIMask result;
89150 -
89151 - if (!PyArg_ParseTuple(args,(char *)"OO:VIMask_gauss_sep",&obj0,&obj1)) SWIG_fail;
89152 - ecode1 = SWIG_AsVal_double(obj0, &val1);
89153 - if (!SWIG_IsOK(ecode1)) {
89154 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VIMask_gauss_sep" "', argument " "1"" of type '" "double""'");
89155 - }
89156 - arg1 = static_cast< double >(val1);
89157 - ecode2 = SWIG_AsVal_double(obj1, &val2);
89158 - if (!SWIG_IsOK(ecode2)) {
89159 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VIMask_gauss_sep" "', argument " "2"" of type '" "double""'");
89160 - }
89161 - arg2 = static_cast< double >(val2);
89162 - try {
89163 - result = vips::VIMask::gauss_sep(arg1,arg2);
89164 - }
89165 - catch(vips::VError &_e) {
89166 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89167 - }
89168 -
89169 - resultobj = SWIG_NewPointerObj((new vips::VIMask(static_cast< const vips::VIMask& >(result))), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_OWN | 0 );
89170 - return resultobj;
89171 -fail:
89172 - return NULL;
89173 -}
89174 -
89175 -
89176 -SWIGINTERN PyObject *_wrap_VIMask_log(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89177 - PyObject *resultobj = 0;
89178 - double arg1 ;
89179 - double arg2 ;
89180 - double val1 ;
89181 - int ecode1 = 0 ;
89182 - double val2 ;
89183 - int ecode2 = 0 ;
89184 - PyObject * obj0 = 0 ;
89185 - PyObject * obj1 = 0 ;
89186 - vips::VIMask result;
89187 -
89188 - if (!PyArg_ParseTuple(args,(char *)"OO:VIMask_log",&obj0,&obj1)) SWIG_fail;
89189 - ecode1 = SWIG_AsVal_double(obj0, &val1);
89190 - if (!SWIG_IsOK(ecode1)) {
89191 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VIMask_log" "', argument " "1"" of type '" "double""'");
89192 - }
89193 - arg1 = static_cast< double >(val1);
89194 - ecode2 = SWIG_AsVal_double(obj1, &val2);
89195 - if (!SWIG_IsOK(ecode2)) {
89196 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VIMask_log" "', argument " "2"" of type '" "double""'");
89197 - }
89198 - arg2 = static_cast< double >(val2);
89199 - try {
89200 - result = vips::VIMask::log(arg1,arg2);
89201 - }
89202 - catch(vips::VError &_e) {
89203 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89204 - }
89205 -
89206 - resultobj = SWIG_NewPointerObj((new vips::VIMask(static_cast< const vips::VIMask& >(result))), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_OWN | 0 );
89207 - return resultobj;
89208 -fail:
89209 - return NULL;
89210 -}
89211 -
89212 -
89213 -SWIGINTERN PyObject *_wrap_VIMask_rotate45(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89214 - PyObject *resultobj = 0;
89215 - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
89216 - void *argp1 = 0 ;
89217 - int res1 = 0 ;
89218 - PyObject * obj0 = 0 ;
89219 - vips::VIMask result;
89220 -
89221 - if (!PyArg_ParseTuple(args,(char *)"O:VIMask_rotate45",&obj0)) SWIG_fail;
89222 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
89223 - if (!SWIG_IsOK(res1)) {
89224 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_rotate45" "', argument " "1"" of type '" "vips::VIMask *""'");
89225 - }
89226 - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
89227 - try {
89228 - result = (arg1)->rotate45();
89229 - }
89230 - catch(vips::VError &_e) {
89231 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89232 - }
89233 -
89234 - resultobj = SWIG_NewPointerObj((new vips::VIMask(static_cast< const vips::VIMask& >(result))), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_OWN | 0 );
89235 - return resultobj;
89236 -fail:
89237 - return NULL;
89238 -}
89239 -
89240 -
89241 -SWIGINTERN PyObject *_wrap_VIMask_rotate90(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89242 - PyObject *resultobj = 0;
89243 - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
89244 - void *argp1 = 0 ;
89245 - int res1 = 0 ;
89246 - PyObject * obj0 = 0 ;
89247 - vips::VIMask result;
89248 -
89249 - if (!PyArg_ParseTuple(args,(char *)"O:VIMask_rotate90",&obj0)) SWIG_fail;
89250 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
89251 - if (!SWIG_IsOK(res1)) {
89252 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_rotate90" "', argument " "1"" of type '" "vips::VIMask *""'");
89253 - }
89254 - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
89255 - try {
89256 - result = (arg1)->rotate90();
89257 - }
89258 - catch(vips::VError &_e) {
89259 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89260 - }
89261 -
89262 - resultobj = SWIG_NewPointerObj((new vips::VIMask(static_cast< const vips::VIMask& >(result))), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_OWN | 0 );
89263 - return resultobj;
89264 -fail:
89265 - return NULL;
89266 -}
89267 -
89268 -
89269 -SWIGINTERN PyObject *_wrap_VIMask_trn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89270 - PyObject *resultobj = 0;
89271 - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
89272 - void *argp1 = 0 ;
89273 - int res1 = 0 ;
89274 - PyObject * obj0 = 0 ;
89275 - vips::VDMask result;
89276 -
89277 - if (!PyArg_ParseTuple(args,(char *)"O:VIMask_trn",&obj0)) SWIG_fail;
89278 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
89279 - if (!SWIG_IsOK(res1)) {
89280 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_trn" "', argument " "1"" of type '" "vips::VIMask *""'");
89281 - }
89282 - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
89283 - try {
89284 - result = (arg1)->trn();
89285 - }
89286 - catch(vips::VError &_e) {
89287 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89288 - }
89289 -
89290 - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
89291 - return resultobj;
89292 -fail:
89293 - return NULL;
89294 -}
89295 -
89296 -
89297 -SWIGINTERN PyObject *_wrap_VIMask_inv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89298 - PyObject *resultobj = 0;
89299 - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
89300 - void *argp1 = 0 ;
89301 - int res1 = 0 ;
89302 - PyObject * obj0 = 0 ;
89303 - vips::VDMask result;
89304 -
89305 - if (!PyArg_ParseTuple(args,(char *)"O:VIMask_inv",&obj0)) SWIG_fail;
89306 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
89307 - if (!SWIG_IsOK(res1)) {
89308 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_inv" "', argument " "1"" of type '" "vips::VIMask *""'");
89309 - }
89310 - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
89311 - try {
89312 - result = (arg1)->inv();
89313 - }
89314 - catch(vips::VError &_e) {
89315 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89316 - }
89317 -
89318 - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
89319 - return resultobj;
89320 -fail:
89321 - return NULL;
89322 -}
89323 -
89324 -
89325 -SWIGINTERN PyObject *_wrap_VIMask_cat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89326 - PyObject *resultobj = 0;
89327 - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
89328 - vips::VDMask arg2 ;
89329 - void *argp1 = 0 ;
89330 - int res1 = 0 ;
89331 - void *argp2 ;
89332 - int res2 = 0 ;
89333 - PyObject * obj0 = 0 ;
89334 - PyObject * obj1 = 0 ;
89335 - vips::VDMask result;
89336 -
89337 - if (!PyArg_ParseTuple(args,(char *)"OO:VIMask_cat",&obj0,&obj1)) SWIG_fail;
89338 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
89339 - if (!SWIG_IsOK(res1)) {
89340 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_cat" "', argument " "1"" of type '" "vips::VIMask *""'");
89341 - }
89342 - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
89343 - {
89344 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
89345 - if (!SWIG_IsOK(res2)) {
89346 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VIMask_cat" "', argument " "2"" of type '" "vips::VDMask""'");
89347 - }
89348 - if (!argp2) {
89349 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VIMask_cat" "', argument " "2"" of type '" "vips::VDMask""'");
89350 - } else {
89351 - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
89352 - arg2 = *temp;
89353 - if (SWIG_IsNewObj(res2)) delete temp;
89354 - }
89355 - }
89356 - try {
89357 - result = (arg1)->cat(arg2);
89358 - }
89359 - catch(vips::VError &_e) {
89360 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89361 - }
89362 -
89363 - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
89364 - return resultobj;
89365 -fail:
89366 - return NULL;
89367 -}
89368 -
89369 -
89370 -SWIGINTERN PyObject *_wrap_VIMask_mul(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89371 - PyObject *resultobj = 0;
89372 - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
89373 - vips::VDMask arg2 ;
89374 - void *argp1 = 0 ;
89375 - int res1 = 0 ;
89376 - void *argp2 ;
89377 - int res2 = 0 ;
89378 - PyObject * obj0 = 0 ;
89379 - PyObject * obj1 = 0 ;
89380 - vips::VDMask result;
89381 -
89382 - if (!PyArg_ParseTuple(args,(char *)"OO:VIMask_mul",&obj0,&obj1)) SWIG_fail;
89383 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
89384 - if (!SWIG_IsOK(res1)) {
89385 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_mul" "', argument " "1"" of type '" "vips::VIMask *""'");
89386 - }
89387 - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
89388 - {
89389 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
89390 - if (!SWIG_IsOK(res2)) {
89391 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VIMask_mul" "', argument " "2"" of type '" "vips::VDMask""'");
89392 - }
89393 - if (!argp2) {
89394 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VIMask_mul" "', argument " "2"" of type '" "vips::VDMask""'");
89395 - } else {
89396 - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
89397 - arg2 = *temp;
89398 - if (SWIG_IsNewObj(res2)) delete temp;
89399 - }
89400 - }
89401 - try {
89402 - result = (arg1)->mul(arg2);
89403 - }
89404 - catch(vips::VError &_e) {
89405 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89406 - }
89407 -
89408 - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
89409 - return resultobj;
89410 -fail:
89411 - return NULL;
89412 -}
89413 -
89414 -
89415 -SWIGINTERN PyObject *_wrap_delete_VIMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89416 - PyObject *resultobj = 0;
89417 - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
89418 - void *argp1 = 0 ;
89419 - int res1 = 0 ;
89420 - PyObject * obj0 = 0 ;
89421 -
89422 - if (!PyArg_ParseTuple(args,(char *)"O:delete_VIMask",&obj0)) SWIG_fail;
89423 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, SWIG_POINTER_DISOWN | 0 );
89424 - if (!SWIG_IsOK(res1)) {
89425 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VIMask" "', argument " "1"" of type '" "vips::VIMask *""'");
89426 - }
89427 - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
89428 - delete arg1;
89429 - resultobj = SWIG_Py_Void();
89430 - return resultobj;
89431 -fail:
89432 - return NULL;
89433 -}
89434 -
89435 -
89436 -SWIGINTERN PyObject *VIMask_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89437 - PyObject *obj;
89438 - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
89439 - SWIG_TypeNewClientData(SWIGTYPE_p_vips__VIMask, SWIG_NewClientData(obj));
89440 - return SWIG_Py_Void();
89441 -}
89442 -
89443 -SWIGINTERN PyObject *_wrap_new_VDMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89444 - PyObject *resultobj = 0;
89445 - int arg1 ;
89446 - int arg2 ;
89447 - int val1 ;
89448 - int ecode1 = 0 ;
89449 - int val2 ;
89450 - int ecode2 = 0 ;
89451 - PyObject * obj0 = 0 ;
89452 - PyObject * obj1 = 0 ;
89453 - vips::VDMask *result = 0 ;
89454 -
89455 - if (!PyArg_ParseTuple(args,(char *)"OO:new_VDMask",&obj0,&obj1)) SWIG_fail;
89456 - ecode1 = SWIG_AsVal_int(obj0, &val1);
89457 - if (!SWIG_IsOK(ecode1)) {
89458 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VDMask" "', argument " "1"" of type '" "int""'");
89459 - }
89460 - arg1 = static_cast< int >(val1);
89461 - ecode2 = SWIG_AsVal_int(obj1, &val2);
89462 - if (!SWIG_IsOK(ecode2)) {
89463 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_VDMask" "', argument " "2"" of type '" "int""'");
89464 - }
89465 - arg2 = static_cast< int >(val2);
89466 - result = (vips::VDMask *)new vips::VDMask(arg1,arg2);
89467 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_NEW | 0 );
89468 - return resultobj;
89469 -fail:
89470 - return NULL;
89471 -}
89472 -
89473 -
89474 -SWIGINTERN PyObject *_wrap_new_VDMask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89475 - PyObject *resultobj = 0;
89476 - int arg1 ;
89477 - int arg2 ;
89478 - double arg3 ;
89479 - double arg4 ;
89480 - std::vector< double,std::allocator< double > > arg5 ;
89481 - int val1 ;
89482 - int ecode1 = 0 ;
89483 - int val2 ;
89484 - int ecode2 = 0 ;
89485 - double val3 ;
89486 - int ecode3 = 0 ;
89487 - double val4 ;
89488 - int ecode4 = 0 ;
89489 - PyObject * obj0 = 0 ;
89490 - PyObject * obj1 = 0 ;
89491 - PyObject * obj2 = 0 ;
89492 - PyObject * obj3 = 0 ;
89493 - PyObject * obj4 = 0 ;
89494 - vips::VDMask *result = 0 ;
89495 -
89496 - if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_VDMask",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
89497 - ecode1 = SWIG_AsVal_int(obj0, &val1);
89498 - if (!SWIG_IsOK(ecode1)) {
89499 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VDMask" "', argument " "1"" of type '" "int""'");
89500 - }
89501 - arg1 = static_cast< int >(val1);
89502 - ecode2 = SWIG_AsVal_int(obj1, &val2);
89503 - if (!SWIG_IsOK(ecode2)) {
89504 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_VDMask" "', argument " "2"" of type '" "int""'");
89505 - }
89506 - arg2 = static_cast< int >(val2);
89507 - ecode3 = SWIG_AsVal_double(obj2, &val3);
89508 - if (!SWIG_IsOK(ecode3)) {
89509 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_VDMask" "', argument " "3"" of type '" "double""'");
89510 - }
89511 - arg3 = static_cast< double >(val3);
89512 - ecode4 = SWIG_AsVal_double(obj3, &val4);
89513 - if (!SWIG_IsOK(ecode4)) {
89514 - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_VDMask" "', argument " "4"" of type '" "double""'");
89515 - }
89516 - arg4 = static_cast< double >(val4);
89517 - {
89518 - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
89519 - int res = swig::asptr(obj4, &ptr);
89520 - if (!SWIG_IsOK(res) || !ptr) {
89521 - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_VDMask" "', argument " "5"" of type '" "std::vector< double,std::allocator< double > >""'");
89522 - }
89523 - arg5 = *ptr;
89524 - if (SWIG_IsNewObj(res)) delete ptr;
89525 - }
89526 - result = (vips::VDMask *)new vips::VDMask(arg1,arg2,arg3,arg4,arg5);
89527 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_NEW | 0 );
89528 - return resultobj;
89529 -fail:
89530 - return NULL;
89531 -}
89532 -
89533 -
89534 -SWIGINTERN PyObject *_wrap_new_VDMask__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89535 - PyObject *resultobj = 0;
89536 - char *arg1 = (char *) 0 ;
89537 - int res1 ;
89538 - char *buf1 = 0 ;
89539 - int alloc1 = 0 ;
89540 - PyObject * obj0 = 0 ;
89541 - vips::VDMask *result = 0 ;
89542 -
89543 - if (!PyArg_ParseTuple(args,(char *)"O:new_VDMask",&obj0)) SWIG_fail;
89544 - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
89545 - if (!SWIG_IsOK(res1)) {
89546 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VDMask" "', argument " "1"" of type '" "char const *""'");
89547 - }
89548 - arg1 = reinterpret_cast< char * >(buf1);
89549 - result = (vips::VDMask *)new vips::VDMask((char const *)arg1);
89550 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_NEW | 0 );
89551 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
89552 - return resultobj;
89553 -fail:
89554 - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
89555 - return NULL;
89556 -}
89557 -
89558 -
89559 -SWIGINTERN PyObject *_wrap_new_VDMask__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89560 - PyObject *resultobj = 0;
89561 - vips::VDMask *result = 0 ;
89562 -
89563 - if (!PyArg_ParseTuple(args,(char *)":new_VDMask")) SWIG_fail;
89564 - result = (vips::VDMask *)new vips::VDMask();
89565 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_NEW | 0 );
89566 - return resultobj;
89567 -fail:
89568 - return NULL;
89569 -}
89570 -
89571 -
89572 -SWIGINTERN PyObject *_wrap_new_VDMask(PyObject *self, PyObject *args) {
89573 - int argc;
89574 - PyObject *argv[6];
89575 - int ii;
89576 -
89577 - if (!PyTuple_Check(args)) SWIG_fail;
89578 - argc = args ? (int)PyObject_Length(args) : 0;
89579 - for (ii = 0; (ii < 5) && (ii < argc); ii++) {
89580 - argv[ii] = PyTuple_GET_ITEM(args,ii);
89581 - }
89582 - if (argc == 0) {
89583 - return _wrap_new_VDMask__SWIG_3(self, args);
89584 - }
89585 - if (argc == 1) {
89586 - int _v;
89587 - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
89588 - _v = SWIG_CheckState(res);
89589 - if (_v) {
89590 - return _wrap_new_VDMask__SWIG_2(self, args);
89591 - }
89592 - }
89593 - if (argc == 2) {
89594 - int _v;
89595 - {
89596 - int res = SWIG_AsVal_int(argv[0], NULL);
89597 - _v = SWIG_CheckState(res);
89598 - }
89599 - if (_v) {
89600 - {
89601 - int res = SWIG_AsVal_int(argv[1], NULL);
89602 - _v = SWIG_CheckState(res);
89603 - }
89604 - if (_v) {
89605 - return _wrap_new_VDMask__SWIG_0(self, args);
89606 - }
89607 - }
89608 - }
89609 - if (argc == 5) {
89610 - int _v;
89611 - {
89612 - int res = SWIG_AsVal_int(argv[0], NULL);
89613 - _v = SWIG_CheckState(res);
89614 - }
89615 - if (_v) {
89616 - {
89617 - int res = SWIG_AsVal_int(argv[1], NULL);
89618 - _v = SWIG_CheckState(res);
89619 - }
89620 - if (_v) {
89621 - {
89622 - int res = SWIG_AsVal_double(argv[2], NULL);
89623 - _v = SWIG_CheckState(res);
89624 - }
89625 - if (_v) {
89626 - {
89627 - int res = SWIG_AsVal_double(argv[3], NULL);
89628 - _v = SWIG_CheckState(res);
89629 - }
89630 - if (_v) {
89631 - int res = swig::asptr(argv[4], (std::vector<double,std::allocator< double > >**)(0));
89632 - _v = SWIG_CheckState(res);
89633 - if (_v) {
89634 - return _wrap_new_VDMask__SWIG_1(self, args);
89635 - }
89636 - }
89637 - }
89638 - }
89639 - }
89640 - }
89641 -
89642 -fail:
89643 - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VDMask'.\n"
89644 - " Possible C/C++ prototypes are:\n"
89645 - " vips::VDMask::VDMask(int,int)\n"
89646 - " vips::VDMask::VDMask(int,int,double,double,std::vector< double,std::allocator< double > >)\n"
89647 - " vips::VDMask::VDMask(char const *)\n"
89648 - " vips::VDMask::VDMask()\n");
89649 - return 0;
89650 -}
89651 -
89652 -
89653 -SWIGINTERN PyObject *_wrap_VDMask_embed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89654 - PyObject *resultobj = 0;
89655 - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
89656 - im__DOUBLEMASK *arg2 = (im__DOUBLEMASK *) 0 ;
89657 - void *argp1 = 0 ;
89658 - int res1 = 0 ;
89659 - void *argp2 = 0 ;
89660 - int res2 = 0 ;
89661 - PyObject * obj0 = 0 ;
89662 - PyObject * obj1 = 0 ;
89663 -
89664 - if (!PyArg_ParseTuple(args,(char *)"OO:VDMask_embed",&obj0,&obj1)) SWIG_fail;
89665 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
89666 - if (!SWIG_IsOK(res1)) {
89667 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_embed" "', argument " "1"" of type '" "vips::VDMask *""'");
89668 - }
89669 - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
89670 - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_im__DOUBLEMASK, 0 | 0 );
89671 - if (!SWIG_IsOK(res2)) {
89672 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VDMask_embed" "', argument " "2"" of type '" "im__DOUBLEMASK *""'");
89673 - }
89674 - arg2 = reinterpret_cast< im__DOUBLEMASK * >(argp2);
89675 - try {
89676 - (arg1)->embed(arg2);
89677 - }
89678 - catch(vips::VError &_e) {
89679 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89680 - }
89681 -
89682 - resultobj = SWIG_Py_Void();
89683 - return resultobj;
89684 -fail:
89685 - return NULL;
89686 -}
89687 -
89688 -
89689 -SWIGINTERN PyObject *_wrap_VDMask_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89690 - PyObject *resultobj = 0;
89691 - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
89692 - void *argp1 = 0 ;
89693 - int res1 = 0 ;
89694 - PyObject * obj0 = 0 ;
89695 - double result;
89696 -
89697 - if (!PyArg_ParseTuple(args,(char *)"O:VDMask_scale",&obj0)) SWIG_fail;
89698 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
89699 - if (!SWIG_IsOK(res1)) {
89700 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_scale" "', argument " "1"" of type '" "vips::VDMask *""'");
89701 - }
89702 - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
89703 - try {
89704 - result = (double)(arg1)->scale();
89705 - }
89706 - catch(vips::VError &_e) {
89707 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89708 - }
89709 -
89710 - resultobj = SWIG_From_double(static_cast< double >(result));
89711 - return resultobj;
89712 -fail:
89713 - return NULL;
89714 -}
89715 -
89716 -
89717 -SWIGINTERN PyObject *_wrap_VDMask_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89718 - PyObject *resultobj = 0;
89719 - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
89720 - void *argp1 = 0 ;
89721 - int res1 = 0 ;
89722 - PyObject * obj0 = 0 ;
89723 - double result;
89724 -
89725 - if (!PyArg_ParseTuple(args,(char *)"O:VDMask_offset",&obj0)) SWIG_fail;
89726 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
89727 - if (!SWIG_IsOK(res1)) {
89728 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_offset" "', argument " "1"" of type '" "vips::VDMask *""'");
89729 - }
89730 - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
89731 - try {
89732 - result = (double)(arg1)->offset();
89733 - }
89734 - catch(vips::VError &_e) {
89735 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89736 - }
89737 -
89738 - resultobj = SWIG_From_double(static_cast< double >(result));
89739 - return resultobj;
89740 -fail:
89741 - return NULL;
89742 -}
89743 -
89744 -
89745 -SWIGINTERN PyObject *_wrap_VDMask___index__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89746 - PyObject *resultobj = 0;
89747 - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
89748 - int arg2 ;
89749 - void *argp1 = 0 ;
89750 - int res1 = 0 ;
89751 - int val2 ;
89752 - int ecode2 = 0 ;
89753 - PyObject * obj0 = 0 ;
89754 - PyObject * obj1 = 0 ;
89755 - double *result = 0 ;
89756 -
89757 - if (!PyArg_ParseTuple(args,(char *)"OO:VDMask___index__",&obj0,&obj1)) SWIG_fail;
89758 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
89759 - if (!SWIG_IsOK(res1)) {
89760 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask___index__" "', argument " "1"" of type '" "vips::VDMask *""'");
89761 - }
89762 - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
89763 - ecode2 = SWIG_AsVal_int(obj1, &val2);
89764 - if (!SWIG_IsOK(ecode2)) {
89765 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VDMask___index__" "', argument " "2"" of type '" "int""'");
89766 - }
89767 - arg2 = static_cast< int >(val2);
89768 - try {
89769 - result = (double *) &(arg1)->operator [](arg2);
89770 - }
89771 - catch(vips::VError &_e) {
89772 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89773 - }
89774 -
89775 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
89776 - return resultobj;
89777 -fail:
89778 - return NULL;
89779 -}
89780 -
89781 -
89782 -SWIGINTERN PyObject *_wrap_VDMask___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89783 - PyObject *resultobj = 0;
89784 - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
89785 - int arg2 ;
89786 - int arg3 ;
89787 - void *argp1 = 0 ;
89788 - int res1 = 0 ;
89789 - int val2 ;
89790 - int ecode2 = 0 ;
89791 - int val3 ;
89792 - int ecode3 = 0 ;
89793 - PyObject * obj0 = 0 ;
89794 - PyObject * obj1 = 0 ;
89795 - PyObject * obj2 = 0 ;
89796 - double *result = 0 ;
89797 -
89798 - if (!PyArg_ParseTuple(args,(char *)"OOO:VDMask___call__",&obj0,&obj1,&obj2)) SWIG_fail;
89799 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
89800 - if (!SWIG_IsOK(res1)) {
89801 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask___call__" "', argument " "1"" of type '" "vips::VDMask *""'");
89802 - }
89803 - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
89804 - ecode2 = SWIG_AsVal_int(obj1, &val2);
89805 - if (!SWIG_IsOK(ecode2)) {
89806 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VDMask___call__" "', argument " "2"" of type '" "int""'");
89807 - }
89808 - arg2 = static_cast< int >(val2);
89809 - ecode3 = SWIG_AsVal_int(obj2, &val3);
89810 - if (!SWIG_IsOK(ecode3)) {
89811 - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VDMask___call__" "', argument " "3"" of type '" "int""'");
89812 - }
89813 - arg3 = static_cast< int >(val3);
89814 - try {
89815 - result = (double *) &(arg1)->operator ()(arg2,arg3);
89816 - }
89817 - catch(vips::VError &_e) {
89818 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89819 - }
89820 -
89821 - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
89822 - return resultobj;
89823 -fail:
89824 - return NULL;
89825 -}
89826 -
89827 -
89828 -SWIGINTERN PyObject *_wrap_VDMask_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89829 - PyObject *resultobj = 0;
89830 - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
89831 - int arg2 ;
89832 - void *argp1 = 0 ;
89833 - int res1 = 0 ;
89834 - int val2 ;
89835 - int ecode2 = 0 ;
89836 - PyObject * obj0 = 0 ;
89837 - PyObject * obj1 = 0 ;
89838 - double result;
89839 -
89840 - if (!PyArg_ParseTuple(args,(char *)"OO:VDMask_get",&obj0,&obj1)) SWIG_fail;
89841 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
89842 - if (!SWIG_IsOK(res1)) {
89843 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_get" "', argument " "1"" of type '" "vips::VDMask *""'");
89844 - }
89845 - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
89846 - ecode2 = SWIG_AsVal_int(obj1, &val2);
89847 - if (!SWIG_IsOK(ecode2)) {
89848 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VDMask_get" "', argument " "2"" of type '" "int""'");
89849 - }
89850 - arg2 = static_cast< int >(val2);
89851 - try {
89852 - result = (double)(arg1)->get(arg2);
89853 - }
89854 - catch(vips::VError &_e) {
89855 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89856 - }
89857 -
89858 - resultobj = SWIG_From_double(static_cast< double >(result));
89859 - return resultobj;
89860 -fail:
89861 - return NULL;
89862 -}
89863 -
89864 -
89865 -SWIGINTERN PyObject *_wrap_VDMask_gauss(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89866 - PyObject *resultobj = 0;
89867 - double arg1 ;
89868 - double arg2 ;
89869 - double val1 ;
89870 - int ecode1 = 0 ;
89871 - double val2 ;
89872 - int ecode2 = 0 ;
89873 - PyObject * obj0 = 0 ;
89874 - PyObject * obj1 = 0 ;
89875 - vips::VDMask result;
89876 -
89877 - if (!PyArg_ParseTuple(args,(char *)"OO:VDMask_gauss",&obj0,&obj1)) SWIG_fail;
89878 - ecode1 = SWIG_AsVal_double(obj0, &val1);
89879 - if (!SWIG_IsOK(ecode1)) {
89880 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VDMask_gauss" "', argument " "1"" of type '" "double""'");
89881 - }
89882 - arg1 = static_cast< double >(val1);
89883 - ecode2 = SWIG_AsVal_double(obj1, &val2);
89884 - if (!SWIG_IsOK(ecode2)) {
89885 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VDMask_gauss" "', argument " "2"" of type '" "double""'");
89886 - }
89887 - arg2 = static_cast< double >(val2);
89888 - try {
89889 - result = vips::VDMask::gauss(arg1,arg2);
89890 - }
89891 - catch(vips::VError &_e) {
89892 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89893 - }
89894 -
89895 - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
89896 - return resultobj;
89897 -fail:
89898 - return NULL;
89899 -}
89900 -
89901 -
89902 -SWIGINTERN PyObject *_wrap_VDMask_log(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89903 - PyObject *resultobj = 0;
89904 - double arg1 ;
89905 - double arg2 ;
89906 - double val1 ;
89907 - int ecode1 = 0 ;
89908 - double val2 ;
89909 - int ecode2 = 0 ;
89910 - PyObject * obj0 = 0 ;
89911 - PyObject * obj1 = 0 ;
89912 - vips::VDMask result;
89913 -
89914 - if (!PyArg_ParseTuple(args,(char *)"OO:VDMask_log",&obj0,&obj1)) SWIG_fail;
89915 - ecode1 = SWIG_AsVal_double(obj0, &val1);
89916 - if (!SWIG_IsOK(ecode1)) {
89917 - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VDMask_log" "', argument " "1"" of type '" "double""'");
89918 - }
89919 - arg1 = static_cast< double >(val1);
89920 - ecode2 = SWIG_AsVal_double(obj1, &val2);
89921 - if (!SWIG_IsOK(ecode2)) {
89922 - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VDMask_log" "', argument " "2"" of type '" "double""'");
89923 - }
89924 - arg2 = static_cast< double >(val2);
89925 - try {
89926 - result = vips::VDMask::log(arg1,arg2);
89927 - }
89928 - catch(vips::VError &_e) {
89929 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89930 - }
89931 -
89932 - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
89933 - return resultobj;
89934 -fail:
89935 - return NULL;
89936 -}
89937 -
89938 -
89939 -SWIGINTERN PyObject *_wrap_VDMask_rotate45(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89940 - PyObject *resultobj = 0;
89941 - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
89942 - void *argp1 = 0 ;
89943 - int res1 = 0 ;
89944 - PyObject * obj0 = 0 ;
89945 - vips::VDMask result;
89946 -
89947 - if (!PyArg_ParseTuple(args,(char *)"O:VDMask_rotate45",&obj0)) SWIG_fail;
89948 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
89949 - if (!SWIG_IsOK(res1)) {
89950 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_rotate45" "', argument " "1"" of type '" "vips::VDMask *""'");
89951 - }
89952 - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
89953 - try {
89954 - result = (arg1)->rotate45();
89955 - }
89956 - catch(vips::VError &_e) {
89957 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89958 - }
89959 -
89960 - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
89961 - return resultobj;
89962 -fail:
89963 - return NULL;
89964 -}
89965 -
89966 -
89967 -SWIGINTERN PyObject *_wrap_VDMask_rotate90(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89968 - PyObject *resultobj = 0;
89969 - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
89970 - void *argp1 = 0 ;
89971 - int res1 = 0 ;
89972 - PyObject * obj0 = 0 ;
89973 - vips::VDMask result;
89974 -
89975 - if (!PyArg_ParseTuple(args,(char *)"O:VDMask_rotate90",&obj0)) SWIG_fail;
89976 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
89977 - if (!SWIG_IsOK(res1)) {
89978 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_rotate90" "', argument " "1"" of type '" "vips::VDMask *""'");
89979 - }
89980 - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
89981 - try {
89982 - result = (arg1)->rotate90();
89983 - }
89984 - catch(vips::VError &_e) {
89985 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
89986 - }
89987 -
89988 - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
89989 - return resultobj;
89990 -fail:
89991 - return NULL;
89992 -}
89993 -
89994 -
89995 -SWIGINTERN PyObject *_wrap_VDMask_scalei(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
89996 - PyObject *resultobj = 0;
89997 - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
89998 - void *argp1 = 0 ;
89999 - int res1 = 0 ;
90000 - PyObject * obj0 = 0 ;
90001 - vips::VIMask result;
90002 -
90003 - if (!PyArg_ParseTuple(args,(char *)"O:VDMask_scalei",&obj0)) SWIG_fail;
90004 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
90005 - if (!SWIG_IsOK(res1)) {
90006 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_scalei" "', argument " "1"" of type '" "vips::VDMask *""'");
90007 - }
90008 - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
90009 - try {
90010 - result = (arg1)->scalei();
90011 - }
90012 - catch(vips::VError &_e) {
90013 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
90014 - }
90015 -
90016 - resultobj = SWIG_NewPointerObj((new vips::VIMask(static_cast< const vips::VIMask& >(result))), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_OWN | 0 );
90017 - return resultobj;
90018 -fail:
90019 - return NULL;
90020 -}
90021 -
90022 -
90023 -SWIGINTERN PyObject *_wrap_VDMask_trn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
90024 - PyObject *resultobj = 0;
90025 - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
90026 - void *argp1 = 0 ;
90027 - int res1 = 0 ;
90028 - PyObject * obj0 = 0 ;
90029 - vips::VDMask result;
90030 -
90031 - if (!PyArg_ParseTuple(args,(char *)"O:VDMask_trn",&obj0)) SWIG_fail;
90032 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
90033 - if (!SWIG_IsOK(res1)) {
90034 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_trn" "', argument " "1"" of type '" "vips::VDMask *""'");
90035 - }
90036 - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
90037 - try {
90038 - result = (arg1)->trn();
90039 - }
90040 - catch(vips::VError &_e) {
90041 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
90042 - }
90043 -
90044 - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
90045 - return resultobj;
90046 -fail:
90047 - return NULL;
90048 -}
90049 -
90050 -
90051 -SWIGINTERN PyObject *_wrap_VDMask_inv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
90052 - PyObject *resultobj = 0;
90053 - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
90054 - void *argp1 = 0 ;
90055 - int res1 = 0 ;
90056 - PyObject * obj0 = 0 ;
90057 - vips::VDMask result;
90058 -
90059 - if (!PyArg_ParseTuple(args,(char *)"O:VDMask_inv",&obj0)) SWIG_fail;
90060 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
90061 - if (!SWIG_IsOK(res1)) {
90062 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_inv" "', argument " "1"" of type '" "vips::VDMask *""'");
90063 - }
90064 - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
90065 - try {
90066 - result = (arg1)->inv();
90067 - }
90068 - catch(vips::VError &_e) {
90069 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
90070 - }
90071 -
90072 - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
90073 - return resultobj;
90074 -fail:
90075 - return NULL;
90076 -}
90077 -
90078 -
90079 -SWIGINTERN PyObject *_wrap_VDMask_cat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
90080 - PyObject *resultobj = 0;
90081 - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
90082 - vips::VDMask arg2 ;
90083 - void *argp1 = 0 ;
90084 - int res1 = 0 ;
90085 - void *argp2 ;
90086 - int res2 = 0 ;
90087 - PyObject * obj0 = 0 ;
90088 - PyObject * obj1 = 0 ;
90089 - vips::VDMask result;
90090 -
90091 - if (!PyArg_ParseTuple(args,(char *)"OO:VDMask_cat",&obj0,&obj1)) SWIG_fail;
90092 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
90093 - if (!SWIG_IsOK(res1)) {
90094 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_cat" "', argument " "1"" of type '" "vips::VDMask *""'");
90095 - }
90096 - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
90097 - {
90098 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
90099 - if (!SWIG_IsOK(res2)) {
90100 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VDMask_cat" "', argument " "2"" of type '" "vips::VDMask""'");
90101 - }
90102 - if (!argp2) {
90103 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VDMask_cat" "', argument " "2"" of type '" "vips::VDMask""'");
90104 - } else {
90105 - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
90106 - arg2 = *temp;
90107 - if (SWIG_IsNewObj(res2)) delete temp;
90108 - }
90109 - }
90110 - try {
90111 - result = (arg1)->cat(arg2);
90112 - }
90113 - catch(vips::VError &_e) {
90114 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
90115 - }
90116 -
90117 - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
90118 - return resultobj;
90119 -fail:
90120 - return NULL;
90121 -}
90122 -
90123 -
90124 -SWIGINTERN PyObject *_wrap_VDMask_mul(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
90125 - PyObject *resultobj = 0;
90126 - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
90127 - vips::VDMask arg2 ;
90128 - void *argp1 = 0 ;
90129 - int res1 = 0 ;
90130 - void *argp2 ;
90131 - int res2 = 0 ;
90132 - PyObject * obj0 = 0 ;
90133 - PyObject * obj1 = 0 ;
90134 - vips::VDMask result;
90135 -
90136 - if (!PyArg_ParseTuple(args,(char *)"OO:VDMask_mul",&obj0,&obj1)) SWIG_fail;
90137 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
90138 - if (!SWIG_IsOK(res1)) {
90139 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_mul" "', argument " "1"" of type '" "vips::VDMask *""'");
90140 - }
90141 - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
90142 - {
90143 - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
90144 - if (!SWIG_IsOK(res2)) {
90145 - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VDMask_mul" "', argument " "2"" of type '" "vips::VDMask""'");
90146 - }
90147 - if (!argp2) {
90148 - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VDMask_mul" "', argument " "2"" of type '" "vips::VDMask""'");
90149 - } else {
90150 - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
90151 - arg2 = *temp;
90152 - if (SWIG_IsNewObj(res2)) delete temp;
90153 - }
90154 - }
90155 - try {
90156 - result = (arg1)->mul(arg2);
90157 - }
90158 - catch(vips::VError &_e) {
90159 - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
90160 - }
90161 -
90162 - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
90163 - return resultobj;
90164 -fail:
90165 - return NULL;
90166 -}
90167 -
90168 -
90169 -SWIGINTERN PyObject *_wrap_delete_VDMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
90170 - PyObject *resultobj = 0;
90171 - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
90172 - void *argp1 = 0 ;
90173 - int res1 = 0 ;
90174 - PyObject * obj0 = 0 ;
90175 -
90176 - if (!PyArg_ParseTuple(args,(char *)"O:delete_VDMask",&obj0)) SWIG_fail;
90177 - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, SWIG_POINTER_DISOWN | 0 );
90178 - if (!SWIG_IsOK(res1)) {
90179 - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VDMask" "', argument " "1"" of type '" "vips::VDMask *""'");
90180 - }
90181 - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
90182 - delete arg1;
90183 - resultobj = SWIG_Py_Void();
90184 - return resultobj;
90185 -fail:
90186 - return NULL;
90187 -}
90188 -
90189 -
90190 -SWIGINTERN PyObject *VDMask_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
90191 - PyObject *obj;
90192 - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
90193 - SWIG_TypeNewClientData(SWIGTYPE_p_vips__VDMask, SWIG_NewClientData(obj));
90194 - return SWIG_Py_Void();
90195 -}
90196 -
90197 -static PyMethodDef SwigMethods[] = {
90198 - { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
90199 - { (char *)"new_VMask", _wrap_new_VMask, METH_VARARGS, NULL},
90200 - { (char *)"VMask___assign__", _wrap_VMask___assign__, METH_VARARGS, NULL},
90201 - { (char *)"delete_VMask", _wrap_delete_VMask, METH_VARARGS, NULL},
90202 - { (char *)"VMask_xsize", _wrap_VMask_xsize, METH_VARARGS, NULL},
90203 - { (char *)"VMask_ysize", _wrap_VMask_ysize, METH_VARARGS, NULL},
90204 - { (char *)"VMask_size", _wrap_VMask_size, METH_VARARGS, NULL},
90205 - { (char *)"VMask_filename", _wrap_VMask_filename, METH_VARARGS, NULL},
90206 - { (char *)"VMask_type", _wrap_VMask_type, METH_VARARGS, NULL},
90207 - { (char *)"VMask_mask", _wrap_VMask_mask, METH_VARARGS, NULL},
90208 - { (char *)"VMask_ostream_print", _wrap_VMask_ostream_print, METH_VARARGS, NULL},
90209 - { (char *)"VMask_swigregister", VMask_swigregister, METH_VARARGS, NULL},
90210 - { (char *)"__lshift__", _wrap___lshift__, METH_VARARGS, NULL},
90211 - { (char *)"new_VIMask", _wrap_new_VIMask, METH_VARARGS, NULL},
90212 - { (char *)"VIMask_scale", _wrap_VIMask_scale, METH_VARARGS, NULL},
90213 - { (char *)"VIMask_offset", _wrap_VIMask_offset, METH_VARARGS, NULL},
90214 - { (char *)"VIMask_embed", _wrap_VIMask_embed, METH_VARARGS, NULL},
90215 - { (char *)"VIMask___index__", _wrap_VIMask___index__, METH_VARARGS, NULL},
90216 - { (char *)"VIMask___call__", _wrap_VIMask___call__, METH_VARARGS, NULL},
90217 - { (char *)"VIMask_get", _wrap_VIMask_get, METH_VARARGS, NULL},
90218 - { (char *)"VIMask_gauss", _wrap_VIMask_gauss, METH_VARARGS, NULL},
90219 - { (char *)"VIMask_gauss_sep", _wrap_VIMask_gauss_sep, METH_VARARGS, NULL},
90220 - { (char *)"VIMask_log", _wrap_VIMask_log, METH_VARARGS, NULL},
90221 - { (char *)"VIMask_rotate45", _wrap_VIMask_rotate45, METH_VARARGS, NULL},
90222 - { (char *)"VIMask_rotate90", _wrap_VIMask_rotate90, METH_VARARGS, NULL},
90223 - { (char *)"VIMask_trn", _wrap_VIMask_trn, METH_VARARGS, NULL},
90224 - { (char *)"VIMask_inv", _wrap_VIMask_inv, METH_VARARGS, NULL},
90225 - { (char *)"VIMask_cat", _wrap_VIMask_cat, METH_VARARGS, NULL},
90226 - { (char *)"VIMask_mul", _wrap_VIMask_mul, METH_VARARGS, NULL},
90227 - { (char *)"delete_VIMask", _wrap_delete_VIMask, METH_VARARGS, NULL},
90228 - { (char *)"VIMask_swigregister", VIMask_swigregister, METH_VARARGS, NULL},
90229 - { (char *)"new_VDMask", _wrap_new_VDMask, METH_VARARGS, NULL},
90230 - { (char *)"VDMask_embed", _wrap_VDMask_embed, METH_VARARGS, NULL},
90231 - { (char *)"VDMask_scale", _wrap_VDMask_scale, METH_VARARGS, NULL},
90232 - { (char *)"VDMask_offset", _wrap_VDMask_offset, METH_VARARGS, NULL},
90233 - { (char *)"VDMask___index__", _wrap_VDMask___index__, METH_VARARGS, NULL},
90234 - { (char *)"VDMask___call__", _wrap_VDMask___call__, METH_VARARGS, NULL},
90235 - { (char *)"VDMask_get", _wrap_VDMask_get, METH_VARARGS, NULL},
90236 - { (char *)"VDMask_gauss", _wrap_VDMask_gauss, METH_VARARGS, NULL},
90237 - { (char *)"VDMask_log", _wrap_VDMask_log, METH_VARARGS, NULL},
90238 - { (char *)"VDMask_rotate45", _wrap_VDMask_rotate45, METH_VARARGS, NULL},
90239 - { (char *)"VDMask_rotate90", _wrap_VDMask_rotate90, METH_VARARGS, NULL},
90240 - { (char *)"VDMask_scalei", _wrap_VDMask_scalei, METH_VARARGS, NULL},
90241 - { (char *)"VDMask_trn", _wrap_VDMask_trn, METH_VARARGS, NULL},
90242 - { (char *)"VDMask_inv", _wrap_VDMask_inv, METH_VARARGS, NULL},
90243 - { (char *)"VDMask_cat", _wrap_VDMask_cat, METH_VARARGS, NULL},
90244 - { (char *)"VDMask_mul", _wrap_VDMask_mul, METH_VARARGS, NULL},
90245 - { (char *)"delete_VDMask", _wrap_delete_VDMask, METH_VARARGS, NULL},
90246 - { (char *)"VDMask_swigregister", VDMask_swigregister, METH_VARARGS, NULL},
90247 - { NULL, NULL, 0, NULL }
90248 -};
90249 -
90250 -
90251 -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
90252 -
90253 -static void *_p_vips__VIMaskTo_p_vips__VMask(void *x, int *SWIGUNUSEDPARM(newmemory)) {
90254 - return (void *)((vips::VMask *) ((vips::VIMask *) x));
90255 -}
90256 -static void *_p_vips__VDMaskTo_p_vips__VMask(void *x, int *SWIGUNUSEDPARM(newmemory)) {
90257 - return (void *)((vips::VMask *) ((vips::VDMask *) x));
90258 -}
90259 -static swig_type_info _swigt__p__private_detail__MASKUNION = {"_p__private_detail__MASKUNION", "_private_detail::MASKUNION *", 0, 0, (void*)0, 0};
90260 -static swig_type_info _swigt__p__private_detail__VPMask__VMaskType = {"_p__private_detail__VPMask__VMaskType", "_private_detail::VPMask::VMaskType *", 0, 0, (void*)0, 0};
90261 -static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0};
90262 -static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
90263 -static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0};
90264 -static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
90265 -static swig_type_info _swigt__p_im__DOUBLEMASK = {"_p_im__DOUBLEMASK", "im__DOUBLEMASK *", 0, 0, (void*)0, 0};
90266 -static swig_type_info _swigt__p_im__INTMASK = {"_p_im__INTMASK", "im__INTMASK *", 0, 0, (void*)0, 0};
90267 -static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0};
90268 -static swig_type_info _swigt__p_matrix = {"_p_matrix", "matrix *", 0, 0, (void*)0, 0};
90269 -static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0};
90270 -static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0};
90271 -static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0};
90272 -static swig_type_info _swigt__p_vips__VDMask = {"_p_vips__VDMask", "vips::VDMask *", 0, 0, (void*)0, 0};
90273 -static swig_type_info _swigt__p_vips__VError = {"_p_vips__VError", "vips::VError *", 0, 0, (void*)0, 0};
90274 -static swig_type_info _swigt__p_vips__VIMask = {"_p_vips__VIMask", "vips::VIMask *", 0, 0, (void*)0, 0};
90275 -static swig_type_info _swigt__p_vips__VMask = {"_p_vips__VMask", "vips::VMask *", 0, 0, (void*)0, 0};
90276 -
90277 -static swig_type_info *swig_type_initial[] = {
90278 - &_swigt__p__private_detail__MASKUNION,
90279 - &_swigt__p__private_detail__VPMask__VMaskType,
90280 - &_swigt__p_allocator_type,
90281 - &_swigt__p_char,
90282 - &_swigt__p_difference_type,
90283 - &_swigt__p_double,
90284 - &_swigt__p_im__DOUBLEMASK,
90285 - &_swigt__p_im__INTMASK,
90286 - &_swigt__p_int,
90287 - &_swigt__p_matrix,
90288 - &_swigt__p_size_type,
90289 - &_swigt__p_std__ostream,
90290 - &_swigt__p_value_type,
90291 - &_swigt__p_vips__VDMask,
90292 - &_swigt__p_vips__VError,
90293 - &_swigt__p_vips__VIMask,
90294 - &_swigt__p_vips__VMask,
90295 -};
90296 -
90297 -static swig_cast_info _swigc__p__private_detail__MASKUNION[] = { {&_swigt__p__private_detail__MASKUNION, 0, 0, 0},{0, 0, 0, 0}};
90298 -static swig_cast_info _swigc__p__private_detail__VPMask__VMaskType[] = { {&_swigt__p__private_detail__VPMask__VMaskType, 0, 0, 0},{0, 0, 0, 0}};
90299 -static swig_cast_info _swigc__p_allocator_type[] = { {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}};
90300 -static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
90301 -static swig_cast_info _swigc__p_difference_type[] = { {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}};
90302 -static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
90303 -static swig_cast_info _swigc__p_im__DOUBLEMASK[] = { {&_swigt__p_im__DOUBLEMASK, 0, 0, 0},{0, 0, 0, 0}};
90304 -static swig_cast_info _swigc__p_im__INTMASK[] = { {&_swigt__p_im__INTMASK, 0, 0, 0},{0, 0, 0, 0}};
90305 -static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
90306 -static swig_cast_info _swigc__p_matrix[] = { {&_swigt__p_matrix, 0, 0, 0},{0, 0, 0, 0}};
90307 -static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}};
90308 -static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}};
90309 -static swig_cast_info _swigc__p_value_type[] = { {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}};
90310 -static swig_cast_info _swigc__p_vips__VDMask[] = { {&_swigt__p_vips__VDMask, 0, 0, 0},{0, 0, 0, 0}};
90311 -static swig_cast_info _swigc__p_vips__VError[] = { {&_swigt__p_vips__VError, 0, 0, 0},{0, 0, 0, 0}};
90312 -static swig_cast_info _swigc__p_vips__VIMask[] = { {&_swigt__p_vips__VIMask, 0, 0, 0},{0, 0, 0, 0}};
90313 -static swig_cast_info _swigc__p_vips__VMask[] = { {&_swigt__p_vips__VDMask, _p_vips__VDMaskTo_p_vips__VMask, 0, 0}, {&_swigt__p_vips__VMask, 0, 0, 0}, {&_swigt__p_vips__VIMask, _p_vips__VIMaskTo_p_vips__VMask, 0, 0},{0, 0, 0, 0}};
90314 -
90315 -static swig_cast_info *swig_cast_initial[] = {
90316 - _swigc__p__private_detail__MASKUNION,
90317 - _swigc__p__private_detail__VPMask__VMaskType,
90318 - _swigc__p_allocator_type,
90319 - _swigc__p_char,
90320 - _swigc__p_difference_type,
90321 - _swigc__p_double,
90322 - _swigc__p_im__DOUBLEMASK,
90323 - _swigc__p_im__INTMASK,
90324 - _swigc__p_int,
90325 - _swigc__p_matrix,
90326 - _swigc__p_size_type,
90327 - _swigc__p_std__ostream,
90328 - _swigc__p_value_type,
90329 - _swigc__p_vips__VDMask,
90330 - _swigc__p_vips__VError,
90331 - _swigc__p_vips__VIMask,
90332 - _swigc__p_vips__VMask,
90333 -};
90334 -
90335 -
90336 -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
90337 -
90338 -static swig_const_info swig_const_table[] = {
90339 -{0, 0, 0, 0.0, 0, 0}};
90340 -
90341 -#ifdef __cplusplus
90342 -}
90343 -#endif
90344 -/* -----------------------------------------------------------------------------
90345 - * Type initialization:
90346 - * This problem is tough by the requirement that no dynamic
90347 - * memory is used. Also, since swig_type_info structures store pointers to
90348 - * swig_cast_info structures and swig_cast_info structures store pointers back
90349 - * to swig_type_info structures, we need some lookup code at initialization.
90350 - * The idea is that swig generates all the structures that are needed.
90351 - * The runtime then collects these partially filled structures.
90352 - * The SWIG_InitializeModule function takes these initial arrays out of
90353 - * swig_module, and does all the lookup, filling in the swig_module.types
90354 - * array with the correct data and linking the correct swig_cast_info
90355 - * structures together.
90356 - *
90357 - * The generated swig_type_info structures are assigned staticly to an initial
90358 - * array. We just loop through that array, and handle each type individually.
90359 - * First we lookup if this type has been already loaded, and if so, use the
90360 - * loaded structure instead of the generated one. Then we have to fill in the
90361 - * cast linked list. The cast data is initially stored in something like a
90362 - * two-dimensional array. Each row corresponds to a type (there are the same
90363 - * number of rows as there are in the swig_type_initial array). Each entry in
90364 - * a column is one of the swig_cast_info structures for that type.
90365 - * The cast_initial array is actually an array of arrays, because each row has
90366 - * a variable number of columns. So to actually build the cast linked list,
90367 - * we find the array of casts associated with the type, and loop through it
90368 - * adding the casts to the list. The one last trick we need to do is making
90369 - * sure the type pointer in the swig_cast_info struct is correct.
90370 - *
90371 - * First off, we lookup the cast->type name to see if it is already loaded.
90372 - * There are three cases to handle:
90373 - * 1) If the cast->type has already been loaded AND the type we are adding
90374 - * casting info to has not been loaded (it is in this module), THEN we
90375 - * replace the cast->type pointer with the type pointer that has already
90376 - * been loaded.
90377 - * 2) If BOTH types (the one we are adding casting info to, and the
90378 - * cast->type) are loaded, THEN the cast info has already been loaded by
90379 - * the previous module so we just ignore it.
90380 - * 3) Finally, if cast->type has not already been loaded, then we add that
90381 - * swig_cast_info to the linked list (because the cast->type) pointer will
90382 - * be correct.
90383 - * ----------------------------------------------------------------------------- */
90384 -
90385 -#ifdef __cplusplus
90386 -extern "C" {
90387 -#if 0
90388 -} /* c-mode */
90389 -#endif
90390 -#endif
90391 -
90392 -#if 0
90393 -#define SWIGRUNTIME_DEBUG
90394 -#endif
90395 -
90396 -
90397 -SWIGRUNTIME void
90398 -SWIG_InitializeModule(void *clientdata) {
90399 - size_t i;
90400 - swig_module_info *module_head, *iter;
90401 - int found, init;
90402 -
90403 - /* check to see if the circular list has been setup, if not, set it up */
90404 - if (swig_module.next==0) {
90405 - /* Initialize the swig_module */
90406 - swig_module.type_initial = swig_type_initial;
90407 - swig_module.cast_initial = swig_cast_initial;
90408 - swig_module.next = &swig_module;
90409 - init = 1;
90410 - } else {
90411 - init = 0;
90412 - }
90413 -
90414 - /* Try and load any already created modules */
90415 - module_head = SWIG_GetModule(clientdata);
90416 - if (!module_head) {
90417 - /* This is the first module loaded for this interpreter */
90418 - /* so set the swig module into the interpreter */
90419 - SWIG_SetModule(clientdata, &swig_module);
90420 - module_head = &swig_module;
90421 - } else {
90422 - /* the interpreter has loaded a SWIG module, but has it loaded this one? */
90423 - found=0;
90424 - iter=module_head;
90425 - do {
90426 - if (iter==&swig_module) {
90427 - found=1;
90428 - break;
90429 - }
90430 - iter=iter->next;
90431 - } while (iter!= module_head);
90432 -
90433 - /* if the is found in the list, then all is done and we may leave */
90434 - if (found) return;
90435 - /* otherwise we must add out module into the list */
90436 - swig_module.next = module_head->next;
90437 - module_head->next = &swig_module;
90438 - }
90439 -
90440 - /* When multiple interpeters are used, a module could have already been initialized in
90441 - a different interpreter, but not yet have a pointer in this interpreter.
90442 - In this case, we do not want to continue adding types... everything should be
90443 - set up already */
90444 - if (init == 0) return;
90445 -
90446 - /* Now work on filling in swig_module.types */
90447 -#ifdef SWIGRUNTIME_DEBUG
90448 - printf("SWIG_InitializeModule: size %d\n", swig_module.size);
90449 -#endif
90450 - for (i = 0; i < swig_module.size; ++i) {
90451 - swig_type_info *type = 0;
90452 - swig_type_info *ret;
90453 - swig_cast_info *cast;
90454 -
90455 -#ifdef SWIGRUNTIME_DEBUG
90456 - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
90457 -#endif
90458 -
90459 - /* if there is another module already loaded */
90460 - if (swig_module.next != &swig_module) {
90461 - type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
90462 - }
90463 - if (type) {
90464 - /* Overwrite clientdata field */
90465 -#ifdef SWIGRUNTIME_DEBUG
90466 - printf("SWIG_InitializeModule: found type %s\n", type->name);
90467 -#endif
90468 - if (swig_module.type_initial[i]->clientdata) {
90469 - type->clientdata = swig_module.type_initial[i]->clientdata;
90470 -#ifdef SWIGRUNTIME_DEBUG
90471 - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
90472 -#endif
90473 - }
90474 - } else {
90475 - type = swig_module.type_initial[i];
90476 - }
90477 -
90478 - /* Insert casting types */
90479 - cast = swig_module.cast_initial[i];
90480 - while (cast->type) {
90481 - /* Don't need to add information already in the list */
90482 - ret = 0;
90483 -#ifdef SWIGRUNTIME_DEBUG
90484 - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
90485 -#endif
90486 - if (swig_module.next != &swig_module) {
90487 - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
90488 -#ifdef SWIGRUNTIME_DEBUG
90489 - if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
90490 -#endif
90491 - }
90492 - if (ret) {
90493 - if (type == swig_module.type_initial[i]) {
90494 -#ifdef SWIGRUNTIME_DEBUG
90495 - printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
90496 -#endif
90497 - cast->type = ret;
90498 - ret = 0;
90499 - } else {
90500 - /* Check for casting already in the list */
90501 - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
90502 -#ifdef SWIGRUNTIME_DEBUG
90503 - if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
90504 -#endif
90505 - if (!ocast) ret = 0;
90506 - }
90507 - }
90508 -
90509 - if (!ret) {
90510 -#ifdef SWIGRUNTIME_DEBUG
90511 - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
90512 -#endif
90513 - if (type->cast) {
90514 - type->cast->prev = cast;
90515 - cast->next = type->cast;
90516 - }
90517 - type->cast = cast;
90518 - }
90519 - cast++;
90520 - }
90521 - /* Set entry in modules->types array equal to the type */
90522 - swig_module.types[i] = type;
90523 - }
90524 - swig_module.types[i] = 0;
90525 -
90526 -#ifdef SWIGRUNTIME_DEBUG
90527 - printf("**** SWIG_InitializeModule: Cast List ******\n");
90528 - for (i = 0; i < swig_module.size; ++i) {
90529 - int j = 0;
90530 - swig_cast_info *cast = swig_module.cast_initial[i];
90531 - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
90532 - while (cast->type) {
90533 - printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
90534 - cast++;
90535 - ++j;
90536 - }
90537 - printf("---- Total casts: %d\n",j);
90538 - }
90539 - printf("**** SWIG_InitializeModule: Cast List ******\n");
90540 -#endif
90541 -}
90542 -
90543 -/* This function will propagate the clientdata field of type to
90544 -* any new swig_type_info structures that have been added into the list
90545 -* of equivalent types. It is like calling
90546 -* SWIG_TypeClientData(type, clientdata) a second time.
90547 -*/
90548 -SWIGRUNTIME void
90549 -SWIG_PropagateClientData(void) {
90550 - size_t i;
90551 - swig_cast_info *equiv;
90552 - static int init_run = 0;
90553 -
90554 - if (init_run) return;
90555 - init_run = 1;
90556 -
90557 - for (i = 0; i < swig_module.size; i++) {
90558 - if (swig_module.types[i]->clientdata) {
90559 - equiv = swig_module.types[i]->cast;
90560 - while (equiv) {
90561 - if (!equiv->converter) {
90562 - if (equiv->type && !equiv->type->clientdata)
90563 - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
90564 - }
90565 - equiv = equiv->next;
90566 - }
90567 - }
90568 - }
90569 -}
90570 -
90571 -#ifdef __cplusplus
90572 -#if 0
90573 -{
90574 - /* c-mode */
90575 -#endif
90576 -}
90577 -#endif
90578 -
90579 -
90580 -
90581 -#ifdef __cplusplus
90582 -extern "C" {
90583 -#endif
90584 -
90585 - /* Python-specific SWIG API */
90586 -#define SWIG_newvarlink() SWIG_Python_newvarlink()
90587 -#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
90588 -#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
90589 -
90590 - /* -----------------------------------------------------------------------------
90591 - * global variable support code.
90592 - * ----------------------------------------------------------------------------- */
90593 -
90594 - typedef struct swig_globalvar {
90595 - char *name; /* Name of global variable */
90596 - PyObject *(*get_attr)(void); /* Return the current value */
90597 - int (*set_attr)(PyObject *); /* Set the value */
90598 - struct swig_globalvar *next;
90599 - } swig_globalvar;
90600 -
90601 - typedef struct swig_varlinkobject {
90602 - PyObject_HEAD
90603 - swig_globalvar *vars;
90604 - } swig_varlinkobject;
90605 -
90606 - SWIGINTERN PyObject *
90607 - swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
90608 -#if PY_VERSION_HEX >= 0x03000000
90609 - return PyUnicode_InternFromString("<Swig global variables>");
90610 -#else
90611 - return PyString_FromString("<Swig global variables>");
90612 -#endif
90613 - }
90614 -
90615 - SWIGINTERN PyObject *
90616 - swig_varlink_str(swig_varlinkobject *v) {
90617 -#if PY_VERSION_HEX >= 0x03000000
90618 - PyObject *str = PyUnicode_InternFromString("(");
90619 - PyObject *tail;
90620 - PyObject *joined;
90621 - swig_globalvar *var;
90622 - for (var = v->vars; var; var=var->next) {
90623 - tail = PyUnicode_FromString(var->name);
90624 - joined = PyUnicode_Concat(str, tail);
90625 - Py_DecRef(str);
90626 - Py_DecRef(tail);
90627 - str = joined;
90628 - if (var->next) {
90629 - tail = PyUnicode_InternFromString(", ");
90630 - joined = PyUnicode_Concat(str, tail);
90631 - Py_DecRef(str);
90632 - Py_DecRef(tail);
90633 - str = joined;
90634 - }
90635 - }
90636 - tail = PyUnicode_InternFromString(")");
90637 - joined = PyUnicode_Concat(str, tail);
90638 - Py_DecRef(str);
90639 - Py_DecRef(tail);
90640 - str = joined;
90641 -#else
90642 - PyObject *str = PyString_FromString("(");
90643 - swig_globalvar *var;
90644 - for (var = v->vars; var; var=var->next) {
90645 - PyString_ConcatAndDel(&str,PyString_FromString(var->name));
90646 - if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
90647 - }
90648 - PyString_ConcatAndDel(&str,PyString_FromString(")"));
90649 -#endif
90650 - return str;
90651 - }
90652 -
90653 - SWIGINTERN int
90654 - swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
90655 - char *tmp;
90656 - PyObject *str = swig_varlink_str(v);
90657 - fprintf(fp,"Swig global variables ");
90658 - fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
90659 - SWIG_Python_str_DelForPy3(tmp);
90660 - Py_DECREF(str);
90661 - return 0;
90662 - }
90663 -
90664 - SWIGINTERN void
90665 - swig_varlink_dealloc(swig_varlinkobject *v) {
90666 - swig_globalvar *var = v->vars;
90667 - while (var) {
90668 - swig_globalvar *n = var->next;
90669 - free(var->name);
90670 - free(var);
90671 - var = n;
90672 - }
90673 - }
90674 -
90675 - SWIGINTERN PyObject *
90676 - swig_varlink_getattr(swig_varlinkobject *v, char *n) {
90677 - PyObject *res = NULL;
90678 - swig_globalvar *var = v->vars;
90679 - while (var) {
90680 - if (strcmp(var->name,n) == 0) {
90681 - res = (*var->get_attr)();
90682 - break;
90683 - }
90684 - var = var->next;
90685 - }
90686 - if (res == NULL && !PyErr_Occurred()) {
90687 - PyErr_SetString(PyExc_NameError,"Unknown C global variable");
90688 - }
90689 - return res;
90690 - }
90691 -
90692 - SWIGINTERN int
90693 - swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
90694 - int res = 1;
90695 - swig_globalvar *var = v->vars;
90696 - while (var) {
90697 - if (strcmp(var->name,n) == 0) {
90698 - res = (*var->set_attr)(p);
90699 - break;
90700 - }
90701 - var = var->next;
90702 - }
90703 - if (res == 1 && !PyErr_Occurred()) {
90704 - PyErr_SetString(PyExc_NameError,"Unknown C global variable");
90705 - }
90706 - return res;
90707 - }
90708 -
90709 - SWIGINTERN PyTypeObject*
90710 - swig_varlink_type(void) {
90711 - static char varlink__doc__[] = "Swig var link object";
90712 - static PyTypeObject varlink_type;
90713 - static int type_init = 0;
90714 - if (!type_init) {
90715 - const PyTypeObject tmp = {
90716 - /* PyObject header changed in Python 3 */
90717 -#if PY_VERSION_HEX >= 0x03000000
90718 - PyVarObject_HEAD_INIT(NULL, 0)
90719 -#else
90720 - PyObject_HEAD_INIT(NULL)
90721 - 0, /* ob_size */
90722 -#endif
90723 - (char *)"swigvarlink", /* tp_name */
90724 - sizeof(swig_varlinkobject), /* tp_basicsize */
90725 - 0, /* tp_itemsize */
90726 - (destructor) swig_varlink_dealloc, /* tp_dealloc */
90727 - (printfunc) swig_varlink_print, /* tp_print */
90728 - (getattrfunc) swig_varlink_getattr, /* tp_getattr */
90729 - (setattrfunc) swig_varlink_setattr, /* tp_setattr */
90730 - 0, /* tp_compare */
90731 - (reprfunc) swig_varlink_repr, /* tp_repr */
90732 - 0, /* tp_as_number */
90733 - 0, /* tp_as_sequence */
90734 - 0, /* tp_as_mapping */
90735 - 0, /* tp_hash */
90736 - 0, /* tp_call */
90737 - (reprfunc) swig_varlink_str, /* tp_str */
90738 - 0, /* tp_getattro */
90739 - 0, /* tp_setattro */
90740 - 0, /* tp_as_buffer */
90741 - 0, /* tp_flags */
90742 - varlink__doc__, /* tp_doc */
90743 - 0, /* tp_traverse */
90744 - 0, /* tp_clear */
90745 - 0, /* tp_richcompare */
90746 - 0, /* tp_weaklistoffset */
90747 -#if PY_VERSION_HEX >= 0x02020000
90748 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
90749 -#endif
90750 -#if PY_VERSION_HEX >= 0x02030000
90751 - 0, /* tp_del */
90752 -#endif
90753 -#if PY_VERSION_HEX >= 0x02060000
90754 - 0, /* tp_version */
90755 -#endif
90756 -#ifdef COUNT_ALLOCS
90757 - 0,0,0,0 /* tp_alloc -> tp_next */
90758 -#endif
90759 - };
90760 - varlink_type = tmp;
90761 - type_init = 1;
90762 -#if PY_VERSION_HEX < 0x02020000
90763 - varlink_type.ob_type = &PyType_Type;
90764 -#else
90765 - if (PyType_Ready(&varlink_type) < 0)
90766 - return NULL;
90767 -#endif
90768 - }
90769 - return &varlink_type;
90770 - }
90771 -
90772 - /* Create a variable linking object for use later */
90773 - SWIGINTERN PyObject *
90774 - SWIG_Python_newvarlink(void) {
90775 - swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
90776 - if (result) {
90777 - result->vars = 0;
90778 - }
90779 - return ((PyObject*) result);
90780 - }
90781 -
90782 - SWIGINTERN void
90783 - SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
90784 - swig_varlinkobject *v = (swig_varlinkobject *) p;
90785 - swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
90786 - if (gv) {
90787 - size_t size = strlen(name)+1;
90788 - gv->name = (char *)malloc(size);
90789 - if (gv->name) {
90790 - strncpy(gv->name,name,size);
90791 - gv->get_attr = get_attr;
90792 - gv->set_attr = set_attr;
90793 - gv->next = v->vars;
90794 - }
90795 - }
90796 - v->vars = gv;
90797 - }
90798 -
90799 - SWIGINTERN PyObject *
90800 - SWIG_globals(void) {
90801 - static PyObject *_SWIG_globals = 0;
90802 - if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
90803 - return _SWIG_globals;
90804 - }
90805 -
90806 - /* -----------------------------------------------------------------------------
90807 - * constants/methods manipulation
90808 - * ----------------------------------------------------------------------------- */
90809 -
90810 - /* Install Constants */
90811 - SWIGINTERN void
90812 - SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
90813 - PyObject *obj = 0;
90814 - size_t i;
90815 - for (i = 0; constants[i].type; ++i) {
90816 - switch(constants[i].type) {
90817 - case SWIG_PY_POINTER:
90818 - obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
90819 - break;
90820 - case SWIG_PY_BINARY:
90821 - obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
90822 - break;
90823 - default:
90824 - obj = 0;
90825 - break;
90826 - }
90827 - if (obj) {
90828 - PyDict_SetItemString(d, constants[i].name, obj);
90829 - Py_DECREF(obj);
90830 - }
90831 - }
90832 - }
90833 -
90834 - /* -----------------------------------------------------------------------------*/
90835 - /* Fix SwigMethods to carry the callback ptrs when needed */
90836 - /* -----------------------------------------------------------------------------*/
90837 -
90838 - SWIGINTERN void
90839 - SWIG_Python_FixMethods(PyMethodDef *methods,
90840 - swig_const_info *const_table,
90841 - swig_type_info **types,
90842 - swig_type_info **types_initial) {
90843 - size_t i;
90844 - for (i = 0; methods[i].ml_name; ++i) {
90845 - const char *c = methods[i].ml_doc;
90846 - if (c && (c = strstr(c, "swig_ptr: "))) {
90847 - int j;
90848 - swig_const_info *ci = 0;
90849 - const char *name = c + 10;
90850 - for (j = 0; const_table[j].type; ++j) {
90851 - if (strncmp(const_table[j].name, name,
90852 - strlen(const_table[j].name)) == 0) {
90853 - ci = &(const_table[j]);
90854 - break;
90855 - }
90856 - }
90857 - if (ci) {
90858 - void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
90859 - if (ptr) {
90860 - size_t shift = (ci->ptype) - types;
90861 - swig_type_info *ty = types_initial[shift];
90862 - size_t ldoc = (c - methods[i].ml_doc);
90863 - size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
90864 - char *ndoc = (char*)malloc(ldoc + lptr + 10);
90865 - if (ndoc) {
90866 - char *buff = ndoc;
90867 - strncpy(buff, methods[i].ml_doc, ldoc);
90868 - buff += ldoc;
90869 - strncpy(buff, "swig_ptr: ", 10);
90870 - buff += 10;
90871 - SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
90872 - methods[i].ml_doc = ndoc;
90873 - }
90874 - }
90875 - }
90876 - }
90877 - }
90878 - }
90879 -
90880 -#ifdef __cplusplus
90881 -}
90882 -#endif
90883 -
90884 -/* -----------------------------------------------------------------------------*
90885 - * Partial Init method
90886 - * -----------------------------------------------------------------------------*/
90887 -
90888 -#ifdef __cplusplus
90889 -extern "C"
90890 -#endif
90891 -
90892 -SWIGEXPORT
90893 -#if PY_VERSION_HEX >= 0x03000000
90894 -PyObject*
90895 -#else
90896 -void
90897 -#endif
90898 -SWIG_init(void) {
90899 - PyObject *m, *d, *md;
90900 -#if PY_VERSION_HEX >= 0x03000000
90901 - static struct PyModuleDef SWIG_module = {
90902 -# if PY_VERSION_HEX >= 0x03020000
90903 - PyModuleDef_HEAD_INIT,
90904 -# else
90905 - {
90906 - PyObject_HEAD_INIT(NULL)
90907 - NULL, /* m_init */
90908 - 0, /* m_index */
90909 - NULL, /* m_copy */
90910 - },
90911 -# endif
90912 - (char *) SWIG_name,
90913 - NULL,
90914 - -1,
90915 - SwigMethods,
90916 - NULL,
90917 - NULL,
90918 - NULL,
90919 - NULL
90920 - };
90921 -#endif
90922 -
90923 -#if defined(SWIGPYTHON_BUILTIN)
90924 - static SwigPyClientData SwigPyObject_clientdata = {
90925 - 0, 0, 0, 0, 0, 0, 0
90926 - };
90927 - static PyGetSetDef this_getset_def = {
90928 - (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
90929 - };
90930 - static SwigPyGetSet thisown_getset_closure = {
90931 - (PyCFunction) SwigPyObject_own,
90932 - (PyCFunction) SwigPyObject_own
90933 - };
90934 - static PyGetSetDef thisown_getset_def = {
90935 - (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
90936 - };
90937 - PyObject *metatype_args;
90938 - PyTypeObject *builtin_pytype;
90939 - int builtin_base_count;
90940 - swig_type_info *builtin_basetype;
90941 - PyObject *tuple;
90942 - PyGetSetDescrObject *static_getset;
90943 - PyTypeObject *metatype;
90944 - SwigPyClientData *cd;
90945 - PyObject *public_interface, *public_symbol;
90946 - PyObject *this_descr;
90947 - PyObject *thisown_descr;
90948 - int i;
90949 -
90950 - (void)builtin_pytype;
90951 - (void)builtin_base_count;
90952 - (void)builtin_basetype;
90953 - (void)tuple;
90954 - (void)static_getset;
90955 -
90956 - /* metatype is used to implement static member variables. */
90957 - metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
90958 - assert(metatype_args);
90959 - metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
90960 - assert(metatype);
90961 - Py_DECREF(metatype_args);
90962 - metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
90963 - assert(PyType_Ready(metatype) >= 0);
90964 -#endif
90965 -
90966 - /* Fix SwigMethods to carry the callback ptrs when needed */
90967 - SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
90968 -
90969 -#if PY_VERSION_HEX >= 0x03000000
90970 - m = PyModule_Create(&SWIG_module);
90971 -#else
90972 - m = Py_InitModule((char *) SWIG_name, SwigMethods);
90973 -#endif
90974 - md = d = PyModule_GetDict(m);
90975 - (void)md;
90976 -
90977 - SWIG_InitializeModule(0);
90978 -
90979 -#ifdef SWIGPYTHON_BUILTIN
90980 - SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
90981 - assert(SwigPyObject_stype);
90982 - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
90983 - if (!cd) {
90984 - SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
90985 - SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
90986 - } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
90987 - PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
90988 -# if PY_VERSION_HEX >= 0x03000000
90989 - return NULL;
90990 -# else
90991 - return;
90992 -# endif
90993 - }
90994 -
90995 - /* All objects have a 'this' attribute */
90996 - this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
90997 - (void)this_descr;
90998 -
90999 - /* All objects have a 'thisown' attribute */
91000 - thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
91001 - (void)thisown_descr;
91002 -
91003 - public_interface = PyList_New(0);
91004 - public_symbol = 0;
91005 - (void)public_symbol;
91006 -
91007 - PyDict_SetItemString(md, "__all__", public_interface);
91008 - Py_DECREF(public_interface);
91009 - for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
91010 - SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
91011 - for (i = 0; swig_const_table[i].name != 0; ++i)
91012 - SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
91013 -#endif
91014 -
91015 - SWIG_InstallConstants(d,swig_const_table);
91016 -
91017 -#if PY_VERSION_HEX >= 0x03000000
91018 - return m;
91019 -#else
91020 - return;
91021 -#endif
91022 -}
91023 -
91024 diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/VMask.py vips-7.38.5/swig/vipsCC/VMask.py
91025 --- vips-7.38.5-vanilla/swig/vipsCC/VMask.py 2014-07-17 23:48:36.208794473 -0400
91026 +++ vips-7.38.5/swig/vipsCC/VMask.py 1969-12-31 19:00:00.000000000 -0500
91027 @@ -1,191 +0,0 @@
91028 -# This file was automatically generated by SWIG (http://www.swig.org).
91029 -# Version 2.0.10
91030 -#
91031 -# Do not make changes to this file unless you know what you are doing--modify
91032 -# the SWIG interface file instead.
91033 -
91034 -
91035 -
91036 -from sys import version_info
91037 -if version_info >= (2,6,0):
91038 - def swig_import_helper():
91039 - from os.path import dirname
91040 - import imp
91041 - fp = None
91042 - try:
91043 - fp, pathname, description = imp.find_module('vmaskmodule', [dirname(__file__)])
91044 - except ImportError:
91045 - import vmaskmodule
91046 - return vmaskmodule
91047 - if fp is not None:
91048 - try:
91049 - _mod = imp.load_module('vmaskmodule', fp, pathname, description)
91050 - finally:
91051 - fp.close()
91052 - return _mod
91053 - vmaskmodule = swig_import_helper()
91054 - del swig_import_helper
91055 -else:
91056 - import vmaskmodule
91057 -del version_info
91058 -try:
91059 - _swig_property = property
91060 -except NameError:
91061 - pass # Python < 2.2 doesn't have 'property'.
91062 -def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
91063 - if (name == "thisown"): return self.this.own(value)
91064 - if (name == "this"):
91065 - if type(value).__name__ == 'SwigPyObject':
91066 - self.__dict__[name] = value
91067 - return
91068 - method = class_type.__swig_setmethods__.get(name,None)
91069 - if method: return method(self,value)
91070 - if (not static):
91071 - self.__dict__[name] = value
91072 - else:
91073 - raise AttributeError("You cannot add attributes to %s" % self)
91074 -
91075 -def _swig_setattr(self,class_type,name,value):
91076 - return _swig_setattr_nondynamic(self,class_type,name,value,0)
91077 -
91078 -def _swig_getattr(self,class_type,name):
91079 - if (name == "thisown"): return self.this.own()
91080 - method = class_type.__swig_getmethods__.get(name,None)
91081 - if method: return method(self)
91082 - raise AttributeError(name)
91083 -
91084 -def _swig_repr(self):
91085 - try: strthis = "proxy of " + self.this.__repr__()
91086 - except: strthis = ""
91087 - return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
91088 -
91089 -try:
91090 - _object = object
91091 - _newclass = 1
91092 -except AttributeError:
91093 - class _object : pass
91094 - _newclass = 0
91095 -
91096 -
91097 -import VError
91098 -import VImage
91099 -import VDisplay
91100 -class VMask(_object):
91101 - __swig_setmethods__ = {}
91102 - __setattr__ = lambda self, name, value: _swig_setattr(self, VMask, name, value)
91103 - __swig_getmethods__ = {}
91104 - __getattr__ = lambda self, name: _swig_getattr(self, VMask, name)
91105 - __repr__ = _swig_repr
91106 - def __init__(self, *args):
91107 - this = vmaskmodule.new_VMask(*args)
91108 - try: self.this.append(this)
91109 - except: self.this = this
91110 - def __assign__(self, *args): return vmaskmodule.VMask___assign__(self, *args)
91111 - __swig_destroy__ = vmaskmodule.delete_VMask
91112 - __del__ = lambda self : None;
91113 - def xsize(self): return vmaskmodule.VMask_xsize(self)
91114 - def ysize(self): return vmaskmodule.VMask_ysize(self)
91115 - def size(self): return vmaskmodule.VMask_size(self)
91116 - def filename(self): return vmaskmodule.VMask_filename(self)
91117 - def type(self): return vmaskmodule.VMask_type(self)
91118 - def mask(self): return vmaskmodule.VMask_mask(self)
91119 - def ostream_print(self, *args): return vmaskmodule.VMask_ostream_print(self, *args)
91120 -VMask_swigregister = vmaskmodule.VMask_swigregister
91121 -VMask_swigregister(VMask)
91122 -
91123 -
91124 -def __lshift__(*args):
91125 - return vmaskmodule.__lshift__(*args)
91126 -__lshift__ = vmaskmodule.__lshift__
91127 -class VIMask(VMask):
91128 - __swig_setmethods__ = {}
91129 - for _s in [VMask]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
91130 - __setattr__ = lambda self, name, value: _swig_setattr(self, VIMask, name, value)
91131 - __swig_getmethods__ = {}
91132 - for _s in [VMask]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
91133 - __getattr__ = lambda self, name: _swig_getattr(self, VIMask, name)
91134 - __repr__ = _swig_repr
91135 - def __init__(self, *args):
91136 - this = vmaskmodule.new_VIMask(*args)
91137 - try: self.this.append(this)
91138 - except: self.this = this
91139 - def scale(self): return vmaskmodule.VIMask_scale(self)
91140 - def offset(self): return vmaskmodule.VIMask_offset(self)
91141 - def embed(self, *args): return vmaskmodule.VIMask_embed(self, *args)
91142 - def __index__(self, *args): return vmaskmodule.VIMask___index__(self, *args)
91143 - def __call__(self, *args): return vmaskmodule.VIMask___call__(self, *args)
91144 - def get(self, *args): return vmaskmodule.VIMask_get(self, *args)
91145 - __swig_getmethods__["gauss"] = lambda x: vmaskmodule.VIMask_gauss
91146 - if _newclass:gauss = staticmethod(vmaskmodule.VIMask_gauss)
91147 - __swig_getmethods__["gauss_sep"] = lambda x: vmaskmodule.VIMask_gauss_sep
91148 - if _newclass:gauss_sep = staticmethod(vmaskmodule.VIMask_gauss_sep)
91149 - __swig_getmethods__["log"] = lambda x: vmaskmodule.VIMask_log
91150 - if _newclass:log = staticmethod(vmaskmodule.VIMask_log)
91151 - def rotate45(self): return vmaskmodule.VIMask_rotate45(self)
91152 - def rotate90(self): return vmaskmodule.VIMask_rotate90(self)
91153 - def trn(self): return vmaskmodule.VIMask_trn(self)
91154 - def inv(self): return vmaskmodule.VIMask_inv(self)
91155 - def cat(self, *args): return vmaskmodule.VIMask_cat(self, *args)
91156 - def mul(self, *args): return vmaskmodule.VIMask_mul(self, *args)
91157 - __swig_destroy__ = vmaskmodule.delete_VIMask
91158 - __del__ = lambda self : None;
91159 -VIMask_swigregister = vmaskmodule.VIMask_swigregister
91160 -VIMask_swigregister(VIMask)
91161 -
91162 -def VIMask_gauss(*args):
91163 - return vmaskmodule.VIMask_gauss(*args)
91164 -VIMask_gauss = vmaskmodule.VIMask_gauss
91165 -
91166 -def VIMask_gauss_sep(*args):
91167 - return vmaskmodule.VIMask_gauss_sep(*args)
91168 -VIMask_gauss_sep = vmaskmodule.VIMask_gauss_sep
91169 -
91170 -def VIMask_log(*args):
91171 - return vmaskmodule.VIMask_log(*args)
91172 -VIMask_log = vmaskmodule.VIMask_log
91173 -
91174 -class VDMask(VMask):
91175 - __swig_setmethods__ = {}
91176 - for _s in [VMask]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
91177 - __setattr__ = lambda self, name, value: _swig_setattr(self, VDMask, name, value)
91178 - __swig_getmethods__ = {}
91179 - for _s in [VMask]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
91180 - __getattr__ = lambda self, name: _swig_getattr(self, VDMask, name)
91181 - __repr__ = _swig_repr
91182 - def __init__(self, *args):
91183 - this = vmaskmodule.new_VDMask(*args)
91184 - try: self.this.append(this)
91185 - except: self.this = this
91186 - def embed(self, *args): return vmaskmodule.VDMask_embed(self, *args)
91187 - def scale(self): return vmaskmodule.VDMask_scale(self)
91188 - def offset(self): return vmaskmodule.VDMask_offset(self)
91189 - def __index__(self, *args): return vmaskmodule.VDMask___index__(self, *args)
91190 - def __call__(self, *args): return vmaskmodule.VDMask___call__(self, *args)
91191 - def get(self, *args): return vmaskmodule.VDMask_get(self, *args)
91192 - __swig_getmethods__["gauss"] = lambda x: vmaskmodule.VDMask_gauss
91193 - if _newclass:gauss = staticmethod(vmaskmodule.VDMask_gauss)
91194 - __swig_getmethods__["log"] = lambda x: vmaskmodule.VDMask_log
91195 - if _newclass:log = staticmethod(vmaskmodule.VDMask_log)
91196 - def rotate45(self): return vmaskmodule.VDMask_rotate45(self)
91197 - def rotate90(self): return vmaskmodule.VDMask_rotate90(self)
91198 - def scalei(self): return vmaskmodule.VDMask_scalei(self)
91199 - def trn(self): return vmaskmodule.VDMask_trn(self)
91200 - def inv(self): return vmaskmodule.VDMask_inv(self)
91201 - def cat(self, *args): return vmaskmodule.VDMask_cat(self, *args)
91202 - def mul(self, *args): return vmaskmodule.VDMask_mul(self, *args)
91203 - __swig_destroy__ = vmaskmodule.delete_VDMask
91204 - __del__ = lambda self : None;
91205 -VDMask_swigregister = vmaskmodule.VDMask_swigregister
91206 -VDMask_swigregister(VDMask)
91207 -
91208 -def VDMask_gauss(*args):
91209 - return vmaskmodule.VDMask_gauss(*args)
91210 -VDMask_gauss = vmaskmodule.VDMask_gauss
91211 -
91212 -def VDMask_log(*args):
91213 - return vmaskmodule.VDMask_log(*args)
91214 -VDMask_log = vmaskmodule.VDMask_log
91215 -
91216 -# This file is compatible with both classic and new-style classes.
91217 -
91218 -
91219 diff -u --recursive --new-file vips-7.38.5-vanilla/vips.pc.in vips-7.38.5/vips.pc.in
91220 --- vips-7.38.5-vanilla/vips.pc.in 2014-07-17 23:48:36.236794473 -0400
91221 +++ vips-7.38.5/vips.pc.in 2014-07-17 23:48:52.069794148 -0400
91222 @@ -7,5 +7,5 @@
91223 Description: Image processing library
91224 Version: @VERSION@
91225 Requires: @PACKAGES_USED@
91226 -Libs: -L${libdir} -lvips @VIPS_LIBS@ @VIPS_CXX_LIBS@
91227 +Libs: -L${libdir} -lvips @VIPS_LIBS@
91228 Cflags: -I${includedir}