From 2c149d9e605387162ef19f1bc004f9bd95651ad2 Mon Sep 17 00:00:00 2001 From: Theodore Frederick Date: Sun, 30 Apr 2017 04:00:31 -0500 Subject: [PATCH] Stretch Images When Ignore Aspect Ratio Setting is True --- openlp/core/common/settings.py | 1 + openlp/core/lib/imagemanager.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/openlp/core/common/settings.py b/openlp/core/common/settings.py index d931b06df..c4e3a978e 100644 --- a/openlp/core/common/settings.py +++ b/openlp/core/common/settings.py @@ -121,6 +121,7 @@ class Settings(QtCore.QSettings): 'advanced/enable exit confirmation': True, 'advanced/expand service item': False, 'advanced/hide mouse': True, + 'advanced/ignore aspect ratio': False, 'advanced/is portable': False, 'advanced/max recent files': 20, 'advanced/print file meta data': False, diff --git a/openlp/core/lib/imagemanager.py b/openlp/core/lib/imagemanager.py index c0b4e58de..4919f6f59 100644 --- a/openlp/core/lib/imagemanager.py +++ b/openlp/core/lib/imagemanager.py @@ -31,7 +31,7 @@ import queue from PyQt5 import QtCore -from openlp.core.common import Registry +from openlp.core.common import Registry Settings from openlp.core.lib import ScreenList, resize_image, image_to_byte log = logging.getLogger(__name__) @@ -306,7 +306,7 @@ class ImageManager(QtCore.QObject): # Let's see if the image was requested with specific dimensions width = self.width if image.width == -1 else image.width height = self.height if image.height == -1 else image.height - image.image = resize_image(image.path, width, height, image.background) + image.image = resize_image(image.path, width, height, image.background, Settings().value('advanced/ignore aspect ratio')) # Set the priority to Lowest and stop here as we need to process more important images first. if image.priority == Priority.Normal: self._conversion_queue.modify_priority(image, Priority.Lowest)