Skip to content

Commit

Permalink
Merge pull request #43 from NQNStudios/resize
Browse files Browse the repository at this point in the history
Binding for adaptive_resize_image
  • Loading branch information
nlfiedler authored May 27, 2018
2 parents 5c28533 + a10b98a commit 1498f7a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/wand/magick.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,14 @@ impl MagickWand {
}
}

/// Adaptively resize the currently selected image.
pub fn adaptive_resize_image(&self, width: usize, height: usize) -> Result<(), &'static str> {
match unsafe { bindings::MagickAdaptiveResizeImage(self.wand, width, height)} {
bindings::MagickBooleanType::MagickTrue => Ok(()),
_ => Err("failed to adaptive-resize image")
}
}

/// 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> {
Expand Down

0 comments on commit 1498f7a

Please sign in to comment.