Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HTMLCanvasElement.prototype.toBlob = function(type) {
- var dataURL = this.toDataURL(type),
- binary = atob( dataURL.substr( dataURL.indexOf(',') + 1 ) ),
- i = binary.length,
- view = new Uint8Array(i);
- while (i--) {
- view[i] = binary.charCodeAt(i);
- }
- return new Blob([view]);
- };
Advertisement
Add Comment
Please, Sign In to add comment