I am using node-red to implement an ap and I am racking my brains to figure out how to a buffer to uint8array (I am not sure that is that type).
The node "jimp-image" of module "node-red-contrib-image-tools" outputs an image as a buffer or a base64 string. I need to pass the responsed image into a web service which requires an uint8array base image.
Below is the output buffer format from jimp-image:
But I need the following type of buffer:
Do you have any idea how to convert the buffer to an array buffer as showed into the attached image?
Thank you very much for any support you can provide.
No it's not. It's an ArrayBuffer. It states that in your screenshot. It's just that the debug output doesn't show you the contents like it does for a buffer.
Also, why have you used the hardcored buffer and not the payload from the image?
I have a feeling you don't know precisely what you are supposed to send to this API. It is quite possible a buffer sent with the correct headers etc will work perfectly fine.
Can you clarify that. Perhaps a link to documentation?