1 /* -*- c -*- */
2 
3 /*
4  * zoom.h
5  *
6  * metapixel
7  *
8  * Copyright (C) 2004 Mark Probst
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23  */
24 
25 #ifndef __ZOOM_H__
26 #define __ZOOM_H__
27 
28 typedef float (*filter_func_t) (float);
29 
30 typedef struct
31 {
32     filter_func_t func;
33     float support_radius;
34 } filter_t;
35 
36 #define FILTER_BOX           0
37 #define FILTER_TRIANGLE      1
38 #define FILTER_MITCHELL      2
39 
40 filter_t* get_filter (int index);
41 
42 void zoom_image (unsigned char *dest, unsigned char *src,
43 		 filter_t *filter, int num_channels,
44 		 int dest_width, int dest_height, int dest_row_stride,
45 		 int src_width, int src_height, int src_row_stride);
46 
47 #endif
48