Two rubbing sets, counted page by page first
A while back I folded two sets of public-domain calligraphy rubbings on disk (labeled public-domain inside the package; only the label itself is stated here) each into a single folder, and let the file manager count the directories recursively. The numbers did not line up at first: the Duobao folder counted 106 files while the manifest said 103 pages, and the extra three are metadata files. Settling the ledger: the 《多宝塔碑》 group (Duobao for short) holds 4 volumes with 103 pages in total, and the 《自叙帖》 group (Zixu for short) holds 4 volumes with 110 pages in total. Before using them I reconciled the page ledger against the byte ledger once each, and finally cropped single characters out of real rubbing pages to measure the whole conversion from selection coordinates to re-encoded bytes end to end. In other words, this article is about counting first and cropping second, with both accounts kept separate.
Byte ledger: JPG totals vs RAR archives
The disk tally comes out as follows. The Duobao JPG files total 18,306,187 bytes against a RAR package of 18,070,663 bytes, a ratio of 1.0130; the Zixu JPG files total 20,062,273 bytes against a RAR package of 19,553,708 bytes, a ratio of 1.0260. Rubbing pages are already JPG, a lossy format, so compressing them into an archive saves only 1%-3%; hoping an archive frees a big slice of disk does not hold up. Whenever a package looks only slightly smaller than the originals, check this ratio first and you immediately know there is no hidden padding.
Figure 1: page counts and byte ledgers of the two rubbing sets
Per-page ledger: the median and both tails
Sorting every page JPG by bytes in ascending order: Duobao has n=103, an odd count, so the median is the 52nd entry in the sorted list, at 179,742 bytes; Zixu has n=110, an even count, so the median averages the two middle entries, at 176,611 bytes. The two tails tell a completely different story: the smallest page is 74,986 vs 7,277 bytes, and the largest page is 238,005 vs 543,645 bytes, so Zixu is stretched far at both ends. If you want to sample representative pages, watching the median page is steadier than watching the mean. The complete ledger for both sets is below, and every row of it came from the same per-file scan.
| Item | Duobao Pagoda stele | Zixu tie |
|---|---|---|
| Volumes and pages | 4 volumes 103 pages | 4 volumes 110 pages |
| JPG total bytes | 18,306,187 | 20,062,273 |
| RAR package bytes | 18,070,663 | 19,553,708 |
| JPG to RAR ratio | 1.0130 | 1.0260 |
| Median page bytes | 179,742 | 176,611 |
| Smallest and largest page bytes | 74,986 and 238,005 | 7,277 and 543,645 |
| SOF measured sizes | 9 kinds: 1280 wide on 81 pages, 960 wide on 22 pages | 6 kinds: 1280 wide on 97 pages, 500 wide on 13 pages |
Size trap: manifest claims disagree with SOF readings
The manifest file claims every page is 1280 pixels wide, yet parsing the JPEG SOF marker page by page disagrees: Duobao spans 9 different sizes in total, with 1280 wide covering only 81 pages plus 22 pages at 960 wide; Zixu has 6 sizes, 97 pages at 1280 wide and 13 more pages at only 500 wide. I am leaving this conflict exactly as found instead of smoothing it over: if you want to filter pages by width, read the file headers yourself and do not treat the manifest as evidence.
This also means a single character does not carry a fixed size feel across pages: the same 170×210 selection looks like a small chip on a 1280-wide page, yet on a 500-wide page it already occupies a quite substantial slice of the page width. Before cropping any character by ratio, first read out the actual width of that specific page, because the width you get decides how much of the sheet your box really covers.
Displayed MB online vs measured bytes
The online detail pages of the Duobao Pagoda stele and the Zixu tie show 103 pages / 17.5 MB and 110 pages / 19.1 MB respectively, and both language paths return 200. Those MB figures are display values: the magnitude agrees with the measured JPG totals, while the RAR packages are really 17.23 and 18.65 MB. Display values are fine for cross-checking the wording of a listing, but any argument should rest on per-file byte counts rather than on a rounded label.
Cropping a full page down to one character
With the resource account settled, the working account is left. Using Image Crop, I framed a 170×210 single-character selection on the Duobao median page of 1280×1748, then exported the very same selection in three formats: JPG at quality 0.92 gave 3,041 bytes, PNG gave 13,318 bytes, and WebP gave 1,482 bytes — changing nothing but the format, JPG to PNG already differs by a factor of 4.38. Pushing quality down two more steps traces the curve: 0.5, 0.8 and 0.92 produce 1,498 / 2,094 / 3,041 bytes respectively; and exporting through toBlob and toDataURL yields byte-for-byte identical artifacts.
Figure 2: bytes for one 170×210 selection across three formats and three quality steps
The output canvas always equals the selection; ratio labels swap shapes
Crop a 100×100 selection and the output canvas is exactly 100×100, at 8,173 bytes for PNG and 2,380 bytes for JPG — there is no upscaling or resampling channel anywhere on this chain, so the selection pixels are the output pixels. On another page, a landscape handscroll sheet of 1280×816, cropping an 180×180 character gave 34,707 bytes for PNG and 9,326 bytes for JPG, with the same one-to-one correspondence. In other words, the output bytes are decided only by the selection content plus the format and quality parameters; the canvas size never makes any trade-off on your behalf.
The shapes produced by the ratio presets on a full page deserve their own note: 1:1 yields 1280×1280@(0,234); clicking the "4:3" button produces a 1280×1707 vertical crop, while clicking "3:4" produces a 1280×960 horizontal one — the button labels and the output shapes are swapped; and 9:16 yields 983×1748. Recognize what each button actually produces before exporting anything by ratio.
Lower bound of the size box: min says 1, the real floor is 12
The min attribute on the size input box is declared as 1, yet the runtime lower bound in JS is 12: entering 0 is ignored entirely, entering 5 gets lifted to 12, and entering 99999 gets clamped back to 1280. The mouse side behaves the same way — dragging out a new selection smaller than 12 pixels restores the full selection the moment you release. Declared attributes and runtime behavior are two separate sets of numbers, so trust the measurement. Whether an out-of-range input shows any failure message was not triggered during this round, and that line can only be marked exactly where it stands.
Q: How many bytes does one cropped 170×210 character actually take?
Measured on the Duobao median page: JPG at quality 0.92 comes to 3,041 bytes, WebP to 1,482 bytes, and PNG to 13,318 bytes. Stocking characters in PNG multiplies the footprint several times over; if you want to keep the byte count small, start from JPG or WebP instead.
Q: Why can a crop never be enlarged?
Measurements show the output canvas always equals the selection: 100×100 in means 100×100 out, and this stage of the tool generates no new pixels at all. If you need bigger glyphs, the source has to change to a higher-resolution scan page; the cropper itself cannot help you there.
Q: The page shows 17.5 MB and my own tally shows bytes — which one should I trust?
17.5 and 19.1 MB are display values on the detail pages; their magnitude agrees with the JPG totals of 18,306,187 and 20,062,273 bytes, while the RAR packages measure 17.23 and 18.65 MB. Reconcile accounts by per-file byte counts, and use the displayed values only to sanity-check the magnitude.