Add set_image_mask function
This commit is contained in:
@ -51,6 +51,7 @@ use crate::{
|
||||
MorphologyMethod,
|
||||
OrientationType,
|
||||
PixelInterpolateMethod,
|
||||
PixelMask,
|
||||
RenderingIntent,
|
||||
ResolutionType,
|
||||
ResourceType,
|
||||
@ -1239,6 +1240,27 @@ impl MagickWand {
|
||||
}
|
||||
}
|
||||
|
||||
/// Sets image clip mask.
|
||||
///
|
||||
/// * `pixel_mask`: type of mask, Read or Write.
|
||||
/// * `clip_mask`: the clip_mask wand.
|
||||
pub fn set_image_mask(
|
||||
&mut self,
|
||||
pixel_mask: PixelMask,
|
||||
clip_mask: &MagickWand
|
||||
) -> Result<()> {
|
||||
match unsafe {
|
||||
bindings::MagickSetImageMask(
|
||||
self.wand,
|
||||
pixel_mask.into(),
|
||||
clip_mask.wand
|
||||
)
|
||||
} {
|
||||
MagickTrue => Ok(()),
|
||||
_ => Err(MagickError("failed to set image mask")),
|
||||
}
|
||||
}
|
||||
|
||||
/// Set image channel mask
|
||||
pub fn set_image_channel_mask(
|
||||
&mut self,
|
||||
|
||||
Reference in New Issue
Block a user