question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JPEG image produces unrecognized file format error

See original GitHub issue

I 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'
}

snapshot

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
puzrincommented, Nov 12, 2021

See 7.2.2 with fixes.

1reaction
rstecklercommented, Nov 10, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found