Struct vorolib::img::Img [−][src]
pub struct Img { /* fields omitted */ }
Methods
impl Img
[src]
impl Img
pub fn wrap(data: ImageBuffer<Rgb<u8>, Vec<u8>>) -> Self
[src]
pub fn wrap(data: ImageBuffer<Rgb<u8>, Vec<u8>>) -> Self
pub fn empty(width: X, height: Y) -> Self
[src]
pub fn empty(width: X, height: Y) -> Self
pub fn load(pth: &Path) -> Self
[src]
pub fn load(pth: &Path) -> Self
pub fn width(&self) -> X
[src]
pub fn width(&self) -> X
pub fn height(&self) -> Y
[src]
pub fn height(&self) -> Y
pub fn pixel_cnt(&self) -> usize
[src]
pub fn pixel_cnt(&self) -> usize
pub fn save<Q>(&self, path: Q) -> Result<()> where
Q: AsRef<Path>,
[src]
pub fn save<Q>(&self, path: Q) -> Result<()> where
Q: AsRef<Path>,
Trait Implementations
impl Index<(X, Y)> for Img
[src]
impl Index<(X, Y)> for Img
type Output = Rgb<u8>
The returned type after indexing.
fn index(&self, index: (X, Y)) -> &Self::Output
[src]
fn index(&self, index: (X, Y)) -> &Self::Output
Performs the indexing (container[index]
) operation.
impl IndexMut<(X, Y)> for Img
[src]
impl IndexMut<(X, Y)> for Img
fn index_mut(&mut self, index: (X, Y)) -> &mut Self::Output
[src]
fn index_mut(&mut self, index: (X, Y)) -> &mut Self::Output
Performs the mutable indexing (container[index]
) operation.
impl Clone for Img
[src]
impl Clone for Img