Based on gm, GraphicsMagick for node.js, batch process your images.