I'm trying to create an image file from chunks of ArrayBuffers.
all= fs.createWriteStream("out."+imgtype);
for(i=0; i<end; i++){
all.write(picarray[i]);
}
all.end();
where picarray
contains ArrayBuffer chunks. However, I get the error
TypeError: Invalid non-string/buffer chunk
.
How can I convert ArrayBuffer chunks into an image?