add logging infos

This commit is contained in:
2022-01-03 08:53:52 +00:00
parent b38780e163
commit be4df1c117

View File

@@ -33,7 +33,6 @@ def create_thumbs(folder_path):
os.makedirs(thumb_path, exist_ok=True)
for f in os.listdir(file_path):
logger.info(f"Bild {f} wird bearbeitet.")
thumb_file_path = os.path.join(thumb_path, f"thumb_{f}")
if os.path.exists(thumb_file_path):
continue
@@ -43,6 +42,7 @@ def create_thumbs(folder_path):
continue
image_path = os.path.join(file_path, f)
logger.info(f"Bild {f} wird bearbeitet.")
with Image.open(str(image_path), "r") as image:
if image._getexif() is not None:
@@ -60,6 +60,7 @@ def create_thumbs(folder_path):
thumb = ImageOps.fit(image, (256, 256), Image.ANTIALIAS)
thumb.save(thumb_file_path)
logger.info(f"Thumb {thumb} wird gespeichert.")
def get_thumb(folder_path, img):