Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (28 sloc) 786 Bytes
<!doctype html>
<meta charset="utf-8">
<title>Embed Image</title>
<link rel="stylesheet" href="../include/style.css">
#picture {
display: none;
Example from <a href=""><em>Foundation HTML5 Animation with JavaScript</em></a>
<canvas id="canvas" width="400" height="400"></canvas>
<img id="picture" src="./assets/picture.jpg">
window.onload = function () {
var canvas = document.getElementById('canvas'),
context = canvas.getContext('2d'),
image = document.getElementById('picture');
context.drawImage(image, 0, 0);