CTiffFile Class Reference

A tiff file. More...

#include <TiffFile.h>

List of all members.

Public Member Functions

 CTiffFile (_TCHAR *i_pccFileName)
 Open a tiff file.
 ~CTiffFile ()
 Close file if open and clean up read directories.
uint16 ReadUInt16 ()
 Read next UInt16.
uint32 ReadAddress ()
 Read next address.
bool WriteAddress (uint32 i_address)
 Write address.
int SeekToAddress (uint32 i_address)
 Seek the file to address.
bool Closed () const
 Check if file is closed.
size_t ReadAllDirectories ()
 Parse all directories chain and fill m_allIfds and m_szNbIFDs.
int MixRectoAndVerso ()
 Mix recto and verso pages in a multipage tiff.
int SplitRectoAndVerso ()
 Split recto and verso pages in a multipage tiff.


Detailed Description

A tiff file.

Manages a file that should be a tiff. If it is not, close it quickly. To access or modify data, use functions ReadUInt16 ReadAddress, WriteAddress and SeekToAddress.


Constructor & Destructor Documentation

CTiffFile::CTiffFile ( _TCHAR *  i_pccFileName  ) 

Open a tiff file.

Parameters:
i_pccFileName the file name


Member Function Documentation

int CTiffFile::SeekToAddress ( uint32  i_address  ) 

Seek the file to address.

Parameters:
i_address number of bytes from beginnig of file
Returns:
same as fseek (0 if no error)

size_t CTiffFile::ReadAllDirectories (  ) 

Parse all directories chain and fill m_allIfds and m_szNbIFDs.

Returns:
the number of directories in the file

int CTiffFile::MixRectoAndVerso (  ) 

Mix recto and verso pages in a multipage tiff.

Reorder pages in good order assuming the pages or in wrong order : first all rectos and then all versos in reverse order. This is the order you get if you pile in a multipage tiff all your pages getting all the rectos, then turning your pack of pages upside down and then getting all versos).

 1 3 5 7 ... 8 6 4 2
Returns:
0 if everything went well

int CTiffFile::SplitRectoAndVerso (  ) 

Split recto and verso pages in a multipage tiff.

Do the exact opposite of MixRectoAndVerso. It can be useful if you want to print a multipage file but your printer doesn't handle double face printing.

Returns:
0 if everything went well


The documentation for this class was generated from the following files:
Generated on Fri Nov 23 14:35:54 2007 for TiffRectoVerso by  doxygen 1.5.4