Answers:
您可以使用python获取EXIF信息:
from PIL import Image
from PIL.ExifTags import TAGS
from pprint import pprint
def getexif(im):
res = {}
try:
img = Image.open(im)
info = img._getexif()
for tag, val in info.items():
dec = TAGS.get(tag, tag)
res[dec] = val
except IOError:
print im
return res
pprint res
然后使用python ImageDraw模块绘制文本或其他内容。
import ImageFont, ImageDraw
def drawtext(im):
op = ImageDraw.Draw(im)
fnt = ImageFont.truetype("tahoma.ttf", 12)
op.text((5, 5), "YourText", font=fnt)