Struct image::tga::TGADecoder
source · pub struct TGADecoder<R> { /* private fields */ }
Expand description
A decoder for TGA images
Currently this decoder does not support 8, 15 and 16 bit color images. The representation of a TGA decoder
Implementations
sourceimpl<R: Read + Seek> TGADecoder<R>
impl<R: Read + Seek> TGADecoder<R>
sourcepub fn new(r: R) -> TGADecoder<R>
pub fn new(r: R) -> TGADecoder<R>
Create a new decoder that decodes from the stream r
Trait Implementations
sourceimpl<R: Read + Seek> ImageDecoder for TGADecoder<R>
impl<R: Read + Seek> ImageDecoder for TGADecoder<R>
sourcefn dimensions(&mut self) -> ImageResult<(u32, u32)>
fn dimensions(&mut self) -> ImageResult<(u32, u32)>
Returns a tuple containing the width and height of the image
sourcefn colortype(&mut self) -> ImageResult<ColorType>
fn colortype(&mut self) -> ImageResult<ColorType>
Returns the color type of the image e.g. RGB(8) (8bit RGB)
sourcefn row_len(&mut self) -> ImageResult<usize>
fn row_len(&mut self) -> ImageResult<usize>
Returns the length in bytes of one decoded row of the image
sourcefn read_scanline(&mut self, buf: &mut [u8]) -> ImageResult<u32>
fn read_scanline(&mut self, buf: &mut [u8]) -> ImageResult<u32>
Reads one row from the image into
buf
and returns the row indexsourcefn read_image(&mut self) -> ImageResult<DecodingResult>
fn read_image(&mut self) -> ImageResult<DecodingResult>
Decodes the entire image and return it as a Vector
sourcefn is_animated(&mut self) -> ImageResult<bool>
fn is_animated(&mut self) -> ImageResult<bool>
Returns true if the image is animated
sourcefn into_frames(self) -> ImageResult<Frames>
fn into_frames(self) -> ImageResult<Frames>
Returns the frames of the image Read more
Auto Trait Implementations
impl<R> RefUnwindSafe for TGADecoder<R>where
R: RefUnwindSafe,
impl<R> Send for TGADecoder<R>where
R: Send,
impl<R> Sync for TGADecoder<R>where
R: Sync,
impl<R> Unpin for TGADecoder<R>where
R: Unpin,
impl<R> UnwindSafe for TGADecoder<R>where
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more