[Mono-bugs] [Bug 76176][Nor] Changed - ImageList.AddInternal fails when transforming PixelFormat

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Sep 21 09:02:04 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 kornelpal at hotmail.com.

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

--- shadow/76176	2005-09-21 08:06:19.000000000 -0400
+++ shadow/76176.tmp.17604	2005-09-21 09:02:04.000000000 -0400
@@ -54,6 +54,23 @@
 platform independent.
 
 Note that however that the current implementation of this solution 
 is rather poor. For example we should copy all the images when 
 adding and returning a copy of them when getting as mixing things 
 causes inconsistent behaviour.
+
+------- Additional Comments From kornelpal at hotmail.com  2005-09-21 09:02 -------
+After some research I think we only have the following choices:
+
+1) Using GDI (or native ImageList) as it takes care about pixel 
+formats. This is not a good solution as it works only on Windows.
+
+2) Using GDI+ Bitmap.LockBits to get image from a bitmap then copy 
+it to another. This solution works and seems to be supported by 
+libgdiplus as well. The only thing that is difficult that we will 
+have to convert pixel formats manually including palette mapping.
+
+3) Using Format32bppArgb anyway. This is a very comfortable solution 
+bit this one makes ImageList.ColorDepth useless. And provides little 
+compatiblity with .NET Framework as it will convert bitmaps to the 
+target color depth that may result in color change while we will 
+preserve colos.


More information about the mono-bugs mailing list