我不能在pygame中加載非BMP文件的圖像。我到處尋找解決方案,但找不到一個解決方案。 在pygame的網站,他們這樣說:完整的內置文件支持PYGAME
The image module is a required dependency of Pygame, but it only optionally supports any extended file formats. By default it can only load uncompressed BMP images. When built with full image support, the pygame.image.load - load new image from a file function can support the following formats.
我不明白做什麼,我怎麼能得到完整的構建映像支持。
我在ubuntu 13.04上運行python 3.3。 我是python的新手。
有幫助嗎?
錯誤:
File "/home2/tor/workspace/PYGAME/src/Main.py", line 13, in <module>
ball = pygame.image.load("/home2/tor/Downloads/ball.gif")
pygame.error: File is not a Windows BMP file
順便說一句我也試過這樣的JPG文件。
您是如何安裝pygame的? –