pub struct WebPEncoder<W> {
writer: W,
icc_profile: Vec<u8>,
exif_metadata: Vec<u8>,
xmp_metadata: Vec<u8>,
params: EncoderParams,
}
Expand description
WebP Encoder.
Fields§
§writer: W
§icc_profile: Vec<u8>
§exif_metadata: Vec<u8>
§xmp_metadata: Vec<u8>
§params: EncoderParams
Implementations§
Source§impl<W: Write> WebPEncoder<W>
impl<W: Write> WebPEncoder<W>
Sourcepub fn new(w: W) -> Self
pub fn new(w: W) -> Self
Create a new encoder that writes its output to w
.
Only supports “VP8L” lossless encoding.
Sourcepub fn set_icc_profile(&mut self, icc_profile: Vec<u8>)
pub fn set_icc_profile(&mut self, icc_profile: Vec<u8>)
Set the ICC profile to use for the image.
Sourcepub fn set_exif_metadata(&mut self, exif_metadata: Vec<u8>)
pub fn set_exif_metadata(&mut self, exif_metadata: Vec<u8>)
Set the EXIF metadata to use for the image.
Sourcepub fn set_xmp_metadata(&mut self, xmp_metadata: Vec<u8>)
pub fn set_xmp_metadata(&mut self, xmp_metadata: Vec<u8>)
Set the XMP metadata to use for the image.
Sourcepub fn set_params(&mut self, params: EncoderParams)
pub fn set_params(&mut self, params: EncoderParams)
Set the EncoderParams
to use.
Auto Trait Implementations§
impl<W> Freeze for WebPEncoder<W>where
W: Freeze,
impl<W> RefUnwindSafe for WebPEncoder<W>where
W: RefUnwindSafe,
impl<W> Send for WebPEncoder<W>where
W: Send,
impl<W> Sync for WebPEncoder<W>where
W: Sync,
impl<W> Unpin for WebPEncoder<W>where
W: Unpin,
impl<W> UnwindSafe for WebPEncoder<W>where
W: UnwindSafe,
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