Fix imread regression for int16 images with PIL plugin.

Regression introduced in PR 101.
This commit is contained in:
Tony S Yu
2011-12-13 09:58:25 -05:00
parent 497b327be8
commit 341c2e40be
+1 -1
View File
@@ -23,7 +23,7 @@ def imread(fname, dtype=None):
im = im.convert('RGB')
elif im.mode == '1':
im = im.convert('L')
elif im.mode == 'I;16':
elif im.mode.startswith('I;16'):
shape = im.size
dtype = '>u2' if im.mode.endswith('B') else '<u2'
im = np.fromstring(im.tostring(), dtype)