HOME


5h-3LL 1.0
DIR: /usr/share/doc/libtiff-devel/html/man
/usr/share/doc/libtiff-devel/html/man/
Upload File:
Current File : /usr/share/doc/libtiff-devel/html/man/tiffcrop.1.html
<!-- Creator     : groff version 1.22.4 -->
<!-- CreationDate: Sun Nov  2 19:00:00 2025 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
       h1      { text-align: center }
</style>
<title>TIFFCROP</title>

</head>
<body>

<h1 align="center">TIFFCROP</h1>

<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#EXAMPLES">EXAMPLES</a><br>
<a href="#NOTES">NOTES</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>

<hr>


<h2>NAME
<a name="NAME"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">tiffcrop
&minus; select, copy, crop, convert, extract, and/or process
one or more <small>TIFF</small> files.</p>

<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>



<p style="margin-left:11%; margin-top: 1em"><b>tiffcrop</b>
[ <i>options</i> ] <i>src1.tif ... srcN.tif dst.tif</i></p>

<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>



<p style="margin-left:11%; margin-top: 1em"><i>Tiffcrop</i>
processes one or more files created according to the Tag
Image File Format, Revision 6.0, specification into one or
more <small>TIFF</small> file(s). <i>Tiffcrop</i> is most
often used to extract portions of an image for processing
with bar code recognizer or OCR software when that software
cannot restrict the region of interest to a specific portion
of the image or to improve efficiency when the regions of
interest must be rotated. It can also be used to subdivide
all or part of a processed image into smaller sections and
export individual images or sections of images as separate
files or separate images within one or more files derived
from the original input image or images.</p>

<p style="margin-left:11%; margin-top: 1em">The available
functions can be grouped broadly into three classes:</p>

<p style="margin-left:22%; margin-top: 1em">Those that
select individual images or sections of images from the
input files. The options &minus;N for sequences or lists of
individual images in the input files, &minus;Z for zones,
&minus;z for regions, &minus;X and &minus;Y for fixed sized
selections, &minus;m for margins, &minus;U for units, and
&minus;E for edge reference provide a variety of ways to
specify portions of the input image.</p>

<p style="margin-left:22%; margin-top: 1em">Those that
allow the individual images or selections to be exported to
one or more output files in different groupings and control
the organization of the data in the output images. The
options &minus;P for page size grouping, &minus;S for
subdivision into columns and rows and &minus;e for export
mode options that produce one or more files from each input
image. The options &minus;r, &minus;s, &minus;t, &minus;w
control strip and tile format and sizes while &minus;B
&minus;L &minus;c &minus;f modify the endian addressing
scheme, the compression options, and the bit fill sequence
of images as they are written.</p>

<p style="margin-left:22%; margin-top: 1em">Those that
perform some action on each image that is selected from the
input file. The options include &minus;R for rotate,
&minus;I for inversion of the photometric interpretation
and/or data values, and &minus;F to flip (mirror) the image
horizontally or vertically.</p>

<p style="margin-left:11%; margin-top: 1em">Functions are
applied to the input image(s) in the following order:
cropping, fixed area extraction, zone and region extraction,
inversion, mirroring, rotation.</p>

<p style="margin-left:11%; margin-top: 1em">Functions are
applied to the output image(s) in the following order:
export mode options for grouping zones, regions, or images
into one or more files, <i>or</i> row and column divisions
with output margins, <i>or</i> page size divisions with page
orientation options.</p>

<p style="margin-left:11%; margin-top: 1em">Finally, strip,
tile, byte order, output resolution, and compression options
are applied to all output images.</p>

<p style="margin-left:11%; margin-top: 1em">The output
file(s) may be organized and compressed using a different
algorithm from the input files. By default, <i>tiffcrop</i>
will copy all the understood tags in a <small>TIFF</small>
directory of an input file to the associated directory in
the output file. Options can be used to force the resultant
image to be written as strips or tiles of data,
respectively.</p>


<p style="margin-left:11%; margin-top: 1em"><i>Tiffcrop</i>
can be used to reorganize the storage characteristics of
data in a file, and to reorganize, extract, rotate, and
otherwise process the image data as specified at the same
time whereas tiffcp does not alter the image data within the
file.</p>

<p style="margin-left:11%; margin-top: 1em">Using the
options for selecting individual input images and the
options for exporting images and/or segments defined as
zones or regions of each input image, <i>tiffcrop</i> can
perform the functions of tiffcp and tiffsplit in a single
pass while applying multiple operations to individual
selections or images.</p>

<h2>OPTIONS
<a name="OPTIONS"></a>
</h2>


<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p style="margin-top: 1em"><b>&minus;h</b></p></td>
<td width="8%"></td>
<td width="78%">


<p style="margin-top: 1em">Display the syntax summary for
tiffcrop.</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p><b>&minus;v</b></p></td>
<td width="8%"></td>
<td width="78%">


<p>Report the current version and last modification date
for tiffcrop.</p></td></tr>
</table>

<p style="margin-left:11%;"><b>&minus;N
odd|even|#,#&minus;#,#|last</b></p>

<p style="margin-left:22%;">Specify one or more series or
range(s) of images within each file to process. The words
<b>odd</b> or <b>even</b> may be used to specify all odd or
even numbered images counting from one. Note that
internally, TIFF images are numbered from zero rather than
one but since this convention is not obvious to most users,
tiffcrop used 1 to specify the first image in a multipage
file. The word <b>last</b> may be used in place of a number
in the sequence to indicate the final image in the file
without knowing how many images there are. Ranges of images
may be specified with a dash and multiple sets can be
indicated by joining them in a comma&minus;separated list.
eg. use <b>&minus;N 1,5&minus;7,last</b> to process the 1st,
5th through 7th, and final image in the file.</p>

<p style="margin-left:11%;"><b>&minus;E
top|bottom|left|right</b></p>

<p style="margin-left:22%;">Specify the top, bottom, left,
or right edge as the reference from which to calculate the
width and length of crop regions or sequence of positions
for zones. When used with the &minus;e option for exporting
zones or regions, the reference edge determines how
composite images are arranged. Using &minus;E left or right
causes successive zones or regions to be merged horizontally
whereas using &minus;E top or bottom causes successive zones
or regions to be arranged vertically. This option has no
effect on export layout when multiple zones or regions are
not being exported to composite images. Edges may be
abbreviated to the first letter.</p>

<p style="margin-left:11%;"><b>&minus;e
combined|divided|image|multiple|separate</b></p>

<p style="margin-left:22%;">Specify the export mode for
images and selections from input images. The final filename
on the command line is considered to be the destination file
or filename stem for automatically generated sequences of
files. Modes may be abbreviated to the first letter.</p>

<p style="margin-left:22%; margin-top: 1em">combined All
images and selections are written to a single file with
multiple selections from one image combined into a single
image (default)</p>

<p style="margin-left:22%; margin-top: 1em">divided All
images and selections are written to a single file with each
selection from one image written to a new image</p>

<p style="margin-left:22%; margin-top: 1em">image Each
input image is written to a new file (numeric filename
sequence) with multiple selections from the image combined
into one image</p>

<p style="margin-left:22%; margin-top: 1em">multiple Each
input image is written to a new file (numeric filename
sequence) with each selection from the image written to a
new image</p>

<p style="margin-left:22%; margin-top: 1em">separate
Individual selections from each image are written to
separate files</p>

<p style="margin-left:11%;"><b>&minus;U in|cm|px</b></p>

<p style="margin-left:22%;">Specify the type of units to
apply to dimensions for margins and crop regions for input
and output images. Inches or centimeters are converted to
pixels using the resolution unit specified in the TIFF file
(which defaults to inches if not specified in the IFD).</p>

<p style="margin-left:11%;"><b>&minus;m #,#,#,#</b></p>

<p style="margin-left:22%;">Specify margins to be removed
from the input image. The order must be top, left, bottom,
right with only commas separating the elements of the list.
Margins are scaled according to the current units and
removed before any other extractions are computed..</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="6%">


<p><b>&minus;X #</b></p></td>
<td width="5%"></td>
<td width="78%">


<p>Set the horizontal (X&minus;axis) dimension of a region
to extract relative to the specified origin reference. If
the origin is the top or bottom edge, the X axis value will
be assumed to start at the left edge.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="6%">


<p><b>&minus;Y #</b></p></td>
<td width="5%"></td>
<td width="78%">


<p>Set the vertical (Y&minus;axis) dimension of a region to
extract relative to the specified origin reference. If the
origin is the left or right edge, the Y axis value will be
assumed to start at the top.</p></td></tr>
</table>

<p style="margin-left:11%;"><b>&minus;Z #:#,#:#</b></p>

<p style="margin-left:22%;">Specify zones of the image
designated as position X of Y equal sized portions measured
from the reference edge, eg 1:3 would be first third of the
image starting from the reference edge minus any margins
specified for the confining edges. Multiple zones can be
specified as a comma separated list but they must reference
the same edge. To extract the top quarter and the bottom
third of an image you would use <b>&minus;Z 1:4,3:3.</b></p>

<p style="margin-left:11%;"><b>&minus;z x1,y1,x2,y2: ...
:xN,yN,xN+1,yN+1</b></p>

<p style="margin-left:22%;">Specify a series of coordinates
to define regions for processing and exporting. The
coordinates represent the top left and lower right corners
of each region in the current units, eg inch, cm, or pixels.
Pixels are counted from one to width or height and inches or
cm are calculated from image resolution data.</p>

<p style="margin-left:22%; margin-top: 1em">Each colon
delimited series of four values represents the horizontal
and vertical offsets from the top and left edges of the
image, regardless of the edge specified with the &minus;E
option. The first and third values represent the horizontal
offsets of the corner points from the left edge while the
second and fourth values represent the vertical offsets from
the top edge.</p>

<p style="margin-left:11%;"><b>&minus;F horiz|vert</b></p>

<p style="margin-left:22%;">Flip, ie mirror, the image or
extracted region horizontally or vertically.</p>

<p style="margin-left:11%;"><b>&minus;R 90|180|270</b></p>

<p style="margin-left:22%;">Rotate the image or extracted
region 90, 180, or 270 degrees clockwise.</p>

<p style="margin-left:11%;"><b>&minus;I
[black|white|data|both]</b></p>

<p style="margin-left:22%;">Invert color space, eg dark to
light for bilevel and grayscale images. This can be used to
modify negative images to positive or to correct images that
have the PHOTOMETRIC_INTERPRETATIN tag set incorrectly. If
the value is black or white, the PHOTOMETRIC_INTERPRETATION
tag is set to MinIsBlack or MinIsWhite, without altering the
image data. If the argument is data or both, the data values
of the image are modified. Specifying both inverts the data
and the PHOTOMETRIC_INTERPRETATION tag, whereas using data
inverts the data but not the PHOTOMETRIC_INTERPRETATION tag.
No support for modifying the color space of color images in
this release.</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="6%">


<p><b>&minus;H #</b></p></td>
<td width="5%"></td>
<td width="78%">


<p>Set the horizontal resolution of output images to #
expressed in the current units.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="6%">


<p><b>&minus;V #</b></p></td>
<td width="5%"></td>
<td width="78%">


<p>Set the vertical resolution of the output images to #
expressed in the current units.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="6%">


<p><b>&minus;J #</b></p></td>
<td width="5%"></td>
<td width="78%">


<p>Set the horizontal margin of an output page size to #
expressed in the current units when sectioning image into
columns x rows subimages using the &minus;S cols:rows
option.</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="6%">


<p><b>&minus;K #</b></p></td>
<td width="5%"></td>
<td width="78%">


<p>Set the vertical margin of an output page size to #
expressed in the current units when sectioning image into
columns x rows submiages using the &minus;S cols:rows
option.</p> </td></tr>
</table>

<p style="margin-left:11%;"><b>&minus;O
portrait|landscape|auto</b></p>

<p style="margin-left:22%;">Set the output orientation of
the pages or sections. Auto will use the arrangement that
requires the fewest pages. This option is only meaningful in
conjunction with the -P option to format an image to fit on
a specific paper size.</p>

<p style="margin-left:11%;"><b>&minus;P page</b></p>

<p style="margin-left:22%;">Format the output images to fit
on page size paper. Use &minus;P list to show the supported
page sizes and dimensions. You can define a custom page size
by entering the width and length of the page in the current
units with the following format #.#x#.#.</p>

<p style="margin-left:11%;"><b>&minus;S cols:rows</b></p>

<p style="margin-left:22%;">Divide each image into cols
across and rows down equal sections.</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p><b>&minus;B</b></p></td>
<td width="8%"></td>
<td width="78%">


<p>Force output to be written with Big&minus;Endian byte
order. This option only has an effect when the output file
is created or overwritten and not when it is appended
to.</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p><b>&minus;C</b></p></td>
<td width="8%"></td>
<td width="78%">


<p>Suppress the use of &lsquo;&lsquo;strip
chopping&rsquo;&rsquo; when reading images that have a
single strip/tile of uncompressed data.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p><b>&minus;c</b></p></td>
<td width="8%"></td>
<td width="78%">


<p>Specify the compression to use for data written to the
output file: <b>none</b> for no compression, <b>packbits</b>
for PackBits compression, <b>lzw</b> for Lempel&minus;Ziv
&amp; Welch compression, <b>jpeg</b> for baseline JPEG
compression. <b>zip</b> for Deflate compression, <b>g3</b>
for CCITT Group 3 (T.4) compression, and <b>g4</b> for CCITT
Group 4 (T.6) compression. By default <i>tiffcrop</i> will
compress data according to the value of the
<i>Compression</i> tag found in the source file.</p></td></tr>
</table>

<p style="margin-left:22%; margin-top: 1em">The
<small>CCITT</small> Group 3 and Group 4 compression
algorithms can only be used with bilevel data.</p>

<p style="margin-left:22%; margin-top: 1em">Group 3
compression can be specified together with several
T.4&minus;specific options: <b>1d</b> for
1&minus;dimensional encoding, <b>2d</b> for
2&minus;dimensional encoding, and <b>fill</b> to force each
encoded scanline to be zero&minus;filled so that the
terminating EOL code lies on a byte boundary. Group
3&minus;specific options are specified by appending a
&lsquo;&lsquo;:&rsquo;&rsquo;&minus;separated list to the
&lsquo;&lsquo;g3&rsquo;&rsquo; option; e.g. <b>&minus;c
g3:2d:fill</b> to get 2D&minus;encoded data with
byte&minus;aligned EOL codes.</p>


<p style="margin-left:22%; margin-top: 1em"><small>LZW</small>
compression can be specified together with a
<i>predictor</i> value. A predictor value of 2 causes each
scanline of the output image to undergo horizontal
differencing before it is encoded; a value of 1 forces each
scanline to be encoded without differencing.
LZW&minus;specific options are specified by appending a
&lsquo;&lsquo;:&rsquo;&rsquo;&minus;separated list to the
&lsquo;&lsquo;lzw&rsquo;&rsquo; option; e.g. <b>&minus;c
lzw:2</b> for <small>LZW</small> compression with horizontal
differencing.</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p style="margin-top: 1em"><b>&minus;f</b></p></td>
<td width="8%"></td>
<td width="78%">


<p style="margin-top: 1em">Specify the bit fill order to
use in writing output data. By default, <i>tiffcrop</i> will
create a new file with the same fill order as the original.
Specifying <b>&minus;f lsb2msb</b> will force data to be
written with the FillOrder tag set to
<small>LSB2MSB,</small> while <b>&minus;f msb2lsb</b> will
force data to be written with the FillOrder tag set to
<small>MSB2LSB.</small></p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p><b>&minus;i</b></p></td>
<td width="8%"></td>
<td width="78%">


<p>Ignore non&minus;fatal read errors and continue
processing of the input file.</p></td></tr>
</table>

<p style="margin-left:11%;"><b>&minus;k size</b></p>

<p style="margin-left:22%;">Set maximum memory allocation
size (in MiB). The default is 256MiB. Set to 0 to disable
the limit.</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p><b>&minus;l</b></p></td>
<td width="8%"></td>
<td width="78%">


<p>Specify the length of a tile (in pixels).
<i>Tiffcrop</i> attempts to set the tile dimensions so that
no more than 8 kilobytes of data appear in a tile.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p><b>&minus;L</b></p></td>
<td width="8%"></td>
<td width="78%">


<p>Force output to be written with Little&minus;Endian byte
order. This option only has an effect when the output file
is created or overwritten and not when it is appended
to.</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p><b>&minus;M</b></p></td>
<td width="8%"></td>
<td width="78%">


<p>Suppress the use of memory&minus;mapped files when
reading images.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p><b>&minus;p</b></p></td>
<td width="8%"></td>
<td width="78%">


<p>Specify the planar configuration to use in writing image
data that has more than one sample per pixel. By default,
<i>tiffcrop</i> will create a new file with the same planar
configuration as the original. Specifying <b>&minus;p
contig</b> will force data to be written with
multi&minus;sample data packed together, while <b>&minus;p
separate</b> will force samples to be written in separate
planes.</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p><b>&minus;r</b></p></td>
<td width="8%"></td>
<td width="78%">


<p>Specify the number of rows (scanlines) in each strip of
data written to the output file. By default (or when value
<b>0</b> is specified), <i>tiffcrop</i> attempts to set the
rows/strip that no more than 8 kilobytes of data appear in a
strip. If you specify the special value <b>&minus;1</b> it
will results in infinite number of the rows per strip. The
entire image will be the one strip in that case.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p><b>&minus;s</b></p></td>
<td width="8%"></td>
<td width="78%">


<p>Force the output file to be written with data organized
in strips (rather than tiles).</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p><b>&minus;t</b></p></td>
<td width="8%"></td>
<td width="78%">


<p>Force the output file to be written with data organized
in tiles (rather than strips).</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p><b>&minus;w</b></p></td>
<td width="8%"></td>
<td width="78%">


<p>Specify the width of a tile (in pixels). <i>tiffcrop</i>
attempts to set the tile dimensions so that no more than 8
kilobytes of data appear in a tile. <i>tiffcrop</i> attempts
to set the tile dimensions so that no more than 8 kilobytes
of data appear in a tile.</p></td></tr>
</table>

<p style="margin-left:11%;">Debug and dump facility</p>

<p style="margin-left:22%;"><b>&minus;D
opt1:value1,opt2:value2,opt3:value3:opt4:value4</b> Display
program progress and/or dump raw data to non&minus;TIFF
files. Options include the following and must be joined as a
comma separated list. The use of this option is generally
limited to program debugging and development of future
options. An equal sign may be substituted for the colon in
option:value pairs.</p>

<p style="margin-left:22%; margin-top: 1em">debug:N Display
limited program progress indicators where larger N increase
the level of detail.</p>

<p style="margin-left:22%; margin-top: 1em">format:txt|raw
Format any logged data as ASCII text or raw binary values.
ASCII text dumps include strings of ones and zeroes
representing the binary values in the image data plus
identifying headers.</p>

<p style="margin-left:22%; margin-top: 1em">level:N Specify
the level of detail presented in the dump files. This can
vary from dumps of the entire input or output image data to
dumps of data processed by specific functions. Current range
of levels is 1 to 3.</p>


<p style="margin-left:22%; margin-top: 1em">input:full&minus;path&minus;to&minus;directory/input&minus;dumpname</p>


<p style="margin-left:22%; margin-top: 1em">output:full&minus;path&minus;to&minus;directory/output&minus;dumpname</p>

<p style="margin-left:22%; margin-top: 1em">When dump files
are being written, each image will be written to a separate
file with the name built by adding a numeric sequence value
to the dumpname and an extension of .txt for ASCII dumps or
.bin for binary dumps.</p>

<p style="margin-left:22%; margin-top: 1em">The four
debug/dump options are independent, though it makes little
sense to specify a dump file without specifying a detail
level.</p>

<p style="margin-left:22%; margin-top: 1em">Note: Tiffcrop
may be compiled with -DDEVELMODE to enable additional very
<br>
low level debug reporting.</p>

<h2>EXAMPLES
<a name="EXAMPLES"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">The following
concatenates two files and writes the result using
<small>LZW</small> encoding:</p>

<p style="margin-left:22%;">tiffcrop &minus;c lzw a.tif
b.tif result.tif</p>

<p style="margin-left:11%; margin-top: 1em">To convert a G3
1d&minus;encoded <small>TIFF</small> to a single strip of
G4&minus;encoded data the following might be used:</p>

<p style="margin-left:22%;">tiffcrop &minus;c g4 &minus;r
10000 g3.tif g4.tif</p>

<p style="margin-left:11%;">(1000 is just a number that is
larger than the number of rows in the source file.)</p>

<p style="margin-left:11%; margin-top: 1em">To extract a
selected set of images from a multi&minus;image TIFF file
use the &minus;N option described above. Thus, to copy the
1st and 3rd images of image file &quot;album.tif&quot; to
&quot;result.tif&quot;:</p>

<p style="margin-left:22%;">tiffcrop &minus;N 1,3 album.tif
result.tif</p>

<p style="margin-left:11%; margin-top: 1em">Invert a
bilevel image scan of a microfilmed document and crop off
margins of 0.25 inches on the left and right, 0.5 inch on
the top, and 0.75 inch on the bottom. From the remaining
portion of the image, select the second and third quarters,
ie, one half of the area left from the center to each
margin.</p>

<p style="margin-left:22%;">tiffcrop &minus;U in &minus;m
0.5,0.25,0.75,0.25 &minus;E left &minus;Z 2:4,3:4 &minus;I
both MicrofilmNegative.tif MicrofilmPostiveCenter.tif</p>

<p style="margin-left:11%; margin-top: 1em">Extract only
the final image of a large Architectural E sized multipage
TIFF file and rotate it 90 degrees clockwise while
reformatting the output to fit on tabloid sized sheets with
one quarter of an inch on each side:</p>

<p style="margin-left:22%;">tiffcrop &minus;N last &minus;R
90 &minus;O auto &minus;P tabloid &minus;U in &minus;J 0.25
&minus;K 0.25 &minus;H 300 &minus;V 300
Big&minus;PlatMap.tif BigPlatMap&minus;Tabloid.tif</p>

<p style="margin-left:11%;">The output images will have a
specified resolution of 300 dpi in both directions. The
orientation of each page will be determined by whichever
choice requires the fewest pages. To specify a specific
orientation, use the portrait or landscape option. The paper
size option does not resample the image. It breaks each
original image into a series of smaller images that will fit
on the target paper size at the specified resolution.</p>

<p style="margin-left:11%; margin-top: 1em">Extract two
regions 2048 pixels wide by 2048 pixels high from each page
of a multi&minus;page input file and write each region to a
separate output file.</p>

<p style="margin-left:22%;">tiffcrop &minus;U px &minus;z
1,1,2048,2048:1,2049,2048,4097 &minus;e separate
CheckScans.tiff Check</p>

<p style="margin-left:11%;">The output file names will use
the stem Check with a numeric suffix which is incremented
for each region of each image, eg Check&minus;001.tiff,
Check&minus;002.tiff ... Check&minus;NNN.tiff. To produce a
unique file for each page of the input image with one new
image for each region of the input image on that page,
change the export option to &minus;e multiple.</p>

<h2>NOTES
<a name="NOTES"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">In general,
bilevel, grayscale, palette and RGB(A) data with bit depths
from 1 to 32 bits should work in both interleaved and
separate plane formats. Unlike tiffcp, tiffcrop can read and
write tiled images with bits per sample that are not a
multiple of 8 in both interleaved and separate planar
format. Floating point data types are supported at bit depts
of 16, 24, 32 and 64 bits per sample.</p>

<p style="margin-left:11%; margin-top: 1em">Not all images
can be converted from one compression scheme to another.
Data with some photometric interpretations and/or bit depths
are tied to specific compression schemes and vice-versa,
e.g. Group 3/4 compression is only usable for bilevel data.
JPEG compression is only usable on 8 bit per sample data (or
12 bit if <i>LibTIFF</i> was compiled with 12 bit JPEG
support). Support for OJPEG compressed images is problematic
at best. Since OJPEG compression is no longer supported for
writing images with LibTIFF, these images will be updated to
the newer JPEG compression when they are copied or
processed. This may cause the image to appear color shifted
or distorted after conversion. In some cases, it is possible
to remove the original compression from image data using the
option -cnone.</p>

<p style="margin-left:11%; margin-top: 1em">Tiffcrop does
not currently provide options to up or downsample data to
different bit depths or convert data from one photometric
interpretation to another, e.g. 16 bits per sample to 8 bits
per sample or RGB to grayscale.</p>

<p style="margin-left:11%; margin-top: 1em">Tiffcrop is
very loosely derived from code in <i>tiffcp</i> with
extensive modifications and additions to support the
selection of input images and regions and the exporting of
them to one or more output files in various groupings. The
image manipulation routines are entirely new and additional
ones may be added in the future. It will handle tiled images
with bit depths that are not a multiple of eight that tiffcp
may refuse to read.</p>


<p style="margin-left:11%; margin-top: 1em"><i>Tiffcrop</i>
was designed to handle large files containing many moderate
sized images with memory usage that is independent of the
number of images in the file. In order to support
compression modes that are not based on individual
scanlines, e.g. JPEG, it now reads images by strip or tile
rather than by individual scanlines. In addition to the
memory required by the input and output buffers associated
with <i>LibTIFF</i> one or more buffers at least as large as
the largest image to be read are required. The design favors
large volume document processing uses over scientific or
graphical manipulation of large datasets as might be found
in research or remote sensing scenarios.</p>

<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>



<p style="margin-left:11%; margin-top: 1em"><b>pal2rgb</b>(1),
<b>tiffinfo</b>(1), <b>tiffcmp</b>(1), <b>tiffcp</b>(1),
<b>tiffmedian</b>(1), <b>tiffsplit</b>(1),
<b>libtiff</b>(3TIFF)</p>

<p style="margin-left:11%; margin-top: 1em">Libtiff library
home page: <b>http://www.simplesystems.org/libtiff/</b></p>
<hr>
</body>
</html>