Revision: 8939
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8939&view=rev
Author: mdboom
Date: 2011-02-01 16:02:54 +0000 (Tue, 01 Feb 2011)
Log Message:
-----------
[3167200] Use from PIL import Image
Modified Paths:
--------------
branches/v1_0_maint/examples/pylab_examples/image_demo3.py
branches/v1_0_maint/examples/pylab_examples/to_numeric.py
branches/v1_0_maint/examples/user_interfaces/histogram_demo_canvasagg.py
branches/v1_0_maint/lib/matplotlib/image.py
Modified: branches/v1_0_maint/examples/pylab_examples/image_demo3.py
===================================================================
--- branches/v1_0_maint/examples/pylab_examples/image_demo3.py 2011-02-01
04:15:20 UTC (rev 8938)
+++ branches/v1_0_maint/examples/pylab_examples/image_demo3.py 2011-02-01
16:02:54 UTC (rev 8939)
@@ -1,7 +1,7 @@
#!/usr/bin/env python
from pylab import *
try:
- import Image
+ from PIL import Image
except ImportError, exc:
raise SystemExit("PIL must be installed to run this example")
Modified: branches/v1_0_maint/examples/pylab_examples/to_numeric.py
===================================================================
--- branches/v1_0_maint/examples/pylab_examples/to_numeric.py 2011-02-01
04:15:20 UTC (rev 8938)
+++ branches/v1_0_maint/examples/pylab_examples/to_numeric.py 2011-02-01
16:02:54 UTC (rev 8939)
@@ -8,7 +8,7 @@
from pylab import *
from matplotlib.backends.backend_agg import FigureCanvasAgg
try:
- import Image
+ from PIL import Image
except ImportError, exc:
raise SystemExit("PIL must be installed to run this example")
Modified:
branches/v1_0_maint/examples/user_interfaces/histogram_demo_canvasagg.py
===================================================================
--- branches/v1_0_maint/examples/user_interfaces/histogram_demo_canvasagg.py
2011-02-01 04:15:20 UTC (rev 8938)
+++ branches/v1_0_maint/examples/user_interfaces/histogram_demo_canvasagg.py
2011-02-01 16:02:54 UTC (rev 8939)
@@ -54,7 +54,7 @@
if 0:
# pass off to PIL
- import Image
+ from PIL import Image
im = Image.fromstring( "RGB", (w,h), s)
im.show()
Modified: branches/v1_0_maint/lib/matplotlib/image.py
===================================================================
--- branches/v1_0_maint/lib/matplotlib/image.py 2011-02-01 04:15:20 UTC (rev
8938)
+++ branches/v1_0_maint/lib/matplotlib/image.py 2011-02-01 16:02:54 UTC (rev
8939)
@@ -1157,7 +1157,7 @@
def pilread():
'try to load the image with PIL or return None'
- try: import Image
+ try: from PIL import Image
except ImportError: return None
image = Image.open( fname )
return pil_to_array(image)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins