[SciPy-dev] PEP 368: Standard image protocol and class
Tue Jul 3 18:22:46 CDT 2007
[Sorry for the cross-posting, but I think this may be relevant for
both NumPy and ndimage.]
I have submitted to the Python core developers a new PEP (Python
It proposes two things:
* the creation of a standard image protocol/interface that can be
hopefully implemented interoperably by most Python libraries that
* the addition to the Python standard library of a basic
implementation of the new protocol.
The new image protocol is heavily inspired by a subset of the NumPy
array interface, with a few image-specific additions and changes (e.g.
the "size" attribute of an image is a tuple (width, height)).
Of course it would be wonderful if these new image objects could
interoperate out-of-the-box with numpy arrays and ndimage functions.
There is another proposal that would be very useful for that, PEP 3118
by Travis Oliphant and Carl Banks:
The image PEP (368) currently lists only modes based on uint8/16/32
numbers, but the final version will probably also include modes based
on float32 and float16 (converted in software to/from float32/64 when
A discussion about it is currently going on in the python-3000 mailing list:
Any suggestion, comment or criticism from the NumPy/SciPy people would
be very useful, but IMHO keeping the discussion only on the
python-3000 ML may be a good idea, to avoid duplicating answers on
different mailing lists.
Thanks in advance.
More information about the Scipy-dev