feat: MagickFxImage bindning
New macro to create a new wand from another wand.
This commit is contained in:
@ -29,6 +29,10 @@ macro_rules! wand_common {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_from_wand(wand: *mut ::bindings::$wand) -> Self {
|
||||
$wand { wand }
|
||||
}
|
||||
|
||||
fn clear(&mut self) {
|
||||
unsafe { ::bindings::$clear_wand(self.wand) }
|
||||
}
|
||||
|
||||
@ -243,6 +243,12 @@ impl MagickWand {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn fx(&mut self, expression: &str) -> MagickWand {
|
||||
let c_expression = CString::new(expression).unwrap();
|
||||
let wand = unsafe { bindings::MagickFxImage(self.wand, c_expression.as_ptr()) };
|
||||
MagickWand::new_from_wand(wand)
|
||||
}
|
||||
|
||||
pub fn set_size(&self, columns: size_t, rows: size_t) -> Result<(), &'static str> {
|
||||
let result = unsafe { bindings::MagickSetSize(self.wand, columns, rows) };
|
||||
match result {
|
||||
|
||||
Reference in New Issue
Block a user