]> git.saurik.com Git - wxWidgets.git/blame - src/tiff/man/tiffcp.1
missing commit
[wxWidgets.git] / src / tiff / man / tiffcp.1
CommitLineData
80ed523f 1.\" $Id: tiffcp.1,v 1.12 2010-12-23 13:38:47 dron Exp $
8414a40c
VZ
2.\"
3.\" Copyright (c) 1988-1997 Sam Leffler
4.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
5.\"
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.
13.\"
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.
17.\"
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
23.\" OF THIS SOFTWARE.
24.\"
25.if n .po 0
80ed523f 26.TH TIFFCP 1 "February 24, 2007" "libtiff"
8414a40c
VZ
27.SH NAME
28tiffcp \- copy (and possibly convert) a
29.SM TIFF
30file
31.SH SYNOPSIS
32.B tiffcp
33[
34.I options
35]
36.I "src1.tif ... srcN.tif dst.tif"
37.SH DESCRIPTION
38.I tiffcp
39combines one or more files created according
40to the Tag Image File Format, Revision 6.0
41into a single
42.SM TIFF
43file.
44Because the output file may be compressed using a different
45algorithm than the input files,
46.I tiffcp
47is most often used to convert between different compression
48schemes.
49.PP
50By default,
51.I tiffcp
52will copy all the understood tags in a
53.SM TIFF
54directory of an input
55file to the associated directory in the output file.
56.PP
57.I tiffcp
58can be used to reorganize the storage characteristics of data
59in a file, but it is explicitly intended to not alter or convert
60the image data content in any way.
61.SH OPTIONS
62.TP
80ed523f 63.BI \-b " image"
8414a40c
VZ
64subtract the following monochrome image from all others
65processed. This can be used to remove a noise bias
66from a set of images. This bias image is typically an
67image of noise the camera saw with its shutter closed.
68.TP
69.B \-B
70Force output to be written with Big-Endian byte order.
71This option only has an effect when the output file is created or
72overwritten and not when it is appended to.
73.TP
74.B \-C
75Suppress the use of ``strip chopping'' when reading images
76that have a single strip/tile of uncompressed data.
77.TP
78.B \-c
79Specify the compression to use for data written to the output file:
80.B none
81for no compression,
82.B packbits
83for PackBits compression,
84.B lzw
85for Lempel-Ziv & Welch compression,
8414a40c
VZ
86.B zip
87for Deflate compression,
80ed523f
VZ
88.B lzma
89for LZMA2 compression,
90.B jpeg
91for baseline JPEG compression,
8414a40c
VZ
92.B g3
93for CCITT Group 3 (T.4) compression,
94and
95.B g4
96for CCITT Group 4 (T.6) compression.
97By default
98.I tiffcp
99will compress data according to the value of the
100.I Compression
101tag found in the source file.
102.IP
103The
104.SM CCITT
105Group 3 and Group 4 compression algorithms can only
106be used with bilevel data.
107.IP
108Group 3 compression can be specified together with several
109T.4-specific options:
110.B 1d
111for 1-dimensional encoding,
112.B 2d
113for 2-dimensional encoding,
114and
115.B fill
116to force each encoded scanline to be zero-filled so that the
117terminating EOL code lies on a byte boundary.
118Group 3-specific options are specified by appending a ``:''-separated
119list to the ``g3'' option; e.g.
120.B "\-c g3:2d:fill"
121to get 2D-encoded data with byte-aligned EOL codes.
122.IP
80ed523f
VZ
123.SM LZW, Deflate
124and
125.SM LZMA2
8414a40c
VZ
126compression can be specified together with a
127.I predictor
80ed523f
VZ
128value. A predictor value of 2 causes each scanline of the output image to
129undergo horizontal differencing before it is encoded; a value of 1 forces each
130scanline to be encoded without differencing. A value 3 is for floating point
131predictor which you can use if the encoded data are in floating point format.
132LZW-specific options are specified by appending a ``:''-separated list to the
133``lzw'' option; e.g.
8414a40c
VZ
134.B "\-c lzw:2"
135for
136.SM LZW
137compression with horizontal differencing.
80ed523f
VZ
138.IP
139.SM Deflate
140and
141.SM LZMA2
142encoders support various compression levels (or encoder presets) set as
143character ``p'' and a preset number. ``p1'' is the fastest one with the worst
144compression ratio and ``p9'' is the slowest but with the best possible ratio;
145e.g.
146.B "\-c zip:3:p9"
147for
148.SM Deflate
149encoding with maximum compression level and floating point predictor.
8414a40c
VZ
150.TP
151.B \-f
152Specify the bit fill order to use in writing output data.
153By default,
154.I tiffcp
155will create a new file with the same fill order as the original.
156Specifying
157.B "\-f lsb2msb"
158will force data to be written with the FillOrder tag set to
159.SM LSB2MSB,
160while
161.B "\-f msb2lsb"
162will force data to be written with the FillOrder tag set to
163.SM MSB2LSB.
164.TP
80ed523f
VZ
165.B \-i
166Ignore non-fatal read errors and continue processing of the input file.
167.TP
8414a40c
VZ
168.B \-l
169Specify the length of a tile (in pixels).
170.I tiffcp
171attempts to set the tile dimensions so
172that no more than 8 kilobytes of data appear in a tile.
173.TP
174.B \-L
175Force output to be written with Little-Endian byte order.
176This option only has an effect when the output file is created or
177overwritten and not when it is appended to.
178.TP
179.B \-M
180Suppress the use of memory-mapped files when reading images.
181.TP
182.B \-p
183Specify the planar configuration to use in writing image data
184that has one 8-bit sample per pixel.
185By default,
186.I tiffcp
187will create a new file with the same planar configuration as
188the original.
189Specifying
190.B "\-p contig"
191will force data to be written with multi-sample data packed
192together, while
193.B "\-p separate"
194will force samples to be written in separate planes.
195.TP
196.B \-r
197Specify the number of rows (scanlines) in each strip of data
198written to the output file.
199By default (or when value
200.B 0
201is specified),
202.I tiffcp
203attempts to set the rows/strip
204that no more than 8 kilobytes of data appear in a strip. If you specify
205special value
80ed523f 206.B \-1
8414a40c
VZ
207it will results in infinite number of the rows per strip. The entire image
208will be the one strip in that case.
209.TP
210.B \-s
211Force the output file to be written with data organized in strips
212(rather than tiles).
213.TP
214.B \-t
80ed523f
VZ
215Force the output file to be written with data organized in tiles (rather than
216strips). options can be used to force the resultant image to be written as
217strips or tiles of data, respectively.
8414a40c
VZ
218.TP
219.B \-w
220Specify the width of a tile (in pixels).
221.I tiffcp
80ed523f
VZ
222attempts to set the tile dimensions so that no more than 8 kilobytes of data
223appear in a tile.
8414a40c 224.I tiffcp
80ed523f
VZ
225attempts to set the tile dimensions so that no more than 8 kilobytes of data
226appear in a tile.
227.TP
228.B \-x
229Force the output file to be written with PAGENUMBER value in sequence.
8414a40c 230.TP
80ed523f
VZ
231.BI \-,= character
232substitute
233.I character
234for `,' in parsing image directory indices
8414a40c 235in files. This is necessary if filenames contain commas.
80ed523f
VZ
236Note that
237.B \-,=
238with whitespace immediately following will disable
239the special meaning of the `,' entirely. See examples.
8414a40c
VZ
240.SH EXAMPLES
241The following concatenates two files and writes the result using
242.SM LZW
243encoding:
244.RS
245.nf
80ed523f 246tiffcp \-c lzw a.tif b.tif result.tif
8414a40c
VZ
247.fi
248.RE
249.PP
250To convert a G3 1d-encoded
251.SM TIFF
252to a single strip of G4-encoded data the following might be used:
253.RS
254.nf
80ed523f 255tiffcp \-c g4 \-r 10000 g3.tif g4.tif
8414a40c
VZ
256.fi
257.RE
258(1000 is just a number that is larger than the number of rows in
259the source file.)
260
80ed523f
VZ
261To extract a selected set of images from a multi-image TIFF file, the file
262name may be immediately followed by a `,' separated list of image directory
263indices. The first image is always in directory 0. Thus, to copy the 1st and
2643rd images of image file ``album.tif'' to ``result.tif'':
8414a40c
VZ
265.RS
266.nf
267tiffcp album.tif,0,2 result.tif
268.fi
269.RE
270
80ed523f
VZ
271A trailing comma denotes remaining images in sequence. The following command
272will copy all image with except the first one:
273.RS
274.nf
275tiffcp album.tif,1, result.tif
276.fi
277.RE
278
279Given file ``CCD.tif'' whose first image is a noise bias
8414a40c
VZ
280followed by images which include that bias,
281subtract the noise from all those images following it
282(while decompressing) with the command:
283.RS
284.nf
80ed523f 285tiffcp \-c none \-b CCD.tif CCD.tif,1, result.tif
8414a40c
VZ
286.fi
287.RE
288
80ed523f
VZ
289If the file above were named ``CCD,X.tif'', the
290.B \-,=
291option would
8414a40c
VZ
292be required to correctly parse this filename with image numbers,
293as follows:
294.RS
295.nf
80ed523f 296tiffcp \-c none \-,=% \-b CCD,X.tif CCD,X%1%.tif result.tif
8414a40c
VZ
297.SH "SEE ALSO"
298.BR pal2rgb (1),
299.BR tiffinfo (1),
300.BR tiffcmp (1),
301.BR tiffmedian (1),
302.BR tiffsplit (1),
303.BR libtiff (3TIFF)
304.PP
305Libtiff library home page:
306.BR http://www.remotesensing.org/libtiff/