Skip to content

Commit

Permalink
Use Image.tobytes() instead of tostring()
Browse files Browse the repository at this point in the history
tostring() was deprecated (in Pillow at least) in version 2.0.  See python-pillow/Pillow@baa5143
  • Loading branch information
Joe Sapp committed Nov 4, 2015
1 parent 5602021 commit 4d88788
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gourmet/gtk_extras/ratingWidget.py
Expand Up @@ -135,7 +135,7 @@ def get_pixbuf_from_image (self, image, make_white_opaque=True):
if is_rgba: rowstride = 4
else: rowstride = 3
pb=gtk.gdk.pixbuf_new_from_data(
image.tostring(),
image.tobytes(),
gtk.gdk.COLORSPACE_RGB,
is_rgba,
8,
Expand Down
2 changes: 1 addition & 1 deletion gourmet/plugins/browse_recipes/icon_helpers.py
Expand Up @@ -38,7 +38,7 @@ def get_pixbuf_from_image (image):
if is_rgba: rowstride = 4
else: rowstride = 3
pb=gtk.gdk.pixbuf_new_from_data(
image.tostring(),
image.tobytes(),
gtk.gdk.COLORSPACE_RGB,
is_rgba,
8,
Expand Down

0 comments on commit 4d88788

Please sign in to comment.