pub struct ProofingConfig { /* private fields */ }Expand description
Configuration for soft proofing transforms.
Built via ProofingConfig::builder(), this struct captures the profiles,
intents, and optional gamut warning needed for a two-stage proofing pipeline.
§Examples
use appthere_color::{ProofingConfig, IccProfile, RenderingIntent};
let config = ProofingConfig::builder()
.source(&IccProfile::new_srgb())
.simulation(&IccProfile::new_srgb())
.display(&IccProfile::new_srgb())
.simulation_intent(RenderingIntent::Perceptual)
.build()
.unwrap();Implementations§
Source§impl ProofingConfig
impl ProofingConfig
Sourcepub fn builder() -> ProofingConfigBuilder
pub fn builder() -> ProofingConfigBuilder
Creates a new ProofingConfigBuilder.
§Examples
use appthere_color::ProofingConfig;
let builder = ProofingConfig::builder();Sourcepub fn proof(&self, src: &[f32], dst: &mut [f32]) -> ColorResult<()>
pub fn proof(&self, src: &[f32], dst: &mut [f32]) -> ColorResult<()>
Executes the two-stage proofing transform on pixel data.
Transform 1: source → simulation profile (simulation_intent). Transform 2: simulation → display profile (display_intent).
§Errors
Returns ColorError::TransformExecution if either stage fails.
§Examples
use appthere_color::{ProofingConfig, IccProfile, RenderingIntent};
let config = ProofingConfig::builder()
.source(&IccProfile::new_srgb())
.simulation(&IccProfile::new_srgb())
.display(&IccProfile::new_srgb())
.build()
.unwrap();
let input = [0.5_f32, 0.3, 0.8];
let mut output = [0.0_f32; 3];
config.proof(&input, &mut output).unwrap();Sourcepub fn gamut_warning(&self) -> GamutWarning
pub fn gamut_warning(&self) -> GamutWarning
Returns the gamut warning mode configured for this proofing config.
§Examples
use appthere_color::{ProofingConfig, IccProfile, GamutWarning};
let config = ProofingConfig::builder()
.source(&IccProfile::new_srgb())
.simulation(&IccProfile::new_srgb())
.display(&IccProfile::new_srgb())
.build()
.unwrap();
assert_eq!(config.gamut_warning(), GamutWarning::None);Sourcepub fn source_channels(&self) -> usize
pub fn source_channels(&self) -> usize
Returns the number of channels in the source color space.
§Examples
use appthere_color::{ProofingConfig, IccProfile};
let config = ProofingConfig::builder()
.source(&IccProfile::new_srgb())
.simulation(&IccProfile::new_srgb())
.display(&IccProfile::new_srgb())
.build()
.unwrap();
assert_eq!(config.source_channels(), 3);Sourcepub fn destination_channels(&self) -> usize
pub fn destination_channels(&self) -> usize
Returns the number of channels in the display color space.
§Examples
use appthere_color::{ProofingConfig, IccProfile};
let config = ProofingConfig::builder()
.source(&IccProfile::new_srgb())
.simulation(&IccProfile::new_srgb())
.display(&IccProfile::new_srgb())
.build()
.unwrap();
assert_eq!(config.destination_channels(), 3);Auto Trait Implementations§
impl Freeze for ProofingConfig
impl !RefUnwindSafe for ProofingConfig
impl Send for ProofingConfig
impl Sync for ProofingConfig
impl Unpin for ProofingConfig
impl UnsafeUnpin for ProofingConfig
impl !UnwindSafe for ProofingConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more