From b9b6972097c9fb03342830d5a9894f6e7f09d817 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Wed, 13 Mar 2013 19:42:21 -0700 Subject: [PATCH] Use BytesIO instead of StringIO --- PIL/WebPImagePlugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PIL/WebPImagePlugin.py b/PIL/WebPImagePlugin.py index d1558d113..5492f6641 100644 --- a/PIL/WebPImagePlugin.py +++ b/PIL/WebPImagePlugin.py @@ -1,6 +1,6 @@ from PIL import Image from PIL import ImageFile -import StringIO +from io import BytesIO import _webp def _accept(prefix): @@ -15,7 +15,7 @@ class WebPImageFile(ImageFile.ImageFile): self.mode = "RGB" data, width, height = _webp.WebPDecodeRGB(self.fp.read()) self.size = width, height - self.fp = StringIO.StringIO(data) + self.fp = BytesIO(data) self.tile = [("raw", (0, 0) + self.size, 0, 'RGB')] def _save(im, fp, filename):