This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<canvas id="canvas">canvas unsupported</canvas> | |
<script type="text/JavaScript"> | |
var canvas = document.getElementById("canvas"); | |
var ctx = canvas.getContext("2d"); | |
var img = new Image(); | |
img.src = "PICTURE_NAME.jpg"; | |
var width = canvas.width = img.width; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<canvas id="canvas">canvas unsupported</canvas> | |
<script type="text/JavaScript"> | |
var canvas = document.getElementById("canvas"); | |
var ctx = canvas.getContext("2d"); | |
canvas.width = 256; | |
canvas.height = 256; | |
var dst = ctx.createImageData(canvas.width, canvas.height); |