From 9b0be36278af10f7dd7d7095fecb65c1ea3aa1c6 Mon Sep 17 00:00:00 2001 From: mugulmd Date: Thu, 26 Jan 2023 05:10:35 -0800 Subject: [PATCH] [ui] improve thumbnails quality --- meshroom/ui/components/thumbnail.py | 6 ++++-- meshroom/ui/qml/ImageGallery/ImageDelegate.qml | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/meshroom/ui/components/thumbnail.py b/meshroom/ui/components/thumbnail.py index 6826837c..186dd9b1 100644 --- a/meshroom/ui/components/thumbnail.py +++ b/meshroom/ui/components/thumbnail.py @@ -42,7 +42,7 @@ class ThumbnailCache(QObject): thumbnailDir = '' # Thumbnail dimensions limit (the actual dimensions of a thumbnail will depend on the aspect ratio) - thumbnailSize = QSize(100, 100) + thumbnailSize = QSize(256, 256) # Time limit for thumbnail storage on disk, expressed in days storageTimeLimit = 90 @@ -248,7 +248,9 @@ class ThumbnailCache(QObject): return # Scale image while preserving aspect ratio - thumbnail = img.scaled(ThumbnailCache.thumbnailSize, aspectMode=Qt.KeepAspectRatio) + thumbnail = img.scaled(ThumbnailCache.thumbnailSize, + aspectMode=Qt.KeepAspectRatio, + mode=Qt.SmoothTransformation) # Write thumbnail to disk and check for potential errors writer = QImageWriter(path) diff --git a/meshroom/ui/qml/ImageGallery/ImageDelegate.qml b/meshroom/ui/qml/ImageGallery/ImageDelegate.qml index 7c7a7402..2cd5cc44 100644 --- a/meshroom/ui/qml/ImageGallery/ImageDelegate.qml +++ b/meshroom/ui/qml/ImageGallery/ImageDelegate.qml @@ -109,6 +109,7 @@ Item { asynchronous: true autoTransform: true fillMode: Image.PreserveAspectFit + sourceSize: Qt.size(100, 100) } BusyIndicator { anchors.centerIn: parent