Type Definition imgref::ImgRef [−][src]
type ImgRef<'a, Pixel> = Img<&'a [Pixel]>;
Reference to pixels inside another image.
Pass this structure by value (i.e. ImgRef
, not &ImgRef
).
Only width
of pixels of every stride
can be modified. The buf
may be longer than height
*stride
, but the extra space should be ignored.
Methods
impl<'a, T> ImgRef<'a, T>
[src]
impl<'a, T> ImgRef<'a, T>
pub fn sub_image(
&self,
left: usize,
top: usize,
width: usize,
height: usize
) -> Self
[src]
pub fn sub_image(
&self,
left: usize,
top: usize,
width: usize,
height: usize
) -> Self
Make a reference for a part of the image, without copying any pixels.
ⓘImportant traits for RowsIter<'a, T>pub fn rows(&self) -> RowsIter<T>
[src]
ⓘImportant traits for RowsIter<'a, T>
pub fn rows(&self) -> RowsIter<T>
pub fn iter(&self) -> Iter<T>
[src]
pub fn iter(&self) -> Iter<T>
Deprecated
: Size of this buffer is unpredictable. Use .rows() instead
Deprecated
Note: it iterates all pixels in the underlying buffer, not just limited by width/height.
impl<'a, T: Copy> ImgRef<'a, T>
[src]
impl<'a, T: Copy> ImgRef<'a, T>
ⓘImportant traits for PixelsIter<'a, T>pub fn pixels(&self) -> PixelsIter<T>
[src]
ⓘImportant traits for PixelsIter<'a, T>
pub fn pixels(&self) -> PixelsIter<T>