π« The Pain Point
iPhones save photos in HEIC format to save space, but many websites and apps donβt support it. You have 500 vacation photos that wonβt upload anywhere.
π Agentic Solution
A Batch Converter that transforms HEIC to universal JPG format.
Key Features:
- Batch Processing: Convert entire folders at once.
- Quality Control: Adjustable JPG compression.
- Metadata Preserve: Keeps EXIF data (date, location).
βοΈ Phase 1: Commander (Quick Fix)
For quick conversion.
Prompt:
βI have a folder
iphone_photoswith HEIC files. Write a Python script using pillow-heif and Pillow to:
- Convert: All .heic/.HEIC files to JPG.
- Quality: JPG quality = 90.
- Metadata: Preserve EXIF data if possible.
- Output: Save to
converted/folder.Print progress (e.g., βConverted 1/500: IMG_0001.HEICβ). Handle corrupt files gracefully.β
Result: Universal photos compatible with any platform.
ποΈ Phase 2: Architect (Permanent Tool)
For Photographers.
Engineering Prompt:
**Role:** Python GUI Developer (PyQt6 Specialist)
**Task:** Create "HEIC Converter Pro" Desktop App
**Objective:** A reliable batch tool to convert Apple HEIC photos to universal JPG format effortlessly.
**Tech Stack:**
* Language: Python 3.10+
* GUI Library: PyQt6 (Cross-platform)
* Image Processing: pillow-heif, Pillow
* Packaging: PyInstaller
**Functional Requirements:**
1. **UI Layout (PyQt6):**
* **Folder:** Input Folder Selection.
* **Settings:** Quality Slider (1-100), Toggle for "Delete Original Files".
* **Status:** "Convert" Button and Progress Bar with active file name display.
2. **Core Logic:**
* Register `pillow_heif` opener.
* Iterate and convert, preserving EXIF metadata.
* **Threading:** Critical to keep UI responsive processing 500+ files.
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
- pillow-heif: A Pillow plugin that adds HEIC support. Must be installed separately.
π οΈ Instructions
- Install:
pip install pillow-heif - Copy Prompt β Run.