The image is captured from a DIV using HTML2CANVAS, but the image quality is very poor and it pixalets. The captured image resolution is 96 dpi, how to increase the resolution ?
Is there any way to get a good quality image with high resolution, please help me out.
My Code :
<div style="border-style: solid; height: 15cm; width: 15cm; border-radius:25px;
position: relative; top: 1px;" id="DIV1">
var element = $("#DIV1");
html2canvas(element, {
useCORS: true,
onrendered: function (canvas) {
var dataURL = canvas.toDataURL("image/png");
window.open(dataURL);
}
});
I am placing the image above the DIV1 using FileUploader which is a high resolution image, but when html2canvas captures the image, the image pixalets and resolution will be 96dpi. How to increase the resolution to 300 dpi ?