←Select platform

CreateThumbnail Method

Summary

Creates a thumbnail image of this IOcrPage.

Syntax
C#
VB
Objective-C
C++
Java
public RasterImage CreateThumbnail( 
   int thumbnailWidth, 
   int thumbnailHeight 
) 
Function CreateThumbnail( _ 
   ByVal thumbnailWidth As Integer, _ 
   ByVal thumbnailHeight As Integer _ 
) As RasterImage 
- (nullable LTRasterImage *)createThumbnailWithWidth:(NSUInteger)thumbnailWidth  
                                              height:(NSUInteger)thumbnailHeight  
                                               error:(NSError **)error 
public RasterImage createThumbnail(int thumbnailWidth, 
                                   int thumbnailHeight) 
RasterImage^ CreateThumbnail(  
   int thumbnailWidth, 
   int thumbnailHeight 
)  

Parameters

thumbnailWidth
The desired maximum width of the thumbnail image in pixels.

thumbnailHeight
The desired maximum height of the thumbnail image in pixels.

Return Value

A RasterImage object that contains a thumbnail of this IOcrPage.

Remarks

The thumbnail image returned from this image always contain the correct aspect ratio. The width and height of the thumbnail is guaranteed to be at least thumbnailWidth by thumbnailHeight in size but never exceeding that. The only time you get a thumbnail that is exactly thumbnailWidth by thumbnailHeight pixels is when this IOcrPage is a perfect square.

The thumbnail image returned from this method will always contain 24 bits per pixel for best possible quality.

One use of the thumbnail image of a page is if your application is a Windows Forms-based application containing the ImageViewer control. You can use CreateThumbnail to obtain thumbnails of the pages in the engine and use them as items to the ImageViewer. For an example, refer to the C# or VB.NET Main OCR Demo that ships with LEADTOOLS.

Example

For an example, refer to IOcrPage.

Requirements

Target Platforms

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

Leadtools.Ocr Assembly