Bug 392481 - Add nearest neighbor interpolation method for magnifier desktop effect
Summary: Add nearest neighbor interpolation method for magnifier desktop effect
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (show other bugs)
Version: 5.12.3
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-29 10:27 UTC by DrSlony
Modified: 2018-03-29 16:07 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Interpolation causes bluriness of fine detail (115.15 KB, image/jpeg)
2018-03-29 10:27 UTC, DrSlony
Details

Note You need to log in before you can comment on or make changes to this bug.
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.