#[non_exhaustive]pub struct IccIdentification { /* private fields */ }Expand description
Implementations§
Source§impl IccIdentification
impl IccIdentification
Sourcepub const fn valid_use(self) -> IdentificationUse
pub const fn valid_use(self) -> IdentificationUse
Operations supported by this identification.
Sourcepub fn from_icc(icc_bytes: &[u8]) -> Option<IccIdentification>
pub fn from_icc(icc_bytes: &[u8]) -> Option<IccIdentification>
Recognize icc_bytes as a well-known profile from its normalized hash.
None means not in the table, which says nothing about the profile. A
match is an approximate color identification, as described on this type.
For sRGB use is_common_srgb.
Sourcepub fn from_icc_substitutable(icc_bytes: &[u8]) -> Option<IccIdentification>
pub fn from_icc_substitutable(icc_bytes: &[u8]) -> Option<IccIdentification>
Recognize icc_bytes only when it is safe for matrix+TRC substitution
across all rendering intents (IdentificationUse::MatrixTrcSubstitution).
Consults only the compact substitutable table so callers that never need
MetadataOnly entries dead-strip that table.
Sourcepub fn from_icc_for_intent(
icc_bytes: &[u8],
intent: RenderingIntent,
tolerance: IccMatchTolerance,
) -> Option<IccIdentification>
pub fn from_icc_for_intent( icc_bytes: &[u8], intent: RenderingIntent, tolerance: IccMatchTolerance, ) -> Option<IccIdentification>
Recognize icc_bytes when matrix+TRC substitution is safe for the
requested RenderingIntent at tolerance.
Always returns None for
RenderingIntent::AbsoluteColorimetric
because D50-adapted relative matrix math cannot undo D65→D50 adaptation.
Sourcepub fn is_common_srgb(icc_bytes: &[u8]) -> bool
pub fn is_common_srgb(icc_bytes: &[u8]) -> bool
Whether icc_bytes is a well-known sRGB profile, for skipping a CMS.
false means not recognized, which doesn’t mean it isn’t sRGB.
Trait Implementations§
Source§impl Clone for IccIdentification
impl Clone for IccIdentification
Source§fn clone(&self) -> IccIdentification
fn clone(&self) -> IccIdentification
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more