libtiff/html/man/tiffcp.1.html
2003-12-21 21:47:11 +00:00

423 lines
16 KiB
HTML

<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta name="Content-Style" content="text/css">
<title>TIFFCP</title>
</head>
<body>
<h1 align=center>TIFFCP</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="#SEE ALSO">SEE ALSO</a><br>
<hr>
<!-- Creator : groff version 1.17.2 -->
<!-- CreationDate: Mon Dec 22 00:39:34 2003 -->
<a name="NAME"></a>
<h2>NAME</h2>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
tiffcp - copy (and possibly convert) a <small>TIFF</small> file</td></table>
<a name="SYNOPSIS"></a>
<h2>SYNOPSIS</h2>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>tiffcp</b> [ <i>options</i> ] <i>src1.tif ... srcN.tif
dst.tif</i></td></table>
<a name="DESCRIPTION"></a>
<h2>DESCRIPTION</h2>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<i>tiffcp</i> combines one or more files created according
to the Tag Image File Format, Revision 6.0 into a single
<small>TIFF</small> file. Because the output file may be
compressed using a different algorithm than the input files,
<i>tiffcp</i> is most often used to convert between
different compression schemes.</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
By default, <i>tiffcp</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.</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<i>tiffcp</i> can be used to reorganize the storage
characteristics of data in a file, but it is explicitly
intended to not alter or convert the image data content in
any way.</td></table>
<a name="OPTIONS"></a>
<h2>OPTIONS</h2>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>-b image</b></td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
subtract the following monochrome image from all others
processed. This can be used to remove a noise bias from a
set of images. This bias image is typlically an image of
noise the camera saw with its shutter closed.</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>-B</b></td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
Force output to be written with Big-Endian byte order. This
option only has an effect when the output file is created or
overwritten and not when it is appended to.</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>-C</b></td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
Suppress the use of ``strip chopping'' when reading images
that have a single strip/tile of uncompressed
data.</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>-c</b></td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
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-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>tiffcp</i> will
compress data according to the value of the
<i>Compression</i> tag found in the source
file.</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
The <small>CCITT</small> Group 3 and Group 4 compression
algorithms can only be used with bilevel data.</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
Group 3 compression can be specified together with several
T.4-specific options: <b>1d</b> for 1-dimensional encoding,
<b>2d</b> for 2-dimensional encoding, and <b>fill</b> to
force each encoded scanline to be zero-filled so that the
terminating EOL code lies on a byte boundary. Group
3-specific options are specified by appending a
``:''-separated list to the ``g3'' option; e.g. <b>-c
g3:2d:fill</b> to get 2D-encoded data with byte-aligned EOL
codes.</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
<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-specific
options are specified by appending a ``:''-separated list to
the ``lzw'' option; e.g. <b>-c lzw:2</b> for
<small>LZW</small> compression with horizontal
differencing.</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>-f</b></td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
Specify the bit fill order to use in writing output data. By
default, <i>tiffcp</i> will create a new file with the same
fill order as the original. Specifying <b>-f lsb2msb</b>
will force data to be written with the FillOrder tag set to
<small>LSB2MSB,</small> while <b>-f msb2lsb</b> will force
data to be written with the FillOrder tag set to
<small>MSB2LSB.</small></td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>-l</b></td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
Specify the length of a tile (in pixels). <i>tiffcp</i>
attempts to set the tile dimensions so that no more than 8
kilobytes of data appear in a tile.</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>-L</b></td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
Force output to be written with Little-Endian byte order.
This option only has an effect when the output file is
created or overwritten and not when it is appended
to.</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>-M</b></td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
Suppress the use of memory-mapped files when reading
images.</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>-p</b></td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
Specify the planar configuration to use in writing image
data that has one 8-bit sample per pixel. By default,
<i>tiffcp</i> will create a new file with the same planar
configuration as the original. Specifying <b>-p contig</b>
will force data to be written with multi-sample data packed
together, while <b>-p separate</b> will force samples to be
written in separate planes.</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>-r</b></td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
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>tiffcp</i> attempts to set the
rows/strip that no more than 8 kilobytes of data appear in a
strip. If you specify special value <b>-1</b> it will
results in infinite number of the rows per strip. The entire
image will be the one strip in that case.</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>-s</b></td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
Force the output file to be written with data organized in
strips (rather than tiles).</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>-t</b></td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
Force the output file to be written wtih data organized in
tiles (rather than strips). options can be used to force the
resultant image to be written as strips or tiles of data,
respectively.</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>-w</b></td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
Specify the width of a tile (in pixels). <i>tiffcp</i>
attempts to set the tile dimensions so that no more than 8
kilobytes of data appear in a tile. <i>tiffcp</i> attempts
to set the tile dimensions so that no more than 8 kilobytes
of data appear in a tile.</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>-,={character}</b></td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
substitute {character} for ',' in parsing image directory
indices in files. This is necessary if filenames contain
commas. Note that ',=' with whitespace immediately following
will disable the special meaning of the ',' entirely. See
examples.</td></table>
<a name="EXAMPLES"></a>
<h2>EXAMPLES</h2>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
The following concatenates two files and writes the result
using <small>LZW</small> encoding:</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
<pre>tiffcp -c lzw a.tif b.tif result.tif
</pre></td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
To convert a G3 1d-encoded <small>TIFF</small> to a single
strip of G4-encoded data the following might be
used:</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
<pre>tiffcp -c g4 -r 10000 g3.tif g4.tif
</pre></td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
(1000 is just a number that is larger than the number of
rows in the source file.)</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
To extract a selected set of images from a multi-image TIFF
file, the file name may be immediately followed by a ','
separated list of image directory indices. The first image
is always in directory 0. Thus, to copy the 1st and 3rd
images of image file &quot;album.tif&quot; to
&quot;result.tif&quot;:</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
<pre>tiffcp album.tif,0,2 result.tif
</pre></td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
Given file &quot;CCD.tif&quot; whose first image is a noise
bias followed by images which include that bias, subtract
the noise from all those images following it (while
decompressing) with the command:</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
<pre>tiffcp -c none -b CCD.tif CCD.tif,1, result.tif
</pre></td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
If the file above were named &quot;CCD,X.tif&quot;, the
&quot;-,=&quot; option would be required to correctly parse
this filename with image numbers, as follows:</td></table>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
<pre>tiffcp -c none -,=% -b CCD,X.tif CCD,X%1%.tif result.tif
</pre></td></table>
<a name="SEE ALSO"></a>
<h2>SEE ALSO</h2>
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<i>pal2rgb</i>(1), <i>tiffinfo</i>(1), <i>tiffcmp</i>(1),
<i>tiffmedian</i>(1), <i>tiffsplit</i>(1),
<i>libtiff</i>(3)</td></table>
<hr>
</body>
</html>