1 .\" $Id: tiffcp.1,v 1.6 2005/11/02 11:07:19 dron Exp $
 
   3 .\" Copyright (c) 1988-1997 Sam Leffler
 
   4 .\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
 
   6 .\" Permission to use, copy, modify, distribute, and sell this software and 
 
   7 .\" its documentation for any purpose is hereby granted without fee, provided
 
   8 .\" that (i) the above copyright notices and this permission notice appear in
 
   9 .\" all copies of the software and related documentation, and (ii) the names of
 
  10 .\" Sam Leffler and Silicon Graphics may not be used in any advertising or
 
  11 .\" publicity relating to the software without the specific, prior written
 
  12 .\" permission of Sam Leffler and Silicon Graphics.
 
  14 .\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
 
  15 .\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
 
  16 .\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
 
  18 .\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
 
  19 .\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
 
  20 .\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
 
  21 .\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
 
  22 .\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
 
  26 .TH TIFFCP 1 "September 20, 2005" "libtiff"
 
  28 tiffcp \- copy (and possibly convert) a
 
  36 .I "src1.tif ... srcN.tif dst.tif"
 
  39 combines one or more files created according
 
  40 to the Tag Image File Format, Revision 6.0
 
  44 Because the output file may be compressed using a different
 
  45 algorithm than the input files,
 
  47 is most often used to convert between different compression
 
  52 will copy all the understood tags in a
 
  55 file to the associated directory in the output file.
 
  58 can be used to reorganize the storage characteristics of data
 
  59 in a file, but it is explicitly intended to not alter or convert
 
  60 the image data content in any way.
 
  64 subtract the following monochrome image from all others
 
  65 processed.  This can be used to remove a noise bias
 
  66 from a set of images.  This bias image is typically an
 
  67 image of noise the camera saw with its shutter closed.
 
  70 Force output to be written with Big-Endian byte order.
 
  71 This option only has an effect when the output file is created or
 
  72 overwritten and not when it is appended to.
 
  75 Suppress the use of ``strip chopping'' when reading images
 
  76 that have a single strip/tile of uncompressed data.
 
  79 Specify the compression to use for data written to the output file:
 
  83 for PackBits compression,
 
  85 for Lempel-Ziv & Welch compression,
 
  87 for baseline JPEG compression,
 
  89 for Deflate compression,
 
  91 for CCITT Group 3 (T.4) compression,
 
  94 for CCITT Group 4 (T.6) compression.
 
  97 will compress data according to the value of the
 
  99 tag found in the source file.
 
 103 Group 3 and Group 4 compression algorithms can only
 
 104 be used with bilevel data.
 
 106 Group 3 compression can be specified together with several
 
 107 T.4-specific options:
 
 109 for 1-dimensional encoding,
 
 111 for 2-dimensional encoding,
 
 114 to force each encoded scanline to be zero-filled so that the
 
 115 terminating EOL code lies on a byte boundary.
 
 116 Group 3-specific options are specified by appending a ``:''-separated
 
 117 list to the ``g3'' option; e.g.
 
 119 to get 2D-encoded data with byte-aligned EOL codes.
 
 122 compression can be specified together with a 
 
 125 A predictor value of 2 causes
 
 126 each scanline of the output image to undergo horizontal
 
 127 differencing before it is encoded; a value
 
 128 of 1 forces each scanline to be encoded without differencing.
 
 129 LZW-specific options are specified by appending a ``:''-separated
 
 130 list to the ``lzw'' option; e.g.
 
 134 compression with horizontal differencing.
 
 137 Specify the bit fill order to use in writing output data.
 
 140 will create a new file with the same fill order as the original.
 
 143 will force data to be written with the FillOrder tag set to
 
 147 will force data to be written with the FillOrder tag set to
 
 151 Specify the length of a tile (in pixels).
 
 153 attempts to set the tile dimensions so
 
 154 that no more than 8 kilobytes of data appear in a tile.
 
 157 Force output to be written with Little-Endian byte order.
 
 158 This option only has an effect when the output file is created or
 
 159 overwritten and not when it is appended to.
 
 162 Suppress the use of memory-mapped files when reading images.
 
 165 Specify the planar configuration to use in writing image data
 
 166 that has one 8-bit sample per pixel.
 
 169 will create a new file with the same planar configuration as
 
 173 will force data to be written with multi-sample data packed
 
 176 will force samples to be written in separate planes.
 
 179 Specify the number of rows (scanlines) in each strip of data
 
 180 written to the output file.
 
 181 By default (or when value
 
 185 attempts to set the rows/strip
 
 186 that no more than 8 kilobytes of data appear in a strip. If you specify
 
 189 it will results in infinite number of the rows per strip. The entire image
 
 190 will be the one strip in that case.
 
 193 Force the output file to be written with data organized in strips
 
 197 Force the output file to be written with data organized in tiles
 
 198 (rather than strips).
 
 199 options can be used to force the resultant image to be written
 
 200 as strips or tiles of data, respectively.
 
 203 Specify the width of a tile (in pixels).
 
 205 attempts to set the tile dimensions so
 
 206 that no more than 8 kilobytes of data appear in a tile.
 
 208 attempts to set the tile dimensions so
 
 209 that no more than 8 kilobytes of data appear in a tile.
 
 212 substitute {character} for ',' in parsing image directory indices
 
 213 in files.  This is necessary if filenames contain commas.
 
 214 Note that ',=' with whitespace immediately following will disable
 
 215 the special meaning of the ',' entirely.  See examples.
 
 217 The following concatenates two files and writes the result using 
 
 222 tiffcp -c lzw a.tif b.tif result.tif
 
 226 To convert a G3 1d-encoded 
 
 228 to a single strip of G4-encoded data the following might be used:
 
 231 tiffcp -c g4 -r 10000 g3.tif g4.tif
 
 234 (1000 is just a number that is larger than the number of rows in
 
 237 To extract a selected set of images from a multi-image
 
 238 TIFF file, the file name may be immediately followed by a ',' 
 
 239 separated list of image directory indices.  The first image
 
 240 is always in directory 0.  Thus, to copy the 1st and 3rd
 
 241 images of image file "album.tif" to "result.tif":
 
 244 tiffcp album.tif,0,2 result.tif
 
 248 Given file "CCD.tif" whose first image is a noise bias
 
 249 followed by images which include that bias,
 
 250 subtract the noise from all those images following it
 
 251 (while decompressing) with the command:
 
 254 tiffcp -c none -b CCD.tif CCD.tif,1, result.tif
 
 258 If the file above were named "CCD,X.tif", the "-,=" option would
 
 259 be required to correctly parse this filename with image numbers,
 
 263 tiffcp -c none -,=% -b CCD,X.tif CCD,X%1%.tif result.tif
 
 272 Libtiff library home page:
 
 273 .BR http://www.remotesensing.org/libtiff/