in reply to Generate graphic submit-buttons dynamically for web-sites
You can always write a perl-gimp script to generate the button, and then have your cgi-script call the perl-gimp script. It may not be the fastest way, but it should be fairly easy to do.