Skip to content

docs: a redaction destroys the pixels of the picture under it - #58

Merged
tannevaled merged 1 commit into
mainfrom
docs/destroy-the-pixels
Nov 9, 2026
Merged

tannevaled merged 1 commit into
mainfrom
docs/destroy-the-pixels

Conversation

@tannevaled

@tannevaled tannevaled commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

ops v0.35.0, reaching
the workbench in app v0.51.0: a redaction across a picture now destroys the
picture's own samples
instead of refusing the region.

That refusal was the one a reader of scanned paper met on every selection
they ever made — a scan is one picture across the whole page, so "across an
image"
covered everything.

Three things the page now says:

  • the samples are destroyed and the picture written back, which is §12.5.6.23's
    own wording: "clipping or image masks shall not be used to hide that data".
    A mask is the image-shaped version of the black rectangle this verb exists to
    replace;
  • what is still refused, and why a JPEG is the interesting one — destroying
    its pixels means decoding and re-encoding, which re-quantises the whole
    picture and changes its size, so the lossless path is planned instead;
  • ⛔ a warning callout, because a redacted page looks the same whether this
    worked or not
    . The region is painted afterwards either way; the only way to
    tell is to read the saved file, which is what the library's gate does — it
    walks every object and decodes each one, since a picture's samples are
    compressed and a plain search cannot see them.

Refs go-pdfkit/ops#82 — the JPEG half stays open there on purpose; this page is
what points a reader at it.

🤖 Generated with Claude Code

ops v0.35.0, in the workbench from app v0.51.0. The "across an image" refusal
was the one a reader of scanned paper met on EVERY selection, since a scan is
one picture across the whole page.

Three things the page now says:

- the samples are DESTROYED and the picture written back, which is 12.5.6.23's
  own wording -- a mask is the image-shaped version of the black rectangle this
  verb exists to replace;
- what is still refused, and why a JPEG is the interesting one: re-encoding
  re-quantises the whole picture and changes its size, so ops#82 plans the
  lossless path instead;
- ⛔ a warning callout, because a redacted page LOOKS THE SAME whether this
  worked or not -- the region is painted either way, and the only way to tell is
  to read the saved file.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 9c152f1 into main Nov 9, 2026
2 checks passed
@tannevaled
tannevaled deleted the docs/destroy-the-pixels branch November 9, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant