HashLips / generative-art-opensource

Create generative art by using the canvas api and node js, feel free to contribute to this repo with new ideas.
MIT License
1.36k stars 692 forks source link

Outputting Gifs instead of PNGs #41

Open chernandez03 opened 3 years ago

chernandez03 commented 3 years ago

Was thinking that if I changed the file output to .gif it would work (see code below) but haven't had any luck.

const saveImage = (_editionCount) => { fs.writeFileSync( ./output/${_editionCount}.gif, canvas.toBuffer("image/gif") ); };

Any advice?

Ponda1 commented 3 years ago

Thats not gonna work since the gif requires many more things to be generated properly. Im not experienced at this but I imagine you would have to change a lot of the code.