HDR Gain Map Analyzer

August 1, 2026 · View on GitHub

Author: Daoyu Li (DaoyuLi@outlook.com)

About

A concise tool that decodes HDR Gain Map images and ISO 21496-1 metadata from dual-layer HDR JPEGs. Supports single-channel and three-channel gain maps. Pure-Python — no ExifTool required.

Only academic use is permitted. For commercial or corporate use, please contact the author first.


Requirements

  • Python 3.8+
  • Python packages:
    • numpy
    • pillow
    • matplotlib

Usage

GUI

python main.py
  1. Click Open HDR Image and select an HDR JPEG — the image is parsed and analyzed automatically.
  2. This tool shows basic anlysis including ISO 21496-1 metadata, gain curve, and histograms.

Headless decode check

python main.py /path/to/hdr_demo.jpg

Prints per-channel metadata gain range and decoded gain range, and PASS/FAIL if they match.


License & Terms

  • Open source for academic research only.
  • Any commercial or corporate use must obtain prior written permission from the author.
  • Redistribution, modification, or incorporation into proprietary products is not allowed without permission.