[][src]Trait imgref::ImgExt

pub trait ImgExt<Pixel> {
    pub fn width_padded(&self) -> usize;
pub fn height_padded(&self) -> usize;
pub fn rows_padded(&self) -> Chunks<'_, Pixel>; }

Additional methods that depend on buffer size

To use these methods you need:

use imgref::*;

Required methods

pub fn width_padded(&self) -> usize[src]

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.

pub fn height_padded(&self) -> usize[src]

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.

pub fn rows_padded(&self) -> Chunks<'_, Pixel>[src]

Iterate over the entire buffer as rows, including all padding

Rows will have up to stride width, but the last row may be shorter.

Loading content...

Implementors

impl<Pixel, Container> ImgExt<Pixel> for Img<Container> where
    Container: AsRef<[Pixel]>, 
[src]

pub fn rows_padded(&self) -> Chunks<'_, Pixel>[src]

Iterate over the entire buffer as rows, including all padding

Rows will have up to stride width, but the last row may be shorter.

Loading content...