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

238
Visualizações
SimpleImage.js cloning uploaded image to second canvas

I've been trying to clone the #preview canvas to #upload1 using various methods. I've removed the code I've tested that didn't work but I'm looking for help on a solution that is simple and perhaps re-uses SimpleImage.js' function.

Somethings I've tried:

  • $("canvas")[0].toDataURL() // to try to set the data to a new image
  • creating a copy of the script and re-using the input with different variable names (I think the fileinput.onchange = upload affects this as it throws an error within the console. Any help would be appreciated!

--

    let imgcanvas = document.getElementById("preview");
    let imgcanvasBooking = document.getElementById("upload1");
    let fileinput = document.getElementById("Top-View");
    //let copy = $("canvas")[0].getContext('2d')
    
    fileinput.onchange = upload;
    
    function upload(e) {
      image = new SimpleImage(fileinput);
      image.drawTo(imgcanvas);
    }
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