[−][src]Struct tinytga::Tga
TGA image
Fields
header: TgaHeaderTGA header
TGA footer (last 26 bytes of file)
pixel_data: &'a [u8]Image pixel data
Methods
impl<'a> Tga<'a>[src]
pub fn from_slice(bytes: &'a [u8]) -> Result<Self, ParseError>[src]
Parse a TGA image from a byte slice
pub fn bpp(&self) -> u8[src]
Get the bit depth (BPP) of this image
pub fn width(&self) -> u16[src]
Get the image width in pixels
pub fn height(&self) -> u16[src]
Get the image height in pixels
pub fn image_data(&self) -> &[u8][src]
Get the raw image data contained in this image
TGA images are encoded as packets, either [RawPacket]s or [RlePacket]s
Trait Implementations
impl<'a> Copy for Tga<'a>[src]
impl<'a> Debug for Tga<'a>[src]
impl<'a> IntoIterator for &'a Tga<'a>[src]
type Item = u32
The type of the elements being iterated over.
type IntoIter = TgaIterator<'a>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter[src]
impl<'a> Clone for Tga<'a>[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,