docs / iccDEV / specifications / html

iccMAX `sRgbEncoding.icc` As An Annotated Binary Specimen

This page is a small-format companion to the larger ICC overlay docs. It uses the 160-byte test-profiles/sRgbEncoding.icc sample as a corkami-style specimen: exact xxd bytes on the left, structure and conformance notes on the right, and a reminder that cenc is an ICC.2 / iccMAX class with different rules from a typical ICC.1 display or output profile.

160 bytes 1 tag entry Required `rfnm` present Generic ICC.1-style checks still warn Style inspiration: corkami-style format posters

Poster View

Hex Dump And Layout

Exact `xxd -g 1 -c 16` Dump

00000000: 00 00 00 a0 00 00 00 00 05 00 00 00 63 65 6e 63  ............cenc
00000010: 52 47 42 20 00 00 00 00 00 00 00 00 00 00 00 00  RGB ............
00000020: 00 00 00 00 61 63 73 70 00 00 00 00 00 00 00 00  ....acsp........
00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000080: 00 00 00 01 72 66 6e 6d 00 00 00 90 00 00 00 0d  ....rfnm........
00000090: 75 74 66 38 00 00 00 00 73 52 47 42 00 00 00 00  utf8....sRGB....

The first 128 bytes are the fixed header. The next 16 bytes are the tag table for a single tag. The final 13 bytes hold a `utf8Type` payload spelling `sRGB`, followed by alignment padding.

Binary Layout Summary

  • 0x00-0x03 Profile size = 0x000000A0 = 160 bytes.
  • 0x08-0x0B Version = 0x05000000, so this is an ICC v5 / iccMAX profile.
  • 0x0C-0x0F Device class = cenc, the ICC.2 Color Encoding Space class.
  • 0x10-0x13 Data color space = RGB .
  • 0x14-0x7F The rest of the `cenc` header is intentionally zero-filled.
  • 0x24-0x27 Magic = acsp, so the root object is ICC, not TIFF or PNG.
  • 0x80-0x83 Tag count = 1.
  • 0x84-0x8F Tag entry: signature rfnm, offset 0x90, size 0x0D.
  • 0x90-0x93 Tag type = utf8.
  • 0x98-0x9B UTF-8 text value = sRGB.
  • 0x9C-0x9F Zero padding after the 13-byte payload.

This file is intentionally tiny. It is useful for teaching byte layout, but it is not a display profile with LUTs, white-point tags, or transform chains.

Conformance Ledger

What Passes, What Needs Context

Slice Meaning Status Spec / Evidence Why It Matters
0x00-0x03 Declared profile size matches the actual 160-byte file. Pass Fixed ICC header size field. Safe parsers can trust later offsets only after the file-size claim matches reality.
0x08-0x0B Version bytes encode 5.0.0. Pass ICC.2-2023 version 5 header model; see IccProfile.cpp and the v5 notes in the repo. The class and tag rules should be read as ICC.2 / iccMAX, not as an ICC.1 v4 profile.
0x0C-0x0F Class cenc is the Color Encoding Space profile class. Pass ICC-Binary-Format-Reference.md lists cenc as an ICC.2 class. This is why a single `referenceNameTag` can be enough for the specimen.
0x14-0x7F Most of the remaining header bytes are zero. Pass CIccProfile header validation requires zero-filled header fields for cenc. For this class, zero PCS, zero date, zero illuminant, and zero profile ID are intentional, not accidental truncation.
0x24-0x27 Magic bytes are acsp. Pass Standard ICC root-object signature. This is the earliest safe distinction between an ICC file and a mislabeled carrier format.
0x80-0x8F Tag table declares one tag and places its payload at 0x90. Pass Header plus tag-table contiguity rules shared by ICC binary layout. The tag table is tiny, contiguous, aligned, and ends exactly where the payload begins.
rfnm The only required tag for this sample is present. Pass CIccProfile::CheckRequiredTags() special-cases cenc and requires referenceNameTag. This is the key class-specific rule that makes the specimen compact but still structurally meaningful.
0x90-0x9C Payload type = utf8, value = sRGB. Pass icProfileHeader.h defines rfnm; IccTagFactory.cpp defines utf8Type. The tag stays fully in-bounds and the text value is obvious in the dump.
Analyzer status ReadValidate() reports OK, while deeper mixed ICC.1 / ICC.2 checks still emit warnings. Needs context Local full_analysis() output says "Validation Status: OK - Profile conforms to ICC specification". The specimen is useful precisely because it shows how a minimal iccMAX class can be structurally valid while generic ICC.1-style PAWG checks still warn about date, PCS, and white-point expectations.

Analysis Notes

Why This Tiny Profile Is Useful

Byte Anatomy First

  • The specimen is small enough to fit on one screen without folding the dump.
  • The tag table and the payload both sit in plain view, so the offset math is easy to verify manually.
  • The `utf8` payload makes it obvious that the tag data is being read from the correct offset.

Class-Specific Rules Matter

  • `cenc` is an ICC.2 class, not a v4 display profile.
  • For `cenc`, the library accepts a mostly zero header and requires `rfnm` instead of the usual `desc` plus `cprt` plus `wtpt` set.
  • This makes the specimen a good reminder that conformance must be evaluated in the right class and version context.

Parser Guidance

  • Validate the file size and `acsp` magic before any tag traversal.
  • Check that tag offsets land after the tag table and that `offset + size` stays within the file.
  • Do not treat zero PCS or zero illuminant as corruption when the class semantics say those fields are intentionally unused.

Reproduction

Commands And Companion Scripts

Exact dump command

xxd -g 1 -c 16 test-profiles/sRgbEncoding.icc

This is the direct command used to create the left-hand specimen.

Cross-platform dump helpers

.github/scripts/icc2txt.zsh test-profiles/sRgbEncoding.icc
.github/scripts/icc2txt.sh test-profiles/sRgbEncoding.icc
pwsh -NoProfile -File .github/scripts/icc2txt.ps1 test-profiles/sRgbEncoding.icc

Each script writes a full dump plus a small metadata summary next to the consolidated report file.

Poster renderer

python3 docs/iccDEV/specifications/render_iccmax_srgbencoding_poster.py
python3 docs/iccDEV/specifications/render_iccmax_srgbencoding_poster_v2.py
python3 docs/iccDEV/specifications/render_iccmax_srgbencoding_poster_v3.py
python3 docs/iccDEV/specifications/render_iccmax_srgbencoding_poster_v4.py
python3 docs/iccDEV/specifications/render_iccmax_srgbencoding_poster_v5.py
python3 docs/iccDEV/specifications/render_iccmax_srgbencoding_poster_v6.py
python3 docs/iccDEV/specifications/render_iccmax_srgbencoding_poster_v7.py

The first command writes the original paired bitmap poster. The second writes the higher-resolution table-first docs/iccDEV/specifications/png/iccmax-srgbencoding-annotated-dump-v2.png. The third writes the ICC-homepage-branded docs/iccDEV/specifications/png/iccmax-srgbencoding-annotated-dump-v3.png. The fourth and fifth write the GIF-style and TIFF-style corkami variants at ...-v4.png and ...-v5.png. The sixth and seventh write the no-logo ico_png-style and bmp5-style variants at ...-v6.png and ...-v7.png.

Validation evidence

python3 - <<'PY'
import asyncio, sys
sys.path.insert(0, 'mcp-server')
from icc_profile_mcp import full_analysis
print(asyncio.run(full_analysis('test-profiles/sRgbEncoding.icc', engine='v1')))
PY

The key line in the local output is: Validation Status: OK - Profile conforms to ICC specification.