Heic color management#6
Merged
Merged
Conversation
A grid primary now inherits the ICC and nclx profiles from its first tile independently, treating the all-"unspecified" nclx sentinel (2/2/2, full range) as absent on either side, matching libheif's context.cc grid inheritance and pixelimage.cc:has_nclx_color_profile. A grid whose first tile cannot be resolved keeps the primary item's own colour properties instead of dropping them. Behavioural note: primary_heic_color_properties no longer returns the undefined nclx sentinel from the grid path; the non-grid path is unchanged. Adds NclxColorProfile::is_undefined for the sentinel check.
The cicp tag now describes the decoded full-range RGB output (identity matrix coefficients, full-range flag) instead of copying the stream's YCbCr coding values, and an exotic stream matrix no longer aborts synthesis. Profiles gain the ICC-required desc/wtpt/cprt tags and the canonical D50 PCS illuminant; both text strings keep an even UTF-16 length because moxcms writes tags unpadded and ICC mandates 4-byte tag alignment. The four H.273 transfer codes sharing the BT.709 OETF (1, 6, 14, 15) are aliased to sRGB (13) at synthesis time: still-image pipelines render that OETF as sRGB (Apple ColorSync aliases nclx transfer 1 to sRGB while honouring genuinely different curves), and a literal 709-curve profile measured brighter in lcms-class viewers and darker on Apple than the source image. PQ/HLG/gamma/linear transfers keep their correct curves; decoded pixels are unchanged throughout. Known limitation: moxcms stamps the profile creation time at encode, so synthesized-profile outputs are not byte-reproducible across runs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.