[−][src]Trait embedded_graphics::image::ImageFile
Image file trait.
Required methods
fn new(filedata: &'a [u8]) -> Result<Self, ()>
Create a new image with given input file
The input file is expected to be of a particular format (BMP, TGA, etc) and contain file
metadata like width/height and pixel data. Because parsing may fail, this returns a
Result<Self, ()>
.
fn width(&self) -> u32
Get the width in pixels of an image
fn height(&self) -> u32
Get the height in pixels of an image
Implementors
impl<'a, C> ImageFile<'a> for ImageBmp<'a, C> where
C: PixelColor + From<<C as PixelColor>::Raw>,
[src]
C: PixelColor + From<<C as PixelColor>::Raw>,
fn new(image_data: &'a [u8]) -> Result<Self, ()>
[src]
Create a new BMP from a byte slice
fn width(&self) -> u32
[src]
fn height(&self) -> u32
[src]
impl<'a, C> ImageFile<'a> for ImageTga<'a, C> where
C: PixelColor + From<<C as PixelColor>::Raw>,
[src]
C: PixelColor + From<<C as PixelColor>::Raw>,