Struct magick_rust::MagickWand

source ·
pub struct MagickWand {
    pub wand: *mut MagickWand,
}

Fields§

§wand: *mut MagickWand

Implementations§

source§

impl MagickWand

source§

impl MagickWand

MagickWand is a Rustic wrapper to the Rust bindings to ImageMagick.

Instantiating a MagickWand will construct an ImageMagick “wand” on which operations can be performed via the MagickWand functions. When the MagickWand is dropped, the ImageMagick wand will be destroyed as well.

source

pub fn new_from_image(img: &Image<'_>) -> Result<MagickWand, MagickError>

Creates new wand by cloning the image.

  • img: the image.
source

pub fn new_image( &self, columns: usize, rows: usize, background: &PixelWand, ) -> Result<(), MagickError>

source

pub fn set_resource_limit( resource: ResourceType, limit: u64, ) -> Result<(), MagickError>

source

pub fn set_option(&mut self, key: &str, value: &str) -> Result<(), MagickError>

source

pub fn annotate_image( &mut self, drawing_wand: &DrawingWand, x: f64, y: f64, angle: f64, text: &str, ) -> Result<(), MagickError>

source

pub fn add_image(&mut self, other_wand: &MagickWand) -> Result<(), MagickError>

Add all images from another wand to this wand at the current index.

source

pub fn append_all(&mut self, stack: bool) -> Result<MagickWand, MagickError>

source

pub fn label_image(&self, label: &str) -> Result<(), MagickError>

source

pub fn write_images(&self, path: &str, adjoin: bool) -> Result<(), MagickError>

source

pub fn read_image(&self, path: &str) -> Result<(), MagickError>

Read the image data from the named file.

source

pub fn read_image_blob<T: AsRef<[u8]>>( &self, data: T, ) -> Result<(), MagickError>

Read the image data from the vector of bytes.

source

pub fn ping_image(&self, path: &str) -> Result<(), MagickError>

Same as read_image, but reads only the width, height, size and format of an image, without reading data.

source

pub fn ping_image_blob<T: AsRef<[u8]>>( &self, data: T, ) -> Result<(), MagickError>

Same as read_image, but reads only the width, height, size and format of an image, without reading data.

source

pub fn merge_image_layers( &self, method: LayerMethod, ) -> Result<MagickWand, MagickError>

Composes all the image layers from the current given image onward to produce a single image of the merged layers.

The inital canvas’s size depends on the given LayerMethod, and is initialized using the first images background color. The images are then composited onto that image in sequence using the given composition that has been assigned to each individual image.

  • method: the method of selecting the size of the initial canvas. MergeLayer: Merge all layers onto a canvas just large enough to hold all the actual images. The virtual canvas of the first image is preserved but otherwise ignored.

    FlattenLayer: Use the virtual canvas size of first image. Images which fall outside this canvas is clipped. This can be used to ‘fill out’ a given virtual canvas.

    MosaicLayer: Start with the virtual canvas of the first image, enlarging left and right edges to contain all images. Images with negative offsets will be clipped.

source

pub fn get_number_images(&self) -> usize

Returns the number of images associated with a magick wand.

source

pub fn compare_images( &self, reference: &MagickWand, metric: MetricType, ) -> (f64, Option<MagickWand>)

Compare two images and return tuple (distortion, diffImage) diffImage is None if distortion == 0

source

pub fn compose_images( &self, reference: &MagickWand, composition_operator: CompositeOperator, clip_to_self: bool, x: isize, y: isize, ) -> Result<(), MagickError>

Compose another image onto self at (x, y) using composition_operator

source

pub fn compose_images_gravity( &self, reference: &MagickWand, composition_operator: CompositeOperator, gravity_type: GravityType, ) -> Result<(), MagickError>

Compose another image onto self with gravity using composition_operator

source

pub fn coalesce(&mut self) -> Result<MagickWand, MagickError>

Rebuilds image sequence with each frame size the same as first frame, and composites each frame atop of previous. Only affects GIF, and other formats with multiple pages/layers.

source

pub fn clut_image( &self, clut_wand: &MagickWand, method: PixelInterpolateMethod, ) -> Result<(), MagickError>

source

pub fn hald_clut_image(&self, clut_wand: &MagickWand) -> Result<(), MagickError>

source

pub fn fx(&mut self, expression: &str) -> Result<MagickWand, MagickError>

source

pub fn set_size(&self, columns: usize, rows: usize) -> Result<(), MagickError>

source

pub fn level_image( &self, black_point: f64, gamma: f64, white_point: f64, ) -> Result<(), MagickError>

source

pub fn levelize_image( &self, black_point: f64, gamma: f64, white_point: f64, ) -> Result<(), MagickError>

Applies the reversed level_image. It compresses the full range of color values, so that they lie between the given black and white points. Gamma is applied before the values are mapped. It can be used to de-contrast a greyscale image to the exact levels specified.

source

pub fn normalize_image(&self) -> Result<(), MagickError>

source

pub fn ordered_dither_image( &self, threshold_map: &str, ) -> Result<(), MagickError>

source

pub fn sigmoidal_contrast_image( &self, sharpen: bool, strength: f64, midpoint: f64, ) -> Result<(), MagickError>

Apply sigmoidal contrast to the image

Adjusts the contrast of an image with a non-linear sigmoidal contrast algorithm. Increase the contrast of the image using a sigmoidal transfer function without saturating highlights or shadows. Contrast indicates how much to increase the contrast (0 is none; 3 is typical; 20 is pushing it); mid-point indicates where midtones fall in the resultant image (0.0 is white; 0.5 is middle-gray; 1.0 is black). Set sharpen to true to increase the image contrast otherwise the contrast is reduced.

  • sharpen: increase or decrease image contrast
  • strength: strength of the contrast, the larger the number the more ‘threshold-like’ it becomes.
  • midpoint: midpoint of the function as a number in range [0, 1]
source

pub fn extend_image( &self, width: usize, height: usize, x: isize, y: isize, ) -> Result<(), MagickError>

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.

source

pub fn profile_image<'a, T: Into<Option<&'a [u8]>>>( &self, name: &str, profile: T, ) -> Result<(), MagickError>

source

pub fn strip_image(&self) -> Result<(), MagickError>

source

pub fn flip_image(&self) -> Result<(), MagickError>

source

pub fn negate_image(&self) -> Result<(), MagickError>

source

pub fn flop_image(&self) -> Result<(), MagickError>

source

pub fn blur_image(&self, radius: f64, sigma: f64) -> Result<(), MagickError>

source

pub fn gaussian_blur_image( &self, radius: f64, sigma: f64, ) -> Result<(), MagickError>

source

pub fn statistic_image( &self, statistic_type: StatisticType, width: usize, height: usize, ) -> Result<(), MagickError>

Replace each pixel with corresponding statistic from the neighborhood of the specified width and height.

  • statistic_type: the statistic type (e.g. StatisticType::Median, StatisticType::Mode, etc.).
  • width: the width of the pixel neighborhood.
  • height: the height of the pixel neighborhood.
source

pub fn median_blur_image( &self, width: usize, height: usize, ) -> Result<(), MagickError>

Calculate median for each pixel’s neighborhood.

See statistic_image

source

pub fn adaptive_resize_image( &self, width: usize, height: usize, ) -> Result<(), MagickError>

Adaptively resize the currently selected image.

source

pub fn rotate_image( &self, background: &PixelWand, degrees: f64, ) -> Result<(), MagickError>

Rotate the currently selected image by the given number of degrees, filling any empty space with the background color of a given PixelWand

source

pub fn trim_image(&self, fuzz: f64) -> Result<(), MagickError>

Trim the image removing the backround color from the edges.

source

pub fn get_image_width(&self) -> usize

Retrieve the width of the image.

source

pub fn get_image_height(&self) -> usize

Retrieve the height of the image.

source

pub fn get_image_page(&self) -> (usize, usize, isize, isize)

Retrieve the page geometry (width, height, x offset, y offset) of the image.

source

pub fn reset_image_page(&self, page_geometry: &str) -> Result<(), MagickError>

Reset the Wand page canvas and position.

source

pub fn get_image_artifact(&self, artifact: &str) -> Result<String, MagickError>

Returns a value associated with the specified artifact.

  • artifact: the artifact.
source

pub fn get_image_artifacts( &self, pattern: &str, ) -> Result<Vec<String>, MagickError>

source

pub fn set_image_artifact( &mut self, artifact: &str, value: &str, ) -> Result<(), MagickError>

Sets a key-value pair in the image artifact namespace. Artifacts differ from properties. Properties are public and are generally exported to an external image format if the format supports it. Artifacts are private and are utilized by the internal ImageMagick API to modify the behavior of certain algorithms.

  • artifact: the artifact.
  • value: the value.
§Example

This example shows how you can blend an image with its blurred copy with 50% opacity by setting “compose:args” to “50”. This is equivalent to having -define compose:args=50 when using imagemagick cli.

use magick_rust::{MagickWand, PixelWand, CompositeOperator};

fn main() -> Result<(), magick_rust::MagickError> {
    let mut wand1 = MagickWand::new();
    wand1.new_image(4, 4, &PixelWand::new())?; // Replace with `read_image` to open your image file
    let wand2 = wand1.clone();

    wand1.median_blur_image(10, 10)?;

    wand1.set_image_artifact("compose:args", "50")?;
    wand1.compose_images(&wand2, CompositeOperator::Blend, false, 0, 0)?;

    Ok(())
}
source

pub fn delete_image_artifact( &mut self, artifact: &str, ) -> Result<(), MagickError>

Deletes a wand artifact.

  • artifact: the artifact.
source

pub fn get_image_property(&self, name: &str) -> Result<String, MagickError>

Retrieve the named image property value.

source

pub fn get_image_properties( &self, pattern: &str, ) -> Result<Vec<String>, MagickError>

source

pub fn set_image_property( &self, name: &str, value: &str, ) -> Result<(), MagickError>

Set the named image property.

source

pub fn get_image_pixel_color(&self, x: isize, y: isize) -> Option<PixelWand>

Returns a PixelWand instance for the pixel specified by x and y offests.

source

pub fn set_sampling_factors( &self, samplingFactors: &[f64], ) -> Result<(), MagickError>

Sets the image sampling factors.

samplingFactors: An array of floats representing the sampling factor for each color component (in RGB order).

source

pub fn get_image_histogram(&self) -> Option<Vec<PixelWand>>

Returns the image histogram as a vector of PixelWand instances for every unique color.

source

pub fn sharpen_image(&self, radius: f64, sigma: f64) -> Result<(), MagickError>

Sharpens an image. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, the radius should be larger than sigma. Use a radius of 0 and SharpenImage() selects a suitable radius for you.

radius: the radius of the Gaussian, in pixels, not counting the center pixel.

sigma: the standard deviation of the Gaussian, in pixels.

source

pub fn set_background_color( &self, pixel_wand: &PixelWand, ) -> Result<(), MagickError>

Set the background color.

source

pub fn set_image_background_color( &self, pixel_wand: &PixelWand, ) -> Result<(), MagickError>

Set the image background color.

source

pub fn get_image_resolution(&self) -> Result<(f64, f64), MagickError>

Returns the image resolution as a pair (horizontal resolution, vertical resolution)

source

pub fn set_image_resolution( &self, x_resolution: f64, y_resolution: f64, ) -> Result<(), MagickError>

Sets the image resolution

source

pub fn set_resolution( &self, x_resolution: f64, y_resolution: f64, ) -> Result<(), MagickError>

Sets the wand resolution

source

pub fn sepia_tone_image(&self, threshold: f64) -> Result<(), MagickError>

Returns the image resolution as a pair (horizontal resolution, vertical resolution)

source

pub fn export_image_pixels( &self, x: isize, y: isize, width: usize, height: usize, map: &str, ) -> Option<Vec<u8>>

Extracts pixel data from the image as a vector of 0..255 values defined by map. See https://imagemagick.org/api/magick-image.php#MagickExportImagePixels for more information.

source

pub fn export_image_pixels_double( &self, x: isize, y: isize, width: usize, height: usize, map: &str, ) -> Option<Vec<f64>>

source

pub fn resize_image( &self, width: usize, height: usize, filter: FilterType, ) -> Result<(), MagickError>

Resize the image to the specified width and height, using the specified filter type.

source

pub fn scale_image( &self, width_scale: f64, height_scale: f64, filter: FilterType, ) -> Result<(), MagickError>

Resize image by specifying the new size in percent of last size.

Effectively resizes image to (current width * width_scale, current height * height_scale)

source

pub fn thumbnail_image( &self, width: usize, height: usize, ) -> Result<(), MagickError>

Resize the image to the specified width and height, using the ‘thumbnail’ optimizations which remove a lot of image meta-data with the goal of producing small low cost images suited for display on the web.

source

pub fn crop_image( &self, width: usize, height: usize, x: isize, y: isize, ) -> Result<(), MagickError>

Extract a region of the image. The width and height is used as the size of the region. X and Y is the offset.

source

pub fn sample_image( &self, width: usize, height: usize, ) -> Result<(), MagickError>

Sample the image to the target resolution

This is incredibly fast, as it does 1-1 pixel mapping for downscales, and box filtering for upscales

source

pub fn resample_image( &self, x_resolution: f64, y_resolution: f64, filter: FilterType, ) -> Result<(), MagickError>

Resample the image to the specified horizontal and vertical resolution, using the specified filter type.

source

pub fn liquid_rescale_image( &self, width: usize, height: usize, delta_x: f64, rigidity: f64, ) -> Result<(), MagickError>

Rescale the image using seam carving algorithm

source

pub fn implode( &self, amount: f64, method: PixelInterpolateMethod, ) -> Result<(), MagickError>

Implodes the image towards the center by the specified percentage

source

pub fn fit(&self, width: usize, height: usize)

Resize the image to fit within the given dimensions, maintaining the current aspect ratio.

source

pub fn requires_orientation(&self) -> bool

Detect if the loaded image is not in top-left orientation, and hence should be “auto” oriented so it is suitable for viewing.

source

pub fn auto_orient(&self) -> bool

Automatically adjusts the loaded image so that its orientation is suitable for viewing (i.e. top-left orientation).

Returns true if successful or false if an error occurred.

source

pub fn write_image(&self, path: &str) -> Result<(), MagickError>

Write the current image to the provided path.

source

pub fn write_image_blob(&self, format: &str) -> Result<Vec<u8>, MagickError>

Write the image in the desired format to a new blob.

The format argument may be any ImageMagick supported image format (e.g. GIF, JPEG, PNG, etc).

source

pub fn write_images_blob(&self, format: &str) -> Result<Vec<u8>, MagickError>

Write the images in the desired format to a new blob.

The format argument may be any ImageMagick supported image format (e.g. GIF, JPEG, PNG, etc).

source

pub fn get_image_alpha_channel(&self) -> bool

Return false if the image alpha channel is not activated. That is, the image is RGB rather than RGBA or CMYK rather than CMYKA

source

pub fn draw_image( &mut self, drawing_wand: &DrawingWand, ) -> Result<(), MagickError>

Renders the drawing wand on the current image

source

pub fn deskew_image(&mut self, threshold: f64) -> Result<(), MagickError>

Removes skew from the image. Skew is an artifact that occurs in scanned images because of the camera being misaligned, imperfections in the scanning or surface, or simply because the paper was not placed completely flat when scanned

source

pub fn set_image_mask( &mut self, pixel_mask: PixelMask, clip_mask: &MagickWand, ) -> Result<(), MagickError>

Sets image clip mask.

  • pixel_mask: type of mask, Read or Write.
  • clip_mask: the clip_mask wand.
source

pub fn set_image_channel_mask(&mut self, option: ChannelType) -> ChannelType

Set image channel mask

source

pub fn evaluate_image( &mut self, op: MagickEvaluateOperator, val: f64, ) -> Result<(), MagickError>

Apply an arithmetic, relational, or logical expression to an image. Use these operators to lighten or darken an image, to increase or decrease contrast in an image, or to produce the “negative” of an image.

source

pub fn border_image( &self, pixel_wand: &PixelWand, width: usize, height: usize, compose: CompositeOperator, ) -> Result<(), MagickError>

Surround the image with a border of the color defined by the pixel_wand.

source

pub fn shadow_image( &self, alpha: f64, sigma: f64, x: isize, y: isize, ) -> Result<(), MagickError>

Simulate an image shadow

source

pub fn import_image_pixels( &mut self, x: isize, y: isize, columns: usize, rows: usize, pixels: &[u8], map: &str, ) -> Result<(), MagickError>

Accepts pixel data and stores it in the image at the location you specify. See https://imagemagick.org/api/magick-image.php#MagickImportImagePixels for more information.

source

pub fn import_image_pixels_double( &mut self, x: isize, y: isize, columns: usize, rows: usize, pixels: &[f64], map: &str, ) -> Result<(), MagickError>

source

pub fn set_first_iterator(&self)

Set the wand iterator to the first image. See https://imagemagick.org/api/magick-wand.php#MagickSetFirstIterator for more information.

source

pub fn next_image(&self) -> bool

Set the next image in the wand as the current image. See https://imagemagick.org/api/magick-image.php#MagickNextImage for more information.

source

pub fn auto_threshold( &self, method: AutoThresholdMethod, ) -> Result<(), MagickError>

Automatically performs threshold method to reduce grayscale data down to a binary black & white image. Included algorithms are Kapur, Otsu, and Triangle methods. See https://imagemagick.org/api/magick-image.php#MagickAutoThresholdImage for more information.

source

pub fn transform_image_colorspace( &self, colorspace: ColorspaceType, ) -> Result<(), MagickError>

Set the image colorspace, transforming (unlike set_image_colorspace) image data in the process.

source

pub fn quantize_image( &self, number_of_colors: usize, colorspace: ColorspaceType, tree_depth: usize, dither_method: DitherMethod, measure_error: bool, ) -> Result<(), MagickError>

Reduce the number of colors in the image.

source

pub fn quantize_images( &self, number_of_colors: usize, colorspace: ColorspaceType, tree_depth: usize, dither_method: DitherMethod, measure_error: bool, ) -> Result<(), MagickError>

Reduce the number of colors in the images.

source

pub fn function_image( &self, function: MagickFunction, args: &[f64], ) -> Result<(), MagickError>

Applies an arithmetic, relational, or logical expression to an image. Use these operators to lighten or darken an image, to increase or decrease contrast in an image, or to produce the “negative” of an image.

  • function: the image function.
  • args: the function arguments.
§Example

This example show how you can apply smoothstep function (a polynomial -2x^3 + 3x^2) to every image pixel.

use magick_rust::{MagickWand, PixelWand, MagickFunction};

fn main() -> Result<(), magick_rust::MagickError> {
    let mut wand1 = MagickWand::new();
    wand1.new_image(4, 4, &PixelWand::new())?; // Replace with `read_image` to open your image file

    // Apply smoothstep polynomial
    wand1.function_image(MagickFunction::Polynomial, &[-2.0, 3.0, 0.0, 0.0])?;

    Ok(())
}
source

pub fn polynomial_image(&self, terms: &[f64]) -> Result<(), MagickError>

Returns an image where each pixel is the sum of the pixels in the image sequence after applying its corresponding terms (coefficient and degree pairs).

  • terms: the list of polynomial coefficients and degree pairs and a constant.
source

pub fn convolve_image( &self, kernel_info: &KernelInfo, ) -> Result<(), MagickError>

Applies a custom convolution kernel to the image.

  • kernel_info: An array of doubles representing the convolution kernel.
source

pub fn morphology_image( &self, morphology_method: MorphologyMethod, iterations: isize, kernel_info: &KernelInfo, ) -> Result<(), MagickError>

Applies a user supplied kernel to the image according to the given morphology method.

  • morphology_method: the morphology method to be applied.
  • iterations: apply the operation this many times (or no change). A value of -1 means loop until no change found. How this is applied may depend on the morphology method. Typically this is a value of 1.
  • kernel_info: An array of doubles representing the morphology kernel.
source

pub fn color_matrix_image( &self, color_matrix: &KernelInfo, ) -> Result<(), MagickError>

Apply color transformation to an image. The method permits saturation changes, hue rotation, luminance to alpha, and various other effects. Although variable-sized transformation matrices can be used, typically one uses a 5x5 matrix for an RGBA image and a 6x6 for CMYKA (or RGBA with offsets). The matrix is similar to those used by Adobe Flash except offsets are in column 6 rather than 5 (in support of CMYKA images) and offsets are normalized (divide Flash offset by 255).

  • color_matrix: the color matrix.
source

pub fn channel_fx_image( &self, expression: &str, ) -> Result<MagickWand, MagickError>

Applies a channel expression to the specified image. The expression consists of one or more channels, either mnemonic or numeric (e.g. red, 1), separated by actions as follows:

<=> exchange two channels (e.g. red<=>blue) => transfer a channel to another (e.g. red=>green) , separate channel operations (e.g. red, green) | read channels from next input image (e.g. red | green) ; write channels to next output image (e.g. red; green; blue) A channel without a operation symbol implies extract. For example, to create 3 grayscale images from the red, green, and blue channels of an image, use:

  • expression: the expression.
source

pub fn combine_images( &self, colorspace: ColorspaceType, ) -> Result<MagickWand, MagickError>

Combines one or more images into a single image. The grayscale value of the pixels of each image in the sequence is assigned in order to the specified channels of the combined image. The typical ordering would be image 1 => Red, 2 => Green, 3 => Blue, etc.

  • colorspace: the colorspace.
source

pub fn get_image<'wand>(&'wand self) -> Result<Image<'wand>, MagickError>

Returns the current image from the magick wand.

source

pub fn set_image_alpha(&self, alpha: f64) -> Result<(), MagickError>

Sets the image to the specified alpha level.

source

pub fn modulate_image( &self, brightness: f64, saturation: f64, hue: f64, ) -> Result<(), MagickError>

Control the brightness, saturation, and hue of an image

source

pub fn brightness_contrast_image( &self, brightness: f64, contrast: f64, ) -> Result<(), MagickError>

Control the brightness and contrast

source

pub fn set_image_alpha_channel( &self, alpha_channel: AlphaChannelOption, ) -> Result<(), MagickError>

Set the image alpha channel mode.

source

pub fn unique_image_colors(&self) -> Result<(), MagickError>

Discard all but one of any pixel color.

source

pub fn kmeans( &self, number_colors: usize, max_iterations: usize, tolerance: f64, ) -> Result<(), MagickError>

Applies k-means color reduction to the image.

source

pub fn auto_gamma(&self) -> Result<(), MagickError>

Extracts the ‘mean’ from the image and adjust the image to try make set its gamma appropriately.

source

pub fn auto_level(&self) -> Result<(), MagickError>

Adjusts the levels of a particular image channel by scaling the minimum and maximum values to the full quantum range.

source

pub fn get_image_colors(&self) -> usize

source

pub fn get_filename(&self) -> Result<String, MagickError>

source

pub fn set_filename(&mut self, s: &str) -> Result<(), MagickError>

source

pub fn get_font(&self) -> Result<String, MagickError>

source

pub fn set_font(&mut self, s: &str) -> Result<(), MagickError>

source

pub fn get_format(&self) -> Result<String, MagickError>

source

pub fn set_format(&mut self, s: &str) -> Result<(), MagickError>

source

pub fn get_image_filename(&self) -> Result<String, MagickError>

source

pub fn set_image_filename(&mut self, s: &str) -> Result<(), MagickError>

source

pub fn get_image_format(&self) -> Result<String, MagickError>

source

pub fn set_image_format(&mut self, s: &str) -> Result<(), MagickError>

source

pub fn fmt_string_settings(&self, f: &mut Formatter<'_>, prefix: &str) -> Result

source

pub fn get_colorspace(&self) -> ColorspaceType

source

pub fn set_colorspace(&mut self, v: ColorspaceType) -> Result<(), MagickError>

source

pub fn get_image_compose(&self) -> CompositeOperator

source

pub fn set_image_compose( &mut self, v: CompositeOperator, ) -> Result<(), MagickError>

source

pub fn get_compression(&self) -> CompressionType

source

pub fn set_compression(&mut self, v: CompressionType) -> Result<(), MagickError>

source

pub fn get_compression_quality(&self) -> usize

source

pub fn set_compression_quality(&mut self, v: usize) -> Result<(), MagickError>

source

pub fn get_gravity(&self) -> GravityType

source

pub fn set_gravity(&mut self, v: GravityType) -> Result<(), MagickError>

source

pub fn get_image_colorspace(&self) -> ColorspaceType

source

pub fn set_image_colorspace( &mut self, v: ColorspaceType, ) -> Result<(), MagickError>

source

pub fn get_image_compression(&self) -> CompressionType

source

pub fn set_image_compression( &mut self, v: CompressionType, ) -> Result<(), MagickError>

source

pub fn get_image_compression_quality(&self) -> usize

source

pub fn set_image_compression_quality( &mut self, v: usize, ) -> Result<(), MagickError>

source

pub fn get_image_delay(&self) -> usize

source

pub fn set_image_delay(&mut self, v: usize) -> Result<(), MagickError>

source

pub fn get_image_depth(&self) -> usize

source

pub fn set_image_depth(&mut self, v: usize) -> Result<(), MagickError>

source

pub fn get_image_dispose(&self) -> DisposeType

source

pub fn set_image_dispose(&mut self, v: DisposeType) -> Result<(), MagickError>

source

pub fn get_image_endian(&self) -> EndianType

source

pub fn set_image_endian(&mut self, v: EndianType) -> Result<(), MagickError>

source

pub fn get_image_fuzz(&self) -> f64

source

pub fn set_image_fuzz(&mut self, v: f64) -> Result<(), MagickError>

source

pub fn get_image_gamma(&self) -> f64

source

pub fn set_image_gamma(&mut self, v: f64) -> Result<(), MagickError>

source

pub fn get_image_gravity(&self) -> GravityType

source

pub fn set_image_gravity(&mut self, v: GravityType) -> Result<(), MagickError>

source

pub fn get_image_interlace_scheme(&self) -> InterlaceType

source

pub fn set_image_interlace_scheme( &mut self, v: InterlaceType, ) -> Result<(), MagickError>

source

pub fn get_image_interpolate_method(&self) -> PixelInterpolateMethod

source

pub fn set_image_interpolate_method( &mut self, v: PixelInterpolateMethod, ) -> Result<(), MagickError>

source

pub fn get_image_iterations(&self) -> usize

source

pub fn set_image_iterations(&mut self, v: usize) -> Result<(), MagickError>

source

pub fn get_image_orientation(&self) -> OrientationType

source

pub fn set_image_orientation( &mut self, v: OrientationType, ) -> Result<(), MagickError>

source

pub fn get_image_rendering_intent(&self) -> RenderingIntent

source

pub fn set_image_rendering_intent( &mut self, v: RenderingIntent, ) -> Result<(), MagickError>

source

pub fn get_image_scene(&self) -> usize

source

pub fn set_image_scene(&mut self, v: usize) -> Result<(), MagickError>

source

pub fn get_image_type(&self) -> ImageType

source

pub fn set_image_type(&mut self, v: ImageType) -> Result<(), MagickError>

source

pub fn get_image_units(&self) -> ResolutionType

source

pub fn set_image_units(&mut self, v: ResolutionType) -> Result<(), MagickError>

source

pub fn get_interlace_scheme(&self) -> InterlaceType

source

pub fn set_interlace_scheme( &mut self, v: InterlaceType, ) -> Result<(), MagickError>

source

pub fn get_interpolate_method(&self) -> PixelInterpolateMethod

source

pub fn set_interpolate_method( &mut self, v: PixelInterpolateMethod, ) -> Result<(), MagickError>

source

pub fn get_iterator_index(&self) -> isize

source

pub fn set_iterator_index(&mut self, v: isize) -> Result<(), MagickError>

source

pub fn get_orientation(&self) -> OrientationType

source

pub fn set_orientation(&mut self, v: OrientationType) -> Result<(), MagickError>

source

pub fn get_pointsize(&self) -> f64

source

pub fn set_pointsize(&mut self, v: f64) -> Result<(), MagickError>

source

pub fn get_type(&self) -> ImageType

source

pub fn set_type(&mut self, v: ImageType) -> Result<(), MagickError>

source

pub fn fmt_checked_settings( &self, f: &mut Formatter<'_>, prefix: &str, ) -> Result

Trait Implementations§

source§

impl Clone for MagickWand

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MagickWand

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for MagickWand

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl Send for MagickWand

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.