Changeset - 8ea61f1fda9c
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 8 years ago 2017-06-10 18:31:41
drewp@bigasterisk.com
api update
Ignore-this: 95b8145965fbee11896248594ae21b2d
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
light9/vidref/remotepivideo.py
Show inline comments
 
@@ -125,22 +125,22 @@ class Pipeline(object):
 

	
 
    def updateLiveFromTemp(self, jpg):
 
        try:
 
            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],
 
                    img.size[0]*3)
 
                log.info("live images are %r", img.size)
 
            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)
 

	
 
        except Exception:
 
            import traceback
 
            traceback.print_exc()
0 comments (0 inline, 0 general)