Bug 469294 - Vector wallpapers rendered at lower resolution
Summary: Vector wallpapers rendered at lower resolution
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Image & Slideshow wallpaper plugins (other bugs)
Version First Reported In: 5.27.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-03 03:26 UTC by doncbugs
Modified: 2023-05-26 16:15 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.27.6
Sentry Crash Report:


Attachments
A packaged wallpaper to test the low resolution issue (1.16 KB, application/gzip)
2023-05-03 03:26 UTC, doncbugs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description doncbugs 2023-05-03 03:26:34 UTC
Created attachment 158642 [details]
A packaged wallpaper to test the low resolution issue

SUMMARY
When using an unpackaged .svg image as a wallpaper, things work as expected: a crisp wallpaper regardless of resolution. However, if packaged, for example in an adaptive theme format, it renders at a lower resolution, regardless of what the resolution of the .svg is said to be (lied about). Package format is as done with Next at /usr/share/wallpapers/Next/


STEPS TO REPRODUCE
1. Install a wallpaper theme that uses a vector format (attached)
2. Copy the included .svg outside of the package folder
3. Apply the packaged version
4. apply the unpackaged vector

OBSERVED RESULT
Plain vector is rendered clearly, but the packaged version has a reduced resolution for no clear reason.

EXPECTED RESULT
The packaged vector should be clear regardless of resolution or, at least, be drawn at the described resolution. e.g. 6000x6000.svg should be 6000 by 6000 pixels.

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.15-1-lts (64-bit)

ADDITIONAL INFORMATION
Setting the wallpaper name to 6000x6000.svg to follow the format is questionable. Is there a designated name system for non-raster wallpapers?
Comment 1 Bug Janitor Service 2023-05-06 15:31:33 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2904
Comment 2 Bug Janitor Service 2023-05-25 16:27:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2955
Comment 3 Fushan Wen 2023-05-26 15:53:48 UTC
Git commit a3d0491deebb460db5a033c4a9679e6a5452372e by Fushan Wen.
Committed on 26/05/2023 at 15:53.
Pushed by fusionfuture into branch 'master'.

wallpapers/image: resize svg wallpaper to requested size

QImage is rasterized, which means it needs a defined size. If we need to
resize a svg image, the svg image should be loaded by QSvgRenderer and then
QPainter class is used to draw the image onto a new QImage with the desired size.

Plasma::Svg can help wrap the whole process and provide a cached image
if the wallpaper is loaded again.
FIXED-IN: 5.27.6

M  +12   -4    wallpapers/image/plugin/provider/packageimageprovider.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/a3d0491deebb460db5a033c4a9679e6a5452372e
Comment 4 Fushan Wen 2023-05-26 16:15:44 UTC
Git commit 987238ac7b414a40d0f10d252b8d73cdb1f0f865 by Fushan Wen.
Committed on 26/05/2023 at 16:15.
Pushed by fusionfuture into branch 'Plasma/5.27'.

wallpapers/image: resize svg wallpaper to requested size

QImage is rasterized, which means it needs a defined size. If we need to
resize a svg image, the svg image should be loaded by QSvgRenderer and then
QPainter class is used to draw the image onto a new QImage with the desired size.

Plasma::Svg can help wrap the whole process and provide a cached image
if the wallpaper is loaded again.
FIXED-IN: 5.27.6

(cherry picked from commit a3d0491deebb460db5a033c4a9679e6a5452372e)

M  +12   -4    wallpapers/image/plugin/provider/packageimageprovider.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/987238ac7b414a40d0f10d252b8d73cdb1f0f865