Listing 6. Export to a GIF image with some handy options. Do we really
need those 8 bits for this image? 

...
sub gif_to_web {
  my($inputimagename, $outfilename,
       $num_cols, $use_dither) = @_;
  my $palette_type = 0;

  $img = Gimp->file_load( $inputimagename,
                          $inputimagename );
  Gimp->convert_indexed( $img, $use_dither,
     $palette_type, $num_cols, 0, 1, "" );

  imageOutput( $img, $outfilename );
}
...
  [
   [PF_STRING, "inputimage",
      "Name of image to export", ""],
   [PF_STRING, "outputimage",
      "Name of image to save to", ""],
   [PF_INT,    "depth",   "depth", "255"],
   [PF_INT,    "dither",  "dither", "1"],
  ],

