+ pipeline = build_pipeline(&fmt_in, &fmt_out, just_convert, &[])?;
+ } else {
+ pipeline = 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 pipeline;
+ let just_convert = (fmt_in.width == fmt_out.width) && (fmt_in.height == fmt_out.height);
+ if fmt_in != fmt_out {
+ pipeline = build_pipeline(&fmt_in, &fmt_out, just_convert, options)?;