Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDR and monochrome images #203

Open
0xC0000054 opened this issue Nov 20, 2022 · 2 comments
Open

HDR and monochrome images #203

0xC0000054 opened this issue Nov 20, 2022 · 2 comments

Comments

@0xC0000054
Copy link

0xC0000054 commented Nov 20, 2022

Is it valid for a monochrome image to use the HDR transfer curves?

ITU-R BT.2100-2 does not appear to have any references to monochrome images, but the transfer curve should work the same way for both monochrome and RGB data.
SMPTE 428-1-2006 also makes no mention of monochrome images, and I am not sure if its transfer function is implied to require RGB.

I created two grayscale test images in Photoshop that have the PQ or SMPTE 428 transfer curves applied when saving.
The images appear to load fine in Krita, but there are some tone differences in Chrome 107.0.5304.107.

It appears that Krita only applies the PQ and SMPTE 428 transfer curves to RGB images, grayscale images are saved as SDR.

hdr monochrome.zip

@leo-barnes
Copy link
Collaborator

Is it valid for a monochrome image to use the HDR transfer curves?

Yes, that should be valid AFAIK. Monochrome images can be tagged with transfer curves, otherwise you would have no way of knowing if they are in linear or gamma space.
Unless the specs that describe the curves somehow state that they don't work for monochrome images I can't see why HDR curves should not apply.

@0xC0000054
Copy link
Author

Unless the specs that describe the curves somehow state that they don't work for monochrome images I can't see why HDR curves should not apply.

The math for SMPTE 428-1-2006 and ITU-R BT.2100-2 HLG appears to assume RGB data.
But it appears that ITU-R BT.2100-2 PQ may support monochrome:

"FD is the luminance of a displayed linear component {RD, GD, BD} or YD or ID, in cd/m2."

I am currently thinking I will disable HDR saving for monochrome images, this is probably the safest option in case I have misunderstood the various specs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants