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
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
I think, by reading the first few bytes one sould be able to identify. LIke II*
are the byes in tiff file. ‰PNG
in png, BM
in bmp files