I have got a canvas and I display image using it via the putImageData()
method after updating bytes in clamped array got by getImageData.data
.
That works nicely, but I need to scale *2 in Y-direction.
Of course I can do it without a question here too by repeating every lines twice, but it requires too much time to render a frame then (I display 25 frames per second). I've read about the ability to scale image with drawImage()
method. The only problem that as far as I know, using drawImage()
is slower than using putImageData()
, and it was required in old browser versions like Firefox/2 (or such).
How can I upscale the image in Y direction twice as fast as possible?
By the way, is it possible to get similar solution to gain full screen resolution somehow (a flash - not JS - example: like what youtube does when you go to fullscreen)?