Re: [pygame] Depth Screenshot

2009-10-10 Thread Ian Mallett
On Tue, Oct 6, 2009 at 7:50 PM, RB[0] roeb...@gmail.com 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 ren...@gmail.com wrote: something

Re: [pygame] Depth Screenshot

2009-10-07 Thread Brian Fisher
On Tue, Oct 6, 2009 at 7:43 PM, Ian Mallett geometr...@gmail.com wrote: The issue is that in the case of depth, data is of length x*y. In the case of RGB color, it is 3*rect[2]*rect[3]. In the case of RGBA, it is 4*rect[2]*rect[3]. PyGame doesn't know how to convert it (there's no

Re: [pygame] Depth Screenshot

2009-10-07 Thread René Dudfield
hi, I guess you could try converting it into an 8bit surface, and then saving that. You could do it with surf array fairly quickly I think... something like: red = rgb_im[:,:,0:1] surf_red = pygame.image.fromstring(red, size, 'P') pygame.image.save(surf_red, red.png) You might need

[pygame] Depth Screenshot

2009-10-06 Thread Ian Mallett
Hello, I'm trying to debug a weird FBO/depth problem, and it would be great to have screenshots of the depth. My current method does not work: def ScreenSurf(rect=AUTO,type=RGB,framebuffer=0): if rect == AUTO: size = glGetFloatv(GL_VIEWPORT) size =

Re: [pygame] Depth Screenshot

2009-10-06 Thread RB[0]
I would suggest PIL - don't have the exact functions for it off the top of my head though... On Tue, Oct 6, 2009 at 9:43 PM, Ian Mallett geometr...@gmail.com wrote: Hello, I'm trying to debug a weird FBO/depth problem, and it would be great to have screenshots of the depth. My current