python - 构建具有完整图像支持的 Pygame?

标签 python image pygame bmp

我正在尝试创建一个图形应用程序并使用 pygame 作为我的库。但是,为了加载非 bmp 文件,我需要构建具有完整图像支持的 python。

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.

我该怎么做?

最佳答案

图像模块是 PIL - 你可以在这里得到它 - http://www.pythonware.com/products/pil

关于python - 构建具有完整图像支持的 Pygame?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19365060/

相关文章:

python - 我正在尝试使用 pygame 和 event.key 制作一个 2 人赛车游戏。key 不起作用

python - 当 LANG=C 时如何在 Python 2 中打印 Unicode

python - 如何使用 BeautifulSoup 等待一秒钟保存汤元素以让元素在页面中加载完成

image - 如何在 Flutter 中用图像屏蔽文本?

python - 如何处理 pygame.get_pressed() 来接收输入

python - 如何调整仅在移动鼠标时才起作用的代码

python - 自定义 Pyramid _formalchemy 形式

python - 如何获取 DataFrame 中条件值的行数?

php - 我的 php 程序没有将上传的图像移动到目录(ubuntu)

html - div 中的图像在图像下方有额外的空间