Image binary encoding?
mikepc opened this issue · comments
Michael Draper commented
I'm using staticMap to generate a binary map image.
When I use the following code:
fs.writeFile('testblob.png', mapImage, (err) => {
if (err) throw err;
console.log('It\'s saved!');
});
The testblob.png is unreadable. What do I need to do with this binary buffer in order to read it after writing it?
Colin Kennedy commented
What is mapImage
? Could you post a longer example?
Michael Draper commented
I fixed the problem, it was a content encoding issue with s3, I needed to set it to binary.