Can someone give me some example code that creates a surface with a transparent background in pygame?
This should do it:
image = pygame.Surface([640,480], pygame.SRCALPHA, 32) image = image.convert_alpha()
Make sure that the color depth (32) stays explicitly set else this will not work.
1.4m articles
1.4m replys
5 comments
57.0k users