use save/restore instead of reconstruct + write_to_image