慕粉1827178469
2018-01-14 13:05
var canvasWidth = 700;
var canvasHeight = 400;
var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');
canvas.width = canvasWidth;
canvas.height = canvasHeight;
var image = new Image();
image.src = "girl.jpg";
image.onload = function(e){
initCanvas();
};
function initCanvas(){
draw(image);
};
function draw(image){
context.drawImage(image,0,0);
};
图像分辨率看看是多大、
Canvas玩儿转红包照片
55911 学习 · 67 问题
相似问题