add diff image output functionality

Fixes #213