How do you set the image attributes using PIL?
I'm using PIL. I tried using :
img.info = {'Buyer':'Text','Copyright':'Text2'}
开发者_开发知识库
This is not working. Is there an alternate way to do it?
I think you are looking for EXIF support which PIL is notoriously lacking.
Other people have made their own modules to support it: here is one that claims to write EXIF data properly which I found in a recent survey article of the topic of EXIF and Python.
pyexiv2 library @ http://tilloy.net/dev/pyexiv2
精彩评论