Align photo watermark caption to the right

This commit is contained in:
Pigway
2026-10-06 21:59:55 +08:00
parent 559ee767e2
commit 557e21ca58
+2 -2
View File
@@ -57,11 +57,11 @@ def render_captioned_photo(
while draw.textlength(text, font=font) > available and len(text) > 2:
text = text.rstrip("…")[:-1] + "…"
draw.text(
(layout.margin, photo_height + layout.footer_height / 2),
(width - layout.margin, photo_height + layout.footer_height / 2),
text,
font=font,
fill="black",
anchor="lm",
anchor="rm",
)
out = BytesIO()
canvas.save(out, "JPEG", quality=93, optimize=True)