2019.01.12 17:25 "[Tiff] tiffcp altering image contents (in contrast to what the manual says)?", by Binarus
I have four multi-page TIFF files (with names 1.tif, 2.tif, 3.tif and 4.tif) which I would like to combine into one multi-page TIFF file WITHOUT re-encoding them (more exactly: without re-encoding the pages / images they contain).
Each of the single pages IN A CERTAIN source file has the same color depth, compression scheme and compression scheme parameters. The color
depth, compression scheme and compression parameters are different between the source files, though, as the following table shows:
- tif: 7.75 MB / 24 BPP / JPEG / 4 pages (images)
- tif: 315 KB / 1 BPP / ZIP / 4 pages (images)
- tif: 13,94 MB / 24 BPP / JPEG / 8 pages (images)
- tif: 127 KB / 1 BPP / ZIP / 2 pages (images)
The combined size of the source files is about 22.12 MB.
As noted above, my goal is to merge the source files WITHOUT RE-ENCODING or touching the image data otherwise. I have tried to do this for several days now, but every tool I know obviously decodes each page to a representation in memory first and then outputs the pages, re-encoding them.
Then, by accident, I stumbled across tiffcp, which I didn't know until then, and which seems to be part of libtiff, and which let me hope due to the following sentence in the manual (man tiffcp):
"tiffcp can be used to reorganize the storage characteristics of data in a file, but it is explicitly intended to not alter or convert the image data content in any way."
So I tried
tiffcp 1.tif 2.tif 3.tif 4.tif out.tif
I was very disappointed when I noticed that out.tif had a size of 13.55 MB. This size reduction (from 22.12 MB to 13.55 MB) is by far too much to be explained by "pure merging effects". Hence, I am convinced that tiffcp DOES alter the image data in some way, although the manual states the opposite.
I would be very grateful if somebody could shed some light onto this issue.
Thank you very much in advance,