1.1 --- a/t2p.c Wed Jan 02 16:39:39 2002 +0000 1.2 +++ b/t2p.c Tue Jan 22 09:42:42 2002 +0000 1.3 @@ -5,7 +5,7 @@ 1.4 * encoding. 1.5 * 1.6 * Main program 1.7 - * $Id: t2p.c,v 1.14 2002/01/02 08:39:39 eric Exp $ 1.8 + * $Id: t2p.c,v 1.15 2002/01/22 01:42:42 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 @@ -200,7 +200,7 @@ 1.13 dest_min.x = 0; 1.14 dest_min.y = 0; 1.15 1.16 - dest = bitblt (src, & src_rect, NULL, & dest_min, TF_SRC); 1.17 + dest = bitblt (src, & src_rect, NULL, & dest_min, TF_SRC, 0); 1.18 free_bitmap (src); 1.19 return (dest); 1.20 } 1.21 @@ -244,8 +244,6 @@ 1.22 float x_resolution, y_resolution; 1.23 float dest_x_resolution, dest_y_resolution; 1.24 1.25 - int scanline_size; 1.26 - 1.27 int width_points, height_points; /* really 1/72 inch units rather than 1.28 points */ 1.29 1.30 @@ -358,8 +356,6 @@ 1.31 dest_y_resolution = y_resolution; 1.32 } 1.33 1.34 - scanline_size = TIFFScanlineSize (in); 1.35 - 1.36 rect.min.x = 0; 1.37 rect.min.y = 0; 1.38 rect.max.x = image_width; 1.39 @@ -373,22 +369,9 @@ 1.40 goto fail; 1.41 } 1.42 1.43 - if (bitmap->rowbytes != scanline_size) 1.44 - { 1.45 - printf ("image_width %d\n", image_width); 1.46 - printf ("rowbytes %d\n", bitmap->rowbytes); 1.47 - printf ("TIFFScanlineSize %d\n", scanline_size); 1.48 - } 1.49 - 1.50 for (row = 0; row < image_length; row++) 1.51 - TIFFReadScanline (in, 1.52 - bitmap->bits + row * bitmap->rowbytes, 1.53 - row, 1.54 - 0); 1.55 - 1.56 - for (row = 0; row < dest_image_length; row++) 1.57 if (1 != TIFFReadScanline (in, 1.58 - bitmap->bits + row * bitmap->rowbytes, 1.59 + bitmap->bits + row * bitmap->row_words, 1.60 row, 1.61 0)) 1.62 { 1.63 @@ -435,7 +418,7 @@ 1.64 1.65 for (row = 0; row < rect_height (& bitmap->rect); row++) 1.66 if (1 != TIFFWriteScanline (tiff_temp, 1.67 - bitmap->bits + row * bitmap->rowbytes, 1.68 + bitmap->bits + row * bitmap->row_words, 1.69 row, 1.70 0)) 1.71 {