diff --git a/index.html b/index.html index 730d6653..da08264e 100644 --- a/index.html +++ b/index.html @@ -152,6 +152,7 @@ Second Watermark Color
+
Download
@@ -866,5 +867,12 @@ function toggleVisibility(targetClass, self, selfClass, hiddenClass, shownClass) function loadSetSymbol() { imgSetSymbol.src = "https://raw.githubusercontent.com/ImKyle4815/MTG-Set-Symbols/master/setSymbols/" + document.getElementById("setSymbolCode").value.toUpperCase() + "_" + document.getElementById("setSymbolRarity").value.toUpperCase() + ".png" } + +//Best for last - downloads the image! +function downloadCardImage(el) { + alert("This may not work because the canvas is 'tainted' - if you know how to avoid this please tell me :)") + var cardImageData = canvas.toDataURL("image/jpg") + el.href = cardImageData +}