_ _ ___
| | | | / |
| |__ __| | _ __ / /| | _ __ _ __ __ _
| '_ \ / _` || '__|/ /_| || '_ \ | '_ \ / _` |
| | | || (_| || | \___ || |_) || | | || (_| |
|_| |_| \__,_||_| |_/| .__/ |_| |_| \__, |
| | __/ |
|_| |___/
hdr4png
is a Python script that adds an specially-crafted iCCP
chunk to PNG images according to Using the ITU BT.2100 PQ EOTF with the PNG Format WG Note. The latter specification uses the iCCP
chunk to unambiguously signal the color system of an image that uses the Reference PQ EOTF specified in ITU BT.2100-1. It also allows graceful processing by decoders that do not conform to this specification by recommending fallback values for the gAMA
chunk, cHRM
chunk, and embedded ICC profile.
NOTE: hdr4png
does not convert SDR images to HDR images, but merely adds an iCCP
chunk. The input image must contain pixels that already conform to the ITU BT.2100 PQ color system
(required) Python 3.4 or higher
python hdr4png.py -p ITUR_2100_PQ_FULL ITUR_2100_PQ_FULL.icc in.png out.png
where ITUR_2100_PQ_FULL.icc
can be retrieved from Using the ITU BT.2100 PQ EOTF with the PNG Format WG Note, and
is also includes under lib/png-hdr-pq
.
The examples
directory contains PNG files processed by this tool (processed
suffix) as well as the corresponding source file (source
suffix).
src/hdr4png.py Main script
examples Sample PNG files