Pitfalls and workarounds when dealing with RGB HDR Gain Map using ImageIO

I wrote a blog about how to process Apple HDR Gain Map using both ImageIO and Core Image approaches: