
* Ensure that gif_write() is always a faithful inverse of gif_read(), i.e.

	im1 = gif_read(file1)
	gif_write(file2, im1)
	im2 = gif_read(file2)
	length(where(im1 != im2)) == 0

  At present when file1 contains multiple palette entries for a
  given color C, and one of them is transparent, then ALL of the
  instances of C in the output image will be made transparent.

  Although some consider having multiple palette entries for a given
  color, with one transparent and others not, to be dubious practice,
  the GIF spec does not seem to prohibit it.

  EXAMPLE
  -------

  broke.gif shows that GIF allows a color to be both transparent AND not,
  by using 2 palette entries:

      im1 = gif_read("broke.gif")
      print(im1)

      255 255 255 0 				% here white is transparent
      0 0 0 255 
      0 0 0 255 
      221 221 221 255 

      0 0 0 255 
      255 255 255 255				% but in these next 3 pixels
      255 255 255 255				% white is opaque
      255 255 255 255

   This reveals that gif_write() is not a perfect inverse of gif_read():

      gif_write("copy.gif", im1)
      im2 = gif_read("copy.gif")
      print(im2)

      255 255 255 0 				% here white is transparent
      0 0 0 255 
      0 0 0 255 
      221 221 221 255 

      0 0 0 255
      255 255 255 0 				% uh, oh, here too!
      255 255 255 0
      255 255 255 0

   The rgba_to_indexed() function thus needs to check if there are multiple
   opacity values for a given color, and create a palette entry for each one.

   Incidentally, another way to create achieve the same effect as above,
   but sans writing a file to disk, is

   	gfi = Gif_ImageFromRGBABuf(im1)
   	im2 = Gif_ImageToRGBA(gfi, NULL)
