|
wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
|
The uncompressed-BGRA codec (ColorEncoding::Bgra / BgraAlt): a pure channel swizzle. More...
#include <wowlib/formats/blp/codec.hpp>
Public Member Functions | |
| Result< std::vector< std::uint8_t > > | decode (std::span< const std::byte > src, std::uint32_t width, std::uint32_t height) const |
| Decode one level's BGRA bytes to RGBA8 pixels. | |
| Result< FileBuffer > | encode (std::span< const std::uint8_t > rgba, std::uint32_t width, std::uint32_t height) const |
| Encode RGBA8 pixels to one level's BGRA bytes. | |
The uncompressed-BGRA codec (ColorEncoding::Bgra / BgraAlt): a pure channel swizzle.
Stateless, a class for symmetry with the other codecs and to keep the swizzle off the free-function surface.
|
nodiscard |
Decode one level's BGRA bytes to RGBA8 pixels.
| src | the on-disk BGRA bytes; short payloads decode their missing texels transparent black. |
| width | the level width in pixels. |
| height | the level height in pixels. |
Definition at line 526 of file blp.cpp.
Referenced by wowlib::formats::blp::BLP::decode().
|
nodiscard |
Encode RGBA8 pixels to one level's BGRA bytes.
| rgba | width * height * 4 RGBA bytes. |
| width | the level width in pixels. |
| height | the level height in pixels. |
Definition at line 540 of file blp.cpp.
Referenced by wowlib::formats::blp::BLP::encode().