Converting Images to Base