Untitled
from PIL import Image, ImageDraw, ImageFont # Create a blank journal mockup page (A4 size, 2480x3508 pixels at 300 dpi) width, height = 2480, 3508 image = Image.new("RGB", (width, height), "white") draw = ImageDraw.Draw(image) # Fonts for the journal mockup (substitute with basic fonts available) title_font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf", 120) subtitle_font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf", 80) body_font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", 60) # Title Section draw.text((100, 100), "Reflection Journal", fill="black", font=title_font) # Prompt Section draw.text((100, 300), "Prompt: How do wolves influence their ecosystem?", fill="black", font=subtitle_font) draw.text((100, 450), "Write your response below:", fill="black", font=body_font) # Lined Section for Writing line_y_start = 600 line_spacing = 100 for i in range(10): draw.line([(100, line_y_start + i * line_spacing), (width - 100, line_y_start + i * line_spacing)], fill="gray", width=2) # Drawing Section draw.text((100, 1700), "Draw the food web you learned about today:", fill="black", font=subtitle_font) draw.rectangle([(100, 1850), (width - 100, 2600)], outline="black", width=5) # Footer Section draw.text((100, 2800), "Reflection Activity: Imagine you are a wolf in Yellowstone. Write a diary entry describing your day.", fill="black", font=body_font) # Save the mockup as an image journal_mockup_path = "/mnt/data/yellowstone_reflection_journal_mockup.png" image.save(journal_mockup_path) journal_mockup_path
Leave a Comment