Leadtools.Codecs Namespace > CodecsLoadOptions Class : AllPages Property |
public bool AllPages {get; set;}
'Declaration Public Property AllPages As Boolean
'Usage Dim instance As CodecsLoadOptions Dim value As Boolean instance.AllPages = value value = instance.AllPages
public bool AllPages {get; set;}
get_AllPages();
set_AllPages(value);
Object.defineProperty('AllPages');
This option controls how the RasterCodecs load methods that do not take a first and last page number parameters load the Leadtools.RasterImage.
For example, the RasterCodecs.Load(string fileName) method will try to load all the pages of the file when the value of AllPages is true. This is the equivalent of calling this method:
rasterImage = RasterCodecs.Load(
fileName, // File Name
0, // bitsPerPixel
CodecsLoadByteOrder.BgrOrGray, // order
1, // firstPage
-1) // lastPage (load all)
If the file format supports and contains multiple pages, the result Leadtools.RasterImage object will contain all the pages of the file.
Calling RasterCodecs.Load(string fileName) with AllPages set to false is the equivalent of calling this method:
rasterImage = RasterCodecs.Load(
fileName, // File Name
0, // bitsPerPixel
CodecsLoadByteOrder.BgrOrGray, // order
1, // firstPage
1) // lastPage (just the first page of the file)
Even if the file format supports and contains multiple pages, the result Leadtools.RasterImage object will contain only one page (the first page) of the file.
Important: When RasterCodecs tries to load a file, it does not have initially any information about that (if it supports multiple pages, the number of pages to load), and hence, it will try to obtain this information from the file prior to loading it. Hence, calling any of the methods affected with the AllPages option set to true will result in slower loading time if all you need is load the first page of an image file.
Therefore, AllPages will be set to false in future versions of LEADTOOLS to speed up the default load operations. If you want to keep the old behavior, then you can either set the AllPages value back to true manually prior to calling any of the above methods or use any of the overload versions that accept a first and last page number parameters.
Methods affected by AllPages: