0
JQuery的调整后的图像画布大小调整只图像没有上述功能的调整大小图像的画布JQuery的调整后的图像画布大小调整只图像不是一个帆布
function resizeImage(width, height){
var image = document.getElementById('resizeImage'),
canvas = document.createElement('canvas'),
ctx = canvas.getContext('2d');
ctx.drawImage(image,cropLeft, cropTop, cropWidth, cropHeight,10,10,width,height);
return canvas;
};
但表现回报帆布额外帆布一部分;
我怎样才能获得固定高度的宽度调整大小图像使用简单的jQuery的HTML?
未捕获的ReferenceError:cropHeight没有定义 –
@jayeshchaudhary你需要通过高度和宽度疗法 – Manoj