add: thumb dimension is a global

This commit is contained in:
Starnakin 2025-05-06 18:59:45 +02:00
parent 2dd1fcfb0c
commit fe1f7d1485
2 changed files with 3 additions and 2 deletions

View File

@ -1,3 +1,4 @@
CREATE_GENERAL_ALBUM: bool = True
CREATE_GENERAL_ALBUM: bool = True
THUMB_DIMENSION: tuple[int, int] = (200, 200)

View File

@ -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):