打开32位浮点图像会导致OutOfMemoryException [英] Opening 32-bit float image causes OutOfMemoryException
本文介绍了打开32位浮点图像会导致OutOfMemoryException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
System.OutOfMemoryException:'内存不足'。
例外。即时尝试加载是一个32位的浮动图像。
加载一个16位的浮动图像工作正常。
我已经尝试设置<在配置管理器中将 Plattform 类型转换为 x64
。
使用System.Drawing;
命名空间ConsoleAppImageTest
{
类程序
{
static void Main(string [] args)
{
string PathToFile = @D:\img\rgb32bitF.tiff;
Image img = Image.FromFile(PathToFile);
$ div class =h2_lin>解决方案
尝试使用 LibTiff.NET 来处理TIFF图片。
I am running a console application in Visual Studio 2017 RC. When executing the code below I get a System.OutOfMemoryException: 'Out of memory.'
exception.
The image im trying to load is a 32-bit float image.
Loading a 16-bit float image works fine.
I have tried setting the Plattform type to x64
in the Configuration Manager.
using System.Drawing;
namespace ConsoleAppImageTest
{
class Program
{
static void Main(string[] args)
{
string PathToFile = @"D:\img\rgb32bitF.tiff";
Image img = Image.FromFile(PathToFile);
}
}
}
解决方案
Try LibTiff.NET for handling TIFF images.
这篇关于打开32位浮点图像会导致OutOfMemoryException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文