Fix: iccV5DspObsToV4Dsp emits rXYZ/gXYZ/bXYZ as XYZType, not s15Fixed16ArrayType (#1362)#1364
Merged
xsscx merged 1 commit intoJun 15, 2026
Conversation
…16ArrayType (InternationalColorConsortium#1362) The red/green/blue matrix-column tags (rXYZ/gXYZ/bXYZ, a.k.a. red/green/blueColorantTag) were created as CIccTagS15Fixed16, serializing with the type signature 'sf32' (s15Fixed16ArrayType). ICC.1 9.2.46 / 9.2.31 / 9.2.4 require these tags to be XYZType ('XYZ ', 10.31) -- an array of one XYZNumber. The numeric data was correct (XYZType and a 3-element s15Fixed16ArrayType share the same 20-byte layout), but the wrong type signature made the profile NonCompliant and unreadable by consumers keying on the spec type, e.g. dynamic_cast<CIccTagXYZ*>(FindTag(icSigRedMatrixColumnTag)) returned nullptr in the PAWG quality metrics. Create CIccTagXYZ (one XYZNumber, X/Y/Z) so the tags carry the correct 'XYZ ' type signature. Verified: regenerated LCDDisplayCat8Obs.icc now reports XYZArrayType for all three tags with the primaries preserved (red X=0.5150 Y=0.2760 Z=-0.0035), and the colorant tag-type NonCompliant warnings are gone. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Cross-reference for the archive: the regression guard for this fix had a detour. The paired test PR #1366 merged but its auto-merge silently dropped all four #1362 test artifacts (script, two |
Closed
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.
Closes #1362.
Problem
iccV5DspObsToV4Dspcreated the red/green/blue matrix-column tags (rXYZ/gXYZ/bXYZ, a.k.a.red/green/blueColorantTag) asCIccTagS15Fixed16, which serializes with the type signature'sf32'(s15Fixed16ArrayType). ICC.1 §9.2.46 / §9.2.31 / §9.2.4 require these tags to be XYZType ('XYZ ', §10.31) — an array of oneXYZNumber.The numeric data was correct (XYZType and a 3-element s15Fixed16ArrayType share the same 20-byte layout), but the wrong type signature made the profile NonCompliant and unreadable by consumers keying on the spec type — e.g.
dynamic_cast<CIccTagXYZ*>(FindTag(icSigRedMatrixColumnTag))returnednullptrin the PAWG quality metrics (IccQualityMetrics.h).Fix
(same for green/blue).
Verification
Regenerated
LCDDisplayCat8Obs.iccfrom the committed inputs:sf32(73663332)XYZ(58595A20)iccDumpProfiletypeInvalid tag type×3A paired regression test (assert the three matrix-column tags serialize as
'XYZ ') will follow per the fix/test split.🤖 Generated with Claude Code