diff --git a/src/wand/magick.rs b/src/wand/magick.rs index f710a07..25b579e 100644 --- a/src/wand/magick.rs +++ b/src/wand/magick.rs @@ -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 /// (x,y) offset of the geometry to move the original wand relative to the extended wand. pub fn extend_image(