Struct libavif::Encoder [−][src]
pub struct Encoder { /* fields omitted */ }
AVIF image encoder
Implementations
impl Encoder
[src]
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 RefUnwindSafe for Encoder
impl UnwindSafe for Encoder
impl UnwindSafe for Encoder