当前位置:网站首页>在已打开图片上加水印(文字)
在已打开图片上加水印(文字)
2022-08-09 12:11:00 【Newnotes】
在打开图片上加上想要的文字
from PIL import Image,ImageDraw,ImageFont
im = Image.open('1.png')
draw = ImageDraw.Draw(im)
text = "中华人民共和国888888888888"
# 设置字体、字体大小等等
font = ImageFont.truetype('simsun.ttc', 66)
# 添加水印
draw.text((150, 150), text, (255,0,0),font=font) # 在打开图片 上坐标(150,150)处开始画出红色文本
im.show()
# 保存图片
# im.save('watermark2.jpg')
边栏推荐
- 阿里高工带来的20022最新面试总结太香了
- Simple understanding of ThreadLocal
- 基于CAP组件实现补偿事务与幂等性保障
- 基于STM32+铂电阻设计的测温仪
- 随机快排时间复杂度是N平方?
- HAproxy:负载均衡
- WebView injects Js code to realize large image adaptive screen click image preview details
- 报告:想学AI的学生数量已涨200%,老师都不够用了
- 国产抗新冠口服药每瓶不超300元/ 我国IPv6网络全面建成/ 谷歌入局折叠屏手机...今日更多新鲜事在此...
- The grep command Shell regular expressions, the three musketeers
猜你喜欢
Compensation transaction and idempotency guarantee based on CAP components
Information system project managers must memorize the core test sites (63) The main process of project portfolio management & DIPP analysis
一甲子,正青春,CCF创建六十周年庆典在苏州举行
Too much volume... Tencent was asked on the side that the memory was full, what would happen?
ABAP 面试题:如何使用 ABAP 编程语言的 System CALL 接口,直接执行 ABAP 服务器所在操作系统的 shell 命令?
用场景定义硬件,英码科技破解“边缘计算”密码
Batch大小不一定是2的n次幂!ML资深学者最新结论
鹅厂机器狗花式穿越10m梅花桩:前空翻、单桩跳、起身作揖...全程不打一个趔趄...
26. Pipeline parameter substitution command xargs
张朝阳对话俞敏洪:一边是手推物理公式,一边是古诗信手拈来
随机推荐
Win10 compiles the x264 library (there are also generated lib files)
MySQL5.6到8.0的账号迁移
Fragment中嵌套ViewPager数据空白页异常问题分析
注释、关键字、标识符的区别你知道吗?
问题来了:4GB物理内存的机器上申请8G内存能成功吗?
手写大根堆
Too much volume... Tencent was asked on the side that the memory was full, what would happen?
京东架构师呕心整理:jvm与性能调优有哪些核心技术知识点
K个结点的组内逆序调整
两分钟录音就可秒变语言通!火山语音音色复刻技术如何修炼而成?
【Untitled】
GPT-3组合DALL·E,60秒内搞定游戏设定和原型动画!网友看后:这游戏想玩
ABAP 面试题:如何使用 ABAP 编程语言的 System CALL 接口,直接执行 ABAP 服务器所在操作系统的 shell 命令?
Flutter入门进阶之旅(一)-初识Flutter
The core key points of microservice architecture
FFmpeg compiles and installs on win10 (configure libx264)
ABP 6.0.0-rc.1的新特性
h264协议
Flutter入门进阶之旅(十)Dialog&Toast
无重复字符的最长子串