TIFFCP(1)
πΈ NAME πΈ
okay bestie, meet tiffcp from the LibTIFF manual pages π β it copies (and possibly converts) a TIFF file. that's the whole vibe. no cap.
β¨ SYNOPSIS β¨
tiffcp [ options ] src1.tif β¦ srcN.tif dst.tif
likeβ¦ one file, or a whole little squad of files, and then one destination at the end. she's a collector π«Ά
π DESCRIPTION π
so tiffcp takes one or more files made according to the Tag Image File Format, Revision 6.0 and smooshes them into a single TIFF file. iconic behavior, honestly. and because the output file can be compressed with a totally different algorithm than the input files, tiffcp is most often used to convert between different compression schemes. that's her main character moment π
by default, tiffcp copies all the understood tags in a TIFF directory of an input file over to the associated directory in the output file. everything understood, everything carried over, no drama.
tiffcp can also be used to reorganize the storage characteristics of data in a file, but β and this is important, bestie, listen β it is explicitly intended to not alter or convert the image data content in any way. the pixels stay the pixels. periodt.
π OPTIONS π
-aβ append to an existing output file instead of overwriting it. no deleting, just adding π-bimage β subtract the following monochrome image from all others processed. this can be used to remove a noise bias from a set of images. this bias image is typically an image of noise the camera saw with its shutter closed. (so like, the camera's raw ghost noise, and we're subtracting it out β¨)-Bβ force output to be written with Big-Endian byte order. heads up though: this option only has an effect when the output file is created or overwritten, and not when it is appended to.-Cβ suppress the use of "strip chopping" when reading images that have a single strip/tile of uncompressed data.-cβ specify the compression to use for data written to the output file. the roster is:-c nonefor no compression,-c packbitsfor PackBits compression,-c lzwfor Lempel-Ziv & Welch compression,-c zipfor Deflate compression,-c lzmafor LZMA2 compression,-c jpegfor baseline JPEG compression,-c g3for CCITT Group 3 (T.4) compression,-c g4for CCITT Group 4 (T.6) compression, or-c sgilogfor SGILOG compression.
by default, tiffcp will compress data according to the value of the Compression tag found in the source file. she's a follower sometimes, it's fine.
the CCITT Group 3 and Group 4 compression algorithms can only be used with bilevel data. no exceptions, bestie.
Group 3 compression can be specified together with several T.4-specific options:
1dfor 1-dimensional encoding,2dfor 2-dimensional encoding, andfillto force each encoded scanline to be zero-filled so that the terminating EOL code lies on a byte boundary.
Group 3-specific options are specified by appending a :-separated list to the g3 option; e.g. -c g3:2d:fill to get 2D-encoded data with byte-aligned EOL codes. cute, right?
LZW, Deflate and LZMA2 compression can be specified together with a predictor value. a predictor value of 2 causes each scanline of the output image to undergo horizontal differencing before it is encoded; a value of 1 forces each scanline to be encoded without differencing. a value 3 is for floating point predictor which you can use if the encoded data are in floating point format. LZW-specific options are specified by appending a :-separated list to the lzw option; e.g. -c lzw:2 for LZW compression with horizontal differencing.
Deflate and LZMA2 encoders support various compression levels (or encoder presets) set as character p and a preset number. p1 is the fastest one with the worst compression ratio and p9 is the slowest but with the best possible ratio; e.g. -c zip:3:p9 for Deflate encoding with maximum compression level and floating point predictor. she said "I'll wait" and she meant it π
for the Deflate codec, and in a libtiff build with libdeflate enabled, p12 is actually the maximum level.
for the Deflate codec, and in a libtiff build with libdeflate enabled, s0 can be used to require zlib to be used, and s1 for libdeflate (defaults to libdeflate when it is available).
-ffillorder β specify the bit fill order to use in writing output data. by default,tiffcpwill create a new file with the same fill order as the original. specifying-f lsb2msbwill force data to be written with theFillOrdertag set toLSB2MSB, while-f msb2lsbwill force data to be written with theFillOrdertag set toMSB2LSB.-iβ ignore non-fatal read errors and continue processing of the input file. she's forgiving π-lβ specify the length of a tile (in pixels).tiffcpattempts to set the tile dimensions so that no more than 8 kilobytes of data appear in a tile.-Lβ force output to be written with Little-Endian byte order. same lil caveat as her sister-B: this option only has an effect when the output file is created or overwritten and not when it is appended to.-Mβ suppress the use of memory-mapped files when reading images.-ooffset β set initial directory offset.-pβ specify the planar configuration to use in writing image data that has one 8-bit sample per pixel. by default,tiffcpwill create a new file with the same planar configuration as the original. specifying-p contigwill force data to be written with multi-sample data packed together, while-p separatewill force samples to be written in separate planes.-rβ specify the number of rows (scanlines) in each strip of data written to the output file. by default (or when value0is specified),tiffcpattempts to set the rows/strip that no more than 8 kilobytes of data appear in a strip. if you specify special value-1it will results in infinite number of the rows per strip. the entire image will be the one strip in that case. one strip. the whole thing. she's not like other girls π-sβ force the output file to be written with data organized in strips (rather than tiles).-tβ force the output file to be written with data organized in tiles (rather than strips). options can be used to force the resultant image to be written as strips or tiles of data, respectively.-wβ specify the width of a tile (in pixels).tiffcpattempts to set the tile dimensions so that no more than 8 kilobytes of data appear in a tile.-xβ force the output file to be written withPAGENUMBERvalue in sequence.-8β write BigTIFF instead of classic TIFF format. big girl energy π¦-,=character β substitute character for,in parsing image directory indices in files. this is necessary if filenames contain commas. note that-,=with whitespace immediately following will disable the special meaning of the,entirely. see examples.-msize β set maximum memory allocation size (in MiB). the default is256MiB. set to0to disable the limit.
π EXAMPLES π
the following concatenates two files and writes the result using LZW encoding:
tiffcp -c lzw a.tif b.tif result.tif
to convert a G3 1d-encoded TIFF to a single strip of G4-encoded data the following might be used:
tiffcp -c g4 -r 10000 g3.tif g4.tif
(1000 is just a number that is larger than the number of rows in the source file.)
to extract a selected set of images from a multi-image TIFF file, the file name may be immediately followed by a , separated list of image directory indices. the first image is always in directory 0. thus, to copy the 1st and 3rd images of image file album.tif to result.tif:
tiffcp album.tif,0,2 result.tif
a trailing comma denotes remaining images in sequence. the following command will copy all image with except the first one:
tiffcp album.tif,1, result.tif
given file CCD.tif whose first image is a noise bias followed by images which include that bias, subtract the noise from all those images following it (while decompressing) with the command:
tiffcp -c none -b CCD.tif CCD.tif,1, result.tif
if the file above were named CCD,X.tif, the -,= option would be required to correctly parse this filename with image numbers, as follows:
tiffcp -c none -,=% -b CCD,X.tif CCD,X%1%.tif result.tif
π SEE ALSO π
pal2rgb (1), tiffinfo (1), tiffcmp (1), tiffmedian (1), tiffsplit (1), libtiff (3tiff)
go read those too, bestie, they're all in the same friend group π«Ά
π AUTHOR π
LibTIFF contributors
π COPYRIGHT π
1988-2025, LibTIFF contributors
okay that's the whole page, you ate it, you understood it, I'm so proud π₯Ή this was LibTIFF version 4.7, dated Jun 27, 2026 β now go forth and copy some TIFFs, mwah πβ¨
π¦ where this page comes from
- fedora 43: libtiff-tools 4.7.2-1.fc43
- fedora 43: libtiff-tools 4.7.2-3.fc43 Β· libtiff
- fedora 44: libtiff-tools 4.7.2-1.fc44
- fedora 44: libtiff-tools 4.7.2-3.fc44 Β· libtiff
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms