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

Re: [pygame] pygame.image.save?



> I just ran into a problem. I cannot seem to find the "pygame.image.save()" 
> function referenced to in the documentation... Calling it raises an 
> AttributeError. "dir(pygame.image)" does not reveal its presence either?
> 
> Has the function moved, or does it not exist yet? Is there another way of 
> going about saving the image? Creating the thumbnail? Even PIL would require 
> me to use pygame.image.save() at some point...

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.

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.

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


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.



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