[GRASS-SVN] r67012 - grass/trunk/gui/wxpython/animation

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Dec 3 07:33:17 PST 2015


Author: annakrat
Date: 2015-12-03 07:33:17 -0800 (Thu, 03 Dec 2015)
New Revision: 67012

Modified:
   grass/trunk/gui/wxpython/animation/utils.py
Log:
replace PIL obsolete function fromstring to frombytes #2815

Modified: grass/trunk/gui/wxpython/animation/utils.py
===================================================================
--- grass/trunk/gui/wxpython/animation/utils.py	2015-12-03 03:13:56 UTC (rev 67011)
+++ grass/trunk/gui/wxpython/animation/utils.py	2015-12-03 15:33:17 UTC (rev 67012)
@@ -260,7 +260,7 @@
 def WxImageToPil(image):
     """Converts wx.Image to PIL image"""
     pilImage = Image.new('RGB', (image.GetWidth(), image.GetHeight()))
-    pilImage.fromstring(image.GetData())
+    getattr(pilImage, "frombytes", getattr(pilImage, "fromstring"))(image.GetData())
     return pilImage
 
 



More information about the grass-commit mailing list