summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Redim/config.py3
-rw-r--r--Redim/core.py2
2 files changed, 3 insertions, 2 deletions
diff --git a/Redim/config.py b/Redim/config.py
index 2cbdafd..d618bd1 100644
--- a/Redim/config.py
+++ b/Redim/config.py
@@ -26,9 +26,10 @@ class Config():
"webp"
)
}
+ self.user_profile = getenv("USERPROFILE")
if platform != "linux":
self.json_path = join(
- getenv("USERPROFILE"),
+ self.user_profile,
"AppData",
"Local",
"Redim"
diff --git a/Redim/core.py b/Redim/core.py
index d180305..3b5a742 100644
--- a/Redim/core.py
+++ b/Redim/core.py
@@ -52,7 +52,7 @@ class Redim():
"""Suppression de l'alpha (transparent) des photos"""
img = img.convert("RGBA")
if img.mode in ("RGBA", "LA"):
- fond = image_new(img.mode[:-1], img.size, background)
+ fond = image_new(img.mode[:-1], img.size, tuple(background))
fond.paste(img, img.split()[-1])
img = fond
img.convert("RGB")