pub struct Image<P: PixelFormat = RGBA8> {
    pub bytes: Vec<u8>,
    pub size: Size<u32>,
    pub pitch: usize,
    /* private fields */
}
Expand description

An uncompressed raw image ready to upload to GPU buffers.

Fields§

§bytes: Vec<u8>

The raw bytes of the image.

§size: Size<u32>

The size dimensions of the image.

§pitch: usize

The byte pitch of the image.

Implementations§

Load the image from the path as RGBA8.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.