←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#
Objective-C
C++/CLI
Java
Python
public bool AllPages { get; set; } 
@property (nonatomic, assign) BOOL allPages; 
public boolean getAllPages() 
public void setAllPages(boolean value) 
public: 
property bool AllPages { 
   bool get(); 
   void set (    bool ); 
} 
AllPages # get and set (CodecsLoadOptions) 

Property Value

Value Description
true To load all the pages of a file.
false To load a single page of a file. false is the default value.
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 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Codecs Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.