Converting the image function