I am preprocessing the image and getting an ImagaData. Now, I want to convert that ImageData into .png, get the buffer and write it into a file. How can I do it?
Jimp.read(imageData)
.then((imageData) => {
let file = "output.png"
return image.write(file)
})
.catch((err) => {
// Handle an exception.
});
After that I wanted to read the image from the file and use it. If possible, convert it into b64.