Atalasoft dotImage Send comments on this topic.
ImageDecoder Class
See Also  Members   Example 
Atalasoft.dotImage Assembly > Atalasoft.Imaging.Codec Namespace : ImageDecoder Class




An abstract (MustInherit in Visual Basic) base class that defines a file format decoder to read an image from a Stream.  All image decoders used in dotImage must inherit this class.

Syntax

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

Example

The following examples demonstrate how to decode an image from a file or Stream.  It will loop through all decoders and choose the first one that returns true from IsValidFormat.
Load an image from a Stream
C#Copy Code
FileStream fs = System.IO.File.OpenRead(@"c:\test.tif");
AtalaImage image =
new AtalaImage(fs);
Load an image from a Stream
Visual BasicCopy Code
Dim fs As FileStream = System.IO.File.OpenRead("c:\test.tif")
Dim image As AtalaImage = New AtalaImage(fs);
Load an image from a file
C#Copy Code
AtalaImage image = new AtalaImage(@"c:\test.tif");
Load an image from a file
Visual BasicCopy Code
Dim image As AtalaImage = New AtalaImage("c:\test.tif");

Remarks

To load an image from a stream, the AtalaImage constructor may be used, and passing in a string filename, or a Stream.  See the examples below

Inheritance Hierarchy

Requirements

Namespace: Atalasoft.Imaging.Codec

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: Atalasoft.dotImage (in Atalasoft.dotImage.dll)

See Also