image: Use mipmaps for zoom-out and NN for zoom-in

Before we always used "linear" filtering. This gave
a harsh image with moire patterns when zooming out
and washed out images when zooming in.

Closes #68, #71

Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/125>
This commit is contained in:
Sophie Herold 2023-03-07 00:44:07 +01:00 • committed by Christopher Davis
parent 6d0c5a4665
commit 67207bb215
3 changed files with 73 additions and 41 deletions

View file

@ -27,6 +27,10 @@ impl ImageFormat {
ImageFormat::AnimatedGif | ImageFormat::AnimatedWebP | ImageFormat::AnimatedPng
)
}
pub fn is_svg(&self) -> bool {
matches!(self, Self::Svg)
}
}
impl std::fmt::Display for ImageFormat {