Skip to content

Repository files navigation

dds-parser

DDS parser (header and raw data). Heavely based (copy-paste) on the parse-dds and mdx-m3-viewer.

Installation

npm i dds-parser

Usage

import{decodeDds,parseHeaders}from'dds-parser';constinfo=parseHeaders(arrayBuffer);console.log(info.format);constimage=info.images[0];constrgba=decodeDds(arrayBuffer.slice(image.offset,image.offset+image.length),info.format,image.shape.width,image.shape.height);

Supported formats

  • dxt1
  • dxt3
  • dxt5
  • ati2

Thanks

  • GhostWolf (aka flowtsohg)
  • Jam3
  • toji

About

DDS header and data parser

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages