2009/10/7 Stéfan van der Walt
<stefan@sun.ac.za>
2009/10/7 Ralf Gommers <ralf.gommers@googlemail.com>:
> Do you want a single function for everything, or different functions for
> single-page / multi-page images? Having to do something like:
>
> img = open(fname)
> img2d = imread(img)
> img.seek()
> img2d = imread(img)
> img.seek()
>
> would be less than ideal.
I have some code waiting to be merged that implements an
ImageCollection. Typically, you'd have
ic = ImageCollection('*.png')
where all PNGs are access only as necessary, and are cached once
they've been read from disk. You can also index into or iterate over
an ImageCollection (yielding the image arrays). It sounds like a
multi-image could be interpreted as an ImageCollection.
That sounds like a good option. Let me know if you want me to test it / work on it / send you some multi-image files.
Cheers,
Ralf
> Anyway, a big thumbs up for a plugin system no matter what the interface
> will look like exactly.
OK, I'll implement this over the weekend. If someone else has time,
feel free to jump in.
Cheers
Stéfan