pub struct GainImageMut<'a, T: Clone + Copy + Default + Debug, const N: usize> {
pub data: BufferStore<'a, T>,
pub width: usize,
pub height: usize,
pub stride: usize,
}Expand description
Mutable image store
Fields§
§data: BufferStore<'a, T>§width: usize§height: usize§stride: usizeImage stride, items per row, might be 0
Implementations§
Source§impl<'a, T: Clone + Copy + Default + Debug, const N: usize> GainImageMut<'a, T, N>
impl<'a, T: Clone + Copy + Default + Debug, const N: usize> GainImageMut<'a, T, N>
Sourcepub fn alloc(width: usize, height: usize) -> Self
pub fn alloc(width: usize, height: usize) -> Self
Allocates default image layout for given [FastBlurChannels]
Sourcepub fn borrow(arr: &'a mut [T], width: usize, height: usize) -> Self
pub fn borrow(arr: &'a mut [T], width: usize, height: usize) -> Self
Mutable borrows existing data
Stride will be default width * channels.channels()
Sourcepub fn row_stride(&self) -> usize
pub fn row_stride(&self) -> usize
Returns row stride
Sourcepub fn check_layout(&self) -> Result<(), ForgeError>
pub fn check_layout(&self) -> Result<(), ForgeError>
Checks if layout matches necessary requirements
Sourcepub fn size_matches(
&self,
other: &GainImage<'_, T, N>,
) -> Result<(), ForgeError>
pub fn size_matches( &self, other: &GainImage<'_, T, N>, ) -> Result<(), ForgeError>
Checks if it is matches the size of the other image
Sourcepub fn size_matches_mut(
&self,
other: &GainImageMut<'_, T, N>,
) -> Result<(), ForgeError>
pub fn size_matches_mut( &self, other: &GainImageMut<'_, T, N>, ) -> Result<(), ForgeError>
Checks if it is matches the size of the other image
pub fn to_immutable_ref(&self) -> GainImage<'_, T, N>
Source§impl<const N: usize> GainImageMut<'_, u8, N>
impl<const N: usize> GainImageMut<'_, u8, N>
pub fn expand_to_u16(&self, target_bit_depth: usize) -> GainImageMut<'_, u16, N>
Auto Trait Implementations§
impl<'a, T, const N: usize> Freeze for GainImageMut<'a, T, N>
impl<'a, T, const N: usize> RefUnwindSafe for GainImageMut<'a, T, N>where
T: RefUnwindSafe,
impl<'a, T, const N: usize> Send for GainImageMut<'a, T, N>where
T: Send,
impl<'a, T, const N: usize> Sync for GainImageMut<'a, T, N>where
T: Sync,
impl<'a, T, const N: usize> Unpin for GainImageMut<'a, T, N>where
T: Unpin,
impl<'a, T, const N: usize> !UnwindSafe for GainImageMut<'a, T, N>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more