Add gaussian blur function

This commit is contained in:
42 2020-01-07 20:53:10 +02:00
parent 66397e6abc
commit fe9b6f805d

View file

@ -286,6 +286,14 @@ impl MagickWand {
}
}
pub fn gaussian_blur_image(&self, radius: f64, sigma: f64) -> Result<(), &'static str> {
let result = unsafe { bindings::MagickGaussianBlurImage(self.wand, radius, sigma) };
match result {
bindings::MagickBooleanType_MagickTrue => Ok(()),
_ => Err("failed to blur image"),
}
}
/// Adaptively resize the currently selected image.
pub fn adaptive_resize_image(&self, width: usize, height: usize) -> Result<(), &'static str> {
match unsafe { bindings::MagickAdaptiveResizeImage(self.wand, width, height) } {