[Image-SIG] 3 channel float images

Fredrik Lundh fredrik at pythonware.com
Thu Jul 13 15:09:28 CEST 2006


Matthew Trentacoste wrote:

>I do work with high dynamic range images and would like to see about
> extending PIL to support them.  For those unfamiliar, the primary
> difference is that all the channels are floating point.
>
> I've more or less deconstructed the way that the importer/exporter
> code works, but wanted to check on what to do to be able to create
> images that contain 3 floating point channels.
>
> What all do I need to do?
> +   Add an experimental mode?
> +   Add a memory mapping?
> +   Add a new case to storage.c?
>
> Any pointers and help would be greatly appreciated.

PIL's internal storage model only supports one and four-byte pixels well,
and fixing that isn't trivial (it's on my list for the "PIL version beyond 1.1.6"
project, though; that release will use a much more flexible storage model).

if I were you, I'd fake it, using a container class that holds three ordinary F
images, or a single width*3 image.

</F> 





More information about the Image-SIG mailing list