Adding binding for MagickAddImage

This commit is contained in:
Nat Quayle Nelson 2018-05-25 16:00:40 -04:00
parent f8e930e01e
commit ccda94221f
2 changed files with 8 additions and 0 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
*.swp
*.pyc
Cargo.lock
rust-bindgen

View file

@ -66,6 +66,13 @@ impl MagickWand {
}
}
pub fn add_image(&mut self, other_wand: &MagickWand) -> Result<(), &'static str> {
match unsafe { bindings::MagickAddImage(self.wand, other_wand.wand) } {
bindings::MagickBooleanType::MagickTrue => Ok(()),
_ => Err("unable to add images from another wand")
}
}
pub fn append_all(&mut self, stack: bool) -> MagickWand {
unsafe { bindings::MagickResetIterator(self.wand) };
MagickWand {