Thu, 20 Mar 2003 15:26:16 +0000
*** empty log message ***
1 /*
2 * tumble: build a PDF file from image files
3 *
4 * $Id: tumble_input.h,v 1.2 2003/03/20 06:55:27 eric Exp $
5 * Copyright 2003 Eric Smith <eric@brouhaha.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation. Note that permission is
10 * not granted to redistribute this program under the terms of any
11 * other version of the General Public License.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
21 */
24 typedef struct
25 {
26 bool color;
27 uint32_t width_samples, height_samples;
28 double width_points, height_points;
29 double x_resolution, y_resolution;
30 } image_info_t;
33 typedef struct
34 {
35 bool (*match_suffix) (char *suffix);
36 bool (*open_input_file) (FILE *f, char *name);
37 bool (*close_input_file) (void);
38 bool (*last_input_page) (void);
39 bool (*get_image_info) (int image,
40 input_attributes_t input_attributes,
41 image_info_t *image_info);
42 bool (*process_image) (int image,
43 input_attributes_t input_attributes,
44 image_info_t *image_info,
45 pdf_page_handle page);
46 } input_handler_t;
49 void install_input_handler (input_handler_t *handler);
52 bool match_input_suffix (char *suffix);
53 bool open_input_file (char *name);
54 bool close_input_file (void);
55 bool last_input_page (void);
56 bool get_image_info (int image,
57 input_attributes_t input_attributes,
58 image_info_t *image_info);
59 bool process_image (int image,
60 input_attributes_t input_attributes,
61 image_info_t *image_info,
62 pdf_page_handle page);
65 void init_tiff_handler (void);
66 void init_jpeg_handler (void);