在 C# 中加载 .tiff 文件
我必须加载
我使用 Image.FromFile()
和 Bitmap.FromFile()
所做的
.tiff 文件,但它们抛出 OutOfMemoryException
任何解决方案如何加载这个?
I have to load .tiff file
I did with both Image.FromFile()
and Bitmap.FromFile()
But they are throwing OutOfMemoryException
Any solution for how to load this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我假设您尝试加载的 TIFF 文件使用与 .Net 不兼容的压缩。即 .Net 不支持 JPEG 压缩。
我建议你尝试 LibTiff.Net (尽管我不能确定它是否有效):
I assume that the TIFF file you are trying to load uses a compression that is not compatible with .Net. Namely the JPEG compression is not supported by .Net.
I suggest you try LibTiff.Net (though I cannot tell for sure if it will work):
我使用 ImageGlue。它可以转换的内容远不止 tiff。
I use ImageGlue. It can convert a lot more then just tiff.
项目 .codeproject.com/" rel="nofollow">codeproject:“如何使用 C# 加载/显示图像”。
看看它
There is a project on codeproject: "How to Load/Display images with C#".
Take a look at it
此问题可能是由于多个图像 tiff 文件造成的。在这种情况下,您必须从源 tiff 文件中提取单个图像文件,然后逐帧查看这些文件。这是示例代码。
http ://www.c-sharpcorner.com/Blogs/10924/how-to-save-split-merge-and-view-multipage-tiff-image.aspx
There is a possibility that this issue occurred due to multiple image tiff file. In this case, you have to extract individual image files from the source tiff file and then view those frame by frame. Here is a sample code.
http://www.c-sharpcorner.com/Blogs/10924/how-to-save-split-merge-and-view-multipage-tiff-image.aspx