The GNU Image Manipulation Tool is a free, powerful, bewildering image editing suite. It is in many ways similar to Adobe Photoshop. The GIMP homepage has a great many tutorials.
GIMP can be driven from the command line using the -b (batch mode) option, together with Scheme scripts. The GIMP webpage has a tutorial. The Procedure Browser (Xtns menu in the Toolbox) provides a detailed list of all identifiers. Scripts are loaded from a script directory specified in Edit->Preferences->Folders->Scripts.
The Round Corners filter can round the corners of rectangular images. Rounding more complicated shapes can be accomplished using shrinks. It's wise to then feather your selection (right click, Select, Feather) for a softer boundary; note that script-fu-round-corners doesn't appear to do this.
Open multiple images as layers within one image, and apply the Combining->Filmstrip filter.
The CSS WebSprite plugin can handle css sprite generation from opening several images as layers.