Conversation
Only pages carrying ink were added to the archive's page list, and the exporter takes a page's background from its position in that list. So on a partly annotated document the nth page with ink was drawn over the nth page of the document. Reported in ddvk#228. Measured on a 28 page document annotated on 14: the export had 14 pages, the backgrounds were source pages 1 to 14 in order, and the ink from page 8 was drawn over the background of page 3. That ink was confirmed as page 8's by comparing it against a copy of the same page exported by the tablet itself, 99.9% of its pixels matching. Adding an entry for every declared page puts each one back over its own background, and keeps the pages nobody drew on, which is the other half of the report. The same document now exports 28 pages, each over its own source page. This says nothing about where ink sits on a page. ddvk#483 covers that, and a landscape document needs both.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #228, which has been open since March 2023.
Only pages carrying ink are added to the archive's page list, and the exporter takes a page's background from its position in that list. So on a partly annotated document the nth page with ink is drawn over the nth page of the document, which is exactly what the original report describes.
ArchiveFromHashDocnow adds an entry for every page the content file declares, with no data where nobody drew. That puts each page back over its own background, and keeps the untouched pages, which is the other half of the report and what @damienchallet asked for further down the thread.Measured
A 28 page document, annotated on 14 of them.
Matching each exported page against every source page by pixel difference is how the background was identified, rather than reading it off the code.
The ink drawn over background page 3 was confirmed to be page 8's by comparing it against a copy of the same page exported by the tablet itself: 15100 of its 15116 ink pixels are the same pixels, 99.9%.
Scope
This is only about which page the ink lands on. It says nothing about where on that page it sits, which is #483. A landscape document needs both to come out right, and testing this one on a landscape document will still look wrong without the other.
Exports of partly annotated documents get longer, since pages nobody drew on are no longer dropped. That is the reported bug rather than a side effect, but it is a visible change to existing behaviour and worth knowing before merging.