xref: /libtiff-4.0.7/html/man/raw2tiff.1.html (revision b707d286)
1<html>
2<head>
3<meta name="generator" content="groff -Thtml, see www.gnu.org">
4<meta name="Content-Style" content="text/css">
5<title>RAW2TIFF</title>
6</head>
7<body>
8
9<h1 align=center>RAW2TIFF</h1>
10<a href="#NAME">NAME</a><br>
11<a href="#SYNOPSIS">SYNOPSIS</a><br>
12<a href="#DESCRIPTION">DESCRIPTION</a><br>
13<a href="#OPTIONS">OPTIONS</a><br>
14<a href="#GUESSING THE IMAGE GEOMETRY">GUESSING THE IMAGE GEOMETRY</a><br>
15<a href="#SEE ALSO">SEE ALSO</a><br>
16
17<hr>
18<!-- Creator     : groff version 1.17.2 -->
19<!-- CreationDate: Mon Dec 22 00:39:32 2003 -->
20<a name="NAME"></a>
21<h2>NAME</h2>
22<table width="100%" border=0 rules="none" frame="void"
23       cols="2" cellspacing="0" cellpadding="0">
24<tr valign="top" align="left">
25<td width="10%"></td><td width="90%">
26raw2tiff - create a <small>TIFF</small> file from a raw data</td></table>
27<a name="SYNOPSIS"></a>
28<h2>SYNOPSIS</h2>
29
30<table width="100%" border=0 rules="none" frame="void"
31       cols="2" cellspacing="0" cellpadding="0">
32<tr valign="top" align="left">
33<td width="10%"></td><td width="90%">
34<b>raw2tiff</b> [ <i>options</i> ] <i>input.raw
35output.tif</i></td></table>
36<a name="DESCRIPTION"></a>
37<h2>DESCRIPTION</h2>
38
39<table width="100%" border=0 rules="none" frame="void"
40       cols="2" cellspacing="0" cellpadding="0">
41<tr valign="top" align="left">
42<td width="10%"></td><td width="90%">
43<i>raw2tiff</i> converts a raw byte sequence into
44<small>TIFF.</small> By default, the <small>TIFF</small>
45image is created with data samples packed
46(<i>PlanarConfiguration</i>=1), compressed with the PackBits
47algorithm (<i>Compression</i>=<i>32773),</i> and with each
48strip no more than 8 kilobytes. These characteristics can
49overridden, or explicitly specified with the options
50described below.</td></table>
51<a name="OPTIONS"></a>
52<h2>OPTIONS</h2>
53
54<table width="100%" border=0 rules="none" frame="void"
55       cols="2" cellspacing="0" cellpadding="0">
56<tr valign="top" align="left">
57<td width="10%"></td><td width="90%">
58<b>-H &lt;number&gt;</b></td></table>
59
60<table width="100%" border=0 rules="none" frame="void"
61       cols="2" cellspacing="0" cellpadding="0">
62<tr valign="top" align="left">
63<td width="21%"></td><td width="79%">
64size of input image file header in bytes (0 by default).
65This amount of data just will be skipped from the start of
66file while reading.</td></table>
67
68<table width="100%" border=0 rules="none" frame="void"
69       cols="2" cellspacing="0" cellpadding="0">
70<tr valign="top" align="left">
71<td width="10%"></td><td width="90%">
72<b>-w &lt;number&gt;</b></td></table>
73
74<table width="100%" border=0 rules="none" frame="void"
75       cols="2" cellspacing="0" cellpadding="0">
76<tr valign="top" align="left">
77<td width="21%"></td><td width="79%">
78width of input image in pixels (can be guessed, see
79<b><small>GUESSING THE IMAGE GEOMETRY</small></b>
80below).</td></table>
81
82<table width="100%" border=0 rules="none" frame="void"
83       cols="2" cellspacing="0" cellpadding="0">
84<tr valign="top" align="left">
85<td width="10%"></td><td width="90%">
86<b>-l &lt;number&gt;</b></td></table>
87
88<table width="100%" border=0 rules="none" frame="void"
89       cols="2" cellspacing="0" cellpadding="0">
90<tr valign="top" align="left">
91<td width="21%"></td><td width="79%">
92length of input image in lines(can be guessed, see
93<b><small>GUESSING THE IMAGE GEOMETRY</small></b>
94below).</td></table>
95
96<table width="100%" border=0 rules="none" frame="void"
97       cols="2" cellspacing="0" cellpadding="0">
98<tr valign="top" align="left">
99<td width="10%"></td><td width="90%">
100<b>-b &lt;number&gt;</b></td></table>
101
102<table width="100%" border=0 rules="none" frame="void"
103       cols="2" cellspacing="0" cellpadding="0">
104<tr valign="top" align="left">
105<td width="21%"></td><td width="79%">
106number of bands in input image (1 by default).</td></table>
107
108<table width="100%" border=0 rules="none" frame="void"
109       cols="2" cellspacing="0" cellpadding="0">
110<tr valign="top" align="left">
111<td width="10%"></td><td width="90%">
112<b>-d data_type</b></td></table>
113
114<table width="100%" border=0 rules="none" frame="void"
115       cols="2" cellspacing="0" cellpadding="0">
116<tr valign="top" align="left">
117<td width="21%"></td><td width="79%">
118type of samples in input image, where <b>data_type</b> may
119be:<i><br>
120byte</i> 8-bit unsigned integer (default),<i><br>
121short</i> 16-bit unsigned integer,<i><br>
122long</i> 32-bit unsigned integer,<i><br>
123sbyte</i> 8-bit signed integer,<i><br>
124sshort</i> 16-bit signed integer,<i><br>
125slong</i> 32-bit signed integer,<i><br>
126float</i> 32-bit IEEE floating point,<i><br>
127double</i> 64-bit IEEE floating point,</td></table>
128
129<table width="100%" border=0 rules="none" frame="void"
130       cols="2" cellspacing="0" cellpadding="0">
131<tr valign="top" align="left">
132<td width="10%"></td><td width="90%">
133<b>-i config</b></td></table>
134
135<table width="100%" border=0 rules="none" frame="void"
136       cols="2" cellspacing="0" cellpadding="0">
137<tr valign="top" align="left">
138<td width="21%"></td><td width="79%">
139type of samples interleaving in input image, where
140<b>config</b> may be:<i><br>
141pixel</i> pixel interleaved data (default),<i><br>
142band</i> band interleaved data.</td></table>
143
144<table width="100%" border=0 rules="none" frame="void"
145       cols="2" cellspacing="0" cellpadding="0">
146<tr valign="top" align="left">
147<td width="10%"></td><td width="90%">
148<b>-p photo</b></td></table>
149
150<table width="100%" border=0 rules="none" frame="void"
151       cols="2" cellspacing="0" cellpadding="0">
152<tr valign="top" align="left">
153<td width="21%"></td><td width="79%">
154photometric interpretation (color space) of the input image,
155where <b>photo</b> may be:<i><br>
156miniswhite</i> white color represented with 0 value,<i><br>
157minisblack</i> black color represented with 0 value
158(default),<i><br>
159rgb</i> image has RGB color model,<i><br>
160cmyk</i> image has CMYK (separated) color model,<i><br>
161ycbcr</i> image has YCbCr color model,<i><br>
162cielab</i> image has CIE L*a*b color model,<i><br>
163icclab</i> image has ICC L*a*b color model,<i><br>
164itulab</i> image has ITU L*a*b color model,</td></table>
165
166<table width="100%" border=0 rules="none" frame="void"
167       cols="2" cellspacing="0" cellpadding="0">
168<tr valign="top" align="left">
169<td width="10%"></td><td width="90%">
170<b>-s</b></td></table>
171
172<table width="100%" border=0 rules="none" frame="void"
173       cols="2" cellspacing="0" cellpadding="0">
174<tr valign="top" align="left">
175<td width="21%"></td><td width="79%">
176swap bytes fetched from the input file.</td></table>
177
178<table width="100%" border=0 rules="none" frame="void"
179       cols="2" cellspacing="0" cellpadding="0">
180<tr valign="top" align="left">
181<td width="10%"></td><td width="90%">
182<b>-L</b></td></table>
183
184<table width="100%" border=0 rules="none" frame="void"
185       cols="2" cellspacing="0" cellpadding="0">
186<tr valign="top" align="left">
187<td width="21%"></td><td width="79%">
188input data has LSB2MSB bit order (default).</td></table>
189
190<table width="100%" border=0 rules="none" frame="void"
191       cols="2" cellspacing="0" cellpadding="0">
192<tr valign="top" align="left">
193<td width="10%"></td><td width="90%">
194<b>-M</b></td></table>
195
196<table width="100%" border=0 rules="none" frame="void"
197       cols="2" cellspacing="0" cellpadding="0">
198<tr valign="top" align="left">
199<td width="21%"></td><td width="79%">
200input data has MSB2LSB bit order.</td></table>
201
202<table width="100%" border=0 rules="none" frame="void"
203       cols="2" cellspacing="0" cellpadding="0">
204<tr valign="top" align="left">
205<td width="10%"></td><td width="90%">
206<b>-c</b></td></table>
207
208<table width="100%" border=0 rules="none" frame="void"
209       cols="2" cellspacing="0" cellpadding="0">
210<tr valign="top" align="left">
211<td width="21%"></td><td width="79%">
212Specify a compression scheme to use when writing image data:
213<b>-c none</b> for no compression, <b>-c packbits</b> for
214the PackBits compression algorithm (the default), <b>-c
215jpeg</b> for the baseline JPEG compression algorithm, <b>-c
216zip</b> for the Deflate compression algorithm, and <b>-c
217lzw</b> for Lempel-Ziv &amp; Welch.</td></table>
218
219<table width="100%" border=0 rules="none" frame="void"
220       cols="2" cellspacing="0" cellpadding="0">
221<tr valign="top" align="left">
222<td width="10%"></td><td width="90%">
223<b>-r &lt;number&gt;</b></td></table>
224
225<table width="100%" border=0 rules="none" frame="void"
226       cols="2" cellspacing="0" cellpadding="0">
227<tr valign="top" align="left">
228<td width="21%"></td><td width="79%">
229Write data with a specified number of rows per strip; by
230default the number of rows/strip is selected so that each
231strip is approximately 8 kilobytes.</td></table>
232<a name="GUESSING THE IMAGE GEOMETRY"></a>
233<h2>GUESSING THE IMAGE GEOMETRY</h2>
234
235<table width="100%" border=0 rules="none" frame="void"
236       cols="2" cellspacing="0" cellpadding="0">
237<tr valign="top" align="left">
238<td width="10%"></td><td width="90%">
239<i>raw2tiff</i> can guess image width and height in case one
240or both of these parameters are not specified. If you omit
241one of those parameters, the complementary one will be
242calculated based on the file size (taking into account
243header size, number of bands and data type). If you omit
244both parameters, the statistical approach will be used.
245Utility will compute correlation coefficient between two
246lines at the image center using several appropriate line
247sizes and the highest absolute value of the coefficient will
248indicate the right line size. That is why you should be
249cautious with the very large images, because guessing
250process may take a while (depending on your system
251perfomance). Of course, the utility can't guess the header
252size, number of bands and data type, so it should be
253specified manually. If you don't know anything about your
254image, just try with the several combinations of those
255options.</td></table>
256
257<table width="100%" border=0 rules="none" frame="void"
258       cols="2" cellspacing="0" cellpadding="0">
259<tr valign="top" align="left">
260<td width="10%"></td><td width="90%">
261There is no magic, it is just a mathematical statistics, so
262it can be wrong in some cases. But for most ordinary images
263guessing method will work fine.</td></table>
264<a name="SEE ALSO"></a>
265<h2>SEE ALSO</h2>
266
267<table width="100%" border=0 rules="none" frame="void"
268       cols="2" cellspacing="0" cellpadding="0">
269<tr valign="top" align="left">
270<td width="10%"></td><td width="90%">
271<i>pal2rgb</i>(1), <i>tiffinfo</i>(1), <i>tiffcp</i>(1),
272<i>tiffmedian</i>(1), <i>libtiff</i>(3)</td></table>
273<hr>
274</body>
275</html>
276