LEADTOOLS supports the following file formats which support multipage files:
To load all pages of a multipage file, use one of the Load methods that have the firstPage and lastPage parameters, setting firstPage to 1 and lastPage to -1.
Some multipage files can be loaded more quickly by one of two mechanisms, as follows:
- TIFF files can use the IFD to load a file more quickly. Use the RasterCodecs.GetInformation method to use an IFD by setting 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 can result in 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.
-
Some other multipage file formats (including DICOM, PDF, Jp2, among others), can use the OptimizedLoad functions. To use this mechanism, perform something like the following steps:
- Call the StartOptimizedLoad function.
- Create a loop from the same source file.
- In the loop, call one of the codecs.Load functions, passing the name of the source file.
- Perform any processing on the section that was loaded.
- When finished, call the StopOptimizedLoad function.