aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--background.pngbin3711 -> 45367 bytes
-rw-r--r--preview_thread.py8
-rw-r--r--video_thread.py8
3 files changed, 14 insertions, 2 deletions
diff --git a/background.png b/background.png
index 7a33158..fb58593 100644
--- a/background.png
+++ b/background.png
Binary files differ
diff --git a/preview_thread.py b/preview_thread.py
index 5116707..04683ae 100644
--- a/preview_thread.py
+++ b/preview_thread.py
@@ -6,6 +6,8 @@ import core
import time
from queue import Queue, Empty
import numpy
+import os
+from copy import copy
class Worker(QtCore.QObject):
@@ -19,6 +21,9 @@ class Worker(QtCore.QObject):
self.queue = queue
self.core.settings = parent.settings
self.stackedWidget = parent.window.stackedWidget
+ self.background = Image.new("RGBA", (1920, 1080),(0,0,0,0))
+ self.background.paste(Image.open(os.path.join(os.path.dirname(os.path.realpath(__file__)),"background.png")))
+
@pyqtSlot(str, list)
@@ -41,7 +46,8 @@ class Worker(QtCore.QObject):
width = int(self.core.settings.value('outputWidth'))
height = int(self.core.settings.value('outputHeight'))
- frame = Image.new("RGBA", (width, height),(0,0,0,0))
+ frame = copy(self.background)
+ frame = frame.resize((width,height))
components = nextPreviewInformation["components"]
for component in reversed(components):
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()