Commit 1264fa5
committed
docs(images): make the resize-rule claim precise, correct two table rows
Building a live cost calculator from the doc's numbers caught two things the prose
had glossed.
The resize rule is not an iterative shrink. My first implementation stepped the scale
down by 1% until the patch grid fit, which gets the TOKEN COUNT right every time but
misreports the sent dimensions — 1447x814 where the docs say 1456x819. Replaced with a
binary search for the largest scale whose grid fits the cap, which is what the rule
actually is.
Checked against every worked example in the vision docs: token count matches on all
twelve, dimensions on eleven. The twelfth is one standard-tier row a single pixel wide
of the reference (1270 vs 1269, same 1564 tokens) — a rounding convention I could not
derive from six data points, and the doc now says so rather than claiming the rule was
reproduced "exactly".
Two rows in the cost table were computed with the stepping version and are corrected:
the macOS retina grab is 2380x1546 (not 2377x1544) and the 12 MP photo is 2212x1659 at
4740 tokens (not 2193x1645 / 4661). Both were mine, neither came from the docs.
None of this moves a decision — the 1568 default and the "server already caps the cost"
argument rest on the 4K row, which was right. But a plan whose own arithmetic disagrees
with its live calculator is worse than one with no calculator.1 parent 864ea91 commit 1264fa5
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
0 commit comments