[][src]Struct image::SubImage

pub struct SubImage<'a, I: 'a> { /* fields omitted */ }

A View into another image

Methods

impl<'a, I: GenericImage + 'static> SubImage<'a, I> where
    I::Pixel: 'static,
    <I::Pixel as Pixel>::Subpixel: 'static, 
[src]

pub fn new(
    image: &mut I,
    x: u32,
    y: u32,
    width: u32,
    height: u32
) -> SubImage<I>
[src]

Construct a new subimage

pub fn inner_mut(&mut self) -> &mut I[src]

Returns a mutable reference to the wrapped image.

pub fn change_bounds(&mut self, x: u32, y: u32, width: u32, height: u32)[src]

Change the coordinates of this subimage.

pub fn to_image(
    &self
) -> ImageBuffer<I::Pixel, Vec<<I::Pixel as Pixel>::Subpixel>>
[src]

Convert this subimage to an ImageBuffer

Trait Implementations

impl<'a, I: GenericImage + 'static> GenericImage for SubImage<'a, I> where
    I::Pixel: 'static,
    <I::Pixel as Pixel>::Subpixel: 'static, 
[src]

type Pixel = I::Pixel

The type of pixel.

fn blend_pixel(&mut self, x: u32, y: u32, pixel: I::Pixel)[src]

DEPRECATED: This method will be removed. Blend the pixel directly instead.

Auto Trait Implementations

impl<'a, I> Send for SubImage<'a, I> where
    I: Send

impl<'a, I> Sync for SubImage<'a, I> where
    I: Sync

impl<'a, I> Unpin for SubImage<'a, I>

impl<'a, I> !UnwindSafe for SubImage<'a, I>

impl<'a, I> RefUnwindSafe for SubImage<'a, I> where
    I: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T[src]