5 ms·
Hacking Image Interpolation for Fun and Profit
- lecarore 7y agoIt 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 7y agoIt does, thought i’d never imagined the browser did any interpolation at all ! Neat trick, thanks for the share ;)
- sp332 7y agoThey 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 7y agowow, I just learned so much from such a simple concept !! Thanks for the links ;)
- sp332 7y agoNow 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?
- jordache 7y agointroduction to JPEG 101? Really? Who doesn't know these basic facts about the JPEG algorithm?
- aparadja 7y agoThis is not a very helpful comment. And nobody knows anything about JPEG when they are born.
- jordache 7y agoI thought HN is a venue for advanced to highly advanced topics?
- ProjectBarks 7y agoHacker News is a social news website focusing on computer science and entrepreneurship. It is run by Paul Graham's investment fund and startup incubator, Y Combinator. In general, content that can be submitted is defined as "anything that gratifies one's intellectual curiosity" [1] [1] https://en.m.wikipedia.org/wiki/Hacker_News https://en.m.wikipedia.org/wiki/Hacker_News
- filoleg 7y ago99% of the technical articles posted on HN are very accessible if you have just the very basic understanding of CS without diving into any specific areas. I.e., lots of breadth, but little depth that is required for understanding (even if the articles themselves dive into depth). I would count knowing the JPEG spec as a depth, rather than breadth.
- FreeFull 7y agoMost of the pictures in the article aren't even JPEGs, they're PNG
- labwire 7y agoDid you even read the post? It has nothing to do with JPEG.
- dusted 7y agoWhere'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.