Skip to content

Convert Apple HDR HEIC screenshots to standard EXR format, preserving full HDR information for use on any platform.

License

Notifications You must be signed in to change notification settings

mustakshif/appleheic2exr

Repository files navigation

Apple HEIC to EXR Converter

English | 中文

A Python tool to convert Apple HDR HEIC files to EXR format while preserving HDR information. This tool extracts gain maps from Apple's proprietary HDR format and synthesizes them into standard HDR EXR files.

Background

hdr screenshot sample

macOS Tahoe introduced HDR screenshot support, but the generated HEIC files with HDR information can only be viewed on Apple devices. This tool converts Apple HDR format to standard EXR format for easy sharing and editing in software like Adobe Photoshop, Camera Raw, and Affinity Photo, etc.


Important

To ensure full HDR information is preserved, you must first export your photo from the Mac Photos app as a JPEG, and in the export dialog, set the "Color Profile" to Original. Only this export method will include the Apple HDR gain map in the JPEG file. Directly using HEIC or other export options will not preserve the HDR gain map.(Suggestions for easier methods are welcome!)


Installation

Install dependencies:

pip install -r requirements.txt

Install ExifTool:

  • macOS: brew install exiftool
  • Ubuntu/Debian: sudo apt-get install exiftool
  • Windows: Download from ExifTool website

Usage

Convert Apple HDR JPEG to EXR

python apple_hdr_converter.py input.jpeg

Convert HEIC to EXR (macOS only)

python heic_converter.py input.heic output.exr

Options

  • --output, -o: Specify output EXR file path (default: input_name.exr)
  • --tone-mapping: Apply tone mapping to reduce brightness for SDR displays

Examples

# Basic conversion (outputs photo.exr)
python apple_hdr_converter.py photo.jpg

# Specify custom output path
python apple_hdr_converter.py photo.jpg --output my_hdr.exr

# With tone mapping
python apple_hdr_converter.py photo.jpg --tone-mapping

(All Python code in this repository was generated by Cursor)

About

Convert Apple HDR HEIC screenshots to standard EXR format, preserving full HDR information for use on any platform.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages