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

Re: [pygame] surfarray and alphas



Have you tried using pixels functions instead of the array ones?  That
changes the surface in place... and should leave the alpha alone.


On 8/5/06, Luke Miller <dodgyville@xxxxxxxxx> wrote:
Hello,

I have a PNG with an alpha channel, I would like to change the colours
of the surface (using array3d or similar), eg to flip the blue and red
channels. However, I find that when I convert my array3D back to a
surface, the alpha information has been lost.

Is there a way to change pixel colour data and preserve alpha?

Thanks,
Luke