Skip to content

Instantly share code, notes, and snippets.

@jasonrahm
Created November 20, 2023 15:45
Show Gist options
  • Save jasonrahm/a3d192623db2fd1d091152bc3fd818c3 to your computer and use it in GitHub Desktop.
Save jasonrahm/a3d192623db2fd1d091152bc3fd818c3 to your computer and use it in GitHub Desktop.
from PIL import Image, ImageDraw, ImageFont
font = ImageFont.truetype('/Users/jrahm/Library/Fonts/PreCursive-RailsDashed.otf', 120)
text = "I like Dory helping Nemo."
image = Image.new("RGB", (1920, 1080), (255, 255, 255))
draw = ImageDraw.Draw(image)
draw.text(xy=(100, 100), text=text, font=font, fill=(0, 0, 0))
image.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment