-
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
Fix loading of inline JPEG images #5286
Fix loading of inline JPEG images #5286
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/dc3812998057c18/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/dc3812998057c18/output.txt Total script time: 0.77 mins Published
|
// Hence when the first byte of the stream of an inline JPEG image is | ||
// a whitespace character, we thus simply skip over it. | ||
if (isCmd(this.buf1, 'ID')) { | ||
var firstByte = stream.peekBytes(1)[0]; |
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.
would you consider implementing a peekByte() in Stream?
peekByte: function Stream_peekByte() {
var byte = this.getByte();
this.pos--;
return byte;
},
i think thats cleaner
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.
I actually considered doing that, but I wasn't sure if it belonged in this PR or in a followup.
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.
its not there because nobody needs it right now. So I would say its valid to be part of this PR (maybe a second commit). I think that API should be there, and the actual way of getting it merged doesnt matter much :)
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.
there are more than three implementations of abstract Stream class, peekByte will be a big effort for this PR
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @yurydelendik received. Current queue size: 0 Live output at: http://107.22.172.223:8877/6f7a74ae5c2e5d5/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_test from @yurydelendik received. Current queue size: 0 Live output at: http://107.21.233.14:8877/527722b317e1bd3/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/6f7a74ae5c2e5d5/output.txt Total script time: 19.69 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/527722b317e1bd3/output.txt Total script time: 22.56 mins
|
Fix loading of inline JPEG images
Thank you |
This is a tentative patch to fix loading of inline JPEG images, based on this paragraph: http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#page=223&zoom=auto,0,600.
Fixes #2812.
Fixes #4776.
Fixes bug 1065245
Also fixes missing images in (but the text is still incorrect):
#2840.
#4054.