Skip to content

Add IccJson support with cmd line tools, schema and documentation#803

Merged
xsscx merged 3 commits intomasterfrom
issue-788
Apr 10, 2026
Merged

Add IccJson support with cmd line tools, schema and documentation#803
xsscx merged 3 commits intomasterfrom
issue-788

Conversation

@maxderhak
Copy link
Copy Markdown
Contributor

@maxderhak maxderhak commented Apr 9, 2026

Pull Request Checklist

  • Have you followed the guidelines in Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you built your Pull Request locally with the Build Instructions?
  • Have you added or updated relevant tests?
  • Have you added or updated relevant docs?

Copy link
Copy Markdown
Contributor

@ChrisCoxArt ChrisCoxArt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a lot of changes. But it mostly follows the XML code, including fixes, and looks good for a first pass.
This is going to need a LOT of testing.

@xsscx xsscx self-assigned this Apr 9, 2026
@xsscx xsscx added PR Pull Request Review in Process Issue is being Reviewed by Maintainers labels Apr 9, 2026
xsscx

This comment was marked as resolved.

xsscx

This comment was marked as resolved.

@xsscx xsscx removed Review in Process Issue is being Reviewed by Maintainers pending labels Apr 9, 2026
@xsscx xsscx removed the request for review from dwtza April 10, 2026 00:02
@xsscx xsscx added the Test Status Maintainer indicates TEST Status label Apr 10, 2026
@xsscx xsscx self-requested a review April 10, 2026 00:14
xsscx

This comment was marked as resolved.

@xsscx xsscx added the Merge Ready Maintainer indicates Merge Ready label Apr 10, 2026
@xsscx
Copy link
Copy Markdown
Member

xsscx commented Apr 10, 2026

Status

2026-04-10 00:28:51 UTC

  • Updates Pending
  • Tested on bare metal
    • arm64
    • x64
    • macOS
    • Windows
    • WSL-2
    • Ubuntu VM

@xsscx
Copy link
Copy Markdown
Member

xsscx commented Apr 10, 2026

Manual Code Review

2026-04-10 00:34:25 UTC

This is my manual review.

  • JSON Baseline
  • AFL
  • CFL
  • ASAN
  • UBSAN
  • Tool Tests
  • Regression Tests

All the tests and checks in Workflows. PASS (within ~5%)

@xsscx xsscx added Review in Process Issue is being Reviewed by Maintainers Pending Merge Maintainer indicates Merge Pending and Requests No Further Changes and removed failed labels Apr 10, 2026
Build fixes:
- IccTagJson.cpp: Add this-> for dependent base class members (C++ two-phase lookup)
- IccUtilJson.cpp: Remove duplicate unsigned int template instantiation (uint32_t alias)

Runtime fixes:
- IccToJson.cpp: Catch nlohmann exceptions on non-UTF-8 profiles (was SIGABRT on 13/368 profiles)
- IccUtil.cpp: Add v5 rendering intent names to icGetRenderingIntentValue() round-trip
- IccUtilJson.cpp: Bounds check in icJsonGetHexData/Size before accessing szText[1]
- IccUtil.cpp: NULL checks after malloc/calloc in CIccUTF16String constructors

Verified: ASAN+UBSAN stress test on 852 profiles, 0 crashes, 0 sanitizer findings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@xsscx
Copy link
Copy Markdown
Member

xsscx commented Apr 10, 2026

Pre Merge Report

2026-04-10 01:16:35 UTC

PR cleared ci-pr-action
PR cleared ci-risk-analysis
PR cleared ci-regression-checks
PR cleared wasm-latest-matrix
PR cleared ci-build-matrix
PR cleared ci-vcpkg-ports
PR cleared ci-shared-exports
PR cleared Code Review
PR Author is ICC Lead

[2026-04-10 01:26:03 UTC] ~/pr-803/iccDEV/Build (pr-803)$ cmake Cmake/
--
-- ############################################################
-- ## Developer tools for ICC color profiles ##
-- ############################################################
-- ## Configuration and Build started at 2026-04-09 21:26:05 ##
--
-- Compiler selection: User-specified via CMake variables
--
-- === Project Configuration Summary ===
--   Project Name       : RefIccMAX
--   Internal Name (UP) : REFICCMAX
--   Version (Full)     : 2.3.1.7
--   Version (Short)    : 2.3
--   Version (Build)    : 2.3.1.7+a545fc9
--   Git Commit         : a545fc9
--   C++ Standard       : C++17
--   Description        : Developer tools for ICC color profiles.
====================== Profile Summary Count ==========================
Unix: 236
Windows: 243
====================== Exiting Testing/CreateAllProfiles.sh ===================

On Linux/macOS, icUInt32Number is uint32_t (same as unsigned int),
causing duplicate instantiation errors. On Windows/MSVC, icUInt32Number
is unsigned long, so unsigned int needs its own explicit instantiation
to avoid LNK2019 unresolved externals.

Wrap the unsigned int instantiations of jsonToValue and jGetValue with
#ifdef _MSC_VER so they only compile on Windows where they are needed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@xsscx xsscx removed Review in Process Issue is being Reviewed by Maintainers Merge Ready Maintainer indicates Merge Ready labels Apr 10, 2026
@xsscx xsscx removed Test Status Maintainer indicates TEST Status pending labels Apr 10, 2026
@xsscx xsscx merged commit 60bbb8c into master Apr 10, 2026
107 checks passed
@xsscx xsscx removed the Pending Merge Maintainer indicates Merge Pending and Requests No Further Changes label Apr 10, 2026
@xsscx xsscx linked an issue Apr 10, 2026 that may be closed by this pull request
@xsscx
Copy link
Copy Markdown
Member

xsscx commented Apr 10, 2026

TODO

2026-04-10 01:36:03 UTC

  • Tool Tests
  • Regression Checks
  • Workflow Updates
  • JSON Version String
#ifndef ICCLIBJSONVER
#define ICCLIBJSONVER "@ICCLIBJSON_VERSION_STRING@"
#define ICCPROFLIBJSONVER "@ICCPROFLIBJSON_VERSION_STRING@"
#endif

@xsscx

@xsscx
Copy link
Copy Markdown
Member

xsscx commented Apr 10, 2026

Release Summary

2026-04-10 01:43:06 UTC

Tag: latest

Commit: 60bbb8c

Assets uploaded: 5 zip files

iccdev-linux-clang.zip (57M)
iccdev-linux-gcc.zip (57M)
iccdev-macos-clang.zip (57M)
iccdev-wasm-release.zip (7.1M)
iccdev-windows-msvc.zip (66M)

@xsscx
Copy link
Copy Markdown
Member

xsscx commented Apr 10, 2026

Status

2026-04-10 04:29:36 UTC

https://github.com/InternationalColorConsortium/iccDEV/actions/workflows/ci-tool-tests.yml

Test Profile Generation

CreateAllProfiles.sh generated 370 test artifacts

iccDEV Tool Coverage Baseline

Metric Value
Total tests 83
Passed 67
Failed 16
ASAN findings 0
UBSAN findings 0
Pass rate 80%
[OK] No sanitizer findings

JSON Configuration Tests
31 tests covering -cfg mode for iccApplyNamedCmm, iccApplySearch, iccApplyProfiles

JSON CLI Exercise Tests
125 tests across 26 groups covering all JSON CLI options

LUT Visualizations
0 SVG + 0 TIFF via iccDumpProfile LUTS

LUT Text Exports
0 TSV files via iccDumpProfile TXTS

@xsscx xsscx deleted the issue-788 branch April 10, 2026 05:39
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 support for IccToJSON and IccFromJSON

3 participants