Bug 392481

Summary: Add nearest neighbor interpolation method for magnifier desktop effect
Product: [Plasma] kwin Reporter: DrSlony <bugs>
Component: effects-variousAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: wishlist CC: bugs
Priority: NOR    
Version First Reported In: 5.12.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Interpolation causes bluriness of fine detail

Description DrSlony 2018-03-29 10:27:51 UTC
Created attachment 111719 [details]
Interpolation causes bluriness of fine detail

Hello

I use the "Magnifier" desktop effect primarily for two things:
1. When taking a screenshot with Spectacle, to perfectly align the rectangular selection.
2. When examining or taking a screenshot of pixel artifacts in imaging software.

In both cases, what I really need to see is an zoom without interpolation, just the view scaled by 400% or so. The magnifier seems to be hardcoded to use linear or cubic interpolation which destroys detail.

Please add an option to the Magnifier to not interpolate/use nearest-neighbor interpolation, so that pixels stay sharp when enlarged.
Comment 1 Christoph Feck 2018-03-29 11:48:13 UTC
I set the Scale method to 'Crisp' in kcmshell5 kwincompositing

But this also affects all other interpolation that is desired elsewhere.
Comment 2 DrSlony 2018-03-29 12:09:30 UTC
Christopher, if you're referring to Display and Monitor > Compositor > Scale method, that does not solve the issue. In fact, I don't notice a difference between "crisp" and "smooth".

This request is specifically about not interpolating the image (or using nearest-neighbor) so that pixels retain their pixel-sharp edges.
Comment 3 Christoph Feck 2018-03-29 12:17:39 UTC
I should have checked the image... I use the Zoom effect, not the Magnifier effect.
Comment 4 Martin Flöser 2018-03-29 14:58:55 UTC
Sorry, but that is out of bounds of the magnifier effect.
Comment 5 DrSlony 2018-03-29 16:07:24 UTC
I'm not familiar with this codebase but I am with a few other programs', and it's usually just a choice of ENUM used in the scaling function. The magnifier code sets the interpolation method, does it not? Then this is a request for nothing more than a choice of the ENUM used, via combobox or checkbox.