I have the following tensor in nodejs:
I then encode it to PNG like so:
const encodedTensor = await tf.node.encodePng(intTensor);
And pipe it to the frontend like this:
fs.writeFileSync("image.png", encodedTensor);
const readStream = fs.createReadStream('image.png');
readStream.pipe(res);
Finally, this is what shows up in my console:
What is this format? and how can I download the image on the client? Or is there any other way of converting the tensor to images in nodejs and then downloading it on the client?
Thank you