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