Leadtools.Codecs Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.12.17
RasterCodecs Class
See Also  Members   Example 
Leadtools.Codecs Namespace : RasterCodecs Class




Provides support for loading and saving raster image files.

Object Model


Syntax

Visual Basic (Declaration) 
Public Class RasterCodecs 
Visual Basic (Usage)Copy Code
Dim instance As RasterCodecs
C# 
public class RasterCodecs 
Managed Extensions for C++ 
public __gc class RasterCodecs 
C++/CLI 
public ref class RasterCodecs 

Example

Visual BasicCopy Code
RasterCodecs
      Public Sub RasterCodecsExample()
         RasterCodecs.Startup()
         Dim codecs As RasterCodecs = New RasterCodecs()

         Dim srcFileName As String = "C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Image1.cmp"
         Dim dstFileName As String = "C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Image1_test.jpg"

         Dim image As RasterImage = codecs.Load(srcFileName)
         codecs.Save(image, dstFileName, RasterImageFormat.Jpeg, 0)

         ' Clean up
         image.Dispose()
         codecs.Dispose()
         RasterCodecs.Shutdown()
      End Sub
C#Copy Code
RasterCodecs 
      public void RasterCodecsExample() 
      { 
         RasterCodecs.Startup(); 
         RasterCodecs codecs = new RasterCodecs(); 
 
         string srcFileName = @"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Image1.cmp"; 
         string dstFileName = @"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Image1_test.jpg"; 
 
         RasterImage image = codecs.Load(srcFileName); 
         codecs.Save(image, dstFileName, RasterImageFormat.Jpeg, 0); 
 
         // Clean up 
         image.Dispose(); 
         codecs.Dispose(); 
         RasterCodecs.Shutdown(); 
      }

Remarks

LEADTOOLS provides many options for loading and saving image files.

Whether an image file is on disk or in memory, you can get information about the image before loading it. You can also handle file-format-specific information, such as the page number or physical resolution.

You can supply the input for a load operation or the output of a save operation, and you can add processing, such as a paint-while-load feature.

Inheritance Hierarchy

System.Object
   Leadtools.Codecs.RasterCodecs

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