pub struct AvifEncoder { /* private fields */ }Expand description
AVIF encoder.
Encodes images to AVIF format using the rav1e AV1 encoder.
Implementations§
Source§impl AvifEncoder
impl AvifEncoder
Sourcepub fn with_quality(self, quality: u8) -> Self
pub fn with_quality(self, quality: u8) -> Self
Set the quality (0-100, higher is better quality but larger file).
Sourcepub fn with_speed(self, speed: u8) -> Self
pub fn with_speed(self, speed: u8) -> Self
Set the encoding speed (1-10, higher is faster but lower quality).
Trait Implementations§
Source§impl Default for AvifEncoder
impl Default for AvifEncoder
Source§impl ImageEncoder for AvifEncoder
impl ImageEncoder for AvifEncoder
Source§fn encode<W: Write>(&self, _image: &Image, _writer: W) -> CodecResult<()>
fn encode<W: Write>(&self, _image: &Image, _writer: W) -> CodecResult<()>
Encode an image to a writer. Read more
Source§fn format(&self) -> ImageFormat
fn format(&self) -> ImageFormat
Get the format this encoder produces.
Source§fn encode_bytes(&self, image: &Image) -> CodecResult<Vec<u8>>
fn encode_bytes(&self, image: &Image) -> CodecResult<Vec<u8>>
Encode an image to bytes. Read more
Auto Trait Implementations§
impl Freeze for AvifEncoder
impl RefUnwindSafe for AvifEncoder
impl Send for AvifEncoder
impl Sync for AvifEncoder
impl Unpin for AvifEncoder
impl UnsafeUnpin for AvifEncoder
impl UnwindSafe for AvifEncoder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more