Build Pygame with full image support?

2019-07-20 17:15发布

问题:

I'm trying to create a graphical application and using pygame as my library. However, in order to load non-bmp files I need to build python with full image support.

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.

How do I do this?

回答1:

The image module is PIL - you can get it here - http://www.pythonware.com/products/pil