I\'m displaying an image (from a file) on the browser using html... I have another program that keeps taking a screenshot of my screen and storing it as an image file \"image.jp
I think you don't need to create the Image object every time in timedRefresh()
. Just create one instance and constantly change its src
attribute. In case of your code snippet, img
would have to be global variable.
The main problem, though, is that you will still see flickering (but of different kind) in Opera. See: Image source update in JavaScript with Opera