On Wed, Oct 21, 2009 at 2:47 PM, Ralf Gommers <ralf.gommers@googlemail.com> wrote:

On Wed, Oct 21, 2009 at 1:32 PM, SirVer <sirver@gmx.de> wrote:

On a side note, can't we get a real bug tracker somewhere?

This one should do the job right? At least for now.
I have a selection of grayscale (8bit) tifs in a directory.

In [14]: k = io.ImageCollection("calib/*.tif", True)

In [15]: k[0].dtype
Out[15]: dtype('uint8')

In [16]: k = io.ImageCollection("calib/*.tif", as_grey=True)

In [17]: k[0].dtype
Out[17]: dtype('float32')
But the docs say:
as_grey : bool, optional
       If True, convert the input images to grey-scale. This does not
       affect images that are already in a grey-scale format.

Obviously the image data type gets converted though.

Thanks for testing Holger.

I wrote the docstring based on what I thought pil_imread was doing. Obviously I was wrong. This is the desired behavior imho, so I'll come up with a patch for pil_imread.

Fixed in my asgrey branch: http://github.com/rgommers/scikits.image/tree/asgrey
I sent Stefan a pull request but grab it there if you need it now.

If you only have grey-scale images setting as_grey to False should do the right thing as well.