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