in reply to A little Gimp script
If you want to work the other way (i.e. have modules choose the image to work on), then you should look at the Image::Magick modules.