From 11fa9e31c55bc475a51ff59e55fe2fbd3ccb19f8 Mon Sep 17 00:00:00 2001 From: Tobias Date: Fri, 30 Jun 2023 02:02:01 +0200 Subject: [PATCH] Bugfix Image Configurator on first startup --- .../image-configurator/image-configurator.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cinnamon-dynamic-wallpaper@TobiZog/image-configurator/image-configurator.py b/cinnamon-dynamic-wallpaper@TobiZog/image-configurator/image-configurator.py index e125247..e8e84a8 100644 --- a/cinnamon-dynamic-wallpaper@TobiZog/image-configurator/image-configurator.py +++ b/cinnamon-dynamic-wallpaper@TobiZog/image-configurator/image-configurator.py @@ -196,10 +196,13 @@ class ImageConfigurator: imageId (int): The number of the preview (0-8) imageURI (str): URI to the new image """ - pixbuf = GdkPixbuf.Pixbuf.new_from_file(imageURI) - pixbuf = pixbuf.scale_simple(300, 200, GdkPixbuf.InterpType.BILINEAR) + try: + pixbuf = GdkPixbuf.Pixbuf.new_from_file(imageURI) + pixbuf = pixbuf.scale_simple(300, 200, GdkPixbuf.InterpType.BILINEAR) - self.img_previews[imageId].set_from_pixbuf(pixbuf) + self.img_previews[imageId].set_from_pixbuf(pixbuf) + except: + pass def extractHeifImages(self, imageURI: str):