How to change putImageData scale with scale(1.5, 1.5) not working..
var imageData = context.getImageData(0, 0, canvas.width, canvas.height);
context.clearRect(0, 0, canvas.width, canvas.height);
context.scale(1.5, 1.5);
context.putImageData(imageData, 0, 0);
Correct, your code will not scale the existing drawings.
context.scale
only affects new drawings, not existing drawings.context.putImageData
will put the saved original pixels back on the canvas, but putImageData is not a drawing command so its results will not be scaled.To scale existing pixels you have to save the pixels to an entity outside of your canvas. The outside entity could be a new Image element or a second Canvas element.
Example code and a Demo: http://jsfiddle.net/m1erickson/p5nEE/