Progress callback of image load
Posted on 2007-12-01
I'm using java.awt.image.BufferedImage to load images from my local web server. The problem is that loading these images can take a long time and my applet just freezes. Until it's done. I'm loading them like:
Buffered img = ImageIO.read(this.getClass().getResourceAsStream(("myfile.jpg")));
Is there someway to load it in another thread, and get progress notifications, like every %10 or something? This way I can draw a graphic for the user of the image loading instead of just having the browser lockup until it's done.