3 ms·
agree on 3) most browsers just use linear interpolation when resizing images, which makes sense from a performance point of view, but looks terrible. Better to
by malux85 9y ago
agree on 3) most browsers just use linear interpolation when resizing images, which makes sense from a performance point of view, but looks terrible.
Better to use a bi-linear or cubic resize, more computing up front, but better images, this is probably the reason they do it
- amelius 9y agoBut soon you can do any type of resizing through WASM on the browser.
- XCSme 9y agoYou can already do it, just use a library or implement your own scaling function and don't use the built-in image resize functions.
- trumpeta 9y agoThis is my understanding as well, you could kill a browser trying to do single-threaded bilinear or cubic resize on a sufficiently large image.
- searealist 9y agobi-linear is linear interpolation
- nice_byte 9y agoI think they may have meant "nearest-neighbor", which isn't true for any browsers that I know of. Regardless, there are still better filters than bilinear, i.e. Lanczos, which I'm pretty sure none of the browsers use.
- Poefke 9y agoIf you resize the image in steps, with each resize at least 50% of the previous step, you can do a pretty decent approximation of cubic resize using the canvas. Doing this for a year now, we've gotten no complaints and we have designers as clients :)