|
wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
|
The mip-chain downscaler: one box-filter halving step per call, the standard non-sRGB-aware average every BLP toolchain uses. More...
#include <wowlib/formats/blp/codec.hpp>
Public Member Functions | |
| std::vector< std::uint8_t > | downscale (std::span< const std::uint8_t > rgba, std::uint32_t width, std::uint32_t height) const |
| Downscale a level to the next one (dimensions halve, floored at 1); each destination texel averages its 2x2 (or clamped 2x1/1x2/1x1) source footprint per channel. | |
The mip-chain downscaler: one box-filter halving step per call, the standard non-sRGB-aware average every BLP toolchain uses.
Stateless.
|
nodiscard |
Downscale a level to the next one (dimensions halve, floored at 1); each destination texel averages its 2x2 (or clamped 2x1/1x2/1x1) source footprint per channel.
| rgba | the source level's RGBA bytes. |
| width | the source width in pixels. |
| height | the source height in pixels. |
Definition at line 556 of file blp.cpp.
Referenced by wowlib::formats::blp::BLP::encode().