Skip to main content

ImageEncoderPort

Trait ImageEncoderPort 

Source
pub trait ImageEncoderPort: Send + Sync {
    // Required method
    fn encode(
        &self,
        frame: &dyn MatView,
        kind: EncodingKind,
    ) -> Result<Vec<u8>, ImageEncodingError>;
}
Expand description

Encodes a MatView into a byte buffer in one of the EncodingKinds.

Required Methods§

Source

fn encode( &self, frame: &dyn MatView, kind: EncodingKind, ) -> Result<Vec<u8>, ImageEncodingError>

Encode frame using kind and return the resulting bytes.

Implementors§