Skip to content

Repository files navigation

heic2jpg

PyPI Version OS Ruff ty CI codecov

heic2jpg is a fast HEIC to JPEG converter designed to resolve the compatibility gap between iPhone image files and common desktop workflows. Conversion runs in parallel across worker threads using pillow-heif for fast, in-process decoding. And it all happens locally in your machine.

🚀 Installation

  1. Install the uv package manager with the official installer, or:
  • macOS: brew install uv
  • Windows: winget install astral-sh.uv
  • Linux (Debian): apt-get install uv
  1. Install the tool:
uv tool install heic2jpg
  1. Test the installation (if the command is not recognised try uv tool update-shell and restart your terminal):
heic2jpg --version

Alternative (macOS only)

Install with Homebrew: brew install lucuma13/dit/heic2jpg

📖 Usage examples

Convert a single file:

heic2jpg path/to/photo.HEIC

Convert all files in directory:

heic2jpg path/to/photo/album
heic2jpg                        # current directory

Convert all files in current directory recursively, preserving metadata and timestamps:

heic2jpg -Rmt

Other options:

  -q, --quality [1-100] Target quality (default: 30)
  -m, --metadata        Preserve EXIF metadata
  -t, --times           Preserve source file timestamps
  -k, --keep            Keep originals (default: delete after conversion)
  -R, --recursive       Recurse into subdirectories when a directory is given
  -f, --force           Overwrite existing .jpg outputs

📊 Performance

pillow-heif releases the Python GIL during HEIF decode, and Pillow releases it during JPEG encode when writing to a file. The default ThreadPoolExecutor therefore gets full CPU parallelism with no per-worker process startup cost. That offers over 6x the speed of traditional ImageMagick workflows.

Version Backend 100 files
heic2jpg 2.0.0 pillow-heif ~2.5s
heic2jpg 1.1.0 ImageMagick ~15.5s

Note: absolute throughput will vary with CPU and disk speed.