basic_img to img, img to pimg