Trait imgref::ImgExt
[−]
[src]
pub trait ImgExt<Pixel> { fn width(&self) -> usize; fn height(&self) -> usize; fn stride(&self) -> usize; fn height_padded(&self) -> usize; fn width_padded(&self) -> usize { ... } }
Required Methods
fn width(&self) -> usize
Width of the image in pixels.
Note that this isn't same as the width of the row in image data, see stride()
fn height(&self) -> usize
Height of the image in pixels.
fn stride(&self) -> usize
Number of pixels to skip in the container to advance to the next row. Note the last row may have fewer pixels than the stride.
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.
This method may panic if the underlying buffer is not at least height()*stride()
pixels large.
Provided Methods
fn width_padded(&self) -> usize
Maximum possible width of the data, including the stride.
This method may panic if the underlying buffer is not at least height()*stride()
pixels large.