add negate_image() operation

Signed-off-by: Nikola Pajkovsky <nikola.pajkovsky@livesporttv.cz>
This commit is contained in:
Nikola Pajkovsky
2020-05-21 12:07:47 +02:00
parent 92b12900ab
commit 415ad30bd0
2 changed files with 25 additions and 0 deletions

View File

@ -335,6 +335,16 @@ impl MagickWand {
}
}
pub fn negate_image(&self) -> Result<(), &'static str> {
let result = unsafe {
bindings::MagickNegateImage(self.wand, bindings::MagickBooleanType_MagickTrue)
};
match result {
bindings::MagickBooleanType_MagickTrue => Ok(()),
_ => Err("failed to flip image"),
}
}
pub fn flop_image(&self) -> Result<(), &'static str> {
let result = unsafe { bindings::MagickFlopImage(self.wand) };
match result {