Listing 9. Create a quick prelight image for mouse-over events.

...
sub monkeyiq_gimp_prelight {
  my($inputimagename,$outfilename,
      $brightness, $contrast ) = @_;

  $img = gimp_file_load( $inputimagename,
                         $inputimagename );

  print "prelight $inputimagename";
  print " to $outfilename\n";
  @layers = gimp_image_get_layers( $img );
  foreach $l (@layers)
    {
      gimp_brightness_contrast( $l,
         $brightness, $contrast );
    }
  imageOutput( $img, $outfilename );
}
...
  "*",
  [
   [PF_STRING, "inputimage",
     "Name of image to export", ""],
   [PF_STRING, "outputimage",
     "Name of image to save to", ""],
   [PF_INT,    "brightness",
     "-127 to 127", ""],
   [PF_INT,    "contrast",
     "-127 to 127", ""],
  ],
...

