[−][src]Struct ndarray_image::NdImage
This newtype struct can wrap an image from either the ndarray or image crates to
automatically allow them to be turned into() the equivalents in the other crate.
This works without copying.
Trait Implementations
impl<'a, C, A: 'static> Into<ArrayBase<ViewRepr<&'a A>, Dim<[usize; 2]>>> for NdImage<&'a ImageBuffer<Luma<A>, C>> where
A: Primitive,
C: Deref<Target = [A]> + AsRef<[A]>, [src]
A: Primitive,
C: Deref<Target = [A]> + AsRef<[A]>,
Turn grayscale images into 2d array views.
impl<'a, C, P: 'static, A: 'static> Into<ArrayBase<ViewRepr<&'a A>, Dim<[usize; 3]>>> for NdImage<&'a ImageBuffer<P, C>> where
A: Primitive,
P: Pixel<Subpixel = A>,
C: Deref<Target = [P::Subpixel]> + AsRef<[A]>, [src]
A: Primitive,
P: Pixel<Subpixel = A>,
C: Deref<Target = [P::Subpixel]> + AsRef<[A]>,
Turn arbitrary images into 3d array views with one dimension for the color channel.
impl<'a, C, A: 'static> Into<ArrayBase<ViewRepr<&'a mut A>, Dim<[usize; 2]>>> for NdImage<&'a mut ImageBuffer<Luma<A>, C>> where
A: Primitive,
C: Deref<Target = [A]> + AsRef<[A]>, [src]
A: Primitive,
C: Deref<Target = [A]> + AsRef<[A]>,
Turn grayscale images into mutable 2d array views.
impl<'a, C, P: 'static, A: 'static> Into<ArrayBase<ViewRepr<&'a mut A>, Dim<[usize; 3]>>> for NdImage<&'a mut ImageBuffer<P, C>> where
A: Primitive,
P: Pixel<Subpixel = A>,
C: Deref<Target = [P::Subpixel]> + AsRef<[A]>, [src]
A: Primitive,
P: Pixel<Subpixel = A>,
C: Deref<Target = [P::Subpixel]> + AsRef<[A]>,
Turn arbitrary images into mutable 3d array views with one dimension for the color channel.
fn into(self) -> NdColorMut<'a, A>[src]
impl<'a, A: 'static> Into<Option<ImageBuffer<Bgr<A>, &'a [A]>>> for NdImage<NdColor<'a, A>> where
A: Primitive, [src]
A: Primitive,
Turn 3d ArrayView into a Bgr image.
Can fail if the ArrayView is not contiguous or has the wrong number of channels.
impl<'a, A: 'static> Into<Option<ImageBuffer<Bgra<A>, &'a [A]>>> for NdImage<NdColor<'a, A>> where
A: Primitive, [src]
A: Primitive,
Turn 3d ArrayView into a Bgra image.
Can fail if the ArrayView is not contiguous or has the wrong number of channels.
impl<'a, A: 'static> Into<Option<ImageBuffer<Luma<A>, &'a [A]>>> for NdImage<NdGray<'a, A>> where
A: Primitive, [src]
A: Primitive,
Turn 2d ArrayView into a Luma image.
Can fail if the ArrayView is not contiguous.
impl<'a, A: 'static> Into<Option<ImageBuffer<Luma<A>, &'a [A]>>> for NdImage<NdColor<'a, A>> where
A: Primitive, [src]
A: Primitive,
Turn 3d ArrayView into a Luma image.
Can fail if the ArrayView is not contiguous or has the wrong number of channels.
impl<'a, A: 'static> Into<Option<ImageBuffer<LumaA<A>, &'a [A]>>> for NdImage<NdColor<'a, A>> where
A: Primitive, [src]
A: Primitive,
Turn 3d ArrayView into a LumaA image.
Can fail if the ArrayView is not contiguous or has the wrong number of channels.
impl<'a, A: 'static> Into<Option<ImageBuffer<Rgb<A>, &'a [A]>>> for NdImage<NdColor<'a, A>> where
A: Primitive, [src]
A: Primitive,
Turn 3d ArrayView into a Rgb image.
Can fail if the ArrayView is not contiguous or has the wrong number of channels.
impl<'a, A: 'static> Into<Option<ImageBuffer<Rgba<A>, &'a [A]>>> for NdImage<NdColor<'a, A>> where
A: Primitive, [src]
A: Primitive,
Turn 3d ArrayView into a Rgba image.
Can fail if the ArrayView is not contiguous or has the wrong number of channels.
Auto Trait Implementations
impl<T> RefUnwindSafe for NdImage<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for NdImage<T> where
T: Send,
T: Send,
impl<T> Sync for NdImage<T> where
T: Sync,
T: Sync,
impl<T> Unpin for NdImage<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for NdImage<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<'a, A, D, T> AsArray<'a, A, D> for T where
A: 'a,
D: Dimension,
T: Into<ArrayBase<ViewRepr<&'a A>, D>>, [src]
A: 'a,
D: Dimension,
T: Into<ArrayBase<ViewRepr<&'a A>, D>>,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,