app.get("/", (req, res) => { res.type('jpg'); res.attachment('output.jpg') jimp.read('lenna.png', (err, lenna) => { if (err) throw err; lenna .resize(256, 256) // resize .quality(60) // set JPEG quality .greyscale() // set greyscale .write('output.jpg'); // save res.download('output.jpg'); }); My code is not working if I wanted to download the image after jimp processed it. Just help me out here the file is saved to the directory but it is not downloading it when we load the browser
Submitted September 15, 2019 at 05:32AM by coderchrome123456
No comments:
Post a Comment