2019.03.30 14:03 "Re: [Tiff] combining TIFF images, not multi-page", by Even Rouault
On vendredi 29 mars 2019 19:14:53 CET Paul Hemmer wrote:
I found tiffcp in the distribution, and it does a nice job of taking multiple files and combining them into a multi-page TIFF.
I have a folder full of images and I want to combine them into one large TIFF (possibly BigTIFF as needed) not as a multi-page TIFF but by concatenating the files side by side (left to right) into a single page TIFF.
Is this possible using LibTIFF? To append pixel data incrementally to an existing file? The goal is that I can create the resulting file without having to allocate enough RAM to hold everything in memory to be written at once.
You may use GDAL, and its https://gdal.org/gdal_merge.html utility, to create such a mosaic. It will use modest amount of RAM (if your final image is very large, like 10's million of pixels or more, then tiling will be highly recommended)
GDAL is mainly for geospatial imagery, but can be abused to do things like you mention. You will need to asociate a worldfile (.wld) (see https://en.wikipedia.org/wiki/World_file) to each source image, so as to attribute them fake coordinates in the final mosaic Like for the first image:
0 <--x coordinate in the final image
If the first image was 1024 pixel wide, for the second image:
1024 <--x coordinate in the final image
The https://gdal.org/gdaladdo.html uility can be used to create pyramids.
Spatialys - Geospatial professional services