cms: keep public v2 helper before test module

This commit is contained in:
Dylan M. Taylor
2026-11-15 09:43:27 -05:00
parent 7bc5f2a4c8
commit cab96afd08
+12 -12
View File
@@ -424,6 +424,18 @@ fn shipped_cmyk(bytes: &[u8], b: Builtin) -> Profile {
})
}
/// Generates the compact ICC v2.1 sRGB matrix/TRC profile used by PDFCraft.
///
/// Unlike [`Builtin::Srgb`]'s v4 profile, this uses a 1024-sample tone curve and
/// v2 `desc`/`text` tags for consumers that require a v2 output intent. The legacy
/// description `sRGB (PdfCraft)` is retained to preserve existing document bytes.
/// The generated profile contains no external assets; callers choose where it is
/// appropriate (including their own PDF/A conformance policy).
/// All sizes are fixed; no input-controlled allocation or recursion is involved.
pub fn srgb_v2() -> Vec<u8> {
crate::builtin_v2::srgb()
}
#[cfg(test)]
mod tests {
use super::*;
@@ -450,15 +462,3 @@ mod tests {
assert!(cicp_rgb(u16::MAX, u16::MAX, true).is_none());
}
}
/// Generates the compact ICC v2.1 sRGB matrix/TRC profile used by PDFCraft.
///
/// Unlike [`Builtin::Srgb`]'s v4 profile, this uses a 1024-sample tone curve and
/// v2 `desc`/`text` tags for consumers that require a v2 output intent. The legacy
/// description `sRGB (PdfCraft)` is retained to preserve existing document bytes.
/// The generated profile contains no external assets; callers choose where it is
/// appropriate (including their own PDF/A conformance policy).
/// All sizes are fixed; no input-controlled allocation or recursion is involved.
pub fn srgb_v2() -> Vec<u8> {
crate::builtin_v2::srgb()
}