pygame2.sdl.image – SDL image I/O wrapper module

SDL image I/O wrapper module

Module Functions

pygame2.sdl.image.load_bmp(file) → :class:`pygame2.sdl.video.Surface`

Loads a BMP file and creates a pygame2.sdl.video.Surface from it.

Loads a BMP file and creates a pygame2.sdl.video.Surface from it. The file argument can be either a file object or the filename.

Note

The file object must support binary read and write access. This is especially important for Python 3.x users.

pygame2.sdl.image.save_bmp(surface, file) → None

Saves a surface to a bitmap file.

Saves a pygame2.sdl.video.Surface to the specified file, where file can be a filename or file object.

Note

The file object must support binary read and write access. This is especially important for Python 3.x users.