pub const fn bundled_icc_profile(
primaries: Primaries,
transfer: Transfer,
) -> Option<&'static [u8]>Expand description
Get a bundled &'static ICC profile whose tone curve is exactly the
requested transfer function on exactly the requested primaries.
This accessor matches against the TRC encoded in each bundled profile, so (Bt2020, Bt709) gets the Rec. 2020 profile while (Bt2020, Srgb) and (Bt2020, Pq) get None. sRGB and BT.709 are different curves (at linear 0.18 they
encode 0.461 and 0.409, 13 code values apart at 8 bits), so neither stands
in for the other.
§Currently bundled combinations
| Primaries | Transfer | Returned profile |
|---|---|---|
Primaries::Bt709 | Transfer::Srgb | None — sRGB is the assumed default |
Primaries::DisplayP3 | Transfer::Srgb or Transfer::Bt709 | compact generated export |
Primaries::Bt2020 | Transfer::Bt709 | REC2020_V4 |
Primaries::AdobeRgb | Transfer::AdobeRgb | ADOBE_RGB |
§Not bundled (returns None)
- HDR transfers (
Transfer::Pq,Transfer::Hlg) on any primaries. Ultra HDR / HDR10 / HLG broadcast workflows that need a PQ- or HLG-tagged profile should either generate one via a CMS crate (e.g.,moxcms::ColorProfile::new_bt2020_pq().encode()) or signal color via CICP instead of ICC. Transfer::Linearon any primaries. Linear-light working spaces are typically expressed with CICP transfer code 8 rather than an ICC profile.- Adobe RGB with any transfer other than
Transfer::AdobeRgb(563/256). - Display P3 with any transfer other than
SrgborBt709, and BT.2020 with any transfer other thanBt709.
SynthesizedIcc::for_cicp serves every assigned pair (these included)
from the icc-db blob; this table is its fallback without that feature.