Blame man/fax2tiff.1

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