Implement Perceptually Based Downscaling of Images
There's a downscaling algorithm which is something like a compromise between nearest neighbour and linear (and similar) downscaling algorithms: https://graphics.ethz.ch/~cengizo/Files/Sig15PerceptualDownscaling.pdf
In my opinion it works great, it avoids the smoothness of linear and cubic downscaling and does not have the information loss (jaggedness and moire artifacts) of simple nearest neighbour downscaling.
It even preserves dithering noise (which is not always desired).
I've implemented it there: https://gist.github.com/HybridDog/dd95a99d411972f030fb18543280ad60#file-ssim_perceptual_downscaling-c
Here's a test image (not my photo):
original:
linear:
nearest neighbour:
ssim based:
Could this downscaling method be added to gdk-pixbuf?