Fixed typo in name of CatmullRom filter type.

This commit is contained in:
Kirill Kuzminykh
2021-08-02 21:05:50 +03:00
parent 43d6981d76
commit b0416005c7
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
## [Unreleased] - ReleaseDate
- Initial version.
- Fixed typo in name of CatmullRom filter type.
+1 -1
View File
@@ -95,7 +95,7 @@ pub fn bench_downscale_rgb(bench: &mut Bench) {
let resize_alg = match alg_name {
"Nearest" => ResizeAlg::Nearest,
"Bilinear" => ResizeAlg::Convolution(FilterType::Bilinear),
"CatmullRom" => ResizeAlg::Convolution(FilterType::CatmulRom),
"CatmullRom" => ResizeAlg::Convolution(FilterType::CatmullRom),
"Lanczos3" => ResizeAlg::Convolution(FilterType::Lanczos3),
_ => return,
};
+1 -1
View File
@@ -79,7 +79,7 @@ pub fn bench_downscale_rgba(bench: &mut Bench) {
let resize_alg = match alg_name {
"Nearest" => ResizeAlg::Nearest,
"Bilinear" => ResizeAlg::Convolution(FilterType::Bilinear),
"CatmullRom" => ResizeAlg::Convolution(FilterType::CatmulRom),
"CatmullRom" => ResizeAlg::Convolution(FilterType::CatmullRom),
"Lanczos3" => ResizeAlg::Convolution(FilterType::Lanczos3),
_ => return,
};
+2 -2
View File
@@ -21,7 +21,7 @@ pub enum FilterType {
/// Catmull-Rom bicubic filter calculate the output pixel value using
/// cubic interpolation on all pixels that may contribute to the output
/// value.
CatmulRom,
CatmullRom,
/// Mitchell–Netravali bicubic filter calculate the output pixel value
/// using cubic interpolation on all pixels that may contribute to the
/// output value.
@@ -45,7 +45,7 @@ pub fn get_filter_func(filter_type: FilterType) -> (FilterFn<'static>, f64) {
FilterType::Box => (&box_filter, 0.5),
FilterType::Bilinear => (&bilinear_filter, 1.0),
FilterType::Hamming => (&hamming_filter, 1.0),
FilterType::CatmulRom => (&catmul_filter, 2.0),
FilterType::CatmullRom => (&catmul_filter, 2.0),
FilterType::Mitchell => (&mitchell_filter, 2.0),
FilterType::Lanczos3 => (&lanczos_filter, 3.0),
}