@sonrisa-dev/png-metadata
v1.0.5
Published
png metadata reader and writer
Downloads
3
Readme
node-png-metadata
PNG metadata read and write
Forked from(to support angular 10): https://github.com/kujirahand/node-png-metadata
install
$ npm install png-metadata
require
var png = require('png-metadata');
how to use
// load from file
var s = png.readFileSync('aaa.png');
// split
var list = png.splitChunk(s);
// append
var iend = list.pop(); // remove IEND
var newchunk = png.createChunk("aaAa","test data");
list.push(newchunk);
list.push(iend);
// join
var newpng = png.joinChunk(list);
// save to file
fs.writeFileSync(outfile, newpng, 'binary');