Struct tinytga::RawTga [−][src]
pub struct RawTga<'a> { /* fields omitted */ }
Expand description
Raw TGA image.
RawTga
can be used to access lower level information about a TGA file and to access the
raw pixel data. It can be created directly by using the from_slice
constructor or accessed
by calling as_raw
method of a Tga
object.
Implementations
Parse a TGA image from a byte slice.
Returns the color map.
None
is returned if the image contains no color map.
Returns the color bit depth (BPP) of this image.
This function always returns the bit depth of the decoded pixels, regardless of how they are
stored in the TGA file. Use image_data_bpp
to get the number of bits used to store one
pixel in the image data.
Returns the image origin.
Returns the image type.
Returns the raw image data contained in this image.
Returns the size of a single pixel in bits.
This function returns the number of bits used to store a single pixel in the image data.
For true color and grayscale images, where the colors are stored directly in the image data,
the returned value will match the value returned by color_bpp
.
For color mapped images, where the image data consists of color indices, the returned value
describes the bit depth of the indices and may differ from the depth returned by
color_bpp
.
Returns an iterator over the raw pixels in this image.
Returns the TGA header.
The returned object is a direct representation of the header contained in the TGA file. Most of the information contained in the header is also available using other methods, which are the preferred way of accessing them.
Performance
To save memory the header is parsed every time this method is called.
Returns the developer directory.
Performance
To save memory the footer is parsed every time this method is called.
Returns the extension area.
Performance
To save memory the footer is parsed every time this method is called.
Returns the content of the image ID.
If the TGA file doesn’t contain an image ID None
is returned.
Performance
To save memory the header is parsed every time this method is called.
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
Blanket Implementations
Mutably borrows from an owned value. Read more
Casts the value.
Casts the value.
Casts the value.
Casts the value.
Casts the value.