๐Ÿ–ผ๏ธ

Batch Resize Images

Resize massive amounts of images to a specific dimension or percentage while maintaining aspect ratio.

Image โญ Beginner โฑ๏ธ 3 minutes

๐Ÿ˜ซ The Pain Point

You have 500 photos from a DSLR camera (20MB each, 6000px resolution). You need to upload them to a website that only accepts photos under 2000px. Opening Photoshop -> Image Sizeโ€ฆ 500 times is impossible.

๐Ÿš€ Agentic Solution

A Batch Resizer: โ€œMake everything 1920px wideโ€ in one click.

Key Features:

  • Aspect Ratio Lock: Resizes width to 1920px and automatically calculates height to prevent squashed images.
  • Format Conversion: Can simultaneously convert PNG to JPG to save space.

โš”๏ธ Phase 1: Commander (Quick Fix)

For a quick resize job.

Prompt:

โ€œResize all images in the current folder to a maximum width of 1920px. Keep the aspect ratio. Save them to a new folder named โ€˜Resizedโ€™ to avoid checking original files.โ€

Result: A folder of web-ready images.

๐Ÿ—๏ธ Phase 2: Architect (Permanent Tool)

For Photographers/Web Admins.

Engineering Prompt:

**Role:** Python Tool Developer
**Task:** Create a "Universal Image Resizer".
**Requirements:**
1.  **GUI:**
    *   Select Source Folder.
    *   Input: Max Width (e.g., 1920) OR Max Height.
    *   Quality Slider (1-100).
    *   "Process" button.
2.  **Logic:**
    *   Use `Pillow` (PIL).
    *   `img.thumbnail((width, height))` is the safest method to maintain aspect ratio.
    *   Show a progress bar.
3.  **Deliverables:** `batch_resize.py`, `run.bat` (Windows), `run.sh` (Mac).

๐Ÿง  Prompt Decoding

  • Thumbnail Method: The thumbnail() function in Pillow is smarter than resize(). It automatically calculates the correct dimensions to fit within your box without distorting the image.

๐Ÿ› ๏ธ Instructions

  1. Copy Prompt -> Paste -> Run.
  2. Input 1920 -> Process.

Related Workflows

Explore other categories

๐Ÿ“ฌ

Get Started with Agentic Working

Subscribe to receive updates from AgenticWorking.io

๐Ÿ“– Free eBook Guide ๐Ÿ“ฆ 7 Ready-to-use Scripts ๐Ÿ”” Weekly Tips

No spam, unsubscribe anytime. Join 1,000+ subscribers.