1. pygame
  2. pygame
  3. pygame
  4. Issues

Issues

Issue #26 resolved

Alpha wrong when blitting with BLEND_RGBA_MULT on Mac OS X

René Dudfield
created an issue

== James Paige, 2008-12-10 12:13:22 -0800

{{{ Created attachment 14 Test script to reproduce the problem

I have some code that takes an image, loads it into a surface, and blits an alpha transparent image with BLEND_RGBA_MULT to erase the corners. It works perfectly on Linux and Windows XP, but when I test it on my Mac the corners do not vanish, they just turn yellow. I would guess this means that the colors are mixed up when blitting in this way. The machine in question is a G7 PowerPC Mac. (I don't have access to an Intel Mac) so this could be an endiannness issue.

I am using python 2.5.2 (the python.org build) and pygame 1.8.1release-svn1537 }}}


Attachments: [[http://www.pygame.org/old_bug_attachments/14/test.py| test.py]]

== James Paige, 2008-12-10 12:14:28 -0800

{{{ Created attachment 15 kitten.jpg used by the test script }}}


Attachments: [[http://www.pygame.org/old_bug_attachments/15/kitten.jpg| kitten.jpg]]

== James Paige, 2008-12-10 12:14:54 -0800

{{{ Created attachment 16 alpha_corner.png used by the test script }}}


Attachments: [[http://www.pygame.org/old_bug_attachments/16/alpha_corner.png| alpha_corner.png]]

== James Paige, 2008-12-10 12:15:20 -0800

{{{ Created attachment 17 The entire test in a zip file }}}


Attachments: [[http://www.pygame.org/old_bug_attachments/17/alphatest.zip| alphatest.zip]]

== James Paige, 2008-12-11 08:23:19 -0800

{{{ Lenard Lindstrom notes that adding .convert_alpha() to the line that loads alpha_conrer.png avoids this problem.

See: http://comments.gmane.org/gmane.comp.python.pygame/16810

  • corner = pygame.image.load(os.path.join("data", "alpha_corner.png"))
  • corner = pygame.image.load(os.path.join("data", "alpha_corner.png")).convert_alpha() }}}

== Lenard Lindstrom, 2009-02-11 22:35:41 -0800

{{{ I believe rev. 1923 fixes this bug. However, it should be verified on a Mac. }}}


== James Paige, 2009-02-12 11:24:32 -0800

{{{ I can confirm that this bug is fixed using the nightly build with subversion revision 1923. I tested on the same PowerPC Mac where I originally noticed the bug. }}}


Comments (0)

  1. Log in to comment