[Mono-bugs] [Bug 58885][Nor] Changed - Graphics class is drawing with wrong colors
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 16 Jun 2004 05:49:55 -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 vladimir@pobox.com.
http://bugzilla.ximian.com/show_bug.cgi?id=58885
--- shadow/58885 2004-06-16 00:46:13.000000000 -0400
+++ shadow/58885.tmp.23937 2004-06-16 05:49:55.000000000 -0400
@@ -131,6 +131,21 @@
------- Additional Comments From rkumar@novell.com 2004-06-16 00:46 -------
Stefan, I wanted to confirm that we are passing the correct values to
Cairo or not. But, it is pretty clear here that we are getting it
right to Cairo. I don't know why is this problem but I guess it could
be a bug related to portability of our encoders (more likely) or
Cairo (less likely).
+
+------- Additional Comments From vladimir@pobox.com 2004-06-16 05:49 -------
+When we save PNGs, we don't transform the data in any way; we tell
+libpng to expect data in either R G B or R G B A order (depending on
+whether the source has alpha or not). On reading the png, we specify
+PNG_TRANSFORM_BGR, to change R G B into B G R. We don't do this for
+writing, the reasons for which I'm not exactly clear on; it "seems to
+work" on x86, but it's entirely possible that there's a bug there.
+
+Also, it's possible that there's some endian-ness oddness in pixman;
+iccolor.c, pixman_color_to_pixel creates a 32 bit int "pixel" from a
+color struct. It could be that the masks are wrong for this
+operation, considering that I see no mention of endian-ness anywhere
+within pixman. (See the various formats in icint.h)
+