Here is the snippet of my code which produce the error:
let mat = cv.Mat.zeros(cnn_size, cnn_size, 3);
savepath = "path/to/saved/image.jpg"
let bf = Buffer.from(mat.data);
Jimp.read(bf).then(data => {
console.log(data);
return data.resize(cnn_size, cnn_size).write(savepath);
}).catch(err => {
console.error(err);
});
Running the code caused this error: (node:2152) UnhandledPromiseRejectionWarning: Error: Could not find MIME for Buffer <null>
.