ImageChops.duplicate - python
- by ariel
Hi
I am tring to use the function ImageChops.dulpicate from the PIL module and I get an error I don't understand:
this is the code
import PIL
import Image
import ImageChops
import os
PathDemo4a='C:/Documents and Settings/Ariel/My Documents/My Dropbox/lecture/demo4a'
PathDemo4b='C:/Documents and Settings/Ariel/My Documents/My Dropbox/lecture/demo4b'
PathDemo4c='C:/Documents and Settings/Ariel/My Documents/My Dropbox/lecture/demo4c'
PathBlackBoard='C:/Documents and Settings/Ariel/My Documents/My Dropbox/lecture/BlackBoard.bmp'
Slides=os.listdir(PathDemo4a)
for slide in Slides:
#BB=Image.open(PathBlackBoard)
BB=ImageChops.duplicate(PathBlackBoard) #BB=BlackBoard
and this is the error;
Traceback (most recent call last):
File "", line 1, in
ImageChops.duplicate('c:/1.BMP')
File "C:\Python26\lib\site-packages\PIL\ImageChops.py", line 57, in duplicate
return image.copy()
AttributeError: 'str' object has no attribute 'copy'
any help would be much appriciated
Ariel