from PIL import Image def main(): # Change the path in Line 6 to the path of the image you want to use as input # for Windows users the path specify the path as "c:\\users\\alark1\\Pictures\\usfca.png" inputImage = Image.open('/Users/alark1/Pictures/usfca.png') imageWidth, imageHeight = inputImage.size copyImage(inputImage, imageWidth, imageHeight) # Creates a copy of an image given the image variable, its width, and height def copyImage(inputImage, imageWidth, imageHeight): copyImageOutput = Image.new('RGB', (imageWidth, imageHeight), 'white') for i in range(imageWidth): for j in range(imageHeight): pixelColors = inputImage.getpixel((i, j)) copyImageOutput.putpixel((i, j), pixelColors) copyImageOutput.save("/Users/alark1/Pictures/copy.png") main()