From f8ddc94a8b14368d5e15ec7f6dcd383d89a5527d Mon Sep 17 00:00:00 2001 From: Jehan Date: Sun, 11 Feb 2024 16:44:05 +0100 Subject: [PATCH] build: fix splash2installer.py with updated API using GeglColor instead of GimpRGB. Fixes: > TypeError: argument background: Expected Gegl.Color, but got gi.repository.Gimp.RGB --- build/windows/installer/splash2installer.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build/windows/installer/splash2installer.py b/build/windows/installer/splash2installer.py index 5534cc7cea..a622987637 100644 --- a/build/windows/installer/splash2installer.py +++ b/build/windows/installer/splash2installer.py @@ -1,3 +1,6 @@ +gi.require_version('Gegl', '0.4') +from gi.repository import Gegl + image = Gimp.list_images()[0] procedure = Gimp.get_pdb().lookup_procedure("file-bmp-save") config = procedure.create_config() @@ -19,8 +22,7 @@ def export_scaled_img(image, target_width, target_height, export_path): img.scale(new_width, new_height) img.resize(target_width, target_height, offx, offy) # XXX: should we rather use the average color as border? - black = Gimp.RGB() - black.set(0, 0, 0) + black = Gegl.Color.new("black") Gimp.context_set_background(black) drawables = img.list_selected_drawables() for d in drawables: