feat: hald clut image

This commit is contained in:
Daniel Rönnkvist
2020-04-22 15:13:15 +02:00
parent fefc89387d
commit 41a62dd221

View File

@ -243,6 +243,14 @@ impl MagickWand {
} }
} }
pub fn hald_clut_image(&self, clut_wand: &MagickWand) -> Result<(), &'static str> {
let result = unsafe { bindings::MagickHaldClutImage(self.wand, clut_wand.wand) };
match result {
bindings::MagickBooleanType_MagickTrue => Ok(()),
_ => Err("failed to replace colors in the image from color lookup table"),
}
}
pub fn fx(&mut self, expression: &str) -> MagickWand { pub fn fx(&mut self, expression: &str) -> MagickWand {
let c_expression = CString::new(expression).unwrap(); let c_expression = CString::new(expression).unwrap();
let wand = unsafe { bindings::MagickFxImage(self.wand, c_expression.as_ptr()) }; let wand = unsafe { bindings::MagickFxImage(self.wand, c_expression.as_ptr()) };