Struct fast_image_resize::ImageViewMut
source · pub struct ImageViewMut<'a, P>where
P: PixelExt,{ /* private fields */ }
Expand description
Generic mutable image view.
Implementations§
source§impl<'a, P> ImageViewMut<'a, P>where
P: PixelExt,
impl<'a, P> ImageViewMut<'a, P>where
P: PixelExt,
pub fn new( width: NonZeroU32, height: NonZeroU32, rows: Vec<&'a mut [P]> ) -> Result<Self, ImageRowsError>
pub fn from_buffer( width: NonZeroU32, height: NonZeroU32, buffer: &'a mut [u8] ) -> Result<Self, ImageBufferError>
pub fn from_pixels( width: NonZeroU32, height: NonZeroU32, pixels: &'a mut [P] ) -> Result<Self, ImageBufferError>
pub fn pixel_type(&self) -> PixelType
pub fn width(&self) -> NonZeroU32
pub fn height(&self) -> NonZeroU32
sourcepub fn crop(
self,
left: u32,
top: u32,
width: NonZeroU32,
height: NonZeroU32
) -> Result<Self, CropBoxError>
pub fn crop( self, left: u32, top: u32, width: NonZeroU32, height: NonZeroU32 ) -> Result<Self, CropBoxError>
Create cropped version of the view.
Trait Implementations§
source§impl<'a, P> Debug for ImageViewMut<'a, P>
impl<'a, P> Debug for ImageViewMut<'a, P>
source§impl<'a, P> From<ImageViewMut<'a, P>> for ImageView<'a, P>where
P: PixelExt,
impl<'a, P> From<ImageViewMut<'a, P>> for ImageView<'a, P>where
P: PixelExt,
source§fn from(view: ImageViewMut<'a, P>) -> Self
fn from(view: ImageViewMut<'a, P>) -> Self
Converts to this type from the input type.
source§impl<'a> From<ImageViewMut<'a, Pixel<[u16; 2], u16, 2>>> for DynamicImageViewMut<'a>
impl<'a> From<ImageViewMut<'a, Pixel<[u16; 2], u16, 2>>> for DynamicImageViewMut<'a>
source§fn from(view: ImageViewMut<'a, U16x2>) -> Self
fn from(view: ImageViewMut<'a, U16x2>) -> Self
Converts to this type from the input type.
source§impl<'a> From<ImageViewMut<'a, Pixel<[u16; 3], u16, 3>>> for DynamicImageViewMut<'a>
impl<'a> From<ImageViewMut<'a, Pixel<[u16; 3], u16, 3>>> for DynamicImageViewMut<'a>
source§fn from(view: ImageViewMut<'a, U16x3>) -> Self
fn from(view: ImageViewMut<'a, U16x3>) -> Self
Converts to this type from the input type.
source§impl<'a> From<ImageViewMut<'a, Pixel<[u16; 4], u16, 4>>> for DynamicImageViewMut<'a>
impl<'a> From<ImageViewMut<'a, Pixel<[u16; 4], u16, 4>>> for DynamicImageViewMut<'a>
source§fn from(view: ImageViewMut<'a, U16x4>) -> Self
fn from(view: ImageViewMut<'a, U16x4>) -> Self
Converts to this type from the input type.
source§impl<'a> From<ImageViewMut<'a, Pixel<[u8; 3], u8, 3>>> for DynamicImageViewMut<'a>
impl<'a> From<ImageViewMut<'a, Pixel<[u8; 3], u8, 3>>> for DynamicImageViewMut<'a>
source§fn from(view: ImageViewMut<'a, U8x3>) -> Self
fn from(view: ImageViewMut<'a, U8x3>) -> Self
Converts to this type from the input type.
source§impl<'a> From<ImageViewMut<'a, Pixel<[u8; 4], u8, 4>>> for DynamicImageViewMut<'a>
impl<'a> From<ImageViewMut<'a, Pixel<[u8; 4], u8, 4>>> for DynamicImageViewMut<'a>
source§fn from(view: ImageViewMut<'a, U8x4>) -> Self
fn from(view: ImageViewMut<'a, U8x4>) -> Self
Converts to this type from the input type.
source§impl<'a> From<ImageViewMut<'a, Pixel<f32, f32, 1>>> for DynamicImageViewMut<'a>
impl<'a> From<ImageViewMut<'a, Pixel<f32, f32, 1>>> for DynamicImageViewMut<'a>
source§fn from(view: ImageViewMut<'a, F32>) -> Self
fn from(view: ImageViewMut<'a, F32>) -> Self
Converts to this type from the input type.
source§impl<'a> From<ImageViewMut<'a, Pixel<i32, i32, 1>>> for DynamicImageViewMut<'a>
impl<'a> From<ImageViewMut<'a, Pixel<i32, i32, 1>>> for DynamicImageViewMut<'a>
source§fn from(view: ImageViewMut<'a, I32>) -> Self
fn from(view: ImageViewMut<'a, I32>) -> Self
Converts to this type from the input type.
source§impl<'a> From<ImageViewMut<'a, Pixel<u16, u16, 1>>> for DynamicImageViewMut<'a>
impl<'a> From<ImageViewMut<'a, Pixel<u16, u16, 1>>> for DynamicImageViewMut<'a>
source§fn from(view: ImageViewMut<'a, U16>) -> Self
fn from(view: ImageViewMut<'a, U16>) -> Self
Converts to this type from the input type.
source§impl<'a> From<ImageViewMut<'a, Pixel<u16, u8, 2>>> for DynamicImageViewMut<'a>
impl<'a> From<ImageViewMut<'a, Pixel<u16, u8, 2>>> for DynamicImageViewMut<'a>
source§fn from(view: ImageViewMut<'a, U8x2>) -> Self
fn from(view: ImageViewMut<'a, U8x2>) -> Self
Converts to this type from the input type.
source§impl<'a> From<ImageViewMut<'a, Pixel<u8, u8, 1>>> for DynamicImageViewMut<'a>
impl<'a> From<ImageViewMut<'a, Pixel<u8, u8, 1>>> for DynamicImageViewMut<'a>
source§fn from(view: ImageViewMut<'a, U8>) -> Self
fn from(view: ImageViewMut<'a, U8>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a, P> RefUnwindSafe for ImageViewMut<'a, P>where
P: RefUnwindSafe,
impl<'a, P> Send for ImageViewMut<'a, P>where
P: Send,
impl<'a, P> Sync for ImageViewMut<'a, P>where
P: Sync,
impl<'a, P> Unpin for ImageViewMut<'a, P>
impl<'a, P> !UnwindSafe for ImageViewMut<'a, P>
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