[Mono-bugs] [Bug 364645] New: GDI+ status: InvalidParameter on Bitmap.ctor(Stream)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Feb 25 15:39:14 EST 2008


           Summary: GDI+ status: InvalidParameter on Bitmap.ctor(Stream)
           Product: Mono: Class Libraries
           Version: SVN
          Platform: i586
        OS/Version: openSUSE 10.3
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Drawing.
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: atsushi at ximian.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

The following example (from FreeTrain PlatformPropertyDialog.resx) results in
an ArgumentException (with libgdiplus r95661):

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

public class Test
        public static void Main ()
                string base64 = @"
                byte [] bytes = Convert.FromBase64String (base64);
                Bitmap bmp = new Bitmap (new MemoryStream (bytes));

Unhandled Exception: System.ArgumentException: A null reference or invalid
value was found [GDI+ status: InvalidParameter]
  at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] 
  at System.Drawing.Image.InitFromStream (System.IO.Stream stream) [0x00000] 
  at System.Drawing.Bitmap..ctor (System.IO.Stream stream, Boolean useIcm)
  at System.Drawing.Bitmap..ctor (System.IO.Stream stream) [0x00000] 
  at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor

It works fine under .NET.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list