Expand description
Utility functions for argument parsing from python input to inner-crate rust types.
Functionsยง
- build_
algorithm - Attempts to parse a
&Stringto 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
PyErrif it fails parsing. - get_
compression_ type - Retrieves the
image::codecs::png::CompressionTypevalue from theOptionsmap if it exists. Otherwise it returns the default value:CompressionType::Fast. - get_
filter_ type - Retrieves the
image::codecs::png::FilterTypevalue from theOptionsmap if it exists. Otherwise it returns the default value:FilterType::NoFilter. - get_
num_ threads - Retrieves the number of threads value from the
Optionsmap if it exists. Otherwise it returns the default value: 0.