Compositor is a simple command-line image compositing program which parses simple XML files to combine images and colors. Uses include slicing and dicing images and adding background colors to transparent images for the web.
Here's an example XML file:
This file takes source.png, saves 100 pixels of the top to top.jpg, and saves 100 pixels of the bottom to bottom.jpg. It adds a white background for any transparent areas. The 'primary' attribute tells Compositor to get the generated file dimensions from this image, if it isn't overridden by a height/width attribute in the element.