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