+ let pipeline = if fmt_in != fmt_out {
+ build_pipeline(&fmt_in, &fmt_out, just_convert, &[])?
+ } else {
+ None
+ };
+ Ok(Self { fmt_in, fmt_out, just_convert, pipeline })
+ }
+ /// Constructs a new `NAScale` instance taking into account provided options.
+ pub fn new_with_options(fmt_in: ScaleInfo, fmt_out: ScaleInfo, options: &[(String, String)]) -> ScaleResult<Self> {
+ let just_convert = (fmt_in.width == fmt_out.width) && (fmt_in.height == fmt_out.height);
+ let pipeline = if fmt_in != fmt_out {
+ build_pipeline(&fmt_in, &fmt_out, just_convert, options)?
+ } else {
+ None
+ };