Enum lodepng::ffi::FilterStrategy
source · #[repr(C)]pub enum FilterStrategy {
ZERO = 0,
MINSUM = 1,
ENTROPY = 2,
BRUTE_FORCE = 3,
PREDEFINED = 4,
}
Expand description
automatically use color type with less bits per pixel if losslessly possible. Default: AUTO
Variants§
ZERO = 0
every filter at zero
MINSUM = 1
Use filter that gives minumum sum, as described in the official PNG filter heuristic.
ENTROPY = 2
Use the filter type that gives smallest Shannon entropy for this scanline. Depending on the image, this is better or worse than minsum.
BRUTE_FORCE = 3
Brute-force-search PNG filters by compressing each filter for each scanline. Experimental, very slow, and only rarely gives better compression than MINSUM.
PREDEFINED = 4
use predefined_filters buffer: you specify the filter type for each scanline.
See Encoder::set_predefined_filters
.
Trait Implementations§
source§impl Clone for FilterStrategy
impl Clone for FilterStrategy
source§fn clone(&self) -> FilterStrategy
fn clone(&self) -> FilterStrategy
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FilterStrategy
impl Debug for FilterStrategy
source§impl PartialEq for FilterStrategy
impl PartialEq for FilterStrategy
source§fn eq(&self, other: &FilterStrategy) -> bool
fn eq(&self, other: &FilterStrategy) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for FilterStrategy
impl Eq for FilterStrategy
impl StructuralEq for FilterStrategy
impl StructuralPartialEq for FilterStrategy
Auto Trait Implementations§
impl RefUnwindSafe for FilterStrategy
impl Send for FilterStrategy
impl Sync for FilterStrategy
impl Unpin for FilterStrategy
impl UnwindSafe for FilterStrategy
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more