JPEG image produces unrecognized file format error
See original GitHub issueI have what I believe is a valid JPEG image from a camera and when I try to obtain the size I get the ProbeError: unrecognized file format
message.
const sizeOf = require('probe-image-size');
(async () => {
console.log(
await sizeOf(
'https://user-images.githubusercontent.com/1081811/141005965-09e60140-5a30-42ab-989a-dea0c3c361d7.jpg'
)
);
})();
reject(last_error || new ProbeError('unrecognized file format', 'ECONTENT'));
^
ProbeError: unrecognized file format
at ParserStream.parserEnd (/Users/Jako/Dev/github/double-take-alt/api/node_modules/probe-image-size/stream.js:39:28)
at Object.onceWrapper (node:events:509:28)
at ParserStream.emit (node:events:390:28)
at endReadableNT (node:internal/streams/readable:1343:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
code: 'ECONTENT'
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
How to repair JPEG image file when it throws Unknown error
Sometimes you encounter Unknown JPEG format error when you try to open a JPEG image file. For common people, this error is just...
Read more >How to Fix Invalid or Unknown Image File Format Error
If your JPEG file is showing an invalid or unknown image error while opening then you can fix it by applying the various...
Read more >Fix 'Unsupported Format Error' When Open Photos On Android
Part 3: How to Fix 'Unsupported Format Error' When Open Photos On Android · Method 1: Try reducing the image size · Method...
Read more >How To Fix JPG “An Unknown Or Invalid Jpeg Marker Type Is ...
1. Search the JPEG file and right-click on it · 2. Choose the Rename option and rename the JPEG images with .jpeg or...
Read more >"The file is in an unrecognized format" - Apple Community
Trying to import regular jpeg images from the Canon and only a few import. Then I get the message above. Tried a second...
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 Free
Top 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
See 7.2.2 with fixes.
The camera model is Dahua IPC-T5442T-ZE
It’s become pretty popular in the security community in the last year.
Appreciate you implementing a fix even though these seems like an edge case and is being caused by a non-standards-compliant device.