本文介绍了无法使用Image.FromStream或Bitmap.FromFile打开Color Tiff的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在打开颜色.tiff时遇到了麻烦。


在.tiff上调用Image.FromStream会抛出一个无效参数。错误。


在.tiff上调用Bitmap.FromFile会抛出一个System.OutOfMemory。错误(文件大小为647k)。


.tiff本身没有损坏,我可以使用MS Picture Manager或MS Document Imaging打开它(虽然当我用Windows Picture打开它时和传真查看器我收到预览不可用消息。


* .tiff来自扫描文档;当我用黑色和黑色扫描文档时白色.tiff打开很好,这肯定与它的颜色有关。


我在网页上使用Atalasoft控件上传图像。我可以从.tiff创建一个ImageInfo对象,从中可以看出.tiff是Image Type Tiff,Pixel24bppBgr,300 dpi。


如果有人有源代码,他们会用来成功打开颜色.tiff我非常感谢看到它。

解决方案




I''m having trouble opening a color .tiff.

Calling Image.FromStream on the .tiff throws an "invalid parameter" error.

Calling Bitmap.FromFile on the .tiff throws a "System.OutOfMemory" error (the file size is 647k).

The .tiff itself is not corrupt, I can open it using MS Picture Manager or MS Document Imaging (although when I open it using Windows Picture and Fax Viewer I get a "preview not available" message).

The *.tiff comes from a scanned document; when I scan the document in black & white the .tiff opens fine, this certainly has to do with it being in color.

I am using Atalasoft controls on the web page where the image is uploaded. I can create an ImageInfo object from the .tiff and can see from it that the .tiff is Image Type Tiff, Pixel24bppBgr, 300 dpi.

If anyone has source code they use to succesfully open a color .tiff I would very much appreciate seeing it.

解决方案




这篇关于无法使用Image.FromStream或Bitmap.FromFile打开Color Tiff的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 04:54