pub struct WebPEncoder { /* private fields */ }Expand description
WebP encoder using the webp crate
Implementations§
Source§impl WebPEncoder
impl WebPEncoder
Sourcepub fn stats(&self) -> &EncoderStats
pub fn stats(&self) -> &EncoderStats
Get encoder statistics
Sourcepub fn encode(
&mut self,
image: &RawImage,
config: &WebPConfig,
) -> EncodingResult<Vec<u8>>
pub fn encode( &mut self, image: &RawImage, config: &WebPConfig, ) -> EncodingResult<Vec<u8>>
Encode an image to WebP format
Sourcepub fn supports_format(&self, format: PixelFormat) -> bool
pub fn supports_format(&self, format: PixelFormat) -> bool
Check if the encoder supports a specific format
Sourcepub fn capabilities(&self) -> Vec<&'static str>
pub fn capabilities(&self) -> Vec<&'static str>
Get encoder capabilities
Trait Implementations§
Source§impl Default for WebPEncoder
impl Default for WebPEncoder
Source§impl ImageEncoder for WebPEncoder
impl ImageEncoder for WebPEncoder
Source§fn 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
Source§fn supports_format(&self, format: PixelFormat) -> bool
fn supports_format(&self, format: PixelFormat) -> bool
Check if encoder supports a specific pixel format
Auto Trait Implementations§
impl Freeze for WebPEncoder
impl RefUnwindSafe for WebPEncoder
impl Send for WebPEncoder
impl Sync for WebPEncoder
impl Unpin for WebPEncoder
impl UnwindSafe for WebPEncoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more