]> git.saurik.com Git - wxWidgets.git/blob - src/tiff/man/fax2tiff.1
wxRTC: extracted XML utilities into a separate class for potential reuse.
[wxWidgets.git] / src / tiff / man / fax2tiff.1
1 .\"
2 .\" Copyright (c) 1990-1997 Sam Leffler
3 .\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
4 .\"
5 .\" Permission to use, copy, modify, distribute, and sell this software and
6 .\" its documentation for any purpose is hereby granted without fee, provided
7 .\" that (i) the above copyright notices and this permission notice appear in
8 .\" all copies of the software and related documentation, and (ii) the names of
9 .\" Sam Leffler and Silicon Graphics may not be used in any advertising or
10 .\" publicity relating to the software without the specific, prior written
11 .\" permission of Sam Leffler and Silicon Graphics.
12 .\"
13 .\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
14 .\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
15 .\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
16 .\"
17 .\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
18 .\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
19 .\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
20 .\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
21 .\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
22 .\" OF THIS SOFTWARE.
23 .\"
24 .if n .po 0
25 .TH FAX2TIFF 1 "November 2, 2005" "libtiff"
26 .SH NAME
27 fax2tiff \- create a
28 .SM TIFF
29 Class F fax file from raw fax data
30 .SH SYNOPSIS
31 .B fax2tiff
32 [
33 .I options
34 ] [
35 .B \-o
36 .I output.tif
37 ]
38 .I input.raw
39 .SH DESCRIPTION
40 .I Fax2tiff
41 creates a
42 .SM TIFF
43 file containing
44 .SM CCITT
45 Group 3 or Group 4 encoded data from one or more files containing ``raw''
46 Group 3 or Group 4 encoded data (typically obtained directly from a fax modem).
47 By default, each row of data in the resultant
48 .SM TIFF
49 file is 1-dimensionally encoded and
50 padded or truncated to 1728 pixels, as needed.
51 The resultant image is a set of low resolution (98 lines/inch)
52 or medium resolution (196 lines/inch)
53 pages, each of which is a single strip of data.
54 The generated file conforms to the
55 .SM TIFF
56 Class F (\c
57 .SM FAX\c
58 ) specification for storing facsimile data.
59 This means, in particular, that each page of the data does
60 .B not
61 include the trailing
62 .I "return to control"
63 (\c
64 .SM RTC\c
65 ) code; as required
66 for transmission by the
67 .SM CCITT
68 Group 3 specifications.
69 The old, ``classic'', format is created if the
70 .B \-c
71 option is used.
72 (The Class F format can also be requested with the
73 .B \-f
74 option.)
75 .PP
76 The default name of the output image is
77 .IR fax.tif ;
78 this can be changed with the
79 .B \-o
80 option.
81 Each input file is assumed to be a separate page of facsimile data
82 from the same document.
83 The order in which input files are specified on the command
84 line is the order in which the resultant pages appear in the
85 output file.
86 .SH OPTIONS
87 Options that affect the interpretation of input data are:
88 .TP
89 .B \-3
90 Assume input data is
91 .SM CCITT
92 Group 3 encoded (default).
93 .TP
94 .B \-4
95 Assume input data is
96 .SM CCITT
97 Group 4 encoded.
98 .TP
99 .B \-U
100 Assume input data is uncompressed (Group 3 or Group 4).
101 .TP
102 .B \-1
103 Assume input data is encoded with the 1-dimensional version of the
104 .SM CCITT
105 Group 3 Huffman encoding algorithm (default).
106 .TP
107 .B \-2
108 Assume input data is 2-dimensional version of the
109 .SM CCITT
110 Group 3 Huffman encoding algorithm.
111 .TP
112 .B \-P
113 Assume input data is
114 .B not
115 EOL-aligned (default). This option has effect with Group 3 encoded input only.
116 .TP
117 .B \-A
118 Assume input data is EOL-aligned. This option has effect with Group 3
119 encoded input only.
120 .TP
121 .B \-M
122 Treat input data as having bits filled from most significant bit (\c
123 .SM MSB\c
124 ) to most least bit (\c
125 .SM LSB\c
126 ).
127 .TP
128 .B \-L
129 Treat input data as having bits filled from least significant bit (\c
130 .SM LSB\c
131 ) to most significant bit (\c
132 .SM MSB\c
133 ) (default).
134 .TP
135 .B \-B
136 Assume input data was encoded with black as 0 and white as 1.
137 .TP
138 .B \-W
139 Assume input data was encoded with black as 1 and white as 0 (default).
140 .TP
141 .B \-R
142 Specify the vertical resolution, in lines/inch, of the input images.
143 By default input are assumed to have a vertical resolution of 196 lines/inch.
144 If images are low resolution facsimile, a value of 98 lines/inch should
145 be specified.
146 .TP
147 .B \-X
148 Specify the width, in pixels, of the input images.
149 By default input are assumed to have a width of 1728 pixels.
150 .PP
151 Options that affect the output file format are:
152 .TP
153 .B \-o
154 Specify the name of the output file.
155 .TP
156 .B \-7
157 Force output to be compressed with the
158 .SM CCITT
159 Group 3 Huffman encoding algorithm (default).
160 .TP
161 .B \-8
162 Force output to be compressed with the
163 .SM CCITT
164 Group 4 Huffman encoding.
165 .TP
166 .B \-u
167 Force output to be uncompressed (Group 3 or Group 4).
168 .TP
169 .B \-5
170 Force output to be encoded with the 1-dimensional version of the
171 .SM CCITT
172 Group 3 Huffman encoding algorithm.
173 .TP
174 .B \-6
175 Force output to be encoded with the 2-dimensional version of the
176 .SM CCITT
177 Group 3 Huffman encoding algorithm (default).
178 .TP
179 .B \-a
180 Force the last bit of each
181 .I "End Of Line"
182 (\c
183 .SM EOL\c
184 ) code to land on a byte boundary (default). This ``zero padding'' will
185 be reflected in the contents of the
186 .I Group3Options
187 tag of the resultant
188 .SM TIFF
189 file. This option has effect with Group 3 encoded output only.
190 .TP
191 .B \-p
192 Do not EOL-align output. This option has effect with Group 3 encoded
193 output only.
194 .TP
195 .B \-c
196 Generate "classic" Group 3 TIFF format.
197 .TP
198 .B \-f
199 Generate TIFF Class F (TIFF/F) format (default).
200 .TP
201 .B \-m
202 Force output data to have bits filled from most significant bit (\c
203 .SM MSB\c
204 ) to most least bit (\c
205 .SM LSB\c
206 ).
207 .TP
208 .B \-l
209 Force output data to have bits filled from least significant bit (\c
210 .SM LSB\c
211 ) to most significant bit (\c
212 .SM MSB\c
213 ) (default).
214 .TP
215 .B \-r
216 Specify the number of rows (scanlines) in each strip of data
217 written to the output file.
218 By default (or when value
219 .B 0
220 is specified),
221 .I tiffcp
222 attempts to set the rows/strip
223 that no more than 8 kilobytes of data appear in a strip (with except of G3/G4
224 compression schemes). If you specify special value
225 .B \-1
226 it will results in infinite number of the rows per strip. The entire image
227 will be the one strip in that case. This is default in case of G3/G4 output
228 compression schemes.
229 .TP
230 .B \-s
231 Stretch the input image vertically by writing each input row of
232 data twice to the output file.
233 .TP
234 .B \-v
235 Force
236 .I fax2tiff
237 to print the number of rows of data it retrieved from the input file.
238 .TP
239 .B \-z
240 Force output to be compressed with the LZW encoding.
241 .SH DIAGNOSTICS
242 The following warnings and errors come from the decoding
243 routines in the library.
244 .PP
245 .BR "Warning, %s: Premature EOL at scanline %d (x %d).\en" .
246 The input data had a row that was shorter than the expected width.
247 The row is padded with white.
248 .PP
249 .BR "%s: Premature EOF at scanline %d (x %d).\en" .
250 The decoder ran out of data in the middle of a scanline.
251 The resultant row is padded with white.
252 .PP
253 .BR "%s: Bad code word at row %d, x %d\en" .
254 An invalid Group 3
255 .I code
256 was encountered while decoding the input file.
257 The row number and horizontal position is given.
258 The remainder of the input row is discarded, while
259 the corresponding output row is padded with white.
260 .PP
261 .BR "%s: Bad 2D code word at scanline %d.\en" .
262 An invalid Group 4 or 2D Group 3
263 .I code
264 was encountered while decoding the input file.
265 The row number and horizontal position is given.
266 The remainder of the input row is discarded, while
267 the corresponding output row is padded with white.
268 .SH BUGS
269 Input data are assumed to have a a ``top left'' orientation;
270 it should be possible to override this assumption
271 from the command line.
272 .SH "SEE ALSO"
273 .BR "\s-1CCITT\s+1 Recommendation T.4"
274 (Standardization of Group 3 Facsimile Apparatus for Document Transmission).
275 .PP
276 .BR "The Spirit of TIFF Class F",
277 an appendix to the TIFF 5.0 specification prepared by Cygnet Technologies.
278 .PP
279 .BR tiffinfo (1),
280 .BR tiffdither (1),
281 .BR tiffgt (1),
282 .BR libtiff (3)
283 .PP
284 Libtiff library home page:
285 .BR http://www.remotesensing.org/libtiff/