Converting a GUID to System.Drawing.Imaging.ImageFormat

Posted by Kjensen on Stack Overflow See other posts from Stack Overflow or by Kjensen
Published on 2010-03-29T14:50:36Z Indexed on 2010/03/29 14:53 UTC
Read the original article Hit count: 333

I store information about images in a database - also their ImageFormat (jpeg, png etc).

Console.WriteLine(System.Drawing.Imaging.ImageFormat.Jpeg.Guid);  

Outputs: b96b3cae-0728-11d3-9d7b-0000f81ef32e

I want to store this in the database as a GUID - and read from the database and get the associated ImageFormat.

How do I cast the GUID b96b3cae-0728-11d3-9d7b-0000f81ef32e to System.Drawing.Imaging.ImageFormat.Jpeg.Guid ?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about system.drawing.imaging