Skip to content

Say which transform a picture was drawn with - #32

Merged
tannevaled merged 1 commit into
mainfrom
feat/the-matrix-a-picture-was-drawn-with
Nov 9, 2026
Merged

tannevaled merged 1 commit into
mainfrom
feat/the-matrix-a-picture-was-drawn-with

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

feat(image): say which transform a picture was drawn with

Image carried the box a picture covers on the page, which cannot tell a turned
picture from an upright one: both report the same rectangle. A caller that only
wants to know where a picture is does not care, and one that must map a region
of the PAGE into the picture's own SAMPLES cannot work without it.

That caller is a redaction. ISO 32000-1 12.5.6.23 requires the pixels under a
region to be destroyed rather than masked, so ops has to find them -- and with
the box alone it would destroy the whole intersection of a turned picture's
bounding box, which is more than was asked for. A redaction that removes too
much is its own betrayal.

So Image.Matrix is the transform in force where the picture was drawn, as
a b c d e f, mapping the unit square the picture occupies onto the page. For a
picture inside a form it is the whole chain: the page's transform, the form's
/Matrix and the one at the Do. b and c are zero for an upright picture and stay
zero for a flipped one, so it is also how a caller says "only the straight
ones" and refuses the rest by name rather than guessing.

Three tests: the matrix of an upright, a turned, a skewed and a flipped
placement with the uprightness each implies, and the chain through a form
measured against arithmetic done by hand (5x4 inside a form scaled 3 inside a
page scaled 2 is 30 by 24 at 16, 22).

Co-Authored-By: Claude Opus 5 noreply@anthropic.com

Image carried the box a picture covers on the page, which cannot tell a turned
picture from an upright one: both report the same rectangle. A caller that only
wants to know where a picture is does not care, and one that must map a region
of the PAGE into the picture's own SAMPLES cannot work without it.

That caller is a redaction. ISO 32000-1 12.5.6.23 requires the pixels under a
region to be destroyed rather than masked, so ops has to find them -- and with
the box alone it would destroy the whole intersection of a turned picture's
bounding box, which is more than was asked for. A redaction that removes too
much is its own betrayal.

So Image.Matrix is the transform in force where the picture was drawn, as
a b c d e f, mapping the unit square the picture occupies onto the page. For a
picture inside a form it is the whole chain: the page's transform, the form's
/Matrix and the one at the Do. b and c are zero for an upright picture and stay
zero for a flipped one, so it is also how a caller says "only the straight
ones" and refuses the rest by name rather than guessing.

Three tests: the matrix of an upright, a turned, a skewed and a flipped
placement with the uprightness each implies, and the chain through a form
measured against arithmetic done by hand (5x4 inside a form scaled 3 inside a
page scaled 2 is 30 by 24 at 16, 22).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 229be50 into main Nov 9, 2026
1 check passed
@tannevaled
tannevaled deleted the feat/the-matrix-a-picture-was-drawn-with branch November 9, 2026 12:14
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