图片fromstream问题 [英] Image fromstream issue

查看:590
本文介绍了图片fromstream问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是从数据流生成图像过程中出现问题。在我的Windows PC上它叉很大,Ubuntu的服务器上,它抛出一个错误

i have problems during creating image from stream. on my windows pc it forks great, on ubuntu server, it throws an error

System.ArgumentException:空引用或无效的价值被发现[ GDI +状态:无效参数]在System.Drawing.GDIPlus.CheckStatus(System.Drawing.Status)LT; 0x00157>在System.Drawing.Image.CreateFromHandle(IntPtr的)LT; 0x00027>在System.Drawing.Image.LoadFromStream(的System.IO.Stream,布尔)< 0x0002b>在System.Drawing.Image.FromStream(的System.IO.Stream,布尔,布尔)< 0x00013>

我查System.Drawing中我的服务器上库设置,它说,System.Drawing中安装

I checked System.Drawing library setup on my server, it says that system.drawing is installed

单测试安装

你有一个工作System.Drawing中设置

任何想法?

推荐答案

首先,找到哪里是System.Drawing.dll程序文件(例如
目录 /opt/mono-4.4.0/lib/gac/System.Drawing/4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll )。

First, locate the directory where is the System.Drawing.dll file (for example /opt/mono-4.4.0/lib/gac/System.Drawing/4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll).

创建一个名为同一个目录中的文件 System.Drawing.dll.config 使用以下内容,更新目录的正确位置 libgdiplus.so

Create a file in the same directory called System.Drawing.dll.config with the following content, updating the directory to the correct location of libgdiplus.so:

<configuration>
  <dllmap dll="gdiplus.dll" target="/opt/mono-4.4.0/lib/libgdiplus.so"/>
</configuration>

这篇关于图片fromstream问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆