[Python-3000] PEP 368: Standard image protocol and class
stargaming at gmail.com
Sun Jul 1 18:01:12 CEST 2007
BJörn Lindqvist schrieb:
> Cool PEP! I really love the API for the Image class. A standard Image
> class would be a useful addition to the standard library.
> But I cannot see how it would solve the problem with to many image
> classes. The reason why PIL, PyGame and wxPython has different image
> classes is because each of them use different C functions for
> manipulating said image classes. These differences bubble up through
> the bindings and results in PIL exposing an Image, PyGame a Surface
> and wxPython a wxImage. The result is that if you want to use a PIL
> Image in say PyGame, you still need to convert it. If PIL stores RGB
> images with 32 bpp and PyGame uses 24, then you'll have to convert it
> to get it into the proper format.
> The only way to get compatibility between the libraries is to create
> an image library in C _and_ get those libraries to start using it.
They'll all quack the same way. (This is paraphrased in the PEP's
abstract, as far as I read it.)
More information about the Python-3000