changeset 1653:8ea61f1fda9c

api update Ignore-this: 95b8145965fbee11896248594ae21b2d
author drewp@bigasterisk.com
date Sat, 10 Jun 2017 18:31:41 +0000
parents c49e56822a98
children 5849146f4eb4
files light9/vidref/remotepivideo.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/light9/vidref/remotepivideo.py	Sat Jun 10 17:52:02 2017 +0000
+++ b/light9/vidref/remotepivideo.py	Sat Jun 10 18:31:41 2017 +0000
@@ -128,7 +128,7 @@
             img = Image.open(StringIO(jpg))
             if not hasattr(self, 'livePixBuf'):
                 self.livePixBuf = gtk.gdk.pixbuf_new_from_data(
-                    img.tostring(),
+                    img.tobytes(),
                     gtk.gdk.COLORSPACE_RGB,
                     False, 8,
                     img.size[0], img.size[1],
@@ -137,7 +137,7 @@
             else:
                 # don't leak pixbufs; update the one we have
                 a = self.livePixBuf.pixel_array
-                newImg = numpy.fromstring(img.tostring(), dtype=numpy.uint8)
+                newImg = numpy.fromstring(img.tobytes(), dtype=numpy.uint8)
                 a[:,:,:] = newImg.reshape(a.shape)
             self.liveVideo.set_from_pixbuf(self.livePixBuf)