Image.FromFile () or FromStream () hangs on GdiplusStartup

I have a simple C # application containing this line:

var mImage = System.Drawing.Image.FromFile(filename);

When you run this code on Windows (.NET), the image loads correctly. When running the same code on OS X (Mono), the application simply freezes. The debugger remains in this call forever. There is nothing exception.

The column shows that the application freezes:

System.Drawing.GDIPlus.GdiplusStartup ()

What could go wrong here?

PS: I have the latest versions of Xamarin Studio and Mono installed.

+4
source share
3 answers

1) , Xamarin Studio, , !!!

:

, Xamarin Studio Version 5.5 ( 198), : https://bugzilla.xamarin.com/show_bug.cgi?id=23444

" -, :

var image = Image.FromStream(content);

GDIPlus - .

, , Image.FromStream() , , Mono ".

:

System.Drawing.GDIPlus --- > System.Exception: GdiplusStartup

:

2014-09-29 , 1, 4 , Xamarin Studio Version 5.5 ( 227) 2.


2) - , , (), , : https://github.com/mono/libgdiplus/blob/master/TODO
+5

MonoMac GDI Mac. , , . . .

, , . , - , , .

. root , .

+2

, , . ; , , mono System.Drawing #

mono System.Drawing , System.Drawing. Windows , GDIPlus.dll, , , unix.

mono System.Drawing

, , System.Drawing.

MonoMac Mono.Cairo

fooobar.com/questions/177995/...

0

All Articles