Skip to main content

CoverProfileMatcher

Trait CoverProfileMatcher 

Source
pub trait CoverProfileMatcher {
    // Required methods
    fn profile_for(&self, cover: &CoverMedia) -> Option<CoverProfile>;
    fn apply_profile(
        &self,
        cover: CoverMedia,
        profile: &CoverProfile,
    ) -> Result<CoverMedia, AdaptiveError>;
}
Expand description

Cover profile matching port — detects whether a cover is AI-generated or camera-sourced.

Required Methods§

Source

fn profile_for(&self, cover: &CoverMedia) -> Option<CoverProfile>

Return the best-matching CoverProfile for cover, or None if no profile is close enough.

Source

fn apply_profile( &self, cover: CoverMedia, profile: &CoverProfile, ) -> Result<CoverMedia, AdaptiveError>

Apply profile to cover (e.g. adjust JPEG quant tables for a camera profile; no-op for AI profiles — we avoid their bins instead).

§Errors

Returns AdaptiveError::ProfileMatchFailed.

Implementors§