Add support to write difference imgs