This script is used to create a stamp style border around a picture.
I've just updated the script to have it working with Gimp version 2.4+
In addition to Lylejk's suggestion, you should probably disable UNDO in the new image until you are finished (not critical). Also, it would be better if your script did not destroy the clipboard buffer (either use the "-named-" versions of edit and paste, or use 'gimp-layer-new-from-drawable').
And to be really nit-picky, you might consider matching the image type of your new image to that of the original (use 'gimp-image-base-type' to find out the required value).
Thanks for the comment, but unfortunately, I didn't wrote this script (it was first written by Claes G Lindblad, then updated by Eddy Verlinden, and then me), I found it on the net, and tried it on GIMP 2.6 where it doesn't worked.
I then debugged it to have it working, but I'm not a scpecialist of the script-fu, so the enhancement requested might take some time :-(
I'll have a look however when I'll have time.
Just tried it and the result looks nice. I will suggest that you return the forground/background selection colors back to the previous state afterwards or you might not make for a happy camper when folk use it. :)
No questions yet ...