1.1 diff -r 3fe049d83e22 -r 752599b50ff3 tumble_input.h 1.2 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.3 +++ b/tumble_input.h Thu Mar 20 06:54:08 2003 +0000 1.4 @@ -0,0 +1,64 @@ 1.5 +/* 1.6 + * tumble: build a PDF file from image files 1.7 + * 1.8 + * $Id: tumble_input.h,v 1.1 2003/03/19 22:54:08 eric Exp $ 1.9 + * Copyright 2003 Eric Smith <eric@brouhaha.com> 1.10 + * 1.11 + * This program is free software; you can redistribute it and/or modify 1.12 + * it under the terms of the GNU General Public License version 2 as 1.13 + * published by the Free Software Foundation. Note that permission is 1.14 + * not granted to redistribute this program under the terms of any 1.15 + * other version of the General Public License. 1.16 + * 1.17 + * This program is distributed in the hope that it will be useful, 1.18 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 1.19 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1.20 + * GNU General Public License for more details. 1.21 + * 1.22 + * You should have received a copy of the GNU General Public License 1.23 + * along with this program; if not, write to the Free Software 1.24 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA 1.25 + */ 1.26 + 1.27 + 1.28 +typedef struct 1.29 +{ 1.30 + bool color; 1.31 + uint32_t width_samples, height_samples; 1.32 + double width_points, height_points; 1.33 + double x_resolution, y_resolution; 1.34 +} image_info_t; 1.35 + 1.36 + 1.37 +typedef struct 1.38 +{ 1.39 + bool (*open_input_file) (FILE *f, char *name); 1.40 + bool (*close_input_file) (void); 1.41 + bool (*last_input_page) (void); 1.42 + bool (*get_image_info) (int image, 1.43 + input_attributes_t input_attributes, 1.44 + image_info_t *image_info); 1.45 + bool (*process_image) (int image, 1.46 + input_attributes_t input_attributes, 1.47 + image_info_t *image_info, 1.48 + pdf_page_handle page); 1.49 +} input_handler_t; 1.50 + 1.51 + 1.52 +void install_input_handler (input_handler_t *handler); 1.53 + 1.54 + 1.55 +bool open_input_file (char *name); 1.56 +bool close_input_file (void); 1.57 +bool last_input_page (void); 1.58 +bool get_image_info (int image, 1.59 + input_attributes_t input_attributes, 1.60 + image_info_t *image_info); 1.61 +bool process_image (int image, 1.62 + input_attributes_t input_attributes, 1.63 + image_info_t *image_info, 1.64 + pdf_page_handle page); 1.65 + 1.66 + 1.67 +void init_tiff_handler (void); 1.68 +void init_jpeg_handler (void);