.net 位图文件类型限制

发布于 2024-08-29 07:42:07 字数 212 浏览 2 评论 0原文

给定行:

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

忘羡 2024-09-05 07:42:08

我几乎可以肯定它与 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

恍梦境° 2024-09-05 07:42:08

以下是支持内容的概述:
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

烟若柳尘 2024-09-05 07:42:08

它应该适用于操作系统具有可用编解码器的所有图像格式。

It should work for all image formats for which the OS has a codec available.

べ繥欢鉨o。 2024-09-05 07:42:08

大多数第 3 方专有文件格式都会失败,例如 PSDEPS 也失败了。

这些格式有效:

BMP、GIF、EXIF、JPG、PNG 和 TIFF。

Most 3rd party proprietary file formats fail such as PSD. EPS also fails.

These formats work:

BMP, GIF, EXIF, JPG, PNG and TIFF.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文