
[Sorry for the cross-posting, but I think this may be relevant for both NumPy and ndimage.] Hello everyone, I have submitted to the Python core developers a new PEP (Python Enhancement Proposal): http://www.python.org/dev/peps/pep-0368/ It proposes two things: * the creation of a standard image protocol/interface that can be hopefully implemented interoperably by most Python libraries that manipulate images; * 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: http://www.python.org/dev/peps/pep-3118/ 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 necessary). A discussion about it is currently going on in the python-3000 mailing list: <http://mail.python.org/pipermail/python-3000/2007-July/thread.html#8648> 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. -- Lino Mastrodomenico E-mail: l.mastrodomenico@gmail.com