←Select platform

AllPages Property

Summary

Gets or sets a value that indicates whether RasterCodecs should try to load all the pages of a file by default.

Syntax
C#
VB
Objective-C
C++
Java
public bool AllPages { get; set; } 
Public Property AllPages As Boolean 
@property (nonatomic, assign) BOOL allPages 
public boolean getAllPages() 
public void setAllPages(boolean value) 
public: 
property bool AllPages { 
   bool get(); 
   void set (    bool ); 
} 

Property Value

true to load all the pages of a file by default; otherwise, false. Default value is false.

Remarks

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:

Requirements

Target Platforms

Help Version 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Codecs Assembly