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. To speed-up both the loading and saving of very large TIFF files, LEADTOOLS provides several properties.

The InfoIFD property contains an offset to the current page of a TIFF file. The page starting at this offset is considered page one, the next page is considered page 2, and so forth. The value of the InfoIFD property can be used for the LoadIFD and SaveIFD properties.

When loading a page from a TIFF file, setting the LoadIFD property tells the control to treat the page beginning at the specified offset as page 1. Therefore, the control does not have to go through all pages from the beginning of the file prior to loading the desired page.

Similarly, when saving a page to a TIFF file, setting the SaveIFD property tells the control to treat the page beginning at the specified offset as page 1. Pages after this offset can be replaced, appended or deleted more quickly, since the control does not have to go through all pages from the beginning of the file.

If you are loading a TIF or Exif file that looks rotated or flipped, try setting the IgnoreViewPerspective property before loading the file. To load the file as TOP_LEFT, pass TRUE to the IgnoreViewPerspective property, otherwise pass FALSE.

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.