28 lines
760 B
Rust
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,
|
|
}
|
|
}
|
|
}
|