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

[pygame] Blit a surface with mask

Hi, I have a surface where a play a movie:

background = "" 480))
video = pygame.movie.Movie('video.mpg')

And I have a black-white surface to use as mask:

mask = pygame.image.load('mask.png')

I want to 'crop' the video. Dont know if have to blit the video in the mask, or the reverse. Or to merge both into a new surface.
How do it?

Ricardo Franco Andrade             @ricardokrieg

( Game | Desktop | Web ) Developer

email: ricardo.krieg@xxxxxxxxx
contact: +55 (86) 9958 9725
             +55 (86) 9436 0830 
twitter: twitter.com/ricardokrieg
facebooK: https://www.facebook.com/krieg.ricardo
github: https://github.com/ricardokrieg