Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

146
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!