.PFM to LDR RGB (0-255,0-1.0)

Started by
1 comment, last by ccel 5 years, 4 months ago

Hi everyone!

 

I need to transform a 32bit PFM (HDR) file, reading pixel by pixel, into a usual LDR format and later write into PPM and BMP files. Can someone please give me an   equation to solve this or a sinppet. is it enough to tonemap?

Advertisement

You probably need to consider Exposure & Tonemapping.

i.e. what if the HDR image has values all greater than 10000?
Also since this is a lossy operation, the choice of tonemapper will have impact on the LDR/SDR result.

Geometric mean computed using the sum of log luminances is a common way of finding an exposure.

Then applying a common tone-map operator like Reinhard, Hable's Filmic curve, or even one of the new standard ACES ODT transforms can be done. They all have different results.

I would reference MJP's post :) on the topic.

https://mynameismjp.wordpress.com/2010/04/30/a-closer-look-at-tone-mapping/

This topic is closed to new replies.

Advertisement