image.size[0] * 3, image.size[1] * 3), (255, 255, 255, 255))
new_img.paste(image, image.size)
# 添加水印...Image.new('RGBA', rgba_image.size, (0, 0, 0, 0))
image_draw = ImageDraw.Draw(text_overlay)
# 水印数量...text}, font:{font}')
image_draw.text((i, j), text, font=font, fill=(0, 0, 0, 50))
# 水印文字角度...image.size[1] * 2))
return image_with_text
if __name__ == '__main__':
pic = '1.png' # 需要加水印的图片...text = "我是水印" # 水印文字
fontsize = 32 # 文字大小
img = Image.open(pic)
fill_img