unique_ptr and image read removed