# HG changeset patch # User drewp@bigasterisk.com # Date 2017-06-10 18:31:41 # Node ID 8ea61f1fda9c2788947923ab513fc1182bc91007 # Parent c49e56822a9878154740b7234481de64bc45c0c1 api update Ignore-this: 95b8145965fbee11896248594ae21b2d diff --git a/light9/vidref/remotepivideo.py b/light9/vidref/remotepivideo.py --- a/light9/vidref/remotepivideo.py +++ b/light9/vidref/remotepivideo.py @@ -128,7 +128,7 @@ class Pipeline(object): 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 @@ class Pipeline(object): 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)