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 dimensions of this image.

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Casts the value.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Casts the value.

Performs the conversion.

Performs the conversion.

Casts the value.

Casts the value.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Casts the value.

Casts the value.