Fix documentation test

This commit is contained in:
5ohue
2024-05-11 21:43:37 +03:00
parent 1f865a1c43
commit f83daebe16

View File

@ -70,8 +70,8 @@ wand_common!(
/// When the `MagickWand` is dropped, the ImageMagick wand will be
/// destroyed as well.
impl MagickWand {
pub fn new_image(&self, columns: usize, rows: usize, pixel_wand: &PixelWand) -> Result<()> {
match unsafe { bindings::MagickNewImage(self.wand, columns.into(), rows.into(), pixel_wand.wand) } {
pub fn new_image(&self, columns: usize, rows: usize, background: &PixelWand) -> Result<()> {
match unsafe { bindings::MagickNewImage(self.wand, columns.into(), rows.into(), background.wand) } {
MagickTrue => Ok(()),
_ => Err(MagickError("Could not create image")),
}
@ -694,8 +694,11 @@ impl MagickWand {
/// using imagemagick cli.
///
/// ```
/// use magick_rust::{MagickWand, PixelWand, CompositeOperator};
///
/// fn main() -> Result<(), magick_rust::MagickError> {
/// let mut wand1 = MagickWand::new();
/// wand1.read_image("test.jpg")?;
/// wand1.new_image(4, 4, &PixelWand::new())?;
/// let wand2 = wand1.clone();
///
/// wand1.median_blur_image(10, 10)?;
@ -703,7 +706,8 @@ impl MagickWand {
/// wand1.set_image_artifact("compose:args", "50")?;
/// wand1.compose_images(&wand2, CompositeOperator::Blend, false, 0, 0)?;
///
/// wand1.write_image("res.jpeg")?;
/// Ok(())
/// }
/// ```
pub fn set_image_artifact(
&mut self,