Skip to content

Modify: CI Logging Utils#706

Merged
xsscx merged 1 commit intomasterfrom
fix/iccsignatureutils-v2
Mar 19, 2026
Merged

Modify: CI Logging Utils#706
xsscx merged 1 commit intomasterfrom
fix/iccsignatureutils-v2

Conversation

@xsscx
Copy link
Member

@xsscx xsscx commented Mar 19, 2026

Summary

IccSignatureUtils.h V2 addresses three issues:

  1. Noisy debug output on valid profilesICC_LOG_DEBUG and ICC_LOG_WARNING calls fired unconditionally on every signature validation, producing spurious stderr output (e.g., ICC_WARN: ColorSpace signature: 0x6e630011 (Unknown) on valid 17-channel v5 profiles).

  2. Missing v5/iccMAX dynamic signatures — N-channel (0x6e63xxxx) and MCS (0x6d63xxxx) signatures were not recognized, causing valid v5 profiles to be flagged as "Unknown".

  3. Missing MCH A-FicSigMCHAData through icSigMCHFData (10-15 channel profiles) were absent from both ColorSpaceSignatureToStr() and IsValidColorSpaceSignature().

Changes

Function Change
ColorSpaceSignatureToStr() Add MCH A-F cases + N-channel/MCS fallback returning "NChannel" / "MCS"
IsValidColorSpaceSignature() Add MCH A-F cases + N-channel/MCS dynamic pattern. Gate logging behind #ifdef ICC_SIGNATURE_VERBOSE
IsValidTechnologySignature() Gate logging behind #ifdef ICC_SIGNATURE_VERBOSE
DescribeColorSpaceSignature() Inline validation check instead of calling IsValidColorSpaceSignature() to avoid log side-effects

Backward Compatibility

  • Default behavior changes: All ICC_LOG_DEBUG / ICC_LOG_WARNING output is now silent unless the caller defines ICC_SIGNATURE_VERBOSE before including the header. This eliminates spurious stderr output that interfered with tools, analyzers, and fuzzers.
  • API unchanged: All function signatures and return types are identical to V1.
  • Return values expanded: Functions now return true for valid v5/iccMAX signatures that V1 incorrectly rejected.

Reproduction

# V1 (noisy output on valid v5 profile):
iccDumpProfile 17ChanPart1.icc ALL 2>&1 | grep ICC_WARN
# ICC_WARN: ColorSpace signature: 0x6e630011 (Unknown)

# V2 (silent — correct):
iccDumpProfile 17ChanPart1.icc ALL 2>&1 | grep ICC_WARN
# (no output)

Testing

  • Verified with 17ChanPart1.icc (17-channel, sig 0x6e630011) — zero false warnings
  • Verified MCH A-F profiles resolve correctly
  • Verified all existing V1 test profiles produce identical results (API compatible)

Changes:
- Gate all ICC_LOG_DEBUG/ICC_LOG_WARNING calls behind #ifdef ICC_SIGNATURE_VERBOSE
  so callers (analyzers, fuzzers) get silent validation by default
- Add MCH A-F (icSigMCHAData through icSigMCHFData) for 10-15 channel profiles
- Add v5/iccMAX N-channel (0x6e63xxxx) dynamic signature recognition
- Add v5/iccMAX MCS (0x6d63xxxx) material channel set recognition
- DescribeColorSpaceSignature() uses inline check instead of calling
  IsValidColorSpaceSignature() to avoid triggering log side-effects

Fixes false ICC_WARN output on valid v5 profiles like 17ChanPart1.icc
(sig 0x6e630011 = 17-channel N-channel) which was incorrectly flagged
as 'Unknown' ColorSpace signature.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@xsscx xsscx self-assigned this Mar 19, 2026
@xsscx xsscx requested a review from ChrisCoxArt March 19, 2026 07:13
@xsscx xsscx linked an issue Mar 19, 2026 that may be closed by this pull request
@xsscx xsscx added Merge Ready Maintainer indicates Merge Ready and removed pending labels Mar 19, 2026
@xsscx xsscx added Pending Merge Maintainer indicates Merge Pending and requests no further changes and removed Merge Ready Maintainer indicates Merge Ready labels Mar 19, 2026
@xsscx xsscx changed the title IccSignatureUtils.h V2: gate logging, add v5/iccMAX N-channel + MCS support Modify: CI Logging Utils Mar 19, 2026
@xsscx xsscx merged commit e62525a into master Mar 19, 2026
27 checks passed
@xsscx xsscx added PR Pull Request and removed Pending Merge Maintainer indicates Merge Pending and requests no further changes pending labels Mar 19, 2026
@xsscx xsscx deleted the fix/iccsignatureutils-v2 branch March 23, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR Pull Request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add: v5/iccMAX N-channel + MCS support to IccSignatureUtils.h

2 participants