Bug 464342

Summary: Album art is rendered at a noticeably lower resolution than originals
Product: [Applications] Elisa Reporter: Alexander Sanderson <alexander.sanderson>
Component: generalAssignee: Matthieu Gallien <matthieu_gallien>
Status: RESOLVED FIXED    
Severity: minor CC: nate
Priority: NOR    
Version: 22.12.1   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 22.12.2
Attachments: Artwork in Party Mode compared to the original image in my music directory. Note that the songs do NOT have any embedded artwork, so Elisa must be pulling from this 1024x1024 image.
A comparison of Elisa's album grid view and Cider's. Notice how Cider's appear significantly sharper.

Description Alexander Sanderson 2023-01-15 21:46:26 UTC
Created attachment 155327 [details]
Artwork in Party Mode compared to the original image in my music directory. Note that the songs do NOT have any embedded artwork, so Elisa must be pulling from this 1024x1024 image.

SUMMARY
***
In Party Mode, album art is rendered at a noticeably lower resolution than the original image which it is pulling from. This is an issue no matter what scale factor Plasma is being run at.

In addition to this, art in the album list view is rendered at an even lower resolution, which is especially noticeable because you can compare it to the smaller image in the top bar, which is sharper. I assume the covers of the album list view is rendered based on the expected resolution of a screen running Plasma at 1x scaling (maybe for the sake of speed?); this issue in particular is almost unnoticeable at 1x scaling (but I have a high DPI screen, so I use 1.5x. I also tested 2x, and it's still a problem).
***


STEPS TO REPRODUCE
1. Have a music library with somewhat high resolution covers.
2. Have Elisa import that library.
3. Observe Elisa's album view, or open Party Mode while an album is playing. 

OBSERVED RESULT
Artworks are noticeably more blurry than they would be in an alternative music app.

EXPECTED RESULT
Artworks should appear sharp, assuming the source image is high resolution.

SOFTWARE/OS VERSIONS
Linux: openSUSE Tumbleweed 20230112, kernel 6.1.4-1-default
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Comment 1 Alexander Sanderson 2023-01-15 21:49:15 UTC
Created attachment 155328 [details]
A comparison of Elisa's album grid view and Cider's. Notice how Cider's appear significantly sharper.
Comment 2 Nate Graham 2023-01-17 20:58:20 UTC
Confirmed.
Comment 3 Nate Graham 2023-01-17 22:24:13 UTC
In GridBrowserDelegate, if I change the ImageWithFallback instance from:

                sourceSize.width: width
                sourceSize.height: height

to:
                sourceSize.width: width * 2
                sourceSize.height: height * 2

It looks correct for me, 2 being my scale factor. Will investigate further.
Comment 4 Nate Graham 2023-01-18 18:10:50 UTC
Git commit 788b7b13db4afe749ec1882a02639488e8b4d833 by Nate Graham.
Committed on 18/01/2023 at 17:27.
Pushed by ngraham into branch 'master'.

Display high DPI album art when using scaling
FIXED-IN: 22.12.2

M  +3    -2    src/qml/BasicPlayListAlbumHeader.qml
M  +2    -2    src/qml/GridBrowserDelegate.qml
M  +4    -4    src/qml/HeaderBar.qml
M  +2    -2    src/qml/ListBrowserDelegate.qml
M  +2    -2    src/qml/MediaTrackMetadataForm.qml
M  +4    -3    src/qml/mobile/MobileMinimizedPlayerControl.qml
M  +2    -2    src/qml/mobile/MobileTrackPlayer.qml

https://invent.kde.org/multimedia/elisa/commit/788b7b13db4afe749ec1882a02639488e8b4d833
Comment 5 Nate Graham 2023-01-18 18:22:28 UTC
Git commit 8e2510a2390ab56aba72545ae4f9f60220a49d1a by Nate Graham.
Committed on 18/01/2023 at 18:20.
Pushed by ngraham into branch 'release/22.12'.

Display high DPI album art when using scaling
FIXED-IN: 22.12.2
(cherry picked from commit 788b7b13db4afe749ec1882a02639488e8b4d833)

M  +3    -2    src/qml/BasicPlayListAlbumHeader.qml
M  +2    -2    src/qml/GridBrowserDelegate.qml
M  +4    -4    src/qml/HeaderBar.qml
M  +2    -2    src/qml/ListBrowserDelegate.qml
M  +2    -2    src/qml/MediaTrackMetadataForm.qml
M  +4    -3    src/qml/mobile/MobileMinimizedPlayerControl.qml
M  +2    -2    src/qml/mobile/MobileTrackPlayer.qml

https://invent.kde.org/multimedia/elisa/commit/8e2510a2390ab56aba72545ae4f9f60220a49d1a