Hi all thanks for any help in advance. I am writing a phonegap app and can not get the photo to shrink without either losing the aspect or cropping the image by mistake. I
You can just draw like this, without the scale
function:
ctx.drawImage(myImage, 0, 0, myImage.width * 0.15, myImage.height * 0.15);
However, the resolution has to be set explicitly, not in terms of percentages. E.g.:
window.onload = function() {
thecanvas.width = window.width;
thecanvas.height = window.height;
}