mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-05 12:21:59 +02:00
[ui] improve thumbnails quality
This commit is contained in:
parent
c48233141a
commit
9b0be36278
2 changed files with 5 additions and 2 deletions
|
@ -42,7 +42,7 @@ class ThumbnailCache(QObject):
|
||||||
thumbnailDir = ''
|
thumbnailDir = ''
|
||||||
|
|
||||||
# Thumbnail dimensions limit (the actual dimensions of a thumbnail will depend on the aspect ratio)
|
# 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
|
# Time limit for thumbnail storage on disk, expressed in days
|
||||||
storageTimeLimit = 90
|
storageTimeLimit = 90
|
||||||
|
@ -248,7 +248,9 @@ class ThumbnailCache(QObject):
|
||||||
return
|
return
|
||||||
|
|
||||||
# Scale image while preserving aspect ratio
|
# 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
|
# Write thumbnail to disk and check for potential errors
|
||||||
writer = QImageWriter(path)
|
writer = QImageWriter(path)
|
||||||
|
|
|
@ -109,6 +109,7 @@ Item {
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
autoTransform: true
|
autoTransform: true
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
|
sourceSize: Qt.size(100, 100)
|
||||||
}
|
}
|
||||||
BusyIndicator {
|
BusyIndicator {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue