How to stretch images with no antialiasing

前端 未结 5 826
有刺的猬
有刺的猬 2020-11-27 05:09

So I ran across this recently: http://www.nicalis.com/

And I was curious: Is there a way to do this sort of thing with smaller images? I mean, it\'s pixel art, and r

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-27 05:31

    I've gotten this to work for canvas

    var canvas = document.getElementById("canvas"),
        context = canvas.getContext('2d');
    context.webkitImageSmoothingEnabled = context.imageSmoothingEnabled = context.mozImageSmoothingEnabled = context.oImageSmoothingEnabled = false;
    

提交回复
热议问题