HDR Gain Map #2645
-
Hey, I have a JPG with Gainmap that I can upscale. However, I will lose my gain map after the operation, so my image will be SDR instead of HDR. Is there a way to select something differently? In chaiNNer or it is the issue of the model? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Probably chainner. My guess is that we currently read the JPEG while ignoring the gain map (means that we lose the HDR version when we read the image). So chainner only reads the SDR and passes that to the model. You can check whether this is what's happening by connecting the Load Image node to a View Image node. View image will give a little preview, but what's important is that this preview is always SDR. So if we read the JPEG as SDR, you'll see your SDR image. If we read it as HDR, you'll see a very dark version of your image. Explanation of Gain mapsFor those that don't know what a gain map is (like me from 30mins ago): A gain map is additional metadata that tells an image viewer (e.g. the browser) how to convert SDR to HDR. The idea is that the gain map definies how much we have to brighten/darken the color of a pixel to go from SDR to HRD. Specifically, the gain map stores the value What makes gain maps so useful is that they can be ignored. If you view an image with a gain map using an image viewer that doesn't support HDR/gain maps, you'll get the SDR version of the image. If your image viewer does support HDR, you'll get the HDR image. This little trick allows you to distribute HDR content in a world where HDR isn't supported everywhere. Quick explainer: https://gregbenzphotography.com/hdr-images/jpg-hdr-gain-maps-in-adobe-camera-raw/ So given my current understanding of gain maps, we would likely have to explicitly add support for them. If they behave nicely, then maybe we could get away with just copying the gain map from the original image. I'm not entirely sure. |
Beta Was this translation helpful? Give feedback.
Probably chainner. My guess is that we currently read the JPEG while ignoring the gain map (means that we lose the HDR version when we read the image). So chainner only reads the SDR and passes that to the model.
You can check whether this is what's happening by connecting the Load Image node to a View Image node. View image will give a little preview, but what's important is that this preview is always SDR. So if we read the JPEG as SDR, you'll see your SDR image. If we read it as HDR, you'll see a very dark version of your image.
Explanation of Gain maps
For those that don't know what a gain map is (like me from 30mins ago): A gain map is additional metadata that tells an image viewer …