Images

pyglet provides functions for loading and saving images in various formats using native operating system services. pyglet can also work with the Python Imaging Library (PIL) for access to more file formats.

Loaded images can be efficiently provided to OpenGL as a texture, and OpenGL textures and framebuffers can be retrieved as pyglet images to be saved or otherwise manipulated.

pyglet also provides an efficient and comprehensive Sprite class, for displaying images on the screen with an optional transform.