From c58a5b7345d02ab0667e2b94dc856477de1f268d Mon Sep 17 00:00:00 2001 From: Maniu Date: Sun, 25 May 2025 21:14:16 +0200 Subject: [PATCH] Update python-fu-removebg.py --- python-fu-removebg/python-fu-removebg.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python-fu-removebg/python-fu-removebg.py b/python-fu-removebg/python-fu-removebg.py index b73cd32..a8d9a0b 100644 --- a/python-fu-removebg/python-fu-removebg.py +++ b/python-fu-removebg/python-fu-removebg.py @@ -16,6 +16,8 @@ from gi.repository import GLib from gi.repository import Gio gi.require_version('Gtk', '3.0') from gi.repository import Gtk +from pathlib import Path + import os, sys, string, tempfile, platform import subprocess @@ -131,7 +133,7 @@ class PythonRemoveBG(Gimp.PlugIn): pdb.file_jpeg_save(tmpImage, tmpDrawable, jpgFile, jpgFile, 0.95, 0, 1, 0, "", 0, 1, 0, 0) pdb.gimp_image_delete(tmpImage) - aiExe = "C:\\Program Files (x86)\\Rembg\\rembg.exe" + aiExe = Path("C:/Program Files (x86)/Rembg/rembg.exe") if AlphaMatting: option = "-a -ae %d" % (aeValue)