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

201
Views
Wait till file is fully loaded in browser

At first I want to mention that I'm asking about JS in browser, not Node.js.

I read file (image) from file input (<input type="file" />) and I need to draw it on canvas and do some low level operations on it. There's no problem and everything works fine if image is already in memory when I run an operation but if I'm reading it like I wrote before (from user's fs via input) I don't know when to run the operation. If I start it immediately then framebuffer is incomplete*.

Due to other parts of system I don't read image bit by bit. Instead I create img tag with src attribute set to URL created via URL.createObjectURL with the file object passed to it and then draw that image on canvas. I'd prefer not to change that because this is gonna be pretty big change.

*It's an error from library glfx.js if it gonna help.

about 4 years ago · Juan Pablo Isaza
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!