yamins81/scikit-data — comment on commit ad557a3936e3ee27d721e45e04547e393dc8404c
File: skdata/utils/image.py line 14
By npinto:

Should we add a dependency on scikits-image ? They have much better wrapper around FreeImage, etc. much more stable than PIL.

Another imread bug that we were getting with IICBU took a long time to get right, but we finally identified the culprit: "16-bit big endian tiff image":

```
import numpy as np
import scipy as sp
import Image

def imread(fname):
im = Image.open(fname)

# handle special case
# with 16-bit big endian image
if im.mode == 'I;16B':
im = im.convert('I')
arr = np.array(im, dtype='uint16')
else:
arr = sp.misc.imread(fname)

return arr

imsave = sp.misc.imsave
```

Bottom line: watch out, PIL may bite you in the future ;-)

HTH