Neoclassical Programming Multitude
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

icoimagejs

1.0.3 • Public • Published

icoimagejs

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);
}

install

npm i icoimagejs

Downloadsweekly downloads

8

version

1.0.3

license

MIT

repository

githubgithub

last publish

collaborators

  • avatar