[][src]Struct tinytga::TgaHeader

pub struct TgaHeader {
    pub id_len: u8,
    pub has_color_map: bool,
    pub image_type: ImageType,
    pub color_map_start: u16,
    pub color_map_len: u16,
    pub color_map_depth: u8,
    pub x_origin: u16,
    pub y_origin: u16,
    pub width: u16,
    pub height: u16,
    pub pixel_depth: u8,
    pub image_descriptor: u8,
}

TGA header structure, referenced from https://www.fileformat.info/format/tga/egff.htm

Fields

id_len: u8

Image ID field length

has_color_map: bool

Whether a color map is included in the image data

image_type: ImageType

Image type

color_map_start: u16

Color map origin

color_map_len: u16

Length of color map

color_map_depth: u8

Number of bits in each color palette entry, typically 15, 16, 24, or 32 bits

x_origin: u16

Image origin (X)

y_origin: u16

Image origin (Y)

width: u16

Image width in pixels

height: u16

Image height in pixels

pixel_depth: u8

Pixel bit depth (8, 16, 24, 32 bits)

image_descriptor: u8

Image descriptor (unused)

Bits 0:3: Number of bits per pixel designated to alpha channel Bits 4:5: Image origin:

  • 00 = bottom left
  • 01 = bottom right
  • 10 = top left
  • 11 = top right

Trait Implementations

impl Clone for TgaHeader[src]

impl Copy for TgaHeader[src]

impl Debug for TgaHeader[src]

impl Eq for TgaHeader[src]

impl Hash for TgaHeader[src]

impl Ord for TgaHeader[src]

impl PartialEq<TgaHeader> for TgaHeader[src]

impl PartialOrd<TgaHeader> for TgaHeader[src]

impl StructuralEq for TgaHeader[src]

impl StructuralPartialEq for TgaHeader[src]

Auto Trait Implementations

impl Send for TgaHeader

impl Sync for TgaHeader

impl Unpin for TgaHeader

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.