summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebulois Quentin <quentin.debulois@gmail.com>2020-10-04 15:04:57 +0200
committerDebulois Quentin <quentin.debulois@gmail.com>2020-10-04 15:04:57 +0200
commit47215153f96ff78f2f9eb1962bc1c6f12ae7fbb2 (patch)
treefa59942488b63fc69ecaaf5698aa5fadcac512c7
parent339240a864bbd1901494447da9efe48aa24eccd2 (diff)
Résolution bug, tuple nécessaire pour supression alpha
-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")