pub enum PngCompression {
None,
Fast,
Balanced,
Best,
}Expand description
How much CPU the PNG encoder spends shrinking the file. Every level
round-trips the exact same pixels; only encode time and file size move.
Balanced is what Pixmap::encode_png has always used.
Variants§
None
Uncompressed: fastest, largest files.
Fast
Very fast with a decent ratio.
Balanced
Balances encode speed and file size.
Best
Smallest files, much slower.
Trait Implementations§
Source§impl Clone for PngCompression
impl Clone for PngCompression
impl Copy for PngCompression
Source§impl Debug for PngCompression
impl Debug for PngCompression
Source§impl Default for PngCompression
impl Default for PngCompression
impl Eq for PngCompression
Source§impl PartialEq for PngCompression
impl PartialEq for PngCompression
impl StructuralPartialEq for PngCompression
Auto Trait Implementations§
impl Forget for PngCompression
impl Freeze for PngCompression
impl Move for PngCompression
impl RefUnwindSafe for PngCompression
impl Send for PngCompression
impl Sync for PngCompression
impl Unpin for PngCompression
impl UnsafeUnpin for PngCompression
impl UnwindSafe for PngCompression
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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