diff options
Diffstat (limited to 'public/playground.html')
-rw-r--r-- | public/playground.html | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/public/playground.html b/public/playground.html index 4e9e98c..0fd1b6f 100644 --- a/public/playground.html +++ b/public/playground.html @@ -10,6 +10,7 @@ <canvas id="original" width="32" height="32"></canvas> <canvas id="dyed" width="32" height="32"></canvas> <span id="dyeOut"></span> +<img id="out"/> <script> var dyeString = "R:#ede5b2,fff7bf|G:#cccccc,ffffff"; var dyeData = mp.dye.parseDyeString(dyeString); @@ -21,6 +22,7 @@ mp.resource.loadImage("images/bigcake.png", function(err, imageData) { oContext.putImageData(imageData, 0, 0); mp.dye.dyeImage(imageData.data, dyeData); dContext.putImageData(imageData, 0, 0); + document.getElementById("out").src = document.getElementById("dyed").toDataURL("image/png"); }); </script> </body> |