Skip to content

Commit e704ac3

Browse files
committed
Merge pull request #151 from natalieklein/master
fix import Image in make_montage
2 parents 02f0688 + 7463149 commit e704ac3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

surfer/viz.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ def make_montage(filename, fnames, orientation='h', colorbar=None,
7373
out : array
7474
The montage image data array.
7575
"""
76-
import Image
76+
try:
77+
import Image
78+
except ImportError:
79+
from PIL import Image
7780
# This line is only necessary to overcome a PIL bug, see:
7881
# http://stackoverflow.com/questions/10854903/what-is-causing-
7982
# dimension-dependent-attributeerror-in-pil-fromarray-function

0 commit comments

Comments
 (0)