|
roentgen |
b75cab |
.\" $Id: fax2tiff.1,v 1.7 2006-04-20 12:17:19 dron Exp $
|
|
roentgen |
b75cab |
.\"
|
|
roentgen |
b75cab |
.\" Copyright (c) 1990-1997 Sam Leffler
|
|
roentgen |
b75cab |
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
|
roentgen |
b75cab |
.\"
|
|
roentgen |
b75cab |
.\" Permission to use, copy, modify, distribute, and sell this software and
|
|
roentgen |
b75cab |
.\" its documentation for any purpose is hereby granted without fee, provided
|
|
roentgen |
b75cab |
.\" that (i) the above copyright notices and this permission notice appear in
|
|
roentgen |
b75cab |
.\" all copies of the software and related documentation, and (ii) the names of
|
|
roentgen |
b75cab |
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
|
|
roentgen |
b75cab |
.\" publicity relating to the software without the specific, prior written
|
|
roentgen |
b75cab |
.\" permission of Sam Leffler and Silicon Graphics.
|
|
roentgen |
b75cab |
.\"
|
|
roentgen |
b75cab |
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
|
roentgen |
b75cab |
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
|
roentgen |
b75cab |
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
|
roentgen |
b75cab |
.\"
|
|
roentgen |
b75cab |
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
|
roentgen |
b75cab |
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
|
roentgen |
b75cab |
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
roentgen |
b75cab |
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
|
roentgen |
b75cab |
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
|
roentgen |
b75cab |
.\" OF THIS SOFTWARE.
|
|
roentgen |
b75cab |
.\"
|
|
roentgen |
b75cab |
.if n .po 0
|
|
roentgen |
b75cab |
.TH FAX2TIFF 1 "November 2, 2005" "libtiff"
|
|
roentgen |
b75cab |
.SH NAME
|
|
roentgen |
b75cab |
fax2tiff \- create a
|
|
roentgen |
b75cab |
.SM TIFF
|
|
roentgen |
b75cab |
Class F fax file from raw fax data
|
|
roentgen |
b75cab |
.SH SYNOPSIS
|
|
roentgen |
b75cab |
.B fax2tiff
|
|
roentgen |
b75cab |
[
|
|
roentgen |
b75cab |
.I options
|
|
roentgen |
b75cab |
] [
|
|
roentgen |
b75cab |
.B \-o
|
|
roentgen |
b75cab |
.I output.tif
|
|
roentgen |
b75cab |
]
|
|
roentgen |
b75cab |
.I input.raw
|
|
roentgen |
b75cab |
.SH DESCRIPTION
|
|
roentgen |
b75cab |
.I Fax2tiff
|
|
roentgen |
b75cab |
creates a
|
|
roentgen |
b75cab |
.SM TIFF
|
|
roentgen |
b75cab |
file containing
|
|
roentgen |
b75cab |
.SM CCITT
|
|
roentgen |
b75cab |
Group 3 or Group 4 encoded data from one or more files containing ``raw''
|
|
roentgen |
b75cab |
Group 3 or Group 4 encoded data (typically obtained directly from a fax modem).
|
|
roentgen |
b75cab |
By default, each row of data in the resultant
|
|
roentgen |
b75cab |
.SM TIFF
|
|
roentgen |
b75cab |
file is 1-dimensionally encoded and
|
|
roentgen |
b75cab |
padded or truncated to 1728 pixels, as needed.
|
|
roentgen |
b75cab |
The resultant image is a set of low resolution (98 lines/inch)
|
|
roentgen |
b75cab |
or medium resolution (196 lines/inch)
|
|
roentgen |
b75cab |
pages, each of which is a single strip of data.
|
|
roentgen |
b75cab |
The generated file conforms to the
|
|
roentgen |
b75cab |
.SM TIFF
|
|
roentgen |
b75cab |
Class F (\c
|
|
roentgen |
b75cab |
.SM FAX\c
|
|
roentgen |
b75cab |
) specification for storing facsimile data.
|
|
roentgen |
b75cab |
This means, in particular, that each page of the data does
|
|
roentgen |
b75cab |
.B not
|
|
roentgen |
b75cab |
include the trailing
|
|
roentgen |
b75cab |
.I "return to control"
|
|
roentgen |
b75cab |
(\c
|
|
roentgen |
b75cab |
.SM RTC\c
|
|
roentgen |
b75cab |
) code; as required
|
|
roentgen |
b75cab |
for transmission by the
|
|
roentgen |
b75cab |
.SM CCITT
|
|
roentgen |
b75cab |
Group 3 specifications.
|
|
roentgen |
b75cab |
The old, ``classic'', format is created if the
|
|
roentgen |
b75cab |
.B \-c
|
|
roentgen |
b75cab |
option is used.
|
|
roentgen |
b75cab |
(The Class F format can also be requested with the
|
|
roentgen |
b75cab |
.B \-f
|
|
roentgen |
b75cab |
option.)
|
|
roentgen |
b75cab |
.PP
|
|
roentgen |
b75cab |
The default name of the output image is
|
|
roentgen |
b75cab |
.IR fax.tif ;
|
|
roentgen |
b75cab |
this can be changed with the
|
|
roentgen |
b75cab |
.B \-o
|
|
roentgen |
b75cab |
option.
|
|
roentgen |
b75cab |
Each input file is assumed to be a separate page of facsimile data
|
|
roentgen |
b75cab |
from the same document.
|
|
roentgen |
b75cab |
The order in which input files are specified on the command
|
|
roentgen |
b75cab |
line is the order in which the resultant pages appear in the
|
|
roentgen |
b75cab |
output file.
|
|
roentgen |
b75cab |
.SH OPTIONS
|
|
roentgen |
b75cab |
Options that affect the interpretation of input data are:
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-3
|
|
roentgen |
b75cab |
Assume input data is
|
|
roentgen |
b75cab |
.SM CCITT
|
|
roentgen |
b75cab |
Group 3 encoded (default).
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-4
|
|
roentgen |
b75cab |
Assume input data is
|
|
roentgen |
b75cab |
.SM CCITT
|
|
roentgen |
b75cab |
Group 4 encoded.
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-U
|
|
roentgen |
b75cab |
Assume input data is uncompressed (Group 3 or Group 4).
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-1
|
|
roentgen |
b75cab |
Assume input data is encoded with the 1-dimensional version of the
|
|
roentgen |
b75cab |
.SM CCITT
|
|
roentgen |
b75cab |
Group 3 Huffman encoding algorithm (default).
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-2
|
|
roentgen |
b75cab |
Assume input data is 2-dimensional version of the
|
|
roentgen |
b75cab |
.SM CCITT
|
|
roentgen |
b75cab |
Group 3 Huffman encoding algorithm.
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-P
|
|
roentgen |
b75cab |
Assume input data is
|
|
roentgen |
b75cab |
.B not
|
|
roentgen |
b75cab |
EOL-aligned (default). This option has effect with Group 3 encoded input only.
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-A
|
|
roentgen |
b75cab |
Assume input data is EOL-aligned. This option has effect with Group 3
|
|
roentgen |
b75cab |
encoded input only.
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-M
|
|
roentgen |
b75cab |
Treat input data as having bits filled from most significant bit (\c
|
|
roentgen |
b75cab |
.SM MSB\c
|
|
roentgen |
b75cab |
) to most least bit (\c
|
|
roentgen |
b75cab |
.SM LSB\c
|
|
roentgen |
b75cab |
).
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-L
|
|
roentgen |
b75cab |
Treat input data as having bits filled from least significant bit (\c
|
|
roentgen |
b75cab |
.SM LSB\c
|
|
roentgen |
b75cab |
) to most significant bit (\c
|
|
roentgen |
b75cab |
.SM MSB\c
|
|
roentgen |
b75cab |
) (default).
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-B
|
|
roentgen |
b75cab |
Assume input data was encoded with black as 0 and white as 1.
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-W
|
|
roentgen |
b75cab |
Assume input data was encoded with black as 1 and white as 0 (default).
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-R
|
|
roentgen |
b75cab |
Specify the vertical resolution, in lines/inch, of the input images.
|
|
roentgen |
b75cab |
By default input are assumed to have a vertical resolution of 196 lines/inch.
|
|
roentgen |
b75cab |
If images are low resolution facsimile, a value of 98 lines/inch should
|
|
roentgen |
b75cab |
be specified.
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-X
|
|
roentgen |
b75cab |
Specify the width, in pixels, of the input images.
|
|
roentgen |
b75cab |
By default input are assumed to have a width of 1728 pixels.
|
|
roentgen |
b75cab |
.PP
|
|
roentgen |
b75cab |
Options that affect the output file format are:
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-o
|
|
roentgen |
b75cab |
Specify the name of the output file.
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-7
|
|
roentgen |
b75cab |
Force output to be compressed with the
|
|
roentgen |
b75cab |
.SM CCITT
|
|
roentgen |
b75cab |
Group 3 Huffman encoding algorithm (default).
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-8
|
|
roentgen |
b75cab |
Force output to be compressed with the
|
|
roentgen |
b75cab |
.SM CCITT
|
|
roentgen |
b75cab |
Group 4 Huffman encoding.
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-u
|
|
roentgen |
b75cab |
Force output to be uncompressed (Group 3 or Group 4).
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-5
|
|
roentgen |
b75cab |
Force output to be encoded with the 1-dimensional version of the
|
|
roentgen |
b75cab |
.SM CCITT
|
|
roentgen |
b75cab |
Group 3 Huffman encoding algorithm.
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-6
|
|
roentgen |
b75cab |
Force output to be encoded with the 2-dimensional version of the
|
|
roentgen |
b75cab |
.SM CCITT
|
|
roentgen |
b75cab |
Group 3 Huffman encoding algorithm (default).
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-a
|
|
roentgen |
b75cab |
Force the last bit of each
|
|
roentgen |
b75cab |
.I "End Of Line"
|
|
roentgen |
b75cab |
(\c
|
|
roentgen |
b75cab |
.SM EOL\c
|
|
roentgen |
b75cab |
) code to land on a byte boundary (default). This ``zero padding'' will
|
|
roentgen |
b75cab |
be reflected in the contents of the
|
|
roentgen |
b75cab |
.I Group3Options
|
|
roentgen |
b75cab |
tag of the resultant
|
|
roentgen |
b75cab |
.SM TIFF
|
|
roentgen |
b75cab |
file. This option has effect with Group 3 encoded output only.
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-p
|
|
roentgen |
b75cab |
Do not EOL-align output. This option has effect with Group 3 encoded
|
|
roentgen |
b75cab |
output only.
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-c
|
|
roentgen |
b75cab |
Generate "classic" Group 3 TIFF format.
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-f
|
|
roentgen |
b75cab |
Generate TIFF Class F (TIFF/F) format (default).
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-m
|
|
roentgen |
b75cab |
Force output data to have bits filled from most significant bit (\c
|
|
roentgen |
b75cab |
.SM MSB\c
|
|
roentgen |
b75cab |
) to most least bit (\c
|
|
roentgen |
b75cab |
.SM LSB\c
|
|
roentgen |
b75cab |
).
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-l
|
|
roentgen |
b75cab |
Force output data to have bits filled from least significant bit (\c
|
|
roentgen |
b75cab |
.SM LSB\c
|
|
roentgen |
b75cab |
) to most significant bit (\c
|
|
roentgen |
b75cab |
.SM MSB\c
|
|
roentgen |
b75cab |
) (default).
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-r
|
|
roentgen |
b75cab |
Specify the number of rows (scanlines) in each strip of data
|
|
roentgen |
b75cab |
written to the output file.
|
|
roentgen |
b75cab |
By default (or when value
|
|
roentgen |
b75cab |
.B 0
|
|
roentgen |
b75cab |
is specified),
|
|
roentgen |
b75cab |
.I tiffcp
|
|
roentgen |
b75cab |
attempts to set the rows/strip
|
|
roentgen |
b75cab |
that no more than 8 kilobytes of data appear in a strip (with except of G3/G4
|
|
roentgen |
b75cab |
compression schemes). If you specify special value
|
|
roentgen |
b75cab |
.B \-1
|
|
roentgen |
b75cab |
it will results in infinite number of the rows per strip. The entire image
|
|
roentgen |
b75cab |
will be the one strip in that case. This is default in case of G3/G4 output
|
|
roentgen |
b75cab |
compression schemes.
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-s
|
|
roentgen |
b75cab |
Stretch the input image vertically by writing each input row of
|
|
roentgen |
b75cab |
data twice to the output file.
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-v
|
|
roentgen |
b75cab |
Force
|
|
roentgen |
b75cab |
.I fax2tiff
|
|
roentgen |
b75cab |
to print the number of rows of data it retrieved from the input file.
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-z
|
|
roentgen |
b75cab |
Force output to be compressed with the LZW encoding.
|
|
roentgen |
b75cab |
.SH DIAGNOSTICS
|
|
roentgen |
b75cab |
The following warnings and errors come from the decoding
|
|
roentgen |
b75cab |
routines in the library.
|
|
roentgen |
b75cab |
.PP
|
|
roentgen |
b75cab |
.BR "Warning, %s: Premature EOL at scanline %d (x %d).\en" .
|
|
roentgen |
b75cab |
The input data had a row that was shorter than the expected width.
|
|
roentgen |
b75cab |
The row is padded with white.
|
|
roentgen |
b75cab |
.PP
|
|
roentgen |
b75cab |
.BR "%s: Premature EOF at scanline %d (x %d).\en" .
|
|
roentgen |
b75cab |
The decoder ran out of data in the middle of a scanline.
|
|
roentgen |
b75cab |
The resultant row is padded with white.
|
|
roentgen |
b75cab |
.PP
|
|
roentgen |
b75cab |
.BR "%s: Bad code word at row %d, x %d\en" .
|
|
roentgen |
b75cab |
An invalid Group 3
|
|
roentgen |
b75cab |
.I code
|
|
roentgen |
b75cab |
was encountered while decoding the input file.
|
|
roentgen |
b75cab |
The row number and horizontal position is given.
|
|
roentgen |
b75cab |
The remainder of the input row is discarded, while
|
|
roentgen |
b75cab |
the corresponding output row is padded with white.
|
|
roentgen |
b75cab |
.PP
|
|
roentgen |
b75cab |
.BR "%s: Bad 2D code word at scanline %d.\en" .
|
|
roentgen |
b75cab |
An invalid Group 4 or 2D Group 3
|
|
roentgen |
b75cab |
.I code
|
|
roentgen |
b75cab |
was encountered while decoding the input file.
|
|
roentgen |
b75cab |
The row number and horizontal position is given.
|
|
roentgen |
b75cab |
The remainder of the input row is discarded, while
|
|
roentgen |
b75cab |
the corresponding output row is padded with white.
|
|
roentgen |
b75cab |
.SH BUGS
|
|
roentgen |
b75cab |
Input data are assumed to have a a ``top left'' orientation;
|
|
roentgen |
b75cab |
it should be possible to override this assumption
|
|
roentgen |
b75cab |
from the command line.
|
|
roentgen |
b75cab |
.SH "SEE ALSO"
|
|
roentgen |
b75cab |
.BR "\s-1CCITT\s+1 Recommendation T.4"
|
|
roentgen |
b75cab |
(Standardization of Group 3 Facsimile Apparatus for Document Transmission).
|
|
roentgen |
b75cab |
.PP
|
|
roentgen |
b75cab |
.BR "The Spirit of TIFF Class F",
|
|
roentgen |
b75cab |
an appendix to the TIFF 5.0 specification prepared by Cygnet Technologies.
|
|
roentgen |
b75cab |
.PP
|
|
roentgen |
b75cab |
.BR tiffinfo (1),
|
|
roentgen |
b75cab |
.BR tiffdither (1),
|
|
roentgen |
b75cab |
.BR tiffgt (1),
|
|
roentgen |
b75cab |
.BR libtiff (3)
|
|
roentgen |
b75cab |
.PP
|
|
roentgen |
b75cab |
Libtiff library home page:
|
|
roentgen |
b75cab |
.BR http://www.remotesensing.org/libtiff/
|