这就是我现在正在做的:
from PIL import Image, ImageDraw, ImageFont, ImageFilter
fnt = ImageFont.truetype(font="NotoColorEmoji.ttf", size=109, layout_engine=ImageFont.LAYOUT_RAQM)
im = Image.open('1.png')
im = im.filter(ImageFilter.GaussianBlur(100))
draw = ImageDraw.Draw(im)
draw.text((66, 232), "😀" ,fill="#faa", embedded_color=True, font=fnt)
im.show()
你需要
以下是包含一些可视化开销的代码:
这就是输出:
从两个版本的混合图像来看,旋转表情符号的位置非常完美。有些失真是由于表情符号的非方形大小造成的
相关问题 更多 >
编程相关推荐