Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.12.21
Loading and Saving Large Tiff Files

TIFF files can contain large numbers of pages. This can make loading and saving these TIFF files very time consuming. Using an IFD (Image File Directory) speeds up loading, saving and getting information from very large TIFF files. The IFD is essentially an offset within the TIFF file where a page starts.

The CodecsImageInfo class contains a Tiff.ImageFileDirectoryOffset (IFD) member that contains the offset of the desired page within the TIFF file.

To get the RasterCodecs.GetInformation method to use an IFD, set the RasterCodecs.Options.Tiff.Load.ImageFileDirectoryOffset value to the IFD and indicate within this class object that the IFD information is valid. Caution should be taken in using the IFD, since incorrect values could have unexpected consequences. Also note that the page numbering is different if the IFD is used: page 1 is the page whose IFD is indicated in the CodecsLoadOptions class object, page 2 is the page after the page whose IFD is indicated, etc.

The CompactFile method lets you compact TIFF files. It also lets you copy or extract one or more pages from a TIFF file and copy them without recompression to another TIFF file.

Whenever you save an image containing a region as a TIFF file format, the region is also saved. Note, however, that the ability to save a region inside a TIFF file must be unlocked. This requires the Document Imaging Toolkit, Document Imaging Suite, Medical Imaging Toolkit, or Medical Imaging Suite.