python给图片右上角加上红色的数字,,from PIL imp
python给图片右上角加上红色的数字,,from PIL imp
from PIL import Image,ImageDraw,ImageFontdef addNum(filePath): img = Image.open(filePath) size = img.size fontSize = size[1] / 4 draw = ImageDraw.Draw(img) ttFont = ImageFont.truetype("/Library/Fonts/arial.ttf", fontSize) draw.text((size[0]-fontSize, 0), "3",(256,0,0), font=ttFont) del draw img.save('./result.jpg') img.show()print addNum("image.jpg")
相关内容
- python改变图片尺寸,,from PIL imp
- python programming exercise facemove,pythonfacemove,from graphic
- 一个Python备份脚本,Python备份脚本,编写一个Python脚本
- 自己实现的2048,自己实现2048,# _*_utf-8_*
- 用Python配置JDK环境,Python配置JDK环境,#!usr\bin\en
- python3下载妹子图,你懂的。,python3妹子图,None
- 打印命令行参数,,#打印命令行参数#!/u
- 基于tornado的web linux远程登录,tornado远程登录,import se
- 根据定义实现基本的回文数检测程序,回文数检测程序
- bitwise operator example,bitwiseoperator,>>> def b(n)
评论关闭