Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
鉴于Stream我知道将是一张图片,有没有办法以编程方式确定它是 aBitmap还是MetaFile从 中提取的a Image.FromStream(mystream)?比如旗帜什么的。
Stream
Bitmap
MetaFile
Image.FromStream(mystream)
环境:.NET、System.Drawing、C#/VB
Image.RawFormat
我认为,通过阅读前几个字节,人们可以识别。就像II*tiff 文件中的再见。‰PNG在 png 中,BM在 bmp 文件中
II*
‰PNG
BM