imagemagick

Recipes / Procedures

Compositing / applying a mask

composite -compose Dst_Over base.png mask.png masked.png

Cropping and Stacking Images

for f in inputs-*; do convert "$f" -crop ${width}x${height}+${x_offset}+${y_offset} "cropped/$f"; done
convert -append cropped/* vertically-stacked.ext

Creating Progressive JPEG Images

convert input.jpg -interlace plane output.jpg