Image fromstream issue(图片来自流问题)
问题描述
我在从流创建图像时遇到问题.在我的 Windows 电脑上,它分叉很好,在 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:在 System.Drawing.GDIPlus.CheckStatus (System.Drawing.Status)<0x00157> 处发现空引用或无效值 [GDI+ 状态:InvalidParameter]在 System.Drawing.Image.CreateFromHandle (intptr) <0x00027>在 System.Drawing.Image.LoadFromStream (System.IO.Stream,bool) <0x0002b>在 System.Drawing.Image.FromStream (System.IO.Stream,bool,bool) <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>
                        这篇关于图片来自流问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:图片来自流问题
				
        
 
            
        基础教程推荐
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
 - 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
 - 错误“此流不支持搜索操作"在 C# 中 2022-01-01
 - JSON.NET 中基于属性的类型解析 2022-01-01
 - 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
 - 全局 ASAX - 获取服务器名称 2022-01-01
 - 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
 - 如何动态获取文本框中datagridview列的总和 2022-01-01
 - 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
 - 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
 
    	
    	
    	
    	
    	
    	
    	
    	
						
						
						
						
						
				
				
				
				