pub struct BlpImage {
pub header: BlpHeader,
pub content: BlpContent,
}
Expand description
Parsed information from BLP file. The structure of the type strictly follows how the file is stored on the disk for easy encoding/decoding and further transformations.
Fields§
§header: BlpHeader
§content: BlpContent
Implementations§
Source§impl BlpImage
impl BlpImage
Sourcepub fn image_count(&self) -> usize
pub fn image_count(&self) -> usize
Get total amount of images encoded in the content
Sourcepub fn content_jpeg(&self) -> Option<&BlpJpeg>
pub fn content_jpeg(&self) -> Option<&BlpJpeg>
If the image is encoded jpeg, return the content
Sourcepub fn content_raw1(&self) -> Option<&BlpRaw1>
pub fn content_raw1(&self) -> Option<&BlpRaw1>
If the image is direct encoded with BLP1 format, return the content
Sourcepub fn content_raw3(&self) -> Option<&BlpRaw3>
pub fn content_raw3(&self) -> Option<&BlpRaw3>
If the image is direct encoded with raw3 BLP2 format, return the content
Sourcepub fn content_dxt1(&self) -> Option<&BlpDxtn>
pub fn content_dxt1(&self) -> Option<&BlpDxtn>
If the image is DXT1 encoded, return the content
Sourcepub fn ontent_dxt3(&self) -> Option<&BlpDxtn>
pub fn ontent_dxt3(&self) -> Option<&BlpDxtn>
If the image is DXT3 encoded, return the content
Sourcepub fn content_dxt5(&self) -> Option<&BlpDxtn>
pub fn content_dxt5(&self) -> Option<&BlpDxtn>
If the image is DXT5 encoded, return the content
Trait Implementations§
Source§impl Ord for BlpImage
impl Ord for BlpImage
Source§impl PartialOrd for BlpImage
impl PartialOrd for BlpImage
impl Eq for BlpImage
impl StructuralPartialEq for BlpImage
Auto Trait Implementations§
impl Freeze for BlpImage
impl RefUnwindSafe for BlpImage
impl Send for BlpImage
impl Sync for BlpImage
impl Unpin for BlpImage
impl UnwindSafe for BlpImage
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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