Browse Source

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 years ago
parent
commit
381cff91ff
1 changed files with 1 additions and 1 deletions
  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