Mon, 14 Dec 2009 16:18:21 +0000
remove erroneous 0.33-philpem1 tag
1 /*
2 * tumble: build a PDF file from image files
3 *
4 * $Id: tumble_input.h,v 1.3 2003/04/10 00:47:30 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 uint16_t tiff_photometric_tag;
31 } image_info_t;
34 typedef struct
35 {
36 bool (*match_suffix) (char *suffix);
37 bool (*open_input_file) (FILE *f, char *name);
38 bool (*close_input_file) (void);
39 bool (*last_input_page) (void);
40 bool (*get_image_info) (int image,
41 input_attributes_t input_attributes,
42 image_info_t *image_info);
43 bool (*process_image) (int image,
44 input_attributes_t input_attributes,
45 image_info_t *image_info,
46 pdf_page_handle page);
47 } input_handler_t;
50 void install_input_handler (input_handler_t *handler);
53 bool match_input_suffix (char *suffix);
54 bool open_input_file (char *name);
55 bool close_input_file (void);
56 bool last_input_page (void);
57 bool get_image_info (int image,
58 input_attributes_t input_attributes,
59 image_info_t *image_info);
60 bool process_image (int image,
61 input_attributes_t input_attributes,
62 image_info_t *image_info,
63 pdf_page_handle page);
66 void init_tiff_handler (void);
67 void init_jpeg_handler (void);
68 void init_pbm_handler (void);
69 void init_png_handler (void);
70 void init_jp2_handler (void);