[TypeError: Corrupt JPG, exceeded buffer limits]
See original GitHub issueTrying to calculate the following image throws an exception:
var imagesize = require("image-size");
var url = "http://www.niemanlab.org/images/renewalinvoice.jpg";
var needle = require('needle');
var stream = needle.get(url);
stream.on('readable', function( ) {
var chunk;
while( chunk = this.read() ) {
info = imagesize(chunk);
if( info ) {
stream.end();
console.log('streaming picture', info);
}
}
});
stream.on('end', function(){
console.log('Stream ended');
});
Issue Analytics
- State:
- Created 9 years ago
- Comments:16 (1 by maintainers)
Top Results From Across the Web
Corrupt JPG, exceeded buffer limits - Stack Overflow
1. The file is too large to be processed. · 1 · @AliSheikhpour even after reducing the file size to 1.1 MB, I...
Read more >Corrupt Jpg, Exceeded Buffer Limits - ADocLib
I got an error, TypeError: Corrupt JPG, exceeded buffer limits , when I use image-size with an JPEG image file. But when I...
Read more >TypeError: Corrupt JPG, exceeded buffer limits - Bountysource
TypeError : Corrupt JPG, exceeded buffer limits. ... Maybe that's because the JPG is too big, but I would like to know how...
Read more >PIL.Image - Pillow (PIL Fork) 9.3.0 documentation
If this number is exceeded, this method returns None. The default limit is 256 colors. :returns: An unsorted list of (count, pixel) values....
Read more >original size image react native Code Example - Code Grepper
... to share file from react native · How to show content-type:image/jpg in react ... out of memory gc overhead limit exceeded. react...
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
FYI I had this error as well, but I found out it was because the images I was using were saved as CMYK file type instead of RGB. Once I changed the images to RGB the script worked.
try https://github.com/nodeca/probe-image-size, it works with examples from this thread