0

(The answer in the "cloned" question doesn't fix this one)

I googled it for hours and cannot find a solution for this situation.

When I load a PNG file like this:

sprites = pygame.image.load("sprites.png")

I get:

pygame.error: File is not a Windows BMP file

For:

  • python 3.2.3
  • pygame 1.9.2a0
  • ubuntu 12.10

Could anybody help me, please? Thanks in advance

  • how did you install pygame? – Bartlomiej Lewandowski Feb 18 '14 at 13:20
  • I followed the instructions for python3 in http://www.pygame.org/wiki/CompileUbuntu?parent=Compilation #install dependencies `sudo apt-get install mercurial python3-dev python3-numpy ffmpeg \ libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev \ libsdl1.2-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev` # Grab source `hg clone https://bitbucket.org/pygame/pygame` # Finally build and install `cd pygame` python3 setup.py build sudo python3 setup.py install should I follow another way? Thanks for your quick response –  Feb 18 '14 at 13:25
  • what does `pygame.image.get_extended()` return? – Bartlomiej Lewandowski Feb 18 '14 at 13:44
  • it returns 0, how can I enable the extended support? –  Feb 18 '14 at 13:48
  • I saw it, but it suggest as solution: "I suppose you will need Python imaging libraries to be installed to get extended file formats to be supported by Pygame. OR, you could always convert the images to BMP to avoid the hassle." I don't want the BMP files, in fact I use the alpha channel, and it doesn't say which libraries are needed –  Feb 18 '14 at 14:15
  • Apparently it means PIL (Python Imaging Library), bur there is no version available for python3, must be another way to get this... –  Feb 18 '14 at 14:19
  • It's not a cloned one, this one is for Python3, no pil version available for this. The solution in the other question doesn't fix this one. Well... I think it's easier vote a negative and close the question, right? –  Feb 18 '14 at 14:51

0 Answers0