Thanks for the feedback Platonides.
Would requiring Python, GIMP and PyMOL to be installed on the server be workable for a WMF MediaWiki deployment?
Not ideal, but is probably workable. Still much better than relying (and potentially DDOSing) on a third party. If you could drop GIMP requirement, that'd be even better (why is it needed?).
A small script that hooks into GIMP API methods is used to tidy up PNGs output by the PyMOL molecular visualization program. The PyMOL images are originally output with a lot of extraneous whitespace. Specifically, the script takes in a PNG and outputs an autocropped image with 50 pixels of whitespace around the subject -- e.g. http://en.wikipedia.org/wiki/File:Protein_FOXP2_PDB_2a07.png. The script: https://code.google.com/p/pdbbot/source/browse/trunk/crop-and-pad-pdb.scm.
ImageMagick seems like it might also have the ability to programmatically autocrop an image and add a certain padding around the subject. I'll look into that and substitute an ImageMagick script for the GIMP one if possible.
If anyone can think of a better option for that, please let me know.
- Eric