JSFiddle - React, Tailwind, and code Playground

by Darby Rathbone

HTML

<script src="http://crazyprofile.com/myspace_graphics/imgs/gothic_girls026.jpg"></script>
<canvas id="puz"></canvas>

JavaScript

var puzzle = document.getElementById("puz");
var ctx = puzzle.getContext("2d");
var imagegoth = new Image();
imagegoth.onload = imageloaded;
imagegoth.src = "http://crazyprofile.com/myspace_graphics/imgs/gothic_girls026.jpg";
function imageloaded()
{
    puzzle.width = imagegoth.width;
    puzzle.height = imagegoth.height;
    puzzle.drawImage(imagegoth,0,0);
    var test = ctx.getImageData(0,0,this.width,this.height);
    for (var i = 0; i<1000.length;i++)
    {
        test.data[i] = test.data[i+100];   
    }
    return true;    
}