Merge pull request #55 from max-frai/master

Add gaussian blur function
This commit is contained in:
Nathan Fiedler
2020-01-09 09:15:13 -08:00
committed by GitHub

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. /// Adaptively resize the currently selected image.
pub fn adaptive_resize_image(&self, width: usize, height: usize) -> Result<(), &'static str> { pub fn adaptive_resize_image(&self, width: usize, height: usize) -> Result<(), &'static str> {
match unsafe { bindings::MagickAdaptiveResizeImage(self.wand, width, height) } { match unsafe { bindings::MagickAdaptiveResizeImage(self.wand, width, height) } {