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

Re: [pygame] Depth Screenshot



On Tue, Oct 6, 2009 at 7:50 PM, RB[0] <roebros@xxxxxxxxx> wrote:
I would suggest PIL - don't have the exact functions for it off the top of my head though...
I considered that.  I'm trying to avoid PIL, though. 

On Wed, Oct 7, 2009 at 12:24 AM, René Dudfield <renesd@xxxxxxxxx> wrote:
something like:
    red = rgb_im[:,:,0:1]
    surf_red = pygame.image.fromstring(red, size, 'P')
    pygame.image.save(surf_red, "red.png")
Not sure how this works, but it looks like the right track. 

data = ""> returns a string, so red = rgb_im[:,:,0:1] doesn't work.

Ian