Now that we have presented an overview of the image APls, WI! .in put together an interesting applet that will display a sequence of animation cels, .he animation cells are taken from a single image that can arrange the cells in a grid specified via the rows and cols cparam tags. Each cell in the image is snipped out in a way similar to that , used in the Tile Image example earlier, W" obtain the sequence in which to display the cells from the sequence <param> tag, This is a comma-separated list (If cell numbers that is zero-based and proceeds across the grid from left to right I, top to bottom. Once the' applet has parsed the <param> tags and loaded the source image, it cuts the image into a number of small subimages. Then, a thread is started that Causes the images to be displayed according to the order described in sequence. The thread sleeps:
for enough time to maintain the frame rate. Here is the source code
The following applet tag shows the famous locomotion study by Eadweard. Muybridge, which proved that horses do, indeed, get all four hooves off the ground at (Of course, you can substitute another image file in your own apple9
Additional Java 2 Imaging Classes
In addition to the imaging classes described here; Java 2 supplies se -eral others that offer enhanced control Over the imaging process and that support advanced imaging techniques. If sophisticated graphical output is of special interest to you, then you will want to explore the additional classes found in java.awt.image.