[−][src]Struct libavif::Encoder
AVIF image encoder
Implementations
impl Encoder
[src]
pub fn new() -> Self
[src]
Create a new encoder with default settings
Defaults
max_threads
->1
quantizer
->0
quantizer_alpha
->0
speed
->10
pub fn max_threads(&self) -> usize
[src]
Get the maximum allowed number of threads this Encoder
can use
pub fn set_max_threads(&mut self, max_threads: usize) -> &mut Self
[src]
Set the maximum allowed number of threads this Encoder
can use
pub fn quantizer(&self) -> u8
[src]
Get quantizer value for the YUV channels
pub fn set_quantizer(&mut self, quantizer: u8) -> &mut Self
[src]
Set the quantizer value for the YUV channels
Must be between 0 and 63.
0
- lossless63
- lowest quality
pub fn quantizer_alpha(&self) -> u8
[src]
Get quantizer value for the alpha channel
pub fn set_quantizer_alpha(&mut self, quantizer_alpha: u8) -> &mut Self
[src]
Set the quantizer value for the alpha channel
Must be between 0 and 63.
0
- lossless63
- lowest quality
pub fn speed(&self) -> u8
[src]
Get the speed of this Encoder
pub fn set_speed(&mut self, speed: u8) -> &mut Self
[src]
Set the speed of this Encoder
Must be between 0 and 10.
10
- fastest0
- slowest
pub fn encode(&self, image: &AvifImage) -> Result<AvifData<'static>, Error>
[src]
Encode an AvifImage
using the settings from this Encoder
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Encoder
impl !Send for Encoder
impl !Sync for Encoder
impl Unpin for Encoder
impl UnwindSafe for Encoder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,