以下是部分代码预览:
"""本函数调用pillow的draw功能在图像指定的位置上写字符串,这是核心代码,需要定制功能请自行修改程序""" from PIL import Image,ImageFont, ImageDraw def print_string_on_image(inimagefile,string,outfile): """在图像的底部居中位置印上字符串""" infile = "跳台背景.jpg" string = "本书授权给尊敬的张三丰阅读" outfile = "跳台背景2.jpg" print_string_on_image(infile,string,outfile)
如需要查看完整代码,请
需要浏览更多吗?
成为会员后,登陆才能继续浏览!联系微信scratch8即可办理会员。
(会员专属:能浏览所有文章,下载所有带链接的Python资源。)