Comine/Adjoin TIF images into one multi-image TIF

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
palpacino

Comine/Adjoin TIF images into one multi-image TIF

Post by palpacino »

Hello All!

My company has faxes coming in electronically that are all saved as TIF files on our network.

For each file that comes in, it will need to be added to the beginning of the previous fax file if one already exists for that customer. This is all pretty straight forward for a set of TIF files that dont have that many pages in them. However, when the TIF files start to get bigger with 40 pages or so and the program goes to add 10 more pages to it, for example, it gets really really slow.

It takes about 4 seconds typically with the smaller files. But when it increases by just a few dozen pages, the time it takes to complete the task goes up exponentially to perhaps 6 MINUTES. In my case, it is not considered acceptable by the end users. I would like to get the time down to 10 seconds or less.

I am running in windows XP on the latest version of IM and running it via a DOS command line from VB (long story).

Here is the command I am running:

Code: Select all

Convert -compress Group4 -negate -combine "C:\1.tif" "C:\2.tif" -write tif:"C:\output.tif"
1) A good question to ask is about something I've only been recently reading about as I am still a new guy. But what about the order of operations? Am I doing OK above by doing Compress, Negate, Combine in that order?

2) I guess a good idea might be to break them down as simple as possible and Combine them last so the combine part doesn't take that long?

3) Might it be a good idea to write out all the pages in each of the tif files as individual picture files then combine them all up later? Or is that what IM is really doing anyway?

4) Could I loop through the individual pages in the new TIF file and, one-by-one, send an -insert command to the old TIF file and it would work fast that way?

Thank you guys for any help on this one!
Post Reply