Gets or sets a value that indicates whether RasterCodecs should try to load all the pages of a file by default.
public bool AllPages { get; set; }
Public Property AllPages As Boolean
@property (nonatomic, assign) BOOL allPages
public boolean getAllPages()
public void setAllPages(boolean value)
true to load all the pages of a file by default; otherwise, false. Default value is false.
This option controls how the RasterCodecs load methods that do not take a first and last page number parameters load the 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 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 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:
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document