浏览代码

replace PIL obsolete function fromstring to frombytes https://trac.osgeo.org/grass/ticket/2815

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@67012 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 9 年之前
父节点
当前提交
381cff91ff
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      gui/wxpython/animation/utils.py

+ 1 - 1
gui/wxpython/animation/utils.py

@@ -260,7 +260,7 @@ def RenderText(text, font, bgcolor, fgcolor):
 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