[Mono-bugs] [Bug 75432][Nor] Changed - GetPixel fails on 8bppIndex image, but works on MS

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Jul 1 14:50:34 EDT 2005


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 4lw0e0402 at sneakemail.com.

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

--- shadow/75432	2005-07-01 14:50:20.000000000 -0400
+++ shadow/75432.tmp.21125	2005-07-01 14:50:34.000000000 -0400
@@ -1,13 +1,13 @@
 Bug#: 75432
 Product: Mono: Class Libraries
 Version: 1.1
 OS: unknown
 OS Details: 
-Status: REOPENED   
-Resolution: 
+Status: RESOLVED   
+Resolution: FIXED
 Severity: Unknown
 Priority: Normal
 Component: Sys.Drawing.
 AssignedTo: 4lw0e0402 at sneakemail.com                            
 ReportedBy: peter at novonyx.com               
 QAContact: mono-bugs at ximian.com
@@ -31,6 +31,29 @@
 Tested against svn head.
 
 ------- Additional Comments From peter at novonyx.com  2005-07-01 01:44 -------
 Created an attachment (id=15407)
 Test application showing the bug.
 
+
+------- Additional Comments From 4lw0e0402 at sneakemail.com  2005-07-01 14:50 -------
+Huh. Odd :-)
+
+When I was writing the indexed support patch, I specifically
+investigated this issue, since I was pretty sure I had in the past
+encountered problems calling SetPixel on indexed bitmaps. I guess I
+should not have assumed symmetry :-)
+
+I wrote a simple test case and was surprised to discover that it did
+indeed work as you say. So, I have added the necessary code to
+GetPixel, using the pixel streams I added when I added support for
+misaligned bits in indexed pixel formats in GdipBitmapLockBits.
+
+I also discovered a bug in GdipCreateBitmapFromScan0 which completely
+destroyed the 'palette' member of the bitmap's base 'GpImage'
+structure. Since this was exposed by the fix to GetPixel and needed to
+make the test case work properly (it also caused saving an indexed
+bitmap to a PNG file to fail), I corrected it within the same patch.
+
+Please advise if I should not combine fixes like this in the future :-)
+
+The update is SVN revision 46843.


More information about the mono-bugs mailing list