Answers for "signaure pad convert to img"

0

signaure pad convert to img

const dataURL = this.signaturePad.toDataURL('image/png');
const data = atob(dataURL.substring('data:image/png;base64,'.length)),
  asArray = new Uint8Array(data.length);

for (var i = 0, len = data.length; i < len; ++i) {
  asArray[i] = data.charCodeAt(i);
}

const blob = new Blob([asArray], { type: 'image/png' });
Posted by: Guest on January-06-2021

Browse Popular Code Answers by Language