summaryrefslogtreecommitdiff
path: root/public/playground.html
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2013-06-27 22:30:21 -0600
committerJared Adams <jaxad0127@gmail.com>2013-06-27 22:35:38 -0600
commit8303d21f2d44769e0400a34d2e3c32db20e44d9e (patch)
treefd32177c772e38f945dfe3d7a303b58a8aafb104 /public/playground.html
parentbf3c95526b3d28c200745470197d65e2a3de0f21 (diff)
downloadmanaportal-8303d21f2d44769e0400a34d2e3c32db20e44d9e.tar.gz
manaportal-8303d21f2d44769e0400a34d2e3c32db20e44d9e.tar.bz2
manaportal-8303d21f2d44769e0400a34d2e3c32db20e44d9e.tar.xz
manaportal-8303d21f2d44769e0400a34d2e3c32db20e44d9e.zip
Comment image dye code and make it easy to grab test dye from playground.
Diffstat (limited to 'public/playground.html')
-rw-r--r--public/playground.html2
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>