# Texture codec for johnmcm.com The WebAssembly module behind johnmcm.com's DDS Converter (/dds-converter): it decodes and encodes the BC (DXT) block-compressed texture formats. - Decoding: [bcdec](https://github.com/iOrange/bcdec) by Sergii Kudlai, at commit `80859ed3b7afb1c527a2a99d70c61457bea72d0c` (MIT or Unlicense). - Encoding: rgbcx (BC1, BC3, BC4, BC5) and bc7enc (BC7) from [bc7enc_rdo](https://github.com/richgel999/bc7enc_rdo) by Richard Geldreich, Jr., at commit `b9438627eef73a1157e84201b6fa6eb2ffd6d9f0` (MIT or public domain). What is here: - `source/`: the exact library files built, unmodified, with their licences. - `src/wrapper.cpp`: this site's functions for the page: decode a surface to RGBA, encode a range of block rows, and one correction to bc7enc's output (opaque blocks it writes in mode 6 can decode with alpha 254; the wrapper sets those blocks' alpha endpoints and p-bits so alpha is exactly 255). - `Dockerfile` and `build.ps1`: the build, with the Emscripten image pinned by digest and both libraries by commit. Run `build.ps1` with Docker Desktop running; the module goes to `frontend/vendor/local/dds@1/`. DDS and TGA headers, the uncompressed pixel formats, mipmaps and PNG are handled in TypeScript by the page itself (frontend/src/app/dds-converter/).