Bindings for MagickLevelImage

This commit is contained in:
Daniel Rönnkvist
2020-03-25 15:57:10 +01:00
parent 2c95cd7173
commit 5c5015a10e

View File

@ -251,6 +251,20 @@ impl MagickWand {
} }
} }
pub fn level_image(
&self,
black_point: f64,
gamma: f64,
white_point: f64,
) -> Result<(), &'static str> {
let result =
unsafe { bindings::MagickLevelImage(self.wand, black_point, gamma, white_point) };
match result {
bindings::MagickBooleanType_MagickTrue => Ok(()),
_ => Err("failed to set size of wand"),
}
}
/// Extend the image as defined by the geometry, gravity, and wand background color. Set the /// Extend the image as defined by the geometry, gravity, and wand background color. Set the
/// (x,y) offset of the geometry to move the original wand relative to the extended wand. /// (x,y) offset of the geometry to move the original wand relative to the extended wand.
pub fn extend_image( pub fn extend_image(