[Mono-bugs] [Bug 58640][Maj] New - MONO Beta 1 Bug: System.Drawing.Bitmap not reading from Stream

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 18 May 2004 05:28:25 -0400 (EDT)

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by davidandrewtaylor@hotmail.com.


--- shadow/58640	2004-05-18 05:28:25.000000000 -0400
+++ shadow/58640.tmp.21326	2004-05-18 05:28:25.000000000 -0400
@@ -0,0 +1,62 @@
+Bug#: 58640
+Product: Mono: Class Libraries
+Version: unspecified
+OS: Red Hat 9.0
+OS Details: 
+Status: NEW   
+Severity: 002 Two hours
+Priority: Major
+Component: Sys.Drawing.
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: davidandrewtaylor@hotmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: MONO Beta 1 Bug: System.Drawing.Bitmap not reading from Stream
+Description of Problem:
+I can load a Bitmap from a file using: new Bitmap("RSP.gif").  However in 
+my app I am reading in the bitmap as a stream from another server.  MONO 
+currently throws a NotImplemented exception stopping this program from 
+running on MONO, but works fine in MS.NET.   
+Steps to reproduce the problem:
+using System;
+using System.Drawing;
+using System.IO;
+public class test
+  public static void Main()
+  {
+    Console.WriteLine("Loading Image via File");
+    Bitmap bitmap = new Bitmap("RSP.gif"); // THIS WORKS
+    Console.WriteLine("Done.  Now loading image via Stream");
+    Stream imageStream = File.OpenRead("RSP.gif");
+    Bitmap bitmap2 = new Bitmap(imageStream); // NOT IMPLEMENTED Exception
+  }
+Actual Results:
+Works fine in MS.NET.  In MONO the second attempt fails when trying to 
+load the Bitmap from a Stream:
+Unhandled Exception: System.NotImplementedException: Feature not 
+in <0x001bd> System.Drawing.GDIPlus:CheckStatus (System.Drawing.Status)
+in <0x000a0> System.Drawing.Image:InitFromStream (System.IO.Stream)
+in <0x00056> (wrapper remoting-invoke-with-check) 
+System.Drawing.Image:InitFromStream (System.IO.Stream)
+in <0x0001c> System.Drawing.Bitmap:.ctor (System.IO.Stream,bool)
+in <0x00012> System.Drawing.Bitmap:.ctor (System.IO.Stream)
+in <0x00056> (wrapper remoting-invoke-with-check) 
+System.Drawing.Bitmap:.ctor (System.IO.Stream)
+in <0x00080> test:Main ()
+Expected Results:
+Should be able to load Bitmap from a stream.
+How often does this happen? 
+All the time on MONO Beta 1.