diff --git a/index.html b/index.html
index 01c5927..1cbb4ba 100644
--- a/index.html
+++ b/index.html
@@ -440,6 +440,7 @@
+
@@ -1227,6 +1228,28 @@
navigator.clipboard.writeText(__output);
}
+ function downloadFile() {
+ raw = [];
+ images.each((image) => {
+ data = imageToString(image)
+ .split(',')
+ .map(s => s.trim())
+ .filter(Boolean)
+ .map((byte) => parseInt(byte, 16));
+ raw = raw.concat(data);
+ });
+ data = new Uint8Array(raw);
+ a = document.createElement("a");
+ a.style = "display: none";
+ document.body.appendChild(a);
+ blob = new Blob([data], {type: "octet/stream"});
+ url = window.URL.createObjectURL(blob);
+ a.href = url;
+ a.download = getIdentifier() + ".bin";
+ a.click();
+ window.URL.revokeObjectURL(url);
+ }
+
// Use the horizontally oriented list to draw the image
function listToImageHorizontal(list, canvas){