[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Segfault in pygame.image.tostring()?



On Mon, 10 Mar 2003, Pete Shinners wrote:

> Jasper Phillips wrote:
> >>>I'm trying to save screen shots as .png's using PIL, but I'm getting
> >>>a segfault in a pygame when I try to convert the screen image into
> >>>a string:
> > 
> > bytesize: 4
> > flags:    1073741826
> 
> 
> ah, i see you are running with an opengl display. many SDL functions 
> simply do not work with opengl surfaces. the big problem is there is no 
> way to directly access the pixels. the pygame.image.save() function has 
> some code to workaround this problem, so you can save the images as .BMP 
> or .TGA if you need.

I can see how that'd be a pain in the ass.  It's nice that pygame takes care
of this kind of stuff!

> i've added the 'opengl' code in image.save() to image.tostring() now 
> also, so it should be able to work in the next release (or if you grab 
> the cvs versions)

Thanks!  Any idea how long until the next release?

-Jasper


____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org