[−][src]Trait ffimage::core::traits::GenericImageView
View into an image, provides read-only pixel access
Associated Types
Loading content...Required methods
fn width(&self) -> u32
Width in pixels
fn height(&self) -> u32
Height in pixels
fn pixel(&self, x: u32, y: u32) -> Option<Self::T>
Returns the pixel at the specified coordinates
fn view(
&'a self,
x: u32,
y: u32,
width: u32,
height: u32
) -> Option<Self::SubImage>
&'a self,
x: u32,
y: u32,
width: u32,
height: u32
) -> Option<Self::SubImage>
Returns a sub image view backed by the same data
Implementors
impl<'a, I: GenericImageView<'a>> GenericImageView<'a> for SubImageView<'a, I>
[src]
type T = I::T
type SubImage = Self
fn width(&self) -> u32
[src]
fn height(&self) -> u32
[src]
fn pixel(&self, x: u32, y: u32) -> Option<Self::T>
[src]
fn view(
&'a self,
x: u32,
y: u32,
width: u32,
height: u32
) -> Option<Self::SubImage>
[src]
&'a self,
x: u32,
y: u32,
width: u32,
height: u32
) -> Option<Self::SubImage>
impl<'a, T: Pixel + 'a> GenericImageView<'a> for ImageBuffer<T>
[src]
type T = T
fn width(&self) -> u32
[src]
fn height(&self) -> u32
[src]
fn pixel(&self, x: u32, y: u32) -> Option<Self::T>
[src]
type SubImage = SubImageView<'a, Self>
fn view(
&'a self,
x: u32,
y: u32,
width: u32,
height: u32
) -> Option<Self::SubImage>
[src]
&'a self,
x: u32,
y: u32,
width: u32,
height: u32
) -> Option<Self::SubImage>
impl<'a, T: Pixel + 'a> GenericImageView<'a> for ImageView<'a, T>
[src]
type T = T
fn width(&self) -> u32
[src]
fn height(&self) -> u32
[src]
fn pixel(&self, x: u32, y: u32) -> Option<Self::T>
[src]
type SubImage = SubImageView<'a, Self>
fn view(
&'a self,
x: u32,
y: u32,
width: u32,
height: u32
) -> Option<Self::SubImage>
[src]
&'a self,
x: u32,
y: u32,
width: u32,
height: u32
) -> Option<Self::SubImage>