I am preparing some figures for a scientific publication using Inkscape. These figures are SVGs containing embedded bitmap images that are quite large, but only a small rectangular clipped region of each image is actually displayed. An example image is shown below (the SVG itself is available here):
These images will ultimately be embedded into a PDF document. In order to keep the document file size reasonably small, I'm looking for a way to reduce the overall file size by "throwing out" pixels that fall outside of the clipping rectangles.
I could do this by manually cropping each image in an external editor, then re-importing it into the SVG, repositioning it, scaling it etc. to match the current clip box. This is quite tedious, though. I'd ideally like to be able to convert quickly and easily between a "working copy", where I can edit the clipping rectangles, and an "optimized copy" that only contains the pixels that I actually want to display.
Is there an automated way to do this using Inkscape or some other tool? I'd also be interested in any potential solutions that operate on PDF or EPS files.