#[repr(i32)]pub enum ImwritePNGFilterFlags {
IMWRITE_PNG_FILTER_NONE = 8,
IMWRITE_PNG_FILTER_SUB = 16,
IMWRITE_PNG_FILTER_UP = 32,
IMWRITE_PNG_FILTER_AVG = 64,
IMWRITE_PNG_FILTER_PAETH = 128,
IMWRITE_PNG_FAST_FILTERS = 56,
IMWRITE_PNG_ALL_FILTERS = 248,
}Expand description
Imwrite PNG specific values for IMWRITE_PNG_FILTER parameter key
Variants§
IMWRITE_PNG_FILTER_NONE = 8
Applies no filter to the PNG image (useful when you want to save the raw pixel data without any compression filter).
IMWRITE_PNG_FILTER_SUB = 16
Applies the “sub” filter, which calculates the difference between the current byte and the previous byte in the row.
IMWRITE_PNG_FILTER_UP = 32
applies the “up” filter, which calculates the difference between the current byte and the corresponding byte directly above it.
IMWRITE_PNG_FILTER_AVG = 64
applies the “average” filter, which calculates the average of the byte to the left and the byte above.
IMWRITE_PNG_FILTER_PAETH = 128
applies the “Paeth” filter, a more complex filter that predicts the next pixel value based on neighboring pixels.
IMWRITE_PNG_FAST_FILTERS = 56
This is a combination of IMWRITE_PNG_FILTER_NONE, IMWRITE_PNG_FILTER_SUB, and IMWRITE_PNG_FILTER_UP, typically used for faster compression.
IMWRITE_PNG_ALL_FILTERS = 248
This combines all available filters (NONE, SUB, UP, AVG, and PAETH), which will attempt to apply all of them for the best possible compression.
Trait Implementations§
Source§impl Clone for ImwritePNGFilterFlags
impl Clone for ImwritePNGFilterFlags
Source§fn clone(&self) -> ImwritePNGFilterFlags
fn clone(&self) -> ImwritePNGFilterFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more