开发者

Is it possible to display image using canvas?

I have an image stored in my local system and i want to display it using canvas, is it possible using img src or something? html uses img src 开发者_如何学Goto display images, i wanted to know if it is possible using canvas also?


Hmmm. Did you even try to answer this for yourself? It's well documented. The short answer is yes.


Answer is YES! You can display images using Canvas API.

First of all, what you need to do is to create an image object in JavaScript, then display it using Canvas API - drawImage() function.For details, please read it here: http://www.onlywebpro.com/2011/07/09/html5-canvas-for-absolute-beginners-part-3/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜