]> git.saurik.com Git - wxWidgets.git/blame - src/tiff/man/tiffcp.1
Bring wxSpinCtrl closer to HIG
[wxWidgets.git] / src / tiff / man / tiffcp.1
CommitLineData
8414a40c
VZ
1.\" $Id: tiffcp.1,v 1.6 2005/11/02 11:07:19 dron Exp $
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
26.TH TIFFCP 1 "September 20, 2005" "libtiff"
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
63.B \-b image
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,
86.B jpeg
87for baseline JPEG compression,
88.B zip
89for Deflate compression,
90.B g3
91for CCITT Group 3 (T.4) compression,
92and
93.B g4
94for CCITT Group 4 (T.6) compression.
95By default
96.I tiffcp
97will compress data according to the value of the
98.I Compression
99tag found in the source file.
100.IP
101The
102.SM CCITT
103Group 3 and Group 4 compression algorithms can only
104be used with bilevel data.
105.IP
106Group 3 compression can be specified together with several
107T.4-specific options:
108.B 1d
109for 1-dimensional encoding,
110.B 2d
111for 2-dimensional encoding,
112and
113.B fill
114to force each encoded scanline to be zero-filled so that the
115terminating EOL code lies on a byte boundary.
116Group 3-specific options are specified by appending a ``:''-separated
117list to the ``g3'' option; e.g.
118.B "\-c g3:2d:fill"
119to get 2D-encoded data with byte-aligned EOL codes.
120.IP
121.SM LZW
122compression can be specified together with a
123.I predictor
124value.
125A predictor value of 2 causes
126each scanline of the output image to undergo horizontal
127differencing before it is encoded; a value
128of 1 forces each scanline to be encoded without differencing.
129LZW-specific options are specified by appending a ``:''-separated
130list to the ``lzw'' option; e.g.
131.B "\-c lzw:2"
132for
133.SM LZW
134compression with horizontal differencing.
135.TP
136.B \-f
137Specify the bit fill order to use in writing output data.
138By default,
139.I tiffcp
140will create a new file with the same fill order as the original.
141Specifying
142.B "\-f lsb2msb"
143will force data to be written with the FillOrder tag set to
144.SM LSB2MSB,
145while
146.B "\-f msb2lsb"
147will force data to be written with the FillOrder tag set to
148.SM MSB2LSB.
149.TP
150.B \-l
151Specify the length of a tile (in pixels).
152.I tiffcp
153attempts to set the tile dimensions so
154that no more than 8 kilobytes of data appear in a tile.
155.TP
156.B \-L
157Force output to be written with Little-Endian byte order.
158This option only has an effect when the output file is created or
159overwritten and not when it is appended to.
160.TP
161.B \-M
162Suppress the use of memory-mapped files when reading images.
163.TP
164.B \-p
165Specify the planar configuration to use in writing image data
166that has one 8-bit sample per pixel.
167By default,
168.I tiffcp
169will create a new file with the same planar configuration as
170the original.
171Specifying
172.B "\-p contig"
173will force data to be written with multi-sample data packed
174together, while
175.B "\-p separate"
176will force samples to be written in separate planes.
177.TP
178.B \-r
179Specify the number of rows (scanlines) in each strip of data
180written to the output file.
181By default (or when value
182.B 0
183is specified),
184.I tiffcp
185attempts to set the rows/strip
186that no more than 8 kilobytes of data appear in a strip. If you specify
187special value
188.B -1
189it will results in infinite number of the rows per strip. The entire image
190will be the one strip in that case.
191.TP
192.B \-s
193Force the output file to be written with data organized in strips
194(rather than tiles).
195.TP
196.B \-t
197Force the output file to be written with data organized in tiles
198(rather than strips).
199options can be used to force the resultant image to be written
200as strips or tiles of data, respectively.
201.TP
202.B \-w
203Specify the width of a tile (in pixels).
204.I tiffcp
205attempts to set the tile dimensions so
206that no more than 8 kilobytes of data appear in a tile.
207.I tiffcp
208attempts to set the tile dimensions so
209that no more than 8 kilobytes of data appear in a tile.
210.TP
211.B \-,={character}
212substitute {character} for ',' in parsing image directory indices
213in files. This is necessary if filenames contain commas.
214Note that ',=' with whitespace immediately following will disable
215the special meaning of the ',' entirely. See examples.
216.SH EXAMPLES
217The following concatenates two files and writes the result using
218.SM LZW
219encoding:
220.RS
221.nf
222tiffcp -c lzw a.tif b.tif result.tif
223.fi
224.RE
225.PP
226To convert a G3 1d-encoded
227.SM TIFF
228to a single strip of G4-encoded data the following might be used:
229.RS
230.nf
231tiffcp -c g4 -r 10000 g3.tif g4.tif
232.fi
233.RE
234(1000 is just a number that is larger than the number of rows in
235the source file.)
236
237To extract a selected set of images from a multi-image
238TIFF file, the file name may be immediately followed by a ','
239separated list of image directory indices. The first image
240is always in directory 0. Thus, to copy the 1st and 3rd
241images of image file "album.tif" to "result.tif":
242.RS
243.nf
244tiffcp album.tif,0,2 result.tif
245.fi
246.RE
247
248Given file "CCD.tif" whose first image is a noise bias
249followed by images which include that bias,
250subtract the noise from all those images following it
251(while decompressing) with the command:
252.RS
253.nf
254tiffcp -c none -b CCD.tif CCD.tif,1, result.tif
255.fi
256.RE
257
258If the file above were named "CCD,X.tif", the "-,=" option would
259be required to correctly parse this filename with image numbers,
260as follows:
261.RS
262.nf
263tiffcp -c none -,=% -b CCD,X.tif CCD,X%1%.tif result.tif
264.SH "SEE ALSO"
265.BR pal2rgb (1),
266.BR tiffinfo (1),
267.BR tiffcmp (1),
268.BR tiffmedian (1),
269.BR tiffsplit (1),
270.BR libtiff (3TIFF)
271.PP
272Libtiff library home page:
273.BR http://www.remotesensing.org/libtiff/