2014-06-24 2 views
0

스트림에서 이미지를 만드는 동안 문제가 있습니다. 이 위대한 만들어 낸다 PC 내 창에, 우분투 서버에서이 오류 난 내 서버에 라이브러리 설치를 System.Drawing 확인이미지가 스트림 문제

System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter] at System.Drawing.GDIPlus.CheckStatus (System.Drawing.Status) <0x00157> at System.Drawing.Image.CreateFromHandle (intptr) <0x00027> at System.Drawing.Image.LoadFromStream (System.IO.Stream,bool) <0x0002b> at System.Drawing.Image.FromStream (System.IO.Stream,bool,bool) <0x00013>

에게 던졌습니다, 그것은 system.drawing가 설치되어 있다고

mono-test-install

Your have a working System.Drawing setup

아이디어가 있으십니까?

+0

어쩌면 당신이 우리에게 실제로 오류가 발생합니다 라인을 표시해야합니다. 여기 – TaW

+0

예외가 발생 : '이미지 IMG = Image.FromStream (file.Value) 내가 nancyfx을 사용하고' 이,'file'이 Nancy.HttpFile' – ardabada

+0

내가 다른 스레드에 게시이 답변을 참조하십시오 '입니다
HTTP : //stackoverflow.com/a/39104944/6748622 – dougstefe

답변

1

먼저 System.Drawing.dll 파일이있는 디렉터리를 찾습니다 (예 : /opt/mono-4.4.0/lib/gac/System.Drawing/4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll).

libgdiplus.so의 올바른 위치로 디렉토리를 업데이트, 다음과 같은 내용으로 System.Drawing.dll.config라는 동일한 디렉토리에 파일을 만듭니다

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

고맙습니다. – ardabada