Struct fastfreeimage::FastImageData

source ·
pub struct FastImageData<C, D>
where D: 'static,
{ /* private fields */ }

Implementations§

source§

impl<C, D> FastImageData<C, D>
where C: 'static + ChanTrait, D: 'static + Copy + PartialEq,

source

pub fn new(width_pixels: c_int, height_pixels: c_int, value: D) -> Result<Self>

source§

impl FastImageData<Chan1, u8>

source

pub fn copy_from_8u_c1<S>(src: &S) -> Result<Self>
where S: FastImage<C = Chan1, D = u8>,

source

pub fn copy_from_32f8u_c1<S>(src: &S, round_mode: RoundMode) -> Result<Self>
where S: FastImage<C = Chan1, D = f32>,

source§

impl FastImageData<Chan1, f32>

source

pub fn copy_from_8u32f_c1<S>(src: &S) -> Result<Self>
where S: FastImage<C = Chan1, D = u8>,

source

pub fn copy_from_32f_c1<S>(src: &S) -> Result<Self>
where S: FastImage<C = Chan1, D = f32>,

Trait Implementations§

source§

impl<C, D> Debug for FastImageData<C, D>
where C: ChanTrait, D: 'static + Copy + Debug + PartialEq,

source§

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

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

impl<C, D> Drop for FastImageData<C, D>
where D: 'static,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<'a, C, D> FastImage for &'a FastImageData<C, D>
where C: ChanTrait, D: Copy + PartialEq,

§

type D = D

Pixel data type (e.g. u8 or f32)
§

type C = C

Number of channels (e.g. Chan1)
source§

fn raw_ptr(&self) -> *const Self::D

source§

fn image_slice(&self) -> &[Self::D]

Get the raw data for the entire image, including padding.
source§

fn stride(&self) -> c_int

Get the image stride in number of bytes.
source§

fn size(&self) -> &FastImageSize

Get the image size in number of pixels.
source§

fn width(&self) -> c_int

Get the image width in number of pixels.
source§

fn height(&self) -> c_int

Get the image height in number of pixels.
source§

fn valid_row_iter( &self, size: &FastImageSize ) -> Result<ValidChunksExact<'_, Self::D>>

Iterate over elements in each image row. Returns valid slices.
source§

fn pixel_slice(&self, row: usize, col: usize) -> &[Self::D]

Get the raw data for a pixel.
source§

impl<C, D> FastImage for FastImageData<C, D>
where C: ChanTrait, D: Copy + PartialEq,

§

type D = D

Pixel data type (e.g. u8 or f32)
§

type C = C

Number of channels (e.g. Chan1)
source§

fn raw_ptr(&self) -> *const Self::D

source§

fn image_slice(&self) -> &[Self::D]

Get the raw data for the entire image, including padding.
source§

fn stride(&self) -> c_int

Get the image stride in number of bytes.
source§

fn size(&self) -> &FastImageSize

Get the image size in number of pixels.
source§

fn width(&self) -> c_int

Get the image width in number of pixels.
source§

fn height(&self) -> c_int

Get the image height in number of pixels.
source§

fn valid_row_iter( &self, size: &FastImageSize ) -> Result<ValidChunksExact<'_, Self::D>>

Iterate over elements in each image row. Returns valid slices.
source§

fn pixel_slice(&self, row: usize, col: usize) -> &[Self::D]

Get the raw data for a pixel.
source§

impl<C, D> MutableFastImage for FastImageData<C, D>
where C: ChanTrait, D: Copy + PartialEq,

source§

fn raw_mut_ptr(&mut self) -> *mut Self::D

source§

fn image_slice_mut(&mut self) -> &mut [Self::D]

Get the mutable raw data for the entire image, including padding.
source§

fn valid_row_iter_mut( &mut self, size: &FastImageSize ) -> Result<ValidChunksExactMut<'_, Self::D>>

Iterate over elements in each image row. Returns mutable valid slices.
source§

fn pixel_slice_mut(&mut self, row: usize, col: usize) -> &mut [Self::D]

source§

impl<C, D> PartialEq for FastImageData<C, D>
where C: 'static + ChanTrait + PartialEq, D: 'static + Copy + PartialEq,

source§

fn eq(&self, rhs: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<C, D> Send for FastImageData<C, D>
where D: 'static,

Auto Trait Implementations§

§

impl<C, D> Freeze for FastImageData<C, D>

§

impl<C, D> RefUnwindSafe for FastImageData<C, D>

§

impl<C, D> !Sync for FastImageData<C, D>

§

impl<C, D> Unpin for FastImageData<C, D>
where C: Unpin, D: Unpin,

§

impl<C, D> UnwindSafe for FastImageData<C, D>
where C: UnwindSafe, D: UnwindSafe,

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

§

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.