Skip to content

wallpapers/image: resize svg wallpaper to requested size

Fushan Wen requested to merge work/fuf/469294-p6 into master

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.

BUG: 469294 FIXED-IN: 5.27.6

Merge request reports