Untitled
unknown
plain_text
9 months ago
662 B
12
Indexable
from PIL import Image, ImageDraw, ImageFont
# Load the image
image_path = "2408.jpg" # Make sure this file is in the same folder
img = Image.open(image_path)
# Create drawing context
draw = ImageDraw.Draw(img)
# Define area to cover the old date
cover_box = (260, 790, 590, 815)
draw.rectangle(cover_box, fill=(255, 255, 255)) # Cover with white
# Set new date and position
new_date = "Sep 14, 2025 3:19 PM"
text_position = (265, 795)
# Load default font
font = ImageFont.load_default()
# Draw the new date text
draw.text(text_position, new_date, fill=(33, 38, 59), font=font)
# Save or preview the edited image
img.save("updated_image.jpg")
img.show()
Editor is loading...
Leave a Comment