Hi,
I'm developing a web service in mono, and I have a little problem with one
function:
One of my methods return an image. To do so I get data from the database and I
do the following for convert it in base64 string:
MemoryStream ms = new MemoryStream(club_logo);
System.Drawing.Image myImage = System.Drawing.Image.FromStream(ms);
using (MemoryStream ms2 = new MemoryStream())
{
// Convert Image to byte[]
myImage.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
byte[] imageBytes = ms2.ToArray();
// Convert byte[] to Base64 String
string base64String = Convert.ToBase64String(imageBytes);
return base64String;
}
But I get this exception on this line "System.Drawing.Image myImage =
System.Drawing.Image.FromStream(ms);" :
System.ArgumentException: A null reference or invalid value was found [GDI+
status: InvalidParameter]
at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] in <filename
unknown>:0
What does it means?
I used MonoDevelop 3 on MacOsX and I deployed it on an Ubuntu Server 12.04 whit
Mono 2.10.8.1.
Thanks
Marco_______________________________________________
Mono-aspnet-list mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/mono-aspnet-list