I’m trying to make a simple pixel drawing utility, this is easy enough to emulate using
rect() calls, but I want to edit the pixel data directly. The problem seems to be that for some reason my calls to
drawingContext.putImageData only blit the image at half the size of the canvas. Is it possible some scaling is involved behind the scenes?
The image and sketch below illustrates the problem. I’m trying to draw yellow pixels where the mouse is held down. It seems to work but the image gets drawn at half the canvas size.