#[repr(u8)]pub enum ColorEncoding {
Jpeg = 0,
Palette = 1,
Dxt = 2,
Argb8888 = 3,
Argb8888Dup = 4,
}Expand description
How the pixel data inside a BLP file is encoded.
This is stored as a single byte in BLP2 headers and as a 4-byte integer in BLP0/BLP1 headers.
Variants§
Jpeg = 0
JPEG-compressed data. A shared JPEG header precedes the per-mipmap data.
Palette = 1
Indexed-color palette with up to 256 entries. Alpha is stored separately after the pixel-index bytes, in 0-, 1-, 4-, or 8-bit-per-pixel form.
Dxt = 2
DirectX texture compression (DXT1, DXT3, or DXT5), selected by
PixelFormat and BlpFile::alpha_size.
Argb8888 = 3
Uncompressed 32-bit pixels stored on-disk as BGRA. BlpFile::get_pixels
swaps the channels to RGBA before returning.
Argb8888Dup = 4
Identical to Argb8888; present in some older files.
Trait Implementations§
Source§impl Clone for ColorEncoding
impl Clone for ColorEncoding
Source§fn clone(&self) -> ColorEncoding
fn clone(&self) -> ColorEncoding
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 ColorEncoding
impl Debug for ColorEncoding
Source§impl PartialEq for ColorEncoding
impl PartialEq for ColorEncoding
Source§impl TryFrom<u8> for ColorEncoding
impl TryFrom<u8> for ColorEncoding
impl Copy for ColorEncoding
impl Eq for ColorEncoding
impl StructuralPartialEq for ColorEncoding
Auto Trait Implementations§
impl Freeze for ColorEncoding
impl RefUnwindSafe for ColorEncoding
impl Send for ColorEncoding
impl Sync for ColorEncoding
impl Unpin for ColorEncoding
impl UnsafeUnpin for ColorEncoding
impl UnwindSafe for ColorEncoding
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