Tone mapping library