aboutsummaryrefslogtreecommitdiff
path: root/video_thread.py
diff options
context:
space:
mode:
authorDH42017-06-06 04:04:42 -0500
committerDH42017-06-06 04:04:42 -0500
commit6a1deb9b781890f9a62a6f6ce608856c1fc9e720 (patch)
tree0075dedde44009c8c7bc73d1687c826e41464b39 /video_thread.py
parent0d1e7459e1f156eb2ac004ad87636d0bc39fcc6b (diff)
Add checkerboard for transpart frames.
Diffstat (limited to 'video_thread.py')
-rw-r--r--video_thread.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/video_thread.py b/video_thread.py
index ac4162c..e880263 100644
--- a/video_thread.py
+++ b/video_thread.py
@@ -63,10 +63,16 @@ class Worker(QtCore.QObject):
self.bgI += 1
def previewDispatch(self):
+ background = Image.new("RGBA", (1920, 1080),(0,0,0,0))
+ background.paste(Image.open(os.path.join(os.path.dirname(os.path.realpath(__file__)), "background.png")))
+ background = background.resize((self.width, self.height))
+
while not self.stopped:
i = self.previewQueue.get()
if time.time() - self.lastPreview >= 0.06 or i[0] == 0:
- self._image = ImageQt(i[1])
+ image = copy(background)
+ image = Image.alpha_composite(image, i[1])
+ self._image = ImageQt(image)
self.imageCreated.emit(QtGui.QImage(self._image))
self.lastPreview = time.time()