This code is just suppose to show the image i import but i can't figure out why it doesn't work. Thank you for the help.
var app = new FotoPrint();
function FotoPrint() {
this.init = function() {
this.im = new Image();
this.im.onload = function () {
this.canvas = document.getElementById('canvas');
this.ctx = this.canvas.getContext("2d");
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
this.ctx.strokeStyle = "black";
this.ctx.lineWidth = 2;
this.ctx.strokeRect(0, 0, this.canvas.width, this.canvas.height);
this.ctx.drawImage(this.im,0,0);
};
this.im.src = "Images/allison1.jpg";
};
};
app.init();