From 77e703ecbecb75d52f628ff7643bb5f9f5a35ec6 Mon Sep 17 00:00:00 2001 From: Eric Smith Date: Mon, 31 Dec 2001 08:25:04 +0000 Subject: [PATCH] added input and output attribute structures as arguments to process_page(). --- t2p.c | 6 ++++-- t2p.h | 24 ++++++++++++++++-------- tumble.c | 6 ++++-- tumble.h | 24 ++++++++++++++++-------- 4 files changed, 40 insertions(+), 20 deletions(-) diff --git a/t2p.c b/t2p.c index 8b91c2d..10e8107 100644 --- a/t2p.c +++ b/t2p.c @@ -1,7 +1,7 @@ /* * tiffg4: reencode a bilevel TIFF file as a single-strip TIFF Class F Group 4 * Main program - * $Id: t2p.c,v 1.5 2001/12/30 09:09:08 eric Exp $ + * $Id: t2p.c,v 1.6 2001/12/31 00:25:04 eric Exp $ * Copyright 2001 Eric Smith * * This program is free software; you can redistribute it and/or modify @@ -80,7 +80,9 @@ boolean open_pdf_output_file (char *name) } -boolean process_page (int image) /* range 1 .. n */ +boolean process_page (int image, /* range 1 .. n */ + input_attributes_t input_attributes, + output_attributes_t output_attributes) { u32 image_length, image_width; #ifdef CHECK_DEPTH diff --git a/t2p.h b/t2p.h index f49fcaf..73dee9b 100644 --- a/t2p.h +++ b/t2p.h @@ -1,14 +1,22 @@ +typedef struct +{ + page_size_t size; + int rotation; + crop_t crop; +} input_attributes_t; + +typedef struct +{ + char *page_number; + bookmark_t *bookmarks; +} output_attributes_t; + boolean open_tiff_input_file (char *name); boolean close_tiff_input_file (void); boolean open_pdf_output_file (char *name); boolean close_pdf_output_file (void); -boolean process_page (int image); /* range 1 .. n */ - - - - - - - +boolean process_page (int image, /* range 1 .. n */ + input_attributes_t input_attributes, + output_attributes_t output_attributes); diff --git a/tumble.c b/tumble.c index d0c7332..d3fde4c 100644 --- a/tumble.c +++ b/tumble.c @@ -1,7 +1,7 @@ /* * tiffg4: reencode a bilevel TIFF file as a single-strip TIFF Class F Group 4 * Main program - * $Id: tumble.c,v 1.5 2001/12/30 09:09:08 eric Exp $ + * $Id: tumble.c,v 1.6 2001/12/31 00:25:04 eric Exp $ * Copyright 2001 Eric Smith * * This program is free software; you can redistribute it and/or modify @@ -80,7 +80,9 @@ boolean open_pdf_output_file (char *name) } -boolean process_page (int image) /* range 1 .. n */ +boolean process_page (int image, /* range 1 .. n */ + input_attributes_t input_attributes, + output_attributes_t output_attributes) { u32 image_length, image_width; #ifdef CHECK_DEPTH diff --git a/tumble.h b/tumble.h index f49fcaf..73dee9b 100644 --- a/tumble.h +++ b/tumble.h @@ -1,14 +1,22 @@ +typedef struct +{ + page_size_t size; + int rotation; + crop_t crop; +} input_attributes_t; + +typedef struct +{ + char *page_number; + bookmark_t *bookmarks; +} output_attributes_t; + boolean open_tiff_input_file (char *name); boolean close_tiff_input_file (void); boolean open_pdf_output_file (char *name); boolean close_pdf_output_file (void); -boolean process_page (int image); /* range 1 .. n */ - - - - - - - +boolean process_page (int image, /* range 1 .. n */ + input_attributes_t input_attributes, + output_attributes_t output_attributes);