]> git.saurik.com Git - wxWidgets.git/blame - src/tiff/html/man/tiffcrop.1.html
Merged libtiff 4.0.3 changes into the trunk.
[wxWidgets.git] / src / tiff / html / man / tiffcrop.1.html
CommitLineData
80ed523f
VZ
1<!-- Creator : groff version 1.18.1 -->
2<!-- CreationDate: Sat Feb 24 18:37:20 2007 -->
3<html>
4<head>
5<meta name="generator" content="groff -Thtml, see www.gnu.org">
6<meta name="Content-Style" content="text/css">
7<title>TIFFCROP</title>
8</head>
9<body>
10
11<h1 align=center>TIFFCROP</h1>
12<a href="#NAME">NAME</a><br>
13<a href="#SYNOPSIS">SYNOPSIS</a><br>
14<a href="#DESCRIPTION">DESCRIPTION</a><br>
15<a href="#OPTIONS">OPTIONS</a><br>
16<a href="#EXAMPLES">EXAMPLES</a><br>
17<a href="#SEE ALSO">SEE ALSO</a><br>
18
19<hr>
20<a name="NAME"></a>
21<h2>NAME</h2>
22<!-- INDENTATION -->
23<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>tiffcrop &minus; copy (and possibly convert and crop or
29process) a <small>TIFF</small> file</p>
30</td>
31</table>
32<a name="SYNOPSIS"></a>
33<h2>SYNOPSIS</h2>
34<!-- INDENTATION -->
35<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>tiffcrop</b> [ <i>options</i> ] <i>src1.tif ...
41srcN.tif dst.tif</i></p>
42</td>
43</table>
44<a name="DESCRIPTION"></a>
45<h2>DESCRIPTION</h2>
46<!-- INDENTATION -->
47<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>tiffcrop</i> combines one or more files created
53according to the Tag Image File Format, Revision 6.0 into a
54single <small>TIFF</small> file. The output file may be
55compressed using a different algorithm than the input files.
56<i>tiffcrop</i> is most often used to extract portions of an
57image for processing with bar code recognizer or OCR
58software when that software cannot restrict the region of
59interest to a specific portion of the image or to improve
60efficiency when the regions of interest must be rotated.</p>
61<!-- INDENTATION -->
62<p>By default, <i>tiffcrop</i> will copy all the understood
63tags in a <small>TIFF</small> directory of an input file to
64the associated directory in the output file.</p>
65<!-- INDENTATION -->
66<p><i>tiffcrop</i> can be used to reorganize the storage
67characteristics of data in a file, and it will alter or
68convert the image data content as specified at the same
69time, unlike tiffcp.</p>
70<!-- INDENTATION -->
71<p><i>tiffcrop</i> will behave exactly like tiffcp if none
72of the new options are specified.</p>
73</td>
74</table>
75<a name="OPTIONS"></a>
76<h2>OPTIONS</h2>
77<!-- INDENTATION -->
78<table width="100%" border=0 rules="none" frame="void"
79 cols="2" cellspacing="0" cellpadding="0">
80<tr valign="top" align="left">
81<td width="8%"></td>
82<td width="91%">
83<p><b>&minus;N odd|even|#,#-#,#|last</b></p></td>
84</table>
85<!-- INDENTATION -->
86<table width="100%" border=0 rules="none" frame="void"
87 cols="2" cellspacing="0" cellpadding="0">
88<tr valign="top" align="left">
89<td width="19%"></td>
90<td width="80%">
91<p>sequences and ranges of images within file to process.
92The words <b>odd</b> or <b>even</b> may be used to specify
93all odd or even numbered images. The word <b>last</b> may be
94used in place of a number in the sequence to indicate the
95final image in the file without knowing how many images
96there are. Ranges of images may be specified with a dash and
97multiple sets can be indicated by joining them in a
98comma-separated list. e.g.. use <b>&minus;N 1,5-7,last</b>
99to process the 1st, 5th through 7th, and final image in the
100file.</p>
101</td>
102</table>
103<!-- INDENTATION -->
104<table width="100%" border=0 rules="none" frame="void"
105 cols="2" cellspacing="0" cellpadding="0">
106<tr valign="top" align="left">
107<td width="8%"></td>
108<td width="91%">
109<p><b>&minus;E top|bottom|left|right</b></p></td>
110</table>
111<!-- INDENTATION -->
112<table width="100%" border=0 rules="none" frame="void"
113 cols="2" cellspacing="0" cellpadding="0">
114<tr valign="top" align="left">
115<td width="19%"></td>
116<td width="80%">
117<p>use the top, bottom, left, or right edge as origin
118reference for width and length of crop regions. May be
119abbreviated to first letter.</p>
120</td>
121</table>
122<!-- INDENTATION -->
123<table width="100%" border=0 rules="none" frame="void"
124 cols="2" cellspacing="0" cellpadding="0">
125<tr valign="top" align="left">
126<td width="8%"></td>
127<td width="91%">
128<p><b>&minus;U in|cm|px</b></p></td>
129</table>
130<!-- INDENTATION -->
131<table width="100%" border=0 rules="none" frame="void"
132 cols="2" cellspacing="0" cellpadding="0">
133<tr valign="top" align="left">
134<td width="19%"></td>
135<td width="80%">
136<p>units to apply to dimensions for margins and crop
137regions. Inches or centimeters are converted to pixels using
138the resolution unit specified in the TIFF file (which
139defaults to inches if not specified in the IFD).</p>
140</td>
141</table>
142<!-- INDENTATION -->
143<table width="100%" border=0 rules="none" frame="void"
144 cols="2" cellspacing="0" cellpadding="0">
145<tr valign="top" align="left">
146<td width="8%"></td>
147<td width="91%">
148<p><b>&minus;m #,#,#,#</b></p></td>
149</table>
150<!-- INDENTATION -->
151<table width="100%" border=0 rules="none" frame="void"
152 cols="2" cellspacing="0" cellpadding="0">
153<tr valign="top" align="left">
154<td width="19%"></td>
155<td width="80%">
156<p>margins to be removed from the image. The order must be
157top, left, bottom, right with only commas separating the
158elements of the list. Margins are scaled according to the
159current units and removed before any other extractions are
160computed. Capital M was in use.</p>
161</td>
162</table>
163<!-- TABS -->
164<table width="100%" border=0 rules="none" frame="void"
165 cols="5" cellspacing="0" cellpadding="0">
166<tr valign="top" align="left">
167<td width="10%"></td>
168<td width="6%">
169
170<p><b>&minus;X #</b></p>
171</td>
172<td width="2%"></td>
173<td width="80%">
174
175<p>horizontal (X-axis) dimension of a region to extract
176relative to the specified origin reference. If the origin is
177the top or bottom edge, the X axis value will be assumed to
178start at the left edge.</p>
179</td>
180<td width="0%">
181</td>
182<tr valign="top" align="left">
183<td width="10%"></td>
184<td width="6%">
185
186<p><b>&minus;Y #</b></p>
187</td>
188<td width="2%"></td>
189<td width="80%">
190
191<p>vertical (Y-axis) dimension of a region to extract
192relative to the specified origin reference. If the origin is
193the left or right edge, the Y axis value will be assumed to
194start at the top.</p>
195</td>
196<td width="0%">
197</td>
198</table>
199<!-- INDENTATION -->
200<table width="100%" border=0 rules="none" frame="void"
201 cols="2" cellspacing="0" cellpadding="0">
202<tr valign="top" align="left">
203<td width="8%"></td>
204<td width="91%">
205<p><b>&minus;Z #:#,#:#</b></p></td>
206</table>
207<!-- INDENTATION -->
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="19%"></td>
212<td width="80%">
213<p>zones of the image designated as position X of Y equal
214sized portions measured from the reference edge, e.g. 1:3
215would be first third of the image starting from the
216reference edge minus any margins specified for the confining
217edges. Multiple zones can be specified as a comma separated
218list but they must reference the same edge. To extract the
219top quarter and the bottom third of an image you would use
220<b>&minus;Z 1:4,3:3.</b></p>
221</td>
222</table>
223<!-- INDENTATION -->
224<table width="100%" border=0 rules="none" frame="void"
225 cols="2" cellspacing="0" cellpadding="0">
226<tr valign="top" align="left">
227<td width="8%"></td>
228<td width="91%">
229<p><b>&minus;F horiz|vert</b></p></td>
230</table>
231<!-- INDENTATION -->
232<table width="100%" border=0 rules="none" frame="void"
233 cols="2" cellspacing="0" cellpadding="0">
234<tr valign="top" align="left">
235<td width="19%"></td>
236<td width="80%">
237<p>flip, i.e. mirror, the image or extracted region
238horizontally or vertically.</p>
239</td>
240</table>
241<!-- INDENTATION -->
242<table width="100%" border=0 rules="none" frame="void"
243 cols="2" cellspacing="0" cellpadding="0">
244<tr valign="top" align="left">
245<td width="8%"></td>
246<td width="91%">
247<p><b>&minus;R 90|180|270</b></p></td>
248</table>
249<!-- INDENTATION -->
250<table width="100%" border=0 rules="none" frame="void"
251 cols="2" cellspacing="0" cellpadding="0">
252<tr valign="top" align="left">
253<td width="19%"></td>
254<td width="80%">
255<p>rotate the image or extracted region 90, 180, or 270
256degrees clockwise.</p>
257</td>
258</table>
259<!-- TABS -->
260<table width="100%" border=0 rules="none" frame="void"
261 cols="5" cellspacing="0" cellpadding="0">
262<tr valign="top" align="left">
263<td width="10%"></td>
264<td width="2%">
265
266<p><b>&minus;I</b></p>
267</td>
268<td width="6%"></td>
269<td width="80%">
270
271<p>invert the colorspace values for grayscale and bi-level
272images. This would be used to correct negative images that
273have incorrect PHOTOMETRIC INTERPRETATION tags. No support
274for color images.</p>
275</td>
276<td width="0%">
277</td>
278</table>
279<!-- INDENTATION -->
280<table width="100%" border=0 rules="none" frame="void"
281 cols="2" cellspacing="0" cellpadding="0">
282<tr valign="top" align="left">
283<td width="8%"></td>
284<td width="91%">
285<p><b>&minus;b</b> <i>image</i></p></td>
286</table>
287<!-- INDENTATION -->
288<table width="100%" border=0 rules="none" frame="void"
289 cols="2" cellspacing="0" cellpadding="0">
290<tr valign="top" align="left">
291<td width="19%"></td>
292<td width="80%">
293<p>subtract the following monochrome image from all others
294processed. This can be used to remove a noise bias from a
295set of images. This bias image is typically an image of
296noise the camera saw with its shutter closed. Bias image
297support is not available with options for cropping,
298rotating, or inverting the image.</p>
299</td>
300</table>
301<!-- TABS -->
302<table width="100%" border=0 rules="none" frame="void"
303 cols="5" cellspacing="0" cellpadding="0">
304<tr valign="top" align="left">
305<td width="10%"></td>
306<td width="3%">
307
308<p><b>&minus;B</b></p>
309</td>
310<td width="5%"></td>
311<td width="80%">
312
313<p>Force output to be written with Big-Endian byte order.
314This option only has an effect when the output file is
315created or overwritten and not when it is appended to.</p>
316</td>
317<td width="0%">
318</td>
319<tr valign="top" align="left">
320<td width="10%"></td>
321<td width="3%">
322
323<p><b>&minus;C</b></p>
324</td>
325<td width="5%"></td>
326<td width="80%">
327
328<p>Suppress the use of &lsquo;&lsquo;strip
329chopping&rsquo;&rsquo; when reading images that have a
330single strip/tile of uncompressed data.</p>
331</td>
332<td width="0%">
333</td>
334<tr valign="top" align="left">
335<td width="10%"></td>
336<td width="3%">
337
338<p><b>&minus;c</b></p>
339</td>
340<td width="5%"></td>
341<td width="80%">
342
343<p>Specify the compression to use for data written to the
344output file: <b>none</b> for no compression, <b>packbits</b>
345for PackBits compression, <b>lzw</b> for Lempel-Ziv &amp;
346Welch compression, <b>jpeg</b> for baseline JPEG
347compression, <b>zip</b> for Deflate compression, <b>g3</b>
348for CCITT Group 3 (T.4) compression, and <b>g4</b> for CCITT
349Group 4 (T.6) compression. By default <i>tiffcrop</i> will
350compress data according to the value of the
351<i>Compression</i> tag found in the source file.</p>
352</td>
353<td width="0%">
354</td>
355</table>
356<!-- INDENTATION -->
357<table width="100%" border=0 rules="none" frame="void"
358 cols="2" cellspacing="0" cellpadding="0">
359<tr valign="top" align="left">
360<td width="17%"></td>
361<td width="82%">
362<p>The <small>CCITT</small> Group 3 and Group 4 compression
363algorithms can only be used with bi-level data.</p>
364<!-- INDENTATION -->
365<p>Group 3 compression can be specified together with
366several T.4-specific options: <b>1d</b> for 1-dimensional
367encoding, <b>2d</b> for 2-dimensional encoding, and
368<b>fill</b> to force each encoded scanline to be zero-filled
369so that the terminating EOL code lies on a byte boundary.
370Group 3-specific options are specified by appending a
371&lsquo;&lsquo;:&rsquo;&rsquo;-separated list to the
372&lsquo;&lsquo;g3&rsquo;&rsquo; option; e.g. <b>&minus;c
373g3:2d:fill</b> to get 2D-encoded data with byte-aligned EOL
374codes.</p>
375<!-- INDENTATION -->
376<p><small>LZW</small> compression can be specified together
377with a <i>predictor</i> value. A predictor value of 2 causes
378each scanline of the output image to undergo horizontal
379differencing before it is encoded; a value of 1 forces each
380scanline to be encoded without differencing. LZW-specific
381options are specified by appending a
382&lsquo;&lsquo;:&rsquo;&rsquo;-separated list to the
383&lsquo;&lsquo;lzw&rsquo;&rsquo; option; e.g. <b>&minus;c
384lzw:2</b> for <small>LZW</small> compression with horizontal
385differencing.</p>
386</td>
387</table>
388<!-- TABS -->
389<table width="100%" border=0 rules="none" frame="void"
390 cols="5" cellspacing="0" cellpadding="0">
391<tr valign="top" align="left">
392<td width="10%"></td>
393<td width="3%">
394
395<p><b>&minus;f</b></p>
396</td>
397<td width="5%"></td>
398<td width="80%">
399
400<p>Specify the bit fill order to use in writing output
401data. By default, <i>tiffcrop</i> will create a new file
402with the same fill order as the original. Specifying
403<b>&minus;f lsb2msb</b> will force data to be written with
404the FillOrder tag set to <small>LSB2MSB,</small> while
405<b>&minus;f msb2lsb</b> will force data to be written with
406the FillOrder tag set to <small>MSB2LSB.</small></p>
407</td>
408<td width="0%">
409</td>
410<tr valign="top" align="left">
411<td width="10%"></td>
412<td width="3%">
413
414<p><b>&minus;i</b></p>
415</td>
416<td width="5%"></td>
417<td width="80%">
418
419<p>Ignore non-fatal read errors and continue processing of
420the input file.</p>
421</td>
422<td width="0%">
423</td>
424<tr valign="top" align="left">
425<td width="10%"></td>
426<td width="3%">
427
428<p><b>&minus;l</b></p>
429</td>
430<td width="5%"></td>
431<td width="80%">
432
433<p>Specify the length of a tile (in pixels).
434<i>tiffcrop</i> attempts to set the tile dimensions so that
435no more than 8 kilobytes of data appear in a tile.</p>
436</td>
437<td width="0%">
438</td>
439<tr valign="top" align="left">
440<td width="10%"></td>
441<td width="3%">
442
443<p><b>&minus;L</b></p>
444</td>
445<td width="5%"></td>
446<td width="80%">
447
448<p>Force output to be written with Little-Endian byte
449order. This option only has an effect when the output file
450is created or overwritten and not when it is appended
451to.</p>
452</td>
453<td width="0%">
454</td>
455<tr valign="top" align="left">
456<td width="10%"></td>
457<td width="3%">
458
459<p><b>&minus;M</b></p>
460</td>
461<td width="5%"></td>
462<td width="80%">
463
464<p>Suppress the use of memory-mapped files when reading
465images.</p>
466</td>
467<td width="0%">
468</td>
469<tr valign="top" align="left">
470<td width="10%"></td>
471<td width="3%">
472
473<p><b>&minus;p</b></p>
474</td>
475<td width="5%"></td>
476<td width="80%">
477
478<p>Specify the planar configuration to use in writing image
479data that has one 8-bit sample per pixel. By default,
480<i>tiffcrop</i> will create a new file with the same planar
481configuration as the original. Specifying <b>&minus;p
482contig</b> will force data to be written with multi-sample
483data packed together, while <b>&minus;p separate</b> will
484force samples to be written in separate planes.</p>
485</td>
486<td width="0%">
487</td>
488<tr valign="top" align="left">
489<td width="10%"></td>
490<td width="3%">
491
492<p><b>&minus;r</b></p>
493</td>
494<td width="5%"></td>
495<td width="80%">
496
497<p>Specify the number of rows (scanlines) in each strip of
498data written to the output file. By default (or when value
499<b>0</b> is specified), <i>tiffcrop</i> attempts to set the
500rows/strip that no more than 8 kilobytes of data appear in a
501strip. If you specify special value <b>-1</b> it will
502results in infinite number of the rows per strip. The entire
503image will be the one strip in that case.</p>
504</td>
505<td width="0%">
506</td>
507<tr valign="top" align="left">
508<td width="10%"></td>
509<td width="3%">
510
511<p><b>&minus;s</b></p>
512</td>
513<td width="5%"></td>
514<td width="80%">
515
516<p>Force the output file to be written with data organized
517in strips (rather than tiles).</p>
518</td>
519<td width="0%">
520</td>
521<tr valign="top" align="left">
522<td width="10%"></td>
523<td width="3%">
524
525<p><b>&minus;t</b></p>
526</td>
527<td width="5%"></td>
528<td width="80%">
529
530<p>Force the output file to be written with data organized
531in tiles (rather than strips). options can be used to force
532the resultant image to be written as strips or tiles of
533data, respectively.</p>
534</td>
535<td width="0%">
536</td>
537<tr valign="top" align="left">
538<td width="10%"></td>
539<td width="3%">
540
541<p><b>&minus;w</b></p>
542</td>
543<td width="5%"></td>
544<td width="80%">
545
546<p>Specify the width of a tile (in pixels). <i>tiffcrop</i>
547attempts to set the tile dimensions so that no more than 8
548kilobytes of data appear in a tile. <i>tiffcrop</i> attempts
549to set the tile dimensions so that no more than 8 kilobytes
550of data appear in a tile.</p>
551</td>
552<td width="0%">
553</td>
554</table>
555<!-- INDENTATION -->
556<table width="100%" border=0 rules="none" frame="void"
557 cols="2" cellspacing="0" cellpadding="0">
558<tr valign="top" align="left">
559<td width="8%"></td>
560<td width="91%">
561<p><b>&minus;,={character}</b></p></td>
562</table>
563<!-- INDENTATION -->
564<table width="100%" border=0 rules="none" frame="void"
565 cols="2" cellspacing="0" cellpadding="0">
566<tr valign="top" align="left">
567<td width="19%"></td>
568<td width="80%">
569<p>substitute {character} for &rsquo;,&rsquo; in parsing
570image directory indices in files. This is necessary if
571filenames contain commas. Note that &rsquo;,=&rsquo; with
572whitespace immediately following will disable the special
573meaning of the &rsquo;,&rsquo; entirely. See examples.</p>
574</td>
575</table>
576<a name="EXAMPLES"></a>
577<h2>EXAMPLES</h2>
578<!-- INDENTATION -->
579<table width="100%" border=0 rules="none" frame="void"
580 cols="2" cellspacing="0" cellpadding="0">
581<tr valign="top" align="left">
582<td width="8%"></td>
583<td width="91%">
584<p>The following concatenates two files and writes the
585result using <small>LZW</small> encoding:</p></td>
586</table>
587<!-- INDENTATION -->
588<table width="100%" border=0 rules="none" frame="void"
589 cols="2" cellspacing="0" cellpadding="0">
590<tr valign="top" align="left">
591<td width="17%"></td>
592<td width="82%">
593<pre>tiffcrop -c lzw a.tif b.tif result.tif
594</pre>
595</td>
596</table>
597<!-- INDENTATION -->
598
599<table width="100%" border=0 rules="none" frame="void"
600 cols="2" cellspacing="0" cellpadding="0">
601<tr valign="top" align="left">
602<td width="8%"></td>
603<td width="91%">
604<p>To convert a G3 1d-encoded <small>TIFF</small> to a
605single strip of G4-encoded data the following might be
606used:</p></td>
607</table>
608<!-- INDENTATION -->
609<table width="100%" border=0 rules="none" frame="void"
610 cols="2" cellspacing="0" cellpadding="0">
611<tr valign="top" align="left">
612<td width="17%"></td>
613<td width="82%">
614<pre>tiffcrop -c g4 -r 10000 g3.tif g4.tif
615</pre>
616</td>
617</table>
618<!-- INDENTATION -->
619
620<table width="100%" border=0 rules="none" frame="void"
621 cols="2" cellspacing="0" cellpadding="0">
622<tr valign="top" align="left">
623<td width="8%"></td>
624<td width="91%">
625<p>(1000 is just a number that is larger than the number of
626rows in the source file.)</p>
627<!-- INDENTATION -->
628<p>To extract a selected set of images from a multi-image
629TIFF file use the -N option described above. Thus, to copy
630the 1st and 3rd images of image file &quot;album.tif&quot;
631to &quot;result.tif&quot;:</p></td>
632</table>
633<!-- INDENTATION -->
634<table width="100%" border=0 rules="none" frame="void"
635 cols="2" cellspacing="0" cellpadding="0">
636<tr valign="top" align="left">
637<td width="17%"></td>
638<td width="82%">
639<pre>tiffcrop -N 1,3 album.tif result.tif
640</pre>
641</td>
642</table>
643<!-- INDENTATION -->
644
645<table width="100%" border=0 rules="none" frame="void"
646 cols="2" cellspacing="0" cellpadding="0">
647<tr valign="top" align="left">
648<td width="8%"></td>
649<td width="91%">
650<p>Given file &quot;CCD.tif&quot; whose first image is a
651noise bias followed by images which include that bias,
652subtract the noise from all those images following it (while
653decompressing) with the command:</p></td>
654</table>
655<!-- INDENTATION -->
656<table width="100%" border=0 rules="none" frame="void"
657 cols="2" cellspacing="0" cellpadding="0">
658<tr valign="top" align="left">
659<td width="17%"></td>
660<td width="82%">
661<pre>tiffcrop -c none -b CCD.tif CCD.tif -d 2 result.tif
662</pre>
663</td>
664</table>
665<a name="SEE ALSO"></a>
666<h2>SEE ALSO</h2>
667<!-- INDENTATION -->
668
669<table width="100%" border=0 rules="none" frame="void"
670 cols="2" cellspacing="0" cellpadding="0">
671<tr valign="top" align="left">
672<td width="8%"></td>
673<td width="91%">
674<p><b>pal2rgb</b>(1), <b>tiffinfo</b>(1), <b>tiffcmp</b>(1),
675<b>tiffcp</b>(1), <b>tiffmedian</b>(1), <b>tiffsplit</b>(1),
676<b>libtiff</b>(3TIFF)</p>
677<!-- INDENTATION -->
678<p>Libtiff library home page:
679<b>http://www.remotesensing.org/libtiff/</b></p>
680</td>
681</table>
682<hr>
683</body>
684</html>