Skip to main content

RowTransformMut

Trait RowTransformMut 

Source
pub trait RowTransformMut: Send {
    // Required method
    fn transform_row(&mut self, src: &[u8], dst: &mut [u8], width: u32);
}
Expand description

Owned, stateful row-level color transform.

Takes &mut self — each RowConverter owns its own Box<dyn RowTransformMut>, so implementations can reuse scratch buffers and update internal state per call without interior mutability.

When the transform is stateless and could be shared, use RowTransform instead — PluggableCms can offer both paths via build_shared_source_transform.

Required Methods§

Source

fn transform_row(&mut self, src: &[u8], dst: &mut [u8], width: u32)

Transform one row of pixels from source to destination color space.

src and dst may be different lengths if the transform changes the pixel format (e.g., CMYK to RGB). width is the number of pixels, not bytes.

Implementors§