[Python-3000] PEP 368: Standard image protocol and class (original) (raw)
BJörn Lindqvist bjourne at gmail.com
Sun Jul 1 14:34:03 CEST 2007
- Previous message: [Python-3000] PEP 368: Standard image protocol and class
- Next message: [Python-3000] PEP 368: Standard image protocol and class
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
-- mvh Björn
- Previous message: [Python-3000] PEP 368: Standard image protocol and class
- Next message: [Python-3000] PEP 368: Standard image protocol and class
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]