Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

At 1 module = 1 pixel resolution, it definitely is, although a gzipped SVG gets you closer than you'd expect. The main problem with images is scaling: unless you can force the image to scale "without" interpolation, you'll get a blurry unscannable mess. If you increase the resolution enough to be crisp on a modern high-res display, at some point, SVG becomes more efficient. I did some experiments on this a few years back, but can't find the results right now.

A even if you can force nearest-neighbour interpolation (in CSS this is only possible since 2015 in Chromium and even later in Firefox), the result still won't be perfect at non-integer scales (see [0]). Other use-cases (like PDF files IIRC) don't give you the option to force scaling modes at all, so drawing them with vector paths is the only option to make them crisp.

[0] https://codepen.io/robinrendle/full/EaOJeq/



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: