adding docs & rotate_image
This commit is contained in:
@ -66,6 +66,7 @@ impl MagickWand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Add all images from another wand to this wand at the current index.
|
||||||
pub fn add_image(&mut self, other_wand: &MagickWand) -> Result<(), &'static str> {
|
pub fn add_image(&mut self, other_wand: &MagickWand) -> Result<(), &'static str> {
|
||||||
match unsafe { bindings::MagickAddImage(self.wand, other_wand.wand) } {
|
match unsafe { bindings::MagickAddImage(self.wand, other_wand.wand) } {
|
||||||
bindings::MagickBooleanType::MagickTrue => Ok(()),
|
bindings::MagickBooleanType::MagickTrue => Ok(()),
|
||||||
@ -238,6 +239,15 @@ impl MagickWand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 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> {
|
||||||
|
match unsafe { bindings::MagickRotateImage(self.wand, background.wand, degrees) } {
|
||||||
|
bindings::MagickBooleanType::MagickTrue => Ok(()),
|
||||||
|
_ => Err("failed to rotate image")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Trim the image removing the backround color from the edges.
|
/// Trim the image removing the backround color from the edges.
|
||||||
pub fn trim_image(&self, fuzz: f64) -> Result<(), &'static str> {
|
pub fn trim_image(&self, fuzz: f64) -> Result<(), &'static str> {
|
||||||
let result = unsafe {
|
let result = unsafe {
|
||||||
|
|||||||
Reference in New Issue
Block a user