You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It works fine for most of the images, but I've found an image which get-orientation fails to process. The error message is the following:
node:assert:399
throw err;
^
AssertionError [ERR_ASSERTION]: can only skip > 0 bytes, got "-4"
at EXIFOrientationParser._skipBytes (/Users/iig/IdeaProjects/fugo-media-processor/node_modules/stream-parser/index.js:117:3)
at EXIFOrientationParser.<anonymous> (/Users/iig/IdeaProjects/fugo-media-processor/node_modules/get-orientation/index.js:48:26)
at process (/Users/iig/IdeaProjects/fugo-media-processor/node_modules/stream-parser/index.js:270:20)
at /Users/iig/IdeaProjects/fugo-media-processor/node_modules/stream-parser/index.js:204:14
at /Users/iig/IdeaProjects/fugo-media-processor/node_modules/stream-parser/index.js:294:16
at EXIFOrientationParser.write [as _write] (/Users/iig/IdeaProjects/fugo-media-processor/node_modules/stream-parser/index.js:157:3)
at writeOrBuffer (node:internal/streams/writable:389:12)
at _write (node:internal/streams/writable:330:10)
at EXIFOrientationParser.Writable.write (node:internal/streams/writable:334:10)
at ReadStream.ondata (node:internal/streams/readable:754:22) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '=='
}
Here is the image which makes get-orientation to fail:
I'm using the latest version of the package: 1.1.2
The text was updated successfully, but these errors were encountered:
Just checked the image and noticed that image contains "empty" non-EXIF APP1 marker which expressed to 2 bytes segment length. Currently parser assumes APP1 segment length to be greater or equal than 8 bytes for non-EXIF APP1 segment to skip unnecessary bytes, but that 2 bytes segment length made parser to skip negative bytes (-6 bytes). So this resulted to that error.
I thought that I've tested get-orientation with many "corrupted" JPEG images, but wow. your case is not covered by that test images.
I can fix this issue and I will include this image to "corrupted" image set for testing. but hey, Can I use this image for testing? I have concerns about image licensing.
Unfortunately, I cannot guarantee an ETA at this moment but expected to be resolved in next 2 weeks - I've been super busy recent days and I don't have enough spare time to fix this issue 😭
Anyway thanks again for reporting this and this was super helpful for me. Stay tuned!
It works fine for most of the images, but I've found an image which
get-orientation
fails to process. The error message is the following:Here is the image which makes
get-orientation
to fail:I'm using the latest version of the package: 1.1.2
The text was updated successfully, but these errors were encountered: