Search code examples
javascripthtmlcanvasscaleblur

How to resize html5 canvas without pixel blur


I am aware you can scale a canvas using css similar as found here. But I have a 24x24 pixel canvas I want to through css make 600 pixels wide. The result of that is:

Photo

Is there a method of doing this that will just display the pixels HUGE instead of blurred?


Solution

  • Tried scale already?

    canvas.scale(xScale, yScale);