Expand description
Utility functions for argument parsing from python input to inner-crate rust types.
Functionsยง
- build_
algorithm - Attempts to parse a
&String
to aBlendAlgorithm
. Returns the enum variant if it succeeds. Otherwise it returns aPyErr
. - build_
params - Attempts to build a vector of blending operations and extra parameters.
One pair per blending operation. Returns a
PyErr
if it fails parsing. - get_
compression_ type - Retrieves the
image::codecs::png::CompressionType
value from theOptions
map if it exists. Otherwise it returns the default value:CompressionType::Fast
. - get_
filter_ type - Retrieves the
image::codecs::png::FilterType
value from theOptions
map if it exists. Otherwise it returns the default value:FilterType::NoFilter
. - get_
num_ threads - Retrieves the number of threads value from the
Options
map if it exists. Otherwise it returns the default value: 0.