convert data.img instead of creating a new one.