Release Image

I am having problems creating an image from a stream. on my windows pc it has large forks, on the ubuntu server, it gives an error

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>

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

mono-test-install

Your have a working System.Drawing setup

any ideas?

0
c # stream ubuntu mono drawing
source share
1 answer

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

Create a file in the same directory as System.Drawing.dll.config with the following contents, updating the directory to the correct location for libgdiplus.so :

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

All Articles