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

151
Vistas
how to open a png file (' �PNG ') on the front end?

I managed to create base64 file in backend with function: for (x, y, w, h) on and y: frame=put_glass(glass, img, x, y, w, h) res,glass1 = cv2.imencode(".JPEG",frame) image = Image.fromarray(glass1) buff = BytesIO() picture.save(buff, format="JPEG") new_image_string = base64.b64encode(buff.getvalue()).decode("utf-8") return(new_image_string)

however the base64 string is returning the photo in blue, I think it has to do with cv2.imshow, because when I call this method I use glass1 to display the image and not the frame

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Guess you are looking for something like this:

await api2.post('/glass1/', formData, headers)
  .then((response) => {
    const data = response.data
    return data.blob()
  })
  .then((data) => {
    const reader = new FileReader();
    reader.onload = function() {
      const b64 = reader.result
      document.getElementById("img").src = b64;
    }
    reader.readAsDataURL(data)
  })
about 4 years ago · Juan Pablo Isaza Denunciar
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