girliemac / filterous-2

Instagram-like photo manipulation library for Node.js and Javascript on browser
https://girliemac.github.io/filterous-2/demo-browser/
MIT License
206 stars 42 forks source link

get image base64 from nodejs #9

Open joneldiablo opened 2 years ago

joneldiablo commented 2 years ago

How could we get the final base64 or buffer instead save the file?

69hunter commented 2 years ago

You should be able to get the base64 with the following example:

const f = await filterous
            .importImage(buffer)
            .applyInstaFilter(filterName, options)
const base64 = f.canvas.toDataURL()
amydinsyahira commented 2 years ago

Use .save(); //without filename in PR #10