1
0
mirror of synced 2026-01-14 07:40:48 +00:00

added input and output attribute structures as arguments to process_page().

This commit is contained in:
Eric Smith 2001-12-31 08:25:04 +00:00
parent 4daad7a7e1
commit 77e703ecbe
4 changed files with 40 additions and 20 deletions

6
t2p.c
View File

@ -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 <eric@brouhaha.com>
*
* 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

24
t2p.h
View File

@ -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);

View File

@ -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 <eric@brouhaha.com>
*
* 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

View File

@ -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);