[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Unexpected behavior from BLEND_RGBA_SUB



Hello,

When I blit an image such as this (generated dynamically with PIL, and
saved here by pygame.image.save)-
http://xs432.xs.to/xs432/08412/mask808.png
to this screen, using the line "screen.blit(mask, (0, 0), None,
BLEND_RGBA_SUB)"-
http://xs432.xs.to/xs432/08412/screen136.png
it results in this-
http://xs432.xs.to/xs432/08411/tsukiyo3634.jpg

Is this what is supposed to happen? It seems to me that BLEND_RGBA_SUB
should respect the the alpha of the surface being blitted and avoid
subtracting the fully transparent gray pixels. Of course an alternate
solution is to get rid of those gray pixels, but I'm wondering whether
it is a bug in pygame, or if there is a solution that doesn't require
altering the way the surface is generated.