Ich verwendete html2canvas Bibliothek. Ich möchte das Bild mit dem html2canvas speichern. I Erfolg, Bild von html2canvas zu speichern !!! BEEINDRUCKEND!!! aber .... IE hat versagt ... Ich möchte den gesamten Browser speichern.Javascript Saves Canvas (PNG) von IE
Ich finde navigator.msSaveBlob ... Ich war glücklich ~ aber das Glück dauerte nicht lange ... base64 Encording Image is String! aber ich möchte pngfile speichern! Hilf mir!!! (. PS Ich möchte ernsthaft eine starke Brust von IE schlagen)
~ dieser Code ~
html2canvas($("body")[0], {
onrendered: function(canvas) {
var img = canvas.toDataURL("image/png");
var img2 = img.split("data:image/png;base64,")[1];
//var blobObject = new Blob([img2],{type:"image/jpeg"});
var blobObject = new Blob([img2]);
window.navigator.msSaveBlob(blobObject, 'test.png'); // The user only has the option of clicking the Save button.
alert('File save request made using msSaveBlob() - note the single "Save" button below.');
}
});
danke !!! Du bist so gut !! Ich beantworte die Frage von Ihrer Antwort ~ danke Ihnen danke –
Gibt es ein Beispiel, um html2canvas zu konvertieren? – Hana90