pub trait ImageEncoder {
// Required methods
fn encode(
&self,
image: &RawImage,
config: &WebPConfig,
) -> EncodingResult<Vec<u8>>;
fn name(&self) -> &str;
fn supports_format(&self, format: PixelFormat) -> bool;
}Expand description
Trait for image encoders
Required Methods§
Sourcefn encode(
&self,
image: &RawImage,
config: &WebPConfig,
) -> EncodingResult<Vec<u8>>
fn encode( &self, image: &RawImage, config: &WebPConfig, ) -> EncodingResult<Vec<u8>>
Encode raw image data to a specific format
Sourcefn supports_format(&self, format: PixelFormat) -> bool
fn supports_format(&self, format: PixelFormat) -> bool
Check if encoder supports a specific pixel format