Enum image::codecs::png::FilterType
source · #[non_exhaustive]pub enum FilterType {
NoFilter,
Sub,
Up,
Avg,
Paeth,
Adaptive,
}
Expand description
Filter algorithms used to process image data to improve compression.
The default filter is Adaptive
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NoFilter
No processing done, best used for low bit depth grayscale or data with a low color count
Sub
Filters based on previous pixel in the same scanline
Up
Filters based on the scanline above
Avg
Filters based on the average of left and right neighbor pixels
Paeth
Algorithm that takes into account the left, upper left, and above pixels
Adaptive
Uses a heuristic to select one of the preceding filters for each scanline rather than one filter for the entire image
Trait Implementations§
source§impl Clone for FilterType
impl Clone for FilterType
source§fn clone(&self) -> FilterType
fn clone(&self) -> FilterType
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 FilterType
impl Debug for FilterType
source§impl Default for FilterType
impl Default for FilterType
source§impl PartialEq<FilterType> for FilterType
impl PartialEq<FilterType> for FilterType
source§fn eq(&self, other: &FilterType) -> bool
fn eq(&self, other: &FilterType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for FilterType
impl Eq for FilterType
impl StructuralEq for FilterType
impl StructuralPartialEq for FilterType
Auto Trait Implementations§
impl RefUnwindSafe for FilterType
impl Send for FilterType
impl Sync for FilterType
impl Unpin for FilterType
impl UnwindSafe for FilterType
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