2009/10/21 Ralf Gommers email@example.com:
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.
Seeing the problem Holger reported makes me think that imread's behaviour is rather counter-intuitive. Should we not introduce a dtype flag, so that the outcome type is always as expected?
imread('x.png') -> (uint8, uint8, uint8, ...) imread('x.png', flatten=True) -> uint8 imread('x.png', flatten=True, dtype=float) -> float imread('x.png', dtype=float) -> (float, float, float, ...)
When it comes to dtypes, surprises are seldom good.
What do you think?