Reputation: 8319
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 to display images, i wanted to know if it is possible using canvas also?
Upvotes: 0
Views: 229
Reputation: 21
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/
Upvotes: 0
Reputation: 38976
Hmmm. Did you even try to answer this for yourself? It's well documented. The short answer is yes.
Upvotes: 2