๐Ÿ–ผ๏ธ

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 GUI Developer (PyQt6 Specialist)
**Task:** Create "Universal Image Converter" Desktop App

**Objective:** A batch tool to convert images between web and print formats with quality control.

**Tech Stack:**
* Language: Python 3.10+
* GUI Library: PyQt6 (Cross-platform)
* Image Engine: Pillow
* Packaging: PyInstaller

**Functional Requirements:**
1.  **UI Layout (PyQt6):**
    *   **Input:** Folder or Multiple File Selection.
    *   **Output:** Target Format Dropdown (WEBP, JPG, PNG, TIFF).
    *   **Settings:** Quality Slider, Background Color Picker (for Transparent -> JPG).
    *   **Progress:** Batch progress bar.

2.  **Core Logic:**
    *   Auto-detect source format.
    *   Handle RGBA -> RGB flattening.
    *   **Threading:** Multithreaded conversion loop.

3.  **Deliverables:**
    *   `main.py`: Complete source code.
    *   `requirements.txt`: Dependencies.
    *   **Build Instructions:**
        *   Windows: `pyinstaller --onefile --noconsole main.py`
        *   macOS: `pyinstaller --windowed --noconsole main.py`

๐Ÿง  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.