summaryrefslogtreecommitdiff
path: root/rapid/thumbnail.py
diff options
context:
space:
mode:
Diffstat (limited to 'rapid/thumbnail.py')
-rw-r--r--rapid/thumbnail.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rapid/thumbnail.py b/rapid/thumbnail.py
index ba72828..e10ae3d 100644
--- a/rapid/thumbnail.py
+++ b/rapid/thumbnail.py
@@ -129,10 +129,10 @@ class PicklablePIL:
def __init__(self, image):
self.size = image.size
self.mode = image.mode
- self.image_data = image.tostring()
+ self.image_data = image.tobytes()
def get_image(self):
- return Image.fromstring(self.mode, self.size, self.image_data)
+ return Image.frombytes(self.mode, self.size, self.image_data)
def get_pixbuf(self):
return image_to_pixbuf(self.get_image())