Leadtools Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
OriginalFormat Property
See Also  Example
Leadtools Namespace > RasterImage Class : OriginalFormat Property



Gets or sets the original image format of this RasterImage.

Syntax

Visual Basic (Declaration)  
Public Property OriginalFormat As RasterImageFormat
Visual Basic (Usage) Copy Code
Dim instance As RasterImage
Dim value As RasterImageFormat
 
instance.OriginalFormat = value
 
value = instance.OriginalFormat
C#  
public RasterImageFormat OriginalFormat {get; set;}
C++/CLI  
public:
property RasterImageFormat OriginalFormat {
   RasterImageFormat get();
   void set (RasterImageFormat value);
}

Return Value

The original image format of this RasterImage.

Example

This example displays the OriginalFormat of the loaded image.

Visual Basic Copy Code
Public Sub OriginalFormatExample()
   RasterCodecs.Startup()
   Dim codecs As RasterCodecs = New RasterCodecs()
   Dim image As RasterImage = codecs.Load(LeadtoolsExamples.Common.ImagesPath.Path + "OCR1.TIF")

   Dim s As String = ("Original Format: " & image.OriginalFormat)
   Console.WriteLine(s)

   image.Dispose()
   codecs.Dispose()
   RasterCodecs.Shutdown()
End Sub
C# Copy Code
public void OriginalFormatExample() 

   RasterCodecs.Startup(); 
   RasterCodecs codecs = new RasterCodecs(); 
   RasterImage image = codecs.Load(LeadtoolsExamples.Common.ImagesPath.Path + "OCR1.TIF"); 
 
   string s = ("Original Format: " + image.OriginalFormat); 
   Console.WriteLine(s); 
 
   image.Dispose(); 
   codecs.Dispose(); 
   RasterCodecs.Shutdown(); 
}

Remarks

When a RasterImage object is created by loading it from an image file, this property will hold the format type of the file as a RasterImageFormat enumeration member.

If the RasterImage was created by other means (for example, through the RasterImage constructor or scanning), the value of this property will be RasterImageFormat.Unknown.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also