Binding for adaptive_resize_image

This commit is contained in:
Nat Quayle Nelson 2018-05-25 19:32:45 -04:00
parent f694737ac5
commit a10b98a790

View file

@ -239,6 +239,14 @@ impl MagickWand {
}
}
/// 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)} {
bindings::MagickBooleanType::MagickTrue => Ok(()),
_ => Err("failed to adaptive-resize image")
}
}
/// Rotate the currently selected image by the given number of degrees,
/// filling any empty space with the background color of a given PixelWand
pub fn rotate_image(&self, background: &PixelWand, degrees: f64) -> Result<(), &'static str> {