transform a image to a string of code