Made changes to image reading and writing routines to support file objects properly. Actually scipy.misc.imread didn't have to be changed because PIL already supports file objects, but I changed the docstring to say explicitly that it supports them. I made similar changes to scipy.ndimage.misc.imread, though I'm not quite sure why that can't just import from scipy.misc.
File object support for imread and imsave
Coverage remained the same when pulling f63f3aa on jleinonen:master into 5739a8b on scipy:master.
Thanks for the fix. I'll try to have a closer look at this in a few days.
It's indeed ugly that we have two imread functions. We should take over the latest fixes that were made to this function in scikit-image and deprecate misc.imread.
OK I'm not going to get around to reworking the misc module any time soon. So we should merge this PR.
This is actually a backwards compatibility break, because you can use positional arguments like kwargs (like imread(name='fname.png')). So can you undo this change?
Can you add a test for the functionality you add here to ndimage/tests/test_io.py?
With a test and undoing the rename this should be good to go.
Changed parameter naming and added test for file objects
Finally got around to make these changes.
Coverage remained the same when pulling 60a43ae on jleinonen:master into 5739a8b on scipy:master.