A lightweight converter between different formats of images.
Use cargo run to execute the sample code.
For an image, it has below formats.
| format | intro |
|---|---|
dynamic range |
The brightness range of the display signal, determining whether it's in HDR or SDR format. |
signal status |
The state of the signal, which can be optical or electrical, transformed using different EOTFs/OETFs. |
color depth |
The number of bits used by each color channel. |
color space |
Determining how colors are represented and the gamut coverage. |
color format |
Specifying the arrangement of color channels within a pixel. |
This work makes it easy to convert images with arbitrary formats. Currently supported formats are:
| format | supported classes |
|---|---|
dynamic range |
HDR, SDR |
signal status |
Linear, PQ, HLG, Gamma709 |
color depth |
8-bit, 16-bit |
color space |
Rec709, Rec2020 |
color format |
RGB |
- Nonrmalizing the input to
[0, 1] - EOTF transformation
- Color space conversion
- Tone mapping
- OETF transformation
- Quantization to correct range based on color depth
| Original HDR | To SDR | Back To HDR |
|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
- Create more friendly interface, maybe turn the project into a command line tool.
- Extend TMO and iTMO.
- Currently PQ, HLG seens a little bit too bright. Take some time to check it.
- Rec. ITU-R BT.2087-0: for color conversion.
- REPORT ITU-R BT.2446-1: for untrival TMO and untrival iTMO.
- MovieLabs Best Practices for Mapping SDR to HDR10: for trival iTMO.





