Summary: | Strange artifacting / dithering on zoom with some pngs | ||
---|---|---|---|
Product: | [Applications] gwenview | Reporter: | nathan |
Component: | general | Assignee: | Gwenview Bugs <gwenview-bugs-null> |
Status: | ASSIGNED --- | ||
Severity: | normal | CC: | 1nikolas, jmsharvey771, karl, kde.h8bcay, kde, niccolo.venerandi, nyanpasu64, starfr_fornr, wolftune |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Manjaro | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Sample.png
100x 200x 141x 400x Gwenview-artifacts not Okular A solid red image, created with convert -size 500x1000 "xc:rgb(224,0,0)" 224.png Red screenshot Full colour image (no problems when zooming) Indexed image (noise pattern when zooming) |
Created attachment 152394 [details]
100x
Created attachment 152395 [details]
200x
Created attachment 152396 [details]
141x
Created attachment 152397 [details]
400x
Can reproduce Created attachment 152784 [details]
Gwenview-artifacts not Okular
Same pngquant-processed png file, Okular is fine, Gwenview has artifacts
I found this shows up with png files that were processed with pngquant. The original file looks fine in gwenview. The processed file still looks fine in Firefox and in Okular, but it is glitchy in gwenview when zoomed in or out. Adding an attachment of the exact same pngquant-processed file zoomed in Okular and Gwenview, unprocessed PNG screenshot showing only Gwenview with the artifacts. Created attachment 158487 [details]
A solid red image, created with convert -size 500x1000 "xc:rgb(224,0,0)" 224.png
This solid red image (created with the ImageMagick command convert -size 500x1000 "xc:rgb(224,0,0)" 224.png) appears totally broken when zoomed in.
Created attachment 158488 [details]
Red screenshot
Screenshot of the above image being viewed at 200%. This is on Arch, with Gwenview 23.04.0-1
It also happens with indexed PNG images *not* processed by pngquant. I’ll attach two images. The first is a full-colour PNG image (23,808 colours) image. The second is the same image, but as an indexed PNG image where the number of colours have been reduced to 120 using Gimp, but *without* any dithering applied (so it’s not a dithering problem). The first image look fine when zoomed, but the other has this strange noisy pattern on most zoom levels (not at *exactly* 100% or levels above 400%, but at all other zoom levels, AFAICS). Created attachment 159945 [details]
Full colour image (no problems when zooming)
Created attachment 159946 [details]
Indexed image (noise pattern when zooming)
I did a quick Git bisect. The bug was introduced in this commit: commit 33d6203c7b4de83a8a1ea92dfc7036af87eb43f2 Author: Daniel Novomesky <dnovomesky@gmail.com> Date: Mon Sep 6 19:56:30 2021 +0200 Convert image to original format to enable correct color correction QImage::scaled() may unexpectedly change image’s format to Premultiplied, we need to ensure that image remains in original format supported by color correction engine. *** Bug 471194 has been marked as a duplicate of this bug. *** *** Bug 491696 has been marked as a duplicate of this bug. *** A possibly relevant merge request was started @ https://invent.kde.org/graphics/gwenview/-/merge_requests/293 |
Created attachment 152393 [details] Sample.png SUMMARY When zooming on certain PNG images, a strange artifacting or dithering appears at certain zoom levels. In the case of Sample.png (attached), 100% and 400% are unaffected, but all zoom levels in-between show this bug. STEPS TO REPRODUCE * Open Sample.png * Zoom OBSERVED RESULT Strange image rendering SOFTWARE/OS VERSIONS KDE Plasma Version: 5.25.5 KDE Frameworks Version: 5.97.0 Qt Version: 5.15.5