Library code snippets

GDI+ Image Encoder and Decoder Info

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

Comments

  1. 21 Jul 2009 at 02:23
  2. 21 Jul 2009 at 02:22

    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

  3. 05 May 2009 at 07:33
    :D
  4. 13 Jan 2009 at 17:31
  5. 13 Jan 2009 at 17:30
  6. 03 Jan 2009 at 14:06
    İkea Evden eve nakliyat fiyatları ve ev tasima ambalajlı boıstancı evden eve nakliyatevden eve nakliyat evden eve nakliyat evden eve nakliyat
  7. 03 Jan 2009 at 10:05
    SL30 SL30 SL30 SL30 Apple30 apple30 Apple30 apple30 Apple30 apple30 Uzamax uzamax
  8. 24 Dec 2008 at 21:23
    evden eve nakliyat -gebze evden eve nakliyat -gebze evden eve nakliyat hi, I have a question. How can I code the name, id, price and total amount of basket content as image?
  9. 19 Dec 2008 at 23:41
  10. 30 Nov 2008 at 16:00
    **hi ** print basket to image hi, I have a question. How can I code the name, id, price and total amount of basket content as image? pls help [evden eve nakliyat](http://www.evdenevenakliyatbul.com/) [paslanmaz](http://www.paslanmazbul.net)
  11. 01 Jan 1999 at 00:00

    This thread is for discussions of GDI+ Image Encoder and Decoder Info.

Leave a comment

Sign in or Join us (it's free).

Mitch Dusina Languages I know (from most comfortable with, to least comfortable with): VB.NET, C#, VB6, and C/C++ I'm 19 years old and pursuing a MS in Computer Science at the Colorado School of Mines. M...

Related discussion

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...

Want to stay in touch with what's going on? Follow us on twitter!