[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Surfaces with Transparent Backgrounds
Aha! Figured it out!
def load_strip(filename, width):
imgs = []
img = load_image(filename)
for x in range(img.get_width()/width):
i = pygame.Surface((width, img.get_height())).convert_alpha()
i = i.convert_alpha()
i.fill((255,255,255,0))
i.blit(img, (-x*width, 0))
imgs.append(i)
return imgs
Everything's working awesome now.
--
- pymike