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

Re: [pygame] pygame.image.save?




Hello again!

Pete Shinners -- Mardi 22 Mai 2001 18:06:
> the online documentation is always referencing the latest code in
> CVS. If you downloaded pygame-1.0 it should contain documentation
> for pygame-1.0.
> 

Sorry about that. I will be more careful in the future.

> There is a new save in pygame.image that can correctly handle
> the display surface when it is an OPENGL surface. the image module
> is changing from just "loading" to handling all the image transferring
> functions.
>
> in pygame 1.0 and older there is a Surface.save() function which
> can handle the image saving. note that it is deprecated and will
> still work in pygame-1.1, but after that it will be gone.
> 

The following code:

        import StringIO
        dummy_file = StringIO.StringIO()
        self.surface.save(dummy_file)

Gives me a crash the following output on the console:

Fatal Python error: Segmentation Fault
Aborted

No tracaback, nothing. I have to say, with Python, this is a first. :-) I 
suppose there is a bug in 1.0's Surface.save() with StringIO file objects? If 
so, don't worry about it: it can wait until 1.1 (for me, at least).

> you'll either need to update to using the latest CVS code for
> pygame, or use the Surface.save() routine and update later.
> 

Hm. I have never used CVS. I see that you updated your tarball today, though, 
so I am tempted to try it out. Do you recommend I use the CVS version to 
develop my game? Would I be better off sticking to 1.0?

>
> the image module should also have some "tostring", "fromstring"
> PIL-like functions sometime this week. this will allow you to
> easily go back and forth between PIL and pygame. PyOpenGL also
> uses this format when creating textures, so it will be a perfect
> fit there too.
>

Great job! I look forward to seeing it. Thank you very muich for all your 
time and assistance, by the way. I really appreciate it.

Cheers,

Jérôme Loisel


-- 
Jérôme Loisel, étudiant et webmestre
Lévinux: GNU/Linux pour la communauté
http://www.levinux.org/
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org