Type Definition imgref::ImgVec
[−]
[src]
type ImgVec<Pixel> = Img<Vec<Pixel>>;
Image owning its pixels.
A 2D array of pixels. The pixels are oriented top-left first and rows are stride
pixels wide.
If size of the buf
is larger than width
*height
, then any excess space is a padding (see width_padded()
/height_padded()
).
Methods
impl<T> ImgVec<T>
[src]
fn sub_image_mut(
&mut self,
left: usize,
top: usize,
width: usize,
height: usize
) -> Img<&mut [T]>
&mut self,
left: usize,
top: usize,
width: usize,
height: usize
) -> Img<&mut [T]>
Create a mutable view into a region within the image. See sub_image()
for read-only views.
fn sub_image(
&self,
left: usize,
top: usize,
width: usize,
height: usize
) -> ImgRef<T>
&self,
left: usize,
top: usize,
width: usize,
height: usize
) -> ImgRef<T>
fn as_ref(&self) -> ImgRef<T>
If you need a mutable reference, see sub_image_mut()