add diff image output functionality