1 <!-- Creator     : groff version 1.18.1 --> 
   2 <!-- CreationDate: Sat Feb 24 18:37:20 2007 --> 
   5 <meta name=
"generator" content=
"groff -Thtml, see www.gnu.org"> 
   6 <meta name=
"Content-Style" content=
"text/css"> 
   7 <title>TIFFCROP
</title> 
  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> 
  23 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
  24        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
  25 <tr valign=
"top" align=
"left"> 
  28 <p>tiffcrop 
− copy (and possibly convert and crop or
 
  29 process) a 
<small>TIFF
</small> file
</p> 
  32 <a name=
"SYNOPSIS"></a> 
  35 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
  36        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
  37 <tr valign=
"top" align=
"left"> 
  40 <p><b>tiffcrop
</b> [ 
<i>options
</i> ] 
<i>src1.tif ...
 
  41 srcN.tif dst.tif
</i></p> 
  44 <a name=
"DESCRIPTION"></a> 
  47 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
  48        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
  49 <tr valign=
"top" align=
"left"> 
  52 <p><i>tiffcrop
</i> combines one or more files created
 
  53 according to the Tag Image File Format, Revision 
6.0 into a
 
  54 single 
<small>TIFF
</small> file. The output file may be
 
  55 compressed using a different algorithm than the input files.
 
  56 <i>tiffcrop
</i> is most often used to extract portions of an
 
  57 image for processing with bar code recognizer or OCR
 
  58 software when that software cannot restrict the region of
 
  59 interest to a specific portion of the image or to improve
 
  60 efficiency when the regions of interest must be rotated.
</p> 
  62 <p>By default, 
<i>tiffcrop
</i> will copy all the understood
 
  63 tags in a 
<small>TIFF
</small> directory of an input file to
 
  64 the associated directory in the output file.
</p> 
  66 <p><i>tiffcrop
</i> can be used to reorganize the storage
 
  67 characteristics of data in a file, and it will alter or
 
  68 convert the image data content as specified at the same
 
  69 time, unlike tiffcp.
</p> 
  71 <p><i>tiffcrop
</i> will behave exactly like tiffcp if none
 
  72 of the new options are specified.
</p> 
  75 <a name=
"OPTIONS"></a> 
  78 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
  79        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
  80 <tr valign=
"top" align=
"left"> 
  83 <p><b>−N odd|even|#,#-#,#|last
</b></p></td> 
  86 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
  87        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
  88 <tr valign=
"top" align=
"left"> 
  91 <p>sequences and ranges of images within file to process.
 
  92 The words 
<b>odd
</b> or 
<b>even
</b> may be used to specify
 
  93 all odd or even numbered images. The word 
<b>last
</b> may be
 
  94 used in place of a number in the sequence to indicate the
 
  95 final image in the file without knowing how many images
 
  96 there are. Ranges of images may be specified with a dash and
 
  97 multiple sets can be indicated by joining them in a
 
  98 comma-separated list. e.g.. use 
<b>−N 
1,
5-
7,last
</b> 
  99 to process the 
1st, 
5th through 
7th, and final image in the
 
 104 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
 105        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
 106 <tr valign=
"top" align=
"left"> 
 109 <p><b>−E top|bottom|left|right
</b></p></td> 
 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> 
 117 <p>use the top, bottom, left, or right edge as origin
 
 118 reference for width and length of crop regions. May be
 
 119 abbreviated to first letter.
</p> 
 123 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
 124        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
 125 <tr valign=
"top" align=
"left"> 
 128 <p><b>−U in|cm|px
</b></p></td> 
 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> 
 136 <p>units to apply to dimensions for margins and crop
 
 137 regions. Inches or centimeters are converted to pixels using
 
 138 the resolution unit specified in the TIFF file (which
 
 139 defaults to inches if not specified in the IFD).
</p> 
 143 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
 144        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
 145 <tr valign=
"top" align=
"left"> 
 148 <p><b>−m #,#,#,#
</b></p></td> 
 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> 
 156 <p>margins to be removed from the image. The order must be
 
 157 top, left, bottom, right with only commas separating the
 
 158 elements of the list. Margins are scaled according to the
 
 159 current units and removed before any other extractions are
 
 160 computed. Capital M was in use.
</p> 
 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> 
 170 <p><b>−X #
</b></p> 
 175 <p>horizontal (X-axis) dimension of a region to extract
 
 176 relative to the specified origin reference. If the origin is
 
 177 the top or bottom edge, the X axis value will be assumed to
 
 178 start at the left edge.
</p> 
 182 <tr valign=
"top" align=
"left"> 
 183 <td width=
"10%"></td> 
 186 <p><b>−Y #
</b></p> 
 191 <p>vertical (Y-axis) dimension of a region to extract
 
 192 relative to the specified origin reference. If the origin is
 
 193 the left or right edge, the Y axis value will be assumed to
 
 194 start at the top.
</p> 
 200 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
 201        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
 202 <tr valign=
"top" align=
"left"> 
 205 <p><b>−Z #:#,#:#
</b></p></td> 
 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> 
 213 <p>zones of the image designated as position X of Y equal
 
 214 sized portions measured from the reference edge, e.g. 
1:
3 
 215 would be first third of the image starting from the
 
 216 reference edge minus any margins specified for the confining
 
 217 edges. Multiple zones can be specified as a comma separated
 
 218 list but they must reference the same edge. To extract the
 
 219 top quarter and the bottom third of an image you would use
 
 220 <b>−Z 
1:
4,
3:
3.
</b></p> 
 224 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
 225        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
 226 <tr valign=
"top" align=
"left"> 
 229 <p><b>−F horiz|vert
</b></p></td> 
 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> 
 237 <p>flip, i.e. mirror, the image or extracted region
 
 238 horizontally or vertically.
</p> 
 242 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
 243        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
 244 <tr valign=
"top" align=
"left"> 
 247 <p><b>−R 
90|
180|
270</b></p></td> 
 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> 
 255 <p>rotate the image or extracted region 
90, 
180, or 
270 
 256 degrees clockwise.
</p> 
 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> 
 266 <p><b>−I
</b></p> 
 271 <p>invert the colorspace values for grayscale and bi-level
 
 272 images. This would be used to correct negative images that
 
 273 have incorrect PHOTOMETRIC INTERPRETATION tags. No support
 
 274 for color images.
</p> 
 280 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
 281        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
 282 <tr valign=
"top" align=
"left"> 
 285 <p><b>−b
</b> <i>image
</i></p></td> 
 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> 
 293 <p>subtract the following monochrome image from all others
 
 294 processed. This can be used to remove a noise bias from a
 
 295 set of images. This bias image is typically an image of
 
 296 noise the camera saw with its shutter closed. Bias image
 
 297 support is not available with options for cropping,
 
 298 rotating, or inverting the image.
</p> 
 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> 
 308 <p><b>−B
</b></p> 
 313 <p>Force output to be written with Big-Endian byte order.
 
 314 This option only has an effect when the output file is
 
 315 created or overwritten and not when it is appended to.
</p> 
 319 <tr valign=
"top" align=
"left"> 
 320 <td width=
"10%"></td> 
 323 <p><b>−C
</b></p> 
 328 <p>Suppress the use of 
‘‘strip
 
 329 chopping
’’ when reading images that have a
 
 330 single strip/tile of uncompressed data.
</p> 
 334 <tr valign=
"top" align=
"left"> 
 335 <td width=
"10%"></td> 
 338 <p><b>−c
</b></p> 
 343 <p>Specify the compression to use for data written to the
 
 344 output file: 
<b>none
</b> for no compression, 
<b>packbits
</b> 
 345 for PackBits compression, 
<b>lzw
</b> for Lempel-Ziv 
& 
 346 Welch compression, 
<b>jpeg
</b> for baseline JPEG
 
 347 compression, 
<b>zip
</b> for Deflate compression, 
<b>g3
</b> 
 348 for CCITT Group 
3 (T
.4) compression, and 
<b>g4
</b> for CCITT
 
 349 Group 
4 (T
.6) compression. By default 
<i>tiffcrop
</i> will
 
 350 compress data according to the value of the
 
 351 <i>Compression
</i> tag found in the source file.
</p> 
 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> 
 362 <p>The 
<small>CCITT
</small> Group 
3 and Group 
4 compression
 
 363 algorithms can only be used with bi-level data.
</p> 
 365 <p>Group 
3 compression can be specified together with
 
 366 several T
.4-specific options: 
<b>1d
</b> for 
1-dimensional
 
 367 encoding, 
<b>2d
</b> for 
2-dimensional encoding, and
 
 368 <b>fill
</b> to force each encoded scanline to be zero-filled
 
 369 so that the terminating EOL code lies on a byte boundary.
 
 370 Group 
3-specific options are specified by appending a
 
 371 ‘‘:
’’-separated list to the
 
 372 ‘‘g3
’’ option; e.g. 
<b>−c
 
 373 g3:
2d:fill
</b> to get 
2D-encoded data with byte-aligned EOL
 
 376 <p><small>LZW
</small> compression can be specified together
 
 377 with a 
<i>predictor
</i> value. A predictor value of 
2 causes
 
 378 each scanline of the output image to undergo horizontal
 
 379 differencing before it is encoded; a value of 
1 forces each
 
 380 scanline to be encoded without differencing. LZW-specific
 
 381 options are specified by appending a
 
 382 ‘‘:
’’-separated list to the
 
 383 ‘‘lzw
’’ option; e.g. 
<b>−c
 
 384 lzw:
2</b> for 
<small>LZW
</small> compression with horizontal
 
 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> 
 395 <p><b>−f
</b></p> 
 400 <p>Specify the bit fill order to use in writing output
 
 401 data. By default, 
<i>tiffcrop
</i> will create a new file
 
 402 with the same fill order as the original. Specifying
 
 403 <b>−f lsb2msb
</b> will force data to be written with
 
 404 the FillOrder tag set to 
<small>LSB2MSB,
</small> while
 
 405 <b>−f msb2lsb
</b> will force data to be written with
 
 406 the FillOrder tag set to 
<small>MSB2LSB.
</small></p> 
 410 <tr valign=
"top" align=
"left"> 
 411 <td width=
"10%"></td> 
 414 <p><b>−i
</b></p> 
 419 <p>Ignore non-fatal read errors and continue processing of
 
 424 <tr valign=
"top" align=
"left"> 
 425 <td width=
"10%"></td> 
 428 <p><b>−l
</b></p> 
 433 <p>Specify the length of a tile (in pixels).
 
 434 <i>tiffcrop
</i> attempts to set the tile dimensions so that
 
 435 no more than 
8 kilobytes of data appear in a tile.
</p> 
 439 <tr valign=
"top" align=
"left"> 
 440 <td width=
"10%"></td> 
 443 <p><b>−L
</b></p> 
 448 <p>Force output to be written with Little-Endian byte
 
 449 order. This option only has an effect when the output file
 
 450 is created or overwritten and not when it is appended
 
 455 <tr valign=
"top" align=
"left"> 
 456 <td width=
"10%"></td> 
 459 <p><b>−M
</b></p> 
 464 <p>Suppress the use of memory-mapped files when reading
 
 469 <tr valign=
"top" align=
"left"> 
 470 <td width=
"10%"></td> 
 473 <p><b>−p
</b></p> 
 478 <p>Specify the planar configuration to use in writing image
 
 479 data that has one 
8-bit sample per pixel. By default,
 
 480 <i>tiffcrop
</i> will create a new file with the same planar
 
 481 configuration as the original. Specifying 
<b>−p
 
 482 contig
</b> will force data to be written with multi-sample
 
 483 data packed together, while 
<b>−p separate
</b> will
 
 484 force samples to be written in separate planes.
</p> 
 488 <tr valign=
"top" align=
"left"> 
 489 <td width=
"10%"></td> 
 492 <p><b>−r
</b></p> 
 497 <p>Specify the number of rows (scanlines) in each strip of
 
 498 data written to the output file. By default (or when value
 
 499 <b>0</b> is specified), 
<i>tiffcrop
</i> attempts to set the
 
 500 rows/strip that no more than 
8 kilobytes of data appear in a
 
 501 strip. If you specify special value 
<b>-
1</b> it will
 
 502 results in infinite number of the rows per strip. The entire
 
 503 image will be the one strip in that case.
</p> 
 507 <tr valign=
"top" align=
"left"> 
 508 <td width=
"10%"></td> 
 511 <p><b>−s
</b></p> 
 516 <p>Force the output file to be written with data organized
 
 517 in strips (rather than tiles).
</p> 
 521 <tr valign=
"top" align=
"left"> 
 522 <td width=
"10%"></td> 
 525 <p><b>−t
</b></p> 
 530 <p>Force the output file to be written with data organized
 
 531 in tiles (rather than strips). options can be used to force
 
 532 the resultant image to be written as strips or tiles of
 
 533 data, respectively.
</p> 
 537 <tr valign=
"top" align=
"left"> 
 538 <td width=
"10%"></td> 
 541 <p><b>−w
</b></p> 
 546 <p>Specify the width of a tile (in pixels). 
<i>tiffcrop
</i> 
 547 attempts to set the tile dimensions so that no more than 
8 
 548 kilobytes of data appear in a tile. 
<i>tiffcrop
</i> attempts
 
 549 to set the tile dimensions so that no more than 
8 kilobytes
 
 550 of data appear in a tile.
</p> 
 556 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
 557        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
 558 <tr valign=
"top" align=
"left"> 
 561 <p><b>−,={character}
</b></p></td> 
 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> 
 569 <p>substitute {character} for 
’,
’ in parsing
 
 570 image directory indices in files. This is necessary if
 
 571 filenames contain commas. Note that 
’,=
’ with
 
 572 whitespace immediately following will disable the special
 
 573 meaning of the 
’,
’ entirely. See examples.
</p> 
 576 <a name=
"EXAMPLES"></a> 
 579 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
 580        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
 581 <tr valign=
"top" align=
"left"> 
 584 <p>The following concatenates two files and writes the
 
 585 result using 
<small>LZW
</small> encoding:
</p></td> 
 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> 
 593 <pre>tiffcrop -c lzw a.tif b.tif result.tif
 
 599 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
 600        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
 601 <tr valign=
"top" align=
"left"> 
 604 <p>To convert a G3 
1d-encoded 
<small>TIFF
</small> to a
 
 605 single strip of G4-encoded data the following might be
 
 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> 
 614 <pre>tiffcrop -c g4 -r 
10000 g3.tif g4.tif
 
 620 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
 621        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
 622 <tr valign=
"top" align=
"left"> 
 625 <p>(
1000 is just a number that is larger than the number of
 
 626 rows in the source file.)
</p> 
 628 <p>To extract a selected set of images from a multi-image
 
 629 TIFF file use the -N option described above. Thus, to copy
 
 630 the 
1st and 
3rd images of image file 
"album.tif
" 
 631 to 
"result.tif
":
</p></td> 
 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> 
 639 <pre>tiffcrop -N 
1,
3 album.tif result.tif
 
 645 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
 646        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
 647 <tr valign=
"top" align=
"left"> 
 650 <p>Given file 
"CCD.tif
" whose first image is a
 
 651 noise bias followed by images which include that bias,
 
 652 subtract the noise from all those images following it (while
 
 653 decompressing) with the command:
</p></td> 
 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> 
 661 <pre>tiffcrop -c none -b CCD.tif CCD.tif -d 
2 result.tif
 
 665 <a name=
"SEE ALSO"></a> 
 669 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
 670        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
 671 <tr valign=
"top" align=
"left"> 
 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> 
 678 <p>Libtiff library home page:
 
 679 <b>http://www.remotesensing.org/libtiff/
</b></p>