Untitled

mail@pastecode.io avatar
unknown
python
13 days ago
529 B
3
Indexable
Never
from PIL import Image, ImageDraw

# Load the image
image_path = 'your_image_path.jpg'
image = Image.open(image_path)

# Coordinates to remove the timestamp
draw = ImageDraw.Draw(image)
# Define the area where the timestamp is located (adjust these values if needed)
timestamp_area = (0, 0, 400, 50)  # Example coordinates (left, upper, right, lower)
draw.rectangle(timestamp_area, fill="black")  # Draw a black rectangle over the timestamp

# Save the modified image
output_path = 'output_image_path.jpg'
image.save(output_path)
Leave a Comment