Enum png::FilterType
source · #[repr(u8)]
pub enum FilterType {
NoFilter,
Sub,
Up,
Avg,
Paeth,
}
Expand description
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.
Variants§
Implementations§
source§impl FilterType
impl FilterType
sourcepub fn from_u8(n: u8) -> Option<FilterType>
pub fn from_u8(n: u8) -> Option<FilterType>
u8 -> Self. Temporary solution until Rust provides a canonical one.
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 ==
.