use thumbnails instead of full size pics

This commit is contained in:
2025-08-27 10:24:39 +02:00
parent 3908692d79
commit 0aa6e67fd8
25 changed files with 15 additions and 0 deletions

15
thumbnailer.py Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/python3
from PIL import Image
import glob, os
size = 128, 128
work_path = os.getcwd()
for infile in glob.glob(work_path + "/fullsize/*.png"):
file, ext = os.path.splitext(infile)
with Image.open(infile) as im:
im.thumbnail(size)
filename = file.split('/')[-1:][0]
im.save(work_path + "/thumbnails/" + filename + ".jpg", "JPEG")