-----------------
-----------------
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.
-----------------
Option: -s Split rectoes and versoes instead of joining them.
Modify the files in place.
-----------------
-----------------
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.
-----------------
-----------------
Enjoy
--
Pascal Corpet
tiffrectoverso at pascal.corpet.net