pub trait ImagePreprocessor: Send + Sync {
// Required method
fn preprocess(&self, bytes: &[u8]) -> Result<PixelBatch>;
}Expand description
Turns encoded image bytes (PNG/JPEG/WebP) into normalized pixel batches.
Required Methods§
Sourcefn preprocess(&self, bytes: &[u8]) -> Result<PixelBatch>
fn preprocess(&self, bytes: &[u8]) -> Result<PixelBatch>
Decodes and preprocesses one image.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".