SMSH is a little program for compositing images together from the command-line. It supports a set of mathematical and bitwise operations which can be applied pixel-wise between two input images.

There are currently two implementations of SMSH, an older Ruby version (which is quite slow), and a C version (which is reasonably fast, and the recommended one to use).

This program came from my love of the digital double exposure technique, which I used quite heavily in my Doublevision series, and my frustration with GIMP’s inability to blend two images using bitwise operations, such as XOR.

Check out the source code