Enum image::codecs::dxt::DxtVariant
source · pub enum DxtVariant {
DXT1,
DXT3,
DXT5,
}
👎Deprecated: DXT support will be removed or reworked in a future version. Prefer the
squish
crate instead. See https://github.com/image-rs/image/issues/1623Expand description
What version of DXT compression are we using? Note that DXT2 and DXT4 are left away as they’re just DXT3 and DXT5 with premultiplied alpha
Variants§
DXT1
👎Deprecated: DXT support will be removed or reworked in a future version. Prefer the
squish
crate instead. See https://github.com/image-rs/image/issues/1623The DXT1 format. 48 bytes of RGB data in a 4x4 pixel square is compressed into an 8 byte block of DXT1 data
DXT3
👎Deprecated: DXT support will be removed or reworked in a future version. Prefer the
squish
crate instead. See https://github.com/image-rs/image/issues/1623The DXT3 format. 64 bytes of RGBA data in a 4x4 pixel square is compressed into a 16 byte block of DXT3 data
DXT5
👎Deprecated: DXT support will be removed or reworked in a future version. Prefer the
squish
crate instead. See https://github.com/image-rs/image/issues/1623The DXT5 format. 64 bytes of RGBA data in a 4x4 pixel square is compressed into a 16 byte block of DXT5 data
Implementations§
source§impl DxtVariant
impl DxtVariant
sourcefn decoded_bytes_per_block(self) -> usize
👎Deprecated: DXT support will be removed or reworked in a future version. Prefer the squish
crate instead. See https://github.com/image-rs/image/issues/1623
fn decoded_bytes_per_block(self) -> usize
squish
crate instead. See https://github.com/image-rs/image/issues/1623Returns the amount of bytes of raw image data that is encoded in a single DXTn block
sourcefn encoded_bytes_per_block(self) -> usize
👎Deprecated: DXT support will be removed or reworked in a future version. Prefer the squish
crate instead. See https://github.com/image-rs/image/issues/1623
fn encoded_bytes_per_block(self) -> usize
squish
crate instead. See https://github.com/image-rs/image/issues/1623Returns the amount of bytes per block of encoded DXTn data
sourcepub fn color_type(self) -> ColorType
👎Deprecated: DXT support will be removed or reworked in a future version. Prefer the squish
crate instead. See https://github.com/image-rs/image/issues/1623
pub fn color_type(self) -> ColorType
squish
crate instead. See https://github.com/image-rs/image/issues/1623Returns the color type that is stored in this DXT variant
Trait Implementations§
source§impl Clone for DxtVariant
impl Clone for DxtVariant
source§fn clone(&self) -> DxtVariant
fn clone(&self) -> DxtVariant
Returns a copy 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 DxtVariant
impl Debug for DxtVariant
source§impl PartialEq for DxtVariant
impl PartialEq for DxtVariant
source§fn eq(&self, other: &DxtVariant) -> bool
fn eq(&self, other: &DxtVariant) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for DxtVariant
impl Eq for DxtVariant
impl StructuralPartialEq for DxtVariant
Auto Trait Implementations§
impl Freeze for DxtVariant
impl RefUnwindSafe for DxtVariant
impl Send for DxtVariant
impl Sync for DxtVariant
impl Unpin for DxtVariant
impl UnwindSafe for DxtVariant
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more