This applet isn't too visually impressive; it just loads an image, right?
Wrong! What it actually does is:
- Load the image
- Convert it to a string of bytes
- Create a new image from the byte string
- Display the image
To do this, it makes use of the PixelGrabber class to convert the image
to a byte array, and the MemoryImageSource class to re-create the image
from the byte array. It also makes use of the handy MediaTracker class,
which allows you to wait until an image has loaded completely before
proceeding.
The Source