diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index 2c0b53a95..1454f877e 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -185,7 +185,7 @@ def resize_image(image_path, width, height, background): new_image = QtGui.QImage(width, height, QtGui.QImage.Format_ARGB32_Premultiplied) painter = QtGui.QPainter(new_image) - painter.fillRect(new_image.rect(), background) + painter.fillRect(new_image.rect(), QtGui.QColor(background)) painter.drawImage((width - realw) / 2, (height - realh) / 2, preview) return new_image diff --git a/openlp/core/lib/imagemanager.py b/openlp/core/lib/imagemanager.py index 4d6c90078..0dcc2246b 100644 --- a/openlp/core/lib/imagemanager.py +++ b/openlp/core/lib/imagemanager.py @@ -215,6 +215,8 @@ class ImageManager(QtCore.QObject): image = self._cache[name] if image.image is None: self._conversion_queue.modify_priority(image, Priority.High) + # make sure we are running and if not give it a kick + self.process_updates() while image.image is None: log.debug(u'get_image - waiting') time.sleep(0.1) @@ -235,6 +237,8 @@ class ImageManager(QtCore.QObject): image = self._cache[name] if image.image_bytes is None: self._conversion_queue.modify_priority(image, Priority.Urgent) + # make sure we are running and if not give it a kick + self.process_updates() while image.image_bytes is None: log.debug(u'get_image_bytes - waiting') time.sleep(0.1)