This is sample source code which shows how to use the imdisplay
program as an interface to write to an mplay flip-book.

Passing the -p option to imdisplay will force imdisplay to read the
image data from stdin.  imdisplay will then read a header described
by:
    struct {
	int	magic_number;		// See source code
	int	xres, yres;
	int	data_type;
	int	color_channels;
	int	reserved[3];
    };

from stdin.  Following this, it will read tile data in the expected
format.  Each tile consists of a tile header described by:
    struct {
	int	x0, x1;
	int	y0, y1;
    };
followed by the pixel data for the tile.

Please see comments in the source code for further information.

Note:  Byte swapping order is not an issue as the endian-ness of the
    magic number will determine if byte swapping needs to be done on
    the data being transmitted.
