1 /* base class for all resample operations
2  */
3 
4 /*
5 
6     Copyright (C) 1991-2005 The National Gallery
7 
8     This library is free software; you can redistribute it and/or
9     modify it under the terms of the GNU Lesser General Public
10     License as published by the Free Software Foundation; either
11     version 2.1 of the License, or (at your option) any later version.
12 
13     This library is distributed in the hope that it will be useful,
14     but WITHOUT ANY WARRANTY; without even the implied warranty of
15     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16     Lesser General Public License for more details.
17 
18     You should have received a copy of the GNU Lesser General Public
19     License along with this library; if not, write to the Free Software
20     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21     02110-1301  USA
22 
23  */
24 
25 /*
26 
27     These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
28 
29  */
30 
31 #ifndef VIPS_PRESAMPLE_H
32 #define VIPS_PRESAMPLE_H
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif /*__cplusplus*/
37 
38 #define VIPS_TYPE_RESAMPLE (vips_resample_get_type())
39 #define VIPS_RESAMPLE( obj ) \
40 	(G_TYPE_CHECK_INSTANCE_CAST( (obj), \
41 		VIPS_TYPE_RESAMPLE, VipsResample ))
42 #define VIPS_RESAMPLE_CLASS( klass ) \
43 	(G_TYPE_CHECK_CLASS_CAST( (klass), \
44 		VIPS_TYPE_RESAMPLE, VipsResampleClass))
45 #define VIPS_IS_RESAMPLE( obj ) \
46 	(G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_RESAMPLE ))
47 #define VIPS_IS_RESAMPLE_CLASS( klass ) \
48 	(G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_RESAMPLE ))
49 #define VIPS_RESAMPLE_GET_CLASS( obj ) \
50 	(G_TYPE_INSTANCE_GET_CLASS( (obj), \
51 		VIPS_TYPE_RESAMPLE, VipsResampleClass ))
52 
53 typedef struct _VipsResample {
54 	VipsOperation parent_instance;
55 
56 	VipsImage *in;
57 	VipsImage *out;
58 
59 } VipsResample;
60 
61 typedef struct _VipsResampleClass {
62 	VipsOperationClass parent_class;
63 
64 } VipsResampleClass;
65 
66 GType vips_resample_get_type( void );
67 
68 /* The max size of the vector we use.
69  */
70 #define MAX_POINT (2000)
71 
72 int vips_reduce_get_points( VipsKernel kernel, double shrink );
73 void vips_reduce_make_mask( double *c,
74 	VipsKernel kernel, double shrink, double x );
75 
76 #ifdef __cplusplus
77 }
78 #endif /*__cplusplus*/
79 
80 #endif /*VIPS_PRESAMPLE_H*/
81 
82 
83