Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

237
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda