Leadtools Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.3.5
RasterImage Class
See Also  Members  
Leadtools Namespace : RasterImage Class




The RasterImage class serves as a working area for image manipulation and conversion. LEADTOOLS functions use this class for accessing the image in memory and for maintaining the characteristics of the image.

Object Model







Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class RasterImage 
Visual Basic (Usage)Copy Code
Dim instance As RasterImage
C# 
[SerializableAttribute()]
public class RasterImage 
Managed Extensions for C++ 
[SerializableAttribute()]
public __gc class RasterImage 
C++/CLI 
[SerializableAttribute()]
public ref class RasterImage 

Example

This example loads an image file from a disk file, and processes the image data before saving it back to disk.

Remarks

The RasterImage class is used to work with images defined by pixel data.

The RasterImage class contains contains methods and properties for dealing with images in memory. You can use this class to create images from scratch or load them from disk based files. Also, various other components of LEADTOOLS for .NET creates RasterImage objects from operations such as scanning and OCRing. Morever, the RasterImage class is the main LEADTOOLS object used when passing image data between different parts of the toolkit.

The RasterImage class lets you deal with individual rows or pixels of the image data. This class also contains methods and properties for the following:

  • Creating images
  • Accessing the image data
  • Adding regions to the image
  • Setting/Changing the palette for an image
  • Converting an image to a GDI+ Image
  • Creating a GDI+ Graphics object from an image
  • Painting an image

The RasterImage class implements the ISerializable interface and thus supports standard .NET serialization. For more information and examples regarding serialization of an RasterImage object, refer to RasterImage Serialization.

The RasterImage class also implements the IDisposable interface, it is recommended that you follow the standard .NET dispose pattern when using the RasterImage class. For more information, refer to IDisposable.

The LEADTOOLS RasterImage class supports storing images in memory in the following bits per pixel: 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 24, 32, 38 and 64. A 16-bpp image may be color or grayscale. If you are working with a 16-bit grayscale image. Support for 8-bit and 12-bit grayscale images is also provided.

The data of a RasterImage object can be stored in memory as uncompressed, RLE compressed or super compressed. Support for super compressing bitmaps is available only in the Document/Medical Imaging editions.

The RasterImage object can also store its data in disk-based swap files when conventional memory is not enough.

The RasterImage object can hold multiple pages with different sizes. The AddPage, AddPages, InsertPage and InsertPages methods allows adding new pages to an existing RasterImage.

The RemovePageAt, RemovePages and RemoveAllPages methods allows removing existing pages from a RasterImage object.

The PageCount property holds the total number of pages in a RasterImage object while the Page property allows you to change the current active page.

The current active page (The page indicated by the Page property) is used by default when accessing the data or a RasterImage object unless otherwise indicated.

The RasterImage object also contains a region of interest value that can be used to limit the portion available to update when using the image processing command. The region can be set using a geometric shape such as AddRectangleToRegion and AddEllipseToRegion or with image data attributes such as AddColorToRegion and AddMaskToRegion.

Inheritance Hierarchy

System.Object
   Leadtools.RasterImage

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also