xref: /libtiff-4.0.7/html/man/tiffcp.1.html (revision fd935fb2)
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>TIFFCP</title>
6</head>
7<body>
8
9<h1 align=center>TIFFCP</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="#EXAMPLES">EXAMPLES</a><br>
15<a href="#SEE ALSO">SEE ALSO</a><br>
16
17<hr>
18<!-- Creator     : groff version 1.18 -->
19<!-- CreationDate: Mon Oct  7 17:36:39 2002 -->
20<a name="NAME"></a>
21<h2>NAME</h2>
22<!-- INDENTATION -->
23<p><table width="100%" border=0 rules="none" frame="void"
24       cols="2" cellspacing="0" cellpadding="0">
25<tr valign="top" align="left">
26<td width="8%"></td>
27<td width="91%">
28<p>tiffcp &minus; copy (and possibly convert) a
29<small>TIFF</small> file</p>
30</td>
31</table></p>
32<a name="SYNOPSIS"></a>
33<h2>SYNOPSIS</h2>
34<!-- INDENTATION -->
35<p><table width="100%" border=0 rules="none" frame="void"
36       cols="2" cellspacing="0" cellpadding="0">
37<tr valign="top" align="left">
38<td width="8%"></td>
39<td width="91%">
40<p><b>tiffcp</b> [ <i>options</i> ] <i>src1.tif ... srcN.tif
41dst.tif</i></p>
42</td>
43</table></p>
44<a name="DESCRIPTION"></a>
45<h2>DESCRIPTION</h2>
46<!-- INDENTATION -->
47<p><table width="100%" border=0 rules="none" frame="void"
48       cols="2" cellspacing="0" cellpadding="0">
49<tr valign="top" align="left">
50<td width="8%"></td>
51<td width="91%">
52<p><i>tiffcp</i> combines one or more files created
53according to the Tag Image File Format, Revision 6.0 into a
54single <small>TIFF</small> file. Because the output file may
55be compressed using a different algorithm than the input
56files, <i>tiffcp</i> is most often used to convert between
57different compression schemes.</p>
58<!-- INDENTATION -->
59<p>By default, <i>tiffcp</i> will copy all the understood
60tags in a <small>TIFF</small> directory of an input file to
61the associated directory in the output file.</p>
62<!-- INDENTATION -->
63<p><i>tiffcp</i> can be used to reorganize the storage
64characteristics of data in a file, but it is explicitly
65intended to not alter or convert the image data content in
66any way.</p>
67</td>
68</table></p>
69<a name="OPTIONS"></a>
70<h2>OPTIONS</h2>
71<!-- INDENTATION -->
72<p><table width="100%" border=0 rules="none" frame="void"
73       cols="2" cellspacing="0" cellpadding="0">
74<tr valign="top" align="left">
75<td width="8%"></td>
76<td width="91%">
77<p><b>&minus;b image</b></p></td>
78</table></p>
79<!-- INDENTATION -->
80<table width="100%" border=0 rules="none" frame="void"
81       cols="2" cellspacing="0" cellpadding="0">
82<tr valign="top" align="left">
83<td width="19%"></td>
84<td width="80%">
85<p>subtract the following monochrome image from all others
86processed. This can be used to remove a noise bias from a
87set of images. This bias image is typlically an image of
88noise the camera saw with its shutter closed.</p>
89</td>
90</table>
91<!-- TABS -->
92<p><table width="100%" border=0 rules="none" frame="void"
93       cols="5" cellspacing="0" cellpadding="0">
94<tr valign="top" align="left">
95<td width="10%"></td>
96<td width="3%">
97
98<p><b>&minus;B</b></p>
99</td>
100<td width="5%"></td>
101<td width="80%">
102
103<p>Force output to be written with Big-Endian byte order.
104This option only has an effect when the output file is
105created or overwritten and not when it is appended to.</p>
106</td>
107<td width="0%">
108</td>
109<tr valign="top" align="left">
110<td width="10%"></td>
111<td width="3%">
112
113<p><b>&minus;C</b></p>
114</td>
115<td width="5%"></td>
116<td width="80%">
117
118<p>Suppress the use of &lsquo;&lsquo;strip
119chopping&rsquo;&rsquo; when reading images that have a
120single strip/tile of uncompressed data.</p>
121</td>
122<td width="0%">
123</td>
124<tr valign="top" align="left">
125<td width="10%"></td>
126<td width="3%">
127
128<p><b>&minus;c</b></p>
129</td>
130<td width="5%"></td>
131<td width="80%">
132
133<p>Specify the compression to use for data written to the
134output file: <b>none</b> for no compression, <b>packbits</b>
135for PackBits compression, <b>lzw</b> for Lempel-Ziv &amp;
136Welch compression, <b>jpeg</b> for baseline JPEG
137compression, <b>zip</b> for Deflate compression, <b>g3</b>
138for CCITT Group 3 (T.4) compression, and <b>g4</b> for CCITT
139Group 4 (T.6) compression. By default <i>tiffcp</i> will
140compress data according to the value of the
141<i>Compression</i> tag found in the source file.</p>
142</td>
143<td width="0%">
144</td>
145</table></p>
146<!-- INDENTATION -->
147<p><table width="100%" border=0 rules="none" frame="void"
148       cols="2" cellspacing="0" cellpadding="0">
149<tr valign="top" align="left">
150<td width="17%"></td>
151<td width="82%">
152<p>The <small>CCITT</small> Group 3 and Group 4 compression
153algorithms can only be used with bilevel data.</p>
154<!-- INDENTATION -->
155<p>Group 3 compression can be specified together with
156several T.4-specific options: <b>1d</b> for 1-dimensional
157encoding, <b>2d</b> for 2-dimensional encoding, and
158<b>fill</b> to force each encoded scanline to be zero-filled
159so that the terminating EOL code lies on a byte boundary.
160Group 3-specific options are specified by appending a
161&lsquo;&lsquo;:&rsquo;&rsquo;-separated list to the
162&lsquo;&lsquo;g3&rsquo;&rsquo; option; e.g. <b>&minus;c
163g3:2d:fill</b> to get 2D-encoded data with byte-aligned EOL
164codes.</p>
165<!-- INDENTATION -->
166<p><small>LZW</small> compression can be specified together
167with a <i>predictor</i> value. A predictor value of 2 causes
168each scanline of the output image to undergo horizontal
169differencing before it is encoded; a value of 1 forces each
170scanline to be encoded without differencing. LZW-specific
171options are specified by appending a
172&lsquo;&lsquo;:&rsquo;&rsquo;-separated list to the
173&lsquo;&lsquo;lzw&rsquo;&rsquo; option; e.g. <b>&minus;c
174lzw:2</b> for <small>LZW</small> compression with horizontal
175differencing.</p>
176</td>
177</table></p>
178<!-- TABS -->
179<p><table width="100%" border=0 rules="none" frame="void"
180       cols="5" cellspacing="0" cellpadding="0">
181<tr valign="top" align="left">
182<td width="10%"></td>
183<td width="3%">
184
185<p><b>&minus;f</b></p>
186</td>
187<td width="5%"></td>
188<td width="80%">
189
190<p>Specify the bit fill order to use in writing output
191data. By default, <i>tiffcp</i> will create a new file with
192the same fill order as the original. Specifying <b>&minus;f
193lsb2msb</b> will force data to be written with the FillOrder
194tag set to <small>LSB2MSB,</small> while <b>&minus;f
195msb2lsb</b> will force data to be written with the FillOrder
196tag set to <small>MSB2LSB.</small></p>
197</td>
198<td width="0%">
199</td>
200<tr valign="top" align="left">
201<td width="10%"></td>
202<td width="3%">
203
204<p><b>&minus;l</b></p>
205</td>
206<td width="5%"></td>
207<td width="80%">
208
209<p>Specify the length of a tile (in pixels). <i>tiffcp</i>
210attempts to set the tile dimensions so that no more than 8
211kilobytes of data appear in a tile.</p>
212</td>
213<td width="0%">
214</td>
215<tr valign="top" align="left">
216<td width="10%"></td>
217<td width="3%">
218
219<p><b>&minus;L</b></p>
220</td>
221<td width="5%"></td>
222<td width="80%">
223
224<p>Force output to be written with Little-Endian byte
225order. This option only has an effect when the output file
226is created or overwritten and not when it is appended
227to.</p>
228</td>
229<td width="0%">
230</td>
231<tr valign="top" align="left">
232<td width="10%"></td>
233<td width="3%">
234
235<p><b>&minus;M</b></p>
236</td>
237<td width="5%"></td>
238<td width="80%">
239
240<p>Suppress the use of memory-mapped files when reading
241images.</p>
242</td>
243<td width="0%">
244</td>
245<tr valign="top" align="left">
246<td width="10%"></td>
247<td width="3%">
248
249<p><b>&minus;p</b></p>
250</td>
251<td width="5%"></td>
252<td width="80%">
253
254<p>Specify the planar configuration to use in writing image
255data that has one 8-bit sample per pixel. By default,
256<i>tiffcp</i> will create a new file with the same planar
257configuration as the original. Specifying <b>&minus;p
258contig</b> will force data to be written with multi-sample
259data packed together, while <b>&minus;p separate</b> will
260force samples to be written in separate planes.</p>
261</td>
262<td width="0%">
263</td>
264<tr valign="top" align="left">
265<td width="10%"></td>
266<td width="3%">
267
268<p><b>&minus;r</b></p>
269</td>
270<td width="5%"></td>
271<td width="80%">
272
273<p>Specify the number of rows (scanlines) in each strip of
274data written to the output file. By default, <i>tiffcp</i>
275attempts to set the rows/strip that no more than 8 kilobytes
276of data appear in a strip.</p>
277</td>
278<td width="0%">
279</td>
280<tr valign="top" align="left">
281<td width="10%"></td>
282<td width="3%">
283
284<p><b>&minus;s</b></p>
285</td>
286<td width="5%"></td>
287<td width="80%">
288
289<p>Force the output file to be written with data organized
290in strips (rather than tiles).</p>
291</td>
292<td width="0%">
293</td>
294<tr valign="top" align="left">
295<td width="10%"></td>
296<td width="3%">
297
298<p><b>&minus;t</b></p>
299</td>
300<td width="5%"></td>
301<td width="80%">
302
303<p>Force the output file to be written wtih data organized
304in tiles (rather than strips). options can be used to force
305the resultant image to be written as strips or tiles of
306data, respectively.</p>
307</td>
308<td width="0%">
309</td>
310<tr valign="top" align="left">
311<td width="10%"></td>
312<td width="3%">
313
314<p><b>&minus;w</b></p>
315</td>
316<td width="5%"></td>
317<td width="80%">
318
319<p>Specify the width of a tile (in pixels). <i>tiffcp</i>
320attempts to set the tile dimensions so that no more than 8
321kilobytes of data appear in a tile. <i>tiffcp</i> attempts
322to set the tile dimensions so that no more than 8 kilobytes
323of data appear in a tile.</p>
324</td>
325<td width="0%">
326</td>
327</table></p>
328<!-- INDENTATION -->
329<p><table width="100%" border=0 rules="none" frame="void"
330       cols="2" cellspacing="0" cellpadding="0">
331<tr valign="top" align="left">
332<td width="8%"></td>
333<td width="91%">
334<p><b>&minus;,={character}</b></p></td>
335</table></p>
336<!-- INDENTATION -->
337<table width="100%" border=0 rules="none" frame="void"
338       cols="2" cellspacing="0" cellpadding="0">
339<tr valign="top" align="left">
340<td width="19%"></td>
341<td width="80%">
342<p>substitute {character} for &rsquo;,&rsquo; in parsing
343image directory indices in files. This is necessary if
344filenames contain commas. Note that &rsquo;,=&rsquo; with
345whitespace immediately following will disable the special
346meaning of the &rsquo;,&rsquo; entirely. See examples.</p>
347</td>
348</table>
349<a name="EXAMPLES"></a>
350<h2>EXAMPLES</h2>
351<!-- INDENTATION -->
352<p><table width="100%" border=0 rules="none" frame="void"
353       cols="2" cellspacing="0" cellpadding="0">
354<tr valign="top" align="left">
355<td width="8%"></td>
356<td width="91%">
357<p>The following concatenates two files and writes the
358result using <small>LZW</small> encoding:</p></td>
359</table></p>
360<!-- INDENTATION -->
361<table width="100%" border=0 rules="none" frame="void"
362       cols="2" cellspacing="0" cellpadding="0">
363<tr valign="top" align="left">
364<td width="17%"></td>
365<td width="82%">
366<pre>tiffcp -c lzw a.tif b.tif result.tif
367</pre>
368</td>
369</table>
370<!-- INDENTATION -->
371
372<p><table width="100%" border=0 rules="none" frame="void"
373       cols="2" cellspacing="0" cellpadding="0">
374<tr valign="top" align="left">
375<td width="8%"></td>
376<td width="91%">
377<p>To convert a G3 1d-encoded <small>TIFF</small> to a
378single strip of G4-encoded data the following might be
379used:</p></td>
380</table></p>
381<!-- INDENTATION -->
382<table width="100%" border=0 rules="none" frame="void"
383       cols="2" cellspacing="0" cellpadding="0">
384<tr valign="top" align="left">
385<td width="17%"></td>
386<td width="82%">
387<pre>tiffcp -c g4 -r 10000 g3.tif g4.tif
388</pre>
389</td>
390</table>
391<!-- INDENTATION -->
392
393<table width="100%" border=0 rules="none" frame="void"
394       cols="2" cellspacing="0" cellpadding="0">
395<tr valign="top" align="left">
396<td width="8%"></td>
397<td width="91%">
398<p>(1000 is just a number that is larger than the number of
399rows in the source file.)</p>
400<!-- INDENTATION -->
401<p>To extract a selected set of images from a multi-image
402TIFF file, the file name may be immediately followed by a
403&rsquo;,&rsquo; separated list of image directory indices.
404The first image is always in directory 0. Thus, to copy the
4051st and 3rd images of image file &quot;album.tif&quot; to
406&quot;result.tif&quot;:</p></td>
407</table>
408<!-- INDENTATION -->
409<table width="100%" border=0 rules="none" frame="void"
410       cols="2" cellspacing="0" cellpadding="0">
411<tr valign="top" align="left">
412<td width="17%"></td>
413<td width="82%">
414<pre>tiffcp album.tif,0,2 result.tif
415</pre>
416</td>
417</table>
418<!-- INDENTATION -->
419
420<p><table width="100%" border=0 rules="none" frame="void"
421       cols="2" cellspacing="0" cellpadding="0">
422<tr valign="top" align="left">
423<td width="8%"></td>
424<td width="91%">
425<p>Given file &quot;CCD.tif&quot; whose first image is a
426noise bias followed by images which include that bias,
427subtract the noise from all those images following it (while
428decompressing) with the command:</p></td>
429</table></p>
430<!-- INDENTATION -->
431<table width="100%" border=0 rules="none" frame="void"
432       cols="2" cellspacing="0" cellpadding="0">
433<tr valign="top" align="left">
434<td width="17%"></td>
435<td width="82%">
436<pre>tiffcp -c none -b CCD.tif CCD.tif,1, result.tif
437</pre>
438</td>
439</table>
440<!-- INDENTATION -->
441
442<p><table width="100%" border=0 rules="none" frame="void"
443       cols="2" cellspacing="0" cellpadding="0">
444<tr valign="top" align="left">
445<td width="8%"></td>
446<td width="91%">
447<p>If the file above were named &quot;CCD,X.tif&quot;, the
448&quot;-,=&quot; option would be required to correctly parse
449this filename with image numbers, as follows:</p></td>
450</table></p>
451<!-- INDENTATION -->
452<table width="100%" border=0 rules="none" frame="void"
453       cols="2" cellspacing="0" cellpadding="0">
454<tr valign="top" align="left">
455<td width="17%"></td>
456<td width="82%">
457<pre>tiffcp -c none -,=% -b CCD,X.tif CCD,X%1%.tif result.tif
458
459</pre>
460</td>
461</table>
462<a name="SEE ALSO"></a>
463<h2>SEE ALSO</h2>
464<!-- INDENTATION -->
465
466<table width="100%" border=0 rules="none" frame="void"
467       cols="2" cellspacing="0" cellpadding="0">
468<tr valign="top" align="left">
469<td width="8%"></td>
470<td width="91%">
471<p><i>pal2rgb</i>(1), <i>tiffinfo</i>(1), <i>tiffcmp</i>(1),
472<i>tiffmedian</i>(1), <i>tiffsplit</i>(1),
473<i>libtiff</i>(3)</p>
474</td>
475</table>
476<hr>
477</body>
478</html>
479