Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Saving Images in Pygame
Index -> Programming, Python -> Python Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
MB2003




PostPosted: Mon Feb 18, 2008 5:09 pm   Post subject: Saving Images in Pygame

When I try to save my surface using
image.save( Surface, filename )

i get an AttributeError because it says that "pygame.Surface() has no attribute 'save' "
HELP!!
Sponsor
Sponsor
Sponsor
sponsor
McKenzie




PostPosted: Mon Feb 18, 2008 7:27 pm   Post subject: Re: Saving Images in Pygame

image is a module, it has a save function inside it. If your code looks like:
image.save(screen, filename)

and it complains about attribute error then you probably overwrote the image module with a surface. That would look like:
image = image.load("bunnies.bmp")

the image module did the loading, but then you replaced the image module with a surface. The answer, change what you call your image.
Display posts from previous:   
   Index -> Programming, Python -> Python Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: