[Mono-list] Unspecific error: System.Exception: Generic Error [GDI+ status: GenericError]
Sebastien Pouliot
sebastien.pouliot at gmail.com
Thu Oct 28 13:27:24 EDT 2010
On Thu, 2010-10-28 at 18:48 +0200, Yves Goergen wrote:
> using System.Drawing;
> using System.Drawing.Imaging;
>
> namespace MonoGdiTest
> {
> class Program
> {
> static void Main(string[] args)
> {
> Bitmap bmp = new Bitmap(20, 20,
> PixelFormat.Format32bppArgb);
> // Next line throws Exception("Generic Error
> [GDI+ status: GenericError]")
> bmp.Save("MonoGdiTest.png", ImageFormat.Png);
> }
> }
> }
poupou at mizar:~/src> cat sd.cs
using System.Drawing;
using System.Drawing.Imaging;
namespace MonoGdiTest
{
class Program
{
static void Main(string[] args)
{
Bitmap bmp = new Bitmap(20, 20, PixelFormat.Format32bppArgb);
// Next line throws Exception("Generic Error [GDI+ status: GenericError]")
bmp.Save("MonoGdiTest.png", ImageFormat.Png);
}
}
}
poupou at mizar:~/src> gmcs sd.cs -pkg:dotnet
poupou at mizar:~/src> mono sd.exe
poupou at mizar:~/src> l MonoGdiTest.png
-rw-r--r-- 1 poupou users 151 2010-10-28 13:25 MonoGdiTest.png
So it works here (tested with both 2.6.4 and 2.8.1/git master). You
likely do not have libgdiplus, or one of its dependencies, installed
correctly.
Sebastien
More information about the Mono-list
mailing list