HTML Canvas Image Load Embedded
<!doctype html> <html> <head> <meta charset="utf-8"> <title>Embed Image</title> <style> #picture {//from w ww .j a va 2 s. c o m display: none; } </style> </head> <body> <canvas id="canvas" width="400" height="400"></canvas> <img id="picture" src="image1.png"> <script> window.onload = function () { var canvas = document.getElementById('canvas'), context = canvas.getContext('2d'), image = document.getElementById('picture'); context.drawImage(image, 0, 0); }; </script> </body> </html>