Europa kleurplaat

`; } function PrintImage(source) { var Pagelink = "about:blank"; var pwa = window.open(Pagelink, "_new"); pwa.document.open(); pwa.document.write(ImageToPrint(source)); pwa.document.close(); } // DOWNLOAD function imageToDataUri(img, width, height) { // create an off-screen canvas var canvas = document.createElement('canvas'), ctx = canvas.getContext('2d'); // set its dimension to target size canvas.width = width; canvas.height = height; // draw source image into the off-screen canvas: ctx.drawImage(img, 0, 0, width, height); // encode image to data-uri with base64 version of compressed image return canvas.toDataURL(); } function htmlDecode(input) { var doc = new DOMParser().parseFromString(input, "text/html"); return doc.documentElement.textContent; } function downloadRoot(button){ $(".lightbox").show(); const download = $(button).data('src'); const img = new Image; img.crossOrigin = "Anonymous"; img.onload = downloadImageRoot; img.src = download; img.alt = $(button).data('title'); img.width = $(button).data('width'); img.height = $(button).data('height'); } function downloadImageRoot(){ const newDataUrl = imageToDataUri(this, this.width, this.height); const a = document.createElement("a"); document.body.appendChild(a); a.href = newDataUrl; a.download = htmlDecode(this.alt) + `-${this.width}x${this.height}px` + '.png'; a.click(); $(".lightbox").hide(); } checkBookFirstLoad();
email icon Neem contact met ons op