[Numpy-discussion] [SciPy-dev] PEP 368: Standard image protocol and class

Bill Baxter wbaxter@gmail....
Tue Jul 3 20:24:19 CDT 2007


I'm not subscribed to the main Python list, so I'll just ask here.

It looks like the protocol doesn't support any floating point image formats,
judging from the big table of formats in the PEP.  These are becoming more
important these days in computer graphics as a way to pass around high
dynamic range images.  OpenEXR is the main example of such a format:
http://www.openexr.com/.  I think a PEP that aims to be a generic image
protocol should support at least 32 bit floats if not 64-bit doubles and 16
bit "Half"s used by some GPUs (and supported by the OpenEXR format).

---bb

On 7/4/07, Lino Mastrodomenico <l.mastrodomenico@gmail.com> wrote:
>
> [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
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070704/1128aa85/attachment.html 


More information about the Numpy-discussion mailing list