Hello
I have been experimenting with the blit method and its blend options. I
think I have stumbled over a bug either in pygame or SDL (I can't tell).
Its when adding a surface with itself. When adding it 255 times all
color values that were > 0 will be maxed out to 255. It works most of
the time. But surprisingly for colors in the orange tones do not work.
At least it looks like that, but I can't tell the exact conditions when
it will behave strange.
To demonstrate the strange behavior I have written a small demo. It can
be downloaded here:
https://bitbucket.org/dr0id/pyknic/downloads/2015-08-05-blit_to_white.zip
There are two images displayed: the one on the left if the original, the
one on the right is the blitted to white image. The only parts that
don't get white are the ones that were either black or transparent (in
both cases the values were (0, 0, 0, a) or (r, g, b, 0)). That is
expected. The orange colored regions should be white on the right images.
Can someone explain what is going on? I could not find any clue in the
pygame C-blitting code.
Maybe this has already been reported, but I could not find any matching
entries on the pygame issue tracker on bitbucket.
Thanks.
~DR0ID