Skip to main content

ImageRef

Struct ImageRef 

Source
pub struct ImageRef<'a> { /* private fields */ }
Expand description

A handle to a single frame for read-only access.

Each accessor pins the wand’s iterator to this frame and then reads, so the returned values always correspond to this frame regardless of what other frames are touched in between. Unlike ImageMut, this handle deliberately does not deref to MagickWand: doing so would both expose the wand’s image-mutating methods (defeating the read-only contract) and hand out a &MagickWand that silently goes stale once another frame is accessed.

Implementations§

Source§

impl ImageRef<'_>

Source

pub fn get_image_width(&self) -> usize

Read this frame’s value; see MagickWand::get_image_width.

Source

pub fn get_image_height(&self) -> usize

Read this frame’s value; see MagickWand::get_image_height.

Source

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

Read this frame’s value; see MagickWand::get_image_page.

Source

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

Read this frame’s value; see MagickWand::get_image_resolution.

Source

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

Read this frame’s value; see MagickWand::get_image_range.

Source

pub fn get_image_colors(&self) -> usize

Read this frame’s value; see MagickWand::get_image_colors.

Source

pub fn get_image_alpha_channel(&self) -> bool

Read this frame’s value; see MagickWand::get_image_alpha_channel.

Source

pub fn get_image_virtual_pixel_method(&self) -> VirtualPixelMethod

Read this frame’s value; see MagickWand::get_image_virtual_pixel_method.

Source

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

Read this frame’s value; see MagickWand::get_image_pixel_color.

Source

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

Read this frame’s value; see MagickWand::get_image_histogram.

Source

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

Read this frame’s value; see MagickWand::get_image_artifact.

Source

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

Read this frame’s value; see MagickWand::get_image_artifacts.

Source

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

Read this frame’s value; see MagickWand::get_image_property.

Source

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

Read this frame’s value; see MagickWand::get_image_properties.

Source

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

Read this frame’s value; see MagickWand::get_image_format.

Source

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

Read this frame’s value; see MagickWand::get_image_filename.

Source

pub fn get_image_compose(&self) -> CompositeOperator

Read this frame’s value; see MagickWand::get_image_compose.

Source

pub fn get_image_colorspace(&self) -> ColorspaceType

Read this frame’s value; see MagickWand::get_image_colorspace.

Source

pub fn get_image_compression(&self) -> CompressionType

Read this frame’s value; see MagickWand::get_image_compression.

Source

pub fn get_image_compression_quality(&self) -> usize

Read this frame’s value; see MagickWand::get_image_compression_quality.

Source

pub fn get_image_delay(&self) -> usize

Read this frame’s value; see MagickWand::get_image_delay.

Source

pub fn get_image_depth(&self) -> usize

Read this frame’s value; see MagickWand::get_image_depth.

Source

pub fn get_image_dispose(&self) -> DisposeType

Read this frame’s value; see MagickWand::get_image_dispose.

Source

pub fn get_image_endian(&self) -> EndianType

Read this frame’s value; see MagickWand::get_image_endian.

Source

pub fn get_image_fuzz(&self) -> f64

Read this frame’s value; see MagickWand::get_image_fuzz.

Source

pub fn get_image_gamma(&self) -> f64

Read this frame’s value; see MagickWand::get_image_gamma.

Source

pub fn get_image_gravity(&self) -> GravityType

Read this frame’s value; see MagickWand::get_image_gravity.

Source

pub fn get_image_interlace_scheme(&self) -> InterlaceType

Read this frame’s value; see MagickWand::get_image_interlace_scheme.

Source

pub fn get_image_interpolate_method(&self) -> PixelInterpolateMethod

Read this frame’s value; see MagickWand::get_image_interpolate_method.

Source

pub fn get_image_iterations(&self) -> usize

Read this frame’s value; see MagickWand::get_image_iterations.

Source

pub fn get_image_orientation(&self) -> OrientationType

Read this frame’s value; see MagickWand::get_image_orientation.

Source

pub fn get_image_rendering_intent(&self) -> RenderingIntent

Read this frame’s value; see MagickWand::get_image_rendering_intent.

Source

pub fn get_image_scene(&self) -> usize

Read this frame’s value; see MagickWand::get_image_scene.

Source

pub fn get_image_type(&self) -> ImageType

Read this frame’s value; see MagickWand::get_image_type.

Source

pub fn get_image_units(&self) -> ResolutionType

Read this frame’s value; see MagickWand::get_image_units.

Source§

impl ImageRef<'_>

Source

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

Borrow this frame as an Image, e.g. for MagickWand::new_from_image.

The returned Image captures this frame’s underlying image pointer, so it remains valid even if the wand’s iterator is later moved to another frame.

Auto Trait Implementations§

§

impl<'a> Freeze for ImageRef<'a>

§

impl<'a> RefUnwindSafe for ImageRef<'a>

§

impl<'a> !Send for ImageRef<'a>

§

impl<'a> !Sync for ImageRef<'a>

§

impl<'a> Unpin for ImageRef<'a>

§

impl<'a> UnsafeUnpin for ImageRef<'a>

§

impl<'a> UnwindSafe for ImageRef<'a>

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.