English |
Русский
Automatically overlay perfectly fitted text on image.
from caption_forge import generate_caption_image
from PIL import Image
# Load image
image = Image.open("image.jpg")
# Generate text with default settings
result = generate_caption_image(
pil_image=image,
text="Example Text",
font_path="example-font.ttf"
)
result.save("output.jpg")pip install git+https://github.com/KvaytG/caption-forge.gitLicensed under the PolyForm Noncommercial license.
This project uses open-source components. For license details see pyproject.toml and dependencies' official websites.