Wrong buffer
See original GitHub issueToBuffer method returns a wrong buffer randomly
example:
sharp(imageFile)
.resize(myWidth, myHeight)
.background({r: 0, g: 0, b: 0, alpha: 0})
.embed()
.toFormat(sharp.format.jpeg)
.toBuffer()
.then(output) => {
// Sometimes buffer cannot be used as uint8Array, it's seems corrupted
console.log(output.buffer);
});
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
SUM ERROR: tp_ins_buffer_entry: wrong buffer format ...
During the upgrading using Software Update manager (SUM), the below error occur at the phase MAIN_SHDIMP/SUBMOD_SHDIMP/BUFFEROP_TABIM EXECUTING ...
Read more >Problem: An incorrect buffer distance is generated in the ...
Problem: An incorrect buffer distance is generated in the output buffer layer after running the Buffer tool in ArcGIS Pro. Description.
Read more >Error Codes - Buffer API
HTTP Code Error Code Description
401 401 Unauthorized.
403 403 Permission denied.
404 404 Endpoint not found.
Read more >Buffer Preparation – Right, Easy, Wrong
This Edition of HPLC solutions is sharing the right way to prepare buffered mobile phase which is more recommended for most reversed-phase HPLC ......
Read more >Re: PANIC: wrong buffer passed to visibilitymap_clear
Re: PANIC: wrong buffer passed to visibilitymap_clear ; Andres Freund <andres(at)anarazel(dot)de> · Peter Geoghegan <pg(at)bowt(dot)ie>, pgsql- ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@josephfrazier You shouldn’t need to do this as sharp always responds with a
Buffer
assigned via Nan::NewBuffer. Perhaps another dependency is re-defining or monkey-patching the globalBuffer
class? Please open a new issue with a code sample if you’re able to isolate this behaviour to sharp.Thanks for clarifying! I haven’t looked into it closely, but I wouldn’t be surprised if something was being monkey-patched. If I do end up isolating the behavior, I’ll be sure to open an issue.