<canvas id="mycanvas" width ="320" height="260">
<img src="@model.img.path" id="img" >
i trying use mvc model create "update news" page. news has image , using canvas upload images because users can edit images editor based on canvas process. creating news ok.but when updating news, see image in canvas created . took entity , pass view of "update news"-news includes img path- cant figure out how can use path show image in canvas element.
thanks alredy. sorry english.
var img = new image() img.onload = function () { ctx.drawimage(img, 0, 0, 1600, 900); } img.src = "@model.image.path";
i use simple code. works.
Comments
Post a Comment