High Dynamic Range Bitmaps
 
 
 

High Dynamic Range bitmaps are implemented using the class BitmapStorageHDR. These allow access to pixel values as floating point values. Conversions between floating point and fixed point representations are handled automatically include clamping and scaling of floating point values.

There are three high dynamic range bitmap formats:

High Dynamic Range bitmaps make use of the classBMM_Color_fl to store color information using floating point values.

BMM_Color_fl uses floats to hold the RGBA color components, rather than 16 bit integers which are used in BMM_Color_64. To convert from BMM_Color_64 to BMM_Color_fl you divide each component by 65535.0 and to go back you multiply each component by 65535.0. High Dynamic Range bitmaps are not restricted to the range 0.0 to 1.0. Some formats allow negative values and all of the formats can go well above 1.0.

There is a problem is when converting from BMM_Color_fl to BMM_Color_64, since the value may exceed 65535. The bitmap will either clamp the values to 0 to 65535, or scale the values by the largest component value so all of the components are in the range 0 to 65535.