From 754eb19d9d971d43a7fe36e4f5c21b6986e064ed Mon Sep 17 00:00:00 2001 From: wiredfool Date: Tue, 19 Mar 2013 13:53:37 -0700 Subject: [PATCH] Fixing deprecation warning on py26 --- PIL/WebPImagePlugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PIL/WebPImagePlugin.py b/PIL/WebPImagePlugin.py index 628ac7ff6..9321c05f3 100644 --- a/PIL/WebPImagePlugin.py +++ b/PIL/WebPImagePlugin.py @@ -23,7 +23,7 @@ def _save(im, fp, filename): raise IOError("cannot write mode %s as WEBP" % im.mode) quality = im.encoderinfo.get("quality", 80) - data = _webp.WebPEncodeRGB(im.tostring(), im.size[0], im.size[1], im.size[0] * 3, float(quality)) + data = _webp.WebPEncodeRGB(im.tobytes(), im.size[0], im.size[1], im.size[0] * 3, float(quality)) fp.write(data) Image.register_open("WEBP", WebPImageFile, _accept)