I want to resize the image which I get through input file. I found that jimp seems to be a good option. The problem I have is that I don't know how to use it on the file. I tried to use this approach:
Jimp.read(lenna.buffer)
.then(image => {
// do stuff with the image
})
.catch(err => {
// handle an exception
});
Where lenna
was my file, but I get an error:
No matching constructor overloading was found.
Please see the docs for how to call the Jimp constructor.