pub struct JpegEncoder { /* private fields */ }Expand description
JPEG encoder.
Implementations§
Source§impl JpegEncoder
impl JpegEncoder
Sourcepub const fn with_quality(quality: EncoderQuality) -> Self
pub const fn with_quality(quality: EncoderQuality) -> Self
Create a JPEG encoder with specified quality.
Sourcepub const fn quality(&self) -> EncoderQuality
pub const fn quality(&self) -> EncoderQuality
Get the quality setting.
Trait Implementations§
Source§impl Debug for JpegEncoder
impl Debug for JpegEncoder
Source§impl Default for JpegEncoder
impl Default for JpegEncoder
Source§impl ImageEncoder for JpegEncoder
impl ImageEncoder for JpegEncoder
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 JpegEncoder
impl RefUnwindSafe for JpegEncoder
impl Send for JpegEncoder
impl Sync for JpegEncoder
impl Unpin for JpegEncoder
impl UnsafeUnpin for JpegEncoder
impl UnwindSafe for JpegEncoder
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