1.1 --- a/t2p.c Wed Mar 12 10:57:55 2003 +0000 1.2 +++ b/t2p.c Wed Mar 12 10:58:33 2003 +0000 1.3 @@ -4,7 +4,7 @@ 1.4 * will be compressed using ITU-T T.6 (G4) fax encoding. 1.5 * 1.6 * Main program 1.7 - * $Id: t2p.c,v 1.28 2003/03/10 05:08:25 eric Exp $ 1.8 + * $Id: t2p.c,v 1.29 2003/03/12 02:58:33 eric Exp $ 1.9 * Copyright 2001, 2002, 2003 Eric Smith <eric@brouhaha.com> 1.10 * 1.11 * This program is free software; you can redistribute it and/or modify 1.12 @@ -287,9 +287,9 @@ 1.13 } 1.14 1.15 1.16 -bool process_page (int image, /* range 1 .. n */ 1.17 - input_attributes_t input_attributes, 1.18 - bookmark_t *bookmarks) 1.19 +bool process_tiff_page (int image, /* range 1 .. n */ 1.20 + input_attributes_t input_attributes, 1.21 + bookmark_t *bookmarks) 1.22 { 1.23 int result = 0; 1.24 1.25 @@ -436,7 +436,7 @@ 1.26 1.27 #ifdef TIFF_REVERSE_BITS 1.28 reverse_bits ((uint8_t *) bitmap->bits, 1.29 - image_length * bitmap->row_words * sizeof (word_type)); 1.30 + image_length * bitmap->row_words * sizeof (word_t)); 1.31 #endif /* TIFF_REVERSE_BITS */ 1.32 1.33 #if 0 1.34 @@ -486,6 +486,43 @@ 1.35 } 1.36 1.37 1.38 +#if 0 1.39 +bool process_jpeg_page (int image, /* range 1 .. n */ 1.40 + input_attributes_t input_attributes, 1.41 + bookmark_t *bookmarks) 1.42 +{ 1.43 + int result = 0; 1.44 + FILE *f; 1.45 + pdf_page_handle page; 1.46 + 1.47 + f = fopen (filename, "rb"); 1.48 + if (! f) 1.49 + fatal ("error opening input file '%s'\n", filename); 1.50 + 1.51 + page = pdf_new_page (out->pdf, width_points, height_points); 1.52 + 1.53 + pdf_write_jpeg_image (page, 1.54 + 0, 0, /* x, y */ 1.55 + width_points, height_points, 1.56 + f); 1.57 + 1.58 + return (result); 1.59 +} 1.60 +#endif 1.61 + 1.62 + 1.63 +bool process_page (int image, /* range 1 .. n */ 1.64 + input_attributes_t input_attributes, 1.65 + bookmark_t *bookmarks) 1.66 +{ 1.67 + int result = 0; 1.68 + 1.69 + result = process_tiff_page (image, input_attributes, bookmarks); 1.70 + 1.71 + return (result); 1.72 +} 1.73 + 1.74 + 1.75 #define MAX_BOOKMARK_NAME_LEN 500 1.76 1.77