pub struct Options {
pub quality: i32,
pub downsample: Downsample,
pub alpha_option: AlphaOption,
pub xmp_metadata: Vec<u8>,
/* private fields */
}Fields§
§quality: i32quality must be in [0, 100] where 0 corresponds to the lowest quality.
downsample: DownsampleChoose the downsampling factor for the U and V components.
This is only meaningful if the src is not Gray, since Gray will not be encoded as YUV.
This is ignored in favor of src’s subsampling when src is an YUVAPixmaps.
alpha_option: AlphaOptionJpegs must be opaque.
This instructs the encoder on how to handle input images with alpha. The default is to ignore the alpha channel and treat the image as opaque. Another option is to blend the pixels onto a black background before encoding. In the second case, the encoder supports linear or legacy blending.
xmp_metadata: Vec<u8>Optional XMP metadata.
Trait Implementations§
impl Eq for Options
impl StructuralPartialEq for Options
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
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