[−][src]Struct tinytga::Tga
TGA image
Fields
header: TgaHeader
TGA header
TGA footer (last 26 bytes of file)
color_map: Option<&'a [u8]>
Color map
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
Trait Implementations
impl<'a> Clone for Tga<'a>
[src]
fn clone(&self) -> Tga<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Copy for Tga<'a>
[src]
impl<'a> Debug for Tga<'a>
[src]
impl<'a> Eq for Tga<'a>
[src]
impl<'a> Hash for Tga<'a>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'a> IntoIterator for &'a Tga<'a>
[src]
type Item = Pixel
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> Ord for Tga<'a>
[src]
fn cmp(&self, other: &Tga<'a>) -> Ordering
[src]
#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<'a> PartialEq<Tga<'a>> for Tga<'a>
[src]
impl<'a> PartialOrd<Tga<'a>> for Tga<'a>
[src]
fn partial_cmp(&self, other: &Tga<'a>) -> Option<Ordering>
[src]
fn lt(&self, other: &Tga<'a>) -> bool
[src]
fn le(&self, other: &Tga<'a>) -> bool
[src]
fn gt(&self, other: &Tga<'a>) -> bool
[src]
fn ge(&self, other: &Tga<'a>) -> bool
[src]
impl<'a> StructuralEq for Tga<'a>
[src]
impl<'a> StructuralPartialEq for Tga<'a>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,