attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment

Use first 2 pic and add caption to my pics

Running Command

ls -la /home/daytona/workspace/ && mkdir -p /home/daytona/workspace/captioned-photos

Running Command

cd /home/daytona/workspace/captioned-photos && curl -s -o img1982.jpeg "https://d361swluvexzqs.cloudfront.net/chats-attachments/IMG_1982-1781680504717-e46hyg.jpeg" && curl -s -o img1980.jpeg "https://d361swluvexzqs.cloudfront.net/chats-attachments/IMG_1980-1781680504728-t29s45.jpeg" && echo "Downloaded both"

Running Command

python3 << 'EOF' from PIL import Image, ImageDraw, ImageFont import os def add_caption(input_path, output_path, caption_text): img = Image.open(input_path).convert("RGB") w, h = img.size # Caption bar height: 10% of image height, minimum 80px bar_h = max(80, int(h * 0.10)) # Create new image with caption bar at bottom new_img = Image.new("RGB", (w, h + bar_h), (0, 0, 0)) new_img.paste(img, (0, 0)) draw = ImageDraw.Draw(new_img) # Try to use a nice font, fall back to default font_size = max(36, int(bar_h * 0.45)) try: font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf", font_size) except: try: font = ImageFont.truetype("/usr/share/fonts/truetype/liberation/LiberationSans-Bold.ttf", font_size) except: font = ImageFont.load_default() # Center the text in the caption bar bbox = draw.textbbox((0, 0), caption_text, font=font) text_w = bbox[2] - bbox[0] text_h = bbox[3] - bbox[1] x = (w - text_w) // 2 y = h + (bar_h - text_h) // 2 - bbox[1] # Draw text in warm white/cream color draw.text((x, y), caption_text, font=font, fill=(255, 245, 220)) new_img.save(output_path, quality=95) print(f"Saved: {output_path} ({w}x{h+bar_h})") # IMG_1982 - Palace with domed architecture by the lake (Taj Lake Palace area) add_caption( "/home/daytona/workspace/captioned-photos/img1982.jpeg", "/home/daytona/workspace/captioned-photos/IMG_1982_captioned.jpg", "Where palaces bloom by the water's edge — Udaipur" ) # IMG_1980 - City view through ornate arched brackets add_caption( "/home/daytona/workspace/captioned-photos/img1980.jpeg", "/home/daytona/workspace/captioned-photos/IMG_1980_captioned.jpg", "A city framed in stone — Lake Pichola, Udaipur" ) print("Done!") EOF

Both images are ready! Here are your captioned photos:
Photo 1 - Taj Lake Palace area (IMG_1982) Caption: "Where palaces bloom by the water's edge — Udaipur"

IMG 1982 captioned

Image · JPG


Photo 2 - City view through arched brackets (IMG_1980) Caption: "A city framed in stone — Lake Pichola, Udaipur"

IMG 1980 captioned

Image · JPG


Each caption is in a black bar at the bottom in a warm cream color. If you'd like different captions (shorter, different style, Hindi text, overlaid on the image instead of below, etc.) just let me know!
This is a shared conversation. Sign in to Orris to start your own chat.