diff --git a/tagstudio/src/qt/widgets/thumb_renderer.py b/tagstudio/src/qt/widgets/thumb_renderer.py index f13d0a4f..211f21e0 100644 --- a/tagstudio/src/qt/widgets/thumb_renderer.py +++ b/tagstudio/src/qt/widgets/thumb_renderer.py @@ -10,7 +10,7 @@ import os from pathlib import Path import cv2 -from PIL import Image, ImageChops, UnidentifiedImageError, ImageQt, ImageDraw, ImageFont, ImageEnhance +from PIL import Image, ImageChops, UnidentifiedImageError, ImageQt, ImageDraw, ImageFont, ImageEnhance, ImageOps from PySide6.QtCore import QObject, Signal, QSize from PySide6.QtGui import QPixmap from src.core.ts_core import PLAINTEXT_TYPES, VIDEO_TYPES, IMAGE_TYPES @@ -60,9 +60,6 @@ class ThumbRenderer(QObject): ext_font = ImageFont.truetype(os.path.normpath( f'{Path(__file__).parent.parent.parent.parent}/resources/qt/fonts/Oxanium-Bold.ttf'), math.floor(12*font_pixel_ratio)) - def __init__(self): - QObject.__init__(self) - def render(self, timestamp: float, filepath, base_size: tuple[int, int], pixelRatio: float, isLoading=False): """Renders an entry/element thumbnail for the GUI.""" adj_size: int = 1 @@ -107,6 +104,8 @@ class ThumbRenderer(QObject): if image.mode != 'RGB': image = image.convert(mode='RGB') + image = ImageOps.exif_transpose(image) + # Videos ======================================================= elif extension in VIDEO_TYPES: video = cv2.VideoCapture(filepath)