pub trait ColorManagementSystem {
// Required method
fn transform_impl(
&self,
from: &[u8],
to: &[u8],
intent: RenderingIntent,
channels: &mut [&mut [f32]],
) -> Result<usize, Box<dyn Error + Send + Sync + 'static>>;
// Provided methods
fn transform(
&self,
from: &[u8],
to: &[u8],
intent: RenderingIntent,
channels: &mut [&mut [f32]],
) -> Result<usize, Error> { ... }
fn supports_linear_tf(&self) -> bool { ... }
}
Expand description
Color management system that handles ICCv4 profiles.
Implementors can implement transform_impl
to integrate into external color management system.
Required Methods§
fn transform_impl( &self, from: &[u8], to: &[u8], intent: RenderingIntent, channels: &mut [&mut [f32]], ) -> Result<usize, Box<dyn Error + Send + Sync + 'static>>
Provided Methods§
Sourcefn transform(
&self,
from: &[u8],
to: &[u8],
intent: RenderingIntent,
channels: &mut [&mut [f32]],
) -> Result<usize, Error>
fn transform( &self, from: &[u8], to: &[u8], intent: RenderingIntent, channels: &mut [&mut [f32]], ) -> Result<usize, Error>
Performs color transformation between two ICC profiles.
§Errors
This function will return an error if the internal CMS implementation returned an error.
Sourcefn supports_linear_tf(&self) -> bool
fn supports_linear_tf(&self) -> bool
Returns whether the CMS supports linear transfer function.
This method will return false
if it doesn’t support (or it lacks precision to handle)
linear transfer function.