1.1 --- a/t2p.c Sun Aug 25 13:22:42 2002 +0000 1.2 +++ b/t2p.c Mon Aug 26 05:43:49 2002 +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.17 2002/08/25 05:22:42 eric Exp $ 1.8 + * $Id: t2p.c,v 1.18 2002/08/25 21:43:49 eric Exp $ 1.9 * Copyright 2001 Eric Smith <eric@brouhaha.com> 1.10 * 1.11 * This program is free software; you can redistribute it and/or modify 1.12 @@ -26,7 +26,10 @@ 1.13 #include <stdio.h> 1.14 #include <stdlib.h> 1.15 #include <unistd.h> 1.16 + 1.17 #include <tiffio.h> 1.18 +#define TIFF_REVERSE_BITS 1.19 + 1.20 #include <panda/functions.h> 1.21 #include <panda/constants.h> 1.22 1.23 @@ -377,6 +380,11 @@ 1.24 goto fail; 1.25 } 1.26 1.27 +#ifdef TIFF_REVERSE_BITS 1.28 + reverse_bits ((u8 *) bitmap->bits, 1.29 + image_length * bitmap->row_words * sizeof (word_type)); 1.30 +#endif /* TIFF_REVERSE_BITS */ 1.31 + 1.32 if (input_attributes.has_page_size) 1.33 bitmap = resize_bitmap (bitmap, 1.34 x_resolution, 1.35 @@ -415,6 +423,11 @@ 1.36 TIFFSetField (tiff_temp, TIFFTAG_COMPRESSION, COMPRESSION_CCITTFAX4); 1.37 TIFFSetField (tiff_temp, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISWHITE); 1.38 1.39 +#ifdef TIFF_REVERSE_BITS 1.40 + reverse_bits ((u8 *) bitmap->bits, 1.41 + image_length * bitmap->row_words * sizeof (word_type)); 1.42 +#endif /* TIFF_REVERSE_BITS */ 1.43 + 1.44 for (row = 0; row < rect_height (& bitmap->rect); row++) 1.45 if (1 != TIFFWriteScanline (tiff_temp, 1.46 bitmap->bits + row * bitmap->row_words,