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