[Mono-bugs] [Bug 66861][Wis] New - MakeTransparent doesn't work properly

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 26 Sep 2004 20:22:31 -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 david.mitchell@telogis.com.

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

--- shadow/66861	2004-09-26 20:22:31.000000000 -0400
+++ shadow/66861.tmp.9895	2004-09-26 20:22:31.000000000 -0400
@@ -0,0 +1,61 @@
+Bug#: 66861
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Sys.Drawing.
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: david.mitchell@telogis.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: MakeTransparent doesn't work properly
+
+Description of Problem:
+
+When I try to set the transparent colour of an image it just goes wierd.
+
+
+using System;
+using System.Drawing;
+using System.Drawing.Imaging;
+
+public class TransTest {
+    public static void Main(string[] args) {
+        Bitmap targ = new Bitmap(100,100);
+        Bitmap icon = new Bitmap("stop.png");
+
+        icon.MakeTransparent();
+
+        Graphics g = Graphics.FromImage(targ);
+
+        g.DrawImage(icon, 10, 10);
+
+        g.Dispose();
+
+        targ.Save("output.png", ImageFormat.Png);
+    }
+}
+
+Steps to reproduce the problem:
+1. Compile this program (with -r:System.Drawing)
+2. Run it
+3. View output.png
+
+Actual Results:
+A transparent image with a black square in the top left hand corner
+
+Expected Results:
+A transparent image with a circular icon in the top left hand corner
+
+
+How often does this happen? 
+Always
+
+Additional Information:
+I will attach stop.png