2007.12.28 11:37 "[Tiff] FW: HELP: how to merge 2 tiffs into 1", by Andrew Wan

2007.12.28 17:30 "[Tiff] Interleaving images from multiple Tiff files", by Richard Nolde

Andrew,

Two solutions come to mind. A very inefficient way to do this would be to use tiffsplit to break each input file into separate output files and then tiffcp to put them back together in a different order.

If you want to do this on a regular basis, look at tiffcp and modify the logic that reads files sequentially to read them in parallel. This will require you to rewrite the main function to use multiple file handles, one for each input file given as a parameter, and one for the single output file. Loop through your reads one input file at at time, writing each image to a single output file in sequence. You will have to maintain separate indices for the read image and the write image, but that should not be too hard. Of course, this assume that you are using all the input images. You could select individual images from the input image with the current logic in tiffcp if you always want the same sequence from each input file. If you want to select independently from each input file, build a list structure for each one and modify the parser to associate each list with a specific input file.

Richard Nolde

> Message: 3
> Date: Fri, 28 Dec 2007 11:37:49 +0000
> From: Andrew Wan <andrew_wan1980@hotmail.com>
> Subject: [Tiff] FW: HELP: how to merge 2 tiffs into 1
> To: <tiff@lists.maptools.org>

> Message-ID: <BAY139-W22898EFD9605145F1AC09AE3550@phx.gbl> > Content-Type: text/plain; charset="windows-1252"

Apologies for confusion of my post. What I mean is merging 2 tiff files.... where EACH tiff file has multiple TIFF images inside them. So tiff1.tiff has 25 images inside the file. tiff2.tiff has 25 images inside the file. What I want to do is extra the images from each file and put them into a new tiff file. Problem is, I want to INTERLACE the ordering. Get what I mean?

From: andrew_wan1980@hotmail.comTo: tiff@lists.maptools.orgSubject: HELP: how to merge 2 tiffs into 1Date: Thu, 27 Dec 2007 17:40:46 +0000

I read the documentation and want to write a program to merge two tiff files which has directories inside them. I can load the 2 tiff files and cycle through the directories. But how does one alternatively extract each image and create a new image with all the directories interlaced? eg. tiff1.dir1, tiff2.dir1, tiff1.dir2, tiff2.dir2....