We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello, I am trying to recreate the translucent, blurred menus on MacOS. To optimize the blur, I resize the image to be blurred, blur it, and scale it up again after the blur. The problem is, that the downsizing of the image seems to be using neighbour interpolation, which results in a visible flickering of the blur when things move. I need something like bilinear interpolation.
Here you can see, that the angled edges are not anti-aliased: Screen Shot 2018-03-10 at 15.24.41
Is there a way to change the interpolation of the image resizing, or just some other way to get around it?
Answers
@BjarkePedersen --
Not about interpolation, but you might be interested in this previous conversation:
Thanks for the answer! I fixed the problem!
I tried playing with the different glsl blur shaders, but concluded that it's not possible to only apply the shader to a single PImage. So I ditched the shaders.
I fixed the image resizing interpolation though. The problem was that I was resizing images by displaying them inside a PGraphic at the low resolution. Example:
What I needed to do was simply use the resize() function, which yielded nicely interpolated downscaling. Example:
img.resize(low_width, low_height)
Here you can see the result:
And here's the final blurred result:
Code for anyone interested:
Thxs for sharing.
Kf