Skip to content

Draft: HDR tone mappping

Mirco Miranda requested to merge mircomir/kimageformats:hdr_tone_mappping into master

Added a simple tone mapping for HDR formats (HDR, PFM and JXR). QImage allow values between 0 and 1 on float formats but HDR formats can have values higher than 1. Instead clamping the values, good choice is to use a tone mapping algorithm.

I used Reinhard's global mapping which converts values ​​between 0 and +inf to values ​​between 0 and 1.

  • In HDR, PFM and EXR formats tone mapping is used if a pixel value is out of range (-0.05, +1.05).
  • JXR decides based on the presence or absence of the color profile.

Other changes

  • Added image rotation support to HDR plugin.
  • Removed old code from EXR plugin

HDR tone mapping comparison

For e.g., on the left an HDR image without tone mapping, on the right the same image loaded with Reinhard's tone mapping:

image

Edited by Mirco Miranda

Merge request reports

Loading