jxl_oxide

Trait ColorManagementSystem

Source
pub trait ColorManagementSystem {
    // Required method
    fn transform_impl(
        &self,
        from: &[u8],
        to: &[u8],
        intent: RenderingIntent,
        channels: &mut [&mut [f32]],
    ) -> Result<usize, Box<dyn Error + Sync + Send>>;

    // 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§

Source

fn transform_impl( &self, from: &[u8], to: &[u8], intent: RenderingIntent, channels: &mut [&mut [f32]], ) -> Result<usize, Box<dyn Error + Sync + Send>>

Provided Methods§

Source

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.

Source

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.

Implementors§