converts a RGBA 32 bit raw image to ico image format
#npm link
https://www.npmjs.com/package/icoimagejs
#install
npm install icoimagejs --save
#build
gulp buildsrc
#test
gulp test
#usage
const fs=require('fs');
const bmp=require('bmpimagejs');
const ico=require('icoimagejs');
let buf=fs.readFileSync('./test.bmp');
//a decoder is decoding to image structure
let img= bmp.decode(buf);
console.log(img.width);
try{
//encode functions needs width of image and pixels as RGBA buffer
let bufferico= ico.encode(img.width,img.pixels);
console.log(buffferico.length);
}catch(e){
console.log(e.errNumber);
console.log(e.message);
}