Overview of TiffRectoVerso project

1.0

TiffRectoVerso is an application to manipulate recto and verso pages in multipages Tiff.

-----------------

-----------------

History

TIFF format (http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf) defines a way to store in one file several pages. This is very handfull when you need to digitalize a whole document with an auto-feeded scanner: instead of storing each page of the document in a new file, you keep all of them in one TIFF file.

When i tried to use the system for the first time it appeared that my scanner couldn't understand two faces pages and would only scan one face at a time. So I would put the whole pack of pages one one side, and then flip my pack to scan the other side. But in the end I got a multipages TIFF file with all rectoes in the first pages and then all versoes after (and in reverse order). So I decided to create this little application.

I realized too that if I applied TiffRectoVerso on a well ordered file, I would get a result that I could'nt use anymore, so I implemented the reverse processus as well (split instead of join). I discovered afterwards that when you want to print on a printer that doesn't handle two side pages, the splitting can be very useful too.

-----------------

Usage

TiffRectoVerso [-s] file1 file2 ...

Option: -s Split rectoes and versoes instead of joining them.

Modify the files in place.

-----------------

Performances

Modifying the order of pages in a multipages TIFF is really fast and doesn't lose any data at all even with custom tags or specifications.

-----------------

Code overview

Console application entry point starts in the function _tmain. This function parses command line arguments and for each file :

The multipages are described in a TIFF file as Image File Directories. They are chained e.g. at first you can easily find the first one and this one will indicate where is the next one and so on. The CTiffFile constructor will parse the IFDs chain and locate every pages. Each reference to a page is sotred in a CImageFileDirectory.

To change order of pages, CTiffFile class has functions that can manipulate the CImageFileDirectory objets without breaking the chain. An easy way to do so is only to change the location of next IFD in one IFD but you have to be sure that you don't create cycles or lose one IFD in your IFDs chain.

-----------------

Files

-----------------

Enjoy

--

Pascal Corpet

tiffrectoverso at pascal.corpet.net


Generated on Fri Nov 23 14:35:54 2007 for TiffRectoVerso by  doxygen 1.5.4