-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Fix JPX "Out of Packets" Error (issues 4358, 4659, 4814) #5426
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/e9503678c6faf44/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/e9503678c6faf44/output.txt Total script time: 0.76 mins Published
|
/botio-windows test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.22.172.223:8877/aa40a1a6c1a714f/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/aa40a1a6c1a714f/output.txt Total script time: 19.59 mins
|
also fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1085042 |
@fkaelberer Would it be possible to add a reduced test case to this PR, or at least a linked test, to avoid future regressions? |
@Snuffleupagus I can not produce the images themselves, but I can extract the images from the problematic pdf files to a separate pdf file. However, I don't know if any of the images is 'free' enough to add them to pdf.js's test cases. |
I found a file that we should be able to use as a "linked" test: http://web.archive.org/web/20141021115409/http://www.hunterwellman.com/hw_graphics.pdf. { "id": "pr5426",
"file": "pdfs/pr5426.pdf",
"md5": "...",
"rounds": 1,
"link": true,
"firstPage": 13,
"lastPage": 13,
"type": "eq"
}, You also need to add a file called
|
This patch makes the image from mozilla#5349 appear correctly, the artefacts for the last packet are fixed in mozilla#5426. This patch also optimizes some "in-checks" and adds a few header parsings.
i think that the patch also needs to be rebased on master. |
@Snuffleupagus Thank you for the detailed advice. Or should I rather include https://bug865858.bugzilla.mozilla.org/attachment.cgi?id=742273 from bug 865858, simply because its only 0.5MB instead of 1.9MB? |
Yes, that sounds like a better alternative. |
36fdd6f
to
acd3afd
Compare
acd3afd
to
6337a43
Compare
Done. |
/botio-windows test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.22.172.223:8877/172739e81d49729/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/172739e81d49729/output.txt Total script time: 18.25 mins
|
thank you for the patch! /botio-windows makeref |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @yurydelendik received. Current queue size: 2 Live output at: http://107.22.172.223:8877/e3caf0395326470/output.txt |
Fix JPX "Out of Packets" Error (issues 4358, 4659, 4814)
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/e3caf0395326470/output.txt Total script time: 17.91 mins
|
This PR fixes the handling of JPX packets which caused blurriness in JPEG2000 images (#4814, #4659 page 3) and random blocks at the bottom or right border of the images (#4358).
This PR does not fix #5349, so it does not make #5350 obsolete.
The
if
condition in this fix should be equivalent to jj2000/PktDecoder.java#L483