πŸ–ΌοΈ

Format Converter

Convert images between formats (PNG, JPG, WEBP, GIF) with batch processing and quality control.

Image ⭐ Beginner ⏱️ 2 minutes

😫 The Pain Point

You have 200 PNG screenshots but need JPG for email (smaller file size). Or you need WEBP for web performance. Converting one by one in an image editor is tedious.

πŸš€ Agentic Solution

A Universal Format Converter that transforms images between any common formats.

Key Features:

  • Multi-Format: Supports PNG, JPG, WEBP, GIF, BMP, TIFF.
  • Quality Control: Adjustable compression for lossy formats.
  • Alpha Handling: Properly handles transparency when converting to JPG.

βš”οΈ Phase 1: Commander (Quick Fix)

For quick conversion.

Prompt:

β€œI have a folder images with PNG files. Write a Python script using Pillow to:

  1. Convert: All PNG to WEBP format.
  2. Quality: WEBP quality = 85.
  3. Transparency: If PNG has alpha, add white background before JPG conversion.
  4. Output: Save to converted/ folder.

Print progress. Skip corrupt files with warning.”

Result: Optimized images for any use case.

πŸ—οΈ Phase 2: Architect (Permanent Tool)

For Web Developers.

Engineering Prompt:

**Role:** Python Tool Developer
**Task:** Create a "Universal Image Converter".

**Requirements:**
1.  **GUI:**
    *   Select input folder.
    *   Target format dropdown (JPG, PNG, WEBP, GIF).
    *   Quality slider (for lossy formats).
    *   Background color for transparent images.
    *   Progress bar.

2.  **Logic:**
    *   Detect input format automatically.
    *   Handle RGBA to RGB conversion.
    *   Preserve original filenames.

3.  **Deliverables:**
    *   `format_converter.py`
    *   `run.bat`, `run.sh`
    *   `requirements.txt`

🧠 Prompt Decoding

  • Alpha Channel: PNG supports transparency, JPG doesn’t. The script must add a background color when converting.

πŸ› οΈ Instructions

  1. Copy Prompt β†’ Run.
  2. Select target format β†’ Convert.

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.