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

Re: [pygame] Inverting colors



oooo ok thx :-)

On Wed, Sep 17, 2008 at 10:15 AM, Nicholas Dudfield <ndudfield@xxxxxxxxx> wrote:
1.9?  Until then....

def inverted(img):
  inv = pygame.Surface(img.get_rect().size, pygame.SRCALPHA)
  inv.fill((255,255,255,255))
  inv.blit(img, (0,0), None, BLEND_RGB_SUB)
  return inv


pymike wrote:
Thanks :-) I actually already converted my font to a shapestrip, and I got it working fine now :-) http://pymike.4rensics.org/files/Screenshot-PixelWars-1.png

However pygame SHOULD have a function to invert colors on images. like image.invert()

Cheers




--
- pymike (http://pymike.4rensics.org/)