[−][src]Struct oxipng::Options
Options controlling the output of the optimize
function
Fields
backup: bool
Whether the input file should be backed up before writing the output.
Default: false
fix_errors: bool
Attempt to fix errors when decoding the input file rather than returning an Err
.
Default: false
pretend: bool
Don't actually write any output, just calculate the best results.
Default: false
force: bool
Write to output even if there was no improvement in compression.
Default: false
preserve_attrs: bool
Ensure the output file has the same permissions as the input file.
Default: false
filter: IndexSet<u8>
Which filters to try on the file (0-5)
Default: 0,5
interlace: Option<u8>
Whether to change the interlacing type of the file.
None
will not change the current interlacing type.
Some(x)
will change the file to interlacing mode x
.
Default: None
alphas: IndexSet<AlphaOptim>
Alpha filtering strategies to use
bit_depth_reduction: bool
Whether to attempt bit depth reduction
Default: true
color_type_reduction: bool
Whether to attempt color type reduction
Default: true
palette_reduction: bool
Whether to attempt palette reduction
Default: true
idat_recoding: bool
Whether to perform IDAT recoding
If any type of reduction is performed, IDAT recoding will be performed regardless of this setting
Default: true
strip: Headers
Which headers to strip from the PNG file, if any
Default: None
deflate: Deflaters
Which DEFLATE algorithm to use
Default: Zlib
use_heuristics: bool
Whether to use heuristics to pick the best filter and compression
Intended for use with -o 1
from the CLI interface
Default: false
timeout: Option<Duration>
Maximum amount of time to spend on optimizations. Further potential optimizations are skipped if the timeout is exceeded.
Implementations
impl Options
[src]
pub fn from_preset(level: u8) -> Options
[src]
pub fn max_compression() -> Options
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Options
[src]
impl Send for Options
[src]
impl Sync for Options
[src]
impl Unpin for Options
[src]
impl UnwindSafe for Options
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,