Gets an image that contains one or more page thumbnails.
public RasterImage GetThumbnailsGrid(
int firstPageNumber,
int lastPageNumber,
int maximumGridWidth
)
Public Function GetThumbnailsGrid(
ByVal firstPageNumber As Integer,
ByVal lastPageNumber As Integer,
ByVal maximumGridWidth As Integer
) As RasterImage
public:
RasterImage^ GetThumbnailsGrid(
int firstPageNumber,
int lastPageNumber,
int maximumGridWidth
)
public RasterImage getThumbnailsGrid(int firstPageNumber, int lastPageNumber, int maximumGridWidth)
firstPageNumber
1-based number of the first page number in the document.
lastPageNumber
1-based number of the last page number in the document.
maximumGridWidth
The maximum width of the grid in pixels.
A raster image object that contains the thumbnails in a grid layout.
Thumbnail grids can be used to obtain the thumbnails of one or more pages in a single call. The result image will contain the images in a grid layout, left to right by row; each image will be of size thumbnailPixelSize. The grid width will be less than or equal to maximumGridWidth in pixels. The number of columns is calculated by dividing maximumGridWidth by the thumbnailPixelSize width. The grid height and number of rows is determined by the columns and total number of images to obtain.
The total number of images to obtain is calculated from firstPageNumber and lastPageNumber. If lastPageNumber is 0 or -1, the last page number in the document will be used; in this case, all pages from firstPageNumber to the end of the document will be returned in the thumbnail grid.
The LEADTOOLS Document Viewer can use GetThumbnailsGrid to speed up obtaining the thumbnails of the pages in the document instead of iterating each page and calling DocumentPage.GetThumbnailImage.
Note that this method does not update the cache.
Consider the following parameters:
In this example, we will load 10 images (specified by firstPageNumber and lastPageNumber). Each image will be 100 pixels by 100 pixels. Because maximumGridWidth is 300, and the width of a single image is 100, we will have 3 columns. Because we have 10 images and 3 columns, we can calculate that we will need four rows. Our images will look like this:
Full Image - 3 columns, 4 rows
+----+----+----+
| 1 | 2 | 3 |
+----+----+----+
| 4 | 5 | 6 |
+----+----+----+
| 7 | 8 | 9 |
+----+----+----+
| 10 | __ | __ |
+----+----+----+
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