pub trait ImgExt<Pixel> {
// Required methods
fn width_padded(&self) -> usize;
fn height_padded(&self) -> usize;
fn rows_padded(&self) -> Chunks<'_, Pixel>;
fn as_ref(&self) -> ImgRef<'_, Pixel>;
}
Expand description
Additional methods that depend on buffer size
To use these methods you need:
use imgref::*;
Required Methods§
sourcefn width_padded(&self) -> usize
fn width_padded(&self) -> usize
Maximum possible width of the data, including the stride.
Panics
This method may panic if the underlying buffer is not at least height()*stride()
pixels large.
sourcefn height_padded(&self) -> usize
fn height_padded(&self) -> usize
Height in number of full strides. If the underlying buffer is not an even multiple of strides, the last row is ignored.
Panics
This method may panic if the underlying buffer is not at least height()*stride()
pixels large.
sourcefn rows_padded(&self) -> Chunks<'_, Pixel>
fn rows_padded(&self) -> Chunks<'_, Pixel>
Iterate over the entire buffer as rows, including all padding
Rows will have up to stride
width, but the last row may be shorter.