
Hacking Image Interpolation for Fun and Profit - labwire
https://peterhrynkow.com/performance/2019/01/13/blowing-up-images-to-make-them-small.html?hn=1
======
sp332
Now we need some tooling where you put in a maximum error bound, and it
automatically finds the lowest resolution you can get away with. I wonder if
one of those video-codec-based image formats (WebP, HEIC, AVIF) would already
do something pretty similar if you just set a quality factor?

------
lecarore
It seems obvious in insight but I never used this before. An interesting front
end trick, though adding gradient backgrounds is something I avoid as it's
mostly eye candy

~~~
globuous
It does, thought i’d never imagined the browser did any interpolation at all !

Neat trick, thanks for the share ;)

~~~
sp332
They didn't used to, because it slowed down rendering. Then they started
blurring stuff which worked well most of the time but not e.g. for retro
artists who wanted the pixely look. So eventually they added some CSS
properties to control it. [https://builtvisible.com/image-scaling-in-
css/](https://builtvisible.com/image-scaling-in-css/)
[https://caniuse.com/#search=image%20rendering](https://caniuse.com/#search=image%20rendering)

~~~
globuous
wow, I just learned so much from such a simple concept !! Thanks for the links
;)

------
dusted
Where's the hacking? It's common knowledge that if you stretch a small image,
it blurs. As far as I'm aware, this is commonly used for backgrounds.

