t2p.c

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