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/
精彩评论