[Mono-bugs] [Bug 73223][Wis] New - System.Net.Webclient.DownloadData gives wrong image header in Gdk.Pixbuf(byte[],bool) ctor

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 2 Mar 2005 11:45:39 -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 kim@gnome.dk.

http://bugzilla.ximian.com/show_bug.cgi?id=73223

--- shadow/73223	2005-03-02 11:45:39.000000000 -0500
+++ shadow/73223.tmp.2997	2005-03-02 11:45:39.000000000 -0500
@@ -0,0 +1,51 @@
+Bug#: 73223
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: kim@gnome.dk               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: System.Net.Webclient.DownloadData gives wrong image header in Gdk.Pixbuf(byte[],bool) ctor 
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+When trying to download an image with System.Net.webclient.DownloadData and
+show it from memory via the pixbuf(byte[],bool) ctor, you get a Wrong image
+header error. Using the same byte[] data but going via the
+Pixbuf(System.IO.Stream) ctor (using System.IO.MemoryStream(data) to
+convert to stream) it works fine.
+
+Steps to reproduce the problem:
+1. try the following code:
+WebClient client = new WebClient ();
+client.Headers.Add ("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0;
+Windows NT 5.2; .NET CLR 1.0.3705;)");
+byte[] myDataBuffer =
+client.DownloadData("http://bugzilla.ximian.com/ximian-logo.gif");
+Gdk.Pixbuf Img = new Gdk.Pixbuf(myDataBuffer,true);
+
+2. see the error appear when running the program (if no error, then try
+with a png file...thats what I have tested with).
+
+
+Actual Results:
+
+
+Expected Results:
+
+
+How often does this happen? 
+
+
+Additional Information: