
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Parses DDS texture headers in Node and the browser.
This was adapted from @toji's wonderful webgl-texture-utils.
Currently this only supports a limited range of common DDS formats:
See test/index.js for an example in Node, or demo/index.js for a WebGL compressed texture example.
Pull requests welcome.
var parse = require('parse-dds')
var buffer = new Uint8Array(... DDS file ...)
var dds = parse(buffer)
console.log(dds.format) // 'dxt1'
console.log(dds.shape) // [ width, height ]
console.log(dds.images) // [ ... mipmap level data ... ]
// get the compressed texture data for gl.compressedTexImage2D
var image = dds.images[0]
var texture = new Uint8Array(buffer, image.offset, image.length)
npm install parse-dds --save-dev
dds = parse(arrayBuffer)
Parses an ArrayBuffer and returns the DDS headers for that file.
The returned values:
shape
an array representing the [ width, height ]
of the textureflags
the DDS bit flags stored in the fileformat
a string, either 'dxt1'
, 'dxt3'
or 'dxt5'
images
a list of information to extract sub-arrays for each mipmap levelEach image has the form:
{
shape: [ width, height ], // size of this mipmap level
offset: x, // byte offset into the input buffer
length: len, // length of this mipmap level image data
}
MIT, see LICENSE.md for details.
FAQs
parses the headers of a DDS texture file
The npm package parse-dds receives a total of 243 weekly downloads. As such, parse-dds popularity was classified as not popular.
We found that parse-dds demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.