Method
add_text_watermark
(
self, image, text, text_color, font_style, font_size, position=(0, 0)
)
Source from the content-addressed store, hash-verified
| 8 | pass |
| 9 | |
| 10 | def add_text_watermark( |
| 11 | self, image, text, text_color, font_style, font_size, position=(0, 0) |
| 12 | ): |
| 13 | font = ImageFont.truetype(font_style, font_size) |
| 14 | draw = ImageDraw.Draw(image) |
| 15 | draw.text(position, text, fill=text_color, font=font) |
| 16 | return image |
| 17 | |
| 18 | def add_logo(self, image, logo, position=(0, 0)): |
| 19 | if logo.mode != "RGBA": |
Tested by
no test coverage detected