aboutsummaryrefslogtreecommitdiff
path: root/src/video_thread.py
diff options
context:
space:
mode:
authortassaron2017-07-13 19:31:00 -0400
committertassaron2017-07-13 19:31:00 -0400
commitd7b678f66d1bb1d5c7ccbbf0c8871b66cc1f8750 (patch)
tree576ec1cfa88042c1a46e27e2fad6852b044681d5 /src/video_thread.py
parent06c27a48bc3f52e15c15445d822e8a6f523ab98f (diff)
staticComponents list is reversed now
Diffstat (limited to 'src/video_thread.py')
-rw-r--r--src/video_thread.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/video_thread.py b/src/video_thread.py
index 9ce9cc8..b0562db 100644
--- a/src/video_thread.py
+++ b/src/video_thread.py
@@ -54,18 +54,18 @@ class Worker(QtCore.QObject):
audioI = self.compositeQueue.get()
bgI = int(audioI / self.sampleSize)
frame = None
-
for compNo, comp in reversed(list(enumerate(self.components))):
- if compNo in self.staticComponents:
- if self.staticComponents[compNo] is None:
+ layerNo = len(self.components) - compNo
+ if layerNo in self.staticComponents:
+ if self.staticComponents[layerNo] is None:
# this layer was merged into a following layer
continue
# static component
if frame is None: # bottom-most layer
- frame = self.staticComponents[compNo]
+ frame = self.staticComponents[layerNo]
else:
frame = Image.alpha_composite(
- frame, self.staticComponents[compNo]
+ frame, self.staticComponents[layerNo]
)
else:
# animated component