tumble.c

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