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
Source§fn clone(&self) -> PngCompression
fn clone(&self) -> PngCompression
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PngCompression
Source§impl Debug for PngCompression
impl Debug for PngCompression
Source§impl Default for PngCompression
impl Default for PngCompression
Source§fn default() -> PngCompression
fn default() -> PngCompression
Returns the “default value” for a type. Read more
impl Eq for PngCompression
Source§impl PartialEq for PngCompression
impl PartialEq for PngCompression
impl StructuralPartialEq for PngCompression
Auto Trait Implementations§
impl Freeze 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