#[repr(u8)]pub enum PixelFormat {
Dxt1 = 0,
Dxt3 = 1,
Argb8888 = 2,
Argb1555 = 3,
Argb4444 = 4,
Rgb565 = 5,
A8 = 6,
Dxt5 = 7,
Unspecified = 8,
Argb2565 = 9,
Bc5 = 11,
}Expand description
The sub-format used when ColorEncoding is Dxt.
Not all variants are used by every game; BLP files in the wild primarily
use Dxt1, Dxt3, and Dxt5.
Variants§
Dxt1 = 0
DXT1 (BC1) — 4 bits/pixel, 0- or 1-bit alpha.
Dxt3 = 1
DXT3 (BC2) — 8 bits/pixel, explicit 4-bit alpha.
Argb8888 = 2
Uncompressed 32-bit ARGB (rarely used as a PixelFormat value).
Argb1555 = 3
16-bit ARGB (1-bit alpha, 5-bit per RGB channel).
Argb4444 = 4
16-bit ARGB (4-bit per channel).
Rgb565 = 5
16-bit RGB (5-6-5, no alpha).
A8 = 6
8-bit alpha-only channel.
Dxt5 = 7
DXT5 (BC3) — 8 bits/pixel, interpolated 8-bit alpha.
Unspecified = 8
Unspecified / unknown format.
Argb2565 = 9
16-bit ARGB (2-bit alpha, 5-bit per RGB channel).
Bc5 = 11
BC5 (two-channel compression, used for normal maps).
Trait Implementations§
Source§impl Clone for PixelFormat
impl Clone for PixelFormat
Source§fn clone(&self) -> PixelFormat
fn clone(&self) -> PixelFormat
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PixelFormat
impl Debug for PixelFormat
Source§impl PartialEq for PixelFormat
impl PartialEq for PixelFormat
Source§impl TryFrom<u8> for PixelFormat
impl TryFrom<u8> for PixelFormat
impl Copy for PixelFormat
impl Eq for PixelFormat
impl StructuralPartialEq for PixelFormat
Auto Trait Implementations§
impl Freeze for PixelFormat
impl RefUnwindSafe for PixelFormat
impl Send for PixelFormat
impl Sync for PixelFormat
impl Unpin for PixelFormat
impl UnsafeUnpin for PixelFormat
impl UnwindSafe for PixelFormat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more