1
0
Fork 0
forked from wry/wry
wry/cmm/src/cmm_render_intent.rs

28 lines
760 B
Rust

#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, Default)]
pub enum RenderIntent {
#[default]
Perceptual,
Relative,
RelativeBpc,
AbsoluteNoAdaptation,
}
impl RenderIntent {
pub fn black_point_compensation(self) -> bool {
match self {
RenderIntent::Perceptual => true,
RenderIntent::RelativeBpc => true,
RenderIntent::Relative => false,
RenderIntent::AbsoluteNoAdaptation => false,
}
}
pub fn bradford_adjustment(self) -> bool {
match self {
RenderIntent::Perceptual => true,
RenderIntent::RelativeBpc => true,
RenderIntent::Relative => true,
RenderIntent::AbsoluteNoAdaptation => false,
}
}
}