vtflib
v1.0.2
Published
Work with VTF files in javascript
Downloads
11
Readme
vtflib.js
Create, edit and modify VTF files.
Code heavily based on VTFLIb by Nemesis.
Usage
const { VTFFile, VTFImageFormatType } = require(".");
const { readFileSync, writeFileSync } = require("fs");
let readdata = new VTFFile(readFileSync("./in.vtf"));
let image = readdata.getImages().reverse()[0];
// image.toRGBA8888()
readdata.setImage(image.convert("DXT5"));
writeFileSync("./out.vtf", readdata.toBuffer());