Modest attempt at normalizing file extensions

This commit is contained in:
Tony S Yu
2013-12-05 23:38:13 -06:00
parent 99aa5a8238
commit e59daf474c
+1 -1
View File
@@ -99,7 +99,7 @@ def imread(fname, as_grey=False, plugin=None, flatten=None,
# TODO: This should probably use imghdr to get the image format.
try:
_, extension = os.path.splitext(fname)
function = function + extension
function = function + extension.lower()
except AttributeError: # Buffers don't work with splitext
pass
img = call_plugin(function, fname, plugin=plugin, **plugin_args)