Struct oxipng::Options
[−]
[src]
pub struct Options { pub backup: bool, pub out_file: PathBuf, pub out_dir: Option<PathBuf>, pub stdout: bool, pub fix_errors: bool, pub pretend: bool, pub recursive: bool, pub clobber: bool, pub create: bool, pub force: bool, pub preserve_attrs: bool, pub verbosity: Option<u8>, pub filter: HashSet<u8>, pub interlace: Option<u8>, pub compression: HashSet<u8>, pub memory: HashSet<u8>, pub strategies: HashSet<u8>, pub window: u8, pub bit_depth_reduction: bool, pub color_type_reduction: bool, pub palette_reduction: bool, pub idat_recoding: bool, pub strip: Headers, pub use_heuristics: bool, }
Options controlling the output of the optimize
function
Fields
backup: bool
Whether the input file should be backed up before writing the output
out_file: PathBuf
Path to write the output file to
out_dir: Option<PathBuf>
Used only in CLI interface
stdout: bool
Write to stdout instead of a file
fix_errors: bool
Attempt to fix errors when decoding the input file
pretend: bool
Don't actually write any output, just calculate the best results
recursive: bool
Used only in CLI interface
clobber: bool
Overwrite existing output files
create: bool
Create new output files if they don't exist
force: bool
Write to output even if there was no improvement in compression
preserve_attrs: bool
Ensure the output file has the same permissions as the input file
verbosity: Option<u8>
How verbose the console logging should be (None
for quiet, Some(0)
for normal, Some(1)
for verbose)
filter: HashSet<u8>
Which filters to try on the file (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
compression: HashSet<u8>
Which zlib compression levels to try on the file (1-9)
memory: HashSet<u8>
Which zlib memory levels to try on the file (1-9)
strategies: HashSet<u8>
Which zlib compression strategies to try on the file (0-3)
window: u8
Window size to use when compressing the file, as 2^window
bytes
Doesn't affect compression but may affect speed and memory usage
15 is recommended default, 8-15 are valid values
bit_depth_reduction: bool
Whether to attempt bit depth reduction
color_type_reduction: bool
Whether to attempt color type reduction
palette_reduction: bool
Whether to attempt palette reduction
idat_recoding: bool
Whether to perform IDAT recoding If any type of reduction is performed, IDAT recoding will be performed regardless of this setting
strip: Headers
Which headers to strip from the PNG file, if any
use_heuristics: bool
Whether to use heuristics to pick the best filter and compression
Intended for use with -o 1
from the CLI interface
Trait Implementations
impl Debug for Options
[src]
impl Clone for Options
[src]
fn clone(&self) -> Options
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more