开发者

How do you set the image attributes using PIL?

开发者 https://www.devze.com 2022-12-30 10:05 出处:网络
I\'m using PIL. I tried using : img.info = {\'Buyer\':\'Text\',\'Copyright\':\'Text2\'} 开发者_开发知识库

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

0

精彩评论

暂无评论...
验证码 换一张
取 消