8000 [3167200] Use from PIL import Image · matplotlib/matplotlib@9e89b76 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9e89b76

Browse files
committed
[3167200] Use from PIL import Image
svn path=/branches/v1_0_maint/; revision=8939
1 parent 92814db commit 9e89b76

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

examples/pylab_examples/image_demo3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
from pylab import *
33
try:
4-
import Image
4+
from PIL import Image
55
except ImportError, exc:
66
raise SystemExit("PIL must be installed to run this example")
77

examples/pylab_examples/to_numeric.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from pylab import *
99
from matplotlib.backends.backend_agg import FigureCanvasAgg
1010
try:
11-
import Image
11+
from PIL import Image
1212
except ImportError, exc:
1313
raise SystemExit("PIL must be installed to run this example")
1414

examples/user_interfaces/histogram_demo_canvasagg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
if 0:
5656
# pass off to PIL
57-
import Image
57+
from PIL import Image
5858
im = Image.fromstring( "RGB", (w,h), s)
5959
im.show()
6060

lib/matplotlib/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,7 @@ def imread(fname, format=None):
11571157

11581158
def pilread():
11591159
'try to load the image with PIL or return None'
1160-
try: import Image
1160+
try: from PIL import Image
11611161
except ImportError: return None
11621162
image = Image.open( fname )
11631163
return pil_to_array(image)

0 commit comments

Comments
 (0)
0