From a10b98a790b0f577a15f4c6cdbf0d7024838ee44 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Fri, 25 May 2018 19:32:45 -0400 Subject: [PATCH] Binding for adaptive_resize_image --- src/wand/magick.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/wand/magick.rs b/src/wand/magick.rs index 15e0a56..4888ed3 100644 --- a/src/wand/magick.rs +++ b/src/wand/magick.rs @@ -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> {