Bug 482724

Summary: Theme preview images have the wrong aspect ratio on browse page due to being stretched to the image's aspect ratio rather than cropped
Product: [Frameworks and Libraries] frameworks-knewstuff Reporter: David G. <david>
Component: generalAssignee: Dan Leinir Turthra Jensen <admin>
Status: RESOLVED FIXED    
Severity: normal CC: 2f5ed1c5, alexander.lohnau, david, kdelibs-bugs-null, nate, plasma-bugs-null
Priority: NOR Keywords: qt6
Version First Reported In: 6.13.0   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In: On the server
Sentry Crash Report:
Attachments: Image showing incorrect scaling of preview images in Get New dialog
Image showing correctly rendered preview images on the store.kde.org page of a Global Theme

Description David G. 2024-03-07 14:59:43 UTC
Created attachment 166595 [details]
Image showing incorrect scaling of preview images in Get New dialog

SUMMARY
When using a "Get New" function (for widgets, global themes, icon packs, cursors, etc.), the preview images almost never have the correct aspect ratio. Sometimes, they are not only displayed in the wrong aspect ratio, but also cropped. If I open the store.kde.org page for the project, the preview images look fine.


STEPS TO REPRODUCE
1. Open System Settings -> Apperance & Style -> Global Theme -> "Get New..."
2. Look at preview images

OBSERVED RESULT
The images are shown correctly, i.e. as they are on the website (the "homepage" of the theme)

EXPECTED RESULT
The images are often cropped and/or scaled incorrectly.

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.8-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 1 David G. 2024-03-07 15:02:28 UTC
Created attachment 166596 [details]
Image showing correctly rendered preview images on the store.kde.org page of a Global Theme
Comment 2 Alexander Schmidt 2025-05-20 07:28:16 UTC
As part of our updates, we have changed the algorithm for resizing images. Perhaps someone would like to check that this is working correctly.
Comment 3 Nate Graham 2025-05-20 17:51:41 UTC
Much better, thanks!