[Python-modules-commits] [gamera] 01/07: update-pil-plugin

Daniel Stender danstender-guest at moszumanska.debian.org
Tue Dec 1 08:17:43 UTC 2015


This is an automated email from the git hooks/post-receive script.

danstender-guest pushed a commit to branch master
in repository gamera.

commit 7c3b4087fdc26234f78268a02d64d848fb0c4e00
Author: Daniel Stender <debian at danielstender.com>
Date:   Tue Dec 1 08:23:53 2015 +0100

    update-pil-plugin
    
    replace python-pil deprecated methods which have been finally removed
    in 3.0.0-1
    Bug: https://bugs.debian.org/806747
    Forwarded: https://groups.yahoo.com/neo/groups/gamera-devel/conversations/messages/2434
    Last-Update: 2015-11-30
---
 gamera/plugins/pil_io.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gamera/plugins/pil_io.py b/gamera/plugins/pil_io.py
index b2f4f5d..c238753 100644
--- a/gamera/plugins/pil_io.py
+++ b/gamera/plugins/pil_io.py
@@ -80,7 +80,7 @@ else:
                 offset,
                 Dim(image.size[0], image.size[1]),
                 pixel_type, DENSE,
-                image.tostring())
+                image.tobytes())
         __call__ = staticmethod(__call__)
 
     class to_pil(PluginFunction):
@@ -101,7 +101,7 @@ else:
             else:
                 raise ValueError("Only RGB and GREYSCALE Images are supported.")
             size = (image.ncols, image.nrows)
-            return PIL.fromstring(mode, size,
+            return PIL.frombytes(mode, size,
                                   _string_io._to_raw_string(image))
         __call__ = staticmethod(__call__)
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/gamera.git



More information about the Python-modules-commits mailing list