[Mono-bugs] [Bug 72588][Wis] New - LoadImageFromStream requires seekable stream
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Mon, 14 Feb 2005 10:15:48 -0500 (EST)
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 stefan@rusek.org.
http://bugzilla.ximian.com/show_bug.cgi?id=72588
--- shadow/72588 2005-02-14 10:15:48.000000000 -0500
+++ shadow/72588.tmp.10616 2005-02-14 10:15:48.000000000 -0500
@@ -0,0 +1,63 @@
+Bug#: 72588
+Product: Mono: Class Libraries
+Version: 1.0
+OS: All
+OS Details: Tested on Redhat and FreeBSD
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: Sys.Drawing.
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: stefan@rusek.org
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: LoadImageFromStream requires seekable stream
+
+Description of Problem:
+Loading a System.Drawing.Image from a stream requires a seekable stream,
+but the MS implementation does not.
+
+Steps to reproduce the problem:
+1. Compress a bmp (or possibly other image) into a zip file.
+2. Write code that opens the zip file with ICSharpCode.SharpZipLib
+3. Pass the stream given by the decompressor to the System.Drawing.Bitmap
+constructor.
+
+Actual Results:
+An execption is thrown. See the stack trace at the end of this report.
+
+Expected Results:
+The constructor should succeed and load the bitmap correctly.
+
+How often does this happen?
+Every time
+
+Additional Information:
+
+Unhandled Exception: System.NotSupportedException: Seek not supported
+in <0x0002b>
+ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream:Seek
+(long,System.IO.SeekOrigin)
+in <0x00192> GdiPlusStreamHelper:StreamGetBytesImpl (intptr,int,bool)
+in <0x0008f> (wrapper native-to-managed)
+GdiPlusStreamHelper:StreamGetBytesImpl (intptr,int,bool)
+in (unmanaged) (wrapper managed-to-native)
+System.Drawing.GDIPlus:GdipLoadImageFromDelegate_linux
+(System.Drawing.GDIPlus/StreamGetBytesDelegate,System.Drawing.GDIPlus/Stre
+amPutBytesDelegate,System.Drawing.GDIPlus/StreamSeekDelegate,System.Drawin
+g.GDIPlus/StreamCloseDelegate,System.Drawing.GDIPlus/StreamSizeDelegate,in
+tptr&)
+in <0x00004> (wrapper managed-to-native)
+System.Drawing.GDIPlus:GdipLoadImageFromDelegate_linux
+(System.Drawing.GDIPlus/StreamGetBytesDelegate,System.Drawing.GDIPlus/Stre
+amPutBytesDelegate,System.Drawing.GDIPlus/StreamSeekDelegate,System.Drawin
+g.GDIPlus/StreamCloseDelegate,System.Drawing.GDIPlus/StreamSizeDelegate,in
+tptr&)
+in <0x000e2> 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)