-
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
Use the Alternate entry, if it exists, in ICCBased Colour Space dictionaries (issue 5836, issue 5939, issue 6055) #6112
Use the Alternate entry, if it exists, in ICCBased Colour Space dictionaries (issue 5836, issue 5939, issue 6055) #6112
Conversation
Nice work! I couldn't quite figure out what was wrong, but I'm glad you did! I hope my comment in #5836 didn't distract you too much, as it seemed like that was only caused by the issue, but not the issue itself. One question though: the spec says, for the Ninja edit: mupdf seems to do the same as your patch (http://mupdf.com/docs/browse/source/pdf/pdf-colorspace.c.html) and, slightly more obscured, Poppler does it too (https://github.com/danigm/poppler/blob/0011805e22193b690b99a53dcb9986ce04eb3eb4/poppler/GfxState.cc#L1412), so we should be fine. |
Good questions! I don't have very convincing answers, but this is my take on it:
I also thought about that when trying to make sense of the specification, but I don't know what that should look like while also fixing the referenced issues.
Ideally we probably should, but again without actual test-cases (i.e. PDF files found in the wild), that seems difficult to me. |
Agreed, and since mupdf and poppler also work exactly this way (see the ninja edit in my previous comment), this should be fine. I'll review and test this once the Windows bot is alive again. |
Actually, based both on the specification and the implementation in |
I've just uploaded a new version, which checks that the components match and (indirectly) that it's not a /botio-linux preview |
Actually, the complete quote is:
Since we currently completely ignore the |
if (alt) { | ||
var altIR = ColorSpace.parseToIR(alt, xref, res); | ||
// Parse the /Alternate CS to ensure that the number of components | ||
// are correct, and that it is not a PatternCS. |
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'm going to push a new version of the patch, which slightly improves this comment. No functional code changes are made, though!
…onaries (issue 5836, issue 5939, issue 6055) Fixes 5836. Fixes 5939. Fixes 6055.
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/25e87eaf6cda590/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/25e87eaf6cda590/output.txt Total script time: 0.70 mins Published |
/botio test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/af607a7388c3b63/output.txt |
/botio-windows test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @yurydelendik received. Current queue size: 0 Live output at: http://107.22.172.223:8877/d3f364d1be8a7fb/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/af607a7388c3b63/output.txt Total script time: 17.99 mins
|
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/d3f364d1be8a7fb/output.txt Total script time: 17.85 mins
|
/botio makeref |
From: Bot.io (Linux)ReceivedCommand cmd_makeref from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/6f830d1fc1fd4ba/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @timvandermeij received. Current queue size: 0 Live output at: http://107.22.172.223:8877/1dd94994592d4c5/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/1dd94994592d4c5/output.txt Total script time: 17.73 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/6f830d1fc1fd4ba/output.txt Total script time: 17.90 mins
|
Use the Alternate entry, if it exists, in ICCBased Colour Space dictionaries (issue 5836, issue 5939, issue 6055)
Thank you! |
@timvandermeij Thank you too! |
Fixes #5836.
Fixes #5939.
Fixes #6055.
The relevant part of the specification: http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#G7.3804856.