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




codecName
The name of the codec to query. The codec name is usually a string containing 3 characters. The codec name is not case sensitive.
Gets information about the specified codec.

Syntax

Visual Basic (Declaration) 
Public Function GetCodecInformation( _
   ByVal codecName As String _
) As CodecsCodecInformation
Visual Basic (Usage)Copy Code
Dim instance As RasterCodecs
Dim codecName As String
Dim value As CodecsCodecInformation
 
value = instance.GetCodecInformation(codecName)
C# 
public CodecsCodecInformation GetCodecInformation( 
   string codecName
)
Managed Extensions for C++ 
public: CodecsCodecInformation GetCodecInformation( 
   string* codecName
) 
C++/CLI 
public:
CodecsCodecInformation GetCodecInformation( 
   String^ codecName
) 

Parameters

codecName
The name of the codec to query. The codec name is usually a string containing 3 characters. The codec name is not case sensitive.

Return Value

A CodecsCodecInformation onject containing Information about the codec.

Example

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

         Dim codecInfo As CodecsCodecInformation = codecs.GetCodecInformation("Tif")
         Console.WriteLine("CheckedByInformation : {0}", codecInfo.CheckedByInformation)
         Console.WriteLine("ExtensionList : {0}", codecInfo.ExtensionList)
         Console.WriteLine("IsPresent : {0}", codecInfo.IsPresent.ToString())
         Console.WriteLine("IsSlowInformation : {0}", codecInfo.IsSlowInformation.ToString())
         Console.WriteLine("LoadMode : {0}", codecInfo.LoadMode.ToString())
         Console.WriteLine("Name : {0}", codecInfo.Name)

         ' change the extensions that the ptk filter tries to handle
         codecInfo.ExtensionList = "ptk;ptoka;ptoca;ptca;ptka"
         codecs.SetCodecInformation(codecInfo)

         ' re-display the new settings
         codecInfo = codecs.GetCodecInformation("tif")
         Console.WriteLine("ExtensionList : {0}", codecInfo.ExtensionList)

         ' Clean up
         codecs.Dispose()
         RasterCodecs.Shutdown()
      End Sub
C#Copy Code
RasterCodecs.GetCodecInformation 
      public void GetCodecInformationExample() 
      { 
         RasterCodecs.Startup(); 
         RasterCodecs codecs = new RasterCodecs(); 
 
         CodecsCodecInformation codecInfo = codecs.GetCodecInformation("Tif"); 
         Console.WriteLine("CheckedByInformation : {0}", codecInfo.CheckedByInformation); 
         Console.WriteLine("ExtensionList : {0}", codecInfo.ExtensionList); 
         Console.WriteLine("IsPresent : {0}", codecInfo.IsPresent.ToString()); 
         Console.WriteLine("IsSlowInformation : {0}", codecInfo.IsSlowInformation.ToString()); 
         Console.WriteLine("LoadMode : {0}", codecInfo.LoadMode.ToString()); 
         Console.WriteLine("Name : {0}", codecInfo.Name); 
 
         // change the extensions that the ptk filter tries to handle 
         codecInfo.ExtensionList = "ptk;ptoka;ptoca;ptca;ptka"; 
         codecs.SetCodecInformation(codecInfo); 
 
         // re-display the new settings 
         codecInfo = codecs.GetCodecInformation("tif"); 
         Console.WriteLine("ExtensionList : {0}", codecInfo.ExtensionList); 
 
         // Clean up 
         codecs.Dispose(); 
         RasterCodecs.Shutdown(); 
      }

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