-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #3591 / list unsupported JPX options #4639
Conversation
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/9a7d42528b3988d/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/9a7d42528b3988d/output.txt Total script time: 0.38 mins Published
|
/botio test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/1475497c77ed5e0/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.22.172.223:8877/d38cbed8a4dfc08/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/d38cbed8a4dfc08/output.txt Total script time: 21.61 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/1475497c77ed5e0/output.txt Total script time: 25.61 mins
|
unsupported += ', predictableTermination'; | ||
} | ||
if (unsupported !== '') { | ||
throw 'Unsupported COD options: ' + unsupported.substring(2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make 'unsupported' as array and use push() and join(). Also, can you change this line to create an Error object:
throw new Error('Unsupported COD options: ' + unsupported.join(', '));
You're right,
|
@fkaelberer Could you squash the commits? |
Done. |
Looks good. |
Looks good. But I'm thinking about |
The error messages are already very long (see my comment above), and throwing a |
if (this.failOnCorruptedImage) { | ||
error('JPX error: ' + e); | ||
if (doNotRecover || this.failOnCorruptedImage) { | ||
throw 'JPX error: ' + e; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about making this one just throw e;
and warning below something like warn('Trying to recover: ' + e.message)
(we may need to prefix all thrown exceptions above with 'JPX error: ')?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But that doesn't change the output, does it?
Maybe we can stay with the current commit which prints
"Warning: Unable to decode image: JPX error: Unsupported COD options (sopMarkerUsed, ephMarkerUsed, resetContextProbabilities, terminationOnEachCodingPass, verticalyStripe, predictableTermination)" pdf.worker.js:200
"Warning: Dependent image isn't ready yet" pdf.js:200
instead of
"Warning: JPX error: Unsupported COD options: {"entropyCoderWithCustomPrecincts":false,"sopMarkerUsed":true,"ephMarkerUsed":true,"progressionOrder":1,"layersCount":1,"multipleComponentTransform":1,"decompositionLevelsCount":5,"xcb":6,"ycb":6,"selectiveArithmeticCodingBypass":false,"resetContextProbabilities":true,"terminationOnEachCodingPass":true,"verticalyStripe":true,"predictableTermination":true,"segmentationSymbolUsed":true,"reversibleTransformation":0}. Trying to recover" pdf.worker.js:201
"Warning: Unable to decode image: TypeError: codingStyleParameters is undefined" pdf.worker.js:201
"Warning: Dependent image isn't ready yet" pdf.js:201
Thank you for the patch (landed in #4939) |
case 0xFF55
)