
Public functions:

	Gif = gif_read(file[, frame])

		open existing gif file on disk, read its contents, close

		if file contains multiple images/frames then all will be
		loaded, unless frame(s) is(are) chosen

		Q:  should frame be an array/list of which to choose?

	Gif = gif_new([filename [,image]] )

		create a new GIF object, optionally mapped to file on
		disk, seeded  with given image

	Gif = gif_open(filename)

		open existing gif file on disk, but do not read its content

		use Gif.next() to advance over frames in file
		Gif.close() to finalize

	gif_write(Gif | filename, image)

	gif_close(Gif)

Gif object = struct {
  filename
  fptr,

  frames = {}
  nframes

  next()	advances current frame (if nframes > 1)

  		Q:  should it RETURN next frame, too, or merely advance?

		A:  next() can be used to iterate over # frames, like

			g = gif_read(filename);
			while (g.next())
				do_something

  get_image()
  get()		returns current frame, in RGBA format

  set()
  set_image()

  add_frame([n=position])
  write([filename])
  read([filename])

  open(filename);
  close();

  has_alpha([int frameno])


Converting multiple color-channeled image (RGB) to indexed (i.e., a
single value representing an index into a color lookup table/LUT)

	I = 0.2989 * R + 0.5870 * G + 0.1140 * B
