add logging infos
This commit is contained in:
@@ -33,7 +33,6 @@ def create_thumbs(folder_path):
|
|||||||
os.makedirs(thumb_path, exist_ok=True)
|
os.makedirs(thumb_path, exist_ok=True)
|
||||||
|
|
||||||
for f in os.listdir(file_path):
|
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}")
|
thumb_file_path = os.path.join(thumb_path, f"thumb_{f}")
|
||||||
if os.path.exists(thumb_file_path):
|
if os.path.exists(thumb_file_path):
|
||||||
continue
|
continue
|
||||||
@@ -43,6 +42,7 @@ def create_thumbs(folder_path):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
image_path = os.path.join(file_path, f)
|
image_path = os.path.join(file_path, f)
|
||||||
|
logger.info(f"Bild {f} wird bearbeitet.")
|
||||||
|
|
||||||
with Image.open(str(image_path), "r") as image:
|
with Image.open(str(image_path), "r") as image:
|
||||||
if image._getexif() is not None:
|
if image._getexif() is not None:
|
||||||
@@ -60,6 +60,7 @@ def create_thumbs(folder_path):
|
|||||||
|
|
||||||
thumb = ImageOps.fit(image, (256, 256), Image.ANTIALIAS)
|
thumb = ImageOps.fit(image, (256, 256), Image.ANTIALIAS)
|
||||||
thumb.save(thumb_file_path)
|
thumb.save(thumb_file_path)
|
||||||
|
logger.info(f"Thumb {thumb} wird gespeichert.")
|
||||||
|
|
||||||
|
|
||||||
def get_thumb(folder_path, img):
|
def get_thumb(folder_path, img):
|
||||||
|
|||||||
Reference in New Issue
Block a user