Repository navigation
workbench: a scan can be redacted now, and this page said so before it was true - #63
Merged
Merged
Conversation
…t was true
⛔⛔ THE PAGE PROMISED THE CASE IT COULD NOT DO. It said a redaction across a
picture is "the difference between a workbench a reader of scanned paper can use
and one they cannot", and two paragraphs later that a JPEG is refused. Every
scanner writes DCTDecode. So the page a reader could redact was the page nobody
has, and the two sentences contradicted each other with a paragraph between
them.
ops v0.38.0 closes it, and the callout now says the gap existed rather than
quietly dropping the sentence: a reader who tried this and was refused deserves
to find out that it was us.
What replaces the "open as ops#82" paragraph:
- a JPEG is written back as PLAIN SAMPLES, not as another JPEG. Re-encoding
re-quantises block by block, so every block of the photograph would come
back changed in order to destroy a corner of it. The file grows, which is
the trade.
- a CMYK JPEG is refused rather than converted: no faithful conversion to RGB
without the output profile the file does not carry.
- past 100 megapixels is refused from the HEADER, before anything is decoded:
a JPEG declares its size in a handful of bytes and a decoder then allocates
width × height × 3, so thirty-nine bytes can ask for 1.2 GB.
Refs go-pdfkit/ops#82.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
⛔⛔ The page promised the case it could not do. It said a redaction across
a picture is "the difference between a workbench a reader of scanned paper can
use and one they cannot", and two paragraphs later that a JPEG is refused.
Every scanner writes
DCTDecode. So the page a reader could redact was thepage nobody has, and the two sentences contradicted each other with one
paragraph between them.
ops v0.38.0 closes it.
The callout added here says the gap existed rather than quietly dropping
the sentence: a reader who tried this and was refused deserves to find out that
it was us, not their file.
What replaces the "open as ops#82" paragraph
re-quantises block by block, so every block of the photograph would come back
changed in order to destroy a corner of it. The file grows, which is the
trade.
conversion to RGB without the output profile the file does not carry.
decoded: a JPEG declares its size in a handful of bytes and a decoder then
allocates
width × height × 3, so thirty-nine bytes can ask for 1.2 GB.Refs go-pdfkit/ops#82.
🤖 Generated with Claude Code