Add color-managed PDF review reports - #32
Merged
Merged
Conversation
File > Export Review PDF... (Ctrl+Alt+P) renders every annotated frame with its notes into a single document: a cover identifying the shot, source, frame rate and note count with a contents list, then one page per annotated frame showing the burned-in frame above the notes that go with it. Written with Qt QPdfWriter, so there is no new dependency and the text is real embedded text rather than pixels baked into the image: the delivered file stays selectable and searchable. Pinned notes are numbered to match the markers drawn on the frame above them, so a note can be traced back to the exact spot it refers to. widgets/pdfreport.py takes plain page dicts, not a player or a reader, so a report can be laid out and verified without decoding anything. Notes are given the room they need and the frame takes what is left: a report whose text is cut off is worse than one whose image is a little smaller. A frame that fails to decode still gets its page, because the note has to reach the recipient even when the picture does not. The tests read the written PDF back with pypdf and assert on the extracted text, so they check what a recipient actually gets rather than what the builder believed it drew. Also fixes the test environment, which could not render text at all: Qt no longer ships fonts and the offscreen platform plugin finds none by itself, so QFontDatabase came back EMPTY and every drawText() silently drew nothing. No glyphs in a rendered widget, no text operators in a generated PDF. Any test asserting on drawn text failed for reasons unrelated to the code. The suite now registers a system font, and CI installs fonts-dejavu-core, so text rendering is exercised for real on both platforms. 11 tests, 249 on the branch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TexnzYbmCjjTDB8zzZuUPb
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.
Summary
libpulse0Qt Multimedia runtimeRoot cause of #26 CI failure
The multiline
apt installchange placedlibpulse0after a shell comment, so Qt Multimedia failed to import during test collection. The PDF implementation was never reached. This branch restoreslibpulse0and adds the font package on the same valid install command.Original feature authored by @emlcpfx in #26.
Validation
pytest -qpassedgit diff --checkReplaces #26.