Library code snippets
GDI+ Image Encoder and Decoder Info
By Mitch Dusina, published on 20 Mar 2006
Encoders and Decoders
This piece of code enumerates every built in Encoder and Decoder that comes with GDI+. You would use the same concept to gain informartion about any other Encoder/Decoder.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ImageDecoders() As Imaging.ImageCodecInfo = Imaging.ImageCodecInfo.GetImageDecoders
Dim ImageEncoders() As Imaging.ImageCodecInfo = Imaging.ImageCodecInfo.GetImageEncoders
Dim strInfo As String
Dim i As Integer
strInfo &= "Built-in GDI+ Image Decoders:" & ControlChars.NewLine & ControlChars.NewLine
For i = 0 To ImageDecoders.GetUpperBound(0)
With ImageDecoders(i)
strInfo &= "Codec Name: " & .CodecName & ControlChars.NewLine
strInfo &= "Dll Name: " & CType(IIf(.DllName <> String.Empty, .DllName, "N/A"), String) & _
ControlChars.NewLine
strInfo &= "File Extension(s): " & .FilenameExtension & ControlChars.NewLine
strInfo &= "Format Description: " & .FormatDescription & ControlChars.NewLine
strInfo &= "Mime Type: " & .MimeType & ControlChars.NewLine
strInfo &= "Version: " & .Version & ControlChars.NewLine & ControlChars.NewLine
End With
Next
strInfo = strInfo.Substring(0, strInfo.Length - 4)
txtDecoders.Text = strInfo
strInfo = ""
strInfo &= "Built-in GDI+ Image Encoders:" & ControlChars.NewLine & ControlChars.NewLine
For i = 0 To ImageEncoders.GetUpperBound(0)
With ImageEncoders(i)
strInfo &= "Codec Name: " & .CodecName & ControlChars.NewLine
strInfo &= "Dll Name: " & CType(IIf(.DllName <> String.Empty, .DllName, "N/A"), String) & _
ControlChars.NewLine
strInfo &= "File Extension(s): " & .FilenameExtension & ControlChars.NewLine
strInfo &= "Format Description: " & .FormatDescription & ControlChars.NewLine
strInfo &= "Mime Type: " & .MimeType & ControlChars.NewLine
strInfo &= "Version: " & .Version & ControlChars.NewLine & ControlChars.NewLine
End With
Next
strInfo = strInfo.Substring(0, strInfo.Length - 4)
txtEncoders.Text = strInfo
End Sub
Related articles
Related discussion
-
Why choose c# when there is Java
by Thaj06 (0 replies)
-
Change color while typing in rich text box
by Akhtar Hussain (0 replies)
-
Third party components to enhance User Interface of Windows based application
by Shaila14041981 (0 replies)
-
VB.NET DataGridView Sort
by bradhen (0 replies)
-
About Comparison in Asp.Net
by S_Rahul (0 replies)
Related podcasts
-
xpert to Expert: Inside Concurrent Basic (CB)
"Concurrent Basic extends Visual Basic with stylish asynchronous concurrency constructs derived from the join calculus. Our design advances earlier MSRC work on Polyphonic C#, Comega and the Joins Library. Unlike its C# based predecessors, CB adopts a simple event-like syntax familiar to VB progr...
Tabela Modelleri
!--removed tag-->thanks
http://www.tabelamodelleri.com http://www.tabelaustasi.com http://www.tabelacesitleri.com http://www.vitringazetesi.com http://www.kesenizebereket.com http://www.emlakilanlarim.com http://www.yuvakurarken.com http://www.isiyalitimmalzemeleri.com http://www.fersadekorasyon.com http://www.efendisove.com http://www.yesilyurtinsaat.com http://www.aslipen.com http://www.mertyapidekorasyon.com http://www.yasminmodaevi.com http://www.saloonblack.com http://www.gunerlersaat.com http://www.senkarorganizasyon.com
!--removed tag-->This thread is for discussions of GDI+ Image Encoder and Decoder Info.