.net 位图文件类型限制
给定行:
Bitmap bitmap = new Bitmap(stream);
其中流是 System.IO.Stream,对可以处理的图像文件类型(例如 png、jpg、gif 等)是否有任何限制。即所有图像文件/流头信息都足够清晰地说“我是图像”。
我还没有遇到过,但到目前为止只使用了相当标准的。
谢谢
Given the line:
Bitmap bitmap = new Bitmap(stream);
where stream is a System.IO.Stream, are there any limitations on the image file type e.g png, jpg, gif etc that can be handled. i.e are all image file/stream header info clear enough to say "I am an image".
I haven't run into any yet, but have only being using the pretty standard ones so far.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我几乎可以肯定它与 Bitmap(string) 构造函数支持的集合相同:BMP、GIF、EXIF、JPG、PNG 和 TIFF。
参考
I'm almost certain it's the same set as supported by the Bitmap(string) constructor: BMP, GIF, EXIF, JPG, PNG and TIFF.
Reference
以下是支持内容的概述:
http://msdn.microsoft.com/en-us/library/at62haz6。 aspx
提到的所有文件类型都是 .NET 框架支持的 GDI+
Here is an overview of what is supported:
http://msdn.microsoft.com/en-us/library/at62haz6.aspx
All the file types mentioned there are GDI+ which are supported by the .NET framework
它应该适用于操作系统具有可用编解码器的所有图像格式。
It should work for all image formats for which the OS has a codec available.
大多数第 3 方专有文件格式都会失败,例如
PSD
。EPS
也失败了。这些格式有效:
Most 3rd party proprietary file formats fail such as
PSD
.EPS
also fails.These formats work: