Enum Filter

#[non_exhaustive]
pub enum Filter

The byte level filter applied to scanlines to prepare them for compression.

Compression in general benefits from repetitive data. The filter is a content-aware method of compressing the range of occurring byte values to help the compression algorithm. Note that this does not operate on pixels but on raw bytes of a scanline.

Details on how each filter works can be found in the PNG Book.

The default filter is Adaptive, which uses heuristics to select the best filter for every row.

Variants

NoFilter
Sub
Up
Avg
Paeth
Adaptive
MinEntropy

Trait Implementations

impl Clone for Filter

fn clone(&self) -> Self

impl Copy for Filter

impl Debug for Filter

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Default for Filter

fn default() -> Self

impl Eq for Filter

impl PartialEq for Filter

fn eq(&self, other: &Self) -> bool

impl StructuralPartialEq for Filter

Auto Trait Implementations

impl Freeze for Filter

impl RefUnwindSafe for Filter

impl Send for Filter

impl Sync for Filter

impl Unpin for Filter

impl UnsafeUnpin for Filter

impl UnwindSafe for Filter

Blanket Implementations

impl<T> Any for Filter where T: 'static + ?Sized,

impl<T> Borrow<T> for Filter where T: ?Sized,

impl<T> BorrowMut<T> for Filter where T: ?Sized,

impl<T> CloneToUninit for Filter where T: Clone,

impl<T> From<T> for Filter

impl<T> ToOwned for Filter where T: Clone,

impl<T, U> Into<U> for Filter where U: From<T>,

impl<T, U> TryFrom<U> for Filter where U: Into<T>,

impl<T, U> TryInto<U> for Filter where U: TryFrom<T>,