Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

180
Visualizações
html2 canvas decrase the image quality while rendering

Hi i've been trying to build a template poster creator with html2canvas. When i try to render my canvas, its quilty decrease unexpectedly.

Here is the real canvas photo:

enter image description here

The rendering result is :

enter image description here

This is my capture function to render canvas:

function capture() {
            document.getElementById('fullpage').style.zoom = 3;
            $('#target').html2canvas({
                onrendered: function (canvas) {
            //Set hidden field's value to image data (base-64 string)
                    $('#img_val').val(canvas.toDataURL('image/png',1.0));
            console.log(canvas.toDataURL("image/png",1.0));
            //Submit the form manually
        document.getElementById("showimage").src = canvas.toDataURL('image/png',1.0);
        document.getElementById("image-holder").style.display = "block";
     //document.getElementById("myForm").submit();
                }
            });
     document.getElementById('fullpage').style.zoom = 1;
        }
     

This is the html code :

 <div class = "col-md-8">
        
           <div id = "image-holder" style = "display:none; position:fixed;
              top: 0;
              left: 0;z-index:1000;
              width:100%;
              height:100%;">
              <p onclick = "closeholder()" id = "closeholder" style="font-color:white;">X</p>
              <img id = "showimage" src = ""/>
           </div>

           <form method="POST" enctype="multipart/form-data" action="save.php" id="myForm">
              <input type="hidden" name="img_val" id="img_val" value="" />
           </form>
           
           <div id="target">
              <div id = "main_bg" style = "z-index: 0;position: absolute;height: 100%;width:100%;"></div>
           </div>
        </div>
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda