generate the reference image into the given picture