summaryrefslogtreecommitdiff
path: root/man/fax2tiff.1
blob: 65965c2883126684a579a9db0ba6a8d1574c7fcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
.\"	$Header: /usr/people/sam/tiff/man/RCS/fax2tiff.1,v 1.17 1995/10/11 19:41:58 sam Exp $
.\"
.\" Copyright (c) 1990-1995 Sam Leffler
.\" Copyright (c) 1991-1995 Silicon Graphics, Inc.
.\"
.\" Permission to use, copy, modify, distribute, and sell this software and 
.\" its documentation for any purpose is hereby granted without fee, provided
.\" that (i) the above copyright notices and this permission notice appear in
.\" all copies of the software and related documentation, and (ii) the names of
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
.\" publicity relating to the software without the specific, prior written
.\" permission of Sam Leffler and Silicon Graphics.
.\" 
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
.\" 
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
.\" OF THIS SOFTWARE.
.\"
.if n .po 0
.TH FAX2TIFF 1 "September 24, 1994"
.SH NAME
fax2tiff \- create a
.SM TIFF
Class F fax file from raw fax data
.SH SYNOPSIS
.B fax2tiff
[
.I options
] [
.B \-o
.I output.tif
]
.I input.g3
.SH DESCRIPTION
.I Fax2tiff
creates a
.SM TIFF
file containing 
.SM CCITT
Group 3 or Group 4 encoded data from one or more files containing ``raw''
Group 3 encoded data (typically obtained directly from a fax modem).
By default, each row of data in the resultant
.SM TIFF
file is 2-dimensionally encoded and
padded or truncated to 1728 pixels, as needed.
The resultant image is a set of low resolution (98 lines/inch)
or medium resolution (196 lines/inch)
pages, each of which is a single strip of data.
The generated file conforms to the
.SM TIFF
Class F (\c
.SM FAX\c
) specification for storing facsimile data.
This means, in particular, that each page of the data does
.B not
include the trailing 
.I "return to control"
(\c
.SM RTC\c
) code; as required
for transmission by the
.SM CCITT
Group 3 specifications.
The old, ``classic'', format is created if the
.B \-c
option is used.
(The Class F format can also be requested with the
.B \-f
option.)
.PP
The default name of the output image is
.IR fax.tif ;
this can be changed with the
.B \-o
option.
Each input file is assumed to be a separate page of facsimile data
from the same document.
The order in which input files are specified on the command
line is the order in which the resultant pages appear in the
output file.
.SH OPTIONS
Options that affect the interpretation of input data are:
.TP
.B \-2
Assume input data is 2-d Huffman encoded.
.TP
.B \-B
Assume input data was encoded with
black as 0 and white as 1.
.TP
.B \-L
Treat input data as having bits filled from least
significant bit (\c
.SM LSB\c
) to most significant bit (\c
.SM MSB\c
).
(This is the default.)
.TP
.B \-M
Treat input data as having bits filled from most
significant bit (\c
.SM MSB\c
) to most least bit (\c
.SM LSB\c
).
.TP
.B \-R
Specify the vertical resolution, in lines/inch, of the
input images.
By default input are assumed to have a vertical
resolution of 196 lines/inch.
If images are low resolution facsimile, a value of
98 lines/inch should be specified.
.TP
.B \-W
Assume input data was encoded with
black as 1 and white as 0.
(This is the default.)
.PP
Options that affect the output file format are:
.TP
.B \-1
Force output to be compressed with the 1-dimensional
version of the
.SM CCITT
Group 3 Huffman encoding algorithm.
.TP
.B \-4
Force output to be compressed with the
.SM CCITT
Group 4 Huffman encoding.
.TP
.B \-o
Specify the name of the output file.
.TP
.B \-p
Force the last bit of each
.I "End Of Line"
(\c
.SM EOL\c
) code to land on a byte boundary.
This ``zero padding'' will be reflected in the contents of the
.I Group3Options
tag of the resultant
.SM TIFF
file.
.TP
.B \-s
Stretch the input image vertically by writing each input row of
data twice to the output file.
.TP
.B \-v
Force
.I fax2tiff
to print the number of rows of data it retrieved from the input file.
.SH DIAGNOSTICS
The following warnings and errors come from the decoding
routines in the library.
.PP
.BR "Warning, %s: Premature EOL at scanline %d (x %d).\en" .
The input data had a row that was shorter than the expected value of 1728.
The row is padded with white.
.PP
.BR "%s: Premature EOF at scanline %d (x %d).\en" .
The decoder ran out of data in the middle of a scanline.
The resultant row is padded with white.
.PP
.BR "%s: Bad code word at row %d, x %d\en" .
An invalid Group 3 
.I code
was encountered while decoding the input file. 
The row number and horizontal position is given.
The remainder of the input row is discarded, while
the corresponding output row is padded with white.
.PP
.BR "%s: Bad 2D code word at scanline %d.\en" .
An invalid Group 4 or 2D Group 3
.I code
was encountered while decoding the input file. 
The row number and horizontal position is given.
The remainder of the input row is discarded, while
the corresponding output row is padded with white.
.SH BUGS
Should not have the constant width 1728 built into it.
Input data are assumed to have a a ``top left'' orientation;
it should be possible to override this assumption
from the command line.
.SH "SEE ALSO"
.I "\s-1CCITT\s+1 Recommendation T.4"
(Standardization of Group 3 Facsimile Apparatus for Document Transmission).
.PP
.IR "The Spirit of TIFF Class F" ,
an appendix to the TIFF 5.0 specification prepared by Cygnet Technologies.
.PP
.IR tiffinfo (1),
.IR tiffdither (1),
.IR tiffgt (1),
.IR libtiff (3).