LEADTOOLS (Leadtools assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
OriginalFormat Property
See Also 
Leadtools Namespace > RasterImage Class : OriginalFormat Property



Gets or sets the original image format of this RasterImage. Supported in Silverlight, Windows Phone 7

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);
}

Property Value

The original image format of this RasterImage.

Example

This example displays the OriginalFormat of the loaded image.

Visual BasicCopy Code
Public Sub OriginalFormatExample()
      Dim codecs As RasterCodecs = New RasterCodecs()
      Dim image As RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "OCR1.TIF"))

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

      image.Dispose()
      codecs.Dispose()
   End Sub

Public NotInheritable Class LEAD_VARS
   Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"
End Class
C#Copy Code
public void OriginalFormatExample()
   {
      RasterCodecs codecs = new RasterCodecs();
      RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "OCR1.TIF"));

      string s = ("Original Format: " + image.OriginalFormat);
      Console.WriteLine(s);

      image.Dispose();
      codecs.Dispose();
   }

static class LEAD_VARS
{
   public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";
}
SilverlightCSharpCopy Code
public void OriginalFormatExample(RasterImage image)
{
   string s = ("Original Format: " + image.OriginalFormat);
   Debug.WriteLine(s);
   image.Dispose();
}
SilverlightVBCopy Code
Public Sub OriginalFormatExample(ByVal image As RasterImage)
   Dim s As String = ("Original Format: " & image.OriginalFormat)
   Debug.WriteLine(s)
   image.Dispose()
End Sub

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: Silverlight, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only), Windows Phone 7

See Also