IdentifiantMot de passe
Mot de passe oublié ?Je m'inscris ! (gratuit)
The ImageGL Module
Python Imaging Library Handbook

Prev   Next

The ImageGL Module

(PIL Plus (off-site link)) (May be added to 1.1.6) The ImageGL module allows you to copy PIL images to OpenGL texture objects. The module is designed to be used together with a separate OpenGL binding, such as PyOpenGL (off-site link).


Creating an OpenGL texture
import Image, ImageGL

... set up an OpenGL context ...

factory = ImageGL.TextureFactory()

im ="example.jpg")

texture = factory.maketexture(im)
texture.draw((0, 0, 100, 100))