Expand description
Full re-export of zenpixels core types (zero module name collisions!).
Lightweight ICC profile inspection and identification.
Two capabilities, no dependencies beyond core:
-
CICP extraction:
Cicp::from_iccandCicpTag::from_iccread thecicptag from ICC v4.4+ profiles (~100ns, no allocation), including the 44-byte custom-primariescicpTypeextension (ICC amendment approved 2026-10-19). -
Hash-based identification:
IccIdentification::from_iccrecognizes retained profile fingerprints (sRGB, Display P3, BT.2020, Adobe RGB, grayscale) via paired normalized FNV-1a64/MurmurHash3_x86_32 lookup.
The hash table covers profiles found in a web corpus of 55,539 spidered
images, plus Compact-ICC-Profiles, skcms, ICC.org, colord, Ghostscript,
moxcms, and zenpixels-convert bundled profiles. Metadata-only header
fields are zeroed before hashing to collapse functionally identical
profiles across ICC v2.0–v4.4 and v5/iccMAX. Stored curve-fit errors concern
red/gray TRCs; intent permissions carry separate historical qualification.
Neither establishes bit-exact full-transform equivalence. Exact original
coverage is documented in docs/icc-retention-audit.md; complete historical
tolerance requalification remains separate.
§Example
use zenpixels::icc::{IccIdentification, IdentificationUse};
if let Some(id) = IccIdentification::from_icc(icc_bytes) {
if id.valid_use() == IdentificationUse::MatrixTrcSubstitution {
// Eligible for matrix+TRC under the caller's approximation policy.
}
// id.primaries() and id.transfer() are always available for metadata
}Structs§
- CicpTag
- ICC.1:2022 §10.3
cicpTypetag payload, including the ICC custom-primaries amendment (approved 2026-10-19). - IccFingerprint
- Pair of normalized ICC fingerprints returned by
Self::from_icc. - IccIdentification
- Result of identifying a well-known ICC profile.
Enums§
- IccMatch
Tolerance - TRC matching tolerance tier for
IccIdentification::from_icc_for_intent. - IccValidation
Error - Structural validation error for raw ICC profile bytes (ISO 15076-1 / ICC.1).
- Identification
Use - What operations an
IccIdentificationsupports.
Functions§
- normalized_
eq - Compare every byte except the metadata-only header fields ignored by
normalized_hash. No allocation, profile parsing or hashing is performed. - normalized_
hash - Fingerprint ICC bytes after header normalization. See
IccFingerprint::from_icc. - validate_
icc_ structure - Validate an ICC profile’s structural framing per ISO 15076-1 / ICC.1: