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.
a quick test tells that , at pixel level, pygame 1.8.1release:
sf1 sf2 sf1.blit(sf2,None,'BLEND_RGBA_SUB')
(r1,g1,b1,a1) (r2,g2,b2,a2) (clamp(r1-r2),clamp(g1-g2), clamp(b1-b2), 255)
Looks wrong to me, but there are not specs for the oper.
--
claxo