I'm trying trying to use the Image.composite() function with the code below:
import Image
im1 = Image.open("GetGif1.png")
im2 = Image.open("GetGif2.png")
im3 = Image.composite('im1','im2',"L")
im.save('output.png')
But I get this error:
Traceback (most recent call last):
File "composite_images.py", line 11, in <module>
im3 = Image.composite('im1','im2',"L")
File "/usr/lib/python2.5/site-packages/PIL/Image.py", line 1960, in composite
image = image2.copy()
AttributeError: 'str' object has no attribute 'copy'
Can someone please explain what is wrong with the snippet?
Thank you