.netsystem.drawingsystem.drawing.imaging

Is it a Bitmap or MetaFile?


Given a Stream that I know will be a picture, is there a way to programmatically determine if it is a Bitmap or a MetaFile when pulled from Image.FromStream(mystream)? Like a flag or something.

Environment: .NET, System.Drawing, C#/VB


Solution

  • Image.RawFormat