[Mono-list] System.Drawing / Bitmap bug

Abe Gillespie abe.gillespie at gmail.com
Thu Jun 16 20:59:41 EDT 2005


I do believe I found a bug.  The following code works as expected in a
normal Mono exe, but produces broken results in Mono ASP.NET:

using System;
using System.IO;
using System.Drawing;
using System.Drawing.Imaging;

// Open an image.
FileInfo fi = new FileInfo("existing_filename");
Stream imgStream = fi.OpenRead();
Bitmap img = new Bitmap(imgStream);

// Save it.
// In a normal Mono exe this creates a valid copy of the original image.
// In Mono ASP.NET this creates a new file but the image is broken.
img.Save("new_filename", ImageFormat.Jpeg);

I will write a bug report if someone verifies this.

Thanks.
-Abe


More information about the Mono-list mailing list