Skip to content

Instantly share code, notes, and snippets.

@prateekjoshi565
Created April 19, 2023 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prateekjoshi565/561a1b3a71f15f8a29f5f8765d7ad286 to your computer and use it in GitHub Desktop.
Save prateekjoshi565/561a1b3a71f15f8a29f5f8765d7ad286 to your computer and use it in GitHub Desktop.
# Create a new image to draw the text on
# The size of this image is same as that of the background image
text_image = Image.new("RGBA", background_image.size, (0, 0, 0, 0))
# Set up the text drawing parameters
text_draw = ImageDraw.Draw(text_image)
text_color = (255, 255, 255)
text_position = (120, 600)
text_message = "Hello World"
text_font = ImageFont.truetype("arial.ttf", 144)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment