I would suggest PIL - don't have the exact functions for it off the top of my head though...
something like: red = rgb_im[:,:,0:1] surf_red = pygame.image.fromstring(red, size, 'P') pygame.image.save(surf_red, "red.png")