Resizing a canvas image without blurring it
问题 I have a small image, which I am rendering on a canvas, like this: ctx.drawImage(img, 0, 0, img.width*2, img.height*2); I would like this to show a sharp upsized image (4 identical pixels for each image pixel). However, this code (in Chrome 29 on Mac) makes a blurry image. In Photoshop terms, it looks like it's using "Bicubic" resampling, instead of "Nearest Neighbour". In a situation where it would be useful (eg. a retro game), Is it possible to produce a sharp upsized image, or do I need to