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

Re: [pygame] Surface.blit() BLEND_ADD vs. BLEND_RGBA_ADD



Maybe the RGBA_PREMULT of pygame.image.tostring could be used...

http://www.pygame.org/docs/ref/image.html#pygame.image.tostring

#untested
def premult(surf):
    return pygame.image.fromstring(pygame.image.tostring(surf, "RGBA_PREMULT"), surf.get_size(), "RGBA")


On Mon, Dec 19, 2011 at 9:18 PM, Florian Berger <fberger@xxxxxxxxxxxxxxxxx> wrote:

Greg Ewing <greg.ewing@xxxxxxxxxxxxxxxx>:
>
> What you need is an image with premultiplied alpha.
> An operation for doing that might be a useful addition.

+1

Is there a feature request tracker for Pygame somewhere?

Regards,
       Florian