diff --git a/src/wand/magick.rs b/src/wand/magick.rs index f710a07..f4ad54b 100644 --- a/src/wand/magick.rs +++ b/src/wand/magick.rs @@ -715,6 +715,14 @@ impl MagickWand { Ok(bytes) } + pub fn set_image_gray (&self) -> Result<(), &'static str> { + let result = unsafe { bindings::SetImageGray(self.wand) }; + match result { + MagickBooleanType_MagickTrue => Ok(()), + _ => Err("Couldn't set image to gray") + } + } + mutations!( /// Set the image colorspace, transforming (unlike `set_image_colorspace`) image data in /// the process.