From fe1f7d1485ffb427fdbd4c379b3355faa87844a7 Mon Sep 17 00:00:00 2001 From: Starnakin Date: Tue, 6 May 2025 18:59:45 +0200 Subject: [PATCH] add: thumb dimension is a global --- src/config.py | 3 ++- src/picture.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/config.py b/src/config.py index 2f2786b..4903a3e 100644 --- a/src/config.py +++ b/src/config.py @@ -1,3 +1,4 @@ -CREATE_GENERAL_ALBUM: bool = True \ No newline at end of file +CREATE_GENERAL_ALBUM: bool = True +THUMB_DIMENSION: tuple[int, int] = (200, 200) \ No newline at end of file diff --git a/src/picture.py b/src/picture.py index 42ba62b..f3ec3c0 100644 --- a/src/picture.py +++ b/src/picture.py @@ -60,7 +60,7 @@ class Picture(): def gen_thumb(self): im = Image.open(self._large.get_absolute_path()) - im.thumbnail((500,500)) + im.thumbnail(config.THUMB_DIMENSION) im.save(self._thumb.get_absolute_path(), "JPEG") def gen_small(self):