jimp: marker was not found
when I use the following code with a corrupt image I get the error “marker was not found” but I can not capture it using “catch (function (err) {”. How can I catch the error?
Jimp.read(localFilePath).
then(function (image) {...........}).
catch(function (err) {
console.log('get error');
});
C:\Users\xxx\Documents\progetto\node_modules\jpeg-js\lib\decoder.js:323
throw "marker was not found";
^
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15
I am also facing the same issue. I have checked my image on which i am making processing and it is not corrupted image.
Error in Jimp.read() Error: marker was not found at decodeScan (/var/task/node_modules/jpeg-js/lib/decoder.js:344:15) at constructor.parse (/var/task/node_modules/jpeg-js/lib/decoder.js:799:29) at Object.decode [as image/jpeg] (/var/task/node_modules/jpeg-js/lib/decoder.js:1091:11) at Jimp.parseBitmap (/var/task/node_modules/@jimp/core/dist/utils/image-bitmap.js:196:53) at Jimp.parseBitmap (/var/task/node_modules/@jimp/core/dist/index.js:431:32) at /var/task/node_modules/@jimp/core/dist/index.js:373:15 at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3) { methodName: 'constructor' }I am facing the same issue
Error: marker was not foundI’m trying to use node-thumbnail which I believe use the Jimp library. I’m passing an array of images to the thumbnail generating function and I’m getting the same “marker was not found” issue. I’m pretty sure none of my images is corrupted and I can’t seem to work my way out of this