ImageChops.duplicate - python

Posted by ariel on Stack Overflow See other posts from Stack Overflow or by ariel
Published on 2010-06-05T07:56:37Z Indexed on 2010/06/05 8:02 UTC
Read the original article Hit count: 304

Filed under:
|

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

© Stack Overflow or respective owner

Related posts about python

Related posts about pil