/**
 * 根据传递的图片数据，在画布上画图
 * name:图片名
 */
function drawOnCanvas(imageOne, imageTwo,name) {
    var canvas = document.getElementById("canvasipal");
    var Gc = canvas.getContext("2d");
    var drawImg = new Image();
    drawImg.src = imageOne;
    drawImg.onload = function () {
        draw(this);
    };
    function draw(obj) {
        Gc.drawImage(obj, 0, 0, 2000, 500);
    };

    var drawImg2 = new Image();
    drawImg2.src = imageTwo;
    drawImg2.onload = function () {
        draw2(this);
    };
    function draw2(obj) {
        Gc.drawImage(obj, 0, 500, 2000, 500);
        var type = 'png';
        canvasToImageIpal(name,type);
    };
}