2019.01.12 17:25 "[Tiff] tiffcp altering image contents (in contrast to what the manual says)?", by Binarus

2019.01.15 08:18 "Re: [Tiff] tiffcp altering image contents (in contrast to what the manual says)?", by Binarus

Dear Dan,

thank you very much for this insight.

On 14.01.2019 18:44, Daniel McCoy wrote:

It might be worthwhile to look at the output of "tiffinfo -s". That will show the strip offsets and strip lengths.

If tiffcp were just compressing out unused gaps in the file, the number of strips

and strip byte counts would be the same, but the strip offsets would change. If this were the case, you wouldn't even have to make your multi-page tiff to check,

you could just "tiffcp" each of the files individually then compare the output of "tiffinfo -s"

for the before and after versions. If only the offsets change, then the actual image data

is probably not the same and the file has just been "defragmented".

I have followed your advice and have seen that the image data definitely is changed. Please see my next message with my question reworded and simplified extremely, and with an example image.

Why: Some tiff writing programs flush incomplete directories to the file while writing.

As the directory grows in length with strips being added, it has to keep being relocated to the end of file, leaving unused gaps between some strips. This can happen with programs which do not know

the whole image beforehand and want partial images to be recoverable. (Renderer, scanner, ...)

If this is the case, then running the file through tiffcp essentially would perform garbage collection on the file, resulting in a smaller file with exactly the same data in it.

Thank you very much for explaining. Unfortunately, this does not seem to be what is happening...

Thanks again,