tumble_input.h

Sun, 21 Dec 2003 23:52:11 +0000

author
eric
date
Sun, 21 Dec 2003 23:52:11 +0000
changeset 164
b9e376e53fdd
parent 157
160d624271cc
child 166
301f6f17c364
permissions
-rw-r--r--

fix svn:keywords property

     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 } 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);
    67 void init_pbm_handler  (void);