Apparently, it's possible to use
gs to automatically find the bounding box of a PDF. See http://stackoverflow.com/questions/10962235/how-to-find-blank-page-in-pdf-file/11274720#11274720.
What I would like to do is to have a way of including a bunch of images such as the bounding box is scaled to the box in which I want the image to be shown.
Any thoughts on how to do that?