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

Re: [pygame] Fade in/out transition effect



psymaster@caths.co.uk wrote:
I have written a program that does a slideshow, but I want to make the
transition softer, and I want to do this by fading between the two images.
Anybody can point me to more info about how this can be done in pygame?
You can set the image alpha value to something like 20 and blit it several times. This won't be entirely fast but it gives you a decent fade speed. Eventually you should blit the 'opaque' version of the image so you are really seeing the right thing. This will be pretty slow, so be careful. Perhaps give the transition a time limit, so if the transparent blits are slow it will only do 1 or 2 in between steps.

I'd recommend using some simple "wipe" effects where you just draw sections of the image from the top down. This will run fast and easy. No performance problems on the slowest of platforms.