1TIFFCP(1)                   General Commands Manual                  TIFFCP(1)
2
3
4

NAME

6       tiffcp - copy (and possibly convert) a TIFF file
7

SYNOPSIS

9       tiffcp [ options ] src1.tif ... srcN.tif dst.tif
10

DESCRIPTION

12       tiffcp  combines  one  or more files created according to the Tag Image
13       File Format, Revision 6.0 into a single TIFF file.  Because the  output
14       file  may  be  compressed  using  a  different algorithm than the input
15       files, tiffcp is most often used to convert between different  compres‐
16       sion schemes.
17
18       By  default,  tiffcp will copy all the understood tags in a TIFF direc‐
19       tory of an input file to the associated directory in the output file.
20
21       tiffcp can be used to reorganize the storage characteristics of data in
22       a file, but it is explicitly intended to not alter or convert the image
23       data content in any way.
24

OPTIONS

26       -a     Append to an existing output file instead of overwriting it.
27
28       -b image
29              subtract the following monochrome image  from  all  others  pro‐
30              cessed.   This  can be used to remove a noise bias from a set of
31              images.  This bias image is typically an image of noise the cam‐
32              era saw with its shutter closed.
33
34       -B     Force  output  to  be  written with Big-Endian byte order.  This
35              option only has an effect when the output  file  is  created  or
36              overwritten and not when it is appended to.
37
38       -C     Suppress  the use of ``strip chopping'' when reading images that
39              have a single strip/tile of uncompressed data.
40
41       -c     Specify the compression to use for data written  to  the  output
42              file:  none  for  no compression, packbits for PackBits compres‐
43              sion, lzw for Lempel-Ziv & Welch compression,  zip  for  Deflate
44              compression,  lzma for LZMA2 compression, jpeg for baseline JPEG
45              compression, g3 for CCITT Group  3  (T.4)  compression,  g4  for
46              CCITT  Group  4 (T.6) compression, or sgilog for SGILOG compres‐
47              sion.  By default tiffcp will compress  data  according  to  the
48              value of the Compression tag found in the source file.
49
50              The CCITT Group 3 and Group 4 compression algorithms can only be
51              used with bilevel data.
52
53              Group 3 compression  can  be  specified  together  with  several
54              T.4-specific  options:  1d  for  1-dimensional  encoding, 2d for
55              2-dimensional encoding, and fill to force each encoded  scanline
56              to  be  zero-filled  so  that the terminating EOL code lies on a
57              byte  boundary.   Group  3-specific  options  are  specified  by
58              appending  a ``:''-separated list to the ``g3'' option; e.g.  -c
59              g3:2d:fill to get 2D-encoded data with byte-aligned EOL codes.
60
61              LZW, Deflate and LZMA2 compression  can  be  specified  together
62              with a predictor value. A predictor value of 2 causes each scan‐
63              line of the output  image  to  undergo  horizontal  differencing
64              before  it  is  encoded; a value of 1 forces each scanline to be
65              encoded without differencing. A value 3 is  for  floating  point
66              predictor  which you can use if the encoded data are in floating
67              point format.  LZW-specific options are specified by appending a
68              ``:''-separated  list  to the ``lzw'' option; e.g.  -c lzw:2 for
69              LZW compression with horizontal differencing.
70
71              Deflate and LZMA2 encoders support  various  compression  levels
72              (or encoder presets) set as character ``p'' and a preset number.
73              ``p1'' is the fastest one with the worst compression  ratio  and
74              ``p9'' is the slowest but with the best possible ratio; e.g.  -c
75              zip:3:p9 for Deflate encoding with maximum compression level and
76              floating point predictor.
77
78       -f     Specify  the  bit  fill order to use in writing output data.  By
79              default, tiffcp will create a new file with the same fill  order
80              as  the  original.   Specifying -f lsb2msb will force data to be
81              written with the FillOrder tag set to LSB2MSB, while -f  msb2lsb
82              will  force  data  to  be  written with the FillOrder tag set to
83              MSB2LSB.
84
85       -i     Ignore non-fatal read errors  and  continue  processing  of  the
86              input file.
87
88       -l     Specify  the  length  of a tile (in pixels).  tiffcp attempts to
89              set the tile dimensions so that no more than 8 kilobytes of data
90              appear in a tile.
91
92       -L     Force  output to be written with Little-Endian byte order.  This
93              option only has an effect when the output  file  is  created  or
94              overwritten and not when it is appended to.
95
96       -M     Suppress the use of memory-mapped files when reading images.
97
98       -o offset
99              Set initial directory offset.
100
101       -p     Specify  the  planar  configuration to use in writing image data
102              that has one 8-bit sample per pixel.  By  default,  tiffcp  will
103              create  a  new  file  with  the same planar configuration as the
104              original.  Specifying -p contig will force data  to  be  written
105              with  multi-sample  data packed together, while -p separate will
106              force samples to be written in separate planes.
107
108       -r     Specify the number of rows (scanlines) in  each  strip  of  data
109              written  to  the  output  file.   By default (or when value 0 is
110              specified), tiffcp attempts to set the rows/strip that  no  more
111              than  8 kilobytes of data appear in a strip. If you specify spe‐
112              cial value -1 it will results in infinite number of the rows per
113              strip. The entire image will be the one strip in that case.
114
115       -s     Force  the  output  file  to  be  written with data organized in
116              strips (rather than tiles).
117
118       -t     Force the output file to be written with data organized in tiles
119              (rather than strips). options can be used to force the resultant
120              image to be written as strips or tiles of data, respectively.
121
122       -w     Specify the width of a tile (in pixels).  tiffcp attempts to set
123              the  tile  dimensions  so  that no more than 8 kilobytes of data
124              appear in a tile.  tiffcp attempts to set the tile dimensions so
125              that no more than 8 kilobytes of data appear in a tile.
126
127       -x     Force  the  output  file  to be written with PAGENUMBER value in
128              sequence.
129
130       -8     Write BigTIFF instead of classic TIFF format.
131
132       -,=character
133              substitute character for `,' in parsing image directory  indices
134              in  files.  This is necessary if filenames contain commas.  Note
135              that -,= with whitespace immediately following will disable  the
136              special meaning of the `,' entirely.  See examples.
137

EXAMPLES

139       The  following  concatenates  two files and writes the result using LZW
140       encoding:
141              tiffcp -c lzw a.tif b.tif result.tif
142
143       To convert a G3 1d-encoded TIFF to a single strip  of  G4-encoded  data
144       the following might be used:
145              tiffcp -c g4 -r 10000 g3.tif g4.tif
146       (1000  is  just  a number that is larger than the number of rows in the
147       source file.)
148
149       To extract a selected set of images from a multi-image TIFF  file,  the
150       file  name may be immediately followed by a `,' separated list of image
151       directory indices.  The first image is always in directory 0.  Thus, to
152       copy   the   1st   and  3rd  images  of  image  file  ``album.tif''  to
153       ``result.tif'':
154              tiffcp album.tif,0,2 result.tif
155
156       A trailing comma denotes remaining images in sequence.   The  following
157       command will copy all image with except the first one:
158              tiffcp album.tif,1, result.tif
159
160       Given  file  ``CCD.tif''  whose first image is a noise bias followed by
161       images which include that bias,  subtract  the  noise  from  all  those
162       images following it (while decompressing) with the command:
163              tiffcp -c none -b CCD.tif CCD.tif,1, result.tif
164
165       If  the  file  above  were named ``CCD,X.tif'', the -,= option would be
166       required to correctly parse this filename with image numbers,  as  fol‐
167       lows:
168              tiffcp -c none -,=% -b CCD,X.tif CCD,X%1%.tif result.tif
169

SEE ALSO

171       pal2rgb(1),   tiffinfo(1),   tiffcmp(1),  tiffmedian(1),  tiffsplit(1),
172       libtiff(3TIFF)
173
174       Libtiff library home page: http://www.simplesystems.org/libtiff/
175
176
177
178libtiff                        February 24, 2007                     TIFFCP(1)
Impressum