Trait fast_image_resize::ImageView
source · pub unsafe trait ImageView {
type Pixel: InnerPixel;
// Required methods
fn width(&self) -> u32;
fn height(&self) -> u32;
fn iter_rows(&self, start_row: u32) -> impl Iterator<Item = &[Self::Pixel]>;
// Provided methods
fn iter_2_rows(
&self,
start_y: u32,
max_rows: u32,
) -> ArrayChunks<impl Iterator<Item = &[Self::Pixel]>, 2> ⓘ { ... }
fn iter_4_rows(
&self,
start_y: u32,
max_rows: u32,
) -> ArrayChunks<impl Iterator<Item = &[Self::Pixel]>, 4> ⓘ { ... }
fn iter_rows_with_step(
&self,
start_y: f64,
step: f64,
max_rows: u32,
) -> impl Iterator<Item = &[Self::Pixel]> { ... }
}
Expand description
A trait for getting access to image data.
§Safety
The length of the image rows returned by methods of this trait must be equal or greater than the image width.
Required Associated Types§
type Pixel: InnerPixel
Required Methods§
Provided Methods§
sourcefn iter_2_rows(
&self,
start_y: u32,
max_rows: u32,
) -> ArrayChunks<impl Iterator<Item = &[Self::Pixel]>, 2> ⓘ
fn iter_2_rows( &self, start_y: u32, max_rows: u32, ) -> ArrayChunks<impl Iterator<Item = &[Self::Pixel]>, 2> ⓘ
Returns iterator by arrays with two image rows.
sourcefn iter_4_rows(
&self,
start_y: u32,
max_rows: u32,
) -> ArrayChunks<impl Iterator<Item = &[Self::Pixel]>, 4> ⓘ
fn iter_4_rows( &self, start_y: u32, max_rows: u32, ) -> ArrayChunks<impl Iterator<Item = &[Self::Pixel]>, 4> ⓘ
Returns iterator by arrays with four image rows.
Object Safety§
This trait is not object safe.