Merge pull request #59 from Storykit/feature/set-image-gray

feat: set_image_gray
This commit is contained in:
Nathan Fiedler
2020-04-21 06:49:13 -07:00
committed by GitHub

View File

@ -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.