Image is cleaned automatically before writing to it