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

Implement cLLi chunk described in PNG 3rd Edition (Priority 3) #510

Open
digitaltvguy opened this issue Dec 23, 2023 · 1 comment
Open

Comments

@digitaltvguy
Copy link

cLLi (Content Light Level Information) identifies luminance characteristics in the content itself and provides a method for tone mapping optimization.

@jbowler
Copy link
Contributor

jbowler commented Sep 14, 2024

@ctruta: [libpng18] implementor required.

Part of a W3C draft so can't be done yet but preliminary implementations are possible. The draft definition is here:

https://www.w3.org/TR/png-3/#cLLi-chunk

Provides a hint as to the actual data but not reliable (the actual data is the authority, obviously). Ambiguous definition because it is not clear whether the absolute units are scene or display relative. Has a range of 2E5 to 1E-4 cd/m2 so inadequate for scene absolute information but accommodates the lowest range of human color vision so possibly intended for display relative use.

MaxCLL (Maximum Content Light Level) uses a static metadata value to indicate the maximum light level of any single pixel (in cd/m2, also known as nits) of the entire playback sequence.

Note that the values in the chunk use a novel encoding; rather than dividing by 100000 they divide by 10000! Whatever - neither value has much merit given that the SI uses multiples of 3. Implementation requires new code to scale the value from floating point without overflow. Maybe to in [libpng-ng] because binary16 can't represent the upper limit.

The chunk has artistic application because, hey, artists can lie! We can use the chunk to encode our desired lighting level regardless of the actual definition to achieve artistic effect in both HDR (better than 24-bit) and FDR (full dynamic range) images.

Personally I'd just use sCAL, but that doesn't work for obscure encodings.

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