Converting a GUID to System.Drawing.Imaging.ImageFormat
- by Kjensen
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
?