Created attachment 173932 [details] A video recording of the problem SUMMARY Opening a large png image with transparency and turning on either "Solid colour background" or "Checkerboard background" results in the background only filling in the top left part of the image. The rest still has the default dark-gray background. STEPS TO REPRODUCE 1. Go to Gwenview settings, turn on "Solid colour background" 2. Open large PNG image with transparency. Example I used: the 2D example at https://github.com/amv213/ComponentLibrary OBSERVED RESULT Only top left part of image gets the requested background EXPECTED RESULT Solid white background over the whole image SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.1.5 KDE Frameworks Version: 6.5.0 Qt Version: 6.7.2 Kernel Version: 6.10.9-arch1-2 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 9 7940HS w/ Radeon 780M Graphics Memory: 90.2 GiB of RAM Graphics Processor: AMD Radeon 780M ADDITIONAL INFORMATION Zooming in results in the background being bigger than the window (I guess) and the problem is hidden.
Can confirm this issue on git master using the provided sample file and a white background.
Same here with the checkerboard background.
*** Bug 460313 has been marked as a duplicate of this bug. ***
I can confirm this bug. The error is that width and height on lines 58 and 59 here https://invent.kde.org/graphics/gwenview/-/blob/6d6dc993be05d8627086464305d4f00815de9845/lib/documentview/alphabackgrounditem.cpp#L58 accounts `devicePixelRatio()` value, although `painter->drawTiledPixmap()` already draws using `devicePixelRatio()`. Url for testing bug: https://raw.githubusercontent.com/amv213/ComponentLibrary/6446e922464240e3de5fcea8aa30266d0c46114c/imgs/2D_demo.png. One line command to test it from console: ``` gwenview https://raw.githubusercontent.com/amv213/ComponentLibrary/6446e922464240e3de5fcea8aa30266d0c46114c/imgs/2D_demo.png ```
Created attachment 177488 [details] Patch
Created attachment 177489 [details] Gwenview displaying after patch applied Is it displaying OK?
A possibly relevant merge request was started @ https://invent.kde.org/graphics/gwenview/-/merge_requests/313