1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-03-19 17:23:33 +01:00

wrlib: change default scaling interpolation to Catmull-Rom

This patch is implementing a new default Catmull-Rom filter
to resize images.
Catmull-Rom is a special case of cubic interpolation with B=0 and
C=0.5 (in the Mitchell-Netravali formulation).
It provides slighlty sharper results than Mitchell with the same
performance.
Catmull-Rom is a better choice for a window manager as it prioritizes
sharpness, making small elements feel crisp.
This commit is contained in:
David Maciejak
2026-01-25 14:17:52 -05:00
committed by Carlos R. Mafra
parent 77db6dc649
commit 474b23344a
3 changed files with 27 additions and 5 deletions

View File

@@ -554,7 +554,7 @@ RContext *RCreateContext(Display * dpy, int screen_number, const RContextAttribu
if (!(context->attribs->flags & RC_ScalingFilter)) {
context->attribs->flags |= RC_ScalingFilter;
context->attribs->scaling_filter = RMitchellFilter;
context->attribs->scaling_filter = RCatmullRomFilter;
}
/* get configuration from environment variables */